/* Bug Arcade. Arcade cabinet art direction: Silkscreen headlines, VT323 for the machine's
   voice, JetBrains Mono for reading. Corners are square everywhere on purpose. */
:root {
  --bg: #09080f;
  --panel: #12101b;
  --panel-2: #1a1726;
  --line: #2e2940;
  --ink: #f2eee6;
  --dim: #aaa5ba;
  --accent: #ff014f;
  --on-accent: #0b0810;
  --coin: #ffc531;
  --nav: 60px;
  --st: #ffb347;
  --pixel: 'Silkscreen', 'VT323', monospace;
  --vt: 'VT323', 'JetBrains Mono', monospace;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
[data-stage='uk'] { --st: #7fd4ff; }
[data-stage='boss'] { --st: #ff014f; }

html { background: var(--bg); scroll-padding-top: calc(var(--nav) + 12px); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.65 var(--mono);
  overflow-x: hidden;
}
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 8px 16px;
  border: 0; white-space: nowrap; cursor: pointer;
  font: 400 13px/1.1 var(--pixel); text-decoration: none; text-transform: uppercase;
  box-shadow: 0 4px 0 rgb(0 0 0 / .55);
  transition: transform .08s ease, box-shadow .08s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 rgb(0 0 0 / .55); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgb(0 0 0 / .55); }
.btn-hire { background: var(--accent); color: var(--on-accent); }
.btn-hire:hover { background: #ff3a75; }
.btn-ghost { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 rgb(0 0 0 / .55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 5px 0 rgb(0 0 0 / .55); }
.btn-big { background: var(--ink); color: var(--bg); min-height: 52px; padding: 10px 24px; font-size: 15px; }
.btn-text { background: none; border: 0; color: var(--dim); font: 400 20px/1 var(--vt); text-decoration: underline; cursor: pointer; padding: 8px; }
.nav-cv, .nav-sound { display: none; }
.deck .jf-sound { min-height: 42px; border-radius: 0; color: var(--ink); font: 400 13px/1.1 var(--pixel); text-transform: uppercase; }
.btn-text:hover { color: var(--ink); }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  height: var(--nav); padding: 0 20px;
  background: rgb(9 8 15 / .94);
  border-bottom: 2px solid var(--line);
}
.brand { font: 400 20px/1 var(--pixel); color: var(--ink); text-decoration: none; text-shadow: 2px 2px 0 var(--accent); }
.mainnav { display: flex; gap: 20px; }
.mainnav a { font: 400 22px/1 var(--vt); color: var(--dim); text-decoration: none; }
.mainnav a:hover { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar .btn { min-height: 38px; padding: 6px 12px; font-size: 12px; }
.tb-skip { font: 400 20px/1 var(--vt); color: var(--ink); white-space: nowrap; }
[data-mode='done'] .tb-skip { display: none; }
.tb-menu { display: none; min-height: 38px; padding: 6px 10px; background: none; color: var(--ink); border: 2px solid var(--line); font: 400 12px/1 var(--pixel); cursor: pointer; }

/* Cabinet */
.arcade { padding: calc(var(--nav) + 10px) 12px 12px; min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.arcade:focus { outline: 0; }
.cabinet {
  position: relative; width: 100%; max-width: 1240px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: 'marquee marquee' 'screen guide' 'screen talk' 'screen files' 'deck deck';
  gap: 10px; padding: 10px;
  background: linear-gradient(180deg, #1c1830, #120f1e);
  box-shadow: inset 0 0 0 3px #2a2440, 0 0 0 3px var(--accent), 0 24px 70px rgb(255 1 79 / .22);
}
.cab-lights {
  position: absolute; inset: -3px; z-index: 0; pointer-events: none; opacity: 0;
  box-shadow: 0 0 34px 8px var(--st), inset 0 0 26px 2px var(--st);
}
.cabinet > *:not(.cab-lights) { position: relative; z-index: 1; }
.marquee { grid-area: marquee; height: 76px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 2px #000; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; transition: opacity .5s steps(5); }
.art-uk { opacity: 0; }
[data-stage='uk'] .art-uk, [data-stage='boss'] .art-uk { opacity: 1; }
[data-stage='uk'] .art-br, [data-stage='boss'] .art-br { opacity: 0; }
.marquee-text { position: absolute; inset: 0; display: flex; align-items: center; gap: 22px; padding: 0 20px; }
.marquee h1 { font: 400 clamp(30px, 4vw, 50px)/1 var(--pixel); color: #fff; text-shadow: 3px 3px 0 var(--accent), 0 0 18px rgb(255 1 79 / .7); }
.titles { font: 400 clamp(20px, 2.4vw, 30px)/1 var(--vt); color: #fff; text-shadow: 2px 2px 0 rgb(0 0 0 / .75); }

.screen {
  grid-area: screen; position: relative; overflow: hidden;
  height: clamp(420px, calc(100dvh - var(--nav) - 76px - 66px - 62px), 650px);
  background: #000; box-shadow: 0 0 0 4px #000, 0 0 0 7px #2a2440;
}
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#game:focus-visible { outline-offset: -5px; }
body[data-mode='play'] #game { touch-action: none; cursor: none; }
.sprite { position: absolute; left: 0; bottom: 0; z-index: 5; pointer-events: none; }
.crt {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 58%, rgb(0 0 0 / .46) 100%),
    repeating-linear-gradient(0deg, rgb(0 0 0 / .17) 0 1px, transparent 1px 3px);
}
.flash { position: absolute; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }

/* Screen overlays */
.ov { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.ov-card { background: rgb(9 8 15 / .55); pointer-events: none; gap: 8px; }
.card-big { font: 400 clamp(30px, 5vw, 58px)/1.05 var(--pixel); color: var(--st); text-shadow: 3px 3px 0 #000, 0 0 22px var(--st); }
.card-small { font: 400 26px/1.1 var(--vt); color: var(--ink); text-shadow: 0 2px 0 #000; }

/* Career file: the game holds still, the experience takes the screen */
.ov-file { z-index: 6; gap: 8px; background: rgb(9 8 15 / .92); cursor: pointer; }
.file-kicker { font: 400 14px/1 var(--pixel); color: var(--accent); text-transform: uppercase; }
.ovf-role { max-width: 26ch; font: 400 clamp(20px, 3vw, 32px)/1.15 var(--pixel); color: var(--ink); text-shadow: 3px 3px 0 var(--accent); }
.ovf-meta { font: 400 24px/1.1 var(--vt); color: var(--coin); }
.ovf-sum { max-width: 46ch; font: 400 15px/1.5 var(--mono); }
.ovf-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: 520px; }
.ovf-skills li { padding: 1px 8px; background: var(--coin); color: var(--on-accent); font: 400 19px/1.2 var(--vt); }
.ovf-go { min-height: 44px; color: var(--ink); }
.wave-bar { display: block; width: min(320px, 80%); height: 5px; background: var(--line); overflow: hidden; }
.wave-bar i { display: block; height: 100%; background: var(--coin); transform-origin: 0 50%; }

/* Between waves */
.ov-wave, .ov-tally { z-index: 6; gap: 10px; background: linear-gradient(180deg, rgb(9 8 15 / .96), rgb(26 12 34 / .94)); overflow-y: auto; }
.wave-kicker { font: 400 clamp(26px, 4.4vw, 46px)/1 var(--pixel); text-transform: uppercase; color: var(--coin); text-shadow: 3px 3px 0 var(--accent); }
.wave-got { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 520px; }
.wave-got li { padding: 3px 10px; background: var(--accent); color: var(--on-accent); font: 400 21px/1.1 var(--vt); }
.wave-stats { font: 400 22px/1.15 var(--vt); color: var(--ink); }
.wave-next { display: grid; gap: 2px; margin-top: 4px; padding: 10px 22px; box-shadow: inset 0 0 0 2px var(--st); background: var(--panel); }
.wave-next span { font: 400 12px/1 var(--pixel); color: var(--dim); text-transform: uppercase; }
.wave-next strong { font: 400 clamp(17px, 2.6vw, 24px)/1.2 var(--pixel); font-weight: 400; color: var(--st); }
.wave-next em { font: 400 20px/1.1 var(--vt); font-style: normal; color: var(--ink); }
.ov-wave .btn-coin { margin-top: 24px; }
.btn-coin { min-height: 54px; padding: 12px 26px; font-size: 16px; background: var(--coin); color: #1a1205; box-shadow: 0 6px 0 #a87800, 0 0 28px rgb(255 197 49 / .55); }
.btn-coin:hover { background: #ffd968; box-shadow: 0 7px 0 #a87800, 0 0 34px rgb(255 197 49 / .7); }
.btn-coin:active { box-shadow: 0 2px 0 #a87800; }

/* End tally and hire card */
.tally { display: grid; gap: 3px; width: min(420px, 100%); margin: 0; }
.tally > div { display: flex; justify-content: space-between; gap: 18px; padding: 3px 12px; background: rgb(255 255 255 / .06); }
.tally dt { font: 400 21px/1.2 var(--vt); color: var(--dim); }
.tally dd { font: 400 23px/1.1 var(--vt); color: var(--coin); }
.tally-rank { font: 400 clamp(30px, 5vw, 50px)/1 var(--pixel); color: var(--accent); text-shadow: 3px 3px 0 #fff; text-transform: uppercase; }
.ov-hire { z-index: 6; flex-direction: row; gap: clamp(16px, 4%, 40px); background: radial-gradient(90% 90% at 30% 50%, #40102e, #0b0810 72%); perspective: 900px; text-align: left; overflow-y: auto; }
.hire-card {
  flex: none; display: grid; gap: 2px; width: clamp(150px, 26%, 230px); padding: 10px; text-align: center;
  background: linear-gradient(160deg, #ffc531, #ff014f 62%, #6a2bd9); box-shadow: 0 0 0 3px #fff, 0 0 40px rgb(255 197 49 / .6);
}
.hire-tag { font: 400 12px/1 var(--pixel); text-transform: uppercase; color: #1a1205; }
.hire-art { background: #12101b; overflow: hidden; }
.hire-name { font: 400 clamp(16px, 2.2vw, 22px)/1.1 var(--pixel); color: #1a1205; }
.hire-role { font: 400 18px/1 var(--vt); color: #1a1205; }
.hire-side { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; max-width: 480px; }
.hire-title { font: 400 clamp(17px, 2.4vw, 25px)/1.15 var(--pixel); }
.hire-list { display: grid; gap: 5px; }
.hire-list button {
  width: 100%; min-height: 44px; padding: 7px 12px; border: 0; text-align: left; cursor: pointer;
  background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent); font: 400 21px/1.05 var(--vt);
}
.hire-list button:hover, .hire-list button:focus-visible { background: var(--accent); color: var(--on-accent); }

.ov-quest { z-index: 6; background: rgb(9 8 15 / .9); gap: 10px; overflow-y: auto; }
.quest-answer { max-width: 50ch; font: 400 15px/1.5 var(--mono); }
.quest-kicker { font: 400 15px/1 var(--pixel); color: var(--accent); text-transform: uppercase; }
.quest-title { font: 400 clamp(22px, 3.2vw, 36px)/1.1 var(--pixel); max-width: 22ch; }
.quest-offers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 520px; }
.quest-offers li { padding: 4px 10px; background: var(--panel-2); box-shadow: inset 0 0 0 2px var(--accent); font: 400 20px/1.1 var(--vt); }
.quest-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.ov-select { background: linear-gradient(90deg, rgb(9 8 15 / .9) 34%, rgb(9 8 15 / 0) 72%); align-items: flex-start; text-align: left; padding: 18px clamp(20px, 5%, 54px); gap: 8px; }
.select-title { font: 400 clamp(30px, 4.6vw, 52px)/1 var(--pixel); text-transform: uppercase; color: var(--accent); text-shadow: 3px 3px 0 #000; }
.select-note { font: 400 21px/1.15 var(--vt); color: var(--ink); max-width: 44ch; }
.select-list { display: grid; gap: 2px; min-width: min(360px, 100%); }
.select-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 5px 10px;
  background: none; border: 0; cursor: pointer; text-align: left;
  font: 400 clamp(18px, 2.3vw, 24px)/1.2 var(--pixel); text-transform: uppercase; color: var(--ink);
}
.select-list button::before { content: '>'; color: transparent; }
.select-list button:hover, .select-list button:focus-visible { background: var(--accent); color: var(--on-accent); outline: 0; }
.select-list button:hover::before, .select-list button:focus-visible::before { color: var(--on-accent); }

.ov-stage { padding: 0; overflow: hidden; background: #000; z-index: 6; }
.sc-sky { position: absolute; inset: 0; }
.sc-warm { background: linear-gradient(180deg, #2b0a22, #8a2433 60%, #e8833a); }
.sc-cool { background: linear-gradient(180deg, #081322, #173553 60%, #3f7ba6); opacity: 0; }
.sc-rain {
  position: absolute; inset: -40% 0; opacity: 0;
  background: repeating-linear-gradient(100deg, transparent 0 34px, rgb(180 225 255 / .36) 34px 36px);
}
.sc-map { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.sc-label { font: 400 30px/1 var(--pixel); text-transform: uppercase; }
.sc-label-ie { font-size: 20px; }
.sc-plane { position: absolute; left: 0; top: 0; width: 230px; margin: -60px 0 0 -115px; z-index: 2; }
.sc-plane svg { position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; }
.sc-pilot { position: absolute; left: 92px; top: -22px; width: 74px; z-index: 0; }
.sc-title {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 3; padding: 0 12px;
  font: 400 clamp(32px, 6.4vw, 76px)/1.05 var(--pixel); color: #fff; text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--accent), 0 0 30px rgb(127 212 255 / .8);
}
.sc-title span { display: inline-block; white-space: pre; }
.sc-skip { position: absolute; right: 8px; bottom: 6px; z-index: 3; color: #fff; }

.toast {
  position: absolute; z-index: 7; left: 50%; top: 40px; transform: translateX(-50%);
  padding: 7px 14px; background: var(--ink); color: var(--bg);
  font: 400 21px/1.1 var(--vt); white-space: nowrap; box-shadow: 0 4px 0 rgb(0 0 0 / .6);
}
.toast b { font: 400 11px/1 var(--pixel); color: #c4003b; text-transform: uppercase; margin-right: 8px; }

/* Player panel */
.talk { grid-area: talk; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 10px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); min-height: 132px; }
.portrait { align-self: start; background: linear-gradient(180deg, var(--panel-2), #0b0912); box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.talk-box { min-width: 0; }
.talk-name { font: 400 11px/1.2 var(--pixel); color: var(--st); text-transform: uppercase; margin-bottom: 4px; }
.talk-line { font: 400 21px/1.08 var(--vt); color: var(--ink); min-height: 4.4em; cursor: pointer; overflow-wrap: anywhere; }

.files { grid-area: files; min-height: 0; contain: size; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); overflow: auto; }
.stats { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; }
.stats div { padding: 5px 7px; background: #0b0912; }
.stats dt { font: 400 9px/1.2 var(--pixel); color: var(--dim); text-transform: uppercase; }
.stats dd { font: 400 26px/1 var(--vt); color: var(--st); }
.file-card { flex: none; padding: 9px 10px; background: #0b0912; box-shadow: inset 0 0 0 2px var(--line); min-height: 112px; }
.file-card.has-file { box-shadow: inset 0 0 0 2px var(--accent); }
.file-empty { font: 400 20px/1.15 var(--vt); color: var(--dim); }
.file-role { font: 400 13px/1.25 var(--pixel); text-transform: uppercase; }
.file-meta { font: 400 19px/1.1 var(--vt); color: var(--st); margin: 3px 0; }
.file-sum { font-size: 13px; line-height: 1.45; color: var(--ink); }
.file-link { display: inline-block; margin-top: 4px; font: 400 19px/1.2 var(--vt); color: var(--ink); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.slots button {
  width: 100%; min-height: 40px; padding: 3px; border: 0; cursor: pointer;
  background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent);
  font: 400 15px/1 var(--vt);
}
.slots button:hover { background: var(--accent); color: var(--on-accent); }
.slots button[aria-disabled='true'] { background: #0b0912; color: #6f6a80; box-shadow: inset 0 0 0 2px var(--line); }
.slots button[aria-disabled='true']:hover { background: #0b0912; color: #6f6a80; }
.mini { flex: 1 1 0; min-height: 56px; display: flex; flex-direction: column; overflow: hidden; }
.mini-title { font: 400 19px/1.1 var(--vt); color: var(--dim); margin-bottom: 4px; }
.mini-title b { font-weight: 400; color: var(--coin); }
.mini-inv { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; overflow: hidden; height: 22px; }
.mini-inv li { padding: 1px 6px; background: var(--coin); color: var(--on-accent); font: 400 17px/1.15 var(--vt); }
.ach-line { font: 400 19px/1.1 var(--vt); color: var(--dim); }
.ach-line b { font-weight: 400; color: var(--ink); }
.ach-line i { font-style: normal; color: var(--st); margin-left: 6px; }

/* Deck */
.deck { grid-area: deck; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px; background: linear-gradient(180deg, #221d36, #15121f); box-shadow: inset 0 2px 0 #3a3354; }
.slot-wrap { display: flex; align-items: center; gap: 10px; }
.guide-slot { grid-area: guide; min-width: 0; }
.guide-slot .jf-guide {
  width: 100%; max-width: none; min-width: 0; padding: 7px 12px 9px; gap: 2px;
  border: 0; border-radius: 0; background: #0b0912; box-shadow: inset 0 0 0 2px var(--accent); font-family: var(--mono);
}
.jf-guide-recap { color: var(--dim); font: 400 18px/1.05 var(--vt); }
.jf-guide-step { color: var(--coin); font: 400 11px/1.2 var(--pixel); text-transform: uppercase; }
.jf-guide-text { font: 400 15px/1.25 var(--pixel); font-weight: 400; color: var(--ink); }
.jf-guide-track { height: 5px; border-radius: 0; background: var(--line); }
.jf-guide-track span { background: var(--coin); }
.jf-ring { border-radius: 0; border-color: var(--coin); box-shadow: 0 0 calc(4px + var(--jf-glow) * 18px) var(--coin); }
.jf-arrow span { border-top-color: var(--coin); filter: none; }

.thumb-pad { display: none; grid-area: pad; position: relative; height: 62px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: repeating-linear-gradient(90deg, #1f1a33 0 10px, #15121f 10px 20px); box-shadow: inset 0 0 0 2px var(--line); }
.pad-grip { position: absolute; left: 50%; top: 50%; width: 76px; height: 26px; margin: -13px 0 0 -38px; background: repeating-linear-gradient(90deg, var(--dim) 0 3px, transparent 3px 8px); opacity: .55; }
.pad-label { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font: 400 17px/1 var(--vt); color: var(--dim); pointer-events: none; }
.pad-ghost { display: none; position: absolute; left: 50%; top: 8px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: rgb(255 255 255 / .75); box-shadow: 0 0 0 4px rgb(255 1 79 / .8); }
.thumb-pad.is-teaching { box-shadow: inset 0 0 0 3px var(--coin); }
.thumb-pad.is-teaching .pad-ghost { display: block; animation: pad-ghost 1.2s ease-in-out infinite alternate; }
@keyframes pad-ghost { from { translate: -90px 0; } to { translate: 90px 0; } }

.coin-slot { width: 16px; height: 34px; background: #000; box-shadow: 0 0 0 3px #574d78, 0 0 0 5px #000, 0 0 12px 3px var(--coin); }
.credit { font: 400 20px/1 var(--vt); color: var(--coin); white-space: nowrap; }
.deck-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
/* Page sections */
.sec { padding: clamp(56px, 8vw, 96px) 20px; }
.sec:nth-of-type(even) { background: #0d0b15; }
.wrap { max-width: 1140px; margin: 0 auto; }
.sec-title { font: 400 clamp(28px, 4.4vw, 48px)/1.1 var(--pixel); color: var(--ink); text-shadow: 3px 3px 0 var(--accent); }
.sec-title:focus { outline: 0; }
.sec-lede { max-width: 62ch; margin-top: 10px; color: var(--dim); font-size: 16px; }
.sub-title { margin: 56px 0 18px; font: 400 clamp(20px, 2.6vw, 28px)/1.15 var(--pixel); color: var(--accent); }

.quest-stage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: end; margin-top: 30px; }
.quest-guide { width: 220px; }
.quest-side { min-width: 0; }
.quest-list { display: grid; gap: 8px; }
.quest-list button {
  width: 100%; padding: 13px 16px; text-align: left; border: 0; cursor: pointer;
  background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line);
  font: 400 24px/1.1 var(--vt); transition: transform .1s ease, background-color .12s ease;
}
.quest-list button:hover { transform: translateX(6px); box-shadow: inset 0 0 0 2px var(--ink); }
.quest-list button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.quest-reply { display: flex; align-items: center; gap: 20px; margin-top: 16px; padding: 14px 16px; background: var(--panel-2); box-shadow: inset 0 0 0 2px var(--accent); }
.quest-line { flex: 1; font: 400 23px/1.15 var(--vt); min-height: 2.3em; }

.offers { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.offer {
  grid-column: span 3; display: flex; flex-direction: column; gap: 8px; padding: 18px;
  background: var(--panel); box-shadow: inset 0 0 0 2px var(--line);
  transition: opacity .2s steps(3), box-shadow .2s steps(3), transform .2s steps(3);
}
.offer:nth-child(1), .offer:nth-child(2) {
  grid-column: span 6; min-height: 190px;
  background: repeating-linear-gradient(0deg, rgb(255 1 79 / .13) 0 2px, transparent 2px 6px), #1a0a18;
}
.offer-out { font: 400 21px/1 var(--vt); color: var(--accent); }
.offer h4 { margin: 0; font: 400 clamp(17px, 2vw, 22px)/1.2 var(--pixel); }
.offer p { font-size: 14px; color: var(--dim); }
.offers.has-match .offer { opacity: .38; }
.offers.has-match .offer.is-match { opacity: 1; box-shadow: inset 0 0 0 3px var(--accent), 0 0 22px rgb(255 1 79 / .45); transform: translateY(-3px); }

.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; align-items: start; }
.col-title { font: 400 17px/1.2 var(--pixel); color: var(--st); margin-bottom: 12px; }
.exp-col:first-child .col-title { color: #7fd4ff; }
.exp-col:last-child .col-title { color: #ffb347; }
.exp-list { display: grid; gap: 10px; }
.job { background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); }
.job[open] { box-shadow: inset 0 0 0 2px var(--ink); }
.job.is-found { box-shadow: inset 4px 0 0 var(--accent), inset 0 0 0 2px var(--line); }
.job summary { cursor: pointer; padding: 12px 14px; list-style: none; }
.job summary::-webkit-details-marker { display: none; }
.job-top { display: flex; justify-content: space-between; gap: 12px; font: 400 20px/1.1 var(--vt); color: var(--dim); }
.job-role { font: 400 16px/1.3 var(--pixel); margin-top: 3px; }
.job-co { font-size: 14px; color: var(--dim); }
.job ul { padding: 0 14px 14px 30px; list-style: square; }
.job li { margin-top: 6px; font-size: 14px; line-height: 1.55; }
.job li::marker { color: var(--accent); }

.score-table { margin-top: 26px; display: grid; gap: 4px; counter-reset: rank; }
.score-table li {
  counter-increment: rank;
  display: grid; grid-template-columns: 56px 150px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 10px 14px; background: var(--panel);
}
.score-table li::before { content: counter(rank) 'UP'; font: 400 14px/1 var(--pixel); color: var(--accent); }
.edu-year { font: 400 24px/1 var(--vt); color: var(--coin); }
.edu-title { font: 400 15px/1.3 var(--pixel); }
.edu-school { font-size: 14px; color: var(--dim); }

.inventory { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; margin: 28px 0 32px; }
.inv-title { font: 400 15px/1.2 var(--pixel); color: var(--accent); margin-bottom: 10px; }
.inv-items { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-items li { padding: 3px 9px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); font: 400 21px/1.15 var(--vt); color: var(--dim); }
.inv-items li.is-found { color: var(--on-accent); background: var(--coin); box-shadow: none; }

.blog-grid { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; }
.post-link { text-decoration: none; }
.post-lead { display: block; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); padding: 12px; }
.post-lead:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.post-lead .thumb { aspect-ratio: 1; width: 100%; height: auto; }
.thumb { display: block; object-fit: cover; background: var(--panel-2); }
.post-date { display: block; font: 400 19px/1 var(--vt); color: var(--dim); margin-top: 10px; }
.post-title { display: block; font: 400 16px/1.35 var(--pixel); margin-top: 4px; }
.post-rest { display: grid; gap: 8px; grid-auto-rows: 1fr; }
.post-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; background: var(--panel); }
.post-row:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.post-row .thumb { width: 72px; height: 72px; }
.post-row .post-date { margin-top: 0; }
.post-row .post-title { font: 500 14px/1.35 var(--mono); }
.blog-all { margin-top: 20px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.hiscore { margin-top: 10px; font: 400 26px/1 var(--vt); color: var(--dim); }
.hiscore b { font-weight: 400; color: var(--coin); margin-left: 8px; }
.contact-guide { width: 190px; margin: 84px 0 8px 40px; }
.contact-links { display: flex; gap: 22px; font: 400 22px/1 var(--vt); }
.contact-form { padding: 20px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--accent); }

.jef-form { display: grid; gap: 14px; }
.jef-field { display: grid; gap: 5px; }
.jef-field label { font: 400 12px/1.2 var(--pixel); text-transform: uppercase; color: var(--ink); }
.jef-field input, .jef-field textarea {
  width: 100%; padding: 10px 12px; border: 0; border-radius: 0; resize: vertical;
  background: #0b0912; color: var(--ink); box-shadow: inset 0 0 0 2px #5b5570;
  font: 400 22px/1.2 var(--vt);
}
.jef-field input:focus, .jef-field textarea:focus { outline: 3px solid var(--coin); outline-offset: 1px; }
.jef-field [aria-invalid='true'] { box-shadow: inset 0 0 0 2px #ff6b93; }
.jef-error { font-size: 13px; color: #ff9db8; }
.jef-submit {
  min-height: 52px; border: 0; cursor: pointer; background: var(--accent); color: var(--on-accent);
  font: 400 15px/1 var(--pixel); text-transform: uppercase; box-shadow: 0 4px 0 rgb(0 0 0 / .55);
}
.jef-submit:hover { background: #ff3a75; }
.jef-submit:active { transform: translateY(3px); box-shadow: 0 1px 0 rgb(0 0 0 / .55); }
.jef-form-status { font-size: 14px; color: var(--coin); }

/* Leaves the bottom-right corner free for the GTranslate widget. */
.foot { padding: 22px 110px 22px 20px; color: var(--dim); font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .btn-coin { animation: coin-pulse 1.1s steps(2) infinite; }
  .crt { animation: crt-flicker 6s steps(3) infinite; }
}
@keyframes coin-pulse { 50% { filter: brightness(1.18); } }
@keyframes crt-flicker { 50% { opacity: .9; } }

@media (max-width: 1180px) {
  .mainnav {
    display: none; position: fixed; left: 0; right: 0; top: var(--nav);
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 2px solid var(--line);
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 12px 20px; font-size: 24px; }
  .nav-cv { display: block; }
  .nav-sound { display: block; padding: 8px 20px 12px; }
  .tb-menu { display: block; }
}

@media (max-width: 980px) {
  .cabinet {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: 'marquee' 'guide' 'screen' 'pad' 'talk' 'deck' 'files';
  }
  .screen { height: clamp(340px, 54dvh, 560px); }
  .thumb-pad { display: block; }
  .files { overflow: visible; contain: none; }
}

@media (max-width: 767px) {
  :root { --nav: 54px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .brand { font-size: 16px; }
  .tb-cv { display: none; }
  .tb-skip { font-size: 18px; }
  .topbar .btn { padding: 6px 9px; font-size: 11px; }
  .tb-menu { padding: 6px 7px; font-size: 11px; }
  .arcade { padding: calc(var(--nav) + 6px) 6px 8px; display: block; }
  .cabinet { padding: 6px; gap: 6px; }
  /* The screen takes the phone: name in the top bar, cabinet art off, the game as tall as it can be. */
  .marquee { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .screen { height: max(380px, calc(100dvh - var(--nav) - 62px - 78px - 72px - 54px)); }
  .guide-slot .jf-guide { padding: 5px 10px 7px; gap: 1px; }
  .jf-guide-text { font-size: 13px; }
  .jf-guide-recap { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn-coin { min-height: 50px; font-size: 14px; padding: 10px 16px; }
  .talk { grid-template-columns: 54px minmax(0, 1fr); gap: 8px; padding: 5px 7px; min-height: 72px; }
  .talk-name { display: none; }
  .talk-line { font-size: 18px; line-height: 1.02; min-height: 3.1em; }
  .ov-hire { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 10px; }
  .hire-card { width: 118px; padding: 6px; }
  .hire-side { width: 100%; }
  .hire-list button { min-height: 46px; font-size: 19px; }
  .ov-file { padding: 12px; }
  .ovf-sum, .quest-answer { font-size: 13px; }
  .quest-actions .btn { padding: 8px 10px; font-size: 11px; }
  .deck { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
  .slot-wrap { display: none; }
  .deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .deck .btn { width: 100%; padding: 8px 6px; font-size: 11px; }
  .ov-select { padding: 12px 14px; background: rgb(9 8 15 / .9); }
  .select-list { width: 100%; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
  .select-list button { padding: 7px 6px; font-size: 14px; gap: 4px; }
  .select-list button::before { display: none; }
  .ov-quest { padding: 10px; gap: 8px; }
  .quest-offers li { font-size: 18px; }
  .sc-label { font-size: 44px; }
  .sc-label-ie { font-size: 28px; }
  .quest-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .quest-guide { width: 150px; margin: 0 auto; }
  .quest-reply { flex-direction: column; align-items: stretch; }
  .offers { grid-template-columns: minmax(0, 1fr); }
  .offer, .offer:nth-child(1), .offer:nth-child(2) { grid-column: auto; min-height: 0; }
  .exp-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .score-table li { grid-template-columns: 48px minmax(0, 1fr); gap: 2px 12px; }
  .edu-title, .edu-school { grid-column: 1 / -1; }
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact-guide { width: 120px; margin: 12px 0 8px 10px; }
  .contact-form { padding: 14px; }
  .foot { padding-right: 96px; }
}

/* Intro: an arcade attract screen */
.jf-intro { background: radial-gradient(90% 80% at 50% 40%, #27103a 0%, #0d0916 70%); }
.jf-intro-bg {
  opacity: 1; animation: none; background-size: auto;
  background-image: repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(255 1 79 / .05) 0 2px, transparent 2px 44px), repeating-linear-gradient(0deg, rgb(255 1 79 / .05) 0 2px, transparent 2px 44px);
}
.jf-title { font-weight: 400; letter-spacing: 0; text-transform: uppercase; font-size: clamp(2.3rem, 6.6vw, 5.2rem); text-shadow: 4px 4px 0 var(--accent), 0 0 26px rgb(255 1 79 / .6); }
.jf-kicker { color: var(--coin); font: 400 15px/1 var(--pixel); letter-spacing: .06em; }
.jf-tagline { font-size: clamp(1.4rem, 2vw, 1.7rem); line-height: 1.15; }
.jf-btn { border-radius: 0; font: 400 15px/1.1 var(--pixel); text-transform: uppercase; box-shadow: 0 4px 0 rgb(0 0 0 / .55); }
.jf-primary { background: var(--coin); border-color: var(--coin); color: #1a1205; box-shadow: 0 5px 0 #a87800, 0 0 26px rgb(255 197 49 / .5); }
.jf-primary:hover { border-color: #fff; }
.jf-link { font: 400 22px/1.1 var(--vt); }
.jf-dialog { border-radius: 0; background: #0b0912; box-shadow: inset 0 0 0 2px var(--accent); border-color: var(--line); }
.jf-speaker { border-radius: 0; font: 400 12px/1.4 var(--pixel); text-transform: uppercase; }
.jf-line { font-size: clamp(1.5rem, 2.3vw, 1.9rem); line-height: 1.14; }
.jf-heading, .jf-subheading { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; }
.jf-mission { font-size: clamp(1.45rem, 2vw, 1.7rem); line-height: 1.15; }
.jf-reward { border-left-color: var(--coin); color: var(--coin); font-size: 1.35rem; line-height: 1.15; }
.jf-controls li { font-size: 1.35rem; }
.jf-keys kbd { border-radius: 0; font-family: var(--pixel); font-size: .8rem; }
.jf-input { border-radius: 0; font: 400 1.5rem/1 var(--vt); }
.jf-ask { font-size: 1.35rem; }
.jf-dots span { border-radius: 0; }

/* phones: "Skip the game" is in the menu and the skip link; the bar keeps Exit, Hire me and Menu */
@media (max-width: 480px) {
  .topbar-actions .tb-skip[data-skip] { display: none; }
}
