/* ROKKI.CLUB — стилі порталу (Е4). Джерело: docs/design/style-e3.css (дизайн Е3) + docs/design/fonts/fonts.css.
   Шрифти локальні (site/fonts/, OFL — fonts/OFL-LICENSES.txt), без зовнішніх CDN. Демо-утиліти сторінки станів прибрано. */

/* Local OFL fonts (Unbounded + Rubik, Cyrillic + Latin) */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/unbounded-600-cyr.woff2') format('woff2');
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/unbounded-600-lat.woff2') format('woff2');
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/unbounded-700-cyr.woff2') format('woff2');
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/unbounded-700-lat.woff2') format('woff2');
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/unbounded-800-cyr.woff2') format('woff2');
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/unbounded-800-lat.woff2') format('woff2');
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/rubik-400-cyr.woff2') format('woff2');
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/rubik-400-lat.woff2') format('woff2');
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/rubik-500-cyr.woff2') format('woff2');
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/rubik-500-lat.woff2') format('woff2');
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* =====
   ROKKI.CLUB — Stage E3 Full Design Stylesheet (Neo-Retro Arcade Club)
   Zero external CDN · Local OFL fonts (Unbounded + Rubik) · Works without JS
   ========================================================================== */


:root {
  /* Surfaces */
  --bg: #080b14;
  --bg-elevated: #0d1220;
  --surface: #101626;
  --surface-top: #0b101c;
  --surface-inset: #080c16;
  --border: #232e4a;
  --border-strong: #35466e;

  /* Text */
  --text: #f3f6fc;
  --text-secondary: #a2b0cb;
  --text-muted: #6e7f9f;

  /* Phosphor Accents */
  --cyan: #00d4ff;
  --cyan-soft: #7ee8ff;
  --cyan-bg: rgba(0, 212, 255, 0.11);
  --cyan-border: rgba(0, 212, 255, 0.4);

  --done: #39ff88;
  --done-hover: #62ffa0;
  --done-dark: #06140c;
  --done-shadow: #15803d;
  --done-bg: rgba(57, 255, 136, 0.11);
  --done-border: rgba(57, 255, 136, 0.44);

  --wip: #ffb000;
  --wip-light: #ffd166;
  --wip-deep: #d97706;
  --wip-bg: rgba(255, 176, 0, 0.12);
  --wip-border: rgba(255, 176, 0, 0.45);

  /* Typography */
  --font-display: 'Unbounded', 'Cascadia Code', Consolas, ui-monospace, monospace;
  --font-sans: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', Consolas, ui-monospace, 'Courier New', monospace;

  /* Layout */
  --max-w: 1080px;
  --radius-card: 11px;
  --radius-btn: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg);
  /* Layered starry arcade grid matching Just2/Palka + subtle CRT phosphor glow & scanlines */
  background-image:
    radial-gradient(ellipse 760px 420px at 14% -80px, rgba(0, 212, 255, 0.14), transparent 70%),
    radial-gradient(ellipse 620px 360px at 88% -60px, rgba(57, 255, 136, 0.085), transparent 70%),
    radial-gradient(ellipse 600px 440px at 82% 96%, rgba(255, 176, 0, 0.055), transparent 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Crect x='18' y='26' width='2' height='2' fill='%237ee8ff' fill-opacity='0.28'/%3E%3Crect x='96' y='14' width='1.5' height='1.5' fill='%23ffffff' fill-opacity='0.22'/%3E%3Crect x='184' y='44' width='2' height='2' fill='%23ffd166' fill-opacity='0.24'/%3E%3Crect x='54' y='92' width='1.5' height='1.5' fill='%23ffffff' fill-opacity='0.18'/%3E%3Crect x='146' y='118' width='2' height='2' fill='%2339ff88' fill-opacity='0.2'/%3E%3Crect x='204' y='162' width='1.5' height='1.5' fill='%23ffffff' fill-opacity='0.2'/%3E%3Crect x='34' y='182' width='2' height='2' fill='%237ee8ff' fill-opacity='0.22'/%3E%3Crect x='122' y='198' width='1.5' height='1.5' fill='%23ffffff' fill-opacity='0.16'/%3E%3C/svg%3E"),
    linear-gradient(rgba(99, 130, 198, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 130, 198, 0.065) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    220px 220px,
    32px 32px,
    32px 32px,
    100% 100%;
  line-height: 1.52;
}

/* Subtle perimeter CRT vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 56%, rgba(3, 5, 10, 0.45) 100%);
  z-index: 0;
}

/* Top phosphor edge */
.crt-topbar {
  position: relative;
  z-index: 2;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 212, 255, 0.08) 0%,
    rgba(0, 212, 255, 0.9) 26%,
    rgba(57, 255, 136, 0.85) 74%,
    rgba(57, 255, 136, 0.08) 100%
  );
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.4);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.top {
  position: relative;
  z-index: 1;
  padding: 34px 0 26px;
  border-bottom: 1px solid rgba(35, 46, 74, 0.9);
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.78) 0%, rgba(8, 11, 20, 0.15) 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 212, 255, 0.08);
}

