:root {
  --bg: #f5f0e6;
  --bg-deep: #1a3a6b;
  --ink: #14213d;
  --ink-soft: rgba(20, 33, 61, 0.72);
  --paper: rgba(255, 251, 243, 0.76);
  --panel-border: rgba(20, 33, 61, 0.12);
  --gold: #d4a017;
  --gold-light: #f0d060;
  --navy: #1a3a6b;
  --red: #c41e3a;
  --shadow: 0 24px 60px rgba(20, 33, 61, 0.16);
  --chaos-tilt: 0deg;
  --chaos-scale: 1;
  --ticker-duration: 28s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 160, 23, 0.2), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(26, 58, 107, 0.12), transparent 32%),
    linear-gradient(135deg, #faf5eb 0%, #f0e4c8 45%, #e8d5a8 100%);
  overflow-x: hidden;
}

.site-share {
  position: fixed;
  top: 1rem;
  right: calc(clamp(1rem, 2vw, 1.6rem) + 72px);
  z-index: 99;
  display: flex;
  gap: 0.6rem;
}

.share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: rgba(255, 249, 239, 0.82);
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.12);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.share-pill:hover {
  transform: translateY(-2px);
}

body.disco {
  animation: bodyPulse 7s linear infinite;
}

body.disco-active {
  background:
    radial-gradient(circle at top, rgba(111, 0, 255, 0.18), transparent 30%),
    radial-gradient(circle at 20% 20%, rgba(0, 255, 240, 0.12), transparent 24%),
    linear-gradient(180deg, #090912 0%, #12122a 55%, #1c1230 100%);
  color: #f7f6ff;
  transition: background 260ms ease, color 260ms ease;
}

body.disco-active .noise {
  opacity: 0.14;
}

body.disco-active .orb {
  opacity: 0.22;
}

body.disco-active .status-panel,
body.disco-active .panel,
body.disco-active .cabinet-card,
body.disco-active .manifesto,
body.disco-active .emergency-ledger,
body.disco-active .infrastructure-failures,
body.disco-active .tetris-arena,
body.disco-active .citizen-quiz,
body.disco-active .annex-card {
  background: rgba(16, 17, 38, 0.76);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f7f6ff;
}

body.disco-active .lede,
body.disco-active .cabinet-card p,
body.disco-active .manifesto p,
body.disco-active .failure-card p,
body.disco-active .failure-note,
body.disco-active .annex-card p,
body.disco-active .site-credit p,
body.disco-active .ledger-card p,
body.disco-active .ledger-empty,
body.disco-active .status-label,
body.disco-active .status-grid dt,
body.disco-active .panel-kicker,
body.disco-active .panel-note {
  color: rgba(247, 246, 255, 0.78);
}

body.disco-active .status-grid dd,
body.disco-active .ledger-card h3,
body.disco-active .failure-card h3,
body.disco-active .status-value,
body.disco-active h1,
body.disco-active h2,
body.disco-active h3 {
  color: #ffffff;
}

body.disco-active .status-bar {
  background: rgba(255, 255, 255, 0.08);
}

body.disco-active .ghost-button,
body.disco-active .loud-button.outline,
body.disco-active .ledger-button,
body.disco-active .share-pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

body.disco-active .loud-button {
  color: #141625;
}

body.government-mode {
  background: #ffffff;
  color: #000000;
  font-family: "Times New Roman", Times, serif;
}

body.government-mode .noise,
body.government-mode .orb,
body.government-mode .sticker-field,
body.government-mode .raccoon-field,
body.government-mode .bureaucrat-field,
body.government-mode .stamp-field,
body.government-mode .disco-shell {
  display: none;
}

.noise {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    radial-gradient(rgba(20, 33, 61, 0.08) 0.8px, transparent 0.8px);
  background-size: auto, 14px 14px;
  mix-blend-mode: multiply;
  opacity: 0.28;
  pointer-events: none;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
  opacity: 0.9;
}

.orb-one {
  width: 24rem;
  height: 24rem;
  top: -8rem;
  right: -6rem;
  background: rgba(255, 59, 48, 0.16);
  animation: driftA 14s ease-in-out infinite;
}

.orb-two {
  width: 20rem;
  height: 20rem;
  bottom: -8rem;
  left: -5rem;
  background: rgba(83, 224, 215, 0.18);
  animation: driftB 16s ease-in-out infinite;
}

.hero,
.page-shell {
  position: relative;
  z-index: 1;
}

.site-crest {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 64px;
  height: 64px;
  z-index: 100;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(20,33,61,0.12);
  pointer-events: none;
  object-fit: contain;
}

@media (max-width: 640px) {
  .site-crest {
    width: 44px;
    height: 44px;
    top: 0.6rem;
    right: 0.6rem;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 24rem);
  gap: 2rem;
  align-items: end;
  padding: 3.5rem clamp(1.2rem, 3vw, 3rem) 2rem;
}

.hero-copy {
  max-width: 52rem;
}

[data-chaos-box] {
  transition:
    transform 260ms ease,
    opacity 260ms ease,
    filter 260ms ease,
    background-color 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease;
  transform-origin: center;
}

.eyebrow,
.panel-kicker,
.status-label,
.panel-note,
.mission-meta span {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 249, 239, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-size: 0.78rem;
}

.eyebrow::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0.25rem rgba(255, 59, 48, 0.16);
}

