/* SG Food Hunt website, revamp 2026-10-25.
   Identity: hawker-centre signage. Flat colour blocks (enamel cobalt, sambal orange, pandan mint, kaya yellow, pink),
   thick navy outlines and hard offset shadows like painted stall boards. A dark sidebar dock, a pinned full-height map,
   an asymmetric bento of totals and venue cards as order chits. Type: Unbounded (shouting display), Instrument Serif italic
   (the whisper), Hanken Grotesk (text), DM Mono (numbers and labels).
   Theme = html[data-theme], set before paint by the inline script in index.html; it follows the OS until the toggle is used.
   Motion is transform/opacity only and is switched off by the prefers-reduced-motion block at the very end. */
:root {
  --bg: #fbf3e4;
  --bg-2: #fffdf8;
  --bg-3: #f1e5cd;
  --ink: #15123b;
  --ink-2: #4a4670;
  --ink-3: #85809f;
  --line: #ddd2bc;
  --edge: #15123b;          /* outlines */
  --sh: #15123b;            /* hard shadows */
  --blue: #2437e8;
  --blue-ink: #ffffff;
  --accent: #ff5a1f;        /* sambal */
  --accent-ink: #15123b;
  --accent-soft: #ff5a1f1a;
  --mint: #8fe3b5;
  --pink: #ff9ec7;
  --kaya: #ffd23f;
  --kaya-soft: #ffd23f40;
  --block-ink: #15123b;     /* text on any coloured block, both themes */
  --good: #0e7a4d;
  --good-soft: #0e7a4d1a;
  --rail: #15123b;
  --rail-ink: #fbf3e4;
  --glow-a: #2437e826;
  --glow-b: #ffd23f40;
  --glow-c: #ff5a1f1c;
  --shadow: 0 24px 60px -24px rgb(21 18 59 / 0.45);
  --r: 16px;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rail-w: 164px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0b22;
  --bg-2: #171436;
  --bg-3: #231f4d;
  --ink: #f6f0e2;
  --ink-2: #c4bedb;
  --ink-3: #8a84ab;
  --line: #2f2a5c;
  --edge: #f6f0e2;
  --sh: #7b8bff;
  --blue: #7b8bff;
  --blue-ink: #0d0b22;
  --accent: #ff7a3d;
  --accent-soft: #ff7a3d26;
  --mint: #5ee0a0;
  --pink: #ff8fbf;
  --good: #5ee0a0;
  --good-soft: #5ee0a022;
  --kaya-soft: #ffd23f26;
  --rail: #1b1842;
  --rail-ink: #f6f0e2;
  --glow-a: #7b8bff22;
  --glow-b: #ffd23f14;
  --glow-c: #ff7a3d18;
  --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.9);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; font-family: var(--body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--kaya); color: var(--block-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ph, .ph-fill { vertical-align: -0.12em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ------------------------------------------------------------ page skeleton: dock | masthead + list | pinned map */
.app {
  display: grid; min-height: 100vh;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) minmax(340px, 36vw);
  grid-template-rows: auto 1fr;
  grid-template-areas: "rail mast map" "rail main map";
}
.rail { grid-area: rail; }
.mast { grid-area: mast; }
.main { grid-area: main; }
.mapcol { grid-area: map; }

.glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; will-change: transform; }
.glow span:nth-child(1) { left: -10vmax; top: -30vmax; background: radial-gradient(closest-side, var(--glow-a), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.glow span:nth-child(2) { right: 10vmax; top: -10vmax; background: radial-gradient(closest-side, var(--glow-b), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.glow span:nth-child(3) { left: 24vw; bottom: -40vmax; background: radial-gradient(closest-side, var(--glow-c), transparent); animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, 14vmax) scale(0.9); } }

/* ------------------------------------------------------------ dock (left rail) */
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; z-index: 30;
  display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 0.8rem 1rem;
  background: var(--rail); color: var(--rail-ink);
  border-right: 3px solid var(--edge);
  animation: dock-in 0.8s var(--ease) backwards;
}
.rail::-webkit-scrollbar { display: none; }
@keyframes dock-in { from { transform: translateX(-100%); } }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand b { font-family: var(--display); font-weight: 900; font-size: 0.95rem; line-height: 0.95; text-transform: uppercase; letter-spacing: -0.02em; }
.brand .mark {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 1.6rem;
  background: var(--accent); color: var(--block-ink); border: 2px solid var(--rail-ink);
  transition: transform 0.5s var(--spring);
}
.brand:hover .mark { transform: rotate(-18deg) scale(1.1); }
.groups { display: flex; flex-direction: column; gap: 0.2rem; margin: 0; padding: 0; list-style: none; flex: 1; }
.groups button {
  width: 100%; display: flex; align-items: center; gap: 0.55rem; min-height: 42px; padding: 0.35rem 0.6rem; text-align: left;
  border-radius: 12px; border: 2px solid transparent; background: transparent; color: var(--rail-ink);
  font-size: 0.85rem; font-weight: 600; line-height: 1.15; opacity: 0.82;
  transition: transform 0.25s var(--spring), background 0.2s, opacity 0.2s;
}
.groups button .ph, .groups button .ph-fill { font-size: 1.15rem; flex: none; transition: transform 0.4s var(--spring); }
/* Category / Cuisine switch at the top of the sidebar */
.groups .by { display: flex; gap: 0.2rem; padding: 0.2rem; margin-bottom: 0.4rem; border-radius: 14px; background: rgb(255 255 255 / 0.08); }
.groups .by button { flex: 1; justify-content: center; min-height: 32px; padding: 0.25rem 0.4rem; font-size: 0.75rem; text-align: center; }
.groups .by button:hover, .groups .by button[aria-pressed="true"] { transform: none; }
.groups .by button[aria-pressed="true"] { box-shadow: none; }
.groups button:hover { opacity: 1; background: rgb(255 255 255 / 0.1); transform: translateX(4px); }
.groups button:hover .ph { transform: rotate(-14deg) scale(1.2); }
.groups button:active { transform: scale(0.97); }
.groups button[aria-pressed="true"] { background: var(--kaya); color: var(--block-ink); opacity: 1; transform: translateX(4px); box-shadow: -4px 4px 0 var(--accent); }
.groups button .n { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; font-weight: 500; opacity: 0.7; font-variant-numeric: tabular-nums; }
.groups li { animation: rise 0.6s var(--ease) backwards; }
.groups li:nth-child(1) { animation-delay: 0.35s; } .groups li:nth-child(2) { animation-delay: 0.4s; } .groups li:nth-child(3) { animation-delay: 0.45s; }
.groups li:nth-child(4) { animation-delay: 0.5s; } .groups li:nth-child(5) { animation-delay: 0.55s; } .groups li:nth-child(6) { animation-delay: 0.6s; }
.groups li:nth-child(7) { animation-delay: 0.65s; } .groups li:nth-child(8) { animation-delay: 0.7s; } .groups li:nth-child(n+9) { animation-delay: 0.75s; }
.rail-foot { display: flex; align-items: center; gap: 0.5rem; }
.rail .promos-link {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 40px; padding: 0 0.6rem;
  border-radius: 999px; background: var(--pink); color: var(--block-ink); text-decoration: none; font-weight: 700; font-size: 0.85rem;
  transition: transform 0.25s var(--spring);
}
.rail .promos-link:hover { transform: translateY(-2px) rotate(-2deg); }
.rail .promos-link[data-count]::after { content: attr(data-count); font-family: var(--mono); font-size: 0.72rem; background: var(--block-ink); color: var(--pink); border-radius: 999px; padding: 0 0.45rem; line-height: 1.5; }
.rail .promos-link[data-count="0"] { display: none; }
.theme-btn {
  position: relative; width: 40px; height: 40px; flex: none; margin-left: auto; border-radius: 50%; border: 2px solid var(--rail-ink);
  background: transparent; color: var(--rail-ink); overflow: hidden; font-size: 1.2rem; display: grid; place-items: center;
  transition: transform 0.4s var(--spring);
}
.theme-btn:hover { transform: rotate(25deg) scale(1.08); }
.theme-btn .ph { position: absolute; transition: transform 0.5s var(--spring), opacity 0.3s; }
:root[data-theme="light"] .theme-btn .ph-moon { transform: translateY(160%) rotate(-70deg); opacity: 0; }
:root[data-theme="dark"] .theme-btn .ph-sun { transform: translateY(-160%) rotate(70deg); opacity: 0; }
:root[data-theme="light"] .theme-btn .ph-sun { color: var(--kaya); }
:root[data-theme="dark"] .theme-btn .ph-moon { color: var(--kaya); }

/* ------------------------------------------------------------ masthead */
.mast { padding: 2.2rem 2.4rem 1.2rem; }
.eyebrow { margin: 0 0 1rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.8rem 0.25rem 0.55rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--mint); color: var(--block-ink); font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; animation: pop 0.6s var(--spring) 0.2s backwards; }
.eyebrow .ph-fill { color: var(--accent); font-size: 1rem; }
.mast h1 {
  padding-top: 0.15em; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.92;
  font-size: clamp(2.3rem, 4.5vw, 4.4rem); margin: 0 0 1.2rem;
}
.mast h1 .w { display: inline-block; animation: word 0.9s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 100ms + 150ms); }
.mast h1 em {
  display: block; position: relative; width: max-content; max-width: 100%;
  font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -0.02em;
  font-size: 1.35em; line-height: 0.95; color: var(--accent); margin-top: 0.06em; padding-bottom: 0.14em;
}
.mast h1 em::after { /* hand-drawn underline that wipes in */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.14em; background: var(--kaya); border-radius: 99px;
  transform-origin: left; transform: rotate(-1.2deg); animation: wipe 0.9s var(--ease) 0.9s backwards;
}
@keyframes word { from { opacity: 0; transform: translateY(0.7em) rotate(6deg) scale(0.9); } }
@keyframes wipe { from { transform: rotate(-1.2deg) scaleX(0); } }
.mast-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin: 0 0 1.2rem; }
.mast p { margin: 0; }
#lede { color: var(--ink-2); font-size: 1.05rem; max-width: 40ch; }
.fresh { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.74rem; padding: 0.3rem 0.8rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--bg-2); }
.fresh i { width: 9px; height: 9px; border-radius: 50%; background: var(--good); position: relative; flex: none; }
.fresh i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.2s ease-out infinite; }
.fresh.old i { background: var(--kaya); }
.fresh.stale i { background: var(--accent); }
@keyframes ping { from { transform: scale(1); opacity: 0.7; } to { transform: scale(3.4); opacity: 0; } }
.search { display: block; position: relative; max-width: 34rem; animation: rise 0.7s var(--ease) 0.5s backwards; }
.search input {
  width: 100%; height: 56px; padding: 0 1.4rem 0 3.2rem; border: 2px solid var(--edge); border-radius: 999px; background: var(--bg-2);
  font-size: 1.02rem; font-weight: 500; box-shadow: 4px 4px 0 var(--sh);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--accent); }
