/* ManaMakan. A mobile app that happens to be made of HTML files.
   One token layer drives both themes: everything below reads through
   variables, so dark mode is a remap, not a rewrite. Dense, thumb-sized, fast. */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;

  --bg:         #f2f2ef;
  --surface:    #ffffff;
  --surface-2:  #f7f7f5;
  --surface-3:  #ebebe7;
  --ink:        #16181c;
  --ink-2:      #4d5158;
  --muted:      #656971;
  --line:       #e6e6e2;
  --line-2:     #d6d6d1;

  --accent:     #0d6b4f;
  --accent-press:#095440;
  --accent-bg:  #e7f1ed;
  --accent-in:  #ffffff;

  --warn-bg:    #fdf4e6;
  --warn-line:  #e8d5b0;
  --warn-ink:   #7a5518;

  /* Tokens that don't flip with the theme the way the palette above does.
     strong-bg/strong-ink is the always-inverted chip: dark-on-light here,
     light-on-dark once the media query below fires, so it stays legible
     either way. media-bg/scrim/overlay-ink belong to photo and reel
     surfaces, which are dark regardless of the surrounding theme. */
  --strong-bg:   #16181c;
  --strong-ink:  #ffffff;
  --media-bg:    #101114;
  --scrim-rgb:   8, 10, 12;
  --overlay-ink: #ffffff;
  --thumb-icon:  #bfbfb8;

  /* Shape rule, applied everywhere with no exceptions:
     surfaces 16, controls 12, chips full-pill, sheets 24 at the top. */
  --r-surface: 16px;
  --r-control: 12px;
  --r-sheet:   24px;
  --r-pill:    999px;

  /* Type scale. Every piece of running text in the file reads from one of
     these eight steps. Icon glyph sizes (font-size on .icon spans, sizing a
     symbol rather than a line of text) sit outside the scale on purpose. */
  --text-2xs:  11px;
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   17px;
  --text-xl:   21px;
  --text-2xl:  28px;

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
          "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --gut: 16px;
  --appbar-h: 52px;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --shadow-1: 0 1px 2px rgba(22,24,28,.04), 0 1px 1px rgba(22,24,28,.03);
  --shadow-2: 0 2px 6px rgba(22,24,28,.06), 0 8px 24px rgba(22,24,28,.07);
  --shadow-sheet: 0 -8px 40px rgba(22,24,28,.16);
}

/* Dark remap. Same variable names, new values; every rule below keeps
   working unchanged because nothing past this point hardcodes a color. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #141519;
    --surface:    #1d1f24;
    --surface-2:  #23252b;
    --surface-3:  #2c2f36;
    --ink:        #ecedef;
    --ink-2:      #b6bac1;
    --muted:      #969aa3;
    --line:       #2a2d33;
    --line-2:     #3a3e46;

    --accent:      #2fbd8a;
    --accent-press:#29a578;
    --accent-bg:   #143528;
    --accent-in:   #0b2a1f;

    --warn-bg:   #2b2413;
    --warn-line: #4d3f1c;
    --warn-ink:  #e3c877;

    --strong-bg:  #eceef0;
    --strong-ink: #131417;
    --thumb-icon: #5a5e66;

    --shadow-1: 0 1px 2px rgba(0,0,0,.08), 0 1px 1px rgba(0,0,0,.06);
    --shadow-2: 0 2px 6px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.14);
    --shadow-sheet: 0 -8px 40px rgba(0,0,0,.32);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -.022em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { width: 1em; height: 1em; display: block; flex: none; fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--accent); color: var(--accent-in); padding: 12px 16px; border-radius: 0 0 var(--r-control) 0; }
.skip:focus { left: 0; }

/* Utility classes. build.mjs reaches for these instead of one-off inline
   styles, so the rule lives here once rather than scattered through markup. */
.appbar-ghost { width: 38px; flex: none; }
.appbar-title-left { text-align: left; padding-left: 2px; }
.link-accent { color: var(--accent); font-weight: 500; }
.fineprint-pad-b { padding: 0 2px 12px; }
.fineprint-pad-t { padding: 14px 2px 0; }
.empty-tall { padding-top: 70px; }