h1 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.8rem, 11vw, 8.8rem);
  transform: rotate(var(--chaos-tilt)) scale(var(--chaos-scale));
  transform-origin: left center;
  transition: transform 280ms ease;
  text-wrap: balance;
}

.lede {
  max-width: 44rem;
  margin: 1.2rem 0 0;
  font-family: "Crimson Pro", serif;
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button,
.ghost-button,
.loud-button {
  position: relative;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.45rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 16px 30px rgba(26, 58, 107, 0.28);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 249, 239, 0.58);
  border: 1px solid var(--panel-border);
}

.primary-button:hover,
.ghost-button:hover,
.loud-button:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.primary-button:active,
.ghost-button:active,
.loud-button:active {
  transform: translateY(1px);
}

.status-panel,
.panel,
.cabinet-card,
.manifesto {
  backdrop-filter: blur(16px);
  background: var(--paper);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 1.35rem;
  border-radius: 2rem 2rem 0.75rem 2rem;
}

.status-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.status-value {
  margin-top: 0.5rem;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.status-bar {
  height: 0.95rem;
  margin-top: 1rem;
  background: rgba(20, 33, 61, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.status-bar span {
  display: block;
  width: 73%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--gold), var(--gold-light));
  transition: width 260ms ease;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0;
}

.status-grid dt {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.status-grid dd {
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.page-shell {
  padding: 0 clamp(1.2rem, 3vw, 3rem) 3rem;
}

.site-credit {
  position: relative;
  z-index: 1;
  padding: 0 clamp(1.2rem, 3vw, 3rem) 3rem;
}

.site-credit p {
  margin: 0;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ticker-wrap {
  overflow: hidden;
  border-top: 2px solid rgba(20, 33, 61, 0.14);
  border-bottom: 2px solid rgba(20, 33, 61, 0.14);
  background: var(--navy);
  color: #fff8ef;
}

.ticker-track {
  display: flex;
  gap: 2.8rem;
  width: max-content;
  padding: 0.9rem 0;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: tickerMove var(--ticker-duration) linear infinite;
}

.ticker-track span::before {
  content: "✦";
  margin-right: 0.85rem;
  color: var(--gold);
}

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 1.25rem;
  margin-top: 1.6rem;
}

.panel,
.cabinet-card,
.manifesto {
  border-radius: 1.7rem;
}

.panel {
  padding: 1.4rem;
}

.panel-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.mission-panel h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 14ch;
}

.mission-panel p:not(.panel-kicker) {
  max-width: 50rem;
  font-size: 1.04rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.mission-meta span {
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(20, 33, 61, 0.07);
}

.control-stack {
  display: grid;
  gap: 0.85rem;
}

.loud-button {
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  font-weight: 700;
  text-align: left;
  color: var(--ink);
  background: #fff8ef;
}

.loud-button.undo {
  background: rgba(20, 33, 61, 0.08);
}

.loud-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.loud-button.alt {
  background: linear-gradient(135deg, #8bc34a, #4caf50);
  color: #fff;
}

.loud-button.bureaucrat {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.loud-button.outline {
  background: transparent;
  border-color: rgba(20, 33, 61, 0.2);
}

.panel-note {
  margin: 1rem 0 0;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.emergency-ledger {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  background: rgba(255, 249, 239, 0.74);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.infrastructure-failures {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(145deg, rgba(255, 244, 224, 0.84), rgba(255, 225, 184, 0.7));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.failure-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.failure-note {
  margin: 0;
  max-width: 48rem;
  color: var(--ink-soft);
}

.failure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.failure-img {
  width: 100%;
  border-radius: 0.9rem;
  margin-bottom: 0.75rem;
  object-fit: cover;
  max-height: 200px;
}

.failure-card {
  padding: 1.15rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 59, 48, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 239, 210, 0.76));
  box-shadow: 0 14px 26px rgba(20, 33, 61, 0.1);
}

.failure-status {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.failure-card h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.failure-card p {
  margin: 0;
  font-family: "Crimson Pro", serif;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.ledger-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ledger-header h2 {
  max-width: 13ch;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.ledger-sort-note {
  max-width: 28rem;
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.ledger-button {
  flex-shrink: 0;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ledger-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(246, 238, 208, 0.72));
  box-shadow: 0 14px 26px rgba(20, 33, 61, 0.12);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.ledger-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 33, 61, 0.16);
}

.ledger-card.is-seeded {
  background:
    radial-gradient(circle at top right, rgba(212, 160, 23, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(246, 238, 208, 0.72));
}

.ledger-card.is-focused {
  border-color: rgba(20, 33, 61, 0.42);
  box-shadow: 0 0 0 0.22rem rgba(212, 160, 23, 0.26), 0 20px 38px rgba(20, 33, 61, 0.16);
}

.ledger-card h3 {
  font-size: clamp(1.1rem, 2.8vw, 1.65rem);
  margin: 0;
}

.ledger-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.ledger-reporter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(20, 33, 61, 0.66);
}

.ledger-topline,
.ledger-actions,
.ledger-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ledger-bang-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.ledger-topline {
  align-items: center;
  justify-content: space-between;
}

.ledger-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.07);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ledger-bang-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ledger-actions {
  align-items: center;
  justify-content: flex-end;
}

.ledger-action-group {
  align-items: center;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: rgba(255, 249, 239, 0.82);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.mini-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(20, 33, 61, 0.12);
}

.mini-button.bang-button {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.94), rgba(255, 217, 61, 0.92));
  border-color: rgba(20, 33, 61, 0.18);
}

.mini-button.bang-button[disabled] {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.mini-button.share-button {
  background: rgba(20, 33, 61, 0.08);
}

.ledger-reactions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: rgba(255, 249, 239, 0.7);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.reaction-btn:hover:not([disabled]) {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 6px 14px rgba(20, 33, 61, 0.12);
  background: rgba(255, 240, 210, 0.9);
}

.reaction-btn:active:not([disabled]) {
  transform: scale(0.95);
}

.reaction-btn.reacted {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.3), rgba(255, 217, 61, 0.25));
  border-color: rgba(212, 160, 23, 0.4);
}

.reaction-btn[disabled] {
  cursor: default;
}

.reaction-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.reaction-count {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  min-width: 0.5rem;
}

.ledger-empty {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

.cabinet-card {
  position: relative;
  padding: 1.3rem;
  overflow: hidden;
}

.cabinet-card::after {
  content: "";
  position: absolute;
  inset: auto -12% -45% auto;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(212, 160, 23, 0.18);
}

.cabinet-card h3 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.cabinet-card p,
.manifesto p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Crimson Pro", serif;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.cabinet-card.tall {
  background:
    linear-gradient(145deg, rgba(255, 249, 239, 0.82), rgba(255, 232, 177, 0.74));
}

.metric-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.95rem;
  padding: 0;
  margin: 1.15rem 0 0;
  list-style: none;
}

.metric-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed rgba(20, 33, 61, 0.18);
}

.metric-list strong {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
}

.manifesto {
  margin-top: 1.25rem;
  padding: 1.5rem;
}

.annex-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(135deg, rgba(26, 58, 107, 0.94), rgba(20, 33, 61, 0.9));
  color: #fff8ef;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.annex-card .panel-kicker,
.annex-card p {
  color: rgba(255, 248, 239, 0.8);
}

.annex-card h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 0.9rem;
}

.annex-link {
  margin-top: 1.25rem;
}

.annex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.annex-actions .annex-link {
  margin-top: 1.1rem;
}

.page-link {
  background: var(--navy);
  color: #fff8ef;
  border-color: rgba(255, 255, 255, 0.12);
}

.alt-link {
  background: rgba(255, 248, 239, 0.1);
  color: #fff8ef;
  border-color: rgba(255, 255, 255, 0.18);
}

.composer-shell {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.composer-shell.hidden {
  display: none;
}

.composer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 61, 0.45);
  backdrop-filter: blur(8px);
}

