/* ==========================================================================
   Mapping Memory, Mapping Meals · Deep Map v2
   Palette follows the project website (clay, ochre, turmeric, moss, earth).
   Type: Times New Roman throughout, 14pt minimum (1rem = 14pt); Tiro Bangla
   and Tiro Devanagari Hindi supply Bengali and Hindi glyphs.
   ========================================================================== */

:root {
  --clay: #C1440E;
  --ochre: #E8923A;
  --turmeric: #D4A843;
  --moss: #3D5A3E;
  --earth: #2C1810;
  --cream: #FAF6EF;
  --parchment: #F0E8D6;

  --scale: 1;
  --font-display: "Times New Roman", Times, "Liberation Serif", "Tiro Bangla", "Tiro Devanagari Hindi", serif;
  --font-body: "Times New Roman", Times, "Liberation Serif", "Tiro Bangla", "Tiro Devanagari Hindi", serif;
  --font-mono: "Times New Roman", Times, "Liberation Serif", "Tiro Bangla", "Tiro Devanagari Hindi", serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .28s var(--ease);
  --gap: 12px;
  --top: 70px;
  --explore-w: 384px;
  --sheet-w: 500px;
}

/* Dusk (default): warm earth glass on a night map */
body[data-theme="dusk"] {
  --bg: #120b07;
  --panel: rgba(26, 16, 10, .84);
  --panel-solid: #1c120c;
  --panel-2: rgba(255, 236, 210, .045);
  --panel-3: rgba(255, 236, 210, .08);
  --line: rgba(232, 146, 58, .18);
  --line-2: rgba(240, 232, 214, .10);
  --ink: #F6EEDF;
  --ink-2: #D9C9AE;
  --ink-3: #A8957A;
  --accent: #E8923A;
  --accent-ink: #1a0f0a;
  --accent-2: #D4A843;
  --hot: #E0663A;
  --focus: #F3C46B;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(232, 146, 58, .25), 0 10px 40px rgba(193, 68, 14, .25);
  color-scheme: dark;
}

/* Daylight: parchment glass on a warm day map */
body[data-theme="daylight"] {
  --bg: #efe6d4;
  --panel: rgba(250, 246, 239, .9);
  --panel-solid: #faf6ef;
  --panel-2: rgba(74, 46, 26, .045);
  --panel-3: rgba(74, 46, 26, .085);
  --line: rgba(193, 68, 14, .2);
  --line-2: rgba(74, 46, 26, .12);
  --ink: #2C1810;
  --ink-2: #4A2E1A;
  --ink-3: #6B5E52;
  --accent: #C1440E;
  --accent-ink: #FFF8EE;
  --accent-2: #A7781C;
  --hot: #C1440E;
  --focus: #C1440E;
  --shadow: 0 18px 50px rgba(44, 24, 16, .2), 0 2px 8px rgba(44, 24, 16, .12);
  --glow: 0 0 0 1px rgba(193, 68, 14, .25), 0 10px 40px rgba(193, 68, 14, .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { font-size: calc(14pt * var(--scale)); -webkit-text-size-adjust: 100%; }
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }
.grow { flex: 1; }
.ic { flex: none; display: block; }
[data-ic] { display: inline-flex; }

/* ------------------------------------------------------------------ map */
#map { position: absolute; inset: 0; }
.maplibregl-map, .maplibregl-marker, .maplibregl-ctrl { font-family: var(--font-body) !important; }
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(10, 6, 3, .55) 100%),
    linear-gradient(180deg, rgba(10, 6, 3, .45), transparent 14%, transparent 86%, rgba(10, 6, 3, .35));
}
body[data-theme="daylight"] .vignette {
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 60%, rgba(120, 80, 40, .18) 100%),
    linear-gradient(180deg, rgba(250, 246, 239, .55), transparent 13%);
}
.maplibregl-ctrl-attrib { font-size: 1rem; background: var(--panel) !important; color: var(--ink-3); }
.maplibregl-ctrl-attrib a { color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(var(--inv, 0)); }
body[data-theme="dusk"] { --inv: 1; }
.maplibregl-ctrl-bottom-right { right: 0; bottom: 0; }
/* keep the attribution folded into its (i) button until hovered or focused */
.maplibregl-ctrl-attrib.maplibregl-compact-show:not(:hover):not(:focus-within) .maplibregl-ctrl-attrib-inner { display: none; }
.maplibregl-ctrl-attrib.maplibregl-compact-show:not(:hover):not(:focus-within) { padding: 0; }

/* ------------------------------------------------------------------ loader */
.loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; align-content: center; gap: 18px;
  background: radial-gradient(800px circle at 30% 20%, rgba(193, 68, 14, .18), transparent 60%), var(--bg);
  color: var(--ink-2); font-family: var(--font-display); font-style: italic; font-size: 1.1rem;
  transition: opacity .6s ease, visibility .6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ buttons */