/* Screen container. One column, always. This is a phone. */
.screen { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------------------------------------------------------------- app bar */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding-top: var(--safe-t);
  border-bottom: 1px solid transparent;
  transition: border-color .18s, background .18s;
}
.appbar[data-stuck] { border-bottom-color: var(--line); }
@supports not (backdrop-filter: blur(1px)) { .appbar { background: var(--bg); } }

.appbar-in {
  height: var(--appbar-h);
  display: flex; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto; padding: 0 var(--gut);
}

.brand { font-size: 19px; font-weight: 700; letter-spacing: -.035em; display: flex; align-items: baseline; gap: 1px; }
.brand b { font-weight: 700; color: var(--accent); }
.brand i { font-style: normal; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 3px; align-self: center; }

.appbar-title {
  font-size: var(--text-lg); font-weight: 700; letter-spacing: -.02em;
  flex: 1; min-width: 0; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appbar-spacer { flex: 1; }

.iconbtn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 0; background: transparent; border-radius: var(--r-pill);
  font-size: 22px; color: var(--ink); cursor: pointer;
  transition: background .12s, transform .08s;
}
.iconbtn:active { background: var(--surface-3); transform: scale(.92); }
.iconbtn-ghost { color: var(--ink-2); }

.backbtn { margin-left: -8px; }

/* ------------------------------------------------------------- search bar */
.searchwrap { padding: 2px var(--gut) 12px; max-width: 560px; margin: 0 auto; }
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 0 6px 0 16px;
  height: 44px; box-shadow: var(--shadow-1);
  transition: border-color .14s, box-shadow .14s;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.searchbar > .icon { font-size: 19px; color: var(--muted); }
.searchbar input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: var(--text-md); color: var(--ink); padding: 0;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchclear { display: none; }
.searchbar[data-filled] .searchclear { display: grid; }

/* --------------------------------------------------------- the chip rail */
.rail {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--gut) 12px;
  max-width: 560px; margin: 0 auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Same rail, reused for the row of applied-filter chips; that row's markup
   carries both classes and stays out of flow entirely while empty. */
.rail-applied[hidden] { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
.chip:active { transform: scale(.95); }
.chip .icon { font-size: 16px; }
.chip em { font-style: normal; font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--accent); border-color: var(--accent); color: var(--accent-in);
}
.chip[aria-pressed="true"] em, .chip.is-on em { color: color-mix(in srgb, var(--accent-in) 88%, transparent); }

.chip-filter { background: var(--strong-bg); border-color: var(--strong-bg); color: var(--strong-ink); font-weight: 600; }
.chip-filter b { font-family: var(--mono); font-size: var(--text-2xs); background: var(--accent); color: var(--accent-in); border-radius: var(--r-pill); padding: 1px 6px; margin-left: 1px; }
.chip-filter:active { background: color-mix(in srgb, var(--strong-bg) 80%, black); border-color: color-mix(in srgb, var(--strong-bg) 80%, black); }

/* ------------------------------------------------------------- the feed */
.feed { padding-top: 4px; padding-bottom: 28px; }

.sectionhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 18px 0 8px;
}
.feed > .sectionhead:first-child, .screen > .sectionhead:first-child { padding-top: 6px; }
.sectionhead h2 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -.022em; }
.sectionhead a { font-size: var(--text-sm); font-weight: 600; color: var(--accent); }

.count {
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
  font-variant-numeric: tabular-nums; padding: 12px 0 8px; margin: 0;
}

.list { display: grid; gap: 8px; }

/* ---------------------------------------------------------------- cards */
.card {
  display: grid; grid-template-columns: 84px 1fr; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-surface); padding: 12px;
  box-shadow: var(--shadow-1);
  transition: transform .1s, box-shadow .12s;
}
.card:active { transform: scale(.985); box-shadow: none; }
.card[hidden] { display: none; }

/* The monogram is always the bottom layer. A photo covers it once it loads,
   so a slow image shows a tile rather than a grey hole, and a dead hotlink
   simply leaves the tile behind. */