.top__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.logo:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 10px;
}

.logo__emblem {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #0a0f1c;
  border: 1.5px solid var(--border-strong);
  box-shadow:
    4px 4px 0 #04060c,
    0 0 20px rgba(0, 212, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.logo:hover .logo__emblem {
  transform: translateY(-1px);
  border-color: var(--cyan);
}

.logo__emblem img,
.logo__emblem svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logo__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 26px rgba(0, 212, 255, 0.18);
}

.logo__accent {
  color: var(--cyan);
}

.tagline {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: #d8e3f6;
}

/* Language Switcher */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 9px;
  background: var(--surface-inset);
  border: 1.5px solid var(--border);
  box-shadow:
    3px 3px 0 #04060c,
    inset 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lang__link {
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.14s ease, background-color 0.14s ease;
}

.lang__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.lang__link[aria-current="page"] {
  background: var(--cyan-bg);
  color: var(--cyan-soft);
  box-shadow:
    inset 0 0 0 1px var(--cyan-border),
    0 0 12px rgba(0, 212, 255, 0.15);
}

.lang__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.lang__sep {
  display: none;
}

/* Subrow: Era chips + Collection HUD */
.top__row--sub {
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(53, 70, 110, 0.45);
}

.era-line {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.era-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #cbd8f0;
  padding: 2px 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #172038 0%, #101627 100%);
  border: 1px solid #2c3b61;
  box-shadow: 0 1px 0 #04060c, inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.counter {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  box-shadow: 2px 2px 0 #04060c, inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.counter__sep {
  color: var(--border-strong);
}

.counter__done {
  color: var(--done);
  font-weight: 700;
}

.counter__wip {
  color: var(--wip);
  font-weight: 700;
}

/* Mobile Keyboard Notice (hidden on desktop, visible <= 640px) */
.mobile-note {
  display: none;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(16, 28, 48, 0.95), rgba(10, 16, 30, 0.96));
  border: 1px solid #2b426a;
  border-left: 4px solid var(--cyan);
  font-size: 13.5px;
  line-height: 1.48;
  color: #cdd8ec;
  box-shadow: 3px 3px 0 #04060c;
}

.mobile-note__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--cyan);
}

.mobile-note__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  margin-bottom: 3px;
}

/* ==========================================================================
   Main Grid & Polished Cartridge Game Cards
   ========================================================================== */

