/* Slop Cities world map, in Slop New York's HUD design system (css/style.css
   there): quiet graphite glass in the corners of the screen, taxi yellow for
   whatever is active, NYC DOT green for the selected city's name sign, so the
   map itself stays the star. */

:root {
  /* Surfaces */
  --glass: rgba(18, 19, 22, 0.62);
  --glass-strong: rgba(16, 17, 20, 0.88);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --hover: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.1);

  /* Text */
  --text: #f6f5f2;
  --text-2: rgba(246, 245, 242, 0.68);
  --text-3: rgba(246, 245, 242, 0.44);

  /* Accents */
  --taxi: #ffc21a;
  --taxi-ink: #17140a;
  --sign-green: #0b6a46;
  --highway: #c08a3e;
  --search: #5fd0ff;

  /* Shape & motion */
  --edge: 20px;
  --bar-h: 50px;
  --side-w: 290px;
  --r-panel: 16px;
  --r-ctl: 10px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.2);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-sign: 'Overpass', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background-color: #0a0b0d;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(246, 245, 242, 0.35); }
a:hover { text-decoration-color: var(--text); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
kbd {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 5px;
  font-family: var(--font-sans); font-size: 10.5px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--text-2); background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.panel {
  background: var(--grain), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-panel);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow);
}

