/* KEYCAPS — every control is a physical key on one board.
   Paper face, ink rim, a 2px skirt underneath. Pressing sinks the key onto its skirt (steps, not a tween).
   In a radio group the chosen key stays sunk and lights a small orange LED in its corner, like caps lock.
   Loaded last so it can settle the button styles that style.css and attitude.css accumulated. */
:root { --key-face: #f6f2e8; --key-skirt: #131313; --key-down: #e9e2d2; --led: #ff4f17; }

.shufbtn, .sortbtn, .people-sort, .btn, .subtabs button, .seg button, .gchip, .erabar > button,
.blend-directions button, .surprise-button, .kchip, .viewtoggle button {
  position: relative; border-radius: 0;
  transition: transform 60ms steps(2, end), box-shadow 60ms steps(2, end), background-color 90ms, border-color 90ms, color 90ms;
}

/* the board: paper keys with a skirt */
.shufbtn, .sortbtn, .people-sort, .btn, .subtabs button, .seg button, .viewtoggle button {
  background: var(--key-face); color: var(--ink); border: 1px solid var(--key-skirt);
  box-shadow: 0 2px 0 var(--key-skirt);
}
.gchip, .erabar > button, .kchip { box-shadow: 0 1px 0 var(--key-skirt); }
.shufbtn:hover, .sortbtn:hover, .people-sort:hover, .btn:hover, .subtabs button:hover, .seg button:hover,
.viewtoggle button:hover, .gchip:hover, .erabar > button:hover {
  border-color: var(--o); box-shadow: 0 2px 0 var(--o); color: var(--ink);
}
.gchip:hover, .erabar > button:hover { box-shadow: 0 1px 0 var(--o); }

/* press: the key sinks onto its skirt */
.shufbtn:active, .sortbtn:active, .people-sort:active, .btn:active, .subtabs button:active, .seg button:active,
.viewtoggle button:active, .blend-directions button:active {
  transform: translateY(2px); box-shadow: 0 0 0 var(--key-skirt);
}
.gchip:active, .erabar > button:active, .kchip:active { transform: translateY(1px); box-shadow: none; }

/* the chosen key in a radio group stays down and lights its LED (no flood fill: the LED is the signal) */
.subtabs button.on, .seg button.on, .viewtoggle button.on, .shufbtn.on, .gchip.on, .erabar > button.on {
  background: var(--key-down); color: var(--ink); border-color: var(--ink);
  transform: translateY(2px); box-shadow: inset 0 2px 0 #00000014;
}
.gchip.on, .erabar > button.on { transform: translateY(1px); }
.subtabs button.on::after, .seg button.on::after, .viewtoggle button.on::after, .shufbtn.on::after,
.gchip.on::after, .erabar > button.on::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px;
  background: var(--led); box-shadow: 0 0 0 1px #ffffff80, 0 0 7px 1px #ff4f17b3;
  animation: led-on 260ms steps(3, end) both;
}
.gchip.on::after, .erabar > button.on::after { width: 4px; height: 4px; top: 2px; right: 2px; }
.erabar > button.on .n, .erabar > button.on small, .gchip.on .n, .gchip.on span { color: var(--o); }
@keyframes led-on { 0% { opacity: 0; } 34% { opacity: 1; } 67% { opacity: .35; } 100% { opacity: 1; } }

/* shuffle: outlined key; on = sunk + LED, never a black slab */
.shufbtn { width: var(--control, 32px); height: var(--control, 32px); border: 1px solid var(--ink); }
.shufbtn.on { color: var(--o); }

/* the one orange key on the board: same skirt model, so it sits level with its neighbours */
.surprise-button { border: 1px solid #7a240a; box-shadow: inset 0 1px #ffb394, 0 2px 0 #7a240a; }
.surprise-button:hover { background: var(--ink); border-color: var(--ink); color: #fff8ea; box-shadow: inset 0 1px #3a3a3a, 0 2px 0 var(--o); }
.surprise-button:active { transform: translateY(2px); box-shadow: inset 0 1px #7d472f, 0 0 0 #7a240a; }
.pick-control small { display: none; } /* the tooltip and the D key say it; the caption pushed the row off level */

/* direction cards in Blend are big keys too */
.blend-directions button { box-shadow: 0 2px 0 var(--line-2); }
.blend-directions button.on { transform: translateY(2px); box-shadow: inset 0 3px 0 var(--o); }

/* bottom player: artwork centred in the bar, never touching its top edge */
.p-now { align-self: center; align-items: center; }
.p-now img { align-self: center; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .subtabs button.on::after, .seg button.on::after, .viewtoggle button.on::after, .shufbtn.on::after,
  .gchip.on::after, .erabar > button.on::after { animation: none; }
}

/* genre chips carry older fills (ink "ALL", olive "on"); bring them onto the board */
.gchips .gchip.on, .gchips .gchip.all.on, .gchips .gchip.on:hover { background: var(--key-down); color: var(--ink); box-shadow: inset 0 2px 0 #00000014; }
.gchips .gchip.on span, .gchips .gchip.all.on span { color: var(--o); }
.gchips .gchip.all { box-shadow: inset 0 0 0 1px var(--ink), 0 1px 0 var(--key-skirt); }

/* taste field canvas */
.taste-field { display: block; width: 100%; cursor: grab; touch-action: none; image-rendering: pixelated; }
.taste-field:active { cursor: grabbing; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only button:focus { position: static; }

/* ---------- QUESTS: the tutorial as a game dialog ---------- */
.quest { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px;
  background: #131313b8; background-image: radial-gradient(#13131355 1px, transparent 1px); background-size: 3px 3px;
  animation: quest-in 160ms steps(3, end) both; }
.quest.out { animation: quest-out 160ms steps(3, end) both; }
.quest-card { width: min(470px, 100%); background: var(--paper); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--o), 6px 6px 0 3px var(--ink); clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
  animation: quest-drop 340ms steps(5, end) both; }
.quest-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--ink); color: var(--paper);
  font: 9px var(--pixel); letter-spacing: .08em; }
.quest-led { width: 7px; height: 7px; background: var(--o); box-shadow: 0 0 8px 1px var(--o); animation: quest-blink 900ms steps(2, end) infinite; }
.quest-n { margin-left: auto; color: var(--o); }
.quest-body { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px 16px 6px; }
.quest-face { width: 64px; height: 64px; background: var(--ink); display: grid; place-items: center; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--o); }
.quest-face canvas { width: 60px; height: 60px; image-rendering: pixelated; }
.quest-title { font: 16px/1.25 var(--pixel); letter-spacing: .02em; min-height: 20px; margin: 0 0 10px; }
.quest:not(.still) .quest-title::after { content: "▌"; color: var(--o); animation: quest-blink 700ms steps(2, end) infinite; }
.quest-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.quest-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; font: 11px/1.45 var(--mono);
  animation: quest-step 240ms steps(3, end) both; animation-delay: calc(420ms + var(--i) * 140ms); }