.composer-card {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  padding: 1.45rem;
  border-radius: 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(212, 160, 23, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(255, 250, 241, 0.96), rgba(255, 229, 188, 0.94));
  box-shadow: 0 24px 80px rgba(20, 33, 61, 0.28);
}

.composer-crest {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(20, 33, 61, 0.18);
  object-fit: contain;
  z-index: 2;
}

.composer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.composer-header h2 {
  max-width: 13ch;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.composer-close {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(20, 33, 61, 0.08);
  font-weight: 700;
}

.composer-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.composer-field {
  display: grid;
  gap: 0.45rem;
}

.composer-field span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer-field input,
.composer-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(20, 33, 61, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.composer-field textarea {
  resize: vertical;
  min-height: 8rem;
}

.composer-actions {
  display: flex;
  justify-content: end;
  gap: 0.85rem;
  margin-top: 0.2rem;
}

.chaos-element-fragment,
.word-fragment,
.letter-fragment {
  display: inline-block;
  transition:
    font-size 220ms ease,
    transform 220ms ease,
    letter-spacing 220ms ease,
    color 220ms ease;
}

.word-fragment,
.letter-fragment {
  transform-origin: center bottom;
}

.letter-fragment {
  min-width: 0.18em;
}

.manifesto h2 {
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 0.9rem;
}

.sticker-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.sticker {
  position: absolute;
  top: 100%;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  animation: stickerRise 3.8s cubic-bezier(0.2, 0.78, 0.12, 0.99) forwards;
  filter: drop-shadow(0 10px 18px rgba(20, 33, 61, 0.24));
}

.raccoon-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.raccoon {
  position: absolute;
  left: -22rem;
  bottom: var(--lane, 10vh);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: rgba(255, 249, 239, 0.92);
  color: var(--ink);
  box-shadow: 0 18px 30px rgba(20, 33, 61, 0.16);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: raccoonRun var(--run-duration, 6s) linear forwards;
}

.raccoon-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-size: 1.45rem;
  line-height: 1;
}

.raccoon-tag {
  font-weight: 700;
}

.bureaucrat-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.bureaucrat-coin {
  position: absolute;
  top: -5rem;
  left: 50%;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff0b8, #f6bf4f 55%, #b97618 100%);
  color: #6b4200;
  font-size: 1.6rem;
  box-shadow: 0 12px 28px rgba(20, 33, 61, 0.2);
  animation: bureaucratCoinDrop 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bureaucrat-chip {
  position: absolute;
  left: -12rem;
  top: var(--lane, 30vh);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 244, 184, 0.96), rgba(255, 191, 111, 0.94));
  border: 1px solid rgba(158, 101, 14, 0.22);
  color: #7a4405;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 14px 22px rgba(20, 33, 61, 0.16);
  white-space: nowrap;
  animation: bureaucratChipRun var(--chip-duration, 4.8s) linear forwards;
}