.thumb {
  width: 84px; height: 84px; border-radius: var(--r-control);
  background: var(--accent-bg); overflow: hidden; position: relative;
  display: grid; place-items: center; flex: none;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.thumb .icon { font-size: 26px; color: var(--thumb-icon); }
.thumb-letters {
  font-size: 25px; font-weight: 700; letter-spacing: -.03em;
  color: var(--accent); opacity: .45;
}
.thumb-play {
  position: absolute; inset: auto 5px 5px auto;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(var(--scrim-rgb), .62); color: var(--overlay-ink);
  display: grid; place-items: center; font-size: 17px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

.card-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 1px 2px 0 0; }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-name {
  font-size: var(--text-md); font-weight: 700; letter-spacing: -.018em; line-height: 1.25;
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  font-size: var(--text-sm); color: var(--muted); margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-where { display: flex; align-items: center; gap: 4px; font-size: var(--text-sm); color: var(--ink-2); min-width: 0; }
.card-where .icon { font-size: 13px; color: var(--muted); }
.card-where span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-dish {
  font-size: var(--text-sm); color: var(--ink-2); margin: 2px 0 0; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-dish b { color: var(--accent); font-weight: 600; }
.card-dish-2 {
  white-space: normal; text-overflow: clip;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* The closed-state pill. Muted grey on purpose: closed is a fact worth a
   badge, not a warning worth alarming anyone over. The vouched mark below
   gets its own component, since a positive signal earns the accent. */
.pill {
  flex: none; font-size: var(--text-2xs); font-weight: 600; letter-spacing: .01em;
  padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap;
}
.pill-closed { background: var(--surface-3); color: var(--ink-2); }

.vouch {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: var(--text-2xs); font-weight: 600; letter-spacing: .01em;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--accent-bg); color: var(--accent);
}
.vouch .icon { font-size: 12px; }

.loadmore { display: flex; justify-content: center; padding: 18px 0 4px; }
.loadmore[hidden] { display: none; }

.empty {
  text-align: center; color: var(--muted); padding: 52px 20px;
  display: grid; gap: 8px; justify-items: center;
}
.empty .icon { font-size: 32px; color: var(--line-2); }
.empty p { margin: 0; font-size: var(--text-base); }
.empty strong { color: var(--ink); font-size: var(--text-md); font-weight: 600; }

/* -------------------------------------------------------- the reels rail */
.reelrail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px var(--gut) 4px; margin: 0 calc(var(--gut) * -1);
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.reelrail::-webkit-scrollbar { display: none; }

.reeltile {
  flex: none; width: 118px; aspect-ratio: 9 / 15;
  border-radius: var(--r-control); overflow: hidden; position: relative;
  background: var(--media-bg); scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .1s;
}
.reeltile:active { transform: scale(.96); }
.reeltile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The scrim only needs to be dark where the name sits. Anything heavier and
   the food underneath stops reading; anything lighter and the name doesn't. */
.reeltile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(var(--scrim-rgb), .85) 0%, rgba(var(--scrim-rgb), .65) 30%, rgba(var(--scrim-rgb), 0) 65%);
}
.reeltile-in { position: relative; z-index: 1; padding: 8px; color: var(--overlay-ink); }
.reeltile-name { font-size: var(--text-sm); font-weight: 700; line-height: 1.25; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reeltile-area { font-size: var(--text-2xs); opacity: .78; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reeltile-play {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; color: var(--overlay-ink); font-size: 16px;
}

/* -------------------------------------------------------------- tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
@supports not (backdrop-filter: blur(1px)) { .tabbar { background: var(--surface); } }
.tabbar-in { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 560px; margin: 0 auto; height: var(--tabbar-h); }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: var(--text-2xs); font-weight: 600; letter-spacing: -.005em;
  transition: color .12s, transform .08s;
}
.tab .icon { font-size: 23px; }
.tab:active { transform: scale(.9); }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------- sheets */
/* No animation on the sheet at all. It is display:none when closed and
   display:flex when open, and nothing sits between those two states. An
   animated open/close looks nicer, but any transition that fails to finish
   leaves a fixed invisible slab over the whole app that swallows taps and
   kills scrolling. Not worth it. */
dialog.sheet {
  display: none;
  border: 0; padding: 0; margin: 0 auto; max-width: 560px; width: 100%;
  position: fixed; inset: auto 0 0 0; max-height: 88dvh;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-sheet);
  flex-direction: column; overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(var(--scrim-rgb), .45); }
dialog.sheet[open] { display: flex; }

.sheet-grab { width: 36px; height: 4px; border-radius: var(--r-pill); background: var(--line-2); margin: 9px auto 2px; flex: none; }
.sheet-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 12px 18px;
  border-bottom: 1px solid var(--line); flex: none;
}
.sheet-head h2 { font-size: var(--text-lg); font-weight: 700; flex: 1; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  flex: none; display: flex; gap: 8px; padding: 12px 18px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line); background: var(--surface);
}

