/* webgeo: web-GIS shell in PySplat's visual language (dark by default, light when the system asks for it). */
:root {
  --bg: #0f1216;
  --surface: #161a20;
  --surface-2: #1d232b;
  --surface-3: #252c36;
  --line: #2a313b;
  --text: #e6e9ee;
  --muted: #8d97a5;
  --accent: #4fb3a9;
  --accent-ink: #0b1413;
  --accent-2: #e0a84f;
  --danger: #e06c5f;
  --ok: #6fc28f;
  --radius: 8px;
  --top: 52px;
  --left-w: 340px;
  --right-w: 380px;
  --table-h: 34vh;
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1f3; --surface: #ffffff; --surface-2: #f3f5f7; --surface-3: #e6eaee; --line: #d6dce2;
    --text: #1b2228; --muted: #5d6874; --accent: #1f7f75; --accent-ink: #ffffff; --accent-2: #a8701c;
    --danger: #b8463a; --ok: #2f7d4f; color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
[hidden] { display: none !important; }
.ic { flex: none; display: block; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------------- controls */
button, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 10px; cursor: pointer; white-space: nowrap;
}
button:hover { border-color: color-mix(in srgb, var(--line), var(--text) 25%); }
button:disabled { opacity: .45; cursor: default; }
button.primary, button.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn { padding: 4px; background: none; border-color: transparent; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; white-space: normal; text-align: left; }
select, input:not([type="checkbox"]):not([type="range"]), textarea {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0;
}
input[type="range"], input[type="checkbox"] { accent-color: var(--accent); }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.empty { color: var(--muted); padding: 16px; text-align: center; }

/* ------------------------------------------------------------- shell grid */
#app {
  display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: var(--left-w) 1fr 0;
  grid-template-rows: var(--top) 1fr 0;
  grid-template-areas: "top top top" "left map detail" "left table detail";
}
body.has-detail #app { grid-template-columns: var(--left-w) 1fr var(--right-w); }
body.has-table #app { grid-template-rows: var(--top) 1fr var(--table-h); }

#topbar {
  grid-area: top; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.brand .mark { width: 18px; height: 14px; flex: none; background: var(--accent);
  clip-path: polygon(0 20%, 33% 0, 66% 20%, 100% 0, 100% 80%, 66% 100%, 33% 80%, 0 100%); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 6px; position: relative; }
.search span { position: absolute; left: 9px; color: var(--muted); }
.search input { width: 100%; padding-left: 32px !important; height: 34px; border-radius: 17px !important; }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.cart-btn { gap: 7px; }
.cart-btn .count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent-2); color: #1b1305;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; padding: 0 5px; }
.cart-btn .count.zero { background: var(--surface-3); color: var(--muted); }
.mobile-only { display: none; }

