/* Hineni Parade — shared styles.
   Two themes on one token set: light ("wax & spruce") and dark ("spruce night").
   The page follows the device setting until someone taps the theme toggle
   (stored as hp_theme and applied as <html data-theme> before first paint).
   Layout: phone column for the in-car app, wider shells for organizer/admin/site pages. */
:root {
  --ground: #EDF2F0;
  --ground-2: #E2EAE7;
  --surface: #FBF8F2;
  --surface-2: #F2EDE2;
  --surface-solid: #FBF8F2;
  --glass: rgba(251, 248, 242, 0.9);
  --line: rgba(20, 58, 63, 0.13);
  --line-strong: rgba(20, 58, 63, 0.24);
  --line-gold: rgba(168, 111, 20, 0.45);
  --ink: #1C2F32;
  --ink-strong: #0E2326;
  --muted: #53676A;
  --muted-2: #677A7C;
  --gold: #D9A13B;
  --gold-hover: #E5B04F;
  --gold-text: #845710;
  --gold-soft: #9C6A16;
  --gold-ink: #1E1606;
  --gold-tint: rgba(217, 161, 59, 0.13);
  --spruce: #143A3F;
  --spruce-ink: #F4F0E6;
  --sky: #9CC6DB;
  --me: #2B78AE;
  --ok: #2E8656;
  --ok-ink: #1E6640;
  --ok-tint: rgba(46, 134, 86, 0.1);
  --warn-ink: #845710;
  --bad: #C2412D;
  --bad-ink: #9A2C1C;
  --bad-tint: rgba(194, 65, 45, 0.08);
  --map-bg: #E6ECEA;
  --overlay: rgba(14, 35, 38, 0.42);
  --toast-bg: #143A3F;
  --toast-ink: #F7F3EA;
  --shadow: 0 1px 2px rgba(20, 58, 63, 0.06), 0 10px 30px rgba(20, 58, 63, 0.09);
  --shadow-lift: 0 2px 6px rgba(20, 58, 63, 0.08), 0 22px 48px rgba(20, 58, 63, 0.14);
  --glow: rgba(217, 161, 59, 0.22);
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, monospace;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  color-scheme: light;
}