.facet { padding: 16px 0 4px; border-bottom: 1px solid var(--line); }
.facet:last-of-type { border-bottom: 0; }
.facet h3 { font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* Styled like a small searchbar; sits above the first facet it filters
   (currently the location facets, id=areasearch). */
.facet-search {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-control);
}
.facet-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  /* 16px, same as the main search: anything smaller makes iOS zoom the sheet on focus. */
  font: inherit; font-size: var(--text-md); color: var(--ink); padding: 0;
}
.facet-search input::placeholder { color: var(--muted); }
.facet-search .icon { font-size: 16px; color: var(--muted); }

.facet-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.facet-more {
  border: 0; background: none; padding: 6px 0 2px; font-size: var(--text-sm); font-weight: 600;
  color: var(--accent); cursor: pointer; display: flex; align-items: center; gap: 4px;
  min-height: 44px;
}
.facet-more .icon { font-size: 15px; transition: rotate .16s; }
.facet[data-expanded] .facet-more .icon { rotate: 180deg; }
.facet-opts .chip[hidden] { display: none; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r-control);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: var(--text-base); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .08s, background .12s, border-color .12s;
}
.btn:active { transform: scale(.975); background: var(--surface-2); }
.btn .icon { font-size: 19px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-in); }
.btn-primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn[disabled] { opacity: .42; pointer-events: none; }
.btn-sm { min-height: 44px; font-size: var(--text-sm); padding: 0 16px; border-radius: var(--r-pill); }

/* -------------------------------------------------------- detail screen */
.detail { padding-bottom: 30px; }
.detail-head { padding: 12px 0 16px; }
.detail-head h1 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.032em; line-height: 1.12; margin: 8px 0 0; }
.detail-head h1 small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -.01em; margin-top: 6px; }
.detail-meta { color: var(--muted); font-size: var(--text-sm); margin: 7px 0 0; }
.detail-desc { font-size: var(--text-md); color: var(--ink-2); margin: 12px 0 0; line-height: 1.5; }

/* Under detail-head on single-outlet pages: Map / Waze, straight to the
   point, before anything else competes for the tap. */
.quick-actions { display: flex; gap: 8px; margin-top: 14px; }

.hero-photo {
  margin: 0 calc(var(--gut) * -1) 0; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--surface-3); position: relative;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-credit {
  font-size: var(--text-2xs); color: var(--muted); margin: 6px 0 0; line-height: 1.4;
  display: flex; align-items: flex-start; gap: 5px;
}
.photo-credit .icon { font-size: 13px; margin-top: 1px; }

/* The line as it was typed into the original notepad, kept distinct from the
   researched description so you can tell whose words are whose. */
.detail-note {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 13px 0 0; padding: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-control);
  font-size: 14px; color: var(--ink-2); line-height: 1.45;
}
.detail-note .icon { font-size: 16px; color: var(--accent); flex: none; margin-top: 1px; }