.search .ph { position: absolute; left: 1.2rem; top: 50%; translate: 0 -50%; font-size: 1.3rem; pointer-events: none; }

/* ------------------------------------------------------------ main column */
.main { padding: 0.4rem 2.4rem 3rem; min-width: 0; }

/* bento of totals */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: 0.8rem; margin: 0 0 1rem; padding: 0; list-style: none; min-height: 210px; }
.stats li { display: flex; animation: pop 0.7s var(--spring) backwards; }
.stats .t-places { grid-column: 1 / 5; grid-row: 1 / 3; animation-delay: 0.45s; }
.stats .t-worth { grid-column: 5 / 7; animation-delay: 0.55s; }
.stats .t-new { grid-column: 5 / 6; animation-delay: 0.65s; }
.stats .t-mich { grid-column: 6 / 7; animation-delay: 0.75s; }
.stats button {
  position: relative; flex: 1; width: 100%; text-align: left; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.8rem 1rem 0.75rem; border-radius: 22px; border: 2px solid var(--edge); color: var(--block-ink);
  box-shadow: 5px 5px 0 var(--sh); transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring);
}
.stats button:hover { transform: translate(-3px, -3px) rotate(-0.6deg); box-shadow: 8px 8px 0 var(--sh); }
.stats button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--sh); }
.stats button[aria-expanded="true"] { box-shadow: 8px 8px 0 var(--accent); }
.stats button::after { content: "?"; position: absolute; right: 0.7rem; top: 0.6rem; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; opacity: 0.7; }
.stats b { display: block; font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 0.95; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }
.stats .t-places button { background: var(--blue); color: var(--blue-ink); }
.stats .t-places b { font-size: clamp(4.5rem, 8.5vw, 8rem); letter-spacing: -0.07em; }
.stats .t-places span { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.4rem; }
.stats .t-worth button { background: var(--mint); }
.stats .t-worth b { font-size: 2.8rem; }
.stats .t-new button { background: var(--accent); }
.stats .t-mich button { background: var(--rail); color: var(--rail-ink); }
.stats .t-mich b { color: var(--kaya); }
.how { margin: 0 0 1.2rem; padding: 0.8rem 1rem; border-radius: 16px; background: var(--kaya); color: var(--block-ink); border: 2px solid var(--edge); font-size: 0.9rem; font-weight: 500; animation: pop 0.45s var(--spring); transform-origin: 20% 0; }
.how small { display: block; margin-top: 0.35rem; font-family: var(--mono); font-size: 0.72rem; opacity: 0.75; }