.btn, .iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--shadow);
  transition: background var(--t), border-color var(--t), transform var(--t), color var(--t);
  text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 1rem;
}
.btn { padding: 0 16px; }
.iconbtn { width: 44px; padding: 0; color: var(--ink-2); }
.iconbtn.sm { width: 38px; height: 38px; border-radius: 10px; box-shadow: none; }
.iconbtn.ghost, .btn.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }
.btn:hover, .iconbtn:hover { border-color: var(--accent); color: var(--ink); }
.btn:active, .iconbtn:active { transform: translateY(1px); }
.btn-accent { background: linear-gradient(135deg, var(--hot), var(--ochre)); color: #1a0f0a; border-color: transparent; }
body[data-theme="daylight"] .btn-accent { background: linear-gradient(135deg, var(--clay), #D9622A); color: #fff8ee; }
.btn-accent:hover { filter: brightness(1.08); color: inherit; border-color: transparent; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 99px; }
.btn.xl { height: 56px; padding: 0 30px; font-size: 1.08rem; border-radius: 99px; }
.btn-chip { padding: 0 14px 0 12px; }
.btn[aria-pressed="true"], .iconbtn[aria-pressed="true"] { background: var(--panel-3); border-color: var(--accent); color: var(--accent); }
.badge {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; font-size: 1rem; line-height: 24px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center;
}
.kbd {
  font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px;
}
.pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 34px rgba(193, 68, 14, .35), 0 0 0 0 rgba(232, 146, 58, .5); }
  50% { box-shadow: 0 10px 34px rgba(193, 68, 14, .45), 0 0 0 10px rgba(232, 146, 58, 0); }
}

/* segmented control */
.seg {
  display: inline-flex; height: 44px; padding: 4px; gap: 2px; border-radius: var(--r-md);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.seg button {
  border: 0; background: transparent; color: var(--ink-2); border-radius: 10px; padding: 0 11px; font-weight: 600; font-size: 1rem;
  transition: background var(--t), color var(--t);
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:not([aria-pressed="true"]):hover { background: var(--panel-3); color: var(--ink); }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: absolute; z-index: 20; top: var(--gap); left: var(--gap); right: var(--gap);
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; }
.tb-right { margin-left: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 10px;
  border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--ink); text-decoration: none; transition: border-color var(--t);
}
.brand:hover { border-color: var(--accent); }
.brand-mark { color: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .005em; }
.brand-sub { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

.tb-search { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px;
  border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink-3);
  transition: border-color var(--t), box-shadow var(--t);
}
.search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search-results {
  position: absolute; top: 52px; left: 0; right: 0; max-height: min(62vh, 520px); overflow: auto;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 6px;
}
.sr-group { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px 4px; }
.sr-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent;
  border-radius: 12px; color: var(--ink);
}
.sr-item[aria-selected="true"], .sr-item:hover { background: var(--panel-3); }
.sr-item small { display: block; color: var(--ink-3); font-size: 1rem; }
.sr-item mark { background: transparent; color: var(--accent); font-weight: 700; }
.sr-empty { padding: 14px; color: var(--ink-3); font-size: 1rem; }

/* ------------------------------------------------------------------ panels */
.panel {
  position: absolute; z-index: 15; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.35); -webkit-backdrop-filter: blur(18px) saturate(1.35);
  overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--clay), var(--ochre), var(--turmeric), transparent);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 18px 10px; }
.panel-title { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; margin: 0; line-height: 1.2; }
.panel-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.count { margin: 4px 0 8px; font-size: 1rem; color: var(--ink-3); }
.count b { color: var(--ink); font-size: 1rem; }
.meter { height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; width: 220px; }
.meter span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--clay), var(--turmeric)); transition: width .5s var(--ease); }

.explore { left: var(--gap); top: var(--top); bottom: var(--gap); width: var(--explore-w); max-width: calc(100vw - 24px); animation: slideL .32s var(--ease); }
.sheet { right: var(--gap); top: var(--top); bottom: var(--gap); width: var(--sheet-w); max-width: calc(100vw - 24px); animation: slideR .32s var(--ease); }
@keyframes slideL { from { transform: translateX(-24px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(24px); opacity: 0; } }

/* Explore sections */
.sec { border-top: 1px solid var(--line-2); }
.sec:first-child { border-top: 0; }
.sec > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 2px; cursor: pointer;
  font-weight: 650; font-size: 1rem; color: var(--ink);
}
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary .ic:first-child { color: var(--accent); }
.sec > summary .sec-count { margin-left: auto; font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); }
.sec > summary .chev { transition: transform var(--t); color: var(--ink-3); }
.sec[open] > summary .chev { transform: rotate(180deg); }
.sec-body { padding: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 11px 4px 9px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2); font-size: 1rem; font-weight: 500;
  transition: all var(--t);
}
.chip:hover { border-color: var(--c, var(--accent)); color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 2px rgba(0, 0, 0, .15); }
.chip .n { font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; font-weight: 650; }
.chip[aria-pressed="true"] .n { color: rgba(255, 255, 255, .85); }
.chip[aria-pressed="true"] .dot { background: #fff; }
.chip:disabled { opacity: .35; cursor: default; }
.chip .pv { color: var(--accent-2); font-size: 1rem; }
.chip[aria-pressed="true"] .pv { color: #fff; }
.note { font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); margin: 10px 0 0; }

.rows { display: grid; gap: 4px; }
.row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 1rem; transition: all var(--t);
}
.row:hover { background: var(--panel-2); color: var(--ink); }
.row .ic { color: var(--accent); }
.row .n { margin-left: auto; font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); }
.row[aria-pressed="true"] { background: var(--panel-3); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.row:disabled { opacity: .35; cursor: default; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line-2); flex: none; transition: background var(--t); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); transition: transform var(--t), background var(--t); }
.row[aria-pressed="true"] .switch { background: var(--accent); border-color: var(--accent); }
.row[aria-pressed="true"] .switch::after { transform: translateX(14px); background: #fff; }

.trail {
  display: block; width: 100%; text-align: left; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink-2); transition: all var(--t);
}
.trail + .trail { margin-top: 7px; }
.trail:hover { border-color: var(--accent-2); color: var(--ink); }
.trail b { display: block; color: var(--ink); font-weight: 650; font-size: 1rem; line-height: 1.35; }
.trail span { display: block; font-size: 1rem; color: var(--ink-3); margin-top: 3px; }
.trail[aria-pressed="true"] { border-color: var(--accent-2); background: linear-gradient(135deg, rgba(212, 168, 67, .16), transparent); }