/* ------------------------------------------------------------- left: catalog */
#left { grid-area: left; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.tab { flex: 1; justify-content: center; border: 0; border-radius: 0; background: none; padding: 10px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); background: none; }
.tab-body { flex: 1; min-height: 0; overflow-y: auto; }
#facets { padding: 10px 12px 2px; display: flex; flex-direction: column; gap: 9px; }
.facet-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 2px 8px; border-radius: 12px; font-size: 12px; gap: 5px; background: var(--surface-2); }
.chip .n { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chip.on { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); border-color: var(--accent); }
.chip.static { cursor: default; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.clear { font-size: 12px; align-self: flex-start; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 6px; font-size: 12px; }
.list-head select { padding: 3px 6px; font-size: 12px; }

.results { list-style: none; margin: 0; padding: 0 6px 12px; }
.result { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 6px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.result:hover, .result.hover { background: var(--surface-2); }
.result.active { background: var(--surface-2); border-color: var(--accent); }
.result .thumb { width: 64px; height: 52px; border-radius: 4px; overflow: hidden; background: var(--surface-3);
  display: grid; place-items: center; color: var(--muted); }
.result .thumb img { width: 100%; height: 100%; object-fit: contain; }
.result .body { min-width: 0; }
.result .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.result .sub { display: flex; gap: 6px; align-items: center; font-size: 11.5px; margin-top: 2px; flex-wrap: wrap; }
.type { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 4px; padding: 0 5px; }
.flag { font-size: 10.5px; color: var(--accent-2); border: 1px dashed currentColor; border-radius: 4px; padding: 0 4px; }
.flag.free { color: var(--ok); border-style: solid; }
.more { text-align: center; padding: 8px; }

.onmap { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.onmap li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; }
.onmap .row1 { display: flex; align-items: center; gap: 4px; }
.onmap .title { flex: 1; min-width: 0; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; border: 1.5px solid transparent; }
.opacity { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.opacity input { flex: 1; }
.detail-style { padding: 0 2px; }
.styleby { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.styleby select { flex: 1; min-width: 0; padding: 2px 6px; font-size: 12px; }
.classes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; font-size: 12px; }
.classes li { display: flex; align-items: center; gap: 7px; }
.classes .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classes .n { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- map */
#map-wrap { grid-area: map; position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }
.map-ctl { position: absolute; top: 10px; right: 10px; display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.map-ctl button { border: 0; border-radius: 0; background: none; padding: 5px 10px; font-size: 12px; }
.map-ctl button.active { background: var(--accent); color: var(--accent-ink); }
#fp-toggle { top: 46px; }
.game-ctl { top: 82px; flex-direction: column; align-items: stretch; width: 190px; }
.game-ctl > button { text-align: left; }
.game-body { display: flex; flex-direction: column; gap: 5px; padding: 6px 8px 8px; border-top: 1px solid var(--line); }
.game-body select, .game-body input { width: 100%; padding: 3px 6px; font-size: 12px; }
.game-hint { color: var(--accent-2); }
.game-active:empty { display: none; }
.game-readout { position: absolute; left: 10px; bottom: 34px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; font: 11.5px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--text); pointer-events: none; white-space: nowrap; }
.game-readout:empty { display: none; }
.game-label { font: 600 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; color: #fff; pointer-events: none;
  text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; }
.game-label.off { opacity: 0.45; }
.game-off { margin: 6px 0 2px; font-weight: 600; color: var(--muted, #666); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.game-kv tr.on th, .game-kv tr.on td { color: var(--accent-2); font-weight: 600; }
.game-kv button.link { padding: 0; }
.pop-sub { font-weight: 600; margin: 10px 0 4px; }
.auth-btn { font-size: 12.5px; padding: 5px 11px; border-radius: 16px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-btn.on { border-color: var(--accent); color: var(--accent); }
.game-color { display: flex; flex-direction: column; gap: 3px; color: var(--muted); margin-top: 2px; }
.game-legend { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.game-legend li { display: flex; align-items: center; gap: 7px; }
.game-legend .sw, .game-legend-box .sw { width: 14px; height: 10px; border-radius: 2px; flex: none; }
.game-legend-box p { margin: 3px 0 0; }
.feature-pop .game-species .classes { max-height: 150px; }
.game-hist { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 3px; height: 58px; }
.game-hist li { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.game-hist .bar { width: 100%; background: #22a884; border-radius: 2px 2px 0 0; min-height: 1px; }
.game-hist .lb { font-size: 9.5px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.map-msg { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 6px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.maplibregl-popup-content { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; box-shadow: 0 6px 20px rgb(0 0 0 / .35); font: 12.5px/1.4 system-ui, sans-serif; }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 0 6px; }
.pop-head { font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0 16px 6px 0; }
.pick { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.pick li { display: flex; flex-direction: column; }

table.kv { border-collapse: collapse; width: 100%; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--line); }
.kv th { color: var(--muted); font-weight: 500; white-space: nowrap; width: 1%; }
.kv td { word-break: break-word; }
.feature-pop .kv { max-height: 260px; display: block; overflow-y: auto; margin-bottom: 6px; }

/* ------------------------------------------------------------- right: detail */
#detail { grid-area: detail; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-left: 1px solid var(--line); }
.detail-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.detail-head .type { margin-right: auto; }
.detail-scroll { overflow-y: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.detail-scroll > * { flex: none; }
.detail-scroll h2 { font-size: 17px; line-height: 1.3; }
.detail-scroll h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-top: 8px; }
.preview { padding: 0; display: grid; place-items: center; background: var(--surface-3); border-radius: 6px; overflow: hidden; height: 220px; width: 100%;
  background-image: conic-gradient(var(--surface-2) 25%, var(--surface-3) 0 50%, var(--surface-2) 0 75%, var(--surface-3) 0); background-size: 16px 16px; }
.preview img { max-width: 100%; max-height: 220px; object-fit: contain; }
.preview.none { color: var(--muted); gap: 6px; align-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.prose { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.facts td { font-variant-numeric: tabular-nums; }
.stats td, .stats th { font-variant-numeric: tabular-nums; font-size: 12px; }
.fields { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 14px; font-size: 12px; }
.fields li { display: flex; justify-content: space-between; gap: 6px; break-inside: avoid; padding: 1px 0; }
.fields li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.warn { margin: 0; padding: 6px 9px; border-radius: 6px; border: 1px solid var(--accent-2); color: var(--accent-2); }
.note { margin: 0; padding: 6px 9px; border-radius: 6px; background: var(--surface-2); }

/* ------------------------------------------------------------- bottom: attribute table */
#table-drawer { grid-area: table; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-top: 1px solid var(--line); }
#table-drawer header { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
#table-drawer header input { margin-left: auto; width: 220px; padding: 3px 8px; }
.table-scroll { overflow: auto; flex: 1; }
#table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
#table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; }
#table th, #table td { padding: 4px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
#table tbody tr { cursor: pointer; }
#table tbody tr:hover { background: var(--surface-2); }
#table tr.sel { background: color-mix(in srgb, var(--accent) 22%, transparent); }
#table tr.pinned td { border-bottom: 2px solid var(--accent); }
#table caption { caption-side: bottom; color: var(--muted); padding: 6px; text-align: left; }

/* ------------------------------------------------------------- dialogs */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 20px 60px rgb(0 0 0 / .45); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
dialog > header, dialog form > header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dialog form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dialog-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.dialog-body > label, .grid2 label, #auth-newpw label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.dialog-body label.check { flex-direction: row; color: var(--text); font-size: 13px; }
.dialog-body p { margin: 0; }
#auth-newpw { display: flex; flex-direction: column; gap: 10px; }
#auth-newpw[hidden] { display: none; }
#auth-newpw .primary { align-self: flex-start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cart-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; max-height: 180px; overflow-y: auto; }
.cart-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.cart-list li:last-child { border-bottom: 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.4em; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
#lightbox { width: auto; max-width: calc(100vw - 24px); background: var(--surface-2); padding: 0; position: fixed; }
#lightbox img { display: block; max-width: calc(100vw - 26px); max-height: calc(100dvh - 26px); }
#lightbox [data-close] { position: absolute; top: 6px; right: 6px; background: var(--surface); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.legend li { display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------- wide screens: filters and list side by side */
@media (min-width: 1200px) {
  :root { --left-w: 540px; }
  #tab-results:not([hidden]) { display: grid; grid-template-columns: 188px 1fr; overflow: hidden; }
  #facets { overflow-y: auto; border-right: 1px solid var(--line); padding: 10px 10px 12px; gap: 14px; }
  #facets .chips { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  #facets .chip { justify-content: flex-start; border-radius: 5px; padding: 3px 8px; text-align: left; border-color: transparent; background: none; }
  #facets .chip:hover { background: var(--surface-2); }
  #facets .chip.on { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); border-color: var(--accent); }
  #facets .chip .n { margin-left: auto; }
  .list-col { overflow-y: auto; min-height: 0; }
  .list-head { position: sticky; top: 0; z-index: 1; background: var(--surface); }
  .result { grid-template-columns: 104px 1fr; gap: 12px; }
  .result .thumb { width: 104px; height: 78px; }
}

/* ------------------------------------------------------------- narrow screens */
@media (max-width: 860px) {
  :root { --left-w: 0px; --table-h: 40vh; }
  .mobile-only { display: inline-flex; }
  .brand span:last-child { display: none; }
  .cart-btn .label { display: none; }
  #app, body.has-detail #app { grid-template-columns: 0 1fr 0; }
  #left { position: fixed; z-index: 5; top: var(--top); bottom: 0; left: 0; width: min(360px, 92vw); transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 30px rgb(0 0 0 / .4); }
  body.show-left #left { transform: none; }
  #detail { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; height: 62dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .35); }
  .grid2 { grid-template-columns: 1fr; }
  .fields { columns: 1; }
  .game-ctl { width: 156px; }
}
@media (prefers-reduced-motion: reduce) { #left { transition: none; } }
.onmap .classes li { background: none; border: 0; padding: 0; border-radius: 0; }
.feature-pop .maplibregl-popup-content { max-height: min(48vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.feature-pop .maplibregl-popup-close-button { position: sticky; float: right; top: 0; z-index: 1; background: var(--surface); border-radius: 4px; }
.tilt-ctrl[hidden] { display: none; }
.tilt-ctrl button { font: 700 11px/1 system-ui, sans-serif; color: #333; }
/* "Filtered" chip over the map, so the filters can be cleared without scrolling the list */
.map-filter { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); font-size: 12.5px; }
.map-filter[hidden] { display: none; }
.map-filter button { border-radius: 999px; padding: 3px 10px; }
/* result rows: map button (accent while the layer is on the map; click again to remove) and zoom on hover */
.result { position: relative; }
.result .body { padding-right: 30px; }
.tile-btns { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.tile-btn { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px; line-height: 0; cursor: pointer; color: var(--muted); }
.tile-btn:hover { color: var(--text); border-color: var(--muted); }
.tile-btn.zoom-btn { opacity: 0; transition: opacity .12s; }
.result:hover .zoom-btn, .result:focus-within .zoom-btn { opacity: 1; }
.tile-btn.map-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-btn.map-btn.on:hover { background: #b3473b; border-color: #b3473b; }
.result.on-map { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* the details panel slides in and out from the right */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  #app { transition: grid-template-columns .25s ease; }
  #detail { width: var(--right-w); }
}
/* first visit hint */
.map-hint { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 4; width: min(420px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 8px 28px rgb(0 0 0 / .35); }
.map-hint[hidden] { display: none; }
.map-hint h3 { margin: 0 0 8px; font-size: 15px; }
.map-hint ul { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; }
.map-hint li[hidden] { display: none; }
/* request box in the details panel */
.request-box { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2, transparent); }
.request-box > div { display: flex; flex-direction: column; gap: 2px; flex: 1; font-size: 12.5px; }
.request-box span { color: var(--muted); }
.request-box.free { border-left: 4px solid #2a9d52; }
.request-box.approval { border-left: 4px solid var(--accent-2); }
.request-box button { flex: none; }
/* plain-language help */
th.has-help { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.game-help { color: var(--muted); margin: 4px 0 0; line-height: 1.35; }
.ramp-legend { margin: 6px 0 10px; }
.ramp-legend .ramp { display: block; height: 10px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.12); }
.ramp-legend .ramp-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
#game-about .prose p { margin: 0 0 8px; line-height: 1.5; font-size: 13.5px; }
/* phones: one clear List / Map switch */
.mobile-switch { display: none; }
@media (max-width: 860px) {
  .mobile-switch { display: flex; position: fixed; z-index: 7; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: 0 4px 16px rgb(0 0 0 / .35); }
  .mobile-switch button { border: 0; background: transparent; border-radius: 999px; padding: 7px 18px; font-weight: 600; color: var(--muted); }
  .mobile-switch button.on { background: var(--accent); color: var(--accent-ink); }
  body.has-detail .mobile-switch { display: none; }
  .map-hint { top: 12px; }
}
.scene-pick { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--line, rgba(127,127,127,0.25)); border-radius: 8px; }
.scene-pick label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); flex: 1; }
.scene-pick select { font: inherit; font-size: 13px; }
.scene-pick .scene-row { display: flex; gap: 8px; }
.scene-pick .scene-help, .scene-pick .scene-status { margin: 0; }