/* dish ribbon: a stall sign that scrolls forever (decorative) */
.ribbon { margin: 1.6rem -2.4rem 2rem; padding: 0.5rem 0; overflow: hidden; background: var(--kaya); color: var(--block-ink); border-block: 3px solid var(--edge); transform: rotate(-1.2deg); }
.ribbon .track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.ribbon span { font-family: var(--display); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; padding-right: 1.6rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 1.6rem; }
.ribbon span::after { content: ""; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; border: 2px solid var(--block-ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* since the last run: stickers */
.changes { margin: 0 0 2.2rem; }
.changes h2 { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 0.7rem; display: flex; gap: 0.5rem; align-items: center; }
.changes h2 .ph-fill { color: var(--accent); }
.changes ul { list-style: none; margin: 0; padding: 0 0.5rem 0.9rem 0; display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x proximity; }
.changes li { scroll-snap-align: start; flex: 0 0 auto; animation: pop 0.6s var(--spring) backwards; }
.changes li:nth-child(2) { animation-delay: 0.06s; } .changes li:nth-child(3) { animation-delay: 0.12s; } .changes li:nth-child(4) { animation-delay: 0.18s; } .changes li:nth-child(n+5) { animation-delay: 0.24s; }
.changes li:nth-child(4n+1) button { background: var(--pink); } .changes li:nth-child(4n+2) button { background: var(--mint); }
.changes li:nth-child(4n+3) button { background: var(--kaya); } .changes li:nth-child(4n+4) button { background: var(--accent); }
.changes button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; text-align: left; color: var(--block-ink);
  min-width: 210px; max-width: 270px; padding: 0.8rem 1rem; border-radius: 18px; border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--sh);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring);
}
.changes li:nth-child(odd) button { transform: rotate(-1.2deg); } .changes li:nth-child(even) button { transform: rotate(1deg); }
.changes button:hover { transform: translate(-3px, -3px) rotate(0deg); box-shadow: 7px 7px 0 var(--sh); }
.changes button b { font-family: var(--display); font-weight: 700; font-size: 0.92rem; line-height: 1.2; letter-spacing: -0.02em; }
.changes button small { font-weight: 600; opacity: 0.8; }