.bureaucrat-chip::before {
  content: "◉";
  font-size: 0.9rem;
}

.stamp-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.stamp-launcher {
  display: block;
  margin: 0 auto 1rem;
  padding: 0.78rem 1rem;
  border: 1px solid rgba(20, 33, 61, 0.18);
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.82);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(20, 33, 61, 0.16);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stamp-launcher:hover {
  transform: translateY(-2px) rotate(-2deg);
}

.chaos-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0.75rem 1.05rem;
  border: 0.28rem double rgba(157, 23, 23, 0.9);
  color: rgba(157, 23, 23, 0.92);
  background: rgba(255, 249, 239, 0.12);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.08);
  transform: translate(-50%, -50%) rotate(var(--stamp-tilt, -8deg)) scale(0.7);
  animation: stampSlam 1.8s cubic-bezier(0.16, 0.84, 0.25, 1) forwards;
}

.disco-shell {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.disco-shell.hidden {
  display: none;
}

.disco-shadow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 22%),
    rgba(3, 3, 12, 0.42);
}

.disco-rig {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.35rem;
  height: 7rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.16));
  transform: translateX(-50%);
}

.disco-ball {
  position: absolute;
  top: -9rem;
  left: 50%;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 35%, rgba(255, 255, 255, 0.04) 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 7px, transparent 7px 14px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 7px, transparent 7px 14px),
    linear-gradient(145deg, #d6deff 0%, #b6c2ff 25%, #f7b8ff 50%, #9af8ff 75%, #ffffff 100%);
  box-shadow:
    0 0 30px rgba(255, 255, 255, 0.28),
    0 0 90px rgba(160, 160, 255, 0.18);
  animation:
    discoDrop 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    discoSpin 1.2s linear infinite;
}