main {
  flex: 1 0 auto;
  padding: 34px 0 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131a2d 0%, var(--surface) 24%, #0e1422 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow:
    6px 6px 0 #04060c,
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.card:hover,
.card.is-hover {
  transform: translate(-1px, -3px);
  box-shadow:
    8px 9px 0 #04060c,
    0 20px 42px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.card--done:hover,
.card--done.is-hover {
  border-color: var(--done);
  box-shadow:
    8px 9px 0 #04060c,
    0 0 28px rgba(57, 255, 136, 0.14),
    inset 0 1px 0 rgba(57, 255, 136, 0.2);
}

.card--wip:hover,
.card--wip.is-hover {
  border-color: var(--wip);
  box-shadow:
    8px 9px 0 #04060c,
    0 0 28px rgba(255, 176, 0, 0.13),
    inset 0 1px 0 rgba(255, 176, 0, 0.18);
}

/* Cartridge Top Spine with grip ridges, micro-LED & corner screws */
.card__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #101627 0%, var(--surface-top) 100%);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.card__slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  min-width: 0;
  white-space: nowrap; /* Е4: «01 // DESANT» не розривається на 375 px поруч із «UI: Ukrainian» */
}

.cart-grip {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.cart-grip i {
  display: block;
  width: 2px;
  height: 11px;
  background: #2f3e63;
  border-radius: 1px;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.5);
}

.cart-led {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

.card--done .cart-led {
  background: var(--done);
  box-shadow: 0 0 8px rgba(57, 255, 136, 0.85);
}

.card--wip .cart-led {
  background: var(--wip);
  box-shadow: 0 0 8px rgba(255, 176, 0, 0.85);
}

.card__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.tag--uilang {
  color: var(--cyan-soft);
  background: var(--cyan-bg);
  border: 1px solid var(--cyan-border);
}

.card__players {
  color: #b7c6e1;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(35, 46, 74, 0.58);
  border: 1px solid rgba(53, 70, 110, 0.65);
  white-space: nowrap;
}

/* Recessed CRT Screen Frame */
.card__screen {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060911;
  border-bottom: 1.5px solid var(--border);
  text-decoration: none;
}

/* Е4: обкладинка — фон декоративного шару (img з object-fit: cover замінено, див. кінець файлу) */
.card__cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease, filter 0.25s ease;
}

.card:hover .card__cover,
.card.is-hover .card__cover {
  transform: scale(1.035);
  filter: brightness(1.06) contrast(1.03);
}

/* CRT glass scanlines + inner shadow bezel + subtle upper-left glass sheen */
.card__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.07) 0%, transparent 32%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.13) 0px,
      rgba(0, 0, 0, 0.13) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.36) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 3px 14px rgba(0, 0, 0, 0.55);
}

/* Subtle CRT viewfinder corner brackets */
.screen-corners {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
  transition: opacity 0.2s ease;
  background:
    linear-gradient(to right, var(--cyan) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--cyan) 2px, transparent 2px) 0 0,
    linear-gradient(to left, var(--cyan) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--cyan) 2px, transparent 2px) 100% 0,
    linear-gradient(to right, var(--cyan) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--cyan) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--cyan) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--cyan) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 10px 10px;
}

.card--done .screen-corners {
  background:
    linear-gradient(to right, var(--done) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--done) 2px, transparent 2px) 0 0,
    linear-gradient(to left, var(--done) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--done) 2px, transparent 2px) 100% 0,
    linear-gradient(to right, var(--done) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--done) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--done) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--done) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 10px 10px;
}

.card:hover .screen-corners,
.card.is-hover .screen-corners {
  opacity: 0.85;
}

/* Missing-cover CRT NO SIGNAL fallback state */
.screen-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 212, 255, 0.12), transparent 65%),
    repeating-linear-gradient(90deg, #0c1222 0 16px, #090d19 16px 32px);
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.screen-fallback__code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan-soft);
  padding: 3px 10px;
  border: 1px solid var(--cyan-border);
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.08);
}

.screen-fallback__sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Card Body */
.card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
  gap: 13px;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.26;
  color: var(--text);
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge--done {
  color: var(--done);
  background: var(--done-bg);
  border: 1px solid var(--done-border);
  box-shadow: 0 0 12px rgba(57, 255, 136, 0.12);
}

.badge--wip {
  color: var(--wip);
  background: var(--wip-bg);
  border: 1px solid var(--wip-border);
}

.card__desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.56;
}

/* Mechanical Keycap Controls List */
.card__controls {
  list-style: none;
  margin: 0;
  padding: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 11px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.card__controls li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #172038 0%, #0b101d 100%);
  border: 1px solid #354569;
  border-bottom: 2.5px solid #1d2740;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #dce7fa;
  line-height: 1.3;
}

/* Segmented Retro Progress Panel (ONLY on in-progress cards) */
.progress {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px 11px;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid #1f2942;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.progress__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.progress__value {
  font-size: 13px;
  font-weight: 800;
  color: var(--wip-light);
}

.progress__bar {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 3px;
  background: #141c2e;
  border: 1px solid #283554;
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wip-deep) 0%, var(--wip) 55%, var(--wip-light) 100%);
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.42);
}

