/* Whensday: strict daylight theme. No dark mode by design. */
:root {
  --canvas: #FAF9F6;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --ink: #0F172A;
  --muted: #475569;
  --soft: #94A3B8;
  --coral: #F43F5E;
  --coral-d: #E11D48;
  --coral-t: #FFF1F3;
  --amber: #F59E0B;
  --amber-d: #B45309;
  --amber-t: #FFF7E6;
  --emerald: #10B981;
  --emerald-d: #047857;
  --emerald-t: #ECFDF5;
  --slate-t: #F1F5F9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 18px 40px -16px rgba(15, 23, 42, .18);
  --r: 18px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--coral-d); }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.num, .tnum, time, .views { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 246, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(226, 232, 240, .7); padding-top: env(safe-area-inset-top); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.wordmark { font-size: 1.6rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.w-when { color: var(--coral); }
.w-sday { color: var(--ink); }
.tagline { color: var(--muted); font-size: .78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.views { display: inline-flex; align-items: center; gap: .45em; padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .02em; line-height: 1; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.views[hidden] { display: none; }
.views::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(244, 63, 94, .15); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- Tabs ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 0 16px; padding: 4px; background: #F1EFEA; border: 1px solid var(--line); border-radius: 16px; }
.tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 700; font-size: .9rem; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.tab[aria-selected="true"] svg { color: var(--coral); }
.tab:hover { color: var(--ink); }

/* ---------- Layout ---------- */
.grid { display: grid; gap: 16px; }
.col-main, .col-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
  .col-side { position: sticky; top: 84px; }
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card-title { margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.card h3 { margin: 0 0 10px; font-size: .95rem; font-weight: 800; }
.hint { margin: 6px 0 0; color: var(--soft); font-size: .78rem; text-align: center; }
.footnote { margin: 4px 2px 0; color: var(--muted); font-size: .78rem; }

/* ---------- Buttons, pills, switch ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: .9rem; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; text-decoration: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: scale(.98); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 6px 16px -6px rgba(244, 63, 94, .6); }
.btn-coral:hover { background: var(--coral-d); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #CBD5E1; background: #FCFCFB; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.pill { min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-weight: 700; font-size: .85rem; cursor: pointer; font-variant-numeric: tabular-nums; transition: all .15s; }
.pill:hover { border-color: #FDA4AF; color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--coral-t); border-color: var(--coral); color: var(--coral-d); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #CBD5E1; transition: background .2s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--amber); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2.5px solid var(--coral); outline-offset: 2px; }

/* ---------- Year controls ---------- */
.year-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.step { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--canvas); font-size: 1.6rem; font-weight: 600; line-height: 1; cursor: pointer; color: var(--ink); transition: all .15s; }
.step:hover { border-color: var(--coral); color: var(--coral); }
.step:disabled { opacity: .35; cursor: default; }
.year-box input { width: 150px; height: 58px; border: 1px solid var(--line); border-radius: 14px; text-align: center; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; background: var(--card); -moz-appearance: textfield; appearance: textfield; }
.year-box input::-webkit-outer-spin-button, .year-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.year-box input:focus { border-color: var(--coral); outline: none; box-shadow: 0 0 0 4px rgba(244, 63, 94, .12); }
.control-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
@media (max-width: 480px) { .control-row .btn { width: 100%; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; line-height: 1.25; margin-top: 2px; }
.stat.s-green b { color: var(--emerald-d); }
.stat.s-amber b { color: var(--amber-d); }
.stat.s-slate b { color: var(--ink); }

/* ---------- Holiday list ---------- */
.hol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .hol-list { grid-template-columns: 1fr 1fr; } }
.hol { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s; animation: rise .35s ease-out both; }
.hol:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.hol.is-obs { background: #FFFDF8; border-style: dashed; }
.hol.is-past { opacity: .62; }
.hol.is-next { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(244, 63, 94, .12), var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.cal { flex: none; width: 56px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); text-align: center; background: #fff; }
.cal-m { display: block; background: var(--coral); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 0; }
.is-obs .cal-m { background: var(--amber); }
.cal-d { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.15; padding-top: 2px; font-variant-numeric: tabular-nums; }
.cal-w { display: block; font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 3px; }
.hol-body { min-width: 0; flex: 1; }
.hol-name { margin: 0; font-size: .98rem; font-weight: 800; line-height: 1.3; }
.hol-date { margin: 2px 0 0; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.hol-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hol-tip { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--amber-t); color: #92400E; font-size: .8rem; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.b-green { background: var(--emerald-t); color: var(--emerald-d); border: 1px solid #A7F3D0; }
.b-amber { background: var(--amber-t); color: var(--amber-d); border: 1px solid #FDE68A; }
.b-slate { background: var(--slate-t); color: var(--muted); border: 1px solid var(--line); }
.b-coral { background: var(--coral-t); color: var(--coral-d); border: 1px solid #FECDD3; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: .84rem; }
.legend .badge { margin-right: 4px; }

/* ---------- Next-up card ---------- */
.next-card .eyebrow { margin: 0; color: var(--coral-d); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.next-card .big { margin: 6px 0 2px; font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.next-card .count { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.next-card .count small { font-size: .9rem; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.next-card p { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }

/* ---------- Date entry ---------- */
.date-fields { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 10px; }
.date-fields label { display: grid; gap: 4px; min-width: 0; }
.date-fields label > span { color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-fields select, .date-fields input { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.date-fields select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.date-fields input[type="number"] { -moz-appearance: textfield; }
.date-fields input::-webkit-outer-spin-button, .date-fields input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.date-fields select:focus, .date-fields input:focus { border-color: var(--coral); outline: none; box-shadow: 0 0 0 4px rgba(244, 63, 94, .12); background-color: #fff; }
.date-fields .picker { grid-column: 1 / -1; }
@media (min-width: 640px) { .date-fields { grid-template-columns: 1.3fr .7fr .9fr 1.3fr; } .date-fields .picker { grid-column: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 22px 20px; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 63, 94, .10), transparent 70%); pointer-events: none; }
.hero .eyebrow { margin: 0; color: var(--muted); font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero .weekday { margin: 2px 0 8px; font-size: clamp(2.6rem, 11vw, 4.2rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--ink); }
.hero .weekday.is-weekend { color: var(--coral); }
.hero-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.counter { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 14px; border-radius: 14px; background: var(--canvas); border: 1px solid var(--line); }
.counter b { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.counter span { color: var(--muted); font-weight: 600; font-size: .92rem; }
.age { margin: 12px 0 0; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.age b { color: var(--ink); }

/* ---------- Forecast ---------- */
.fc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .fc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.fc { position: relative; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); text-align: center; background: var(--card); }
.fc .y { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.fc .w { display: block; font-size: 1.08rem; font-weight: 800; }
.fc .n { display: block; font-size: .68rem; color: var(--soft); font-weight: 600; min-height: 1em; }
.fc.fri { background: var(--emerald-t); border-color: #A7F3D0; }
.fc.fri .w { color: var(--emerald-d); }
.fc.sat, .fc.sun { background: var(--amber-t); border-color: #FDE68A; }
.fc.sat .w, .fc.sun .w { color: var(--amber-d); }
.fc.first::after { content: "Next"; position: absolute; top: -8px; right: 6px; padding: 1px 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fc-note { margin: 12px 0 0; color: var(--muted); font-size: .86rem; }
.fc-note b { color: var(--ink); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Trivia ---------- */
.trivia { background: linear-gradient(160deg, #FFFBEB 0%, #FFFFFF 60%); border-color: #FDE68A; }
.trivia .cap { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--amber); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.trivia .fact-n { float: right; color: var(--amber-d); font-weight: 800; font-size: .78rem; font-variant-numeric: tabular-nums; }
.trivia blockquote { margin: 12px 0 0; font-size: 1.04rem; font-weight: 700; line-height: 1.45; color: var(--ink); }
.trivia .kind { margin: 10px 0 0; color: var(--amber-d); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Moon & zodiac ---------- */
.moon-card .mz { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.moon-svg { width: 84px; height: 84px; }
.mz h3 { margin: 0; }
.mz p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.zod { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.zod-sym { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--coral-t); color: var(--coral-d); font-size: 1.6rem; font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', sans-serif; }
.zod b { display: block; font-size: 1rem; }
.zod span { color: var(--muted); font-size: .82rem; }

/* ---------- Era capsule ---------- */
.era { background: #FFFCF5; border: 1px solid #F3E2BE; position: relative; }
.era::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed #F1D9A6; border-radius: 13px; pointer-events: none; }
.era .stamp { display: inline-block; padding: 3px 10px; border: 2px solid var(--coral); border-radius: 6px; color: var(--coral); font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-3deg); }
.era h3 { margin: 10px 0 2px; font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.era .ev { margin: 0 0 12px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.era dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.era dl div { background: #fff; border: 1px solid #F3E2BE; border-radius: 12px; padding: 8px 6px; text-align: center; }
.era dt { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.era dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amber-d); }
.era .src { margin: 10px 0 0; color: var(--soft); font-size: .72rem; }

/* ---------- Receipt ---------- */
.receipt-card { margin-top: 16px; }
.receipt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.receipt-head .card-title { margin: 0; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .receipt-actions, .receipt-actions .btn { width: 100%; } }
.receipt-stage { display: grid; place-items: center; padding: 18px; border-radius: 14px; background: repeating-linear-gradient(45deg, #F5F3EE, #F5F3EE 10px, #F1EFEA 10px, #F1EFEA 20px); }
#receipt-canvas { width: min(100%, 360px); height: auto; aspect-ratio: 900 / 1320; filter: drop-shadow(0 12px 22px rgba(15, 23, 42, .14)); }

/* ---------- Ad slots (fixed height: zero CLS when a unit is pasted) ---------- */
.ad-slot { position: relative; display: grid; place-items: center; width: 100%; margin: 20px auto 0; overflow: hidden; border: 1px dashed #DCD8CF; border-radius: 14px; background: #F5F3EE; contain: layout size; }
.ad-banner { height: 100px; max-width: 728px; }
.ad-footer { height: 100px; max-width: 728px; margin-top: 16px; }
@media (min-width: 760px) { .ad-banner, .ad-footer { height: 90px; } }
.ad-label { color: #B5AFA3; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ad-slot > ins { position: absolute; inset: 0; }
.ad-slot.is-live { border: 0; background: transparent; }
.ad-slot.is-live .ad-label { display: none; }

/* ---------- Footer + promo cards (Venture Pilot pattern, light variant) ---------- */
.foot { margin-top: 28px; padding: 24px 0 calc(110px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.su-card, .pn-card { display: block; max-width: 560px; margin: 0 auto 10px; padding: 14px 18px; border-radius: 16px; border: 1px solid; text-align: left; text-decoration: none; font-size: .88rem; color: var(--muted); transition: transform .2s, border-color .2s, box-shadow .2s; }
.su-card:hover, .pn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.su-card { border-color: #FECDD3; background: linear-gradient(135deg, #FFF1F3 0%, #FFF7E6 100%); }
.su-card b { display: block; color: var(--ink); font-size: 1rem; font-weight: 800; margin-bottom: 2px; }
.su-card b .nowrap { color: var(--coral-d); }
.su-card .cta { display: block; margin-top: 8px; color: var(--coral-d); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pn-card { border-color: #DDD3FB; background: linear-gradient(135deg, #F6F2FF 0%, #FBF9FF 100%); }
.pn-card:hover { border-color: #C4B5FD; }
.pn-tag { display: inline-block; margin-bottom: 8px; padding: 2px 8px; border: 1px solid #DDD3FB; border-radius: 999px; color: #6D28D9; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pn-card b { display: block; color: #4C1D95; font-size: 1rem; font-weight: 800; }
.pn-card .cta { display: block; margin-top: 8px; color: #7C3AED; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.foot-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.foot-note a { color: var(--coral-d); font-weight: 700; text-decoration: none; }

/* ---------- Install pill + iOS modal ---------- */
.install-pill { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; min-height: 48px; border: 1px solid #FECDD3; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; font-size: .9rem; box-shadow: 0 10px 30px -10px rgba(244, 63, 94, .45), 0 2px 6px rgba(15, 23, 42, .08); cursor: pointer; transform: translateX(-50%); animation: pill-in .4s cubic-bezier(.2, .9, .3, 1.2) both; white-space: nowrap; }
.install-pill[hidden] { display: none; }
.install-pill > svg { width: 20px; height: 20px; fill: none; stroke: var(--coral); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-x { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 4px; border-radius: 50%; background: var(--slate-t); color: var(--muted); font-size: 1.2rem; line-height: 1; }
.install-x:hover { background: #E2E8F0; color: var(--ink); }
@keyframes pill-in { from { opacity: 0; transform: translate(-50%, 20px); } }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; padding: 16px; background: rgba(15, 23, 42, .28); animation: fade .2s both; }
.modal[hidden] { display: none; }
@media (min-width: 640px) { .modal { place-items: center; } }
.modal-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.modal-card h2 { margin: 0 0 14px; font-size: 1.15rem; font-weight: 800; }
.modal-card .btn { width: 100%; margin-top: 16px; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ios-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.ios-steps b { color: var(--ink); }
.step-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--coral-t); color: var(--coral-d); font-weight: 800; }
.ios-share { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: #2563EB; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 70; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; font-size: .86rem; box-shadow: var(--shadow-lg); animation: fade .2s both; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }

@media (max-width: 380px) {
  .wordmark { font-size: 1.4rem; }
  .tagline { font-size: .7rem; }
  .tab { font-size: .8rem; gap: 6px; }
  .tab svg { display: none; }
  .stat b { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .top, .tabs, .ad-slot, .foot, .install-pill, .receipt-card { display: none !important; } body { background: #fff; } }
