/* Teach Allais
   Layout: the map fills the screen. On wide screens a frosted panel floats on the left;
   on phones it becomes a bottom sheet with three heights (peek, half, full). */

:root {
  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Night palette (default) */
  --bg: #0a1518;
  --glass: rgba(12, 22, 26, 0.72);
  --glass-strong: rgba(14, 25, 29, 0.92);
  --sheet-solid: #0e191d;
  --ink: #efece5;
  --muted: #9aa7a6;
  --faint: #6f7d7d;
  --line: rgba(255, 255, 255, 0.09);
  --chip: rgba(255, 255, 255, 0.06);
  --chip-hover: rgba(255, 255, 255, 0.11);
  --ember: #ff6b2c;
  --ember-2: #ff9a52;
  --ember-soft: rgba(255, 107, 44, 0.18);
  --ember-ink: #ffb486;
  --on-ember: #1f0c03;
  --verified: #7fd1a8;
  --user: #4cc2ff;
  --shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
  --vignette: radial-gradient(130% 95% at 58% 42%, rgba(0, 0, 0, 0) 52%, rgba(2, 9, 11, 0.62) 100%);
  color-scheme: dark;
}
:root[data-theme="day"] {
  --bg: #e9eef0;
  --glass: rgba(251, 250, 246, 0.78);
  --glass-strong: rgba(251, 250, 246, 0.95);
  --sheet-solid: #f7f6f2;
  --ink: #152321;
  --muted: #5b6967;
  --faint: #87918f;
  --line: rgba(21, 35, 33, 0.1);
  --chip: rgba(21, 35, 33, 0.05);
  --chip-hover: rgba(21, 35, 33, 0.09);
  --ember: #e5531a;
  --ember-2: #f27a3a;
  --ember-soft: rgba(229, 83, 26, 0.14);
  --ember-ink: #b23f10;
  --on-ember: #ffffff;
  --verified: #1f8a59;
  --user: #1a8fe0;
  --shadow: 0 30px 70px -28px rgba(30, 40, 38, 0.38), 0 2px 10px rgba(30, 40, 38, 0.1);
  --shadow-sm: 0 8px 24px -12px rgba(30, 40, 38, 0.35);
  --vignette: radial-gradient(130% 95% at 58% 42%, rgba(0, 0, 0, 0) 60%, rgba(60, 75, 72, 0.16) 100%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; background: var(--bg); }
.vignette { position: fixed; inset: 0; pointer-events: none; background: var(--vignette); z-index: 1; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--glass); color: var(--muted); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.maplibregl-ctrl-attrib.maplibregl-compact-show { font-size: 10.5px; line-height: 15px; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-attrib-button { filter: var(--attrib-filter, invert(1) opacity(.7)); }
:root[data-theme="day"] .maplibregl-ctrl-attrib-button { filter: opacity(.7); }
.maplibregl-ctrl-bottom-right { right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(var(--sheet-visible, 0px) + max(4px, env(safe-area-inset-bottom, 0px))); z-index: 3; transition: bottom .32s var(--ease); }

/* ---------- panel ---------- */
.panel {
  position: fixed; z-index: 5;
  top: max(16px, env(safe-area-inset-top, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  width: 396px;
  display: flex; flex-direction: column;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panel-in .7s var(--ease) both .15s;
}
@keyframes panel-in { from { opacity: 0; transform: translateX(-18px); } }
.panel-inner { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px 18px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.grab { display: none; }

/* brand */
.brand { display: grid; gap: 4px; margin-bottom: 18px; }
.wordmark { margin: 0; font: 600 21px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.logo-mark { flex: none; display: block; overflow: visible; }
.wordmark .logo-mark { width: 36px; height: 36px; margin-left: -3px; }
.logo-mark .steam { stroke: var(--ember); animation: steam 3.6s ease-in-out infinite; }
.logo-mark .steam path:nth-child(2) { animation: steam-rise 3.6s ease-in-out infinite; }
:root[data-theme="night"] .logo-mark .steam { filter: drop-shadow(0 0 3px rgba(255, 107, 44, .75)); }
@keyframes steam { 50% { opacity: .55; } }
@keyframes steam-rise { 50% { transform: translateY(-2px); } }
.ember-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft), 0 0 22px 4px rgba(255, 107, 44, .65); animation: breathe 3.2s ease-in-out infinite; flex: none; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(255, 107, 44, .08), 0 0 30px 8px rgba(255, 107, 44, .45); } }
.tagline { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.tag-link { white-space: nowrap; color: var(--ember-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list-foot { padding: 16px 4px 6px; font-size: 14px; color: var(--muted); }
.list-foot a { color: var(--ember-ink); text-decoration: underline; text-underline-offset: 3px; }
.stat { margin: 6px 0 0; font: 500 12.5px/1.4 var(--font-data); color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.stat b { color: var(--ember-ink); font-weight: 500; }

/* search */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 14px; border-radius: 14px; background: var(--chip); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--ember); background: var(--chip-hover); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }
.clear { border: 0; background: var(--chip-hover); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); padding: 0; }
.icon-btn { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--chip); display: grid; place-items: center; color: var(--ink); transition: background .2s, color .2s, border-color .2s; }
.icon-btn:hover { background: var(--chip-hover); }
.near.active { color: var(--user); border-color: color-mix(in srgb, var(--user) 50%, transparent); }
.near.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* filters */
.filters { display: grid; gap: 10px; margin-bottom: 18px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 3px; border-radius: 13px; background: var(--chip); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 4px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 12px; text-align: center; white-space: nowrap; font-size: 14px; color: var(--ink); transition: background .2s, border-color .2s, color .2s; }
.chip:hover { background: var(--chip); }
.chip[aria-pressed="true"] { background: var(--ember-soft); border-color: var(--ember); color: var(--ember-ink); }

/* list */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; padding: 0 2px; }
.count { margin: 0; font: 600 12px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.link-btn { border: 0; background: none; padding: 2px 0; color: var(--ember-ink); font-size: 13.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list { list-style: none; margin: 0 -8px 16px; padding: 0; display: grid; gap: 2px; }
.row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 11px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; transition: background .15s; }
.row:hover, .row.is-hot { background: var(--chip); }
.mark { width: 11px; height: 11px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.mark.venue { background: transparent; border: 2.5px solid var(--ember); box-shadow: none; }
.row-main { min-width: 0; display: grid; gap: 1px; }
.row-name { font: 600 16.5px/1.25 var(--font-display); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-tags { font-size: 12px; color: var(--ember-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-dist { font: 500 12.5px var(--font-data); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 18px 10px; color: var(--muted); font-size: 14.5px; }
.empty .link-btn { margin-top: 6px; display: inline-block; }
/* Always-visible links pinned to the bottom of the panel (laptop); phones use the menu button instead */
.panel-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 18px 14px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.panel-foot a, .panel-foot .link-btn { color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.panel-foot a:hover, .panel-foot .link-btn:hover { color: var(--ink); }
.panel-foot .link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; line-height: inherit; text-decoration: none; cursor: pointer; }
.panel-foot .foot-cta { flex: none; padding: 8px 13px; border-radius: 999px; background: var(--ember-soft); color: var(--ember-ink); font-weight: 600; }
.panel-foot .foot-cta:hover { color: var(--ember-ink); background: color-mix(in srgb, var(--ember) 26%, transparent); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-btn { display: none; }

/* Menu sheet */
.menu-sheet { width: min(92vw, 420px); max-width: none; padding: 14px 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); }
.menu-sheet::backdrop { background: rgba(4, 10, 12, .5); backdrop-filter: blur(3px); }
.menu-list { display: grid; gap: 4px; margin-bottom: 12px; }
.menu-list a, .menu-list button { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover, .menu-list a:focus-visible, .menu-list button:focus-visible { background: var(--chip); }
.menu-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--ember-soft); color: var(--ember-ink); }
.menu-list b { display: block; font: 600 16px/1.25 var(--font-body); }
.menu-list small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.menu-sheet .btn { width: 100%; }

/* Filters button and sheet (phones). On a laptop the filters stay in the panel. */
.filter-btn { display: none; position: relative; }
.filter-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--ember); color: var(--on-ember); font: 700 11.5px/20px var(--font-body); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.filter-btn.on { border-color: color-mix(in srgb, var(--ember) 55%, transparent); color: var(--ember-ink); }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 6px 16px; }
.sheet-head h2 { margin: 0; font: 700 22px/1.1 var(--font-display); letter-spacing: -0.01em; }
.filter-slot .filters { margin: 0 2px 20px; gap: 14px; }
.filter-slot .seg button { padding: 11px 4px; font-size: 15px; }
.filter-slot .chip { padding: 10px 15px; font-size: 15px; }
.home-top { transition: background .2s, box-shadow .2s; }

/* ---------- detail ---------- */
.back { border: 0; background: none; padding: 4px 0; margin: -4px 0 16px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.back:hover { color: var(--ink); }
.d-coords { margin: 0; font: 500 11.5px/1.2 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--ember-ink); font-variant-numeric: tabular-nums; }
.d-name { margin: 10px 0 6px; font: 700 36px/1.02 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; outline: none; }
.d-place { margin: 0 0 14px; font-size: 16px; color: var(--muted); }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.d-tags span { font-size: 13px; padding: 4px 11px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.d-tags .verified { color: var(--verified); border-color: color-mix(in srgb, var(--verified) 40%, transparent); }
.d-note { margin: 0 0 18px; font-size: 15.5px; line-height: 1.55; max-width: 46ch; }
.d-actions { display: grid; gap: 8px; margin-bottom: 20px; }
.btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font: 600 15px var(--font-body); text-decoration: none; transition: background .2s, transform .15s, box-shadow .2s; }
.btn:hover { background: var(--chip-hover); }
.btn:active { transform: scale(.98); }
.btn.primary { border: 0; min-height: 52px; font: 600 17px var(--font-display); color: var(--on-ember); background: linear-gradient(180deg, var(--ember-2), var(--ember)); box-shadow: 0 14px 34px -12px rgba(255, 107, 44, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { box-shadow: 0 18px 40px -12px rgba(255, 107, 44, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.d-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 22px; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.d-facts div { padding: 10px 12px; background: var(--glass-strong); min-width: 0; }
.d-facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.d-facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.d-facts dd { margin: 3px 0 0; font: 500 14.5px/1.3 var(--font-body); overflow-wrap: anywhere; }
.nearby h3 { margin: 0 0 6px; font: 600 12px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nearby .list { margin-bottom: 18px; }
.stays { margin: 0 0 22px; }
.stays h3 { margin: 0 0 4px; font: 600 12px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stays-sub { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.stays-btn { width: 100%; }
.stays-btn > span[aria-hidden] { color: var(--ember); }
.stays-frame { display: block; width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-strong); }
.stays-note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--faint); }
.stays-wrap { position: relative; }
.stays-loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(closest-side, var(--ember-soft), transparent) center / 70% 70% no-repeat, var(--glass-strong); color: var(--muted); font-size: 14px; transition: opacity .4s ease; }
.stays-wrap.loaded .stays-loader { opacity: 0; pointer-events: none; }
.stays-glow { width: 12px; height: 12px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft), 0 0 24px 6px rgba(255, 107, 44, .55); animation: stays-pulse 1.6s ease-in-out infinite; }
@keyframes stays-pulse { 50% { transform: scale(1.3); box-shadow: 0 0 0 9px rgba(255, 107, 44, .07), 0 0 36px 12px rgba(255, 107, 44, .4); } }
.d-claim { margin: 0 0 8px; padding: 14px 14px; border-radius: 14px; border: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.d-claim a { color: var(--ember-ink); font-weight: 600; }
.d-small { margin: 0; font-size: 12.5px; color: var(--faint); }

/* ---------- map markers ---------- */
.sel-marker { width: 20px; height: 20px; position: relative; pointer-events: none; }
.sel-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--ember); border: 3px solid var(--glass-strong); box-shadow: 0 0 0 2px var(--ember), 0 0 28px 8px rgba(255, 107, 44, .65); }
.sel-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ember); animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.sel-label { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); font: 600 14px/1 var(--font-display); color: var(--ink); animation: rise .45s var(--ease) both .25s; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px); } }
.user-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--user); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(76, 194, 255, .55); animation: user-pulse 2.4s ease-out infinite; }
@keyframes user-pulse { 70% { box-shadow: 0 0 0 16px rgba(76, 194, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 194, 255, 0); } }
.tip .maplibregl-popup-content { padding: 7px 11px; border-radius: 10px; background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); font: 600 13.5px/1.2 var(--font-display); }
.tip .maplibregl-popup-content small { display: block; margin-top: 2px; font: 400 12px var(--font-body); color: var(--muted); }
.tip.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--glass-strong); }
.tip.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--glass-strong); }