.quest-steps kbd { min-width: 26px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font: 9px var(--pixel);
  background: var(--key-face); border: 1px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.quest-reward { margin: 12px 0 4px; padding: 7px 9px; border: 1px dashed var(--line-2); font: 10px/1.4 var(--mono); color: var(--muted);
  animation: quest-step 240ms steps(3, end) both; animation-delay: 900ms; }
.quest-reward b { font: 8px var(--pixel); color: var(--o); margin-right: 6px; letter-spacing: .08em; }
.quest-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 16px 16px; }
.quest-actions button { height: 34px; padding: 0 16px; font: 10px var(--pixel); letter-spacing: .06em; border: 1px solid var(--ink); background: var(--key-face); box-shadow: 0 2px 0 var(--ink); }
.quest-actions button:active { transform: translateY(2px); box-shadow: none; }
.quest-actions .quest-go { background: var(--o); color: #fff8ea; border-color: #7a240a; box-shadow: inset 0 1px #ffb394, 0 2px 0 #7a240a; }
.quest-actions .quest-go:hover, .quest-actions .quest-go:focus-visible { background: var(--ink); border-color: var(--ink); outline: none; }
.quest.still, .quest.still .quest-card, .quest.still .quest-steps li, .quest.still .quest-reward { animation: none; }
@keyframes quest-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes quest-out { to { opacity: 0; } }
@keyframes quest-drop { 0% { transform: translateY(-28px) scale(.96); opacity: 0; } 60% { transform: translateY(4px); opacity: 1; } 100% { transform: none; } }
@keyframes quest-step { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes quest-blink { 50% { opacity: .15; } }
/* ACCEPT points at the first move: the control pulses orange three times */
.quest-ping { position: relative; z-index: 5; animation: quest-ping 800ms steps(4, end) 3; }
@keyframes quest-ping { 0% { box-shadow: 0 0 0 0 #ff4f17, 0 0 0 0 #131313; } 50% { box-shadow: 0 0 0 4px #ff4f17, 0 0 0 7px #131313; } 100% { box-shadow: 0 0 0 9px #ff4f1700, 0 0 0 12px #13131300; } }
@media (max-width: 520px) { .quest-body { grid-template-columns: 48px minmax(0, 1fr); } .quest-face { width: 48px; height: 48px; } .quest-face canvas { width: 44px; height: 44px; } .quest-title { font-size: 13px; } }

/* ---------- BLEND: VS title card ---------- */
.vs-card { position: absolute; inset: 0; z-index: 6; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 0 18px;
  background: var(--ink); color: var(--paper); cursor: pointer; overflow: hidden;
  background-image: repeating-linear-gradient(135deg, #ff4f1722 0 6px, transparent 6px 14px); }
.vs-side { display: grid; justify-items: center; gap: 6px; font: 10px var(--pixel); letter-spacing: .06em; text-transform: uppercase; }
.vs-side img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--paper); box-shadow: 4px 4px 0 var(--o); image-rendering: pixelated; background: #2a2a2a; }
.vs-a { animation: vs-left 300ms steps(4, end) both; }
.vs-b { animation: vs-right 300ms steps(4, end) both; }
.vs-stamp { font: 34px/1 var(--pixel); color: var(--o); text-shadow: 3px 3px 0 var(--paper); animation: vs-stamp 260ms steps(3, end) 360ms both; }
.vs-card.vs-out { animation: vs-wipe 220ms steps(4, end) both; }
@keyframes vs-left { from { transform: translateX(-140%); } to { transform: none; } }
@keyframes vs-right { from { transform: translateX(140%); } to { transform: none; } }
@keyframes vs-stamp { 0% { transform: scale(2.6) rotate(-8deg); opacity: 0; } 70% { transform: scale(.9) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@keyframes vs-wipe { to { clip-path: inset(0 0 0 100%); } }

/* ---------- GRID: cards as sleeves ---------- */
.rows.grid { perspective: 900px; }
.rows.grid .card { transform-style: preserve-3d; transition: transform 140ms ease-out; }
.rows.grid .card.tilt { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateZ(6px); z-index: 2; }
.rows.grid .card.tilt .c-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), #fff6 0, #fff0 45%); mix-blend-mode: soft-light; }
.rows.grid .card .c-art { position: relative; }
.rows.grid .card.tilt .c-art { box-shadow: 5px 6px 0 var(--ink); }
.rows.grid .card:active { transform: translateY(2px) scale(.985); transition-duration: 60ms; }
.rows.grid .card.deal { animation: card-deal 300ms steps(5, end) both; animation-delay: var(--deal, 0ms); }
@keyframes card-deal { 0% { opacity: 0; transform: translateY(14px) rotate(-2deg); } 70% { opacity: 1; transform: translateY(-2px) rotate(.5deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rows.grid .card.tilt { transform: none; } .rows.grid .card.deal { animation: none; } }

/* ---------- RHYTHM: one vertical gap between blocks, one inset for loose captions ---------- */
:root { --block: 12px; --inset: 12px; }
/* Blend chooser: the TASTE TWINS heading spans the grid instead of occupying the first card slot */
.blend-candidates .twin-head { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 0 2px; }
.blend-candidates .twin-head > * { margin: 0; }
/* person page + Blend result: same gap between every block, same frame on every panel */
#person-modes { margin: var(--block) 0; }
#person-blend > * + * { margin-top: var(--block); }
#blend-summary { border-top-width: 1px; border-top-color: var(--line-2); box-shadow: inset 0 3px 0 var(--ink); padding: 14px var(--inset) 12px; }
#blend-directions { margin: var(--block) 0 0; gap: var(--block); }
#blend-pool-caption { margin: 8px var(--inset) 0; }
#blend-view { margin-top: var(--block); }
.blend-signals { margin-top: 8px; }

/* People tab: the side column is empty there, so the view takes the full width like the hero above it */
.shell:has(#view-explore:not(.hidden)) { grid-template-columns: minmax(0, 1fr); }
.shell:has(#view-explore:not(.hidden)) > .side { display: none; }


/* Recently active (side panel): name truncates instead of running into the counts */
.ra-row { grid-template-columns: 20px 22px minmax(0, 1fr) auto auto; gap: 7px; font-size: 11.5px; }
.ra-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-row .nw, .ra-row .when { white-space: nowrap; font-size: 10px; color: var(--muted); }

/* Archive mode tabs (MY LIKES · FREE DOWNLOADS · DIG MODE · KEY·BPM) are a radio group like the rest */
.archive-tools .btn { background: var(--key-face); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.archive-tools .btn.solid { background: var(--key-down); color: var(--ink); transform: translateY(2px); box-shadow: inset 0 2px 0 #00000014; }
.archive-tools .btn.solid::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; background: var(--led); box-shadow: 0 0 0 1px #ffffff80, 0 0 7px 1px #ff4f17b3; }
.archive-tools { gap: 8px; margin-bottom: var(--block); }

/* KEY · BPM gets the same framed row as GENRE and YEAR */
.index2 .key-row { padding: 8px 10px; border: 1px solid #b7a98b65; border-left: 3px solid var(--ink); background: #f3efe6; }
.index2 .key-row .index-marker { background: var(--ink); }

/* Lurklist genre filter: a paper key, not an orange slab */
#w-genre { background: var(--key-face); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 2px 0 var(--ink); clip-path: none; }
#w-genre option { color: var(--ink); background: var(--paper); }
.genre-select:has(#w-genre) .ic { color: var(--ink); }
#view-explore .explore-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: var(--block); width: 100%; }
#view-explore .explore-watchlist { border-color: var(--line-2); border-top: 3px solid var(--o); background: var(--paper); }
@media (max-width: 900px) { #view-explore .explore-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- ARCADE CHIP: a handheld you can't miss ---------- */
.arcade-chip { width: 52px; height: 58px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 0;
  box-shadow: 3px 3px 0 var(--o); transition: transform 80ms steps(2); }
.arcade-chip svg { width: 30px; height: 40px; }
.arcade-chip::after { content: "PLAY"; position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); font: 8px var(--pixel); letter-spacing: .08em;
  color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 1px 4px; white-space: nowrap; }
.arcade-chip:hover, .arcade-chip:focus-visible { background: var(--o); color: #fff8ea; border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.arcade-chip:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--o); }
.arcade-chip.is-loading { animation: chip-wiggle 1.2s steps(4, end) infinite; box-shadow: 3px 3px 0 var(--o), 0 0 0 4px #ff4f1733; }
.arcade-chip.is-loading::after { content: "LOADING…"; color: #fff8ea; background: var(--o); border-color: var(--o); }
.arcade-chip .handheld-led { fill: var(--o); animation: quest-blink 1.4s steps(2, end) infinite; }
@keyframes chip-wiggle { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-6deg); } 86% { transform: rotate(5deg); } 94% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .arcade-chip.is-loading, .arcade-chip .handheld-led { animation: none; } }

/* ---------- PLAYER: quiet until there's something to play ---------- */
body:not(.has-track) .player .p-wave, body:not(.has-track) .player .p-time, body:not(.has-track) .player .p-vol,
body:not(.has-track) .player #p-crate, body:not(.has-track) .player #p-more, body:not(.has-track) .player #p-shuffle,
body:not(.has-track) .player .seek-step, body:not(.has-track) .player #p-prev, body:not(.has-track) .player #p-next,
body:not(.has-track) .player #p-repeat, body:not(.has-track) .player #p-art, body:not(.has-track) .player .live-sparks { display: none; }
body:not(.has-track) .player { grid-template-columns: auto auto 1fr auto auto auto auto auto; }
body:not(.has-track) .player .p-title { color: var(--paper); }
body:not(.has-track) .player .p-artist::before { content: "▶ "; color: var(--o); }
body.has-track .player { animation: player-open 260ms steps(4, end); }
@keyframes player-open { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
body:has(#loading-arcade:not(.hidden)) #arcade-chip { display: none; } /* the open window replaces the chip */

/* ---------- LOG IN ---------- */
.sc-login { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; margin-left: 10px; font: 9px var(--pixel); letter-spacing: .08em;
  color: #fff8ea; background: var(--o); border: 1px solid #7a240a; box-shadow: inset 0 1px #ffb394, 0 2px 0 #7a240a; text-decoration: none; white-space: nowrap; }
.sc-login:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 0 2px 0 var(--o); }
.sc-login:active { transform: translateY(2px); box-shadow: none; }
.sc-led { width: 6px; height: 6px; background: #fff8ea; box-shadow: 0 0 6px #fff; animation: quest-blink 1.2s steps(2, end) infinite; }
.title-screen { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: #131313;
  background-image: linear-gradient(180deg, #131313f0, #131313d8), url("/web/observer-city.jpg"); background-size: cover; background-position: center 60%; }
.ts-card { display: grid; justify-items: center; gap: 18px; text-align: center; animation: quest-drop 420ms steps(5, end) both; }
.ts-mark { width: min(520px, 80vw); image-rendering: pixelated; }
.ts-line { font: 12px var(--pixel); letter-spacing: .1em; color: var(--o); margin: 0; }
.ts-go { margin-top: 10px; padding: 14px 22px; font: 12px var(--pixel); letter-spacing: .08em; color: #fff8ea; background: var(--o); text-decoration: none;
  border: 2px solid #f1ede4; box-shadow: 5px 5px 0 #f1ede4; }
.ts-go:hover { background: #f1ede4; color: var(--ink); box-shadow: 5px 5px 0 var(--o); }
.ts-go:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #f1ede4; }
.ts-fine { max-width: 420px; font: 10px/1.6 var(--mono); color: #bdb29c; margin: 0; }
.ts-press { font: 9px var(--pixel); color: #f1ede4; letter-spacing: .14em; animation: quest-blink 1s steps(2, end) infinite; margin: 0; }
@media (max-width: 760px) { .sc-login { height: 26px; padding: 0 8px; font-size: 8px; } }

/* if the arcade script never placed the chip, it still sits bottom-right above the player */
#arcade-chip:not([style*="top"]) { top: auto; bottom: 96px; right: 14px; }

/* ---------- COLOUR PASS: neon traces, genre chips with presence, key text that reads ---------- */
.hdr, .player { background-image: linear-gradient(#0f120dcc, #0f120de0), url('/web/circuits-neon.svg'); }
.gchips .gchip { border: 1px solid #13131366; background: #fbf8f0; color: var(--ink); font-weight: 600; }
.gchips .gchip span { color: var(--o); font-weight: 700; }
.gchips .gchip:nth-child(6n+1):not(.all) { box-shadow: inset 3px 0 0 #ff4f17, 0 1px 0 var(--ink); }
.gchips .gchip:nth-child(6n+2) { box-shadow: inset 3px 0 0 #2b6cb0, 0 1px 0 var(--ink); }
.gchips .gchip:nth-child(6n+3) { box-shadow: inset 3px 0 0 #2f855a, 0 1px 0 var(--ink); }
.gchips .gchip:nth-child(6n+4) { box-shadow: inset 3px 0 0 #b7791f, 0 1px 0 var(--ink); }
.gchips .gchip:nth-child(6n+5) { box-shadow: inset 3px 0 0 #805ad5, 0 1px 0 var(--ink); }
.gchips .gchip:nth-child(6n) { box-shadow: inset 3px 0 0 #c53030, 0 1px 0 var(--ink); }
.gchips .gchip { padding-left: 10px; }
.gchips .gchip:hover { border-color: var(--o); background: #fff3ea; }
.gchips .gchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gchips .gchip.on span { color: #ffb08a; }
/* explanatory lines: a size up, ink instead of grey, with the important bits in orange */
#discovery-scope, .blend-pool-caption, .scene-lore > span:last-child, .hint, .taste-map-scope, #taste-map-scope, .w-sub, .disc-sub {
  font-size: 11px; color: #3a372f; letter-spacing: .01em; }
.scene-lore b { font-size: 11px; color: var(--ink); }
.scene-kicker { color: var(--o); font-weight: 700; }
.blend-pool-caption, #discovery-scope { font-weight: 600; }

/* ---------- BLEND CHOOSER v2: twins first and big, then blend-any-two ---------- */
.blend-chooser h1 { font-size: 22px; margin: 0 0 6px; }
.blend-chooser > p { font-size: 12px; color: #3a372f; max-width: 640px; margin: 0 0 16px; }
.blend-candidates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.blend-candidates .twin-head h2 { font: 14px var(--pixel); letter-spacing: .06em; color: var(--ink); margin: 0; }
.blend-candidates .twin-head .hint { font-size: 12px; }
.blend-candidate.twin { min-height: 78px; padding: 12px 14px; border: 1px solid var(--ink); background: #fbf8f0; box-shadow: 0 2px 0 var(--ink); text-align: left; }
.blend-candidate.twin:hover { border-color: var(--o); box-shadow: 0 2px 0 var(--o); background: #fff3ea; transform: translateY(-1px); }
.blend-candidate.twin:active { transform: translateY(2px); box-shadow: none; }
.blend-candidate.twin img { width: 52px; height: 52px; }
.blend-candidate.twin .twin-body b { font-size: 15px; }
.blend-candidate.twin .twin-rank { font: 14px var(--pixel); color: var(--o); }
.blend-candidate.twin.twin-first { grid-column: 1 / -1; min-height: 92px; border-width: 2px; box-shadow: 4px 4px 0 var(--o); }
.blend-candidate.twin.twin-first img { width: 64px; height: 64px; }
.blend-candidate.twin.twin-first .twin-body b { font-size: 18px; }
.blend-any { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.blend-any-h { font: 12px var(--pixel); letter-spacing: .06em; margin: 0 0 4px; }
.blend-any .hint { margin: 0 0 10px; }
.blend-choose-fields { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 0; }
.blend-choose-fields label { display: grid; gap: 5px; font: 9px var(--pixel); letter-spacing: .08em; color: var(--ink); min-width: 0; }
.blend-choose-fields input { height: 38px; padding: 0 12px; font: 13px var(--mono); color: var(--ink); background: #fbf8f0; border: 1px solid var(--ink); box-shadow: inset 0 2px 0 #0000000d; width: 100%; }
.blend-choose-fields input:focus { outline: 2px solid var(--o); outline-offset: 1px; }
.blend-orbit { height: 38px; display: grid; place-items: center; font: 16px var(--pixel); color: var(--o); }
#blend-compare { height: 38px; padding: 0 18px; }
@media (max-width: 760px) { .blend-candidates { grid-template-columns: minmax(0, 1fr); } .blend-choose-fields { grid-template-columns: minmax(0, 1fr); } .blend-orbit { display: none; } }

/* ---------- VS fight: health bars, ROUND 1, FIGHT! ---------- */
.vs-card { grid-template-rows: auto 1fr; row-gap: 6px; padding-top: 12px; }
.vs-hp { grid-row: 1; display: grid; gap: 3px; font: 8px var(--pixel); letter-spacing: .06em; color: var(--paper); animation: vs-left 260ms steps(3, end) both; }
.vs-hp-a { grid-column: 1; }
.vs-hp-b { grid-column: 3; justify-items: end; text-align: right; animation-name: vs-right; }
.vs-hp i { display: block; height: 8px; width: 100%; background: #3a0f05; border: 1px solid var(--paper); position: relative; overflow: hidden; }
.vs-hp i::after { content: ""; position: absolute; inset: 0; width: var(--hp); background: linear-gradient(90deg, #ffd23f, #ff4f17); animation: vs-fill 520ms steps(6, end) 200ms both; }
.vs-hp-b i::after { left: auto; right: 0; }
.vs-side, .vs-stamp { grid-row: 2; }
.vs-call { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 30px/1 var(--pixel); color: var(--paper); text-shadow: 3px 3px 0 var(--o); opacity: 0; pointer-events: none; white-space: nowrap; }
.vs-round { animation: vs-call 380ms steps(4, end) 760ms both; }
.vs-fight { font-size: 44px; color: var(--o); text-shadow: 4px 4px 0 var(--paper); animation: vs-call 520ms steps(4, end) 1220ms both; }
.vs-card.vs-shake { animation: vs-shake 260ms steps(4, end); }
.vs-card .vs-stamp { animation-delay: 300ms; }
@keyframes vs-fill { from { width: 0; } }
@keyframes vs-call { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(.95); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); } }
@keyframes vs-shake { 25% { transform: translate(-4px, 2px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, -1px); } }
.blend-candidate.twin { display: grid; grid-template-columns: 34px 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.blend-candidate.twin.twin-first { grid-template-columns: 34px 64px minmax(0, 1fr) auto; }
.blend-candidate.twin .twin-body { min-width: 0; }
.vs-card.vs-shake .vs-stamp { opacity: 0; }

/* ---------- LANDING: the front door ---------- */
.landing.modal { z-index: 450; padding: 0; background: #0d0f0b; display: block; overflow: auto; }
.landing.out { animation: quest-out 240ms steps(4, end) both; }
.ld-art { position: fixed; inset: 0; background: url('/web/observer-city.jpg') center 58% / cover no-repeat; filter: grayscale(1) contrast(1.15) brightness(.55); }
.ld-art .live-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.ld-card { position: relative; min-height: 100%; display: grid; justify-items: center; align-content: center; gap: 18px; padding: 40px 16px 48px; text-align: center; }
.ld-face { width: 120px; height: 120px; display: grid; place-items: center; background: #131313; border: 2px solid #f1ede4; box-shadow: 6px 6px 0 var(--o); cursor: pointer; animation: quest-drop 420ms steps(5, end) both; }
.ld-face canvas { width: 116px; height: 116px; image-rendering: pixelated; }
.ld-mark { margin: 0; line-height: 0; }
.ld-mark img { width: min(560px, 86vw); image-rendering: pixelated; animation: ld-type 900ms steps(7, end) 200ms both; }
@keyframes ld-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ld-tag { max-width: 560px; margin: 0; font: 13px/1.6 var(--mono); color: #e9e2d2; text-shadow: 0 1px 0 #000; }
.ld-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; width: min(900px, 100%); margin-top: 6px; }
.ld-way { display: grid; align-content: start; gap: 8px; padding: 18px; text-align: left; text-decoration: none; color: var(--ink); background: #f1ede4f2;
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 #000; cursor: pointer; font: inherit; animation: quest-step 300ms steps(4, end) both; }
.ld-way:nth-child(2) { animation-delay: 120ms; } .ld-way:nth-child(3) { animation-delay: 240ms; }
.ld-way b { font: 12px var(--pixel); letter-spacing: .06em; }
.ld-way span { font: 11.5px/1.5 var(--mono); color: #3a372f; }
.ld-way:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--o); }
.ld-way:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
.ld-login { background: var(--o); color: #fff8ea; border-color: #f1ede4; }
.ld-login span { color: #ffe3d2; }
.ld-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 4px; }
.ld-row input { height: 36px; padding: 0 10px; font: 13px var(--mono); border: 1px solid var(--ink); background: #fff; min-width: 0; }
.ld-row input:focus { outline: 2px solid var(--o); }
.ld-row button { height: 36px; padding: 0 14px; font: 11px var(--pixel); color: #fff8ea; background: var(--ink); border: 1px solid var(--ink); box-shadow: 0 2px 0 var(--o); }
.ld-press { font: 9px var(--pixel); letter-spacing: .14em; color: #f1ede4; animation: quest-blink 1.2s steps(2, end) infinite; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .ld-mark img, .ld-way, .ld-face { animation: none; } }
.ld-art { filter: grayscale(1) contrast(1.25) brightness(.42); }
.ld-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 48%, #0d0f0b55 0, #0d0f0bcc 60%, #0d0f0bf2 100%); }
.ld-tag { color: #f1ede4; font-size: 14px; text-shadow: 0 2px 0 #000, 0 0 12px #000; }
.ld-press { color: #ff8a5c; }

/* ---------- TALKING ON YOUR LIKES ---------- */
.cm-panel .hint { font-size: 11px; margin: 0 0 8px; }
.cm-list { display: grid; gap: 2px; }
.cm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px dashed var(--line-2); cursor: pointer; }
.cm-row:hover b { color: var(--o); }
.cm-row img { width: 32px; height: 32px; object-fit: cover; background: #2a2a2a; }
.cm-body { min-width: 0; display: grid; }
.cm-body b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-body small { font-size: 10px; color: #3a372f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-body em { color: var(--o); font-style: normal; font-weight: 700; }
.cm-row .btn.sm { height: 24px; padding: 0 8px; font-size: 9px; }
.cm-in { font: 8px var(--pixel); color: var(--muted); }

/* ---------- TASTE MAP OPEN = DIG VIEW ---------- */
.taste-card { width: min(1100px, 96vw); }
.taste-card #taste-large { float: left; width: 56%; }
.taste-card #taste-categories { margin-left: 58%; max-height: 520px; overflow: auto; padding-right: 4px; }
.taste-card .taste-method { clear: both; }
.dig-head h3 { font: 18px var(--pixel); margin: 0; color: var(--ink); }
.dig-head span { font-size: 11px; color: #3a372f; }
.dig-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.dig h4 { font: 9px var(--pixel); letter-spacing: .08em; color: var(--o); margin: 14px 0 6px; }
.dig-artists { display: flex; flex-wrap: wrap; gap: 6px; }
.dig-artists .tag { cursor: pointer; border: 1px solid var(--ink); background: #fbf8f0; }
.dig-artists .tag b { color: var(--o); }
.dig-track { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; text-align: left; padding: 6px 4px; border-bottom: 1px dashed var(--line-2); background: none; }
.dig-track .ic { width: 22px; height: 22px; padding: 5px; background: var(--o); color: #fff; }
.dig-track b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dig-track small { font-size: 10px; color: #3a372f; }
.dig-track:hover b { color: var(--o); }
@media (max-width: 760px) { .taste-card #taste-large { float: none; width: 100%; } .taste-card #taste-categories { margin-left: 0; max-height: none; } }
.taste-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 18px; align-items: start; }
.taste-card > * { grid-column: 1 / -1; }
.taste-card #taste-large { float: none; width: auto; grid-column: 1; grid-row: 2; }
.taste-card #taste-categories { margin: 0; grid-column: 2; grid-row: 2; max-height: 560px; }
@media (max-width: 760px) { .taste-card { grid-template-columns: minmax(0, 1fr); } .taste-card #taste-categories { grid-column: 1; grid-row: auto; } }

/* ---------- PHONE: the first screen shows tracks, not chrome ---------- */
@media (max-width: 760px) {
  .hdr .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; width: 100%; }
  .hdr .nav::-webkit-scrollbar { display: none; }
  .hdr .nav > button, .hdr .nav > div > button { flex: none; padding: 6px 8px; font-size: 10px; }
  .scene-art { min-height: 0; padding: 12px 12px 14px; background-size: cover; }
  .scene-copy h1 { font-size: 16px; line-height: 1.3; }
  .scene-copy p { font-size: 11px; max-width: none; }
  .scene-foot { padding: 6px 10px; }
  .scene-foot .scene-lore > span:last-child { display: none; }
  .scene-lore b { font-size: 9px; }
  .arcade-chip { width: 40px; height: 46px; box-shadow: 2px 2px 0 var(--o); }
  .arcade-chip svg { width: 22px; height: 30px; }
  .arcade-chip::after { display: none; }
  body:not(.has-track) .player { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; padding: 6px 12px; }
  body:not(.has-track) .player .p-ctrl { grid-column: 2; grid-row: 1; }
  body:not(.has-track) .player .p-keys, body:not(.has-track) .player #p-sfx, body:not(.has-track) .player #p-dig, body:not(.has-track) .player #p-queue { display: none; }
  .sc-login { order: 2; margin: 4px 0 0; }
  .ld-ways { grid-template-columns: minmax(0, 1fr); }
  .ld-face { width: 84px; height: 84px; } .ld-face canvas { width: 80px; height: 80px; }
}

@media (max-width: 760px) { body:not(.has-track) .player > :not(.p-now):not(.p-ctrl) { display: none !important; } }

/* ---------- READABILITY: filters and headings a size up, numbers you can read, signals that pop ---------- */
.ph, .panel .ph { font-size: 13px; letter-spacing: .06em; }
.index-marker { font-size: 11px; padding: 2px 6px; }
.genre-row .ph, .year-row .ph, .key-row .ph { font-size: 13px; }
.gchips { gap: 7px; }
.gchips .gchip { height: 30px; padding: 0 12px 0 14px; font-size: 12.5px; border-width: 1.5px; border-color: var(--ink); }
.gchips .gchip span { font-size: 12px; font-family: var(--mono); }
.erabar > button b { font-size: 15px; font-weight: 700; color: var(--ink); }
.erabar > button span, .erabar button span { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--o); letter-spacing: 0; }
.erabar > button { min-height: 44px; border: 1.5px solid #13131355; }
.erabar > button.on b, .erabar > button.on span { color: var(--ink); }
.subtabs button { font-size: 11px; height: 30px; }
.tabsbar .tabs button { font-size: 12px; }
.sortbtn { font-size: 11px; }
.r-title { font-size: 13.5px; }
.tag { font-size: 10.5px; }

/* ---------- SIDE PANELS: framed, coloured, a holographic sheen ---------- */
.side { gap: 18px; }
.side > .panel, .side .panel { position: relative; border: 1.5px solid var(--ink); border-top: 4px solid var(--o); background: #fbf8f0;
  box-shadow: 4px 4px 0 #13131322, 0 0 0 1px #fff inset; overflow: hidden; }
.side .panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 20%, #ff4f1730 38%, #7dd3fc33 50%, #c4b5fd33 58%, transparent 75%); background-size: 280% 100%;
  animation: holo 9s linear infinite; }
.side .panel .ph { color: var(--ink); }
.side .panel .ph .sl { color: var(--o); text-shadow: 0 0 8px #ff4f1799; }
.side .panel:hover { box-shadow: 4px 4px 0 var(--o), 0 0 18px #ff4f1733; }
@keyframes holo { from { background-position: 140% 0; } to { background-position: -140% 0; } }
@media (prefers-reduced-motion: reduce) { .side .panel::before { animation: none; } }

/* ---------- DIALOG BOXES: each section's explainer is the observer talking, on screen, VGM style ---------- */
.dlg.scene--strip, .scene-foot.dlg { background: var(--ink) !important; color: var(--paper); border: 2px solid var(--ink) !important; outline: 2px solid #f1ede4; outline-offset: -5px;
  box-shadow: 5px 5px 0 var(--o); padding: 12px 14px !important; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; min-height: 0; }
.scene-foot.dlg { grid-template-columns: 56px minmax(0, 1fr) auto; margin: 0; }
.dlg .scene-face { width: 48px; height: 48px; border: 2px solid #f1ede4; background: #000; box-shadow: 3px 3px 0 var(--o); }
.dlg.scene--strip .scene-face { width: 40px; height: 40px; }
.dlg .scene-face canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.dlg-body { position: relative; display: grid; gap: 4px; padding-top: 10px; min-width: 0; }
.dlg-name { position: absolute; top: -20px; left: 0; padding: 2px 8px; font: 9px var(--pixel); letter-spacing: .1em; color: var(--ink); background: var(--o); border: 2px solid #f1ede4; }
.dlg-body b.dlg-line { font: 12px/1.45 var(--pixel); letter-spacing: .04em; color: #fff8ea; }
.dlg-body span.dlg-line { font: 12px/1.5 var(--mono); color: #e2d9c5; display: block !important; }
.dlg-caret { position: absolute; right: 0; bottom: -4px; color: var(--o); font-size: 10px; animation: quest-blink .8s steps(2, end) infinite; }
.dlg-body.typing .dlg-caret { opacity: 0; animation: none; }
.dlg-body.typing .dlg-line:not(:empty)::after { content: "▌"; color: var(--o); }
.scene--strip.dlg { margin-bottom: 14px; }

/* ---------- TWIN % + BLEND ATTRACT SCREEN ---------- */
.twin-tier { display: grid; justify-items: end; gap: 2px; }
.twin-tier em { font: 22px/1 var(--pixel); color: var(--o); font-style: normal; text-shadow: 2px 2px 0 #13131322; }
.twin-tier small { font: 8px var(--pixel); letter-spacing: .08em; color: var(--ink); }
.blend-candidate.twin.twin-first .twin-tier em { font-size: 30px; }
.twin-body small strong { color: var(--o); font-size: 12px; }
.bduel-tier i { font-style: normal; color: #ffb08a; }
.blend-attract { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto 1fr auto; gap: 8px 18px; align-items: center;
  min-height: 230px; padding: 16px 22px 14px; margin-bottom: 8px; color: var(--paper); background: #0d0f0b; border: 2px solid var(--ink); outline: 2px solid #f1ede4; outline-offset: -6px;
  box-shadow: 6px 6px 0 var(--o); cursor: pointer; overflow: hidden; text-align: center; }
.blend-attract::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, #ff4f1724 0 8px, transparent 8px 20px), url('/web/observer-city.jpg') center 60% / cover; filter: grayscale(1) brightness(.35);
  animation: ba-stripes 14s linear infinite; }
.blend-attract > * { position: relative; }
.ba-hp { grid-row: 1; display: grid; gap: 4px; font: 9px var(--pixel); letter-spacing: .06em; }
.ba-a-hp { grid-column: 1; justify-items: start; text-align: left; } .ba-b-hp { grid-column: 3; justify-items: end; text-align: right; }
.ba-hp i { display: block; width: 100%; height: 10px; border: 1.5px solid #f1ede4; background: #3a0f05; position: relative; }
.ba-hp i::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--hp); background: linear-gradient(90deg, #ffd23f, #ff4f17); animation: ba-hp 3.2s steps(8, end) infinite; }
.ba-b-hp i::after { left: auto; right: 0; }
.ba-side { grid-row: 2; display: grid; justify-items: center; gap: 8px; font: 11px var(--pixel); letter-spacing: .06em; }
.ba-side img { width: 92px; height: 92px; object-fit: cover; border: 3px solid #f1ede4; box-shadow: 5px 5px 0 var(--o); background: #222; image-rendering: pixelated; }
.ba-a { grid-column: 1; animation: ba-bob 1.2s steps(2, end) infinite; } .ba-b { grid-column: 3; animation: ba-bob 1.2s steps(2, end) .6s infinite; }
.ba-vs { grid-row: 2; grid-column: 2; font: 48px/1 var(--pixel); color: var(--o); text-shadow: 4px 4px 0 #f1ede4; animation: ba-vs 1.6s steps(4, end) infinite; }
.ba-cta { grid-row: 3; grid-column: 1 / -1; font: 11px var(--pixel); letter-spacing: .1em; color: #fff8ea; animation: quest-blink 1s steps(2, end) infinite; }
.blend-attract:hover { box-shadow: 8px 8px 0 var(--o), 0 0 24px #ff4f1755; }
.blend-attract:hover .ba-vs { animation-duration: .5s; }
.blend-attract:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--o); }
@keyframes ba-bob { 50% { transform: translateY(-5px); } }
@keyframes ba-vs { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.15) rotate(3deg); } }
@keyframes ba-hp { 0% { width: 8%; } 60%, 100% { width: var(--hp); } }
@keyframes ba-stripes { from { background-position: 0 0, center 60%; } to { background-position: 280px 0, center 60%; } }
@media (max-width: 760px) { .blend-attract { min-height: 190px; padding: 12px; gap: 6px 10px; } .ba-side img { width: 64px; height: 64px; } .ba-vs { font-size: 32px; } .ba-cta { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { .ba-a, .ba-b, .ba-vs, .ba-hp i::after, .blend-attract::before, .ba-cta { animation: none; } }

/* arcade: arrives like a cartridge sliding in, then glows while it waits for you */
.loading-arcade.arcade-enter { animation: arcade-in 520ms steps(6, end) both, arcade-glow 1.6s steps(4, end) 520ms 4; }
@keyframes arcade-in { 0% { transform: translateY(120%) rotate(4deg); } 70% { transform: translateY(-8px) rotate(-1deg); } 100% { transform: none; } }
@keyframes arcade-glow { 50% { box-shadow: 0 0 0 3px var(--o), 0 0 28px #ff4f17aa, 4px 5px 0 #000; } }
.loading-arcade .arcade-status { font-size: 11px; color: #ffd9c4; }
@media (prefers-reduced-motion: reduce) { .loading-arcade.arcade-enter { animation: none; } }

/* ---------- MOTION, BACK UP FRONT: the city has room to move, sections wipe in ---------- */
@media (min-width: 761px) { .scene:not(.scene--strip):not(.scene--compact) .scene-art { min-height: 178px; padding: 20px 20px 26px; } .scene-copy h1 { font-size: 26px; } }
.v-enter { animation: v-wipe 300ms steps(6, end) both !important; }
@keyframes v-wipe { 0% { clip-path: inset(0 100% 0 0); transform: translateX(-10px); } 100% { clip-path: inset(0 0 0 0); transform: none; } }
.row.current { box-shadow: inset 4px 0 0 var(--o), 0 0 0 1px #ff4f1755, 0 0 22px #ff4f1726; }
.row:hover .r-play, .card:hover .r-play { transform: scale(1.08); transition: transform 90ms steps(2); }
@media (prefers-reduced-motion: reduce) { .v-enter { animation: none !important; } }

/* ---------- PROFILE & SETTINGS ---------- */
.profile-modal { z-index: 420; }
.pf-card { width: min(760px, 96vw); max-height: 92vh; overflow: auto; border: 2px solid var(--ink); border-top: 4px solid var(--o); box-shadow: 6px 6px 0 var(--o); }
.pf-note { font-size: 11.5px; background: #fff3ea; border-left: 3px solid var(--o); padding: 8px 10px; margin: 0 0 12px; }
.pf-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
.pf-pic { display: grid; gap: 8px; align-content: start; justify-items: center; }
.pf-img { width: 150px; height: 150px; object-fit: cover; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--o); background: #222; }
.pf-fields { display: grid; gap: 12px; }
.pf-fields label { display: grid; gap: 5px; font: 9px var(--pixel); letter-spacing: .08em; }
.pf-fields label small { font: 10px var(--mono); letter-spacing: 0; color: var(--muted); }
.pf-fields input, .pf-fields textarea { font: 13px var(--mono); padding: 8px 10px; border: 1px solid var(--ink); background: #fbf8f0; width: 100%; resize: vertical; }
.pf-fields input:focus, .pf-fields textarea:focus { outline: 2px solid var(--o); outline-offset: 1px; }
.pf-h { font: 12px var(--pixel); letter-spacing: .08em; margin: 20px 0 8px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.pf-settings { display: grid; gap: 10px; }
.pf-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12.5px; cursor: pointer; }
.pf-toggle input { width: 18px; height: 18px; accent-color: var(--o); }
.pf-toggle small { display: block; font-size: 10.5px; color: var(--muted); }
.pf-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pf-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.pf-err { margin-right: auto; color: #b42318; font-size: 12px; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: minmax(0, 1fr); } }
.side > .panel, .side .panel { flex-shrink: 0; }
.scene--strip.dlg { margin-top: 16px; }

/* Key / BPM is parked for now (KEYS_ENABLED in app.js) */
.key-row, [data-kd-open], .kchip, #kd-modal, .archive-tools [data-archive-nav="keys"] { display: none !important; }

/* genre colour = the same on every tag and on the taste map (genre-colors.js) */
.gchips .gchip:not(.all) { box-shadow: inset 4px 0 0 var(--gc, #ff4f17), 0 1px 0 var(--ink) !important; }
.gchips .gchip:not(.all) span { color: var(--gc, #ff4f17); filter: brightness(.85); }
.gchips .gchip:not(.all):hover { background: color-mix(in srgb, var(--gc, #ff4f17) 12%, #fbf8f0); border-color: var(--gc, #ff4f17); }
.gchips .gchip.on:not(.all) { background: var(--gc, #ff4f17) !important; color: #fff !important; border-color: var(--ink); }
.gchips .gchip.on:not(.all) span { color: #fff; filter: none; }
.row .tag[data-genre] { border-left: 3px solid var(--gc, transparent); }

/* ---------- DISCOVER HUB: twins + talkers above the people / tracks ---------- */
.disc-hub { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; padding: 14px 12px 4px; }
.disc-hub .panel { border: 1.5px solid var(--ink); border-top: 4px solid var(--o); background: #fbf8f0; padding: 12px 14px; }
.disc-hub .hint { font-size: 11.5px; margin: 4px 0 10px; }
.hub-twins-grid { display: grid; gap: 8px; }
.hub-twins-grid .blend-candidate.twin { cursor: default; min-height: 0; }
.twin-acts { display: flex; gap: 6px; margin-top: 6px; }
.twin-acts .btn.sm { height: 24px; padding: 0 9px; font-size: 9px; }
.discovery-switch button { font-size: 11px; }
@media (max-width: 900px) { .disc-hub { grid-template-columns: minmax(0, 1fr); } }

/* ---------- BLEND ARENA: a fighting-game stage with two name boxes ---------- */
.blend-arena-page { padding: 14px; }
.arena { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; gap: 12px 22px; align-items: center;
  min-height: 420px; padding: 20px 26px 18px; color: var(--paper); background: #0d0f0b; border: 2px solid var(--ink); outline: 2px solid #f1ede4; outline-offset: -7px; box-shadow: 7px 7px 0 var(--o); overflow: hidden; }
.arena::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: repeating-linear-gradient(135deg, #ff4f1722 0 8px, transparent 8px 22px), url('/web/observer-city.jpg') center 62% / cover; filter: grayscale(1) brightness(.33); animation: ba-stripes 16s linear infinite; }
.arena > * { position: relative; }
.arena-hp { grid-row: 1; display: grid; gap: 5px; font: 9px var(--pixel); letter-spacing: .06em; }
.arena-hp.a { grid-column: 1; } .arena-hp.b { grid-column: 3; justify-items: end; text-align: right; }
.arena-hp i { display: block; width: 100%; height: 12px; border: 2px solid #f1ede4; background: #3a0f05; position: relative; }
.arena-hp i::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--hp, 8%); background: linear-gradient(90deg, #ffd23f, #ff4f17); transition: width 500ms steps(8, end); }
.arena-hp.b i::after { left: auto; right: 0; }
.arena-side { grid-row: 2; display: grid; justify-items: center; gap: 10px; }
.arena-side.a { grid-column: 1; } .arena-side.b { grid-column: 3; }
.arena-pic { width: 128px; height: 128px; border: 3px solid #f1ede4; box-shadow: 6px 6px 0 var(--o); background: #1b1b1b; display: block; animation: ba-bob 1.3s steps(2, end) infinite; }
.arena-side.b .arena-pic { animation-delay: .65s; }
.arena-pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.arena-side label { font: 10px var(--pixel); letter-spacing: .12em; color: var(--o); }
.arena-side input { width: min(320px, 100%); height: 40px; padding: 0 12px; text-align: center; font: 13px var(--mono); color: var(--ink); background: #f1ede4; border: 2px solid #f1ede4; box-shadow: inset 0 2px 0 #0000001a; }
.arena-side input:focus { outline: 3px solid var(--o); outline-offset: 2px; }
.arena-side.enter .arena-pic { animation: vs-right 320ms steps(4, end) both; }
.arena-vs { grid-row: 2; grid-column: 2; font: 64px/1 var(--pixel); color: var(--o); text-shadow: 5px 5px 0 #f1ede4; animation: ba-vs 1.6s steps(4, end) infinite; }
.arena-fight { grid-row: 3; grid-column: 1 / -1; justify-self: center; padding: 14px 30px; font: 15px var(--pixel); letter-spacing: .1em; color: #fff8ea; background: var(--o);
  border: 3px solid #f1ede4; box-shadow: 6px 6px 0 #f1ede4; animation: arena-pulse 1.4s steps(2, end) infinite; }
.arena-fight:hover { background: #f1ede4; color: var(--ink); box-shadow: 6px 6px 0 var(--o); }
.arena-fight:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 #f1ede4; }
.arena-fight:disabled { opacity: .6; animation: none; }
.arena-rules { grid-row: 4; grid-column: 1 / -1; margin: 0; text-align: center; font: 12px/1.55 var(--mono); color: #e2d9c5; max-width: 640px; justify-self: center; }
@keyframes arena-pulse { 50% { box-shadow: 6px 6px 0 #f1ede4, 0 0 26px #ff4f17; } }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.roster-head h2 { font: 14px var(--pixel); letter-spacing: .08em; margin: 0; }
.roster-head .hint { font-size: 11.5px; }
.blend-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.roster-tile { display: grid; justify-items: center; gap: 6px; padding: 10px 8px; background: #fbf8f0; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.roster-tile img { width: 72px; height: 72px; object-fit: cover; border: 2px solid var(--ink); background: #222; }
.roster-tile b { font: 9px var(--pixel); letter-spacing: .04em; text-align: center; }
.roster-tile em { font: 14px var(--pixel); color: var(--o); font-style: normal; }
.roster-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--o); border-color: var(--o); }
.roster-tile.picked { background: var(--ink); color: var(--paper); border-color: var(--o); box-shadow: 0 3px 0 var(--o), 0 0 16px #ff4f1766; }
.roster-tile.picked img { border-color: var(--o); }
@media (max-width: 760px) { .arena { min-height: 0; padding: 14px 12px; gap: 10px; } .arena-pic { width: 84px; height: 84px; } .arena-vs { font-size: 36px; } .arena-side input { height: 36px; font-size: 12px; } .arena-fight { font-size: 12px; padding: 12px 18px; } }
@media (prefers-reduced-motion: reduce) { .arena::before, .arena-pic, .arena-vs, .arena-fight { animation: none; } }

#view-blend #blend-scene { display: none; } /* the arena explains itself */

/* ---------- HEADINGS: a readable pixel face for the things you read first; Silkscreen stays for small labels ---------- */
:root { --head: "Pixelify Sans", "Silkscreen", monospace; }
.scene-copy h1, .blend-chooser h1, .dig-head h3, .quest-title, .ld-tag + .ld-ways .ld-way b {
  font-family: var(--head); font-weight: 700; letter-spacing: .01em; text-transform: none; }
.scene-copy h1 { font-size: 34px; line-height: 1.12; max-width: 520px; text-shadow: 2px 2px 0 #f1ede4; }
.scene-copy .eyebrow { font: 11px var(--pixel); letter-spacing: .14em; color: var(--o); }
.scene-copy p { font-size: 13px; line-height: 1.55; color: #2b2924; max-width: 380px; }
.roster-head h2, .blend-candidates .twin-head h2, .blend-any-h, .pf-h, .dig h4 { font-family: var(--head); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.ph, .panel .ph { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: .03em; }
.dlg-body b.dlg-line { font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .03em; line-height: 1.4; }
.quest-title { font-size: 22px; }
.arena-side label, .arena-hp b, .ba-hp b { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.arena-fight { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: .06em; }
.arena-vs { font-family: var(--head); font-weight: 700; font-size: 76px; }
.ld-way b { font-family: var(--head); font-weight: 700; font-size: 16px; letter-spacing: .03em; }
.roster-tile b { font-family: var(--head); font-weight: 600; font-size: 12px; }
.twin-tier em, .roster-tile em { font-family: var(--head); font-weight: 700; }
.lurk-btn { letter-spacing: .08em; }
.lurk-btn .ic { width: 13px; height: 13px; margin-right: 4px; }
@media (max-width: 760px) { .scene-copy h1 { font-size: 22px; } .ph, .panel .ph { font-size: 15px; } .arena-vs { font-size: 44px; } }

.side .panel .ph, #taste-panel .ph { font-family: var(--head) !important; font-weight: 600; font-size: 17px !important; }
