/* Morakinyo Matters. Night-city base, taxi yellow (the family favorite) for actions, neon for live things. */
:root {
  --night: #0b0f1f; --night-2: #121833; --card: #161d3d; --card-2: #1d2550; --line: #2b3566;
  --ink: #f2f4ff; --muted: #a3abd6; --taxi: #ffc928; --taxi-deep: #f5a700; --neon: #ff4fa3;
  --cyan: #4fe3ff; --mint: #4fe0a0; --eat: #ff9a62; --danger: #ff5d6c;
  --font-sign: "Bungee", "Impact", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  --sal: env(safe-area-inset-left); --sar: env(safe-area-inset-right);
  --tabbar: calc(62px + var(--sab));
  --gutter: max(16px, var(--sal));
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); }
a { color: var(--taxi); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--taxi); outline-offset: 2px; border-radius: 8px; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: .92rem; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--taxi); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--taxi); background: var(--taxi); color: #1a1400; border-radius: 999px; padding: 10px 18px; font-weight: 700; min-height: 44px; transition: transform .15s, opacity .2s; text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn.ghost { background: transparent; color: var(--taxi); }
.btn.quiet { background: var(--card-2); border-color: var(--line); color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; }
button.big { background: var(--taxi); color: #1a1400; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800; font-size: 1.05rem; box-shadow: 0 8px 24px rgba(255,201,40,.3); transition: transform .15s; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button.big:active { transform: scale(.97); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 600; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--neon); margin-right: 4px; box-shadow: 0 0 10px var(--neon); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* FULL SCREENS: install gate + login */
.screen { position: fixed; inset: 0; z-index: 50; overflow-y: auto; background: var(--night); }
.screen-inner { position: relative; min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(var(--sat) + 28px) var(--gutter) calc(var(--sab) + 28px); max-width: 480px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 0 30px rgba(255,201,40,.35); }
.brand b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; display: block; line-height: 1.1; }
.brand span { color: var(--muted); font-size: .85rem; }
.screen h1 { font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.screen h1 em { font-style: normal; color: var(--taxi); }
.glass { background: rgba(22, 29, 61, .82); border: 1px solid var(--line); border-radius: 22px; padding: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 14px; }

.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.step { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--night-2); border: 1px solid var(--line); opacity: .55; transition: opacity .4s, border-color .4s, transform .4s; }
.step.on { opacity: 1; border-color: var(--taxi); transform: scale(1.02); box-shadow: 0 10px 30px rgba(255,201,40,.12); }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font-weight: 800; font-family: var(--font-mono); }
.step.on .n { background: var(--taxi); color: #1a1400; }
.step p { font-weight: 600; line-height: 1.3; }
.step small { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; margin-top: 2px; }
.step .glyph { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #2a2f45; color: #4da3ff; font-size: 1.2rem; }
.step .glyph .ic { width: 22px; height: 22px; }
.step .glyph.dots { font-weight: 900; letter-spacing: 1px; color: var(--ink); }
.step .glyph.add { color: var(--ink); }
.pointer { position: fixed; z-index: 60; right: calc(var(--sar) + 22px); bottom: calc(var(--sab) + 6px); color: var(--taxi); display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; font-size: .8rem; animation: nudge 1.2s ease-in-out infinite; pointer-events: none; text-shadow: 0 2px 10px #000; }
.pointer .ic { width: 34px; height: 34px; transform: rotate(90deg); }
@keyframes nudge { 50% { transform: translateY(8px); } }
.gate-note { font-size: .85rem; color: var(--muted); text-align: center; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--night-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea, .field select { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--night-2); width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--taxi); outline: none; }
.field .hint { color: var(--muted); font-size: .8rem; }
.code-input { font-family: var(--font-mono) !important; letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; }
.form-error { color: #ffb3bd; background: rgba(255,93,108,.12); border: 1px solid rgba(255,93,108,.4); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatars button { font-size: 1.6rem; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: var(--night-2); }
.avatars button[aria-checked="true"] { border-color: var(--taxi); background: rgba(255,201,40,.18); transform: scale(1.06); }
.perm { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 16px; background: var(--night-2); border: 1px solid var(--line); }
.perm .pi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,201,40,.15); color: var(--taxi); }
.perm .pi .ic { width: 22px; height: 22px; }
.perm b { display: block; }
.perm p { color: var(--muted); font-size: .88rem; margin: 2px 0 10px; }
.perm.done { border-color: var(--mint); }
.perm.done .pi { background: rgba(79,224,160,.15); color: var(--mint); }

/* APP SHELL */
#app { position: fixed; inset: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: calc(var(--tabbar) + 24px); }
.view.enter { animation: viewIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.pad { padding-left: var(--gutter); padding-right: max(16px, var(--sar)); max-width: 760px; margin: 0 auto; }
.topbar { padding-top: calc(var(--sat) + 14px); padding-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.topbar .sub { color: var(--muted); font-size: .9rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--card-2); border: 2px solid var(--line); font-size: 1.3rem; flex: none; position: relative; }
.avatar.sm { width: 28px; height: 28px; font-size: .95rem; border-width: 1.5px; }
.avatar.live { border-color: var(--mint); }
.avatar.live::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--mint); border: 2px solid var(--night); }
.stack { display: inline-flex; }
.stack .avatar { margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }

.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: var(--tabbar); padding: 6px max(8px, var(--sar)) var(--sab) max(8px, var(--sal)); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(11, 15, 31, .82); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid rgba(43,53,102,.7); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 700; letter-spacing: .02em; position: relative; }
.tabbar a .ic { width: 25px; height: 25px; transition: transform .25s cubic-bezier(.2,.8,.2,1.4); }
.tabbar a[aria-current="page"] { color: var(--taxi); }
.tabbar a[aria-current="page"] .ic { transform: translateY(-2px) scale(1.08); }
.tabbar a .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--neon); color: #fff; font-size: .65rem; display: grid; place-items: center; }
@media (min-width: 900px) {
  .tabbar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 16px; border-radius: 22px; border: 1px solid var(--line); height: 66px; padding-bottom: 6px; }
}
.offline { position: fixed; z-index: 45; top: calc(var(--sat) + 8px); left: 50%; transform: translateX(-50%); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 700; display: flex; gap: 6px; align-items: center; color: var(--muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h3 { font-size: 1.2rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-title h2 { font-size: 1.3rem; font-weight: 800; }
.stack-v { display: flex; flex-direction: column; gap: 12px; }

/* HOME */
.next-card { position: relative; overflow: hidden; border-radius: 26px; padding: 20px; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; background: #0b0f1f; border: 1px solid var(--line); isolation: isolate; }
.next-card .sky { z-index: -1; opacity: .95; }
.next-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, rgba(11,15,31,.85) 75%); }
.next-card h2 { font-family: var(--font-sign); font-weight: 400; font-size: clamp(2.4rem, 12vw, 3.4rem); line-height: .95; color: var(--taxi); text-shadow: 0 0 18px rgba(255,201,40,.5); }
.next-card .when { font-weight: 600; }
.mini-cd { display: flex; gap: 8px; }
.mini-cd div { background: rgba(22,29,61,.85); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; text-align: center; min-width: 58px; backdrop-filter: blur(6px); }
.mini-cd b { display: block; font-family: var(--font-sign); font-weight: 400; color: var(--taxi); font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-cd span { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rsvp { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rsvp button { border: 1px solid var(--line); background: var(--night-2); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .88rem; min-height: 40px; }
.rsvp button[aria-pressed="true"].yes { background: var(--mint); border-color: var(--mint); color: #002816; }
.rsvp button[aria-pressed="true"].maybe { background: var(--taxi); border-color: var(--taxi); color: #1a1400; }
.rsvp button[aria-pressed="true"].no { background: var(--card-2); border-color: var(--muted); }
.post { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; animation: viewIn .4s both; }
.post .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.post .meta b { color: var(--ink); font-size: .92rem; }
.post p { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .del { border: 0; background: none; color: var(--muted); padding: 2px; }
.event { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.event .date { border-radius: 14px; background: var(--night-2); text-align: center; padding: 6px 0; display: flex; flex-direction: column; }
.event .date span { font-size: .68rem; font-weight: 800; letter-spacing: .1em; color: var(--neon); text-transform: uppercase; }
.event .date b { font-family: var(--font-sign); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.event h3 { font-size: 1.1rem; }
.event .where { color: var(--muted); font-size: .88rem; }
.event .details { font-size: .92rem; margin: 6px 0; overflow-wrap: anywhere; }
.family-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.family-row::-webkit-scrollbar { display: none; }
.family-row button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--muted); min-width: 56px; }
.family-row .avatar { width: 52px; height: 52px; font-size: 1.6rem; }
.nudge { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(120deg, rgba(255,79,163,.18), rgba(79,227,255,.12)); border: 1px solid rgba(255,79,163,.4); }
.nudge p { flex: 1; font-size: .92rem; font-weight: 600; }
.fab { position: fixed; z-index: 39; right: max(18px, var(--sar)); bottom: calc(var(--tabbar) + 16px); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--taxi); color: #1a1400; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(255,201,40,.4); transition: transform .2s; }
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: scale(.92); }
.empty { text-align: center; color: var(--muted); padding: 22px; border: 1px dashed var(--line); border-radius: 18px; font-size: .92rem; }

/* TRIP HERO */
.trip-hero { position: relative; overflow: hidden; isolation: isolate; padding: calc(var(--sat) + 22px) var(--gutter) 70px; display: flex; flex-direction: column; gap: 14px; min-height: 470px; justify-content: flex-end; }
.trip-hero .sky { z-index: -1; }
.kicker { font-family: var(--font-mono); color: var(--cyan); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; }
.title { font-family: var(--font-sign); font-weight: 400; font-size: clamp(4.6rem, 26vw, 9rem); line-height: .85; display: flex; align-items: flex-start; }
.t-nyc { color: var(--taxi); text-shadow: 0 0 18px rgba(255, 201, 40, .55), 0 0 60px rgba(255, 201, 40, .25); animation: flicker 6s infinite; }
.t-yr { color: var(--neon); font-size: .42em; margin-left: .08em; margin-top: .12em; text-shadow: 0 0 16px rgba(255, 79, 163, .7); }
@keyframes flicker { 0%, 18%, 22%, 60%, 63%, 100% { opacity: 1; } 20%, 61.5% { opacity: .55; } }
.countdown { display: flex; gap: 8px; }
.cd-unit { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px 6px; flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.cd-unit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.45); }
.cd-num { font-family: var(--font-sign); font-size: clamp(2rem, 10vw, 3.6rem); line-height: 1; color: var(--taxi); font-variant-numeric: tabular-nums; display: inline-block; }
.cd-num.tick { animation: flip .45s cubic-bezier(.2,.8,.2,1); }
@keyframes flip { 0% { transform: translateY(-40%) rotateX(70deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cd-lbl { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.cd-caption { color: var(--muted); font-size: .9rem; }
.ball-row { display: flex; gap: 10px; align-items: center; background: rgba(22, 29, 61, .75); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; backdrop-filter: blur(6px); font-size: .9rem; align-self: flex-start; }
.ball-row b { color: var(--cyan); font-family: var(--font-mono); }
.ball { width: 30px; height: 30px; border-radius: 50%; position: relative; overflow: hidden; flex: none; background: conic-gradient(from 0deg, #ff4fa3, #ffc928, #4fe3ff, #4fe0a0, #ff4fa3); animation: spin 5s linear infinite; box-shadow: 0 0 18px rgba(79, 227, 255, .6); }
.ball span { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 2px, transparent 2px 7px), repeating-linear-gradient(-45deg, rgba(255,255,255,.25) 0 2px, transparent 2px 7px); border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.ticker { position: absolute; bottom: 0; left: 0; right: 0; overflow: hidden; background: var(--taxi); color: #1a1400; border-block: 3px solid #1a1400; }
.ticker-track { display: inline-flex; white-space: nowrap; gap: 40px; padding: 8px 0; font-family: var(--font-sign); font-size: .95rem; animation: marquee 60s linear infinite; }
.ticker-track span { display: inline-flex; gap: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin: 18px 0 14px; position: sticky; top: calc(var(--sat) + 6px); z-index: 5; backdrop-filter: blur(10px); }
.seg button { border: 0; background: none; border-radius: 10px; padding: 9px; font-weight: 700; color: var(--muted); min-height: 40px; }
.seg button[aria-selected="true"] { background: var(--taxi); color: #1a1400; }
.picks { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.picks .stack .avatar { width: 22px; height: 22px; font-size: .75rem; border-width: 1.5px; margin-left: -6px; }
.picks .stack .avatar:first-child { margin-left: 0; }
.trackbar { position: relative; padding-top: 28px; margin-top: 4px; }
.track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.track div { height: 30px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: .62rem; color: var(--muted); font-weight: 700; position: relative; overflow: hidden; }
.track div i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(255,201,40,.35), rgba(255,201,40,.6)); width: 0; transition: width .6s; }
.track div span { position: relative; }
.car { position: absolute; top: 0; left: 0; font-size: 22px; transform: translateX(-50%) scaleX(-1); transition: left 1s cubic-bezier(.2,.8,.2,1); }
/* PLAN */
.daytabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.daytabs button { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 0; border-radius: 12px; padding: 8px 14px; background: var(--card); }
.daytabs button small { color: var(--muted); font-weight: 500; font-size: .72rem; }
.daytabs button[aria-selected="true"] { background: var(--taxi); color: #1a1400; border-color: var(--taxi); }
.daytabs button[aria-selected="true"] small { color: #3d3000; }
.daytabs button.today::after { content: "LIVE"; font-size: .6rem; font-weight: 800; letter-spacing: .1em; color: var(--neon); }
.daytabs button[aria-selected="true"].today::after { color: #8a0040; }

.dayhead { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.dayhead .emoji { font-size: 2.6rem; line-height: 1; }
.dayhead h3 { font-size: clamp(1.3rem, 3.6vw, 1.8rem); }
.dayhead p { color: var(--muted); }
.dayhead .meter { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.items::before { content: ""; position: absolute; left: 71px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
@media (max-width: 560px) { .items::before { left: 57px; } }
.item { display: grid; grid-template-columns: 60px 1fr; gap: 0 22px; position: relative; animation: rise .5s both; }
@media (max-width: 560px) { .item { grid-template-columns: 48px 1fr; gap: 0 18px; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.item .time { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); text-align: right; padding-top: 16px; line-height: 1.2; }
.item .time b { display: block; color: var(--ink); font-size: .95rem; }
.item::before { content: ""; position: absolute; left: 66px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--night); border: 3px solid var(--muted); z-index: 1; }
@media (max-width: 560px) { .item::before { left: 52px; } }
.item.see::before { border-color: var(--taxi); }
.item.eat::before { border-color: var(--eat); }
.item.go::before { border-color: var(--cyan); }
.item.extra::before { border-style: dashed; }
.item.now::before { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 0 6px rgba(255,79,163,.25); animation: pulse 1.2s infinite; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; transition: transform .2s, border-color .2s, box-shadow .2s; min-width: 0; }
.card:hover { transform: translateY(-2px); border-color: #3b478a; }
.item.extra .card { background: transparent; border-style: dashed; }
.item.now .card { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 10px 30px rgba(255,79,163,.18); }
.item.done .card { border-color: rgba(79,224,160,.6); }
.card .row1 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card .kind { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.kind.see { background: rgba(255,201,40,.15); color: var(--taxi); }
.kind.eat { background: rgba(255,154,98,.15); color: var(--eat); }
.kind.go { background: rgba(79,227,255,.12); color: var(--cyan); }
.kind.extra { border: 1px dashed var(--muted); color: var(--muted); }
.card h4 { margin: 0; font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; }
.card .note { color: var(--muted); font-size: .9rem; }
.card .price { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.acts button { border: 1px solid var(--line); background: var(--night-2); border-radius: 999px; padding: 5px 11px; font-size: .82rem; font-weight: 600; transition: transform .15s, background .2s, border-color .2s; }
.acts button:active { transform: scale(.92); }
.acts button.on.want { background: rgba(255,79,163,.18); border-color: var(--neon); color: #ffc2de; }
.acts button.on.did { background: rgba(79,224,160,.18); border-color: var(--mint); color: #bff5dc; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 2px; font-size: 1.15rem; color: #4a5591; }
.stars button.lit { color: var(--taxi); text-shadow: 0 0 8px rgba(255,201,40,.6); }

/* GAMES */
.play-grid, .prep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .play-grid, .prep-grid { grid-template-columns: 1fr; } }
.bingo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bingo button { aspect-ratio: 1; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--night-2); font-size: clamp(.66rem, 2.3vw, .82rem); font-weight: 600; padding: 4px; line-height: 1.15; transition: transform .2s, background .25s; }
.bingo button.on { background: var(--taxi); color: #1a1400; border-color: var(--taxi); transform: rotate(-2deg); }
.bingo button.win { background: var(--neon); border-color: var(--neon); color: #fff; }
.quiz-q { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.quiz-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-a button { border: 1px solid var(--line); background: var(--night-2); border-radius: 10px; padding: 12px; font-weight: 600; text-align: left; transition: background .2s, transform .15s; }
.quiz-a button:hover:not(:disabled) { border-color: var(--taxi); }
.quiz-a button.right { background: rgba(79,224,160,.25); border-color: var(--mint); }
.quiz-a button.wrong { background: rgba(255,79,163,.2); border-color: var(--neon); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.quiz-fact { background: var(--night-2); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.quiz-bar { height: 6px; background: var(--night-2); border-radius: 3px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; background: var(--taxi); transition: width .4s; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn { border: 1px solid var(--taxi); background: var(--taxi); color: #1a1400; border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--taxi); }

/* PREP */
.weather .now-temp { font-family: var(--font-sign); font-size: 3.4rem; color: var(--cyan); line-height: 1; }
.wx-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.wx-days div { background: var(--night-2); border-radius: 10px; padding: 8px; text-align: center; font-size: .82rem; }
.wx-days b { display: block; font-size: 1.3rem; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 4px 0; }
.checks input { width: 18px; height: 18px; accent-color: var(--taxi); }
.checks input:checked + span { text-decoration: line-through; color: var(--muted); }
.playlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.playlist span { color: var(--muted); font-size: .88rem; }
.nye-tips { border-color: var(--neon); }
.nye-tips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* WRAPPED */
.wrapped { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 820px) { .wrapped { grid-template-columns: repeat(2, 1fr); } }
.w-tile { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 140px; position: relative; overflow: hidden; }
.w-tile .big-n { font-family: var(--font-sign); font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; }
.w-tile span { font-weight: 600; }
.w-persona { grid-column: 1 / -1; background: linear-gradient(120deg, #ff4fa3, #8a4bff 55%, #4fe3ff); color: #fff; min-height: 170px; justify-content: flex-end; }
.w-persona .p-title { font-family: var(--font-sign); font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1; }
.w-persona::after { content: "🗽"; position: absolute; right: 10px; top: -6px; font-size: 7rem; opacity: .25; transform: rotate(12deg); }
.w-y { background: var(--taxi); color: #1a1400; }
.w-c { background: var(--cyan); color: #00222b; }
.w-m { background: var(--mint); color: #002816; }
.w-o { background: var(--eat); color: #2b1000; }
.w-fav { grid-column: span 2; background: var(--card-2); border: 1px solid var(--line); }
@media (max-width: 820px) { .w-fav { grid-column: 1 / -1; } }
.w-fav .fav { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; }
.wrapped-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
button.big { background: var(--taxi); color: #1a1400; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 1rem; box-shadow: 0 8px 24px rgba(255,201,40,.3); transition: transform .15s; }
button.big:hover { transform: translateY(-2px); }

.foot { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 48px max(18px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .9rem; }


/* MAP */
.view[data-view="map"] { overflow: hidden; padding-bottom: 0; }
#map { position: absolute; inset: 0; bottom: var(--tabbar); background: var(--night-2); }
.leaflet-container { background: var(--night-2); font-family: var(--font-body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card-2); color: var(--ink); }
.leaflet-popup-content b { color: var(--taxi); }
.leaflet-control-attribution { background: rgba(11,15,31,.7) !important; color: var(--muted) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-top { top: calc(var(--sat) + 64px); }
.leaflet-bar a { background: var(--card-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.map-head { position: absolute; z-index: 900; top: calc(var(--sat) + 10px); left: var(--gutter); right: max(16px, var(--sar)); display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.map-head > * { pointer-events: auto; }
.map-head h1 { font-size: 1.5rem; font-weight: 800; text-shadow: 0 2px 12px #000; }
.map-fabs { position: absolute; z-index: 900; right: max(12px, var(--sar)); display: flex; flex-direction: column; gap: 8px; transition: bottom .35s cubic-bezier(.2,.8,.2,1); }
.map-fabs button { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgba(22,29,61,.92); display: grid; place-items: center; backdrop-filter: blur(8px); }
.map-fabs button.on { color: var(--taxi); border-color: var(--taxi); }
.sheet-map { position: absolute; z-index: 1000; left: 0; right: 0; bottom: var(--tabbar); max-height: 44%; display: flex; flex-direction: column; background: rgba(18, 24, 51, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top-left-radius: 24px; border-top-right-radius: 24px; border: 1px solid var(--line); border-bottom: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 900px) { .sheet-map { left: 16px; right: auto; width: 400px; bottom: 96px; border-radius: 24px; border-bottom: 1px solid var(--line); } }
.sheet-map .grab { border: 0; background: none; padding: 10px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.sheet-map .grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-map .grab span { font-weight: 800; font-size: .95rem; }
.sheet-body { overflow-y: auto; padding: 4px var(--gutter) 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.sheet-map.collapsed .sheet-body { display: none; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.map-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 10px 4px; font-size: .78rem; font-weight: 700; min-height: 64px; }
.map-actions button .ic { width: 22px; height: 22px; }
.map-actions button.on { border-color: var(--mint); color: var(--mint); background: rgba(79,224,160,.1); }
.map-actions button.sos { border-color: rgba(255,93,108,.5); color: #ffb3bd; }
.who-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 4px; border: 0; background: none; text-align: left; width: 100%; border-bottom: 1px solid rgba(43,53,102,.6); }
.who-row:last-child { border-bottom: 0; }
.who-row .avatar { width: 44px; height: 44px; }
.who-row b { display: block; }
.who-row small { color: var(--muted); font-size: .82rem; }
.who-row .dist { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.plan-now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-now div { background: var(--card); border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); }
.plan-now b { display: block; font-size: .92rem; line-height: 1.25; }
.plan-now small { color: var(--muted); font-size: .76rem; }
.fam-marker { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--card-2); border: 3px solid var(--mint); box-shadow: 0 4px 16px rgba(0,0,0,.5); position: relative; }
.fam-marker.stale { border-color: var(--muted); filter: grayscale(.6); opacity: .8; }
.fam-marker.lost { border-color: var(--danger); animation: sos 1s infinite; }
@keyframes sos { 50% { box-shadow: 0 0 0 10px rgba(255,93,108,.35); } }
.fam-marker small { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: rgba(11,15,31,.85); padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--ink); }
.pin-marker { color: var(--neon); filter: drop-shadow(0 4px 10px rgba(255,79,163,.6)); }
.pin-marker .ic { width: 40px; height: 40px; fill: rgba(255,79,163,.35); }
.taxi-marker { font-size: 28px; line-height: 1; filter: drop-shadow(0 0 10px rgba(255,201,40,.9)); animation: bob 1.4s ease-in-out infinite; position: relative; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.me-marker { width: 18px; height: 18px; border-radius: 50%; background: #3d8bff; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(61,139,255,.25); }
.timemachine { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; }
.timemachine summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.timemachine[open] { display: flex; flex-direction: column; gap: 10px; }
.timemachine input[type=range] { width: 100%; accent-color: var(--taxi); }
.tm-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .85rem; }

/* PLAY + ME */
.score-row { display: grid; grid-template-columns: 28px 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(43,53,102,.6); }
.score-row:last-child { border-bottom: 0; }
.score-row .rank { font-family: var(--font-sign); color: var(--muted); text-align: center; }
.score-row.first .rank { color: var(--taxi); }
.score-row small { color: var(--muted); font-size: .8rem; display: block; }
.score-row .pts { font-family: var(--font-sign); color: var(--taxi); font-size: 1.2rem; }
.profile { display: flex; gap: 14px; align-items: center; }
.profile .avatar { width: 64px; height: 64px; font-size: 2rem; }
.profile h2 { font-size: 1.5rem; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid rgba(43,53,102,.6); background: none; width: 100%; text-align: left; min-height: 56px; color: var(--ink); text-decoration: none; }
.list > *:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list small { display: block; color: var(--muted); font-size: .82rem; }
.list .ic { color: var(--muted); }
.switch { width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; transition: background .2s; border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.2,.8,.2,1.3); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch[aria-checked="true"] { background: var(--mint); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* BOTTOM SHEETS */
.backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(5,7,18,.6); backdrop-filter: blur(3px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 901; left: 0; right: 0; bottom: 0; max-height: 92%; overflow-y: auto; background: var(--card); border-top-left-radius: 26px; border-top-right-radius: 26px; border: 1px solid var(--line); border-bottom: 0; padding: 10px var(--gutter) calc(var(--sab) + 20px); display: flex; flex-direction: column; gap: 14px; animation: up .35s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 24px; border-radius: 26px; border-bottom: 1px solid var(--line); animation: fade .25s; } }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grab-i { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 4px; }
.sheet h3 { font-size: 1.4rem; }
.sheet .row { display: flex; gap: 10px; }
.sheet .row > * { flex: 1; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check-row input { width: 22px; height: 22px; accent-color: var(--taxi); }

.toast { position: fixed; z-index: 2000; left: 50%; top: calc(var(--sat) + 10px); transform: translate(-50%, -30px); opacity: 0; background: var(--taxi); color: #1a1400; font-weight: 700; padding: 10px 18px; border-radius: 999px; transition: transform .3s, opacity .3s; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
.daytabs button, .tm-row button, .wrapped-actions button { border: 1px solid var(--line); background: rgba(22, 29, 61, .9); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: .85rem; min-height: 40px; }
.daytabs { scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
.daytabs::-webkit-scrollbar { display: none; }