/* ---------- map controls ---------- */
.ctl { position: fixed; z-index: 4; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 8px; animation: fade-in .6s var(--ease) both .4s; }
@keyframes fade-in { from { opacity: 0; } }
.ctl > button, .ctl-group { border-radius: 14px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ctl-group { display: grid; overflow: hidden; }
.ctl-group button + button { border-top: 1px solid var(--line); }
.ctl button { width: 46px; height: 46px; display: grid; place-items: center; color: var(--ink); border: 0; background: transparent; padding: 0; }
.ctl > button { border: 1px solid var(--line); background: var(--glass); }
.ctl button:hover { color: var(--ember-ink); }
.ctl-text { font: 700 13px var(--font-display); letter-spacing: .02em; }
#tilt[aria-pressed="true"] { background: var(--ember); color: var(--on-ember); border-color: var(--ember); }
:root[data-theme="night"] .i-moon, :root[data-theme="day"] .i-sun { display: none; }

/* ---------- splash, toast, dialog ---------- */
.splash { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); transition: opacity .8s var(--ease), visibility .8s; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash-mark { font: 600 24px/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; display: grid; justify-items: center; gap: 22px; margin-right: -.2em; }
.splash-mark .logo-mark { width: 92px; height: 92px; margin-right: .2em; }
.splash-msg { margin: 0; font: 500 12.5px var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.toast { position: fixed; z-index: 15; left: 50%; top: max(18px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); max-width: min(92vw, 440px); padding: 11px 16px; border-radius: 14px; background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14.5px; animation: toast-in .35s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.about { max-width: min(92vw, 520px); padding: 26px 24px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); }
.about::backdrop { background: rgba(4, 10, 12, .5); backdrop-filter: blur(3px); }
.about h2 { margin: 0 0 12px; font: 700 26px/1.1 var(--font-display); letter-spacing: -0.02em; }
.about p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.about p strong, .about p em { color: var(--ink); }
.about a { color: var(--ember-ink); }
.about-credits { font-size: 13px !important; }
.about form { margin-top: 18px; }
.about .btn { width: 100%; }
.noscript { position: fixed; inset: auto 16px 16px; z-index: 30; padding: 14px; border-radius: 14px; background: #fff; color: #111; }

/* ---------- phones: bottom sheet ---------- */
@media (max-width: 820px) {
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: 92dvh; height: 92vh;
    border-radius: 24px 24px 0 0; border-bottom: 0;
    transform: translateY(calc(100% - var(--sheet-h, 214px)));
    transition: transform .34s var(--ease);
    animation: sheet-in .7s var(--ease) both .15s;
    will-change: transform;
  }
  @supports (height: 100dvh) { .panel { height: 92dvh; } }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  .panel.dragging { transition: none; }
  .grab { display: grid; place-items: center; flex: none; width: 100%; height: 26px; border: 0; background: transparent; touch-action: none; cursor: grab; }
  .grab span { width: 42px; height: 5px; border-radius: 3px; background: var(--line); box-shadow: inset 0 0 0 10px var(--faint); opacity: .5; }
  .panel-inner { padding: 2px 16px calc(18px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .brand { margin-bottom: 12px; gap: 2px; touch-action: none; }
  .wordmark { font-size: 18px; gap: 10px; }
  .wordmark .logo-mark { width: 31px; height: 31px; }
  .menu-btn { display: grid; width: 42px; height: 42px; border-radius: 13px; }
  .filter-btn { display: grid; }
  .stat { display: none; }
  .brand { margin-bottom: 10px; }
  /* Logo and search stay pinned while the list scrolls under them */
  .home-top { position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: 0 16px 2px; }
  .panel.scrolled .home-top { background: var(--sheet-solid); box-shadow: 0 1px 0 var(--line), 0 10px 22px -16px rgba(0, 0, 0, .5); }
  .panel-foot { display: none; }
  .menu-sheet { width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)); animation: sheet-in .3s var(--ease); }
  .tagline { display: none; }
  .stat { margin-top: 4px; }
  .search-row { margin-bottom: 10px; }
  .filters { margin-bottom: 14px; }
  .d-name { font-size: 30px; }
  .ctl { top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); gap: 6px; }
  .ctl button { width: 42px; height: 42px; }
  .vignette { background: radial-gradient(140% 80% at 50% 30%, rgba(0,0,0,0) 55%, rgba(2,9,11,.45) 100%); }
  :root[data-theme="day"] .vignette { background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