/* Dark tokens: used when the device is dark (unless someone picked light), or when picked. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #091416; --ground-2: #0D1C1F; --surface: rgba(222, 240, 235, 0.05); --surface-2: rgba(222, 240, 235, 0.09);
    --surface-solid: #12221F; --glass: rgba(9, 20, 22, 0.86); --line: rgba(222, 240, 235, 0.11); --line-strong: rgba(222, 240, 235, 0.2);
    --line-gold: rgba(233, 180, 76, 0.42); --ink: #E9EDE6; --ink-strong: #FAFAF4; --muted: #A5B3B0; --muted-2: #8C9D9A;
    --gold: #E9B44C; --gold-hover: #F0C163; --gold-text: #F0C66A; --gold-soft: #F4D48C; --gold-ink: #1A1206; --gold-tint: rgba(233, 180, 76, 0.1);
    --spruce: #17393E; --spruce-ink: #F4F0E6; --me: #8FB8FF; --ok: #7BD88F; --ok-ink: #CFEBD6; --ok-tint: rgba(123, 216, 143, 0.09);
    --warn-ink: #FBE0B4; --bad: #F07A6A; --bad-ink: #FFD6CF; --bad-tint: rgba(240, 122, 106, 0.09); --map-bg: #0E1719;
    --overlay: rgba(3, 8, 9, 0.62); --toast-bg: #18302F; --toast-ink: #FAFAF4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35); --shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.45);
    --glow: rgba(233, 180, 76, 0.17);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #091416; --ground-2: #0D1C1F; --surface: rgba(222, 240, 235, 0.05); --surface-2: rgba(222, 240, 235, 0.09);
  --surface-solid: #12221F; --glass: rgba(9, 20, 22, 0.86); --line: rgba(222, 240, 235, 0.11); --line-strong: rgba(222, 240, 235, 0.2);
  --line-gold: rgba(233, 180, 76, 0.42); --ink: #E9EDE6; --ink-strong: #FAFAF4; --muted: #A5B3B0; --muted-2: #8C9D9A;
  --gold: #E9B44C; --gold-hover: #F0C163; --gold-text: #F0C66A; --gold-soft: #F4D48C; --gold-ink: #1A1206; --gold-tint: rgba(233, 180, 76, 0.1);
  --spruce: #17393E; --spruce-ink: #F4F0E6; --me: #8FB8FF; --ok: #7BD88F; --ok-ink: #CFEBD6; --ok-tint: rgba(123, 216, 143, 0.09);
  --warn-ink: #FBE0B4; --bad: #F07A6A; --bad-ink: #FFD6CF; --bad-tint: rgba(240, 122, 106, 0.09); --map-bg: #0E1719;
  --overlay: rgba(3, 8, 9, 0.62); --toast-bg: #18302F; --toast-ink: #FAFAF4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35); --shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.45);
  --glow: rgba(233, 180, 76, 0.17);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Nothing may push the page sideways on a phone. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s ease, color .35s ease;
}
/* Scrolling pages (homepage, contact): the body grows with the content, so the sticky header stays put. */
body.site { height: auto; min-height: 100%; }
[hidden] { display: none !important; }
img, svg, video, canvas { max-width: 100%; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; color: var(--ink-strong); }
.glow-bg { position: absolute; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── buttons & inputs ───────── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font: 600 16px/1 var(--font-body); cursor: pointer; text-decoration: none;
  transition: transform .18s var(--spring), background-color .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { color: var(--ink); }
.btn:active { transform: scale(.965); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 30px var(--glow); }
.btn-gold:hover { background: var(--gold-hover); color: var(--gold-ink); }
.btn-spruce { background: var(--spruce); color: var(--spruce-ink); }
.btn-spruce:hover { color: var(--spruce-ink); filter: brightness(1.12); }
.btn-line { background: transparent; border-color: var(--line-gold); color: var(--gold-text); }
.btn-line:hover { color: var(--gold-text); background: var(--gold-tint); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad-ink); }
.btn-big { min-height: 60px; font-size: 17px; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-icon { width: 52px; min-height: 52px; padding: 0; border-radius: 50%; background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn .shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 70%);
  transform: translateX(-120%); animation: shine 4.5s ease-in-out 2.5s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(120%); } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 14px; font-weight: 600; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted-2); margin: 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-strong);
  font: 500 16px/1.3 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--muted-2); opacity: .8; }
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px var(--gold-tint); }
textarea.input { min-height: 110px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
/* The open dropdown list is drawn by the browser: give it a solid background and readable text in both themes. */
select.input option, select.input optgroup { background-color: var(--surface-solid); color: var(--ink-strong); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex: 0 0 auto; }
.row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1 1 auto; }

/* code boxes */
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; position: relative; }
.code-box {
  height: 58px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 700; color: var(--ink-strong);
  transition: border-color .2s, background-color .2s, transform .25s var(--spring);
}
.code-box.filled { transform: translateY(-1px); }
.code-box.active { border-color: var(--gold); background: var(--gold-tint); }
.code-input { position: absolute; inset: 0; opacity: 0; font-size: 16px; text-transform: uppercase; caret-color: transparent; }

/* chips & pills */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.chip-gold { color: var(--gold-text); border-color: var(--line-gold); background: transparent; }
.chip-ok { color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-tint); }
.chip-warn { color: var(--warn-ink); border-color: var(--line-gold); background: var(--gold-tint); }
.chip-bad { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-tint); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.dot.pulse { animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* cards */
.card { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); padding: 18px; box-shadow: var(--shadow); }
.card-gold { border-color: var(--line-gold); background: var(--gold-tint); box-shadow: none; }
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: var(--shadow); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px) scale(.96);
  max-width: min(92vw, 440px); padding: 13px 18px; border-radius: 16px; z-index: 9999;
  background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--shadow-lift);
  font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.with-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast .toast-action { border: 0; background: transparent; color: var(--gold); font: inherit; font-weight: 700; padding: 6px 4px; cursor: pointer; }