/* list header, tabs, filters */
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1rem; }
.list-head h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; font-size: clamp(1.9rem, 3.4vw, 3.2rem); line-height: 0.95; margin: 0; }
.list-head h2.swap { animation: slam 0.55s var(--spring); }
@keyframes slam { from { opacity: 0; transform: translateY(0.4em) scale(1.06); } }
.list-head .count { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--kaya); color: var(--block-ink); border: 2px solid var(--edge); transform: rotate(-3deg); font-variant-numeric: tabular-nums; }
.worth-chip { display: inline-flex; align-items: center; gap: 0.4rem; height: 36px; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--bg-2); color: var(--ink); font-weight: 700; font-size: 0.88rem; transition: transform 0.25s var(--spring), background 0.2s; }
.worth-chip .ph-fill { color: var(--good); font-size: 1.1rem; }
.worth-chip:hover { transform: translateY(-2px) rotate(-1.5deg); }
.worth-chip[aria-pressed="true"] { background: var(--mint); color: var(--block-ink); }
.worth-chip[aria-pressed="true"] .ph-fill { color: var(--block-ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tabs button { height: 38px; padding: 0 1rem; border-radius: 12px; border: 2px solid transparent; background: transparent; color: var(--ink-2); font-weight: 600; transition: transform 0.25s var(--spring), background 0.2s, color 0.2s; }
.tabs button:hover { transform: translateY(-2px); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabs li { animation: rise 0.45s var(--ease) backwards; }
.tabs li:nth-child(2) { animation-delay: 0.04s; } .tabs li:nth-child(3) { animation-delay: 0.08s; } .tabs li:nth-child(4) { animation-delay: 0.12s; } .tabs li:nth-child(n+5) { animation-delay: 0.16s; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; margin: 0 0 1.6rem; padding: 0.7rem 1rem; border-radius: 18px; background: var(--bg-2); border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--sh); }
.filters label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.filters select, .filters input[type="text"] { height: 34px; padding: 0 0.7rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--bg); color: var(--ink); font-weight: 600; }
.filters input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.filters .reset { margin-left: auto; height: 34px; padding: 0 0.9rem; border-radius: 999px; border: 2px solid transparent; background: transparent; color: var(--ink-3); font-weight: 600; }
.filters .reset:hover { border-color: var(--edge); color: var(--ink); }

/* near me */
.near-form, .near-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 1.2rem; padding: 0.8rem 1rem; border-radius: 18px; border: 2px solid var(--edge); background: var(--pink); color: var(--block-ink); box-shadow: 4px 4px 0 var(--sh); }
.near-form[hidden], .near-bar[hidden] { display: none; }
.near-form label { font-weight: 700; }
.near-form input, .near-bar select { height: 38px; padding: 0 0.8rem; border-radius: 999px; border: 2px solid var(--block-ink); background: #fffdf8; color: #15123b; min-width: 0; }
.near-form input { flex: 1 1 14rem; }
.near-form button, .near-bar button { height: 38px; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--block-ink); background: var(--block-ink); color: #fffdf8; font-weight: 700; }
.near-form button.ghost, .near-bar button.ghost { background: transparent; color: var(--block-ink); }
.near-form small { color: var(--block-ink); flex-basis: 100%; }
.near-form ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; flex-basis: 100%; }
.near-form ul button { background: #fffdf8; color: #15123b; font-weight: 600; }
.near-bar span { font-weight: 700; margin-right: auto; }
.row .meta .dist { color: var(--accent); font-weight: 700; }
.row .meta .best { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------ venue cards (order chits) */
.rows { list-style: none; margin: 0; padding: 0 8px 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); gap: 1.3rem 1.1rem; }
.rows:empty { min-height: 160px; border-radius: 22px; background: var(--bg-2); border: 2px dashed var(--ink-3); animation: breathe 1.3s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: 0.3; } to { opacity: 0.85; } }
.rows > li { position: relative; display: flex; }
.rows > li::before { content: ""; position: absolute; inset: 0; border-radius: 22px; background: var(--sh); transform: translate(6px, 6px); }
.rows > li:nth-child(5n+1) { --c: var(--blue); --c-ink: var(--blue-ink); }
.rows > li:nth-child(5n+2) { --c: var(--accent); --c-ink: var(--block-ink); }
.rows > li:nth-child(5n+3) { --c: var(--mint); --c-ink: var(--block-ink); }
.rows > li:nth-child(5n+4) { --c: var(--pink); --c-ink: var(--block-ink); }
.rows > li:nth-child(5n+5) { --c: var(--kaya); --c-ink: var(--block-ink); }
.rows > li:has(.row[data-rank="1"]), .rows > li:has(.row[data-rank="2"]), .rows > li:has(.row[data-rank="3"]) { grid-column: 1 / -1; }
.js .rows > li:not(.in) { opacity: 0; transform: translateY(28px) rotate(1.6deg) scale(0.97); }
.js .rows > li { transition: opacity 0.6s var(--ease), transform 0.7s var(--spring); }
.row {
  position: relative; z-index: 1; flex: 1; width: 100%; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rank side" "body body"; gap: 0.7rem 0.8rem; align-content: start; align-items: start;
  padding: 1rem 1.1rem 1.05rem; border-radius: 22px; border: 2px solid var(--edge); background: var(--bg-2); text-align: left;
  transition: transform 0.3s var(--spring);
}
.row::after { /* colour wash that climbs the card on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: var(--c, var(--blue)); opacity: 0;
  transform: scaleY(0.15); transform-origin: bottom; transition: transform 0.45s var(--ease), opacity 0.3s; pointer-events: none;
}
.row:hover { transform: translate(-4px, -4px); }
.row:hover::after { opacity: 0.2; transform: none; }
.row:active { transform: translate(2px, 2px); }
.row .rank {
  grid-area: rank; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: var(--c, var(--blue)); color: var(--c-ink, var(--blue-ink)); border: 2px solid var(--edge);
  font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: -0.06em; line-height: 1; font-variant-numeric: tabular-nums;
  transition: transform 0.5s var(--spring);
}
.row:hover .rank { transform: rotate(-14deg) scale(1.14); }
.row .rank small { display: block; font: 500 0.5rem var(--mono) !important; letter-spacing: 0; color: inherit !important; margin-top: 0.1rem; max-width: 3rem; overflow: hidden; text-overflow: ellipsis; }
.row > span:nth-child(2) { grid-area: body; min-width: 0; }
.row .name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.035em; line-height: 1.15; margin: 0; }
.row .name .zh { display: block; font-family: var(--body); font-weight: 600; font-size: 0.88rem; letter-spacing: 0; color: var(--ink-2); margin: 0.2rem 0 0; }
.row .meta { color: var(--ink-2); font-size: 0.86rem; margin: 0.55rem 0 0.45rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.row .meta .ph { color: var(--ink-3); margin-right: 0.15rem; }
.row .dishes { margin: 0.4rem 0 0; color: var(--ink-2); font-size: 0.84rem; display: flex; gap: 0.4rem; align-items: baseline; }
.row .dishes i { color: var(--accent); flex: none; }
.row .summary { margin: 0; color: var(--ink-2); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .side { grid-area: side; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; max-width: 12rem; text-align: right; }
.row .side .why { color: var(--ink-3); font-size: 0.74rem; line-height: 1.25; font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1.5px solid var(--edge); color: var(--ink); white-space: nowrap; }
.badges .badge { animation: pop 0.55s var(--spring) backwards; }
.badges .badge:nth-child(2) { animation-delay: 0.07s; } .badges .badge:nth-child(3) { animation-delay: 0.14s; } .badges .badge:nth-child(n+4) { animation-delay: 0.21s; }
.badge.worth, .badge.nope { text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.66rem; padding: 0.22rem 0.6rem; }
.badge.worth { background: var(--mint); color: var(--block-ink); border-width: 2px; transform: rotate(-3deg); animation: stamp 0.6s var(--spring) 0.3s backwards; }
.badge.worth .ph-fill { color: var(--block-ink); }
.badge.nope { background: transparent; color: var(--ink-3); border: 2px dashed var(--ink-3); transform: rotate(2deg); animation: stamp 0.6s var(--spring) 0.3s backwards; }
@keyframes stamp { from { opacity: 0; transform: scale(2.2) rotate(-16deg); } }
.badge.new { background: var(--accent); color: var(--block-ink); }
/* Michelin: restrained on purpose. A plain ink enamel pin with a thin gold ring; no shine, no motion of its own. */
.badge.mich { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--kaya); margin: 0 0.2rem; }
.badge.mich .ph-fill { color: var(--kaya); }
.badge.promo { background: var(--pink); color: var(--block-ink); }
/* the top three of any list get the wide magazine treatment */
.rows > li:has(.row[data-rank="1"]) .row, .rows > li:has(.row[data-rank="2"]) .row, .rows > li:has(.row[data-rank="3"]) .row {
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "rank body side"; gap: 1.2rem; padding: 1.3rem 1.4rem; background: color-mix(in srgb, var(--c) 14%, var(--bg-2));
}
.rows > li:has(.row[data-rank="1"]) .rank, .rows > li:has(.row[data-rank="2"]) .rank, .rows > li:has(.row[data-rank="3"]) .rank { width: 5.4rem; height: 5.4rem; font-size: 2.3rem; }
.rows > li:has(.row[data-rank="1"]) .name, .rows > li:has(.row[data-rank="2"]) .name, .rows > li:has(.row[data-rank="3"]) .name { font-size: 1.5rem; }
.rows > li:has(.row[data-rank="1"]) .side, .rows > li:has(.row[data-rank="2"]) .side, .rows > li:has(.row[data-rank="3"]) .side { padding-top: 0.2rem; }

