:root {
  --bg: #f6f3ee;
  --bg-2: #efe9e0;
  --surface: #ffffff;
  --surface-2: #f8f5f0;
  --text: #15212b;
  --muted: #6c7884;
  --faint: #a3acb4;
  --line: rgba(21, 33, 43, 0.09);
  --accent: #0a8ea0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 142, 160, 0.12);
  --gold: #a67c2e;
  --gold-soft: rgba(166, 124, 46, 0.13);
  --danger: #d6453d;
  --ok: #1f9d5c;
  --hero-1: #0c3b45;
  --hero-2: #12232f;
  --hero-text: #f4efe6;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.05), 0 8px 24px rgba(20, 30, 40, 0.06);
  --radius: 20px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1016;
    --bg-2: #0f161e;
    --surface: #141c25;
    --surface-2: #19232e;
    --text: #edf1f4;
    --muted: #8b98a5;
    --faint: #56626e;
    --line: rgba(255, 255, 255, 0.075);
    --accent: #37c6d4;
    --accent-ink: #062228;
    --accent-soft: rgba(55, 198, 212, 0.14);
    --gold: #e3c27e;
    --gold-soft: rgba(227, 194, 126, 0.13);
    --danger: #ff6b62;
    --ok: #4ed38a;
    --hero-1: #0f4552;
    --hero-2: #111a24;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1016; --bg-2: #0f161e; --surface: #141c25; --surface-2: #19232e; --text: #edf1f4; --muted: #8b98a5;
  --faint: #56626e; --line: rgba(255,255,255,.075); --accent: #37c6d4; --accent-ink: #062228; --accent-soft: rgba(55,198,212,.14);
  --gold: #e3c27e; --gold-soft: rgba(227,194,126,.13); --danger: #ff6b62; --ok: #4ed38a; --hero-1: #0f4552; --hero-2: #111a24;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

#app { padding: calc(var(--safe-top) + 10px) 16px calc(var(--safe-bottom) + 96px); max-width: 640px; margin: 0 auto; }
#app.bare { padding-bottom: calc(var(--safe-bottom) + 24px); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 14px; }
.topbar .greet { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.topbar h1 { font: 600 30px/1.1 var(--serif); margin: 2px 0 0; letter-spacing: -.01em; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 20px; color: var(--hero-text);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(55, 198, 212, .35), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(227, 194, 126, .18), transparent 60%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
  box-shadow: 0 18px 40px rgba(6, 30, 38, .28);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-radial-gradient(circle at 110% -10%, transparent 0 22px, rgba(255,255,255,.035) 22px 23px);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .75; display: flex; gap: 8px; align-items: center; }
.eyebrow .live { width: 7px; height: 7px; border-radius: 50%; background: #5ef0a0; box-shadow: 0 0 0 0 rgba(94,240,160,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(94,240,160,0); } 100% { box-shadow: 0 0 0 0 rgba(94,240,160,0); } }
.couple { font: italic 400 38px/1.05 var(--serif); margin: 10px 0 6px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.couple .amp { font-style: italic; color: #e9cf95; padding: 0 2px; }
.hero-meta { font-size: 14px; opacity: .8; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hero-meta button { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; text-align: left; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.countdown div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 10px 4px 8px; text-align: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.countdown b { display: block; font: 600 26px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.countdown span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.cue { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: inherit; }
.cue .cue-label { font-size: 13px; opacity: .75; }
.cue .cue-title { font-weight: 600; font-size: 17px; }
.cue .cue-time { margin-left: auto; text-align: right; }
.cue .cue-time b { font: 600 28px/1 var(--sans); font-variant-numeric: tabular-nums; display: block; }
.cue .cue-time small { opacity: .7; font-size: 12px; }
.cue.leave { background: linear-gradient(135deg, rgba(55,198,212,.35), rgba(55,198,212,.12)); border-color: rgba(55,198,212,.5); }
.cue.soon { animation: breatheRing 6s ease-in-out infinite; }
@keyframes breatheRing { 0%, 100% { box-shadow: 0 0 0 0 rgba(55,198,212,0); } 50% { box-shadow: 0 0 0 5px rgba(55,198,212,.22), 0 0 28px rgba(55,198,212,.25); } }
.arm { margin-top: 10px; font-size: 13px; opacity: .85; display: inline-flex; gap: 6px; align-items: center; color: inherit; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.08); }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-top: 14px; }
.card h2, .section-title { font: 600 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.section-title { margin: 26px 4px 10px; display: flex; justify-content: space-between; align-items: center; }
.section-title button { color: var(--accent); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.upload-cta {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; margin-top: 14px; padding: 16px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
}
.upload-cta.urgent { border-style: solid; border-color: var(--accent); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow); } }
.upload-cta .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.upload-cta b { display: block; font-size: 17px; }
.upload-cta small { color: var(--muted); }
.status-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.status-row .tick { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); display: grid; place-items: center; flex: none; }
.status-row .tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.status-row .grow { flex: 1; min-width: 0; }
.status-row button { color: var(--accent); font-weight: 600; font-size: 14px; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 4px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; font-weight: 600; color: var(--text); }
.action .ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.action.gold .ico { background: var(--gold-soft); color: var(--gold); }
.action:active, .upload-cta:active, .wed:active { transform: scale(.97); }
.action, .upload-cta, .wed, .btn { transition: transform .15s ease; }
.action[disabled] { opacity: .45; }

/* ---------- timeline ---------- */
.timeline { position: relative; margin-top: 4px; padding-left: 0; }
.tl-item { display: grid; grid-template-columns: 64px 20px 1fr; gap: 0 10px; position: relative; }
.tl-time { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 15px; color: var(--muted); }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item:first-child .tl-rail::before { top: 20px; }
.tl-item:last-child .tl-rail::before { bottom: calc(100% - 20px); }
.tl-dot { position: relative; margin-top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--faint); z-index: 1; }
.tl-item.key .tl-dot { border-color: var(--gold); background: var(--gold); }
.tl-body { padding: 8px 0 12px; min-width: 0; }
.tl-card { background: var(--surface); border-radius: 16px; padding: 11px 14px; box-shadow: var(--shadow); }
.tl-card .t { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.tl-card .t .emoji { font-size: 15px; }
.tl-card .loc { font-size: 13px; color: var(--muted); margin-top: 2px; display: block; text-align: left; }
.tl-card .loc u { text-decoration-color: var(--faint); text-underline-offset: 3px; }
.tl-card .note { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: auto; flex: none; }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.tl-item.past { opacity: .45; }
.tl-item.next .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item.next .tl-card { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.tl-item.now .tl-dot { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 20%, transparent); }
.tl-item.now .tl-card { box-shadow: 0 0 0 1.5px var(--ok), var(--shadow); }
.tl-leg .tl-time { padding-top: 9px; color: var(--accent); }
.tl-leg .tl-dot { width: 8px; height: 8px; margin-top: 12px; border-width: 0; background: var(--accent); opacity: .6; }
.tl-leg.past { opacity: .4; }
.leg-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; max-width: 100%; margin: 4px 0 6px; padding: 7px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; text-align: left; }
.leg-chip svg { width: 16px; height: 16px; }
.leg-chip small { font-weight: 500; opacity: .8; }
.tl-leg.next .leg-chip { background: var(--accent); color: var(--accent-ink); }

/* ---------- notes, people ---------- */
.notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.person:first-of-type { border-top: 0; padding-top: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 14px; flex: none; }
.person .grow { flex: 1; min-width: 0; }
.person small { color: var(--muted); display: block; }
.person a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.person a svg { width: 18px; height: 18px; }

/* ---------- weddings list ---------- */
.wed { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px; margin-top: 10px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.wed.active { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.datebox { width: 54px; flex: none; text-align: center; border-radius: 14px; padding: 7px 0; background: var(--surface-2); }
.datebox b { display: block; font: 600 22px/1 var(--serif); }
.datebox span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.wed .grow { flex: 1; min-width: 0; }
.wed .name { font: italic 500 19px/1.2 var(--serif); }
.wed .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; margin-top: 6px; }
.chip.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip.need { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.wed .when { font-size: 12px; color: var(--muted); text-align: right; flex: none; }

.empty { text-align: center; padding: 40px 16px; }
.empty .art { font-size: 44px; }
.empty h2 { font: italic 500 24px/1.2 var(--serif); margin: 12px 0 6px; }
.empty p { color: var(--muted); margin: 0 auto 18px; max-width: 320px; }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 16px; background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn[disabled] { opacity: .5; }
.btn:active { transform: scale(.98); }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

.field { display: block; margin-top: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); outline: none; font-size: 16px; appearance: none; -webkit-appearance: none;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row small { display: block; color: var(--muted); font-size: 13px; }
.row .val { color: var(--muted); font-size: 15px; }
.row input.mini, .row select.mini { width: 84px; min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-align: right; font-size: 15px; }
.row input[type=time].mini { width: 110px; }
.dot-color { width: 12px; height: 12px; border-radius: 50%; flex: none; }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); background: color-mix(in srgb, var(--muted) 30%, transparent); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }

.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.seg button { padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; }
.chips button { padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chips button.on { background: var(--gold-soft); color: var(--gold); border-color: transparent; }

.note-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: var(--text); font-size: 13px; line-height: 1.45; margin-top: 10px; }
.note-box b { color: var(--gold); }

/* ---------- sheets & pages ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 15, .5); z-index: 40; animation: fade .2s ease; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 640px; margin: 0 auto; max-height: 92dvh; overflow: auto;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 16px calc(var(--safe-bottom) + 20px);
  animation: up .28s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
@keyframes up { from { transform: translateY(100%); } }
.grabber { width: 38px; height: 5px; border-radius: 9px; background: var(--faint); opacity: .5; margin: 0 auto 12px; }
.sheet h2 { font: 600 24px/1.2 var(--serif); margin: 4px 0 2px; }
.sheet .lead { color: var(--muted); margin: 0 0 16px; font-size: 15px; }

.page { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow: auto; animation: slide .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes slide { from { transform: translateX(30%); opacity: 0; } }
.page-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-top) + 8px) 12px 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.page-head b { font-size: 17px; }
.page-head button { color: var(--accent); font-weight: 600; font-size: 16px; padding: 8px; min-width: 64px; }
.page-head button:last-child { text-align: right; }
.page-body { padding: 14px 16px calc(var(--safe-bottom) + 40px); max-width: 640px; margin: 0 auto; }

.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 6px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; font-weight: 600; cursor: pointer; }
.tile input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.tile .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile small { color: var(--muted); font-weight: 500; font-size: 11px; }
.picked { margin: 14px 0; display: grid; gap: 8px; }
.picked-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); }
.picked-item img, .picked-item .doc { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.picked-item .grow { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked-item button { color: var(--muted); padding: 6px; }

.reading { text-align: center; padding: 30px 10px 10px; }
.reading .orb { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--gold), var(--accent)); animation: spin 1.6s linear infinite; -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%); mask: radial-gradient(circle, transparent 52%, #000 54%); }

/* review editor */
.ev-edit { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; margin-top: 10px; }
.ev-top { display: flex; gap: 8px; align-items: center; }
.ev-top input[type=time] { width: 128px; flex: none; padding-right: 8px; }
.ev-top select { flex: 1; min-width: 0; }
.ev-edit .input { min-height: 42px; padding: 9px 12px; font-size: 16px; border-radius: 12px; margin-top: 8px; }
.ev-top .input { margin-top: 0; }
.ev-edit details { margin-top: 8px; }
.ev-edit summary { font-size: 13px; color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; padding: 4px 2px; }
.ev-edit summary::-webkit-details-marker { display: none; }
.del { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.del svg { width: 18px; height: 18px; }
.person-edit { display: grid; grid-template-columns: 1fr 1fr 42px; gap: 8px; margin-top: 8px; }
.person-edit .input { min-height: 42px; padding: 9px 12px; border-radius: 12px; }
.person-edit .phone { grid-column: 1 / 3; }
.person-edit .del { grid-row: 1 / 3; grid-column: 3; height: auto; }
.person-edit + .person-edit { padding-top: 10px; border-top: 1px solid var(--line); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* full-screen countdown */
.focus {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #11606d, #071017 70%); animation: fade .25s ease;
}
.focus.leave { background: radial-gradient(120% 70% at 50% 0%, #0f7a86, #06141a 70%); }
/* a slow "breathing" glow behind the countdown: ~6 s per breath */
.focus > *:not(.breath) { position: relative; z-index: 1; }
.focus .close { position: absolute; z-index: 2; }
.focus .breath { position: absolute; top: 50%; left: 50%; width: min(120vw, 620px); aspect-ratio: 1; margin: calc(min(120vw, 620px) / -2) 0 0 calc(min(120vw, 620px) / -2); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(55,198,212,.5) 0%, rgba(55,198,212,.2) 34%, rgba(55,198,212,.06) 52%, transparent 66%);
  box-shadow: inset 0 0 0 1px rgba(160,235,240,.10); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.62); opacity: .45; } 50% { transform: scale(1.04); opacity: 1; } }
.focus .label { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.focus .what { font: italic 500 34px/1.15 var(--serif); margin: 10px 0 4px; max-width: 520px; }
.focus .where { opacity: .7; font-size: 15px; }
.focus .big { font: 600 min(26vw, 140px)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.04em; margin: 26px 0 8px; }
.focus .at { opacity: .7; }
.focus .row-btns { display: flex; gap: 10px; margin-top: 34px; width: 100%; max-width: 420px; }
.focus .row-btns .btn { flex: 1; background: rgba(255,255,255,.12); color: #fff; }
.focus .row-btns .btn.primary { background: #fff; color: #08343b; }
.focus .close { position: absolute; top: calc(var(--safe-top) + 12px); right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }

/* onboarding */
.ob { min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 40px); display: flex; flex-direction: column; padding-top: 6vh; }
.ob .mark { width: 74px; height: 74px; border-radius: 20px; box-shadow: 0 10px 30px rgba(10, 142, 160, .35); }
.ob h1 { font: italic 400 40px/1.08 var(--serif); margin: 24px 0 10px; letter-spacing: -.01em; }
.ob p { color: var(--muted); font-size: 17px; margin: 0 0 12px; }
.ob .grow { flex: 1; }
.ob .foot { display: grid; gap: 8px; padding-top: 20px; }
.steps { display: flex; gap: 6px; margin-bottom: 4px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); }
.feature { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.feature b { display: block; }
.feature span { color: var(--muted); font-size: 14px; }
.install-steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0; }
.install-steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.install-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; flex: none; }
.install-steps svg { display: inline; vertical-align: -5px; color: var(--accent); }
.connected-pill { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 12%, transparent); margin-top: 18px; }
.connected-pill .tick { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.connected-pill .tick svg { width: 16px; height: 16px; stroke-width: 3; }

/* tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  padding: 8px 12px calc(var(--safe-bottom) + 6px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); min-width: 72px; padding: 2px 0; }
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 90px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; transition: all .25s ease; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.menu { display: grid; gap: 8px; }
.menu .btn { justify-content: flex-start; background: var(--surface); box-shadow: var(--shadow); }

@media (min-width: 700px) {
  .couple { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}
.row .grow .seg { margin-top: 8px; }

/* ---------- wedding list: today cards ---------- */
.today-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; margin-top: 12px;
  padding: 18px 18px 16px; border-radius: 24px; color: var(--hero-text); overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(55, 198, 212, .35), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(227, 194, 126, .18), transparent 60%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
  box-shadow: 0 0 0 2px rgba(55, 198, 212, .85), 0 0 26px rgba(55, 198, 212, .45), 0 14px 30px rgba(6, 30, 38, .25);
  animation: todayGlow 2.6s ease-in-out infinite; transition: transform .15s ease;
}
.today-card:active { transform: scale(.98); }
@keyframes todayGlow {
  50% { box-shadow: 0 0 0 2px rgba(55, 198, 212, 1), 0 0 44px rgba(55, 198, 212, .7), 0 14px 30px rgba(6, 30, 38, .25); }
}
.today-card .couple { font-size: 32px; margin: 8px 0 4px; display: block; }
.today-card .hero-meta { display: block; }
.today-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.today-next b { font: 600 20px/1 var(--sans); font-variant-numeric: tabular-nums; flex: none; }
.today-open { position: absolute; top: 18px; right: 18px; font-size: 13px; font-weight: 600; opacity: .75; }
.backbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 14px; }
.backbar button[data-act=back] { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; font-size: 17px; margin-left: -6px; }
.backbar button[data-act=back] svg { width: 24px; height: 24px; stroke-width: 2.2; }

/* events switched off (another shooter's part of the day) */
.ev-toggle { margin-left: 6px; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--faint); background: var(--surface-2); align-self: center; }
.ev-toggle svg { width: 17px; height: 17px; }
.tl-card .t .badge + .ev-toggle { margin-left: 6px; }
.tl-card .t > span:nth-child(2) { flex: 1; min-width: 0; }
.tl-item.off { opacity: .42; }
.tl-item.off .tl-body { padding-left: 22px; }
.tl-item.off .tl-card { padding: 7px 12px; box-shadow: none; background: transparent; border: 1.5px dashed var(--line); border-color: color-mix(in srgb, var(--muted) 35%, transparent); }
.tl-item.off .tl-card .t { font-weight: 500; font-size: 14px; text-decoration: line-through; text-decoration-color: var(--faint); }
.tl-item.off .tl-dot { width: 8px; height: 8px; margin-top: 15px; border-style: dashed; background: transparent; }
.tl-item.off .tl-time { font-weight: 500; font-size: 12px; padding-top: 12px; }
.tl-item.off .ev-toggle { color: var(--accent); background: var(--accent-soft); }
.off-badge { background: color-mix(in srgb, var(--muted) 18%, transparent) !important; color: var(--muted) !important; text-decoration: none; }
.tl-item, .tl-card { transition: opacity .25s ease, padding .25s ease; }
.tl-card { position: relative; padding-right: 46px; }
.ev-toggle { position: absolute; top: 8px; right: 8px; margin: 0; }
.tl-badges { margin-bottom: 4px; }
.tl-badges .badge { margin-left: 0; display: inline-block; }
.tl-item.off .ev-toggle { top: 50%; transform: translateY(-50%); }

/* address suggestions */
.places { margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); position: relative; z-index: 5; }
.places button { display: block; width: 100%; text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
.places button:first-child { border-top: 0; }
.places button b { display: block; font-weight: 600; font-size: 15px; }
.places button small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.places button:hover, .places button:active { background: var(--accent-soft); }
.places::after { content: 'Powered by Google'; display: block; font-size: 11px; color: var(--faint); padding: 6px 14px 8px; text-align: right; }
.row .places { position: absolute; left: 16px; right: 16px; }