.layer-list { display: grid; gap: 10px; }
.layer-item { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.layer-item .lnum {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--accent);
  border: 1px solid var(--line-2);
}
.layer-item b { display: block; font-size: 1rem; color: var(--ink); }
.layer-item span { font-size: 1rem; color: var(--ink-3); line-height: 1.4; }
.layer-item code { font-family: var(--font-mono); font-size: 1rem; color: var(--accent-2); margin-right: 6px; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.active-filters:empty { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 11px; border-radius: 99px;
  background: var(--panel-3); border: 1px solid var(--line); color: var(--ink); font-size: 1rem; font-weight: 550;
}
.pill { max-width: 100%; }
.pill-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pill button { flex: none;  border: 0; background: transparent; color: var(--ink-3); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; padding: 0; }
.pill button:hover { background: var(--panel-3); color: var(--ink); }
.pill.clear { background: transparent; border-style: dashed; padding: 0 11px; cursor: pointer; color: var(--accent); }

.warli { display: flex; gap: 6px; color: var(--accent); opacity: .55; justify-content: center; }
.warli svg { flex: none; }

/* ------------------------------------------------------------------ sheet content */
.sheet-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.hero { position: relative; padding: 20px 20px 14px; }
.hero-band { position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, transparent), transparent); pointer-events: none; }
.hero-top { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.hero-top .crumb { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-main { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.medal {
  width: 62px; height: 62px; border-radius: 18px; flex: none; display: grid; place-items: center; color: var(--c, var(--accent));
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 28%, var(--panel-solid)), var(--panel-solid));
  border: 2px solid var(--c, var(--accent)); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 40%, transparent);
}
.eyebrow { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; }
.hero h2 { font-family: var(--font-display); font-size: 1.72rem; line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -.005em; }
.hero .local { font-family: var(--font-display); font-style: italic; color: var(--accent-2); font-size: 1.04rem; margin: 4px 0 0; }
.tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 1rem; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--panel-2);
}
.tag.c { background: var(--c); border-color: var(--c); color: #fff; }
.tag.pv { background: var(--turmeric); border-color: var(--turmeric); color: #1a0f0a; }
.tag.id { font-family: var(--font-mono); font-weight: 500; }
.actions { position: relative; display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.actions .btn, .actions .iconbtn { height: 46px; font-size: 1rem; box-shadow: none; }
.actions .iconbtn { width: 46px; border-radius: 99px; }
.actions .btn-accent { flex: 1; min-width: 160px; height: 46px; font-size: 1rem; border-radius: 99px; }

.tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 20px 0; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); position: sticky; top: 0; z-index: 3; backdrop-filter: blur(12px); }
.tabs button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 1rem; transition: all var(--t); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tabs button:disabled { opacity: .35; cursor: default; }
.tabpanel { padding: 16px 20px 28px; }

.card { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 16px; padding: 14px 16px; }
.card + .card, .field + .field, .card + .field, .field + .card { margin-top: 14px; }
.field h4, .card h4 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.field p, .card p { margin: 0; font-size: 1rem; color: var(--ink-2); white-space: pre-line; }
.field p + p { margin-top: 8px; }
blockquote.memory {
  margin: 18px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--c, var(--accent));
  font-family: var(--font-display); font-style: italic; font-size: 1.08rem; color: var(--ink); line-height: 1.6;
}
.season { display: inline-flex; align-items: center; gap: 8px; }
.related { display: flex; flex-wrap: wrap; gap: 6px; }
.related .chip { font-size: 1rem; }