.more { display: block; margin: 2rem auto 0; height: 52px; padding: 0 2rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--kaya); color: var(--block-ink); font-weight: 800; box-shadow: 4px 4px 0 var(--sh); transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring); }
.more:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--sh); }
.more:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--sh); }
.empty { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; color: var(--ink-2); border: 2px dashed var(--ink-3); border-radius: 22px; }
.empty b { font-family: var(--display); font-weight: 800; display: block; font-size: 1.4rem; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 0.3rem; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }

/* ------------------------------------------------------------ promos view */
.deals { list-style: none; margin: 0; padding: 0 8px 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.2rem 1rem; }
.deals li { animation: pop 0.6s var(--spring) backwards; }
.deals li:nth-child(2) { animation-delay: 0.06s; } .deals li:nth-child(3) { animation-delay: 0.12s; } .deals li:nth-child(n+4) { animation-delay: 0.18s; }
.deals li:nth-child(3n+1) .deal { background: var(--pink); } .deals li:nth-child(3n+2) .deal { background: var(--kaya); } .deals li:nth-child(3n+3) .deal { background: var(--mint); }
.deal { width: 100%; height: 100%; padding: 1rem 1.1rem; border-radius: 20px; border: 2px solid var(--edge); color: var(--block-ink); box-shadow: 5px 5px 0 var(--sh); display: grid; gap: 0.3rem; text-align: left; transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring); }
.deal:hover { transform: translate(-3px, -3px) rotate(-0.8deg); box-shadow: 8px 8px 0 var(--sh); }
.deal b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em; }
.deal small { opacity: 0.75; font-weight: 600; }
.deal a { color: inherit; }