/* theme toggle */
.theme-toggle { width: 42px; min-height: 42px; padding: 0; border-radius: 50%; background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; transition: transform .5s var(--spring); }
.theme-toggle:active svg { transform: rotate(-30deg) scale(.9); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ───────── menorah (flat) ───────── */
.menorah { width: 100%; height: auto; display: block; overflow: visible; }
.menorah .m-candle { fill: #F6ECD6; stroke: rgba(120, 90, 40, .25); stroke-width: .6; }
.menorah .m-wick { stroke: #3A2A18; stroke-width: 1.6; stroke-linecap: round; }
.menorah .m-bloom { opacity: 0; transition: opacity 1.2s ease-out; }
.menorah .m-flame { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); opacity: 0; }
.menorah .m-flame.on { animation: mIgnite .7s cubic-bezier(.2, .9, .25, 1.25) forwards; }
.menorah .m-flick { transform-box: fill-box; transform-origin: 50% 92%; animation: mFlick 1.8s ease-in-out infinite; }
.menorah .m-glow { animation: mGlow 2.6s ease-in-out infinite; }
@keyframes mIgnite { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.18, 1.32); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes mFlick { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 22% { transform: scale(.96, 1.06) skewX(1.6deg); } 48% { transform: scale(1.03, .96) skewX(-1.2deg); } 74% { transform: scale(.98, 1.03) skewX(.8deg); } }
@keyframes mGlow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

.rise { animation: rise .9s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ───────── site chrome (homepage, contact, join preview, organizer) ───────── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-strong); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink-strong); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--spruce); display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark svg { width: 22px; height: 22px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 9px 13px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; transition: background-color .2s; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--gold-tint); color: var(--gold-text); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .site-nav { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% + 6px); flex-direction: column; align-items: stretch; padding: 8px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
  .site-nav.open { display: flex; animation: menuIn .35s var(--spring) both; }
  .site-nav a { padding: 14px 16px; font-size: 17px; }
  .nav-toggle { display: inline-flex; }
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.site-footer {
  border-top: 1px solid var(--line); margin-top: 64px;
  padding: 28px max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  color: var(--muted); font-size: 14px;
}
.site-footer .inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ───────── participant app ───────── */
.app { position: relative; height: 100%; max-width: 520px; margin: 0 auto; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.join {
  overflow-x: hidden; overflow-y: auto; padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px));
}
.join-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.join-head .brand, .join-head .chip { white-space: nowrap; }
.join-head .brand { min-width: 0; }
/* "How are you joining?": a car (takes a spot) or the sidewalk (doesn't), equally easy to pick. */
.who-title { font-size: 15px; font-weight: 700; color: var(--ink-strong); margin-bottom: 2px; }
.who-cards { display: grid; gap: 10px; }
.who-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 20px; text-align: left; text-decoration: none; cursor: pointer; font: inherit; transition: transform .15s, box-shadow .2s; }
.who-card:active { transform: scale(.985); }
.who-card .who-ico { flex: 0 0 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.who-card .who-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.who-card b { font-size: 19px; font-weight: 700; line-height: 1.25; }
.who-card .shine { position: absolute; inset: 0; pointer-events: none; }
.who-card small { font-size: 14px; line-height: 1.35; opacity: .85; }
.who-car { background: var(--gold); color: var(--gold-ink, #1A1206); border: 0; box-shadow: 0 10px 26px -12px rgba(217, 161, 59, .8); }
.who-car .who-ico { background: rgba(26, 18, 6, .1); }
.who-car:disabled { opacity: .55; cursor: default; }
.who-walk { background: var(--surface-solid); color: var(--ink-strong); border: 2px solid var(--line-gold); }
.who-walk .who-ico { background: var(--gold-tint); color: var(--gold-text); }
@media (min-width: 560px) { .who-cards { grid-template-columns: 1fr 1fr; } .who-card { flex-direction: column; align-items: flex-start; } }
.wordmark { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink-strong); text-decoration: none; }
.join-menorah { position: relative; margin: 22px auto 0; width: min(100%, 340px); }
.join-title { margin: 0; font-size: clamp(36px, 10vw, 46px); }
.progress-line { height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.progress-line > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--gold); border-radius: 3px; transition: width .25s linear; }
.note { font-size: 13px; line-height: 1.45; color: var(--muted-2); text-align: center; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-tint); color: var(--bad-ink); }
.alert.alert-ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-tint); color: var(--ok-ink); }
.alert.alert-info { border-color: var(--line-gold); background: var(--gold-tint); color: var(--ink); }