.disco-light {
  position: absolute;
  top: 6.5rem;
  left: 50%;
  width: 18rem;
  height: 120vh;
  transform-origin: top center;
  opacity: 0.54;
  mix-blend-mode: screen;
  filter: blur(2px);
  clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%);
}

.disco-light-left {
  background: linear-gradient(180deg, rgba(0, 255, 247, 0.6), rgba(0, 255, 247, 0));
  animation: discoSweepLeft 1.7s ease-in-out infinite alternate;
}

.disco-light-center {
  background: linear-gradient(180deg, rgba(255, 248, 111, 0.58), rgba(255, 248, 111, 0));
  animation: discoSweepCenter 1.3s ease-in-out infinite alternate;
}

.disco-light-right {
  background: linear-gradient(180deg, rgba(255, 84, 184, 0.56), rgba(255, 84, 184, 0));
  animation: discoSweepRight 1.9s ease-in-out infinite alternate;
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes driftA {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-3rem, 3rem, 0) scale(1.08);
  }
}

@keyframes driftB {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3rem, -2rem, 0) scale(0.94);
  }
}

@keyframes stickerRise {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift-x), -120vh, 0) rotate(var(--spin)) scale(1.25);
    opacity: 0;
  }
}

@keyframes raccoonRun {
  0% {
    transform: translate3d(0, 0, 0) scale(var(--raccoon-scale, 1));
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  50% {
    transform: translate3d(55vw, -0.5rem, 0) scale(var(--raccoon-scale, 1));
  }
  100% {
    transform: translate3d(calc(100vw + 24rem), 0, 0) scale(var(--raccoon-scale, 1));
    opacity: 1;
  }
}

@keyframes bureaucratCoinDrop {
  0% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(58vh) rotate(540deg);
    opacity: 0;
  }
}

@keyframes bureaucratChipRun {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(calc(100vw + 16rem), 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes stampSlam {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--stamp-tilt, -8deg)) scale(1.8);
    filter: blur(8px);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--stamp-tilt, -8deg)) scale(0.88);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--stamp-tilt, -8deg)) scale(0.96);
    filter: blur(0);
  }
}

@keyframes bodyPulse {
  0%, 100% {
    filter: hue-rotate(0deg) saturate(1);
  }
  50% {
    filter: hue-rotate(22deg) saturate(1.14);
  }
}

@keyframes discoDrop {
  0% {
    top: -9rem;
  }
  75% {
    top: 5.2rem;
  }
  100% {
    top: 4.6rem;
  }
}

@keyframes discoSpin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes discoSweepLeft {
  from {
    transform: translateX(-50%) rotate(-46deg) scaleY(1);
  }
  to {
    transform: translateX(-50%) rotate(-12deg) scaleY(1.08);
  }
}

@keyframes discoSweepCenter {
  from {
    transform: translateX(-50%) rotate(-6deg) scaleY(0.96);
  }
  to {
    transform: translateX(-50%) rotate(10deg) scaleY(1.08);
  }
}