.block { padding: 20px 0; border-top: 1px solid var(--line); }
.block > h2 {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .045em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.block > h2 .n { font-family: var(--mono); color: var(--muted); margin-left: 4px; }

.dishes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dishes li {
  font-size: var(--text-base); font-weight: 600; padding: 8px 16px;
  background: var(--accent-bg); color: var(--accent); border-radius: var(--r-pill);
}

.warnbox {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 14px 0 0; padding: 12px 16px; border-radius: var(--r-control);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  font-size: var(--text-sm); color: var(--warn-ink); line-height: 1.45;
}
.warnbox .icon { font-size: 18px; flex: none; margin-top: 1px; }

.outlets { display: grid; gap: 12px; }
.outlet { border: 1px solid var(--line); border-radius: var(--r-surface); padding: 16px; background: var(--surface); }
.outlet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.outlet-head h3 { font-size: var(--text-md); font-weight: 700; }
.outlet-area { font-size: var(--text-sm); color: var(--accent); font-weight: 600; }
.outlet-area-unknown { color: var(--muted); }
.factrow { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-sm); color: var(--ink-2); margin-top: 9px; line-height: 1.45; }
.factrow .icon { font-size: 16px; color: var(--muted); flex: none; margin-top: 2px; }
.factrow-soft { color: var(--muted); }
.factrow a { color: var(--accent); font-weight: 600; }
.outlet-links { display: flex; gap: 8px; margin-top: 13px; }
.outlet-perm { margin: 11px 0 0; font-size: var(--text-sm); color: var(--muted); }

.sourced { font-size: var(--text-2xs); color: var(--muted); font-weight: 600; }
.sourced::before { content: '·'; margin: 0 5px; }

.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.refs a {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface);
  font-size: 14px; font-weight: 600;
}
.refs a:active { background: var(--surface-2); }
.refs .icon { font-size: 18px; color: var(--muted); }
.refs .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refs small { color: var(--muted); font-weight: 500; font-size: var(--text-sm); }

.detail-foot { padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.detail-foot p { font-family: var(--mono); font-size: var(--text-2xs); color: var(--muted); margin: 0; }

/* ------------------------------------------------------------ the player */
.player { margin: 0 calc(var(--gut) * -1); background: var(--media-bg); position: relative; }
/* A listing can carry more than one reel. Each gets its own facade and its
   own note underneath; this just keeps the second one from sitting flush
   against the first. */
.player-note + .player { margin-top: 20px; }
.player-shell { width: 100%; border: 0; display: block; background: var(--media-bg); }
.player-facade {
  width: 100%; aspect-ratio: 4 / 5; border: 0; background: var(--media-bg); color: var(--overlay-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  position: relative; overflow: hidden;
}
.player-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.player-facade .pf-in { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; }
.player-facade .icon { font-size: 56px; filter: drop-shadow(0 2px 12px rgba(0,0,0,.5)); }
.player-facade span { font-size: var(--text-sm); font-weight: 600; opacity: .92; }
.player-note { font-size: var(--text-xs); color: var(--muted); margin: 7px 0 0; }

/* Combines with .btn.btn-block; reveals #more-players and then removes
   itself. This is only the standoff above it. */
.player-more { margin-top: 12px; }


/* --------------------------------------------------------- places screen */
.tilegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 62px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-control); box-shadow: var(--shadow-1);
  transition: transform .1s;
}
.tile:active { transform: scale(.975); }
.tile-name { font-size: var(--text-base); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.tile-sub { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.tile-n { font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

.rowlist { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 16px 15px;
  border-bottom: 1px solid var(--line); font-size: var(--text-base); font-weight: 600;
  transition: background .1s;
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--surface-2); }
.row .icon { font-size: 20px; color: var(--muted); flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row .grow small { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--muted); margin-top: 1px; }
.row .go { font-size: 17px; color: var(--line-2); flex: none; }
.row em { font-style: normal; font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); }

/* --------------------------------------------------------- page headers */
.pagehead { padding: 6px 0 16px; }
/* h2 included: Info's page title demoted to h2 so the appbar keeps the lone h1. */
.pagehead h1, .pagehead h2 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.034em; line-height: 1.1; }
.pagehead p { color: var(--ink-2); font-size: var(--text-base); margin: 9px 0 0; }
.pagehead .kicker { font-size: var(--text-xs); font-weight: 600; letter-spacing: .045em; text-transform: uppercase; color: var(--accent); margin: 0 0 7px; }

