:root {
  --paper: #F2ECE1;
  --sheet: #FBF8F1;
  --ink: #1D1B18;
  --ink2: #4A453E;
  --muted: #857C70;
  --line: #E2D8C7;
  --red: #C73A2E;
  --red2: #E2483A;
  --blue: #24438C;
  --gold: #F2B705;
  --serif: 'PT Serif', Georgia, serif;
  --sans: 'Golos Text', system-ui, -apple-system, sans-serif;
  --hand: 'Bad Script', cursive;
  --airmail: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--sheet) 10px 20px, var(--blue) 20px 30px, var(--sheet) 30px 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

.eyebrow { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.title { font: 700 34px/1.12 var(--serif); letter-spacing: -.01em; margin-bottom: 18px; }
.q { font: 700 27px/1.22 var(--serif); letter-spacing: -.005em; }
.lead { font: 18px/1.6 var(--serif); color: var(--ink2); }
.lead + .lead { margin-top: 12px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 17px; text-decoration: none; transition: transform .15s, background .2s, opacity .2s; }
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.ghost { border: 1.5px solid var(--line); background: var(--sheet); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.link { color: var(--ink2); font-weight: 600; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); padding: 6px 0; }
.actions { display: grid; gap: 10px; margin-top: 26px; }

/* flow */
.flow { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 22px 16px 40px; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--line); z-index: 5; }
.progress i { display: block; height: 100%; background: var(--red); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.screen { width: 100%; max-width: 440px; margin: auto 0; padding: 20px 0; }
.enter { animation: enter .6s cubic-bezier(.2,.7,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

.sheet { position: relative; overflow: hidden; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 32px 24px 26px; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 14px 34px -14px rgba(70,45,20,.22); }
.sheet::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--airmail); }
.letter p { font: 18px/1.62 var(--serif); margin-bottom: 14px; }
.letter p:last-of-type { margin-bottom: 0; }
.greet { font: 700 24px/1.2 var(--serif) !important; margin-bottom: 16px !important; }
.sign { font: 28px/1.2 var(--hand); color: var(--blue); margin-top: 18px; }

/* envelope */
.env-scene { position: relative; margin: 22px 0 28px; perspective: 900px; }
.envelope { position: relative; aspect-ratio: 1.55; background: var(--airmail); border-radius: 8px; box-shadow: 0 22px 40px -18px rgba(70,45,20,.4), 0 1px 0 rgba(0,0,0,.05); transition: transform .9s cubic-bezier(.3,.7,.2,1), opacity .7s .2s; transform-origin: 50% 100%; }
.env-in { position: absolute; inset: 9px; background: var(--sheet); border-radius: 3px; }
.env-slip { position: absolute; left: 8%; right: 8%; top: 10%; bottom: 10%; background: #fff; border-radius: 4px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.25); transition: transform .9s cubic-bezier(.3,.7,.2,1); z-index: -1; }
.env-scene.open .env-slip { transform: translateY(-58%); }
.env-scene.open .envelope { transform: translateY(26px) rotateX(18deg) scale(.95); opacity: 0; }
.avia { position: absolute; top: 14px; left: 14px; padding: 3px 8px; border: 1.5px solid var(--blue); border-radius: 4px; color: var(--blue); font: 700 11px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.stamp { position: absolute; top: 12px; right: 12px; width: 60px; height: 74px; background: #1B2D5C; border: 3px solid var(--sheet); outline: 3px dotted var(--sheet); outline-offset: -1px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.stamp svg { width: 100%; height: 100%; display: block; }
.postmark { position: absolute; top: 18px; right: 46px; width: 96px; height: 96px; color: var(--blue); opacity: .72; transform: rotate(-14deg); }
.env-addr { position: absolute; left: 18px; right: 18px; bottom: 16px; display: grid; gap: 4px; }
.env-addr div { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.env-addr span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; width: 38px; flex: 0 0 auto; }
.env-addr b { font: 400 clamp(15px, 4.6vw, 22px)/1.3 var(--hand); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* plane */
.flight { margin: 6px -6px 4px; }
.flight svg { width: 100%; height: auto; overflow: visible; }
.flight .trail { stroke-dasharray: 2 8; animation: trail 1.6s linear infinite; }
@keyframes trail { to { stroke-dashoffset: -20; } }
.flight .plane { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.flight text { font: 600 12px var(--sans); fill: var(--muted); }

.status { border-top: 1px solid var(--line); margin: 14px 0 18px; }
.status div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.status dt { color: var(--muted); }
.status dd { font-weight: 600; text-align: right; max-width: 64%; }
@keyframes dot { 50% { opacity: .2; } }

/* questions */
.options { display: grid; gap: 10px; margin: 22px 0 16px; }
.opt { text-align: left; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--sheet); font-size: 17px; line-height: 1.35; transition: border-color .2s, background .2s, color .2s, opacity .2s; }
.opt.on { border-color: var(--ink); background: var(--ink); color: var(--sheet); }
.options.answered .opt:not(.on) { opacity: .5; }
.opt.locked { opacity: .45; cursor: not-allowed; user-select: none; -webkit-user-select: none; }
.opt.locked.shake { animation: shake .45s; }
.reply { padding: 16px 18px; border-left: 3px solid var(--red); background: var(--sheet); border-radius: 0 12px 12px 0; font: 17px/1.55 var(--serif); animation: enter .45s; }
.reply + .reply { margin-top: 8px; }
.reply small { display: block; font: 700 11.5px var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }

.area { width: 100%; min-height: 140px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--sheet); font: 17px/1.5 var(--serif); resize: vertical; outline: none; margin-top: 18px; }
.area:focus, .input:focus { border-color: var(--ink2); }

/* distance */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 10px 16px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sheet); font-weight: 600; font-size: 15px; transition: background .2s, color .2s; }
.chip.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.big-num { font: 700 68px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 22px 0 6px; white-space: nowrap; }
.big-num small { font-size: 26px; margin-left: 4px; }
.route { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 18px; }
.route i { flex: 1; height: 0; border-top: 2px dashed var(--line); }
.clockpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.clockpair div { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.clockpair b { display: block; font: 700 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.clockpair span { font-size: 13px; color: var(--muted); }

/* ask */
.ask { text-align: center; }
.ask .title { font-size: 38px; margin-bottom: 8px; }
.ask-btns { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; margin-top: 38px; align-items: center; }
.yes { position: relative; min-height: 66px; border-radius: 16px; background: var(--red); color: #fff; font-size: 21px; font-weight: 700; animation: blink 1s ease-in-out infinite; }
@keyframes blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199,58,46,.55); background: var(--red); }
  50% { box-shadow: 0 0 0 16px rgba(199,58,46,0); background: var(--red2); }
}
.yes.boost { animation: blinkBig .5s ease-in-out infinite; }
@keyframes blinkBig {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(199,58,46,.75); background: var(--red); }
  50% { transform: scale(1.07); box-shadow: 0 0 0 24px rgba(199,58,46,0); background: var(--red2); }
}
.attn { position: absolute; top: -12px; right: -8px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--gold); color: var(--ink); font: 800 12px/26px var(--sans); letter-spacing: .04em; animation: attn .8s steps(2, jump-none) infinite; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
@keyframes attn { 50% { opacity: .15; } }
.no { min-height: 66px; border-radius: 16px; background: #E6DFD3; color: var(--muted); font-size: 19px; font-weight: 600; cursor: not-allowed; transition: transform .35s; user-select: none; -webkit-user-select: none; }
.no.shake { animation: shake .45s; }
@keyframes shake { 20% { translate: -9px 0; rotate: -3deg; } 40% { translate: 8px 0; rotate: 3deg; } 60% { translate: -5px 0; } 80% { translate: 3px 0; } }
.no-msg { min-height: 54px; margin-top: 24px; font: italic 18px/1.4 var(--serif); color: var(--ink2); }
.no-msg span { display: inline-block; animation: enter .35s; }

/* yes */
.yes-screen { text-align: center; }
.yes-screen .title { font-size: 44px; }
.yes-screen .big-num { font-size: 76px; color: var(--red); }

.stage-list { list-style: none; margin: 22px 0 0; display: grid; gap: 8px; }
.stage-list li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.stage-list b { display: block; font: 700 17px/1.25 var(--serif); }
.stage-list small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.stage-list .on { border-color: var(--red); }

.sn { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 1.5px solid var(--line); background: var(--paper); color: var(--muted); }
.sn svg { width: 15px; height: 15px; }
.sn.current { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 5px rgba(199,58,46,.14); }
.sn.done { background: var(--ink); border-color: var(--ink); color: var(--sheet); }

/* app */
.shell { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 10; background: rgba(242,236,225,.93); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.airmail { height: 5px; background: var(--airmail); }
.top-in { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px 10px; }
.brand { font: 700 23px/1 var(--serif); letter-spacing: -.01em; }
.together { font-size: 14px; color: var(--muted); font-weight: 600; }
#view { padding: 8px 16px 28px; display: grid; gap: 14px; }
#view > h2, .h2 { font: 700 26px/1.15 var(--serif); margin-top: 10px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px; }
.card-k { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.card h3 { font: 700 22px/1.25 var(--serif); margin-bottom: 12px; }
.card .lead { font-size: 17px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--sheet); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.tabs-in { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 520px; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on svg { color: var(--red); }

.stages { display: flex; align-items: flex-start; padding: 16px 10px 14px; background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; width: 86px; flex: 0 0 auto; }
.stage-t { font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.stage.locked .stage-t { color: var(--muted); }
.stage-line { flex: 1; height: 2px; background: var(--line); margin-top: 17px; }
.stage-line.done { background: var(--ink); }
.mission { font: italic 17px/1.5 var(--serif); color: var(--ink2); padding: 0 4px; }

.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
.cd div { background: var(--paper); border-radius: 12px; padding: 12px 2px 9px; text-align: center; }
.cd b { display: block; font: 700 30px/1 var(--serif); font-variant-numeric: tabular-nums; }
.cd span { font-size: 12px; color: var(--muted); }
.cd.sm b { font-size: 22px; }
.when { font-weight: 600; }
.bar { height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 600; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); font-size: 16px; outline: none; }

.city { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.city:first-of-type { padding-top: 0; }
.city-name { font-weight: 700; font-size: 17px; }
.city-sub { font-size: 14px; color: var(--muted); min-height: 20px; }
.city-time { font: 700 30px/1 var(--serif); font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.meta { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hint { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--paper); font: italic 15.5px/1.45 var(--serif); color: var(--ink2); }
.where { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.where p { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.miss { display: flex; align-items: center; gap: 18px; }
.miss-btn { position: relative; flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; background: var(--red); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: 14px; box-shadow: 0 12px 24px -10px rgba(199,58,46,.75); transition: transform .12s; }
.miss-btn svg { width: 26px; height: 26px; }
.miss-btn:active { transform: scale(.92); }
.miss-txt b { font: 700 19px/1.3 var(--serif); display: block; margin-bottom: 4px; }
.heart-fly { position: fixed; pointer-events: none; z-index: 80; color: var(--red); animation: fly 1.1s ease-out forwards; }
.heart-fly svg { width: 24px; height: 24px; }
@keyframes fly { to { transform: translate(var(--dx), -110px) scale(1.5); opacity: 0; } }

details.card summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "+"; font-size: 22px; color: var(--muted); }
details.card[open] summary::after { content: "−"; }
details.card[open] summary { margin-bottom: 12px; }
.qa { padding: 12px 0; border-top: 1px solid var(--line); }
.qa p { font-size: 14px; color: var(--muted); }
.qa b { font: 700 17px/1.4 var(--serif); }

/* photos */
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.view-head h2 { font: 700 26px/1.15 var(--serif); }
.upload { position: relative; overflow: hidden; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.month { font: 700 18px var(--serif); margin: 8px 0 -4px; text-transform: capitalize; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ph { aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--line); position: relative; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ph:active img { transform: scale(.97); }
.ph.cap::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty b { display: block; font: 700 20px var(--serif); color: var(--ink); margin-bottom: 6px; }

.lb { position: fixed; inset: 0; z-index: 50; background: rgba(16,14,12,.96); color: #fff; display: flex; flex-direction: column; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.lb-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 60px 10px 10px; }
.lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb-meta { padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; }
.lb-cap { font: 18px/1.45 var(--serif); margin-bottom: 4px; }
.lb-sub { font-size: 13.5px; color: rgba(255,255,255,.55); }
.lb-actions { display: flex; gap: 18px; margin-top: 12px; }
.lb-actions button { color: rgba(255,255,255,.8); font-weight: 600; font-size: 14.5px; }
.lb-x { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; font-size: 28px; line-height: 1; color: #fff; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; font-size: 34px; color: rgba(255,255,255,.7); z-index: 2; }
.lb-nav.prev { left: 2px; }
.lb-nav.next { right: 2px; }
.lb .input { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }

/* letters */
.env-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.env-mini { position: relative; width: 48px; height: 34px; flex: 0 0 auto; border-radius: 4px; background: var(--airmail); }
.env-mini::before { content: ""; position: absolute; inset: 3px; background: var(--sheet); border-radius: 2px; }
.env-mini::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--red); }
.env-row.opened .env-mini::after { background: var(--line); }
.env-row small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.env-row b { display: block; font: 700 17.5px/1.3 var(--serif); }
.env-row em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 2px; }
.stack { display: grid; gap: 8px; }

.modal { position: fixed; inset: 0; z-index: 40; background: rgba(30,24,18,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
.modal .sheet { width: 100%; max-width: 520px; max-height: 90dvh; overflow: auto; border-radius: 20px 20px 0 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); animation: up .4s cubic-bezier(.2,.7,.2,1); }
@keyframes up { from { transform: translateY(50px); opacity: 0; } }
.modal-x { position: absolute; top: 14px; right: 12px; width: 40px; height: 40px; font-size: 26px; color: var(--muted); }

.composer { display: grid; gap: 8px; }
.composer textarea { min-height: 90px; margin: 0; }
.note { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; animation: enter .35s; }
.note.his { border-left: 3px solid var(--blue); }
.note.her { border-left: 3px solid var(--red); }
.note p { font: 17px/1.5 var(--serif); white-space: pre-wrap; word-break: break-word; }
.note-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.note-meta button { color: var(--muted); font-size: 12.5px; text-decoration: underline; }

/* lists */
.todo { list-style: none; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo li span { flex: 1; line-height: 1.4; }
.todo li.done span { text-decoration: line-through; color: var(--muted); }
.check { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; border: 1.5px solid var(--line); background: var(--sheet); display: grid; place-items: center; }
.check.on { background: var(--ink); border-color: var(--ink); }
.check.on::after { content: ""; width: 11px; height: 6px; border: 2.2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.x { width: 32px; height: 32px; flex: 0 0 auto; color: var(--muted); font-size: 20px; }
.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row button { flex: 0 0 auto; width: 50px; border-radius: 12px; background: var(--ink); color: var(--sheet); font-size: 24px; line-height: 1; }
.ideas li { align-items: flex-start; }
.ideas li span { padding-top: 2px; }
.pick { font: 700 21px/1.35 var(--serif); margin-bottom: 14px; min-height: 2.7em; }
.pick.flash { animation: enter .4s; }

.lock { text-align: center; padding: 34px 22px; }
.lock-ic { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--muted); }
.lock-ic svg { width: 28px; height: 28px; }
.lock .lead { margin: 0 auto; max-width: 340px; }
.ready { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.ready div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.ready b { font-weight: 700; }
.ready em { font-style: normal; font-size: 14px; color: var(--muted); }
.ready em.ok { color: var(--blue); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--sheet); padding: 12px 18px; border-radius: 12px; font-size: 14.5px; z-index: 90; animation: enter .3s; max-width: calc(100vw - 32px); text-align: center; }
.pv { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--gold); color: var(--ink); font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.15); white-space: nowrap; }
.pv a { margin-left: 8px; }

@media (min-width: 600px) {
  .title { font-size: 40px; }
  .ask .title { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *:not(.yes):not(.attn) { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

.polaroid { position: relative; width: min(72%, 280px); margin: 4px auto 26px; padding: 10px 10px 34px; background: #fff; border-radius: 4px; box-shadow: 0 18px 34px -16px rgba(60,40,20,.45), 0 1px 0 rgba(0,0,0,.05); transform: rotate(-2.5deg); animation: drop .8s cubic-bezier(.2,.8,.2,1); }
.polaroid::before { content: ""; position: absolute; top: -12px; left: 50%; width: 86px; height: 24px; margin-left: -43px; background: rgba(242,183,5,.45); transform: rotate(3deg); border-radius: 2px; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; border-radius: 2px; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) rotate(-8deg); } }

/* stage icons */
.sn { position: relative; }
.sn svg { width: 18px; height: 18px; }
.stage .sn { width: 40px; height: 40px; }
.sn.locked { color: #9E917B; background: var(--paper); }
.sn-lock { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--sheet); }
.sn-lock svg { width: 10px !important; height: 10px !important; }
.stage-line { margin-top: 19px; }
.lock-ic { position: relative; width: 76px; height: 76px; background: radial-gradient(circle at 30% 25%, #FFF 0, #F6E9E4 70%); color: var(--red); box-shadow: inset 0 0 0 1px #EFD9D2; }
.lock-ic svg { width: 32px; height: 32px; }
.lock-ic .sn-lock { width: 26px; height: 26px; right: -2px; bottom: -2px; }
.lock-ic .sn-lock svg { width: 13px !important; height: 13px !important; }

/* miss */
.miss { display: block; }
.miss .miss-sub { margin: -2px 0 14px; }
.miss-yes { width: 100%; }
.miss-top { display: flex; align-items: center; gap: 18px; }
.miss-btn { position: relative; width: 92px; height: 92px; flex: 0 0 auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F0645A 0, var(--red) 60%, #A82C22 100%); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 26px -10px rgba(199,58,46,.8), inset 0 -4px 10px rgba(0,0,0,.12); transition: transform .12s; }
.miss-btn svg { width: 38px; height: 38px; position: relative; z-index: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); animation: beat 1.6s ease-in-out infinite; }
.miss-btn:active { transform: scale(.9); }
.miss-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); opacity: 0; animation: ring 2.4s ease-out infinite; }
.miss-ring.r2 { animation-delay: 1.2s; }
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes beat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 28% { transform: scale(.98); } }
.miss-title { font: 700 26px/1.1 var(--serif); margin-bottom: 4px; }
.miss-sub { font-size: 14px; color: var(--muted); line-height: 1.4; }
.miss-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.miss-stats div { background: var(--paper); border-radius: 14px; padding: 12px 6px 10px; text-align: center; }
.miss-stats b { display: block; font: 700 28px/1 var(--serif); color: var(--red); font-variant-numeric: tabular-nums; }
.miss-stats span { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.25; color: var(--muted); font-weight: 600; }
.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.35); } }
.heart-fly svg { width: 20px; height: 20px; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(var(--s, 1)); opacity: 0; } }

/* apple picker */
.picker-field { display: flex; align-items: center; gap: 10px; text-align: left; color: var(--muted); cursor: pointer; }
.picker-field svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--red); }
.picker-field.set { color: var(--ink); font-weight: 600; }
.modal.picker { background: rgba(0,0,0,.35); }
.ios { width: 100%; max-width: 420px; background: #fff; border-radius: 22px 22px 0 0; padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); font-family: -apple-system, 'SF Pro Text', var(--sans); color: #000; animation: up .35s cubic-bezier(.2,.7,.2,1); }
@media (min-width: 600px) { .modal.picker { align-items: center; } .ios { border-radius: 22px; } }
.ios-bar { display: flex; justify-content: space-between; align-items: center; height: 50px; border-bottom: 1px solid #EEE; margin: 0 -16px 10px; padding: 0 16px; }
.ios-bar b { font-size: 16px; font-weight: 600; }
.ios-bar button { color: #FF3B30; font-size: 16px; padding: 8px 2px; }
.ios-done { font-weight: 600; }
.cal-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 10px; }
.cal-head b { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.cal-nav { display: flex; gap: 14px; }
.cal-nav button { width: 32px; height: 32px; display: grid; place-items: center; color: #FF3B30; }
.cal-nav button[disabled] { color: #D1D1D6; }
.cal-nav svg { width: 20px; height: 20px; }
.cal-nav .flip svg { transform: rotate(180deg); }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow span { font-size: 12px; font-weight: 600; color: #8E8E93; text-transform: uppercase; padding-bottom: 6px; }
.cal-grid { row-gap: 2px; }
.day { height: 42px; width: 42px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 19px; font-weight: 400; color: #000; transition: background .15s; }
.day.past { color: #C7C7CC; }
.day.today { color: #FF3B30; font-weight: 600; }
.day.sel { background: #FF3B30; color: #fff; font-weight: 600; }
.day:not(.sel):active { background: #F2F2F7; }
.ios-time { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #EEE; margin-top: 10px; padding-top: 10px; }
.ios-time > span { font-size: 17px; font-weight: 500; }
.wheels { position: relative; display: flex; align-items: center; height: 200px; -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.wheel-band { position: absolute; left: -8px; right: -8px; top: 80px; height: 40px; border-radius: 10px; background: #F2F2F7; z-index: 0; }
.wheel { position: relative; z-index: 1; width: 64px; height: 200px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-pad { height: 80px; }
.wheel-item { height: 40px; line-height: 40px; text-align: center; font-size: 22px; color: #B0B0B5; scroll-snap-align: center; cursor: pointer; font-variant-numeric: tabular-nums; transition: color .12s, transform .12s; }
.wheel-item.near { color: #6E6E73; }
.wheel-item.on { color: #000; font-weight: 500; transform: scale(1.06); }
.wheel-sep { position: relative; z-index: 1; font-size: 22px; font-weight: 500; padding: 0 2px; }

/* zoomer question card */
.zq { position: relative; overflow: hidden; background: #16131F; border: 0; color: #fff; padding: 20px 18px 18px; }
.zq::before { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(199,58,46,.55), transparent 70%); }
.zq::after { content: ""; position: absolute; width: 220px; height: 220px; left: -100px; bottom: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(92,224,160,.35), transparent 70%); }
.zq > * { position: relative; z-index: 1; }
.zq-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.zq-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.zq-n { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }
.zq-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #F2B705; color: #16131F; font-size: 13px; font-weight: 800; transform: rotate(-2deg); }
.zq-q { font: 800 24px/1.25 var(--sans) !important; letter-spacing: -.01em; margin: 14px 0 18px !important; color: #fff; }
.zq-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; background: #fff; color: #16131F; font-weight: 800; font-size: 15.5px; }
.zq-btn:active { transform: scale(.96); }
.zq-btn .dice { display: inline-block; font-size: 20px; }
.zq.spin .dice { animation: roll .6s ease-out; }
.zq.spin .zq-q, .zq.spin .zq-tag { animation: pop .45s cubic-bezier(.2,.8,.2,1); }
@keyframes roll { to { transform: rotate(720deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.refresh { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.refresh svg { width: 16px; height: 16px; color: var(--red); }
.letter-n { margin-top: 18px !important; font: 600 12.5px var(--sans) !important; color: var(--muted); }

.pin { margin-top: 20px; text-align: center; font-size: 20px; letter-spacing: .12em; background: var(--sheet); }

.facts { display: grid; gap: 12px; margin: 22px 0 18px; }
.fact { position: relative; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px 58px; }
.fact-n { position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--sheet); display: grid; place-items: center; font: 700 15px var(--serif); }
.fact-t { font: 16.5px/1.55 var(--serif); }
.fact-src { margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.fact.story { border-color: #EBC9C2; background: linear-gradient(180deg, #FFF8F5, var(--sheet)); }
.fact.story .fact-n { background: var(--red); }
.fact-who { font: 26px/1.15 var(--hand); color: var(--blue); margin: -2px 0 6px; }
.fact-outro { font: italic 18px/1.5 var(--serif); color: var(--ink2); text-align: center; padding: 4px 8px; }

.seg-label { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #E6DFD3; }
.seg button { min-height: 42px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink2); transition: background .2s, box-shadow .2s, color .2s; }
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 2px 10px -3px rgba(60,40,20,.3); }
.route-card { margin: 14px 0 10px; padding: 14px 16px 20px; text-align: center; background: var(--sheet); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 32px -20px rgba(70,45,20,.35); }
.route-svg { display: block; width: 100%; height: auto; overflow: visible; }
.route-svg text { font: 600 12px var(--sans); fill: var(--muted); }
.route-num { margin-top: 2px; font: 700 64px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.route-num small { margin-left: 6px; font-size: 24px; color: var(--muted); }
.route-sub { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.skies { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.sky { position: relative; overflow: hidden; min-height: 128px; padding: 14px 14px 12px; border-radius: 18px; color: #fff; display: flex; flex-direction: column; }
.sky > * { position: relative; z-index: 1; }
.sky-ic { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; opacity: .95; }
.sky-ic svg { width: 100%; height: 100%; }
.sky-who { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .8; }
.sky b { margin-top: auto; font: 700 32px/1 var(--serif); font-variant-numeric: tabular-nums; }
.sky-city { margin-top: 4px; font-size: 13px; font-weight: 600; opacity: .85; }
.sky.night { background: linear-gradient(160deg, #0E1631 0%, #26306A 100%); }
.sky.night::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .85; background-image: radial-gradient(1.5px 1.5px at 18% 34%, #fff, transparent), radial-gradient(1px 1px at 46% 18%, #fff, transparent), radial-gradient(1.3px 1.3px at 64% 46%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.4px 1.4px at 84% 72%, #fff, transparent), radial-gradient(1px 1px at 56% 84%, #fff, transparent); }
.sky.night.north::after { content: ""; position: absolute; left: -30%; right: -30%; top: -20%; height: 75%; z-index: 0; background: radial-gradient(ellipse at 30% 60%, rgba(92,224,160,.6), transparent 60%), radial-gradient(ellipse at 72% 40%, rgba(140,124,240,.45), transparent 60%); filter: blur(10px); animation: aurora 9s ease-in-out infinite alternate; }
@keyframes aurora { from { transform: translateX(-12%) skewX(-6deg); } to { transform: translateX(12%) skewX(6deg); } }
.sky.dawn { background: linear-gradient(160deg, #F2A97E 0%, #8FB4DE 100%); }
.sky.day { background: linear-gradient(160deg, #4E9BE0 0%, #A9D3F5 100%); }
.sky.dusk { background: linear-gradient(160deg, #EE8659 0%, #634A8F 100%); }

/* iOS distance screen */
.flow.ios-flow { background: #F2F2F7; }
.ios-scr { --sf: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; font-family: var(--sf); color: #000; -webkit-font-smoothing: antialiased; }
.ios-large { font: 700 34px/1.1 var(--sf); letter-spacing: -.025em; margin: 4px 0 18px; }
.ios-sec { margin: 0 0 7px 16px; font-size: 13px; text-transform: uppercase; color: rgba(60,60,67,.6); }
.ios-seg { gap: 0; padding: 2px; border-radius: 9px; background: rgba(118,118,128,.12); }
.ios-seg button { min-height: 32px; border-radius: 7px; font: 600 13.5px var(--sf); color: #000; }
.ios-seg button.on { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
.ios-card { margin-top: 16px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.ios-map { display: block; width: 100%; height: 160px; }
.ios-map-t { font: 600 12px var(--sf); fill: #3C3C43; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.ios-route { animation: iosroute 1.1s linear infinite; }
@keyframes iosroute { to { stroke-dashoffset: -13; } }
.ios-maps-info { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px 14px; }
.ios-km { font: 700 34px/1 var(--sf); letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ios-route-t { font-size: 14px; color: rgba(60,60,67,.6); text-align: right; }

.w-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.widget { aspect-ratio: 1; min-height: 0; padding: 14px 14px 13px; border-radius: 22px; box-shadow: 0 10px 22px -14px rgba(0,0,0,.45); font-family: var(--sf); }
.widget .w-top { display: flex; align-items: center; gap: 4px; }
.widget .w-top b { margin: 0; font: 600 15px/1.2 var(--sf); }
.w-loc { display: block; width: 11px; height: 11px; }
.w-loc svg { display: block; width: 100%; height: 100%; }
.w-who { margin-top: 1px; font-size: 12.5px; opacity: .75; }
.w-time { margin-top: auto; font: 300 42px/1 var(--sf); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.w-bot { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 13px; font-weight: 600; }
.w-bot i, .w-bot svg { display: block; width: 14px; height: 14px; }

.ios-list { margin-top: 20px; background: #fff; border-radius: 12px; overflow: hidden; }
.ios-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 16px; font-size: 16px; }
.ios-row + .ios-row::before { content: ""; position: absolute; top: 0; left: 57px; right: 0; height: .5px; background: rgba(60,60,67,.29); }
.ios-ic { flex: 0 0 auto; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; color: #fff; }
.ios-ic svg { width: 18px; height: 18px; }
.ios-t { flex: 1; line-height: 1.25; }
.ios-v { color: rgba(60,60,67,.6); text-align: right; line-height: 1.25; }

.imsg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 24px 0 4px; padding-left: 8px; }
.bub { position: relative; max-width: 84%; padding: 8px 13px 9px; border-radius: 18px; background: #E9E9EB; color: #000; font: 16.5px/1.32 var(--sf); animation: bubin .45s cubic-bezier(.2,.8,.2,1) both; }
.bub:nth-child(2) { animation-delay: .5s; }
.bub:nth-child(3) { animation-delay: 1s; }
.bub.tail { margin-bottom: 2px; }
.bub.tail::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 20px; height: 20px; background: #E9E9EB; border-bottom-right-radius: 16px 14px; }
.bub.tail::after { content: ""; position: absolute; left: -10px; bottom: 0; width: 10px; height: 20px; background: #F2F2F7; border-bottom-right-radius: 10px; }
@keyframes bubin { from { opacity: 0; transform: translateY(8px) scale(.96); transform-origin: left bottom; } }

.slide-hint { margin: 22px 0 8px; text-align: center; font-size: 13px; color: rgba(60,60,67,.6); }
.slide { position: relative; height: 60px; border-radius: 30px; background: #fff; box-shadow: inset 0 0 0 1px rgba(60,60,67,.1), 0 6px 16px -10px rgba(0,0,0,.25); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.slide-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 60px; border-radius: 30px; background: linear-gradient(90deg, #30D158, #34C759); }
.slide-text { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 44px; font: 600 16px var(--sf); pointer-events: none; color: rgba(60,60,67,.55); background: linear-gradient(90deg, rgba(60,60,67,.4) 0%, rgba(60,60,67,.4) 38%, #1C1C1E 50%, rgba(60,60,67,.4) 62%, rgba(60,60,67,.4) 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 2.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }
.slide-knob { position: absolute; left: 4px; top: 4px; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #34C759; box-shadow: 0 3px 10px rgba(0,0,0,.2); cursor: grab; touch-action: none; }
.slide-knob:active { cursor: grabbing; }
.slide-knob svg { width: 24px; height: 24px; }
.slide.done .slide-text { padding: 0 44px 0 0; background: none; animation: none; color: #fff; -webkit-text-fill-color: #fff; }
.slide.done { animation: okpulse .6s ease-out; }
@keyframes okpulse { 40% { transform: scale(1.03); } }