/* ---------- HUD corners ---------- */
.hud { position: fixed; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top-left { top: max(var(--edge), env(safe-area-inset-top)); left: max(var(--edge), env(safe-area-inset-left)); }
.hud-top-right { top: max(var(--edge), env(safe-area-inset-top)); right: max(var(--edge), env(safe-area-inset-right)); }

.brand { display: flex; align-items: center; gap: 11px; height: var(--bar-h); padding: 0 18px 0 9px; width: var(--side-w); }
.mta-bullet {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--taxi); color: var(--taxi-ink);
  font-weight: 800; font-size: 12.5px; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.brand-titles { min-width: 0; }
.brand-heading { display: flex; align-items: center; gap: 10px; }
.brand-titles h1 { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.repo-link { flex: none; padding: 3px 0; color: var(--text-2); font-size: 11px; line-height: 1; text-decoration: none; white-space: nowrap; }
.repo-link:hover, .repo-link:focus-visible { color: var(--text); text-decoration: underline; }
.brand-subtitle { font-size: 11.5px; line-height: 1.4; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; align-items: center; gap: 2px; height: var(--bar-h); padding: 0 5px; }
.toolbar-divider { flex: none; width: 1px; height: 20px; margin: 0 5px; background: var(--divider); }
.modes { position: relative; display: flex; gap: 2px; }
.mode-indicator {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: 0;
  width: var(--ind-w, 0px); transform: translateX(var(--ind-x, 0px));
  border-radius: var(--r-ctl); background: var(--taxi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out);
}
.mode-btn {
  position: relative; z-index: 1; height: 36px; padding: 0 10px 0 12px; border-radius: var(--r-ctl);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text-2);
  transition: color 0.25s ease, background-color 0.2s ease;
}
.mode-btn:hover { color: var(--text); background: var(--hover); }
.mode-btn[aria-selected="true"], .mode-btn[aria-selected="true"]:hover { color: var(--taxi-ink); background: transparent; }
.mode-btn[aria-selected="true"] kbd { color: rgba(23, 20, 10, 0.62); background: rgba(23, 20, 10, 0.1); box-shadow: none; }
.tool-btn {
  height: 36px; padding: 0 11px; border-radius: var(--r-ctl);
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 550; color: var(--text-2); white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tool-btn:hover { color: var(--text); background: var(--hover); }
.tool-btn[aria-pressed="true"] { background: var(--text); color: #121314; }
.tool-btn:active, .mode-btn:active, .icon-btn:active { transform: scale(0.96); }

/* ---------- Layers popover ---------- */
.popover {
  position: fixed; inset: auto;
  top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--bar-h) + 8px);
  right: max(var(--edge), env(safe-area-inset-right));
  margin: 0; padding: 6px; min-width: 264px;
  color: var(--text);
  background: var(--grain), var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 28px 60px -22px rgba(0, 0, 0, 0.8), 0 4px 14px rgba(0, 0, 0, 0.3);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.26s var(--ease-out), overlay 0.26s allow-discrete, display 0.26s allow-discrete;
}
.popover:not(:popover-open) { opacity: 0; transform: translateY(-4px) scale(0.98); }
@starting-style { .popover:popover-open { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pop-title { padding: 9px 10px 6px; font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.pop-title:not(:first-child) { margin-top: 5px; padding-top: 12px; border-top: 1px solid var(--divider); }
.pop-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px; border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 550; transition: background-color 0.15s ease;
}
.pop-item:hover { background: var(--hover); }
.pop-item small { display: block; font-size: 11.5px; font-weight: 450; color: var(--text-3); }
.pop-item input { position: absolute; opacity: 0; pointer-events: none; }
.pop-item:has(input:focus-visible) { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: -2px; }
.switch { flex: none; width: 30px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.14); position: relative; transition: background-color 0.2s ease; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform 0.25s var(--ease-out); }
.pop-item:has(input:checked) .switch { background: var(--taxi); }
.pop-item:has(input:checked) .switch::after { transform: translateX(12px); background: var(--taxi-ink); }
.pop-item .dot { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.pop-item:has(input:checked) .dot { box-shadow: inset 0 0 0 5px var(--taxi); }
.mode-3d .only-2d, body:not(.mode-3d):not(.mode-compare) .only-3d, body:not(.mode-compare) .only-compare { display: none; }

/* ---------- City list ---------- */
.side {
  position: fixed; z-index: 9;
  top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--bar-h) + 10px);
  left: max(var(--edge), env(safe-area-inset-left));
  bottom: var(--edge); width: var(--side-w);
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-handle { display: none; }
.search {
  display: flex; align-items: center; gap: 10px; margin: 6px; padding: 0 10px 0 12px; height: 40px;
  border-radius: var(--r-ctl); background: rgba(255, 255, 255, 0.05); color: var(--text-3); cursor: text;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.search:focus-within { background: rgba(255, 255, 255, 0.09); color: var(--text-2); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 13.5px; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.chips-toggle {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 3px; margin: 0 10px 4px; padding: 2px 6px; border-radius: 6px;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.chips-toggle:hover { background: var(--hover); color: var(--text-2); }
.chips-toggle .chev { width: 12px; height: 12px; transition: transform 0.2s ease; }
.chips-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 8px; }
/* Collapsed: only the filter in use stays, so it can still be seen and cleared. */
.chips.collapsed .chip:not(.on) { display: none; }
.chips.collapsed:not(:has(.chip.on)) { display: none; }
.chip {
  height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--text-2);
  background: rgba(255, 255, 255, 0.06); transition: background-color 0.15s ease, color 0.15s ease;
}
.chip span { margin-left: 2px; font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--hover); color: var(--text); }
.chip.on { background: var(--taxi); color: var(--taxi-ink); }
.chip.on span { color: rgba(23, 20, 10, 0.6); }
.labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.label-badge { font-size: 10.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; color: var(--text-2); background: rgba(255, 255, 255, 0.08); }
.label-badge.pick { color: var(--taxi-ink); background: var(--taxi); }
.takes li.pick { background: rgba(255, 194, 26, 0.05); border-radius: 10px; }
.chip.lbl { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.flag.open { color: var(--text-2); background: rgba(255, 255, 255, 0.08); }
.pin.filtered { display: none; }
.stats { padding: 2px 16px 8px; font-size: 11.5px; line-height: 1.45; color: var(--text-3); }
.list { flex: 1; overflow: auto; padding: 0 6px 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.list h3 {
  display: flex; justify-content: space-between;
  padding: 12px 10px 5px; margin-top: 4px; border-top: 1px solid var(--divider);
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.list h3:first-child { border-top: 0; margin-top: 0; }
.list ul { list-style: none; }
.list button {
  width: 100%; display: flex; align-items: baseline; gap: 8px; text-align: left;
  padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 550;
  transition: background-color 0.15s ease;
}
.list button:hover, .list button.hover { background: var(--hover); }
.list button.on, .list button.on:hover { background: var(--text); color: #121314; }
.list button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text); flex: none; transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); }
.list button.original::before { background: var(--taxi); }
.list button.on::before { background: #121314; box-shadow: none; }
.list button.on.original::before { background: var(--taxi); box-shadow: 0 0 0 1.5px #121314; }
.list .nm { white-space: nowrap; }
.list .ct { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 450; color: var(--text-3); }
.list button.on .ct { color: rgba(18, 19, 20, 0.6); }
.list .n { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--text-2); }
.list button.on .n { background: rgba(0, 0, 0, 0.1); color: rgba(18, 19, 20, 0.7); }
.list .tagline { font-size: 11px; font-weight: 600; color: var(--taxi); }
.list button.on .tagline { color: #8a6500; }
.list .none { padding: 10px; color: var(--text-3); }
.foot { padding: 9px 16px 11px; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--divider); }
.foot a { color: var(--text-2); }
.foot .add-city { display: inline-block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--taxi); text-decoration: none; }
.foot .add-city:hover { text-decoration: underline; }

/* ---------- Views ---------- */
.views { position: fixed; inset: 0; display: grid; z-index: 1; }
.mode-2d .views, .mode-3d .views { grid-template-columns: 1fr; }
.mode-2d .view-3d, .mode-3d .view-2d { display: none; }
/* Compare: the flat map takes the space right of the list, the globe the other half. */
/* Both halves show the same width of map: the flat map's column also holds the list. */
.mode-compare .views { grid-template-columns: calc(50% + (var(--side-w) + var(--edge)) / 2) 1fr; }
.mode-compare .view-2d { box-shadow: 1px 0 0 var(--divider); z-index: 1; }
.view { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.stage { position: absolute; inset: 0; }
/* The flat map is laid out to the right of the list panel, so the list never covers it. */
.view-2d .stage { left: calc(var(--side-w) + var(--edge)); top: calc(var(--bar-h) + var(--edge)); }
.mode-3d .view-3d .stage, .mode-compare .view-3d .stage { top: calc(var(--bar-h) + var(--edge)); }
.mode-3d .view-3d .stage { left: calc(var(--side-w) + var(--edge)); }
.caption {
  position: absolute; left: 50%; bottom: var(--edge); translate: -50% 0; z-index: 2;
  padding: 7px 14px; font-size: 12px; font-weight: 550; color: var(--text-2); white-space: nowrap; pointer-events: none; display: none;
}
.mode-compare .caption { display: block; }
.mode-compare .view-2d .caption { left: calc(50% + (var(--side-w) + var(--edge)) / 2); }
.map-zoom { position: absolute; right: var(--edge); bottom: var(--edge); z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 14px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-ctl);
  display: grid; place-items: center; font-size: 17px; line-height: 1; color: var(--text-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.mode-compare .view-2d .map-zoom { right: calc(var(--edge) / 2); }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); pointer-events: none; }
.loading[hidden] { display: none; }
.boot { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); font-weight: 550; background: #0a0b0d; }

/* ---------- 2D map ---------- */
.map2d { touch-action: none; cursor: grab; }
.map2d.dragging { cursor: grabbing; }
.map2d svg { position: absolute; left: 0; top: 0; display: block; }
.map2d .terrain { transform-origin: 0 0; will-change: transform; pointer-events: none; }
.map2d .facets path { stroke-width: 0.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.map2d .outline { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.map2d .outline-glow { fill: #000; opacity: 0.5; }
.map2d .graticule { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 0.7px; vector-effect: non-scaling-stroke; }
.map2d .overlay { overflow: visible; }
.map2d.no-ocean .sea, .map2d.no-ocean .sea-only { display: none; }
.arc { fill: none; stroke: var(--taxi); stroke-linecap: round; opacity: 0.8; transition: opacity 0.25s; }
.arc.remix { stroke: var(--search); }
.arc.dim { opacity: 0.12; }
.arc.hot { opacity: 1; }
/* Pins: white landmark dots with a graphite ring; New York and the selection in taxi yellow. */
.pin { cursor: pointer; outline: none; }
.pin .dot { fill: #f6f5f2; stroke: #0b0f14; stroke-width: 2; }
.pin .core { fill: #0b0f14; }
.pin.original .dot { fill: var(--taxi); }
.pin .badge { display: none; }
.pin .pulse { fill: none; stroke: var(--taxi); stroke-width: 1.5; opacity: 0; }
.pin.selected .pulse { animation: pulse 1.6s ease-out infinite; }
.pin.selected .dot { fill: var(--taxi); stroke: #0b0f14; }
.pin.selected .core { fill: var(--taxi-ink); }
.pin.hovered .dot, .pin:focus-visible .dot { stroke: #fff; }
.pin.dim { opacity: 0.45; }
@keyframes pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
.label {
  fill: var(--text); paint-order: stroke; stroke: rgba(8, 11, 15, 0.9); stroke-linejoin: round;
  font-family: var(--font-sans); font-weight: 600; pointer-events: none;
}
.label.strong { font-weight: 700; }
.pin.selected + .label, .label.strong { fill: #fff; }

/* ---------- 3D globe ---------- */
.globe3d canvas { display: block; touch-action: none; cursor: grab; }
.globe3d canvas:active { cursor: grabbing; }
.globe-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glabel {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; white-space: nowrap;
  display: flex; gap: 6px; align-items: center;
  padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.8);
}
.glabel b { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.glabel.original { color: var(--taxi); }
/* The selected city gets an NYC street-name sign. */
.glabel.strong {
  padding: 6px 11px 4px; border-radius: 6px; border: 0;
  font-family: var(--font-sign); font-size: 14px; font-weight: 700; letter-spacing: 0.01em; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%), var(--sign-green);
  outline: 1.5px solid rgba(255, 255, 255, 0.92); outline-offset: -4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 10px 22px -10px rgba(0, 0, 0, 0.75);
}
.glabel.strong b { background: rgba(255, 255, 255, 0.2); }
.glabel.dim { opacity: 0.45 !important; }

/* ---------- City card ---------- */
.card {
  position: fixed; z-index: 11;
  top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--bar-h) + 10px);
  right: max(var(--edge), env(safe-area-inset-right));
  width: 340px; max-height: calc(100% - var(--bar-h) - 3 * var(--edge) - 10px - 140px);
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: var(--grain), var(--glass-strong);
}
.card[hidden] { display: none; }
.card .close {
  position: absolute; right: 8px; top: 8px; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; line-height: 1; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
}
.card .shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 15px 15px 0 0; }
.card header { padding: 16px 16px 4px; }
.card h2 {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 9px 13px 7px; border-radius: 6px;
  font-family: var(--font-sign); font-size: 18px; font-weight: 700; line-height: 1.05; letter-spacing: 0.01em; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%), var(--sign-green);
  outline: 1.5px solid rgba(255, 255, 255, 0.92); outline-offset: -4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 10px 22px -10px rgba(0, 0, 0, 0.75);
}
.card header p { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.card .lineage { padding: 2px 16px 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.card h4 { padding: 12px 16px 4px; border-top: 1px solid var(--divider); font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.takes { list-style: none; padding: 0 6px 8px; }
.takes li { padding: 11px 10px; border-top: 1px solid var(--divider); }
.takes .who { font-size: 12px; color: var(--text-3); }
.takes .who b { color: var(--text); font-weight: 650; }
.takes .who a { color: var(--text-2); }
.takes p { margin: 4px 0 8px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.flag { font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; color: var(--taxi); background: rgba(255, 194, 26, 0.12); }
.links { display: flex; gap: 6px; flex-wrap: wrap; }
.btn {
  height: 30px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--text); background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); }
.btn.play { background: var(--taxi); color: var(--taxi-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.12); }
.btn.play:hover { filter: brightness(1.06); }

/* Compare: the card sits over the list instead of over the globe. */
@media (min-width: 821px) {
  .mode-compare .card { left: max(var(--edge), env(safe-area-inset-left)); right: auto; width: var(--side-w); bottom: var(--edge); max-height: none; }
}

/* ---------- Narrow screens: list becomes a bottom sheet ---------- */
@media (max-width: 820px) {
  :root { --edge: 10px; --side-w: 0px; }
  .brand { width: auto; height: 44px; padding-right: 14px; }
  .repo-link, .brand-subtitle { display: none; }
  .hud-top-right { top: calc(max(var(--edge), env(safe-area-inset-top)) + 52px); left: var(--edge); }
  .toolbar { height: 44px; overflow-x: auto; scrollbar-width: none; }
  .mode-btn kbd { display: none; }
  .mode-btn { padding: 0 11px; }
  .view-2d .stage, .mode-3d .view-3d .stage, .mode-compare .view-3d .stage { left: 0; top: 104px; }
  .mode-compare .views { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .mode-compare .view-2d { box-shadow: 0 1px 0 var(--divider); }
  .mode-compare .view-3d .stage { top: 0; }
  .mode-compare .view-2d .caption { left: 50%; }
  .popover { top: calc(max(var(--edge), env(safe-area-inset-top)) + 104px); right: var(--edge); }
  .side {
    top: auto; left: var(--edge); right: var(--edge); bottom: var(--edge); width: auto; height: 46vh;
    transition: transform 0.3s var(--ease-out);
  }
  .side.collapsed { transform: translateY(calc(100% - 58px)); }
  .panel-handle { display: block; flex: none; height: 14px; }
  .panel-handle::before { content: ''; display: block; margin: 6px auto 0; width: 36px; height: 4px; border-radius: 2px; background: var(--text-3); }
  .search { margin-top: 0; }
  .search kbd { display: none; }
  .map-zoom { display: none; }
  .card { left: var(--edge); right: var(--edge); top: auto; bottom: calc(var(--edge) + 66px); width: auto; max-height: 46%; }
  .card .shot img { aspect-ratio: 3 / 1; }
}

/* Music button: a note while off, four bouncing bars while it plays. */
.tool-btn.icon-only { width: 36px; padding: 0; justify-content: center; }
#music .eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
#music .eq i { width: 2.5px; height: 4px; border-radius: 1px; background: currentColor; animation: eq 0.9s ease-in-out infinite alternate; }
#music .eq i:nth-child(2) { animation-delay: -0.35s; }
#music .eq i:nth-child(3) { animation-delay: -0.7s; }
#music .eq i:nth-child(4) { animation-delay: -0.15s; }
#music[aria-pressed="true"] .note { display: none; }
#music[aria-pressed="true"] .eq { display: inline-flex; }
@keyframes eq { from { height: 4px; } to { height: 14px; } }
@media (prefers-reduced-motion: reduce) { #music .eq i { animation: none; height: 9px; } #music .eq i:nth-child(odd) { height: 6px; } }