/* Segment divider notches */
.progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 9px,
    rgba(8, 11, 20, 0.78) 9px,
    rgba(8, 11, 20, 0.78) 11px
  );
}

/* Physical Arcade CTA Buttons */
.card__actions {
  margin-top: auto;
  padding-top: 6px;
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.play:focus-visible,
.play.is-focus {
  outline: 2.5px solid var(--cyan);
  outline-offset: 3px;
}

.play--done {
  background: linear-gradient(180deg, #52ff98 0%, var(--done) 100%);
  color: var(--done-dark);
  border: 1.5px solid #80ffb3;
  box-shadow:
    0 3px 0 var(--done-shadow),
    0 6px 18px rgba(57, 255, 136, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.play--done:hover,
.play--done.is-hover {
  background: linear-gradient(180deg, #74ffac 0%, var(--done-hover) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 var(--done-shadow),
    0 0 24px rgba(57, 255, 136, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.play--done:active,
.play--done.is-active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--done-shadow);
}

.play--wip {
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.18) 0%, rgba(255, 176, 0, 0.1) 100%);
  color: var(--wip-light);
  border: 1.5px solid var(--wip);
  box-shadow:
    0 3px 0 rgba(180, 95, 6, 0.55),
    inset 0 1px 0 rgba(255, 224, 130, 0.2);
}

.play--wip:hover,
.play--wip.is-hover {
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.28) 0%, rgba(255, 176, 0, 0.16) 100%);
  color: #fff5cc;
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 rgba(180, 95, 6, 0.65),
    0 0 20px rgba(255, 176, 0, 0.24),
    inset 0 1px 0 rgba(255, 224, 130, 0.3);
}

.play--wip:active,
.play--wip.is-active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(180, 95, 6, 0.55);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(35, 46, 74, 0.85);
  background: rgba(8, 11, 20, 0.65);
  padding: 20px 0 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.foot__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.foot__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8496b8;
}

.foot__dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--done);
  box-shadow: 0 0 8px rgba(57, 255, 136, 0.8);
}

/* ==========================================================================
   404 Page (Bilingual CRT Empty Cartridge Slot)
   ========================================================================== */

body.notfound {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.notfound__box {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0;
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, #131a2d 0%, var(--surface) 100%);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    8px 8px 0 #04060c,
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.notfound__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-top);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.notfound__led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wip);
  font-weight: 700;
}

.notfound__led::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--wip);
  box-shadow: 0 0 10px var(--wip);
}

.notfound__content {
  padding: 30px 28px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.notfound__art {
  width: 132px;
  height: 88px;
  display: block;
}

.notfound__code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cyan-soft);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}

.notfound__text {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  max-width: 420px;
}

.notfound__text--en {
  margin: -6px 0 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.notfound__links {
  margin: 6px 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==========================================================================
   Responsive (Mobile <= 640px) & Reduced Motion
   ========================================================================== */

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .top {
    padding: 22px 0 20px;
  }

  .logo {
    gap: 12px;
  }

  .logo__emblem {
    width: 44px;
    height: 44px;
  }

  .logo__title {
    font-size: 22px;
  }

  .tagline {
    font-size: 14px;
  }

  .top__row--sub {
    margin-top: 14px;
    padding-top: 14px;
    gap: 12px;
  }

  .era-line {
    font-size: 13px;
  }

  .counter {
    font-size: 11.5px;
    padding: 6px 10px;
  }

  .mobile-note {
    display: flex;
  }

  main {
    padding: 22px 0 42px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card__body {
    padding: 16px;
    gap: 11px;
  }

  .card__title {
    font-size: 17.5px;
  }

  .card__controls {
    font-size: 12px;
  }

  .notfound__content {
    padding: 24px 18px;
  }

  .notfound__links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Е4: NO SIGNAL без JS в усіх рушіях. Обкладинка декоративна (рамка aria-hidden), тож вона —
   фон шару .card__cover поверх .screen-fallback. Якщо PNG не завантажився, жоден браузер
   нічого не малює замість фону (на відміну від битого <img>), і видно заглушку.
   Шари йдуть порядком DOM без z-index: заглушка, обкладинка, кутики, скло й сканлайни ::after.
   ========================================================================== */
.card__screen .screen-fallback {
  position: absolute;
  inset: 0;
}