/* ------------------------------------------------------------ pinned map */
.mapcol { position: sticky; top: 0; height: 100vh; align-self: start; border-left: 3px solid var(--edge); z-index: 10; }
.map-wrap { position: relative; height: 100%; background: var(--bg-3); isolation: isolate; animation: reveal 1s var(--ease) 0.2s backwards; }
@keyframes reveal { from { opacity: 0; transform: scale(1.08); } }
#map { position: absolute; inset: 0; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(0.78) saturate(0.9); }
.map-note { position: absolute; left: 3.6rem; top: 0.8rem; z-index: 500; background: var(--kaya); color: var(--block-ink); border: 2px solid var(--edge); border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.74rem; font-weight: 500; font-family: var(--mono); }
.leaflet-container { font: inherit; background: var(--bg-3); cursor: zoom-in; }
.map-wrap.expanded .leaflet-container { cursor: grab; }
.leaflet-container.picking, .map-wrap.expanded .leaflet-container.picking { cursor: crosshair; }
.map-wrap.expanded { position: fixed; inset: 0; z-index: 45; height: auto; animation: none; }
body.map-open { overflow: hidden; }
.map-tools { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 500; display: flex; gap: 0.4rem; }
.map-tools button { display: inline-flex; align-items: center; gap: 0.35rem; height: 38px; padding: 0 0.9rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--bg-2); color: var(--ink); font-weight: 700; font-size: 0.85rem; box-shadow: 3px 3px 0 var(--sh); transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring); }
.map-tools button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sh); }
.map-tools button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sh); }
.map-tools button:disabled { opacity: 0.6; }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--bg-2) 88%, transparent) !important; color: var(--ink-2) !important; }
.leaflet-control-attribution a { color: inherit !important; }
.leaflet-control-layers { background: var(--bg-2) !important; color: var(--ink) !important; border: 2px solid var(--edge) !important; border-radius: 14px !important; box-shadow: 3px 3px 0 var(--sh) !important; font-size: 0.8rem; }
.leaflet-control-layers-expanded { padding: 0.3rem 0.6rem !important; }
.leaflet-control-layers label { display: inline-flex; align-items: center; gap: 0.25rem; margin-right: 0.5rem; }
.leaflet-control-layers-base { display: flex; }
.leaflet-bar { border: 2px solid var(--edge) !important; border-radius: 12px !important; box-shadow: 3px 3px 0 var(--sh) !important; overflow: hidden; }
.leaflet-bar a { background: var(--bg-2) !important; color: var(--ink) !important; border-color: var(--edge) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg-2); color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: 16px; border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--sh); }
.leaflet-popup-content { margin: 0.75rem 1rem; font-size: 0.9rem; }
.leaflet-popup-content b { font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: -0.03em; }
.leaflet-popup-content a { color: var(--blue); font-weight: 700; }
/* pins: round stall tokens; a hovered card pings its pin */
.pin { position: relative; background: var(--accent); border: 2.5px solid #15123b; border-radius: 999px; width: 100%; height: 100%; animation: pop 0.55s var(--spring) var(--d, 0ms) backwards; }
.pin.dim { background: #9a95b8; }
.pin.hot { background: var(--kaya); transform: scale(1.6); z-index: 5; transition: transform 0.25s var(--spring); }
.pin.hot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--kaya); animation: ping 1.1s ease-out infinite; }
.pin.me { background: #2f7de1; border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(47 125 225 / 0.25); animation: none; }

/* ------------------------------------------------------------ detail drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(580px, 100%); z-index: 40; background: var(--bg-2);
  border-left: 3px solid var(--edge); box-shadow: -12px 0 0 var(--sh);
  overflow-y: auto; transform: translateX(105%); transition: transform 0.5s var(--ease); visibility: hidden;
}
.drawer[open] { transform: none; visibility: visible; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgb(13 11 34 / 0.55); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer .close { position: sticky; top: 0.75rem; float: right; margin: 0.75rem 0.75rem 0 0; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); background: var(--kaya); color: var(--block-ink); z-index: 2; display: grid; place-items: center; font-size: 1.2rem; transition: transform 0.4s var(--spring); }
.drawer .close:hover { transform: rotate(90deg) scale(1.1); }
.drawer .photo { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-3); border-bottom: 3px solid var(--edge); }
.drawer .photo-note { position: absolute; top: 0.7rem; left: 0.7rem; font-size: 0.72rem; font-family: var(--mono); background: var(--bg-2); border: 2px solid var(--edge); padding: 0.1rem 0.5rem; border-radius: 99px; }
.drawer .photo-wrap { position: relative; }
.drawer .body { padding: 1.4rem 1.6rem 2.4rem; }
.drawer[open] .body > * { animation: rise 0.6s var(--ease) backwards; }
.drawer[open] .body > :nth-child(1) { animation-delay: 0.15s; } .drawer[open] .body > :nth-child(2) { animation-delay: 0.2s; }
.drawer[open] .body > :nth-child(3) { animation-delay: 0.25s; } .drawer[open] .body > :nth-child(4) { animation-delay: 0.3s; }
.drawer[open] .body > :nth-child(5) { animation-delay: 0.35s; } .drawer[open] .body > :nth-child(6) { animation-delay: 0.4s; }
.drawer[open] .body > :nth-child(7) { animation-delay: 0.45s; } .drawer[open] .body > :nth-child(n+8) { animation-delay: 0.5s; }
.drawer h2 { font-family: var(--display); font-weight: 900; letter-spacing: -0.05em; text-transform: uppercase; font-size: 1.9rem; line-height: 0.98; margin: 0 0 0.6rem; }
.drawer h2 .zh { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; font-size: 1.5rem; color: var(--accent); letter-spacing: 0; margin-top: 0.3rem; }
.drawer .verdict { display: flex; align-items: center; gap: 0.5rem; margin: 0.9rem 0 1rem; font-weight: 700; font-size: 1.05rem; }
.drawer .verdict .ph-fill { font-size: 1.6rem; animation: stamp 0.7s var(--spring) 0.4s backwards; }
.drawer .verdict.good { color: var(--good); }
.drawer .verdict.bad { color: var(--ink-2); }
.drawer .verdict small { font-weight: 500; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.4rem; align-items: start; font-size: 0.95rem; }
.facts li .ph { color: var(--accent); font-size: 1.15rem; }
.facts li span { word-break: break-word; }
.facts li.wide { grid-column: 1 / -1; }
.facts code { font-family: var(--mono); font-size: 0.85rem; background: var(--bg-3); padding: 0.1rem 0.4rem; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.5rem; }
.actions a, .actions button { display: inline-flex; align-items: center; gap: 0.4rem; height: 46px; padding: 0 1.2rem; border-radius: 999px; border: 2px solid var(--edge); background: var(--bg-2); text-decoration: none; font-weight: 700; white-space: nowrap; box-shadow: 3px 3px 0 var(--sh); transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring); }
.actions a:hover, .actions button:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--sh); }
.actions a:active, .actions button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sh); }
.actions a.primary { background: var(--accent); color: var(--block-ink); }
.drawer h3 { font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); margin: 1.8rem 0 0.7rem; padding-bottom: 0.4rem; border-bottom: 3px solid var(--kaya); display: inline-block; }
.drawer p { margin: 0 0 0.5rem; }
.drawer .promo-box { border: 2px solid var(--edge); background: var(--pink); color: var(--block-ink); border-radius: 18px; padding: 0.8rem 1rem; margin: 1rem 0; box-shadow: 4px 4px 0 var(--sh); }
.drawer .promo-box b { color: inherit; }
.drawer .promo-box a { color: inherit; font-weight: 700; }
.hours { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hours td { padding: 0.3rem 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.hours td:first-child { width: 3.2rem; color: var(--ink-2); font-family: var(--mono); font-size: 0.8rem; padding-top: 0.4rem; }
.hours tr.today td { font-weight: 700; color: var(--ink); }
.hours tr.today td:first-child { color: var(--accent); }
.score { display: grid; gap: 0.6rem; }
.score div { display: grid; grid-template-columns: 9rem 1fr 3rem; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.score span:first-child { color: var(--ink-2); text-transform: capitalize; font-weight: 600; }
.score i { display: block; height: 14px; background: var(--c-bar, var(--blue)); border: 2px solid var(--edge); border-radius: 99px; transform-origin: left; animation: grow 1s var(--spring) 0.55s backwards; }
.score div:nth-child(5n+1) i { --c-bar: var(--blue); } .score div:nth-child(5n+2) i { --c-bar: var(--accent); } .score div:nth-child(5n+3) i { --c-bar: var(--mint); }
.score div:nth-child(5n+4) i { --c-bar: var(--pink); } .score div:nth-child(5n+5) i { --c-bar: var(--kaya); }
.score div:nth-child(2) i { animation-delay: 0.62s; } .score div:nth-child(3) i { animation-delay: 0.69s; } .score div:nth-child(4) i { animation-delay: 0.76s; }
.score div:nth-child(5) i { animation-delay: 0.83s; } .score div:nth-child(n+6) i { animation-delay: 0.9s; }
@keyframes grow { from { transform: scaleX(0); } } /* the inline transform: scaleX(share) is where it ends */
.score span:last-child { font-family: var(--mono); color: var(--ink-3); text-align: right; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sources li { font-size: 0.9rem; }
.sources a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--kaya); text-decoration-thickness: 3px; text-underline-offset: 3px; font-weight: 600; }
.sources a:hover { text-decoration-color: var(--accent); }
.sources small { color: var(--ink-3); margin-left: 0.4rem; font-family: var(--mono); font-size: 0.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span { font-size: 0.82rem; font-weight: 600; padding: 0.2rem 0.7rem; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--bg-2); animation: pop 0.5s var(--spring) 0.45s backwards; }
.chips span:nth-child(2) { animation-delay: 0.5s; } .chips span:nth-child(3) { animation-delay: 0.55s; } .chips span:nth-child(4) { animation-delay: 0.6s; } .chips span:nth-child(n+5) { animation-delay: 0.65s; }
.chips span:nth-child(3n+1) { background: var(--kaya-soft); } .chips span:nth-child(3n+2) { background: var(--accent-soft); }