/* parade preview (before joining) */
.preview-map { position: relative; height: 220px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); }
.preview-map .leaflet-container { height: 100%; }
.preview-state { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.preview-state b { color: var(--ink-strong); }

.parade { background: var(--ground); }
#map { position: absolute; inset: 0; background: var(--map-bg); }
.leaflet-container { background: var(--map-bg); font-family: var(--font-body); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface-solid) 80%, transparent) !important; color: var(--muted-2) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
/* Mapbox's logo (when Mapbox is on): sits in the strip below the parade sheet, clear of its buttons. */
.leaflet-bottom.leaflet-left a.mapboxgl-ctrl-logo { margin: 0 0 2px 6px; }
.tiles-dark { filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(88%) saturate(45%) sepia(22%); }
.route-flow { stroke-dasharray: 2 16; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }

.mk-lead { position: relative; width: 46px; height: 46px; }
.mk-lead .mk-core { position: absolute; inset: 2px; border-radius: 50%; background: #143A3F; border: 2px solid #E9B44C; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(233, 180, 76, .5); }
.mk-lead .mk-dir { position: absolute; inset: -8px; pointer-events: none; }
.mk-lead .mk-dir::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid #E9B44C; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.mk-drive { width: 44px; height: 44px; transition: transform .4s var(--ease-out, ease); }
.mk-drive svg { width: 44px; height: 44px; fill: var(--me, #2F7BF6); stroke: #fff; stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.dir-card { max-height: 80vh; }
.dir-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; }
.dir-item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.dir-item:last-child { border-bottom: 0; }
.dir-icon { flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.dir-item.stop .dir-icon { background: var(--gold-tint); border: 1px solid var(--line-gold); }
.dir-icon svg { width: 22px; height: 22px; }
.dir-text { flex: 1; min-width: 0; font-size: 15px; color: var(--ink-strong); }
.dir-dist { font-weight: 700; color: var(--gold-text); }
.turn-card, .lead-turn { cursor: pointer; user-select: none; }
.turn-card.peeking, .lead-turn.peeking { outline: 2px dashed var(--line-gold); outline-offset: -4px; }
.turn-dots { display: flex; gap: 4px; margin-top: 4px; }
.turn-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.turn-dots i.on { background: var(--gold); }
.peek-info { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
.peek-info b { color: var(--ink-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.peek-info .eta { color: var(--gold-text); font-weight: 700; white-space: nowrap; }
.peek-info .time { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-lead.stale { opacity: .55; filter: grayscale(.5); }
.mk-lead.stale .mk-pulse { display: none; }
.mk-lead .mk-ago { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mk-lead .mk-pulse { position: absolute; inset: 2px; border-radius: 50%; border: 2px solid #E9B44C; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }
.mk-tail { width: 14px; height: 14px; border-radius: 50%; background: #6E7F80; border: 2px solid #fff; margin: 2px; }
.mk-me { position: relative; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--me) 18%, transparent); display: flex; align-items: center; justify-content: center; }
.mk-me span { width: 16px; height: 16px; border-radius: 50%; background: var(--me); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.mk-stop { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #D9A13B; position: relative; }
.mk-start { width: 30px; height: 30px; border-radius: 50%; background: #143A3F; border: 3px solid #E9B44C; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.mk-start svg { width: 14px; height: 14px; }
.mk-stop-label { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; padding: 4px 9px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--line-gold); color: var(--ink); font-size: 11px; font-weight: 700; box-shadow: var(--shadow); }
.mk-way { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font: 700 12px/26px var(--font-body); text-align: center; border: 2px solid #fff; }

/* map buttons: find the parade / locate me */
.map-fabs { position: absolute; z-index: 520; right: max(14px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 10px; }
.map-fab { width: 48px; min-height: 48px; padding: 0; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.map-fab svg { width: 22px; height: 22px; }
.map-fab.active { color: var(--me); border-color: color-mix(in srgb, var(--me) 45%, transparent); }
.map-fab.on-parade { color: var(--gold-text); }

.turn-card {
  position: absolute; z-index: 500; left: max(14px, env(safe-area-inset-left, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px;
  animation: dropIn .7s var(--ease-out) both;
}
.turn-icon { flex: 0 0 52px; height: 52px; border-radius: 16px; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.turn-dist { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.turn-name { font-size: 15px; color: var(--muted); }
.map-chip { position: absolute; z-index: 500; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); }
.recenter { position: absolute; z-index: 500; right: max(14px, env(safe-area-inset-right, 0px)); width: 46px; min-height: 46px; }
.banner {
  position: absolute; z-index: 600; left: max(14px, env(safe-area-inset-left, 0px)); right: max(14px, env(safe-area-inset-right, 0px));
  padding: 14px 16px; border-radius: 18px; background: var(--surface-solid); border: 1.5px solid var(--gold); color: var(--ink-strong);
  display: flex; gap: 12px; align-items: center; animation: dropIn .5s var(--spring) both; box-shadow: var(--shadow-lift);
}
.banner { padding: 10px 10px 10px 14px; border-radius: 16px; top: calc(14px + env(safe-area-inset-top, 0px)); }
.banner-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.banner-from { color: var(--gold-text); font-size: 11px; }
/* Readable at a glance: up to four lines (a full 140-character message on most phones); tap for the rest. */
.banner-text { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.banner-ok { flex: none; min-width: 52px; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

.sheet {
  position: absolute; z-index: 550; left: 0; right: 0; bottom: 0;
  padding: 10px max(22px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  border-radius: 28px 28px 0 0; display: flex; flex-direction: column; gap: 16px;
  animation: upIn .8s var(--ease-out) both;
}
@keyframes upIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.handle { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); }
.handle-btn { align-self: stretch; display: flex; justify-content: center; align-items: center; min-height: 44px; margin: -10px 0 -14px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.handle-btn:hover .handle { background: var(--muted-2); }
.sheet.collapsed #sheetBody { display: none; }
/* Portrait: the sheet slides (join.html moves it with a transform); smooth unless a finger is on it. */
.sheet { transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.sheet.dragging { transition: none; }
.handle-btn, .sheet .status-row { touch-action: none; }
.mini-play { flex: none; width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mini-play svg { width: 18px; height: 18px; }
.mini-play.paused { background: var(--gold); border-color: var(--gold); color: #1A1206; }
.sheet.collapsed { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
.big-time { font-family: var(--font-display); font-size: 54px; line-height: .95; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.scrub { position: relative; height: 5px; border-radius: 3px; background: var(--line); }
.scrub > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--gold); }
.scrub > b { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #FFE3A3; box-shadow: 0 0 12px rgba(233, 180, 76, .9); }
.next-stop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ok-ink); }
.status.wait { color: var(--gold-text); }
.status.off { color: var(--bad-ink); }
.timing-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.35; color: var(--gold-text); }
.timing-note .btn { flex: none; }
.ended-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--gold-tint); border: 1px solid var(--line-gold); }
.ended-title { font-size: 17px; font-weight: 700; color: var(--ink-strong); }

.overlay { position: fixed; inset: 0; z-index: 2000; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  width: min(100%, 520px); border-radius: 28px 28px 0 0; background: var(--surface-solid); border: 1px solid var(--line);
  padding: 22px max(22px, env(safe-area-inset-right, 0px)) calc(26px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px; animation: sheetIn .45s var(--spring) both; box-shadow: var(--shadow-lift);
}
@keyframes sheetIn { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }
.overlay-card h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; color: var(--ink-strong); }
.nudge-val { font-size: 34px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-strong); min-width: 120px; }

.countdown-ring { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.countdown-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 72px; color: var(--ink-strong); }

.ios-guard { position: fixed; inset: 0; z-index: 5000; background: var(--ground); display: flex; align-items: center; justify-content: center; padding: 24px; }
.ios-guard-card { max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.ios-guard-card h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 38px; }
.ios-guard-card p, .ios-guard-card ol { margin: 0; color: var(--muted); }
.ios-guard-link { word-break: break-all; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }

/* ───────── organizer & admin shells ───────── */
.page { max-width: 780px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(116px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.page-wide { max-width: 1180px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-width: 0; }
.page-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 6vw, 42px); line-height: 1.05; color: var(--ink-strong); }
.section-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-strong); }
/* a card that folds: <details class="card fold"><summary>…</summary><div class="fold-body stack">… */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; margin: -18px; padding: 18px; border-radius: inherit; -webkit-tap-highlight-color: transparent; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.fold > summary .section-title { flex: 1 1 auto; min-width: 0; }
.fold > summary .fold-hint { flex: 0 1 auto; max-width: 55%; font-size: 13px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold > summary::after { content: ''; flex: 0 0 auto; width: 8px; height: 8px; margin: 0 4px 3px 0; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.fold[open] > summary .fold-hint { display: none; }
.fold > .fold-body { margin-top: 16px; }
.tabbar {
  position: fixed; z-index: 900; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 4px; padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  background: var(--glass); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabbar a { flex: 1 1 0; max-width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; transition: background-color .2s, color .2s; }
.tabbar a[aria-current="page"] { color: var(--gold-text); background: var(--gold-tint); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); gap: 4px; max-width: 100%; overflow-x: auto; }
.seg button { min-height: 38px; padding: 0 16px; border-radius: 999px; border: none; background: transparent; color: var(--muted); font: 600 14px var(--font-body); cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.kv { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 8px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.linkbox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.linkbox code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px var(--font-mono); color: var(--ink); }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font: inherit; width: 100%; transition: border-color .2s, background-color .2s; }
.plan[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-tint); }
.price-line { margin: 0 0 22px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-gold); background: var(--gold-tint); font-size: 15px; color: var(--ink); }
.price-line b { color: var(--ink-strong); }
.included { color: var(--ok-ink); font-weight: 600; }
.tz-search { margin-bottom: 8px; }
/* Zelle / Cash App, under the card checkout. */
.pay-alt-open { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--gold-text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pay-alt-body { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.pay-alt-amount { font-size: 16px; }
.pay-alt-amount b { color: var(--gold-text); font-size: 18px; }
.pay-alt-row { display: flex; align-items: center; gap: 12px; }
.pay-alt-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pay-alt-row .grow b { font-size: 15px; }
.pay-alt-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; }
.pay-alt-ico.zelle { background: #6D1ED4; }
.pay-alt-ico.cash { background: #00C244; }
.pay-alt-memo code { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line-gold); font-size: 14px; overflow-wrap: anywhere; }

/* "This parade is sponsored by ..." */
.sponsor { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 16%, var(--surface-solid)), color-mix(in srgb, var(--gold) 5%, var(--surface-solid)));
  border: 1px solid var(--line-gold); color: var(--ink); font-size: 14px; line-height: 1.3; text-decoration: none; }
a.sponsor:hover { color: var(--ink); border-color: var(--gold); }
.sponsor b { color: var(--ink-strong); font-weight: 700; }
.sponsor .sp-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 3px var(--gold-tint); }
.sponsor .sp-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sponsor .sp-go { flex: none; color: var(--gold-text); }
.sponsor::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 200, .5) 50%, transparent 65%); transform: translateX(-100%); animation: spShine 1.6s .6s ease-out 1; }
@keyframes spShine { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sponsor::after { display: none; } }
.sponsor.big { padding: 12px 16px 12px 12px; border-radius: 20px; }
.sponsor.big .sp-ico { width: 38px; height: 38px; }
.sponsor.big .sp-ico svg { width: 18px; height: 18px; }
.sponsor.big .sp-txt { display: flex; flex-direction: column; gap: 1px; white-space: normal; }
.sponsor.big small { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.sponsor.big b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.15; }
.banner-sponsor { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.banner-sponsor b { color: var(--ink-strong); }
#sponsorLine:empty, #sponsorPre:empty { display: none; }
/* Sidewalk page: the parade is right next to you. */
.lookup { color: var(--gold-text); animation: lookUp .9s ease-in-out infinite alternate; transform-origin: left center; }
@keyframes lookUp { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .lookup { animation: none; } }
/* "What happens next" on the set-up page: three short numbered steps. */
.next-steps { list-style: none; counter-reset: step; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.next-steps li { counter-increment: step; display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 15px; }
.next-steps li::before { content: counter(step); flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--gold-ink); background: var(--gold); transform: translateY(-1px); }
.plan-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
.plan .price { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-text); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted-2); flex: 0 0 auto; }
.plan[aria-pressed="true"] .radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 45%, transparent 50%); }
.map-box { position: relative; height: min(62vh, 560px); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); }
.map-box .leaflet-container { height: 100%; }
.map-tools { position: absolute; z-index: 500; left: 10px; right: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.live-time { font-family: var(--font-display); font-size: 68px; line-height: .95; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--gold); }
.qr { background: #fff; padding: 12px; border-radius: 14px; width: 172px; height: 172px; }
.qr img, .qr canvas { width: 148px !important; height: 148px !important; }
.list { display: flex; flex-direction: column; gap: 10px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; box-shadow: var(--shadow); }
.stat b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.stat span { font-size: 13px; font-weight: 600; color: var(--muted); }

/* address suggestions under a search box */
.suggest { position: absolute; z-index: 700; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lift); max-height: 320px; overflow-y: auto; }
.suggest li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--gold-tint); }
.suggest .s-name { font-weight: 600; color: var(--ink-strong); }
.suggest .s-place { font-size: 13px; color: var(--muted); }
.suggest .s-kind { margin-left: auto; flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted-2); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }

/* playlist rows (organizer music tab, library sheet) */
.tracklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.track { display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .2s, transform .3s var(--spring); }
.track.playing { border-color: var(--line-gold); }
.track .num { font-size: 13px; font-weight: 700; color: var(--muted-2); font-variant-numeric: tabular-nums; text-align: right; }
.track .t-play { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.track .t-name { font-weight: 600; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .t-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .t-actions { display: flex; gap: 4px; }
.track .t-actions .btn { width: 36px; min-height: 36px; padding: 0; border-radius: 10px; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.track .t-actions .btn:hover { color: var(--ink); background: var(--surface); }
.track .t-actions .btn[disabled] { opacity: .3; }
.track .t-actions .t-greet.on { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.greet-opt { display: flex; gap: 8px; align-items: center; }
.greet-opt .plan { flex: 1; min-width: 0; }
.greet-opt .greet-play { width: 46px; min-height: 46px; flex: none; }
.own-box { padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--line-gold); }
.mic-inline { color: var(--gold-text); }
.artist-tag { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin-top: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--gold-text); background: var(--gold-tint); border: 1px solid var(--line-gold); text-decoration: none; transition: background .2s, transform .2s var(--spring); }
.artist-tag::before { content: ''; flex: 0 0 auto; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--note-icon) center / contain no-repeat; mask: var(--note-icon) center / contain no-repeat; }
.artist-tag b { color: var(--ink-strong); font-weight: 700; }
.artist-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-tag:hover { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.artist-tag:active { transform: scale(.97); }
.artist-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.artist-tags .artist-tag { margin-top: 0; }
:root { --note-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E"); }
.lib-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--gold-text); background: var(--gold-tint); vertical-align: 1px; }

/* route builder: map beside the controls on wide screens */
.route-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) {
  .route-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .route-grid .route-map { height: calc(100vh - 150px); min-height: 520px; position: sticky; top: 24px; }
}
@media (max-width: 700px) { .add-music { grid-template-columns: 1fr; } }

/* the big start button on the organizer's Live tab */
.start-hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px; border-radius: var(--r-lg); background: var(--spruce); color: var(--spruce-ink); text-align: center; overflow: hidden; }
.start-hero .glow-bg { inset: -40% -10% auto -10%; height: 140%; width: auto; background: radial-gradient(closest-side, rgba(233, 180, 76, .3), transparent); }
.start-btn {
  position: relative; width: min(100%, 300px); aspect-ratio: 1; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #F6CF73, #D9A13B 60%, #A8701C); color: #1A1206;
  font: 700 26px/1.1 var(--font-body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 0 0 10px rgba(233, 180, 76, .16), 0 0 0 22px rgba(233, 180, 76, .07), 0 24px 60px rgba(0, 0, 0, .35);
  transition: transform .25s var(--spring), box-shadow .3s;
}
.start-btn small { font-size: 14px; font-weight: 600; opacity: .8; }
.start-btn:active { transform: scale(.95); }
.start-btn[disabled] { filter: grayscale(.6); opacity: .55; cursor: default; transform: none; }
.start-btn.live { background: radial-gradient(circle at 50% 35%, #F8A397, #D9533F 60%, #9E2F1E); color: #fff; }

/* ───────── wider screens ───────── */
@media (min-width: 900px) {
  .page { padding-top: 32px; }
  .tabbar { top: 0; bottom: auto; left: 0; right: auto; width: 96px; height: 100%; flex-direction: column; justify-content: flex-start; padding: 24px 10px; border-top: none; border-right: 1px solid var(--line); }
  .tabbar a { flex: 0 0 auto; padding: 14px 4px; }
  body.has-rail { padding-left: 96px; }
  body.has-rail .page { padding-bottom: 48px; }
  .app.app-wide { max-width: none; }
  /* Join on a laptop: the form on the left, the route (or the menorah) filling the right. */
  .app:not(.app-wide) { max-width: 1240px; }
  .join { padding: 28px 48px 40px; }
  .join .join-col {
    max-width: none; display: grid; align-content: start;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr); grid-template-rows: auto repeat(10, auto) 1fr;
    column-gap: clamp(40px, 6vw, 88px);
  }
  .join .join-col > *, .join .join-col #preview > * { grid-column: 1; }
  .join .join-col > .join-head { grid-column: 1 / -1; }
  .join .join-col #preview:not([hidden]) { display: contents; }
  .join .join-col #preview > * { margin-top: 14px; }
  .join .join-col .status-pill { justify-self: start; margin-top: 22px; }
  .join .join-col > .spacer { display: none; }
  .join .join-col > .join-menorah { grid-column: 2; grid-row: 2 / -1; align-self: center; width: min(100%, 480px); margin: 24px auto 0; }
  .join .join-col:has(#preview:not([hidden]) #previewMap:not([hidden])) > .join-menorah { display: none; }
  .join .join-col #previewMap { grid-column: 2; grid-row: 2 / -1; align-self: start; margin-top: 24px; height: max(440px, calc(100dvh - 150px)); border-radius: var(--r-lg, 24px); box-shadow: var(--shadow-lift); }
  .join .join-title { font-size: 56px; }
  .join .join-col #info { margin-top: 36px !important; }
  .join .join-col > .stack-sm:last-child { margin-top: 28px; }
  .app-wide .sheet { left: 24px; right: auto; bottom: 24px; width: 420px; border-radius: 28px; }
  .app-wide .turn-card, .app-wide .banner { right: auto; width: 420px; left: 24px; }
  .app-wide .map-chip { left: calc(24px + 210px); }
  .overlay { align-items: center; }
  .overlay-card { border-radius: 28px; }
}

/* A phone on its side (car mounts): the details in a panel on the left, the map beside them. */
@media (orientation: landscape) and (max-height: 500px) {
  .app.app-wide { max-width: none; }
  .app-wide { --panel: min(320px, 42vw); --panel-left: max(8px, env(safe-area-inset-left, 0px)); --beside: calc(var(--panel-left) + var(--panel) + 8px); }
  .app-wide .sheet { left: var(--panel-left); right: auto; top: 8px; bottom: 8px; width: var(--panel); padding: 8px 14px 12px; gap: 8px; border-radius: 20px; overflow-y: auto; }
  .app-wide .sheet.collapsed { bottom: auto; padding-bottom: 8px; overflow: visible; }
  .app-wide .big-time { font-size: 34px; }
  .app-wide .play-btn { width: 44px; min-height: 44px; }
  .app-wide .turn-card:not(.watch-top) { left: var(--beside); right: max(72px, calc(env(safe-area-inset-right, 0px) + 66px)); top: 8px; padding: 8px 12px; gap: 10px; border-radius: 16px; }
  .app-wide .turn-card.watch-top { left: var(--beside); right: max(72px, calc(env(safe-area-inset-right, 0px) + 66px)); top: 8px; padding: 6px 10px; }
  .app-wide .turn-icon { flex-basis: 38px; height: 38px; border-radius: 12px; }
  .app-wide .turn-dist { font-size: 20px; }
  .app-wide .turn-name { font-size: 13px; }
  .app-wide .map-chip { left: calc(var(--beside) + (100vw - var(--beside)) / 2); top: 8px; }
  /* Messages along the bottom of the map, so the next turn stays readable. */
  .app-wide .banner { left: var(--beside); right: max(72px, calc(env(safe-area-inset-right, 0px) + 66px)); top: auto !important; bottom: 8px; padding: 8px 12px; }
  .app-wide .leaflet-bottom.leaflet-left { left: var(--beside); }
}
/* A short phone upright: the two map buttons side by side, clear of the turn card. */
@media (orientation: portrait) and (max-height: 700px) {
  .map-fabs { flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .menorah .m-flame.on { transform: none; opacity: 1; }
}
.banner-text.open { -webkit-line-clamp: unset; }
