/* 청첩장의 공통 색상·그림자 토큰을 공유하는 사진·동영상 전송 페이지 */
:root {
  color-scheme: light;
  --paper: #f5f1ea;
  --ink: var(--color-text-primary);
  --muted: var(--color-coolgray-700);
  --line: var(--color-border);
  --accent: var(--color-text-primary);
  --danger: #9a4036;
  --success: #41664c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: #edf0f3;
  color: var(--ink);
  font-family: 'Noto Serif KR', Pretendard, serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; font-family: Pretendard, sans-serif; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
button, input[type="file"] { max-width: 100%; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--color-coolgray-700);
  outline-offset: 4px;
}
.upload-page {
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--color-white);
  box-shadow: var(--shadow-depth-2);
}
.upload-nav { padding: max(22px, env(safe-area-inset-top)) 24px 12px; background: var(--paper); }
.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 13px;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.upload-header {
  padding: 22px 24px 44px;
  text-align: center;
  background: var(--paper);
}
.eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 4px; color: var(--color-coolgray-700); }
.header-flower { display: block; margin: 20px 0 10px; font-size: 32px; line-height: 1; color: #8a857a; }
h1, h2, .intro, .couple-names, .thank-you { font-family: 'Noto Serif KR', Pretendard, serif; }
h1 { margin: 18px 0; font-size: 26px; font-weight: 500; letter-spacing: 4px; color: #5f5b52; }
.intro { margin: 0; font-size: 14px; line-height: 2; }
.couple-names { margin: 25px 0 0; font-size: 13px; letter-spacing: 4px; }
.couple-names span { margin: 0 10px; color: #8a857a; }
.upload-content { padding: 34px 24px 16px; }
.privacy-note { margin-bottom: 26px; }
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.privacy-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.file-picker { padding: 22px 18px; background: var(--color-coolgray-10); border: 1px dashed var(--line); border-radius: 10px; }
.file-picker label { display: block; font-weight: 700; font-size: 15px; }
.file-picker p { margin: 8px 0 16px; font-size: 12px; color: var(--muted); }
input[type="file"] { display: block; width: 100%; min-height: 44px; font-size: 12px; color: var(--ink); }
input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--color-coolgray-100);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.queue-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 28px; }
h3 { margin: 0; font-size: 14px; }
h3 span { margin-left: 5px; font-weight: 400; color: var(--muted); }
.queue-hint { font-size: 11px; color: var(--muted); }
.empty-queue { margin: 16px 0 0; padding: 28px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }
.photo-list { margin: 12px 0 0; padding: 0; list-style: none; }
.photo-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.photo-preview { position: relative; width: 64px; height: 76px; overflow: hidden; border-radius: 8px; background: var(--color-coolgray-50); }
.preview-fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; padding: 5px; font-size: 10px; text-align: center; line-height: 1.5; color: var(--muted); }
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-item--video { grid-template-columns: minmax(0, 1fr) 44px; }
.photo-preview--video { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.photo-preview video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-name { margin: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; line-height: 1.5; }
.photo-size { margin: 3px 0; font-size: 11px; color: var(--muted); }
.photo-status { margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.photo-item[data-state="invalid"] .photo-status,
.photo-item[data-state="error"] .photo-status { color: var(--danger); }
.photo-item[data-state="success"] .photo-status { color: var(--success); }
.photo-item[data-state="uploading"] .photo-status { color: var(--accent); font-weight: 700; }
.remove-button { width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 12px; }
.upload-actions { margin-top: 24px; }
.overall-status { margin: 0 0 14px; min-height: 24px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.upload-button { width: 100%; min-height: 52px; padding: 14px; border: none; border-radius: 8px; background: var(--color-button-primary); color: var(--ink); font-size: 15px; font-weight: 700; }
.upload-button:disabled { background: var(--color-coolgray-100); color: var(--color-coolgray-700); opacity: 1; }
.sending-note { margin: 12px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.notice { padding: 14px; border: 1px solid #e4bcb2; border-radius: 9px; font-size: 13px; line-height: 1.8; }
.notice--error { color: var(--danger); background: #fcf2ef; }
.thank-you { margin: 38px 0 18px; font-size: 12px; text-align: center; line-height: 2; }
.upload-footer { padding: 10px 24px max(30px, env(safe-area-inset-bottom)); text-align: center; font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.upload-footer span { margin: 0 6px; }
.preview-button { margin-top: 6px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--color-coolgray-100); color: var(--ink); font-size: 12px; }
@media (max-width: 374px) {
  .upload-content { padding-right: 18px; padding-left: 18px; }
  .photo-item:not(.photo-item--video) { grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 9px; }
  .photo-preview:not(.photo-preview--video) { width: 56px; height: 70px; }
  .wide-break { display: none; }
}
@media (hover: hover) {
  .upload-button:not(:disabled):hover { background: var(--color-yellow-450); }
  .remove-button:not(:disabled):hover { background: var(--color-coolgray-50); }
  .back-link:hover { color: var(--color-coolgray-800); }
}