/* venue video */
.drawer .video { margin: 1rem 0; border: 2px solid var(--edge); border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: 4px 4px 0 var(--sh); }
.drawer .video .vplay, .drawer .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; position: relative; background: #000; }
.drawer .video .vplay img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.2s, transform 0.4s; }
.drawer .video .vplay:hover img { opacity: 0.85; transform: scale(1.03); }
.drawer .video .vplay { overflow: hidden; cursor: pointer; }
.drawer .video .vplay .ph-play-circle { position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; font-size: 4rem; color: #fff; filter: drop-shadow(0 2px 10px rgb(0 0 0 / 0.5)); }
.drawer .video .vplay:focus-visible { outline: 3px solid var(--kaya); outline-offset: -3px; }
.drawer .video figcaption { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; font-size: 0.85rem; line-height: 1.3; }
.drawer .video figcaption > .ph { color: var(--accent); font-size: 1.4rem; flex: none; }
.drawer .video figcaption span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; }
.drawer .video figcaption small { display: block; font-weight: 400; color: var(--ink-3); }
.drawer .video figcaption a { flex: none; color: var(--blue); font-weight: 700; text-decoration: none; }

/* footer */
footer { margin: 4rem 0 0; padding-top: 1.4rem; border-top: 3px dotted var(--ink-3); color: var(--ink-2); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
footer a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; text-decoration-color: var(--kaya); text-decoration-thickness: 2px; }
footer a:hover { text-decoration-color: var(--accent); }
footer code { font-family: var(--mono); }