.acc { border-bottom: 1px solid var(--line-2); }
.acc > summary { list-style: none; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.acc > summary::-webkit-details-marker { display: none; }
.acc .lnum { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--panel-3); color: var(--accent); border: 1px solid var(--line-2); }
.acc .lt b { display: block; font-size: 1rem; }
.acc .lt code { font-family: var(--font-mono); font-size: 1rem; color: var(--accent-2); letter-spacing: .06em; }
.acc .chev { color: var(--ink-3); transition: transform var(--t); }
.acc[open] .chev { transform: rotate(180deg); }
.acc-body { padding: 0 0 16px 50px; }
.acc-body .field h4 { font-size: 1rem; }
.linkbtn { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 1rem; padding: 4px 0; display: inline-flex; align-items: center; gap: 4px; }

.origin-geo { border-color: color-mix(in srgb, var(--turmeric) 40%, transparent); background: linear-gradient(135deg, rgba(212, 168, 67, .14), transparent); }
.origin-geo h4 { color: var(--accent-2); }
.oblock h5 { font-family: var(--font-display); font-size: 1.05rem; margin: 18px 0 6px; color: var(--ink); }
.oblock p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.chain { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.chain li { position: relative; padding: 6px 0 6px 22px; font-size: 1rem; color: var(--ink-2); }
.chain li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.chain li::after { content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.chain li:first-child::before { top: 13px; }
.chain li:last-child::before { bottom: calc(100% - 13px); }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel-solid); border: 2px solid var(--accent); }
.timeline b { display: block; font-family: var(--font-mono); font-size: 1rem; color: var(--accent-2); letter-spacing: .04em; }
.timeline span { font-size: 1rem; color: var(--ink-2); }

.qa { display: grid; gap: 10px; }
.qa-item { border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel-2); overflow: hidden; }
.qa-q { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: 1rem; }
.qa-q .num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 1rem; }
.qa-q .lbl { margin-left: auto; flex: none; font-size: 1rem; color: var(--accent); font-weight: 600; padding-top: 3px; }
.qa-a { padding: 0 16px 16px 54px; color: var(--ink-2); font-size: 1rem; animation: fadeUp .3s var(--ease); }
.qa-a .src { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } }

/* place list + index */
.list { display: grid; gap: 6px; padding: 8px 12px 20px; }
.item {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--ink); transition: all var(--t);
}
.item:hover, .item:focus-visible { background: var(--panel-2); border-color: var(--line-2); }
.item .medal { width: 46px; height: 46px; border-radius: 50%; border-width: 2px; box-shadow: none; }
.item b { display: block; font-weight: 650; font-size: 1rem; line-height: 1.3; }
.item small { display: block; font-size: 1rem; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.item small .cm { color: var(--c); font-weight: 650; }
.item .chev { color: var(--ink-3); }
.item:hover .chev { color: var(--accent); }
.group-h { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 4px; display: flex; align-items: center; gap: 8px; }
.group-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sheet-tools { display: flex; gap: 8px; align-items: center; padding: 0 20px 6px; flex-wrap: wrap; }
.sheet-tools .seg { height: 36px; box-shadow: none; padding: 3px; }
.sheet-tools .seg button { font-size: 1rem; padding: 0 9px; }
.sheet-foot { border-top: 1px solid var(--line-2); padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.sheet-foot .grow { text-align: center; font-family: var(--font-mono); font-size: 1rem; color: var(--ink-3); }
.empty { padding: 30px 24px; text-align: center; color: var(--ink-3); }

/* ------------------------------------------------------------------ markers */
.mk {
  --c: var(--accent); --s: 46px;
  /* no position here: MapLibre positions the element absolutely */
  display: grid; place-items: center; width: var(--s); height: var(--s); padding: 0; border: 0; background: none; cursor: pointer;
  animation: mkIn .5s var(--ease) both; animation-delay: var(--d, 0ms);
}
@keyframes mkIn { from { transform: scale(.2); opacity: 0; } }
.mk-ring {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 55%, #2a1810), #1a0f0a 78%);
  border: 2px solid color-mix(in srgb, var(--c) 85%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 24px color-mix(in srgb, var(--c) 55%, transparent), 0 6px 14px rgba(0, 0, 0, .45);
  color: #F6E6CC; transition: transform .25s var(--ease), box-shadow .25s;
}
.mk-ring .ic { width: 52%; height: 52%; }
.mk:hover .mk-ring, .mk:focus-visible .mk-ring { transform: scale(1.12); }
.mk-count {
  position: absolute; top: -8px; right: -10px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px;
  background: var(--turmeric); color: #1a0f0a; font: 700 1rem/26px var(--font-mono); text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.mk-label {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 9px; border-radius: 99px; font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  background: rgba(20, 12, 8, .86); color: #F6EEDF; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.show-labels .mk-label, .mk:hover .mk-label, .mk:focus-visible .mk-label, .mk.sel .mk-label { opacity: 1; }
.mk.sel .mk-ring { transform: scale(1.18); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent), 0 0 40px var(--c); }
.mk.sel::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--c); animation: ping 1.8s ease-out infinite; pointer-events: none;
}
@keyframes ping { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.mk.dim { opacity: .35; }
.mk-cluster .mk-ring { background: radial-gradient(circle at 32% 28%, #6b3a1c, #1a0f0a 80%); border-color: var(--turmeric); color: var(--turmeric); }
.mk-cluster .mk-ring::before, .mk-cluster .mk-ring::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--turmeric) 60%, transparent);
}
.mk-cluster .mk-ring::after { inset: -13px; opacity: .45; }
.mk-cluster .mk-num { font: 700 1.05rem/1 var(--font-display); color: #F6E6CC; }
.mk-cluster .mk-label { opacity: 1; }
.dist-label {
  font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(246, 238, 223, .62);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9); pointer-events: none; white-space: nowrap; transition: opacity .3s; opacity: 0;
}
.dist-wrap { pointer-events: none; }
body.z7 .dist-label.has, body.z85 .dist-label { opacity: 1; }
body.no-bounds .dist-label { opacity: 0 !important; }
body[data-theme="daylight"] .dist-label { color: rgba(74, 46, 26, .7); text-shadow: 0 1px 2px rgba(255, 255, 255, .9); }
.dist-label.has { color: var(--turmeric); }

/* ------------------------------------------------------------------ map controls */
.mapctl {
  position: absolute; z-index: 12; left: var(--gap); bottom: 34px; display: flex; flex-direction: column; gap: 6px;
  transition: left var(--t), opacity var(--t);
}
.mapctl .iconbtn { width: 42px; height: 42px; border-radius: 12px; }
.ctl-sep { height: 4px; }
body.explore-open .mapctl { left: calc(var(--explore-w) + var(--gap) * 2); }
#compass { transition: transform .2s linear; }
.popover {
  position: absolute; left: 52px; bottom: 0; width: 248px; padding: 12px; border-radius: 16px;
  background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); animation: fadeUp .2s var(--ease);
}
.popover h4 { margin: 2px 4px 8px; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.basemaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.basemaps button {
  display: grid; gap: 6px; justify-items: center; padding: 6px 4px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2);
  font-size: 1rem; font-weight: 600; color: var(--ink-2);
}
.basemaps button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--panel-3); }
.basemaps i { display: block; width: 56px; height: 38px; border-radius: 8px; }
.bm-dusk { background: linear-gradient(135deg, #2a1a10, #0e0906 60%), #111; box-shadow: inset 0 0 0 1px rgba(232, 146, 58, .35); }
.bm-daylight { background: linear-gradient(135deg, #f3ead7, #d9e4cf 60%, #bcd3dc); }
.bm-satellite { background: linear-gradient(135deg, #3d5a3e, #273a26 50%, #6b7a4a); }

/* ------------------------------------------------------------------ music */
.music {
  position: absolute; z-index: 12; right: var(--gap); bottom: 34px; display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 14px 0 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: right var(--t), opacity var(--t);
}
body.sheet-open .music { right: calc(var(--sheet-w) + var(--gap) * 2); }
.playbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--hot), var(--ochre)); color: #1a0f0a; }
body[data-theme="daylight"] .playbtn { background: linear-gradient(135deg, var(--clay), #D9622A); color: #fff; }
.music-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.music-eyebrow { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.music-title { font-weight: 650; font-size: 1rem; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol { width: 0; opacity: 0; transition: width var(--t), opacity var(--t); accent-color: var(--accent); }
.music:hover .vol, .music:focus-within .vol { width: 78px; opacity: 1; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; width: 16px; }
.eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; height: 40%; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .45s; } .eq i:nth-child(4) { animation-delay: .1s; }
.music:not(.playing) .eq i { animation: none; height: 25%; opacity: .5; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ------------------------------------------------------------------ trail banner, toast */
.trail-banner {
  position: absolute; z-index: 14; top: var(--top); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 32px)); padding: 8px 8px 8px 16px; border-radius: 99px;
  background: var(--panel-solid); border: 1px solid var(--accent-2); box-shadow: var(--shadow); font-size: 1rem; animation: fadeUp .3s var(--ease);
}
.trail-banner b { color: var(--accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast {
  position: fixed; z-index: 95; left: 50%; bottom: 100px; transform: translateX(-50%); padding: 10px 18px; border-radius: 99px;
  background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 1rem; animation: fadeUp .25s var(--ease);
}

/* ------------------------------------------------------------------ tour */
.tour {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 6, 3, .78), rgba(10, 6, 3, .35) 46%, transparent 70%);
  animation: fadeIn .4s ease;
}
body[data-theme="daylight"] .tour { background: linear-gradient(90deg, rgba(250, 246, 239, .82), rgba(250, 246, 239, .35) 46%, transparent 70%); }
@keyframes fadeIn { from { opacity: 0; } }
.tour-card {
  pointer-events: auto; position: absolute; left: 24px; top: 24px; bottom: 24px; width: min(620px, calc(100vw - 48px));
  display: flex; flex-direction: column; border-radius: 24px; padding: 22px 24px 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  animation: slideL .45s var(--ease);
}
.tour-head { display: flex; gap: 14px; align-items: center; }
.tour-head .medal { width: 58px; height: 58px; border-radius: 50%; }
.tour.speaking .tour-head .medal { animation: speak 1.6s ease-in-out infinite; }
@keyframes speak { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent), 0 0 26px color-mix(in srgb, var(--c) 40%, transparent); } 50% { box-shadow: 0 0 0 12px transparent, 0 0 40px var(--c); } }
.tour-titles { flex: 1; min-width: 0; }
.tour-titles h2 { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; }
.tour-titles p { margin: 2px 0 0; font-size: 1rem; }
.tour-text { flex: 1; min-height: 0; overflow: auto; margin: 16px -6px 12px; padding: 4px 6px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tour-text p { margin: 0 0 1em; font-family: var(--font-display); font-size: 1.22rem; line-height: 1.75; color: var(--ink-3); }
.snt { border-radius: 6px; transition: background .35s, color .35s, box-shadow .35s; cursor: pointer; }
.snt:hover { color: var(--ink-2); }
.snt.on { color: var(--ink); background: color-mix(in srgb, var(--accent) 20%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.snt.done { color: var(--ink-2); }
.tour-progress { height: 3px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.tour-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--clay), var(--turmeric)); transition: width .4s var(--ease); }
.tour-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tour-controls .iconbtn { box-shadow: none; }
.mini-select { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; color: var(--ink-3); }
.mini-select select { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); padding: 0 8px; max-width: 170px; }
.warn { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(212, 168, 67, .14); color: var(--accent-2); font-size: 1rem; }
.fineprint { margin: 8px 0 0; font-size: 1rem; color: var(--ink-3); }

/* ------------------------------------------------------------------ intro */
.intro {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; overflow: auto;
  background:
    radial-gradient(1000px circle at 18% 12%, rgba(193, 68, 14, .32), transparent 55%),
    radial-gradient(800px circle at 82% 22%, rgba(61, 90, 62, .32), transparent 60%),
    rgba(14, 8, 4, .58);
  transition: opacity .9s ease, visibility .9s;
}
.intro.leaving { opacity: 0; visibility: hidden; }
.intro-card {
  width: min(760px, 100%); text-align: center; padding: 34px clamp(20px, 5vw, 56px) 30px; border-radius: 28px;
  background: rgba(26, 16, 10, .78); border: 1px solid rgba(232, 146, 58, .25); box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #F6EEDF; animation: fadeUp .9s var(--ease);
}
.intro-card .eyebrow { color: #D4A843; margin: 18px 0 10px; }
.intro-card h1 {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 5.6vw, 3.6rem); line-height: 1.05; letter-spacing: -.01em;
  background: linear-gradient(120deg, #FAF6EF 20%, #E8923A 60%, #D4A843); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-sub { font-family: var(--font-display); font-style: italic; font-size: 1.16rem; color: #E8D9BF; margin: 12px 0 6px; }
.intro-lead { max-width: 560px; margin: 8px auto 22px; color: #BFAE92; font-size: 1rem; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 auto 22px; max-width: 640px; }
.stats div { display: grid; gap: 2px; padding: 12px 6px; border-radius: 14px; background: rgba(255, 236, 210, .05); border: 1px solid rgba(232, 146, 58, .14); }
.stats b { font-family: var(--font-display); font-size: 1.7rem; color: #E8923A; line-height: 1; }
.stats span { font-size: 1rem; color: #BFAE92; line-height: 1.25; }
.intro-lang { box-shadow: none; margin-bottom: 18px; background: rgba(255, 236, 210, .05); color: #F6EEDF; }
.intro-lang button { color: #D9C9AE; }
.intro-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.intro-actions .btn-ghost { color: #D9C9AE; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 18px; font-size: 1rem; color: #BFAE92; cursor: pointer; }
.check input { accent-color: #E8923A; width: 16px; height: 16px; }
.intro-warli { color: #E8923A; }

body.touring .topbar, body.touring .explore, body.touring .sheet, body.touring .trail-banner, body.touring .mapctl { opacity: 0; pointer-events: none; }
body.touring .music { right: var(--gap); }
.explore, .sheet { transition: opacity .4s ease; }
body.intro-on .topbar, body.intro-on .mapctl, body.intro-on .music, body.intro-on .maplibregl-ctrl-attrib { opacity: 0; pointer-events: none; }
.topbar, .mapctl, .music { transition: opacity .6s ease, left var(--t), right var(--t); }

/* ------------------------------------------------------------------ dialogs */
.dialog {
  width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 860px); padding: 0; border-radius: 24px; border: 1px solid var(--line);
  background: var(--panel-solid); color: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
.dialog.wide { width: min(820px, calc(100vw - 24px)); }
.dialog.narrow { width: min(420px, calc(100vw - 24px)); }
.dialog[open] { display: flex; flex-direction: column; animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog::backdrop { background: rgba(10, 6, 3, .55); backdrop-filter: blur(4px); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 12px; border-bottom: 1px solid var(--line-2); position: relative; }
.dlg-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--clay), var(--ochre), var(--turmeric), transparent); }
.dlg-head h2 { margin: 0; flex: 1; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; }
.dlg-head .medal { width: 44px; height: 44px; border-radius: 14px; --c: var(--moss); color: #F6EEDF; background: var(--moss); border-color: var(--moss); box-shadow: none; }
.dlg-body { padding: 18px 22px 24px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dlg-body h3 { font-family: var(--font-display); font-size: 1.12rem; margin: 18px 0 6px; }
.dlg-body h3:first-child { margin-top: 0; }
.dlg-body p, .dlg-body li { color: var(--ink-2); font-size: 1rem; }
.dlg-body ul { padding-left: 20px; }
.dlg-tabs { margin: 12px 22px 0; }
.help-grid { display: grid; gap: 10px; }
.help-item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); }
.help-item .lnum { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-3); color: var(--accent); }
.help-item b { display: block; margin-bottom: 2px; }
.help-item p { margin: 0; font-size: 1rem; }
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.keys div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); font-size: 1rem; color: var(--ink-2); }
.keys kbd { min-width: 52px; text-align: center; font-family: var(--font-mono); font-size: 1rem; color: var(--accent); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.snap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.snap-stats div { padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.snap-stats b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); line-height: 1.1; }
.snap-stats span { font-size: 1rem; color: var(--ink-3); }
.snap-text p { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.7; color: var(--ink-3); margin: 0 0 .8em; }
.snap-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 18px; }
.copybox { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 1rem; color: var(--ink-2); }
.copybox + .copybox { margin-top: 10px; }
.copybox h4 { margin: 0 0 4px; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.copybox .linkbtn { position: absolute; right: 12px; top: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.set-row:last-child { border-bottom: 0; }
.set-row > span { font-weight: 600; font-size: 1rem; }
.set-row .seg { box-shadow: none; height: 40px; }
.credit { margin-top: 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--turmeric) 40%, transparent); background: linear-gradient(135deg, rgba(212, 168, 67, .12), transparent); }
.credit b { color: var(--ink); }


/* ------------------------------------------------------------------ guestbook */
.dialog.xwide { width: min(1120px, calc(100vw - 24px)); }
.dlg-sub { color: var(--ink-3); font-style: italic; margin-left: -4px; flex: 0 1 auto; }
.dlg-head .dlg-sub + * { margin-left: auto; }
.gb-tabs { display: none; margin-bottom: 14px; width: 100%; box-shadow: none; }
.gb-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gb-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.gb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 28px; align-items: start; }
.gb-write h3, .gb-read h3 { margin: 0 0 6px; }
.gb-form { display: grid; gap: 14px; margin-top: 10px; }
.gb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gb-field { display: grid; gap: 6px; }
.gb-label { font-weight: 700; color: var(--ink-2); }
.gb-label em { color: var(--accent); font-style: normal; }
.gb-form input[type="text"], .gb-form select, .gb-form textarea, .gb-tools input, .gb-tools select {
  width: 100%; min-height: 46px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color var(--t), box-shadow var(--t);
}
.gb-form textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.gb-form input:focus, .gb-form select:focus, .gb-form textarea:focus, .gb-tools input:focus, .gb-tools select:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.gb-form ::placeholder, .gb-tools ::placeholder { color: var(--ink-3); }
.gb-form select option, .gb-tools select option { background: var(--panel-solid); color: var(--ink); }
.gb-counter { justify-self: end; margin-top: -8px; color: var(--ink-3); }
.gb-counter.low { color: var(--hot); font-weight: 700; }
.gb-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.gb-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.gb-consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.gb-actions .btn { width: 100%; justify-content: center; }
.gb-status { margin: 0; min-height: 1.4em; color: var(--hot); font-weight: 600; }
.gb-status.ok { color: #6FBF73; }
body[data-theme="daylight"] .gb-status.ok { color: #2F7A3A; }
.gb-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: rgba(212, 168, 67, .12); color: var(--accent-2); margin: 10px 0 0; }
.gb-note .ic { margin-top: 4px; }
.gb-read { border-left: 1px solid var(--line-2); padding-left: 26px; min-width: 0; }
.gb-read-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gb-count { display: inline-block; min-width: 30px; padding: 0 8px; border-radius: 99px; background: var(--panel-3); color: var(--accent); text-align: center; font-size: 1rem; }
.gb-tools { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin: 10px 0 12px; }
.gb-scroll { max-height: min(58vh, 620px); overflow: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.gb-list { display: grid; gap: 12px; }
.gb-card { position: relative; padding: 14px 16px 14px 18px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); overflow: hidden; animation: fadeUp .3s var(--ease); }
.gb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.gb-card-head { display: flex; align-items: center; gap: 12px; }
.gb-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; color: #fff; background: color-mix(in srgb, var(--c) 85%, #000); border: 2px solid color-mix(in srgb, var(--c) 60%, #fff); }
.gb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.gb-who b { font-size: 1.05rem; }
.gb-meta { color: var(--ink-3); }
.gb-flag { margin-left: auto; flex: none; padding: 2px 10px; border-radius: 99px; background: rgba(111, 191, 115, .16); color: #6FBF73; font-weight: 700; }
body[data-theme="daylight"] .gb-flag { color: #2F7A3A; }
.gb-pill { display: inline-block; margin: 10px 0 0; padding: 2px 12px; border-radius: 99px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--ink); font-weight: 600; }
.gb-text { margin: 10px 0 0; color: var(--ink); font-size: 1.08rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.gb-text::before { content: "“"; color: var(--accent); font-size: 1.4rem; line-height: 0; margin-right: 2px; }
.gb-text::after { content: "”"; color: var(--accent); font-size: 1.4rem; line-height: 0; margin-left: 2px; }
.gb-food { margin-top: 10px; }
.gb-more { width: 100%; box-shadow: none; }
.gb-entry .gb-card { margin-top: 10px; }
@media (max-width: 860px) {
  .gb-tabs { display: flex; }
  .gb-grid { grid-template-columns: 1fr; }
  .gb-read { border-left: 0; padding-left: 0; }
  #dlgGuestbook[data-tab="write"] .gb-read, #dlgGuestbook[data-tab="read"] .gb-write { display: none; }
  .gb-scroll { max-height: none; }
  .dlg-sub { display: none; }
}
@media (max-width: 480px) { .gb-two, .gb-tools { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Google Translate chrome */
.gt-host { position: fixed; left: -9999px; top: -9999px; }
body { top: 0 !important; position: static !important; }
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; visibility: hidden !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { background: transparent !important; box-shadow: none !important; }

/* ------------------------------------------------------------------ embed mode */
body.embed .brand-sub, body.embed #btnSettings, body.embed #btnAbout { display: none; }
@media (max-width: 1720px) {
  .brand-sub { display: none; }
}
@media (max-width: 1560px) {
  #btnExplore .btn-label, #btnGuestbook .btn-label { display: none; }
  #btnExplore, #btnGuestbook { width: 46px; padding: 0; }
  #btnExplore .badge { position: absolute; transform: translate(14px, -14px); }
}
@media (max-width: 1280px) { body.embed .brand-text { display: none; } body.embed .brand { padding: 0; width: 44px; justify-content: center; } }
body.embed .music { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  :root { --sheet-w: 450px; --explore-w: 350px; }
  .brand-sub { display: none; }
  #btnSnapshot .btn-label, #btnExplore .btn-label { display: none; }
  #btnSnapshot, #btnExplore { width: 44px; padding: 0; }
  #btnExplore .badge { position: absolute; transform: translate(14px, -14px); }
  body.sheet-open .music .music-meta, body.sheet-open .music .vol { display: none; }
}
@media (max-width: 1180px) {
  .brand-text { display: none; }
  .brand { padding: 0; width: 44px; justify-content: center; }
  body.sheet-open.explore-open .mapctl { opacity: 0; pointer-events: none; }
}
@media (max-width: 760px) {
  :root { --gap: 10px; --top: 116px; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .tb-left { order: 1; }
  .tb-search { order: 2; flex: 1 1 0; max-width: none; margin: 0; min-width: 0; }
  .tb-right { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tb-right > * { flex: none; }
  .tb-right::-webkit-scrollbar { display: none; }
  .kbd { display: none; }
  .search-results { position: fixed; left: 10px; right: 10px; top: 62px; }
  .explore, .sheet {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; height: 78vh; height: 78dvh;
    border-radius: 22px 22px 0 0; animation: slideU .35s var(--ease); border-bottom: 0;
  }
  .sheet.short { height: 52vh; height: 52dvh; }
  .explore::after, .sheet::after { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 4px; background: var(--line); }
  @keyframes slideU { from { transform: translateY(40px); opacity: 0; } }
  .mapctl { left: auto; right: var(--gap); bottom: 84px; }
  #ctlIn, #ctlOut, #ctlNorth, .ctl-sep { display: none; }
  body.explore-open .mapctl, body.sheet-open .mapctl, body.explore-open .music, body.sheet-open .music { opacity: 0; pointer-events: none; }
  .music { right: auto; left: var(--gap); bottom: 22px; height: 50px; padding: 0 10px; }
  .music .music-meta, .music .vol, .music .iconbtn { display: none; }
  .popover { left: auto; right: 52px; }
  .hero h2 { font-size: 1.45rem; }
  .tour { background: linear-gradient(0deg, rgba(10, 6, 3, .85), rgba(10, 6, 3, .3) 60%, transparent); }
  .tour-card { left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: 66vh; height: 66dvh; border-radius: 22px 22px 0 0; padding: 18px 16px 12px; animation: slideU .4s var(--ease); }
  .tour-text p { font-size: 1.08rem; }
  .tour-card { height: 72vh; height: 72dvh; }
  .tour-titles h2 { font-size: 1.22rem; }
  .tour-head .medal { width: 46px; height: 46px; }
  .tour .fineprint { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(n+4) { display: none; }
  .keys { grid-template-columns: 1fr; }
  .snap-stats b { font-size: 1.3rem; }
  .trail-banner { top: auto; bottom: 92px; }
}
@media (max-width: 420px) {
  .actions .btn:not(.btn-accent) .btn-label { display: none; }
}

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