@keyframes discoSweepRight {
  from {
    transform: translateX(-50%) rotate(18deg) scaleY(1);
  }
  to {
    transform: translateX(-50%) rotate(48deg) scaleY(1.08);
  }
}

/* ─── Tetris Arena ─── */
.tetris-arena {
  position: relative;
  overflow: hidden;
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  background:
    radial-gradient(circle at bottom left, rgba(83, 224, 215, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(212, 160, 23, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(255, 249, 239, 0.82), rgba(255, 232, 195, 0.76));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.tetris-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.tetris-arena > *:not(.tetris-bg-canvas) {
  position: relative;
  z-index: 1;
}

.tetris-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tetris-header h2 {
  max-width: 14ch;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.tetris-subtitle {
  max-width: 36rem;
  margin: 0.6rem 0 0;
  font-family: "Crimson Pro", serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.tetris-scoreboard {
  display: flex;
  gap: 1.2rem;
  flex-shrink: 0;
}

.tetris-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.65rem 0.9rem;
  border-radius: 1rem;
  background: rgba(20, 33, 61, 0.06);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.tetris-stat-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tetris-stat-value {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
}

.tetris-body {
  display: flex;
  gap: 1.5rem;
  align-items: start;
}

.tetris-board-wrap {
  position: relative;
  width: 300px;
  height: 600px;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(20, 33, 61, 0.14);
  box-shadow: 0 16px 40px rgba(20, 33, 61, 0.14);
}

.tetris-board-wrap canvas {
  display: block;
}

.tetris-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 33, 61, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1;
}

.tetris-overlay.hidden {
  display: none;
}

.tetris-overlay-text {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff8ef;
  text-align: center;
  padding: 0 1rem;
}

.tetris-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 160px;
}

.tetris-next-wrap {
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(20, 33, 61, 0.04);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.tetris-next-wrap canvas {
  display: block;
  border-radius: 0.6rem;
}

.tetris-side-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.tetris-controls-info {
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(20, 33, 61, 0.04);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.tetris-key-list {
  display: grid;
  gap: 0.35rem;
}

.tetris-key-list span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.tetris-key-list kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0.2rem 0.4rem;
  margin-right: 0.25rem;
  border-radius: 0.35rem;
  background: rgba(20, 33, 61, 0.08);
  border: 1px solid rgba(20, 33, 61, 0.12);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.tetris-start-btn {
  background: var(--gold);
}

.tetris-pause-btn.hidden {
  display: none;
}

/* ─── Citizen Quiz ─── */
.citizen-quiz {
  margin-top: 1.25rem;
  padding: 1.5rem 1.5rem 2rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  background:
    radial-gradient(circle at top left, rgba(212, 160, 23, 0.07), transparent 28%),
    linear-gradient(145deg, rgba(255, 250, 243, 0.88), rgba(255, 241, 218, 0.8));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.quiz-header {
  margin-bottom: 1rem;
}

.quiz-header h2 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.quiz-progress {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.quiz-question {
  font-family: "Crimson Pro", serif;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.25rem;
  min-height: 2em;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quiz-option-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1.5px solid rgba(20, 33, 61, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: "Crimson Pro", serif;
  font-size: 1rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.quiz-option-btn:hover {
  border-color: var(--gold);
  background: rgba(255, 248, 230, 0.9);
  transform: translateY(-2px);
}

.quiz-option-btn:active {
  transform: translateY(0);
}

.quiz-option-btn.selected {
  border-color: var(--navy);
  background: rgba(26, 58, 107, 0.08);
}

/* result */
.quiz-result {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  position: relative;
}

.quiz-result.hidden {
  display: none;
}

.quiz-stamp {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  border: 2px solid var(--red);
  padding: 0.25rem 0.6rem;
  border-radius: 0.3rem;
  transform: rotate(6deg);
  opacity: 0;
  animation: quizStampSlam 0.4s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes quizStampSlam {
  0%   { opacity: 0; transform: rotate(6deg) scale(2.5); }
  60%  { opacity: 1; transform: rotate(6deg) scale(0.95); }
  100% { opacity: 1; transform: rotate(6deg) scale(1); }
}

.quiz-result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.quiz-result-title {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.quiz-result-desc {
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  font-family: "Crimson Pro", serif;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.quiz-retake {
  margin: 0 auto;
}

/* ─── Frogger Overlay ─── */
.frogger-shell {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: auto;
}

.frogger-shell.hidden {
  display: none;
}

.frogger-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.frogger-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(26, 58, 107, 0.88);
  backdrop-filter: blur(6px);
}

.frogger-hud-item {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff8ef;
}

.frogger-close-btn {
  margin-left: auto;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(196, 30, 58, 0.8);
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.frogger-mobile-controls {
  display: none;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.frogger-mobile-row {
  display: flex;
  gap: 0.5rem;
}

@media (pointer: coarse) {
  .frogger-mobile-controls { display: flex; }
}

.frogger-mobile-controls .mobile-btn {
  width: 3.6rem;
  height: 3.6rem;
  font-size: 1.5rem;
  background: rgba(255, 251, 243, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ─── Mobile Game Controls ─── */
.mobile-controls {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

@media (pointer: coarse) {
  .mobile-controls { display: flex; }
}

.mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: rgba(255, 251, 243, 0.85);
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(20, 33, 61, 0.1);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-btn:active {
  transform: scale(0.92);
  background: rgba(212, 160, 23, 0.2);
}

.mobile-btn-wide {
  width: auto;
  padding: 0 1.2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Arcade Section ─── */
.arcade-section {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.7rem;
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.arcade-section.navy-theme {
  background:
    radial-gradient(circle at top right, rgba(212, 160, 23, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(26, 58, 107, 0.94), rgba(20, 33, 61, 0.96));
  color: #fff8ef;
  border-color: rgba(255, 255, 255, 0.1);
}

.arcade-section.navy-theme .panel-kicker {
  color: rgba(255, 248, 239, 0.5);
}

.arcade-section.navy-theme h2 {
  color: var(--gold-light);
}

.arcade-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.arcade-header h2 {
  max-width: 16ch;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

.arcade-subtitle {
  max-width: 36rem;
  margin: 0.5rem 0 0;
  font-family: "Crimson Pro", serif;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.75;
}

.arcade-game-wrap {
  display: flex;
  gap: 1.25rem;
  align-items: start;
  flex-wrap: wrap;
}

.arcade-game-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.arcade-game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 140px;
}

.arcade-start-btn {
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 160, 23, 0.4);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 180ms ease;
}

.arcade-start-btn:hover {
  transform: translateY(-2px);
}

/* ─── PAC-MAN Overlay ─── */
.pacman-shell {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.pacman-shell.hidden {
  display: none;
}

.pacman-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(10px);
}

.pacman-card {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at top right, rgba(255, 217, 61, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(20, 33, 61, 0.96), rgba(10, 14, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  color: #fff8ef;
}

.pacman-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pacman-header h2 {
  font-family: "Bungee", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #ffd93d;
}

.pacman-header .panel-kicker {
  color: rgba(255, 248, 239, 0.5);
}

.pacman-header .composer-close {
  color: #fff8ef;
  background: rgba(255, 255, 255, 0.1);
}

.pacman-canvas {
  display: block;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.government-mode *,
body.government-mode *::before,
body.government-mode *::after {
  animation: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  backdrop-filter: none !important;
}

body.government-mode .hero,
body.government-mode .page-shell {
  padding: 1rem 1.25rem;
}

body.government-mode .hero,
body.government-mode .command-center,
body.government-mode .cabinet-grid,
body.government-mode .status-grid {
  display: block;
}

body.government-mode .hero-copy,
body.government-mode .status-panel,
body.government-mode .panel,
body.government-mode .cabinet-card,
body.government-mode .emergency-ledger,
body.government-mode .infrastructure-failures,
body.government-mode .manifesto,
body.government-mode .annex-card {
  max-width: none;
  margin: 0 0 1rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid #8c8c8c;
}

body.government-mode .status-grid > div {
  margin-bottom: 0.7rem;
}

body.government-mode .tetris-arena,
body.government-mode .citizen-quiz {
  max-width: none;
  margin: 0 0 1rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid #8c8c8c;
}

body.government-mode h1,
body.government-mode h2,
body.government-mode h3,
body.government-mode .status-value,
body.government-mode .metric-list strong {
  max-width: none;
  font-family: "Times New Roman", Times, serif;
  font-size: 2rem;
  line-height: 1.2;
  transform: none !important;
}

body.government-mode .lede,
body.government-mode .cabinet-card p,
body.government-mode .manifesto p,
body.government-mode .failure-card p,
body.government-mode .failure-note,
body.government-mode .annex-card p,
body.government-mode .site-credit p,
body.government-mode .panel-note,
body.government-mode .status-label,
body.government-mode .status-grid dt,
body.government-mode .status-grid dd {
  color: #000000;
}

body.government-mode .status-bar {
  height: 0.7rem;
  background: #d8d8d8;
}

body.government-mode .status-bar span {
  background: #6f6f6f;
}

body.government-mode .hero-actions,
body.government-mode .control-stack,
body.government-mode .mission-meta,
body.government-mode .ledger-header,
body.government-mode .composer-actions {
  display: block;
}

body.government-mode .primary-button,
body.government-mode .ghost-button,
body.government-mode .loud-button,
body.government-mode .stamp-launcher,
body.government-mode .share-pill,
body.government-mode .mission-meta span {
  display: inline-block;
  width: auto;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #e5e5e5;
  color: #000000;
  border: 1px solid #8c8c8c;
}

body.government-mode a {
  color: #0000ee;
}

body.government-mode .ticker-wrap {
  background: transparent;
  color: #000000;
  border: 1px solid #8c8c8c;
  margin: 0 1.25rem 1rem;
}

body.government-mode .ticker-track {
  display: block;
  width: auto;
  padding: 0.8rem 1rem;
  animation: none;
  white-space: normal;
}

body.government-mode .ticker-track span {
  display: list-item;
  margin: 0 0 0.35rem 1.25rem;
}

body.government-mode .ticker-track span::before,
body.government-mode .cabinet-card::after {
  content: none;
}

body.government-mode .metric-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #c8c8c8;
}

body.government-mode .annex-card .panel-kicker,
body.government-mode .annex-card p {
  color: #000000;
}

body.government-mode .failure-card,
body.government-mode .failure-status {
  background: #e5e5e5;
  color: #000000;
  border: 1px solid #8c8c8c;
  box-shadow: none;
}

body.government-mode .ledger-sort-note {
  color: #000000;
}

body.government-mode .ledger-grid {
  display: block;
}

body.government-mode .ledger-card {
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 0;
  background: transparent;
  border: 1px solid #8c8c8c;
}

body.government-mode .ledger-card p,
body.government-mode .ledger-reporter,
body.government-mode .ledger-empty {
  color: #000000;
}

body.government-mode .ledger-meta {
  background: #e5e5e5;
  border: 1px solid #8c8c8c;
}

body.government-mode .ledger-bang-count,
body.government-mode .mini-button {
  background: #e5e5e5;
  color: #000000;
  border: 1px solid #8c8c8c;
}

body.government-mode .composer-card {
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #8c8c8c;
}

body.government-mode .composer-backdrop {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: none;
}

@media (max-width: 960px) {
  .hero,
  .command-center,
  .cabinet-grid,
  .ledger-grid,
  .failure-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 8ch;
  }

  .status-panel {
    max-width: 32rem;
  }

  .tetris-header {
    flex-direction: column;
    align-items: start;
  }

  .tetris-body {
    flex-direction: column;
    align-items: center;
  }

  .tetris-scoreboard {
    width: 100%;
    justify-content: space-between;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.4rem, 9vw, 3.8rem);
  }

  .site-share {
    position: static;
    justify-content: flex-end;
    padding: 1rem 1.2rem 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .loud-button,
  .stamp-launcher {
    width: 100%;
  }

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

  .ledger-header,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-action-group {
    width: 100%;
  }

  .ledger-bang-group {
    width: 100%;
    justify-content: space-between;
  }

  .mini-button {
    flex: 1 1 0;
  }

  .ticker-track {
    gap: 1.6rem;
    animation-duration: 20s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