/* theme switch: the browser cross-fades the old and new page */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.5s; }

/* ------------------------------------------------------------ narrower screens (after the desktop rules on purpose: a later desktop rule would beat these) */
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--rail-w) minmax(0, 1fr) minmax(300px, 34vw); }
  .mast, .main { padding-inline: 1.6rem; }
  .ribbon { margin-inline: -1.6rem; }
  .stats .t-places b { font-size: clamp(3.6rem, 7vw, 6rem); }
}
@media (max-width: 900px) {
  .app { display: block; }
  .rail {
    position: sticky; top: 0; height: 64px; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0 0.9rem;
    overflow: visible; border-right: 0; border-bottom: 3px solid var(--edge); animation: none;
  }
  .brand b { font-size: 0.9rem; line-height: 1; } .brand b br { display: none; }
  .brand .mark { width: 40px; height: 40px; font-size: 1.4rem; }
  .rail-foot { margin-left: auto; }
  .rail .promos-link { flex: none; height: 40px; }
  .rail .promos-link span { display: none; }
  /* lists become a bottom dock you can scroll sideways */
  .groups {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; flex-direction: row; gap: 0.3rem; padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
    overflow-x: auto; scrollbar-width: none; background: var(--rail); border-top: 3px solid var(--edge); animation: dock-up 0.7s var(--ease) 0.3s backwards;
  }
  .groups::-webkit-scrollbar { display: none; }
  @keyframes dock-up { from { transform: translateY(100%); } }
  .groups li { flex: none; animation: none; }
  .groups button { flex-direction: column; justify-content: center; gap: 0.15rem; width: auto; min-width: 72px; min-height: 54px; padding: 0.35rem 0.7rem; text-align: center; font-size: 0.66rem; white-space: nowrap; }
  .groups button:hover, .groups button[aria-pressed="true"] { transform: none; }
  .groups button[aria-pressed="true"] { box-shadow: none; }
  .groups button .ph, .groups button .ph-fill { font-size: 1.3rem; }
  .groups button .n { display: none; }
  .groups .by { flex-direction: column; margin: 0; }
  .groups .by button { min-width: 64px; min-height: 0; flex: 1; font-size: 0.66rem; }
  .mast { padding: 1.4rem 1rem 0.8rem; }
  .mast h1 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .main { padding: 0.4rem 1rem 6.5rem; }
  .ribbon { margin-inline: -1rem; }
  .mapcol { position: relative; height: 320px; margin: 0.4rem 1rem 1.2rem; border: 2px solid var(--edge); border-radius: 24px; overflow: hidden; box-shadow: 5px 5px 0 var(--sh); }
  .map-wrap.expanded { border-radius: 0; }
  .map-wrap.expanded { position: fixed; }
  .stats { min-height: 0; grid-template-rows: auto; }
  .stats .t-places { grid-column: 1 / -1; grid-row: auto; min-height: 150px; }
  .stats .t-worth { grid-column: 1 / 4; } .stats .t-new { grid-column: 4 / 5; } .stats .t-mich { grid-column: 5 / 7; }
  .stats .t-worth b { font-size: 2.2rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; }
  .tabs button { white-space: nowrap; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters label, .filters .reset { flex: none; white-space: nowrap; }
  .facts { grid-template-columns: 1fr; }
  .drawer { inset: auto 0 0 0; width: 100%; max-height: 92dvh; border-left: 0; border-top: 3px solid var(--edge); box-shadow: 0 -8px 0 var(--sh); border-radius: 26px 26px 0 0; transform: translateY(105%); }
  .drawer[open] { transform: none; }
  .drawer .close { top: 0.5rem; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .t-worth { grid-column: 1 / 2; } .stats .t-new { grid-column: 2 / 3; } .stats .t-mich { grid-column: 1 / -1; }
  .stats .t-mich button { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 0.6rem; }
  .rows { grid-template-columns: 1fr; padding-right: 6px; }
  .rows > li:has(.row[data-rank="1"]) .row, .rows > li:has(.row[data-rank="2"]) .row, .rows > li:has(.row[data-rank="3"]) .row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rank side" "body body"; gap: 0.7rem 0.8rem; padding: 1rem 1.1rem 1.05rem; }
  .rows > li:has(.row[data-rank="1"]) .rank, .rows > li:has(.row[data-rank="2"]) .rank, .rows > li:has(.row[data-rank="3"]) .rank { width: 4.2rem; height: 4.2rem; font-size: 1.7rem; }
  .rows > li:has(.row[data-rank="1"]) .name, .rows > li:has(.row[data-rank="2"]) .name, .rows > li:has(.row[data-rank="3"]) .name { font-size: 1.25rem; }
  .score div { grid-template-columns: 6.5rem 1fr 2.6rem; }
  .drawer h2 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rows > li:not(.in) { opacity: 1; transform: none; }
}