/* --------------------------------------------------------------- prose */
.prose { padding: 6px 0 34px; }
.prose h1 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.034em; line-height: 1.1; }
.prose h2 { font-size: var(--text-lg); font-weight: 700; margin: 30px 0 8px; letter-spacing: -.022em; }
.prose p { color: var(--ink-2); margin: 0 0 13px; font-size: var(--text-base); line-height: 1.55; }
.prose .lede { font-size: var(--text-lg); color: var(--ink); margin: 14px 0 22px; line-height: 1.45; }
.prose ul { color: var(--ink-2); padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose .cta { margin-top: 26px; }
.fineprint { font-size: var(--text-sm); color: var(--muted); }

.rules { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.rules li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-control); font-size: var(--text-base);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.rules .icon { font-size: 18px; flex: none; margin-top: 1px; }
.rules-never .icon { color: var(--accent); }
.rules-can .icon { color: var(--muted); }

/* -------------------------------------------------------------- the gate */
.gate-card { padding: 4px 0 8px; }
.gate-card h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -.026em; margin-bottom: 7px; }
.gate-sub { color: var(--ink-2); font-size: var(--text-base); margin: 0 0 18px; line-height: 1.45; }
.gate-actions { display: grid; gap: 8px; }
.gate-note { font-size: var(--text-sm); color: var(--muted); margin: 16px 0 0; line-height: 1.45; }

/* -------------------------------------------------------------- footer */
.foot { padding: 26px 0 34px; border-top: 1px solid var(--line); margin-top: 22px; }
.foot p { font-size: var(--text-sm); color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.foot-nav a { font-size: var(--text-sm); color: var(--accent); font-weight: 600; }
.foot-meta { font-family: var(--mono); font-size: var(--text-2xs); color: var(--muted); }

/* Hover tier. Only for pointers that can genuinely hover; touch devices
   fall straight through to the :active press states above, unchanged. */
@media (hover: hover) {
  .chip:hover { background: var(--surface-2); border-color: var(--muted); }
  .chip[aria-pressed="true"]:hover, .chip.is-on:hover { background: var(--accent-press); border-color: var(--accent-press); }
  .chip-filter:hover { background: color-mix(in srgb, var(--strong-bg) 90%, black); border-color: color-mix(in srgb, var(--strong-bg) 90%, black); }
  .row:hover { background: var(--surface-2); }
  .btn:hover { background: var(--surface-2); border-color: var(--line-2); }
  .btn-primary:hover { background: var(--accent-press); border-color: var(--accent-press); }
  .tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
  /* Gives --shadow-2 its one job: a lift on hover, nothing on touch. */
  .card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
}

/* Cross-document view transitions are deliberately NOT used. They paint a
   full-screen fixed overlay at the top of the stacking order while they run,
   and a transition that stalls mid-flight leaves that overlay in place and the
   page dead to touch. Plain navigation is dull and always works. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* A phone is the design target. On a larger screen the app simply centres,
   with a rail either side, the way a phone app does when it is cast to a tablet. */
@media (min-width: 620px) {
  body { background: #e9e9e5; }
  .appbar, .tabbar { background: color-mix(in srgb, #ffffff 92%, transparent); }
  .screen, .appbar-in, .searchwrap, .rail, .tabbar-in { max-width: 560px; }
  .tabbar { left: 50%; translate: -50% 0; width: 100%; max-width: 560px;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

@media (prefers-color-scheme: dark) and (min-width: 620px) {
  body { background: #0e0f12; }
  .appbar, .tabbar { background: color-mix(in srgb, var(--surface) 92%, transparent); }
}

/* Home and list screens alone get the wide two-column treatment; every other
   screen (detail, prose, places, info) stays a single 560px column
   even on a desktop-width viewport. */
@media (min-width: 720px) {
  body.screen-home .screen, body.screen-home .appbar-in, body.screen-home .searchwrap,
  body.screen-home .rail, body.screen-home .tabbar-in, body.screen-home .tabbar,
  body.screen-list .screen, body.screen-list .appbar-in, body.screen-list .searchwrap,
  body.screen-list .rail, body.screen-list .tabbar-in, body.screen-list .tabbar {
    max-width: 720px;
  }
  body.screen-home #grid, body.screen-home .list,
  body.screen-list #grid, body.screen-list .list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
