/* ============================================================
   BARGAINLORE ARCADE — design system
   "Bargain-hunter zine meets arcade cabinet."
   Precedents: Gumroad's classic playful neo-brutalism (chunky ink
   borders, hard offset shadows, sticker badges) + retro arcade
   marquee typography (Archivo Black display, Space Mono ledger text).
   No gradients, no glass, no glow — ink on paper, stamps and tape.
   ============================================================ */

@font-face {
  font-family: 'Archivo Black';
  src: url('fonts/archivo-black-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/space-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/space-mono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #FFF6E3;
  --paper-2: #FFEFc9;
  --ink: #191410;
  --muted: #6E6257;
  --neg: #D92B2B;
  --neg-dark: #A11E1E;
  --bargain: #1F9D4D;
  --bargain-dark: #146B34;
  --bargain-dark: #146B34;
  --coupon: #FFC93C;
  --stamp-blue: #2B5BD7;
  --receipt: #FFFFFF;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --border: 3px solid var(--ink);
  --radius: 10px;
  --font-display: 'Archivo Black', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', Courier, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
  /* faint ledger grid, like a deal docket */
  background-image:
    linear-gradient(rgba(25,20,16,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,20,16,.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--stamp-blue); }
img, canvas, svg { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section.block { padding: 56px 0; }

/* ---------- header ---------- */
.site-header {
  border-bottom: var(--border);
  background: var(--ink);
  color: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand svg { flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 1.15rem; line-height: 1; letter-spacing: .02em;
}
.brand-name small {
  display: block; font-family: var(--font-mono); font-weight: 700;
  font-size: .62rem; letter-spacing: .14em; color: var(--coupon);
  margin-top: 4px; text-transform: uppercase;
}
/* Single non-wrapping horizontal scroll row on ALL viewports (stage 2B UX P0):
 * the 15-link inline nav used to wrap into ~5 rows on 360px phones, eating
 * ~40% of the viewport. No hamburger, no disclosure — the main design stays
 * inline (2026-09-29 revert stands); the row scrolls instead. */
nav.main-nav {
  display: flex; gap: 6px; margin-left: auto;
  flex-wrap: nowrap; overflow-x: auto; white-space: nowrap;
  max-width: 100%; min-width: 0; min-height: 48px; align-items: center;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
nav.main-nav::-webkit-scrollbar { display: none; }
nav.main-nav a { flex: 0 0 auto; }
nav.main-nav a {
  color: var(--paper); text-decoration: none; font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 12px; border: 2px solid transparent; border-radius: 8px;
}
nav.main-nav a:hover { border-color: var(--coupon); color: var(--coupon); }
nav.main-nav a.active { background: var(--coupon); color: var(--ink); border-color: var(--coupon); }

/* ---------- games dropdown (restored 2026-09-29, per J) ---------- */
.nav-drop { position: relative; flex: 0 0 auto; }
.nav-drop-btn {
  color: var(--paper); background: transparent; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center; gap: 5px;
}
.nav-drop-btn:hover, .nav-drop-btn[aria-expanded="true"] { border-color: var(--coupon); color: var(--coupon); }
.nav-drop-btn.active { background: var(--coupon); color: var(--ink); border-color: var(--coupon); }
.nav-caret { font-size: .72em; }
.nav-drop-menu {
  position: fixed; z-index: 300; background: var(--ink); color: var(--paper);
  border: 2px solid var(--coupon); border-radius: 12px; padding: 6px;
  box-shadow: 0 14px 34px rgba(0,0,0,.5);
  max-height: min(70vh, 430px); overflow-y: auto;
}
.nav-drop-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: var(--paper); text-decoration: none;
  font-weight: 700; font-size: .86rem; min-height: 44px; white-space: nowrap;
}
.nav-drop-menu a:hover { background: rgba(255,201,60,.16); }
.nav-drop-menu a[aria-current="page"] { background: var(--coupon); color: var(--ink); }
.flag-badge {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800;
  background: var(--neg); color: #fff; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 48px; text-align: center; position: relative; }
.hero-kicker {
  display: inline-block; background: var(--ink); color: var(--coupon);
  font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; padding: 8px 16px; border-radius: 999px;
  transform: rotate(-2deg); margin-bottom: 22px;
}
.hero h1 .hl-neg { color: var(--neg); }
.hero h1 .hl-green { color: var(--bargain); }
.hero-sub { max-width: 640px; margin: 0 auto 30px; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- flagship spotlight (homepage, above the fold) ---------- */
.flagship-spotlight {
  background: var(--ink); color: var(--paper);
  padding: 44px 0; margin-top: 8px;
  border-top: 4px solid var(--neg); border-bottom: 4px solid var(--neg);
}
.flagship-spotlight .fs-inner {
  display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center;
}
@media (min-width: 760px) {
  .flagship-spotlight .fs-inner { grid-template-columns: 1.25fr .75fr; gap: 40px; }
}
.flagship-spotlight h2 {
  font-size: clamp(2rem, 7vw, 3rem); color: #fff;
  margin: 12px 0 12px; line-height: 1.02;
}
.flagship-spotlight .fs-lede { font-size: 1.06rem; max-width: 56ch; margin: 0 0 18px; }
.flagship-spotlight .fs-lede strong { color: var(--coupon); }
.fs-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 9px; }
.fs-points li { padding-left: 28px; position: relative; font-weight: 600; font-size: .98rem; }
.fs-points li::before {
  content: "▸"; position: absolute; left: 0; top: 0;
  color: var(--coupon); font-weight: 800;
}
/* A6 (PA 2.54.0): flagship "by the numbers" stat chips — CSS-only presence boost.
   No animation, so reduced-motion safe by construction. */
.fs-stats { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.fs-stats li {
  display: flex; align-items: baseline; gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius); padding: 8px 14px;
}
.fs-stats .fs-num {
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1;
  color: var(--coupon);
}
.fs-stats .fs-lab {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--paper); opacity: .85;
}
@media (max-width: 480px) {
  .fs-stats { gap: 8px; }
  .fs-stats li { padding: 6px 10px; }
  .fs-stats .fs-num { font-size: 1.25rem; }
}
.fs-ticket {
  justify-self: center; text-align: center;
  background: var(--coupon); color: var(--ink);
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 34px; transform: rotate(-3deg);
  display: grid; gap: 6px; min-width: 210px; max-width: 280px;
}
.fs-ticket-kicker {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .22em; font-weight: 800;
}
.fs-ticket-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 2.1rem; line-height: 1.05;
}
.fs-ticket-num { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 759px) {
  .flagship-spotlight { padding: 34px 0; }
  .flagship-spotlight .fs-text { order: 0; }
}

/* ---------- flagship strip (PA 2.30.0): site-wide slim bar above the header,
   injected by site.js on every page except the flagship page itself ---------- */
.flagship-strip {
  background: var(--ink); color: var(--paper);
  border-bottom: 3px solid var(--neg);
  font-size: .85rem; font-weight: 600;
  padding: 8px 14px;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  text-align: center;
}
.flagship-strip .fs-strip-text { min-width: 0; }
.flagship-strip .fs-strip-text a {
  color: var(--coupon); font-weight: 800; white-space: nowrap; text-underline-offset: 2px;
}
.flagship-strip .fs-strip-text a:hover { color: #fff; }
.flagship-strip .fs-strip-close {
  background: transparent; border: 2px solid var(--muted); color: var(--paper);
  border-radius: 999px; width: 28px; height: 28px; min-width: 28px; min-height: 28px;
  font-size: .8rem; line-height: 1; cursor: pointer; padding: 0; flex: none;
}
.flagship-strip .fs-strip-close:hover { border-color: var(--paper); }
.flagship-strip .fs-strip-close:focus-visible { outline: 2px solid var(--coupon); outline-offset: 2px; }
@media (max-width: 520px) {
  .flagship-strip { font-size: .78rem; padding: 7px 10px; gap: 8px; }
}
/* footer flagship line (index hub; noscript-friendly static presence) */
.flagship-foot { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.flagship-foot a { color: var(--coupon); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-display); text-transform: uppercase;
  font-size: 1rem; letter-spacing: .03em; text-decoration: none; cursor: pointer;
  color: var(--ink); background: var(--receipt);
  border: var(--border); border-radius: var(--radius);
  padding: 14px 26px; box-shadow: var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-bargain { background: var(--bargain-dark); color: #fff; }
.btn-neg { background: var(--neg); color: #fff; }
.btn-coupon { background: var(--coupon); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn-lg { font-size: 1.25rem; padding: 18px 34px; }

/* Shell mute button (stage 2B UX P1): compact inline mute control in each
 * game shell's control cluster. Same button language as .btn-ghost, with
 * the coupon-yellow border. NOT a floating widget — the revert stands. */
.shell-mute-btn {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em;
  font-size: .8rem; font-weight: 700; color: var(--ink);
  background: transparent; border: 2px solid var(--coupon); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; touch-action: manipulation;
  min-height: 44px; display: inline-flex; align-items: center; user-select: none;
}
.shell-mute-btn:hover { background: var(--coupon); }
.shell-mute-btn:active { transform: translate(1px, 1px); }

/* Hall-of-fame skeleton panels (stage 2B UX P1): same box as a finished
 * .hs-panel so the boards resolve without layout shift. */
.hs-panel.hs-skeleton { min-height: 190px; }
.hs-skel-title, .hs-skel-row {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--coupon) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: hs-shimmer 1.2s linear infinite;
}
.hs-skel-title { height: 1.2em; width: 55%; margin-bottom: 14px; }
.hs-skel-row { height: .9em; margin-bottom: 9px; }
.hs-skel-row:nth-of-type(3) { width: 88%; }
.hs-skel-row:nth-of-type(4) { width: 94%; }
@keyframes hs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .hs-skel-title, .hs-skel-row { animation: none; }
}

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--receipt); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; position: relative;
  display: flex; flex-direction: column; gap: 10px;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.card-num {
  position: absolute; top: -16px; left: 18px;
  background: var(--ink); color: var(--coupon);
  font-family: var(--font-display); font-size: .95rem;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--paper);
}
.card h3 { margin: .4em 0 .2em; font-size: 1.25rem; }
.card p { font-size: .92rem; flex: 1; }
.card .card-link { align-self: flex-start; }
/* ---------- flagship featured card (PA 2.36.0, hourly theme: flagship spotlight &
   site presence) — Warehouse Siege leads the Pick-your-game grid as a full-width
   featured card: gold accent border, flagship badge, larger heading. Grid-column
   1/-1 spans every column on wide screens and collapses harmlessly to one
   column on phones (no layout shift, no JS). */
.card-flagship {
  grid-column: 1 / -1;
  border: 3px solid var(--neg);
  background: linear-gradient(180deg, rgba(255,201,60,.12), var(--receipt) 65%);
}
.card-flagship:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--neg); }
.card-flagship h3 { font-size: 1.65rem; margin-top: .15em; }
.card-flagship p { font-size: 1rem; max-width: 62ch; }
.card-flagship .card-link { font-size: 1.05rem; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; padding: 4px 10px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--paper-2); align-self: flex-start;
}
.tag.red { background: var(--neg); color: #fff; }
.tag.green { background: var(--bargain-dark); color: #fff; }
.tag.blue { background: var(--stamp-blue); color: #fff; }

/* ---------- sticker badges ---------- */
.sticker {
  display: inline-block; font-family: var(--font-display); text-transform: uppercase;
  font-size: .95rem; padding: 10px 18px; border: 3px solid var(--ink);
  border-radius: 8px; transform: rotate(-4deg);
  box-shadow: var(--shadow-sm);
}
.sticker.red { background: var(--neg); color: #fff; }
.sticker.green { background: var(--bargain-dark); color: #fff; }
.sticker.yellow { background: var(--coupon); }

/* ---------- rubber stamp verdict ---------- */
.stamp-zone { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.stamp {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: .05em;
  padding: 8px 26px; border: 5px solid currentColor; border-radius: 10px;
  transform: rotate(-8deg) scale(2.2); opacity: 0;
}
.stamp.show { animation: stampIn .32s cubic-bezier(.2, 2.4, .4, 1) forwards; }
.stamp.bargain { color: var(--bargain); }
.stamp.neg { color: var(--neg); }
@keyframes stampIn {
  0% { transform: rotate(-8deg) scale(2.2); opacity: 0; }
  60% { transform: rotate(-8deg) scale(.94); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.show { animation: none; transform: rotate(-8deg) scale(1); opacity: 1; }
  #ach-toasts .ach-toast { transition: none; transform: none; }
}

/* ---------- deal docket (game cards) ---------- */
.docket {
  background: var(--receipt); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 640px; margin: 0 auto; overflow: hidden;
}
.docket-head {
  background: var(--ink); color: var(--paper); padding: 14px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em;
}
.docket-body { padding: 26px 26px 30px; }
.docket-title { font-family: var(--font-display); font-size: clamp(1.3rem, 3.4vw, 1.9rem); text-transform: uppercase; margin: 0 0 12px; line-height: 1.15; }
.docket-price {
  display: inline-block; font-family: var(--font-display); font-size: 1.6rem;
  background: var(--coupon); border: var(--border); border-radius: 8px;
  padding: 6px 16px; margin: 6px 0 14px; transform: rotate(-1.5deg);
}
.docket-blurb { font-size: 1rem; }
.perforation {
  border-top: 3px dashed var(--ink); margin: 22px -26px; opacity: .35;
}
.vote-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.verdict-meta {
  margin-top: 18px; font-size: .92rem; background: var(--paper-2);
  border: 2px dashed var(--ink); border-radius: 8px; padding: 14px 16px;
}
.verdict-meta strong { text-transform: uppercase; }
.comment-bubble {
  margin-top: 14px; background: var(--paper); border: 2px solid var(--ink);
  border-radius: 0 12px 12px 12px; padding: 12px 16px; font-size: .95rem;
}
.comment-bubble .who { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--stamp-blue); }
.progress-line { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.progress-bar { flex: 1; height: 16px; border: 3px solid var(--ink); border-radius: 999px; background: var(--receipt); overflow: hidden; }
.progress-fill { height: 100%; background: var(--bargain); width: 0; transition: width .3s ease; }

/* ---------- score / HUD ---------- */
.hud {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin: 0 auto 26px; max-width: 720px;
}
.hud-chip {
  background: var(--ink); color: var(--paper); border: var(--border);
  border-radius: 999px; padding: 8px 18px; font-weight: 700;
  font-size: .88rem; text-transform: uppercase; letter-spacing: .06em;
}
.hud-chip b { color: var(--coupon); }
.hud-chip.live { background: var(--neg); border-color: var(--neg-dark); color: #fff; }

/* ---------- game over / results ---------- */
.result-panel {
  background: var(--receipt); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 640px; margin: 0 auto; padding: 36px 30px;
  text-align: center;
}
.result-panel .big-score { font-family: var(--font-display); font-size: clamp(2.6rem, 8vw, 4rem); margin: .1em 0; }
.rank-badge {
  display: inline-block; font-family: var(--font-display); text-transform: uppercase;
  background: var(--coupon); border: var(--border); border-radius: 10px;
  padding: 12px 24px; font-size: 1.2rem; transform: rotate(-2deg);
  box-shadow: var(--shadow-sm); margin: 10px 0 20px;
}
.score-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; text-align: left; }
.score-table th, .score-table td { border: 2px solid var(--ink); padding: 8px 10px; }
.score-table th { background: var(--ink); color: var(--paper); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }
.score-table tr:nth-child(even) td { background: var(--paper-2); }

/* ---------- lore page ---------- */
.lore-entry {
  background: var(--receipt); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; margin-bottom: 26px; position: relative;
}
.lore-entry h3 { font-size: 1.3rem; margin-bottom: .4em; padding-right: 120px; }
.lore-entry .src { font-size: .8rem; margin-top: 12px; }
.lore-entry .src a { word-break: break-all; }
.legend-flag {
  position: absolute; top: 18px; right: 18px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 5px 12px; border: 2px solid var(--ink); border-radius: 999px;
}
.legend-flag.verified { background: var(--bargain-dark); color: #fff; }
.legend-flag.legend { background: var(--coupon); }
.legend-flag.paraphrase { background: var(--stamp-blue); color: #fff; }
.lexicon { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.lexicon .lore-entry { margin-bottom: 0; }
.lexicon dt { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; margin-bottom: 6px; }
.lexicon dd { margin: 0; font-size: .93rem; }
.toc { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 36px; }
.toc a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .06em;
  border: var(--border); border-radius: 999px; padding: 8px 16px; background: var(--receipt);
  box-shadow: var(--shadow-sm);
}
.toc a:hover { background: var(--coupon); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); border-top: var(--border); margin-top: 70px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; margin-bottom: 26px; }
.footer-grid h4 { font-family: var(--font-display); text-transform: uppercase; font-size: .95rem; color: var(--coupon); margin: 0 0 10px; }
.footer-grid a { color: var(--paper); font-size: .88rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.disclaimer {
  border: 2px dashed var(--coupon); border-radius: 10px; padding: 16px 18px;
  font-size: .85rem; margin-bottom: 22px;
}
.disclaimer strong { color: var(--coupon); text-transform: uppercase; letter-spacing: .08em; }
.fineprint { font-size: .75rem; opacity: .75; }

/* ---------- canvas games ---------- */
.game-stage {
  background: var(--ink); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; overflow: hidden;
  position: relative;
}
/* Warehouse Siege runs a wide 16:11 battlefield — give it room. */
.game-stage.ws-wide { max-width: 920px; }
.game-stage canvas { display: block; width: 100%; height: auto; }
.game-stage canvas.touch-play { touch-action: none; }
.game-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; text-align: center;
  background: rgba(25,20,16,.62); color: var(--paper); padding: 24px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.game-overlay h2 { color: var(--coupon); margin: 0; }
.game-overlay p { max-width: 380px; }
[hidden] { display: none !important; }

.controls-hint { text-align: center; font-size: .85rem; margin-top: 14px; opacity: .85; }
.controls-hint kbd {
  border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 6px;
  padding: 2px 8px; background: var(--receipt); font-family: var(--font-mono); font-weight: 700;
}

/* effect game server bars */
.server-wrap { max-width: 720px; margin: 0 auto; }
.meter { border: var(--border); border-radius: 10px; background: var(--receipt); overflow: hidden; height: 30px; margin: 8px 0 4px; box-shadow: var(--shadow-sm); }
.meter > div { height: 100%; transition: width .25s ease; }
.meter.health > div { background: var(--bargain); }
.meter.traffic > div { background: var(--neg); }
.meter-label { display: flex; justify-content: space-between; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.upgrade-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.wave-banner {
  text-align: center; font-family: var(--font-display); text-transform: uppercase;
  font-size: 1.1rem; background: var(--neg); color: #fff; border: var(--border);
  border-radius: 10px; padding: 10px; margin: 18px auto; max-width: 720px;
  box-shadow: var(--shadow-sm);
}
.server-big {
  width: 100%; max-width: 720px; margin: 0 auto; display: block;
  border: var(--border); border-radius: var(--radius); background: var(--receipt);
  box-shadow: var(--shadow); padding: 26px; cursor: pointer; user-select: none;
  -webkit-user-select: none; touch-action: manipulation; text-align: center;
  font-family: var(--font-mono);
}
.server-big:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }

/* barcode strip (decorative, pure CSS/SVG) */
.barcode { display: flex; align-items: stretch; gap: 2px; height: 44px; justify-content: center; margin: 18px 0 6px; }
.barcode i { background: var(--ink); display: block; }

/* misc */
.center { text-align: center; }
.mt { margin-top: 26px; }
.small { font-size: .85rem; }
.back-link { display: inline-block; margin-bottom: 22px; font-weight: 700; text-decoration: none; color: var(--ink); text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; }
.back-link:hover { color: var(--neg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  section.block { padding: 36px 0; }
  nav.main-nav { margin-left: 0; }
  .site-header .wrap { gap: 10px; }
  .btn-lg { font-size: 1.05rem; padding: 16px 24px; }
}

/* ---- high scores ---- */
.hs-panel {
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--receipt);
  padding: 24px;
  margin-top: 30px;
  text-align: left;
}
.hs-panel h3 {
  font-family: 'Archivo Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 6px;
}
.hs-myscore {
  font-family: 'Archivo Black', sans-serif;
  font-size: 2.4rem;
  margin: 4px 0 12px;
}
.hs-myscore span { font-size: 1.1rem; font-family: 'Space Mono', monospace; }
.hs-form { display: flex; gap: 10px; flex-wrap: wrap; }
.hs-input {
  flex: 1 1 200px;
  border: var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  background: var(--paper);
  min-width: 0;
}
.hs-input:focus { outline: 3px solid #191410; box-shadow: 0 0 0 5px #FFC93C; }
.hs-note { margin: 8px 0 0; }
.hs-list { margin-top: 18px; }
.hs-list h4 {
  font-family: 'Archivo Black', sans-serif;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 8px;
}
.hs-board { list-style: none; margin: 0; padding: 0; }
.hs-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 4px;
  border-bottom: 2px dashed var(--ink);
  font-size: .95rem;
}
.hs-rank { font-weight: 700; min-width: 44px; }
.hs-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-score { font-weight: 700; }
.hs-mine { background: var(--coupon); border-bottom-style: solid; }
.hs-hall { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 20px; }
.hs-hall .hs-panel { margin-top: 0; }
.hs-hall h4 { margin-top: 0; }

/* ---- Eneloop Exchange: trade bar, event tape, P&L colours ---- */
.trade-bar { display: flex; gap: 14px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .trade-bar .btn { min-width: 140px; }
}
.trade-bar .btn { min-width: 170px; }
.tape { margin-top: 18px; border: 3px solid var(--ink); background: #fff; min-height: 96px; padding: 10px 14px; font-size: .85rem; }
.tape-item { display: block; padding: 3px 0; border-bottom: 1px dashed rgba(25,20,16,.2); }
.tape-item:last-child { border-bottom: 0; }
.tape-item.hot { font-weight: 700; color: var(--neg); }
.pos { color: var(--bargain-dark); }
.neg { color: var(--neg); }

/* ---- Sockpuppet Sniffer: suspect cards ---- */
.suspects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 22px; }
.suspect { border: 3px solid var(--ink); background: #fff; padding: 14px; box-shadow: 5px 5px 0 var(--ink); }
.suspect h4 { margin: 0 0 2px; font-size: 1.05rem; }
.suspect .meta { font-size: .78rem; opacity: .75; margin-bottom: 8px; }
.suspect canvas { display: block; width: 100%; height: auto; border: 2px solid var(--ink); background: var(--paper); }
.suspect .verdict { display: flex; gap: 10px; margin-top: 10px; }
.suspect .verdict .btn { flex: 1; padding: 8px 6px; font-size: .85rem; }
.suspect.flagged-sock { outline: 4px solid var(--neg); }
.suspect.flagged-legit { outline: 4px solid var(--bargain); }
.suspect .reveal { margin-top: 8px; font-size: .82rem; font-weight: 700; }
.briefing { border: 3px solid var(--ink); background: #fff; padding: 16px 18px; box-shadow: 5px 5px 0 var(--ink); margin-top: 18px; }
.briefing h3 { margin-top: 0; }
.briefing ol { margin: 8px 0 0; padding-left: 22px; }
.briefing li { margin-bottom: 6px; font-size: .92rem; }

/* ---- dev.html: code blocks + spec tables ---- */
.codeblock { background: var(--ink); color: #f5f0e1; border: 3px solid var(--ink); padding: 16px 18px; overflow-x: auto; font-family: "Space Mono", monospace; font-size: .82rem; line-height: 1.55; margin: 14px 0; }
.codeblock .cm { color: #8a8577; }
.codeblock .kw { color: #FFC93C; }
.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .9rem; }
.spec-table th, .spec-table td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; }
.spec-table th { background: var(--coupon); }
.filetree { background: #fff; border: 3px solid var(--ink); padding: 16px 18px; font-family: "Space Mono", monospace; font-size: .82rem; line-height: 1.6; overflow-x: auto; white-space: pre; }

/* ============ achievements, share rows, trophy room, daily strip ============ */
.btn-ghost { background: transparent; border: 2px solid var(--ink); color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; transform: none; }
.btn-sm { font-size: .8rem; padding: 8px 14px; }
.sound-toggle { margin-top: 6px; }

.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.game-overlay .share-row { margin-bottom: 6px; }
.result-panel .share-row { margin-top: 16px; }

#ach-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 360px); }
.ach-toast { display: flex; gap: 12px; align-items: center; background: var(--ink); color: var(--paper); border: 3px solid var(--coupon); padding: 12px 16px; font-size: .85rem; line-height: 1.4; box-shadow: 5px 5px 0 rgba(0,0,0,.35); opacity: 0; transform: translateY(14px); transition: opacity .3s, transform .3s; }
.ach-toast.show { opacity: 1; transform: none; }
.ach-toast strong { color: var(--coupon); }
.ach-seal { font-size: 1.6rem; color: var(--coupon); }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 8px; }
.stat-cell { background: var(--paper-2); border: 3px solid var(--ink); box-shadow: var(--shadow-sm); padding: 14px 10px; text-align: center; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; }
.stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }

.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 10px 0 26px; }
/* a11y (stage 2B P2): unwon trophies are desaturated via background/seal only —
 * the old .trophy{opacity:.55} faded the text too. Text stays full opacity. */
.trophy { background: var(--paper-2); border: 3px solid var(--ink); padding: 14px; }
.trophy:not(.won) { background: #e6dcc6; }
.trophy.won { background: #fff; box-shadow: var(--shadow-sm); }
.trophy:not(.won) .trophy-desc { color: #5c554a; }
.trophy-seal { display: block; font-size: 1.8rem; color: var(--coupon); text-shadow: 1px 1px 0 var(--ink); margin-bottom: 6px; }
.trophy:not(.won) .trophy-seal { color: #B9AE97; text-shadow: none; }
.trophy strong { display: block; margin-bottom: 4px; }
.trophy-desc { display: block; font-size: .82rem; line-height: 1.45; }
.trophy-date { display: block; margin-top: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bargain-dark); font-weight: 700; }

.daily-strip { background: var(--ink); color: var(--paper); }
.daily-strip .wrap { max-width: 1000px; }
.daily-inner { display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.daily-strip h2 { color: var(--paper); margin: 6px 0 10px; }
.daily-strip p { color: #CFC6B4; max-width: 46ch; }
.daily-strip .hero-kicker { color: var(--coupon); }
.daily-links { display: flex; gap: 10px; flex-wrap: wrap; }
.daily-strip .btn-ghost { border-color: var(--paper); color: var(--paper); }
.daily-strip .btn-ghost:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 640px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  #ach-toasts { right: 10px; left: 10px; max-width: none; }
}

/* ---------- Game 10: Warehouse Siege ---------- */
.td-controls { display: flex; gap: 10px; justify-content: center; margin: 0 0 14px; flex-wrap: wrap; }
.td-controls .btn:disabled { opacity: 0.45; cursor: default; }
.td-palette {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin: 18px 0 10px;
}
.td-tower {
  background: #221c14; border: 2px solid #3a3126; border-radius: 10px;
  padding: 10px 8px; cursor: pointer; text-align: center; color: #FFF6E3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: inherit; transition: border-color 0.15s, transform 0.15s;
}
.td-tower:hover { transform: translateY(-2px); }
/* F1 micro-interaction (PA 2.25.0): touch taps lost the hover lift (hover jump is
   disabled on coarse pointers) — give palette taps a real press so selection feels alive. */
.td-tower:active { transform: scale(0.94); border-color: #FFC93C; box-shadow: inset 0 2px 6px rgba(0,0,0,.45); }
.td-tower.active { border-color: #FFC93C; }
.td-tower.poor .td-cost { color: #E85D5D; }
/* F2 micro-interaction (PA 2.29.0): denied-placement feedback. When a build is
   denied, the palette button shakes "no" and the cash pill pulses red when the
   reason is insufficient funds. Wall-time CSS only; prefers-reduced-motion kills both. */
@keyframes ws-deny-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
.td-tower.denied { animation: ws-deny-shake 0.32s ease; border-color: #E05252; }
@keyframes ws-cash-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,82,82,0); }
  50% { box-shadow: 0 0 0 3px rgba(224,82,82,.55); }
}
#ws-cash.cash-poor { animation: ws-cash-pulse 0.52s ease; }
@media (prefers-reduced-motion: reduce) {
  .td-tower.denied, #ws-cash.cash-poor { animation: none; }
}
/* F5 micro-interaction (PA 2.47.0): upgrade-affordability shimmer ping. When
   cash crosses the open upgrade button's cost threshold upward, the button
   gets a one-shot gold sweep + soft pop. Wall-time CSS only; the JS hook is
   gated by PA_FX.reduced and the media query kills the animation outright. */
@keyframes ws-afford-pop {
  0% { transform: scale(.94); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes ws-afford-sweep {
  from { left: -45%; }
  to { left: 135%; }
}
#ws-upg.ws-afford {
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,201,60,.85), 0 0 12px rgba(255,201,60,.55);
  animation: ws-afford-pop .45s ease;
}
#ws-upg.ws-afford::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; left: -45%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: ws-afford-sweep .8s ease .05s 1;
}
@media (prefers-reduced-motion: reduce) {
  #ws-upg.ws-afford { animation: none; box-shadow: none; }
  #ws-upg.ws-afford::after { content: none; }
}
/* F6 micro-interaction (PA 2.53.0): speed-button turbo state. While the game
   runs above 1x the button carries a persistent gold pulse ring so the pace
   is visible at a glance; the label itself always shows 1x/2x/3x. Static gold
   tint when reduced-motion is on — state must survive animation removal. */
@keyframes ws-turbo-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,201,60,.9), 0 0 10px rgba(255,201,60,.35); }
  50% { box-shadow: 0 0 0 2px rgba(255,201,60,.9), 0 0 18px rgba(255,201,60,.65); }
}
#ws-speed.ws-turbo {
  border-color: #FFC93C; color: #FFD876;
  animation: ws-turbo-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  #ws-speed.ws-turbo { animation: none; background: rgba(255,201,60,.12); }
}
/* F7 micro-interaction (PA 2.59.0): vault-danger vignette + lives-chip ramp.
   The vault had two danger signals that never talked to each other: the
   LAST STAND latch (PA 2.33.0) buffed towers but only whispered via a chip,
   and leaks flash the field for a frame. Now low lives are readable at a
   glance: at <=10 the lives chip turns amber, at <=LAST_STAND_LIVES (5) it
   goes red with a soft pulse AND the battlefield gets a breathing red edge
   vignette (.ws-danger, inset overlay over the canvas, under the start/menu
   overlay). Classes are toggled by updateHud from S.lives alone — pure
   threshold state, deterministic, zero new strings; reduced-motion kills both
   pulses but keeps the static tint and vignette. */
@keyframes ws-danger-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: .95; }
}
.game-stage .ws-danger {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(224,82,82,.42) 100%);
}
.game-stage.ws-danger-on .ws-danger {
  opacity: .7;
  animation: ws-danger-pulse 2.4s ease-in-out infinite;
}
#ws-lives.lives-low { color: #FFC93C; }
#ws-lives.lives-crit {
  color: #E05252;
  animation: ws-chip-pulse 1.6s ease-in-out infinite;
}
@keyframes ws-chip-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .game-stage.ws-danger-on .ws-danger { animation: none; opacity: .5; }
  #ws-lives.lives-crit { animation: none; }
}
/* F8 micro-interaction (PA 2.65.0): combo-tier HUD chip. While a paying D4
   tier runs the chip carries a gold edge so the ladder is visible at a
   glance; the multiplier text always matches killStreakLabel. One-shot pop
   (ws-combo-pop, F5-style re-trigger) on every tier-up. Static tint when
   reduced-motion is on — state must survive animation removal. */
#ws-combo.ws-combo-on { border-color: #FFC93C; color: #FFC93C; }
@keyframes ws-combo-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
#ws-combo.ws-combo-pop { animation: ws-combo-pop .38s ease; }
@media (prefers-reduced-motion: reduce) {
  #ws-combo.ws-combo-pop { animation: none; }
  #ws-combo.ws-combo-on { background: rgba(255,201,60,.12); }
}
/* D7 (PA 2.76.0): flawless-rush HUD chip. Amber edge marks the live +25%
   fire-rate window; the chip counts down the remaining seconds and vanishes
   when the window closes. No animation at all — static state marker, so
   reduced-motion safe by construction. */
#ws-rush.ws-rush-on { border-color: #FFC93C; color: #FFC93C; background: rgba(255,201,60,.08); }
/* Last Stand chip (PA 2.33.0): static red badge next to the lives pill while
   the latch is active. No animation — a persistent state marker, not juice. */
.ls-chip {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: #B91C1C; border-radius: 999px;
  vertical-align: 1px; white-space: nowrap;
}
.td-glyph {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: bold 15px monospace; color: #FFF6E3;
}
.td-tname { font-weight: 700; font-size: 13px; }
.td-cost { font: bold 13px monospace; color: #3FA34D; }
.td-blurb { font-size: 11px; color: #b9a98c; line-height: 1.35; }
.td-panel {
  background: #1c1712; border: 1px solid #3a3126; border-radius: 10px;
  padding: 12px 16px; min-height: 58px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.td-selbtns { display: flex; gap: 8px; }
@media (max-width: 900px) {
  .td-palette { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .td-palette { grid-template-columns: repeat(2, 1fr); }
  .td-blurb { display: none; }
}

/* ============================================================
   Cross-device UX: phones, tablets, desktops (added 2026-09-29)
   Phones get 44px touch targets, no iOS input zoom, notch-safe
   insets; desktops keep hover states. Zero layout changes on PC.
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

/* iPhone notch / home-indicator safe areas */
.site-header { padding-top: env(safe-area-inset-top, 0px); }
.site-footer .wrap { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
#ach-toasts { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* Coarse pointers (phones/tablets): roomier hit targets, no iOS auto-zoom */
@media (pointer: coarse) {
  .hint-desktop { display: none; } /* stage 2B UX P2: desktop-only hints hidden on touch */
  nav.main-nav a { padding: 12px 14px; }
  .nav-drop-btn { padding: 12px 14px; }
  .td-tower { min-height: 78px; }
  .card-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }
  .hs-input, input[type="text"], input[type="search"], select, textarea { font-size: 16px; }
  /* hover lifts become taps: keep the press feedback, drop the hover jump */
  .card:hover { transform: none; box-shadow: var(--shadow); }
  .btn:hover { transform: none; }
}

/* Narrow phones: two-line nav stays compact, hero never overflows */
@media (max-width: 720px) {
  nav.main-nav { gap: 4px; }
  nav.main-nav a { font-size: .72rem; letter-spacing: .04em; }
  .nav-drop-btn { font-size: .72rem; letter-spacing: .04em; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hs-panel { padding: 18px; }
  .stat-num { font-size: 1.4rem; }
}

/* ---------- round-1 UX panel fixes ---------- */
/* a11y: two-tone focus — dark ring plus coupon halo, legible on paper and ink */
:focus-visible { outline: 3px solid #191410; box-shadow: 0 0 0 5px #FFC93C; outline-offset: 2px; border-radius: 6px; }

/* skip link: injected as the first element of <body> by site.js */
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 12px; top: 12px; z-index: 9999; background: #191410; color: #FFC93C; padding: 10px 16px; border-radius: 8px; font-weight: 700; }

/* (round-1 mobile "Games" disclosure reverted 2026-09-29 per J:
 * the main design shows the full inline nav on all viewports) */

/* neg-dodger streak badge */
.streak {
  display: inline-block;
  background: #FFC93C;
  color: #191410;
  font-weight: 800;
  font-size: 0.75em;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  border: 2px solid #191410;
  margin-left: 0.4em;
  vertical-align: middle;
}

/* warehouse siege: wave preview + blitz window + coach hint */
.ws-preview { max-width: 640px; margin: 0 auto 14px; padding: 10px 14px; border: 2px dashed rgba(255,201,60,0.5); border-radius: 10px; font-size: 0.92em; line-height: 1.5; }
.ws-preview:empty { display: none; }
.ws-preview .blitz { color: #7a5200; font-weight: 800; }
.coach-hint { background: #FFF6E3; border: 2px solid #FFC93C; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; }

/* ozbargain effect: forecast, banner slam, health panic, pause overlay */
.oe-forecast { max-width: 720px; margin: 0 auto 12px; padding: 8px 14px; border: 2px dashed rgba(77,163,255,0.6); border-radius: 10px; font-size: 0.92em; line-height: 1.5; }
.oe-forecast:empty { display: none; }
.wave-banner.slam { animation: bannerslam 0.45s ease-out; }
@keyframes bannerslam { 0% { transform: scale(1.6); opacity: 0; } 60% { transform: scale(0.96); opacity: 1; } 100% { transform: scale(1); } }
.meter.health.health-critical { animation: healthpulse 1.2s ease-in-out infinite; }
@keyframes healthpulse { 50% { box-shadow: 0 0 0 4px rgba(217,43,43,0.45); } }
.pause-overlay { position: fixed; inset: 0; background: rgba(20,18,16,0.72); display: flex; align-items: center; justify-content: center; z-index: 50; }
.pause-overlay[hidden] { display: none; }
.pause-card { background: #FFF6E3; border: 3px solid #191410; border-radius: 14px; padding: 28px 36px; text-align: center; box-shadow: 6px 6px 0 rgba(0,0,0,0.35); }
@media (prefers-reduced-motion: reduce) {
  .wave-banner.slam { animation: none; }
  .meter.health.health-critical { animation: none; }
}

/* quiz quartet: wrong-call card shake + per-card timer */
.card-shake { animation: cardshake 0.4s ease; }
@keyframes cardshake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}
.card-timer { height: 8px; border: 2px solid #191410; border-radius: 99px; overflow: hidden; margin: 10px 0 4px; background: #fff; }
.card-timer > div { height: 100%; width: 100%; background: #1F9D4D; transition: width 0.1s linear; }
@media (prefers-reduced-motion: reduce) {
  .card-shake { animation: none; }
}


/* sniffer: 44px touch targets, coach ring, subpoena reveal */
.suspect .verdict .btn { min-height: 44px; min-width: 44px; }
.subpoena-btn { margin-top: 8px; }
.subpoena-hit { margin-top: 8px; font-size: 13px; background: #FFF6E3; border: 2px dashed #191410; border-radius: 8px; padding: 6px 10px; }
.coach-ring { outline: 3px solid #D92B2B; outline-offset: 4px; animation: coachpulse 1.6s ease-in-out infinite; }
@keyframes coachpulse { 0%,100% { outline-color: #D92B2B; } 50% { outline-color: #FFC93C; } }
@media (prefers-reduced-motion: reduce) { .coach-ring { animation: none; } }

/* ---------- batch 4: shared CSS juice kit (all reduced-motion-safe) ---------- */
.chip-pop { display: inline-block; animation: chippop 0.35s ease; }
@keyframes chippop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.pulse-red { animation: pulsered 0.5s ease; }
@keyframes pulsered {
  0%, 100% { background-color: inherit; }
  30% { background-color: #D92B2B; color: #FFF6E3; }
}
.banner-slam { animation: bannerslam 0.4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bannerslam {
  0% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* GET READY banner (neg-dodger) */
.ready-banner {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  font: 900 44px "Space Mono", monospace; color: #191410;
  text-shadow: 3px 3px 0 #FFC93C;
  letter-spacing: 0.04em;
}
.ready-banner[hidden] { display: none; }
/* (batch-4 first-run coach bubble reverted 2026-09-29 per J: the main design
 * has no first-run overlay. first-run.js is no longer loaded by game pages.) */
/* (batch-4 floating speaker chip reverted 2026-09-29 per J: the main design
 * keeps the footer sound toggle + M mute only.) */
@media (prefers-reduced-motion: reduce) {
  .chip-pop, .pulse-red, .banner-slam { animation: none; }
}
/* eneloop lot selector */
.lot-bar { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.lot-btn.active { background: #191410; color: #FFF6E3; }

/* ============================================================
   Warehouse Siege UX overhaul (2026-09-29, J's real-Android feedback)
   Game scope only. Desktop untouched except inside the queries below.
   ============================================================ */

/* ---- WS landscape-play mode ---- */
.nuke-short { display: none; }
#ws-exit-landscape { order: -1; }

/* In landscape-play, chrome outside the arena hides. Disclaimers stay in the
   DOM and are visible in every normal view; they are only hidden inside the
   fullscreen play mode. */
body.ws-landscape-mode .site-header,
body.ws-landscape-mode .back-link,
body.ws-landscape-mode #ws-preview,
body.ws-landscape-mode .controls-hint,
body.ws-landscape-mode .site-footer,
body.ws-landscape-mode .ws-arena ~ * { display: none; }
body.ws-landscape-mode #ws-exit-landscape { display: inline-flex; }

/* Portrait + landscape-mode (user hasn't rotated yet): stacked, just roomier. */
body.ws-landscape-mode .ws-arena { max-width: 920px; margin: 0 auto; }

/* Landscape HUD: compact vitals bar. The .hud is NOT hidden in landscape-play
   (red-team: hiding it blacked out the economy readout); it becomes a slim
   single-row strip and the arena height shrinks to compensate. */
@media (orientation: landscape) {
  body.ws-landscape-mode .hud {
    display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
    max-width: none; margin: 0; padding: 4px 8px;
    overflow-x: auto; scrollbar-width: none;
    background: rgba(20,16,12,.88);
    min-height: 32px; box-sizing: border-box;
  }
  body.ws-landscape-mode .hud::-webkit-scrollbar { display: none; }
  body.ws-landscape-mode .hud-chip {
    font-size: 11px; padding: 3px 10px; white-space: nowrap; flex: 0 0 auto;
  }
  body.ws-landscape-mode .ws-arena {
    height: calc(100vh - 40px); height: calc(100dvh - 40px);
  }
}

/* Landscape orientation: battlefield grid — canvas left, tower strip right, panel floats. */
@media (orientation: landscape) {
  body.ws-landscape-mode .ws-arena {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    grid-template-areas: "ctrls ctrls" "stage palette";
    gap: 8px;
    height: 100vh; height: 100dvh;
    padding: 8px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(8px + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    max-width: none;
  }
  body.ws-landscape-mode .td-controls { grid-area: ctrls; margin: 0; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  body.ws-landscape-mode .game-stage { grid-area: stage; max-width: none; margin: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
  body.ws-landscape-mode #ws-palette {
    grid-area: palette; margin: 0; display: flex; flex-direction: column;
    overflow-y: auto; max-height: 100%; align-content: flex-start;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  body.ws-landscape-mode .td-tower { padding: 6px 4px; min-height: 0; flex: 0 0 auto; }
  body.ws-landscape-mode .td-tower .td-blurb { display: none; }
  body.ws-landscape-mode .td-glyph { width: 26px; height: 26px; font-size: 13px; }
  body.ws-landscape-mode .td-tname { font-size: 11px; }
  body.ws-landscape-mode .td-panel {
    position: absolute; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 6; max-width: min(520px, 60%); margin: 0;
  }
}

/* Fullscreen polish: page bg stays ink behind the stage. */
html:fullscreen, html:-webkit-full-screen { background: #14100c; }

/* Rotate hint: portrait-only, dismissible, never blocks input. */
#ws-rotate-hint {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 95;
  display: none; align-items: center; gap: 10px;
  background: #191410; color: #FFF6E3; border: 2px solid #FFC93C; border-radius: 999px;
  padding: 6px 6px 6px 16px; font-size: .8rem; font-weight: 700;
  max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
@media (orientation: portrait) {
  body.ws-landscape-mode #ws-rotate-hint:not(.ws-dismissed) { display: flex; }
}
#ws-rotate-hint button {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid #FFC93C; background: #FFC93C; color: #191410; font-weight: 700;
}

/* Desktop: the landscape button hides on real desktops; harmless on narrow windows. */
@media (pointer: fine) and (min-width: 901px) {
  #ws-landscape { display: none; }
}

/* ---- WS legend dialog ---- */
#ws-legend { position: fixed; inset: 0; z-index: 90; }
#ws-legend[hidden] { display: none; }
.ws-legend-backdrop { position: absolute; inset: 0; background: rgba(20,16,12,.66); }
.ws-legend-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82vh; max-height: 82dvh;
  background: #221c14; color: #FFF6E3; border: 2px solid #3a3126; border-bottom: 0;
  border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  touch-action: pan-y;
}
.ws-legend-sheet::before { /* drag-handle visual */
  content: ""; width: 44px; height: 5px; border-radius: 999px; background: #3a3126;
  margin: 10px auto 0;
}
.ws-legend-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; }
.ws-legend-head h2 { margin: 0; font-size: 1.05rem; color: #FFC93C; }
.ws-legend-close {
  min-height: 44px; min-width: 44px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 2px solid #3a3126; color: #FFF6E3; font-size: 1rem; font-weight: 700;
}
.ws-legend-body { overflow-y: auto; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.ws-leg-sec > h3 {
  position: sticky; top: 0; background: #221c14; padding: 10px 0 6px; margin: 0;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #FFC93C;
}
.ws-leg-row { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid #2c251b; }
.ws-leg-row .ws-leg-name { font-weight: 700; font-size: .9rem; display: block; }
.ws-leg-row .ws-leg-desc { font-size: .82rem; color: #cbbfa5; display: block; margin-top: 2px; }
/* Swatches: 40px, CSS only — no image assets. */
.ws-leg-sw {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: bold 17px monospace; color: #FFF6E3; background: var(--sw, #555);
}
.ws-leg-sw.ws-leg-enemy { border-radius: 10px; }
.ws-leg-sw.ws-leg-enemy.is-boss { box-shadow: 0 0 0 3px #FFC93C; }
.ws-leg-sw.ws-leg-zone { border-radius: 10px; }
.ws-leg-sw.ws-leg-mech { border-radius: 10px; background: #2c251b; font-size: 20px; }
/* Landscape: side panel instead of bottom sheet. */
@media (orientation: landscape) {
  .ws-legend-sheet {
    left: auto; top: 0; bottom: 0; right: 0; width: min(360px, 44vw);
    max-height: none; border-radius: 0; border-bottom: 2px solid #3a3126; border-right: 0;
    padding-bottom: 0;
  }
  .ws-legend-sheet::before { display: none; }
}

/* ---- 360px-class phones: full nav reachable, never clipped mid-word ---- */
@media (max-width: 400px) {
  .site-header .wrap { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .brand { gap: 8px; flex: 0 1 auto; min-width: 0; }
  .brand svg { width: 32px; height: 32px; }
  .brand-name { font-size: .95rem; white-space: nowrap; }
  .brand-name small { display: none; }
  nav.main-nav {
    flex: 1 1 100%; margin-left: 0;
    gap: 4px; min-height: 44px;
    scroll-padding-inline-end: 16px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
            mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  nav.main-nav a, .nav-drop-btn {
    font-size: .68rem; letter-spacing: .03em; padding: 10px 9px;
  }
  /* WS controls: 7 buttons wrap to exactly 2 rows at 360px.
     E3 (PA 2.40.0, hourly theme: mobile feel & viewport): restore the 44px
     touch-target floor — the .7rem/8px compaction dropped the combat cluster
     (Send wave, speed, pause, nuke, mute) to ~28px tall on 360px-class phones,
     the worst possible place for undersized targets. inline-flex keeps the
     short labels centered. Pure chrome; sim + determinism untouched. */
  .td-controls { gap: 6px; }
  .td-controls .btn, .td-controls .shell-mute-btn {
    font-size: .7rem; padding: 8px 10px;
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  }
  #ws-nuke .nuke-full { display: none; }
  #ws-nuke .nuke-short { display: inline; }
}

/* ---------- Warehouse Siege: mobile viewport hardening (PA 2.28.0, hourly theme: mobile feel & viewport) ----------
   Notch-safe + bounce-free game viewport. Pure chrome; sim + determinism untouched.
   The page meta now carries viewport-fit=cover, which activates the existing
   env(safe-area-inset-*) rules on notched iPhones; these rules consume them on
   the game page. */

/* Kill pull-to-refresh / rubber-band bounce on the game page mid-run.
   Normal page scroll is unaffected — only the overscroll chain is cut. */
body.ws-page { overscroll-behavior: none; }

/* Start overlay: internal scroll must not chain to the page, and the sticky
   "Start defending" button must clear the home indicator on notched phones
   (the overlay fills the stage, which is full-bleed in landscape-play mode). */
.game-overlay {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
}

/* ---------- Warehouse Siege: mobile tap reliability (PA 2.34.0, hourly theme: mobile feel & viewport) ----------
   iOS Safari's long-press callout ("Copy / Look Up") can fire while a player
   presses-and-holds to aim a tower placement or holds the nuke button — the
   contextmenu preventDefault in the game JS does not stop it, and double-tap
   zoom is already dead via touch-action. Kill the callout and text selection
   across the arena chrome so a long press is just a long press.
   Scoped to the WS game page only; pure CSS; sim + determinism untouched.
   (-webkit-touch-callout is a no-op off iOS; user-select:none here mirrors the
   existing .btn rule for tappable controls.) */
body.ws-page .ws-arena {
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
body.ws-page .game-stage canvas { -webkit-touch-callout: none; }

/* ---------- Warehouse Siege: narrow-phone combat control targets (PA 2.40.0, hourly theme: mobile feel & viewport) ----------
   On 360px-class phones (max-width: 400px) the control cluster shrinks to font-size .7rem + 8px padding so the
   7 buttons wrap to exactly 2 rows at 360px — but that drops Send wave / speed /
   pause / nuke / mute to ~28px tall, below the 44px touch-target floor the coarse-
   pointer block promises elsewhere, on the buttons players hammer mid-combat.
   Fix: keep the compact type + 2-row wrap, add min-height: 44px with inline-flex
   centering on .td-controls .btn and .td-controls .shell-mute-btn (see the
   max-width: 400px block).
   Desktop layout unchanged (rule lives inside the narrow-phone query); no
   animation added, so reduced-motion safety holds by construction. */

/* ---------- Warehouse Siege: short-viewport compaction (PA 2.46.0, hourly theme: mobile feel & viewport) ----------
   E4: a phone with the browser URL bar visible (portrait, ~560-640px of visible
   height), a split-screen window, or a short desktop pane stacks the 6-chip HUD
   + 7-button control cluster + 440px canvas into a column taller than the
   viewport — the tower palette ends up a scroll away mid-run. This query
   compacts the chrome (never the game): HUD chips shrink, control gutters
   tighten, and the canvas is fold-capped with a viewport-relative max-height so
   the palette stays reachable. The game JS maps taps through
   getBoundingClientRect, so CSS resizing is hit-precision neutral.
   body.ws-landscape-mode is excluded: landscape-play owns its own compaction
   grid. Pure chrome; sim + determinism untouched; no animation added, so
   reduced-motion safety holds by construction. */
@media (max-height: 640px) {
  body.ws-page:not(.ws-landscape-mode) .hud { gap: 6px; margin-bottom: 10px; }
  body.ws-page:not(.ws-landscape-mode) .hud-chip {
    font-size: .72rem; padding: 5px 12px; letter-spacing: .04em;
  }
  body.ws-page:not(.ws-landscape-mode) .td-controls { gap: 6px; margin-bottom: 8px; }
  body.ws-page:not(.ws-landscape-mode) .game-stage canvas.touch-play {
    max-height: calc(100vh - 320px);  /* fallback: URL-bar-blind */
    max-height: calc(100dvh - 320px); /* mobile-URL-bar-accurate where supported */
  }
}

/* ---------- Warehouse Siege: thumb-zone combat controls (PA 2.52.0, hourly theme: mobile feel & viewport) ----------
   E5: on portrait mobile the E4-compacted page can still scroll between the
   fold-capped battlefield and the tower palette — the Send wave / speed /
   pause / nuke cluster scrolls away exactly when combat is hectic. Pin the
   cluster to the viewport top with position:sticky so the most-hammered
   buttons stay in the thumb zone while the player scrolls to the palette and
   back. The already-sticky .site-header would collide with a top:0 sticky
   (its height varies as the nav wraps), so on the WS game page it goes static
   here — nav stays one scroll-up away, and the Field Guide link sits inline
   under the arena anyway. The cluster gets the opaque page background
   (full-bleed via negative margins) so scrolling content hides behind it.
   Excludes body.ws-landscape-mode (its grid owns the control strip:
   grid-area ctrls, non-wrapping, internal x-scroll) and fine-pointer desktops
   (no scroll problem there; chrome stays as-is). Pure chrome; no animation,
   so reduced-motion safe by construction; sim + determinism untouched. */
@media (max-width: 900px) {
  body.ws-page:not(.ws-landscape-mode) .site-header { position: static; }
  body.ws-page:not(.ws-landscape-mode) .td-controls {
    position: sticky; top: 0; z-index: 40;
    background: var(--paper);
    margin: 0 -20px 8px; padding: 8px 20px;
    border-bottom: 2px solid var(--ink);
  }
}

/* ---------- Warehouse Siege: thumb-strip feel (PA 2.58.0, hourly theme: mobile feel & viewport) ----------
   E6: on coarse-pointer portrait phones the HUD, combat cluster and tower
   palette are horizontal snap rows (injected triage CSS in
   game-warehouse-siege.js) but fling freely — a thumb swipe overshoots past
   the chip/button/tile you wanted. Give all three rows scroll-snap-type: x
   proximity and snap-align: start on their items so a fling settles on a real
   target. Separately, the combat buttons (Send wave / speed / pause / nuke)
   never got the press feedback palette tiles have had since F1 (PA 2.25.0):
   hover lifts are disabled on coarse pointers, so on phones these most-hammered
   buttons felt dead. :active scale(0.94) makes every combat tap feel registered.
   Scoped to the same coarse+portrait WS context as the injected triage rows;
   scroll-snap is scroll physics (not an animation) and the press is immediate
   wall-time feedback like F1, so reduced-motion safety holds by construction.
   Pure chrome; sim + determinism untouched. */
@media (pointer: coarse) and (orientation: portrait) {
  body.ws-page .hud,
  body.ws-page .td-controls,
  body.ws-page #ws-palette {
    scroll-snap-type: x proximity;
  }
  body.ws-page .hud-chip,
  body.ws-page .td-controls .btn,
  body.ws-page .td-controls .shell-mute-btn,
  body.ws-page #ws-palette .td-tower {
    scroll-snap-align: start;
  }
  body.ws-page .td-controls .btn:active,
  body.ws-page .td-controls .shell-mute-btn:active {
    transform: scale(0.94);
  }
}

/* ---------- Warehouse Siege: notch-aware sticky strip + palette-tile tap hygiene (PA 2.64.0, hourly theme: mobile feel & viewport) ----------
   E7: two small coarse-pointer touch/viewport gaps left over from E5 (sticky
   combat strip) and the global .btn rule:
   (1) E5 pins .td-controls to top:0 — on viewport-fit=cover devices (notched
       iPhones, gesture-bar Androids) that tucks the strip under the status bar.
       top: env(safe-area-inset-top, 0px) with a top:0 fallback makes the strip
       notch-aware with zero effect where the inset is 0.
   (2) .btn / .shell-mute-btn already carry touch-action: manipulation (no
       double-tap-zoom delay on iOS), but the .td-tower palette tiles never got
       it — rapid mid-run tower picks can trigger the double-tap zoom gesture.
       manipulation keeps pan+pinch alive and kills only the zoom-tap, exactly
       like the combat buttons.
   Scoped to coarse pointers (E5's strip only sticks there anyway) and the WS
   game page; landscape-play excluded from (1) via the :not selector (its grid
   owns its own safe-area padding at the 1052/1061 rules). No animation or
   transition added, so reduced-motion safety holds by construction; pure
   chrome, sim + determinism untouched. */
@media (pointer: coarse) {
  body.ws-page:not(.ws-landscape-mode) .td-controls {
    top: 0; top: env(safe-area-inset-top, 0px);
  }
  body.ws-page .td-tower {
    touch-action: manipulation;
  }
}
