/* Guest upload page — mobile-first, self-contained (no external fonts/CDN). */

:root {
  --bg: #faf7f3;
  --card: #ffffff;
  --ink: #2b2622;
  --muted: #8a8079;
  --line: #ece5dd;
  --accent: #c58b6f;      /* warm wedding tone */
  --accent-ink: #8a5a41;
  --ok: #4c9a6a;
  --err: #c9564a;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px calc(28px + env(safe-area-inset-bottom));
}

.head { text-align: center; margin: 8px 0 20px; }
.head h1 { font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 0.95rem; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.banner {
  background: #fdece9;
  color: var(--err);
  border: 1px solid #f3c9c3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.field { display: block; margin-bottom: 16px; }
.label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.label em { color: var(--accent-ink); font-style: normal; font-weight: 500; }

#uploader {
  width: 100%;
  font-size: 1.05rem;           /* >=16px avoids iOS zoom-on-focus */
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
#uploader:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 139, 111, 0.18);
}

/* upload widget mount */
.mount { margin-top: 4px; }
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: #fdf7f3;
  color: var(--accent-ink);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.pick:active { background: #f7ece4; }
.pick-icon { font-size: 1.8rem; line-height: 1; }
.pick-text { font-size: 1.05rem; font-weight: 700; }
.pick-hint { font-size: 0.82rem; color: var(--muted); }

.mount.is-locked .pick {
  border-color: var(--line);
  background: #f6f3ef;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.85;
}

/* per-file progress list */
.list { list-style: none; margin: 16px 0 0; padding: 0; }
.row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
.row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.row-name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-state {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.row.is-done .row-state { color: var(--ok); }
.row.is-error .row-state { color: var(--err); }

.bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.row.is-done .bar-fill { background: var(--ok); }
.row.is-error .bar-fill { background: var(--err); }

.row-retry {
  flex-shrink: 0;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

/* success state */
.done { text-align: center; }
.done-mark {
  width: 58px;
  height: 58px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 2rem;
  line-height: 58px;
}
.done h2 { margin: 0 0 6px; font-size: 1.3rem; }
.done p { margin: 0 0 18px; color: var(--muted); }

.btn-ghost {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent-ink);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
}

.foot {
  text-align: center;
  margin-top: 22px;
}
.foot p { color: var(--muted); font-size: 0.8rem; margin: 0; }
