:root {
  color-scheme: dark;
  --bg: #101c19;
  --panel: #172620;
  --border: #314438;
  --muted: #a6b6a8;
  --ink: #eff1df;
  --accent: #c4df89;
  --gold: #edc56a;
  --danger: #e3947a;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 90% 15%, #273a252b, transparent 45%), var(--bg);
  color: var(--ink);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
#board:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
button[hidden],
[hidden] {
  display: none !important;
}
.site-header {
  max-width: 1312px;
  margin: auto;
  padding: 32px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.7px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand-mark {
  color: var(--accent);
  font-size: 32px;
  line-height: 1;
  margin-right: 3px;
}
.brand-light {
  font-weight: 400;
  color: var(--muted);
  margin-left: -6px;
}
.source-link {
  font-size: 13px;
  color: #c1cfbf;
  border-bottom: 1px solid #54634e;
  padding-bottom: 6px;
}
.source-link span {
  margin-left: 13px;
}
main {
  max-width: 1228px;
  padding: 0 0 72px;
  margin: auto;
}
.intro {
  padding: 49px 0 40px;
  position: relative;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 15px;
  line-height: 1.7;
}
.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 8px 1px 0;
}
.intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  letter-spacing: -3px;
  font-weight: 400;
  line-height: 1.02;
  margin: 0;
}
.intro h1 em {
  color: var(--accent);
  font-weight: 400;
}
.intro-copy {
  position: absolute;
  bottom: 43px;
  right: 32px;
  max-width: 355px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  margin: 0;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 26px;
  align-items: start;
}
.game-panel {
  background: #172620;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.world-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 29px 30px 22px;
}
.world-heading > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.world-heading .panel-actions { flex-shrink: 0; }
.world-heading .eyebrow {
  margin-bottom: 7px;
}
.world-heading h2 {
  font-size: 24px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.4px;
  font-weight: 400;
  margin: 0;
}
.world-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 0;
}
.world-stamp {
  font-size: 40px;
  color: var(--accent);
  border: 1px solid #42573b;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  text-align: center;
  line-height: 64px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 30px;
  padding: 18px 0;
  border-block: 1px solid #344638;
}
.stats > div {
  padding-left: 22px;
  border-left: 1px solid #344638;
}
.stats > div:first-child {
  padding-left: 0;
  border: 0;
}
.stat-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stats strong {
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.stat-suffix {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.board-frame {
  padding: 28px 30px 12px;
  min-height: 320px;
  position: relative;
}
.board {
  display: grid;
  gap: 4px;
  max-width: 660px;
  margin: 0 auto;
  border: 1px solid #42523b;
  border-radius: 9px;
  padding: 8px;
  background: #0c1712;
  outline: none;
}
.cols-11 {
  grid-template-columns: repeat(11, minmax(0, 1fr));
}
.cols-13 {
  grid-template-columns: repeat(13, minmax(0, 1fr));
}
.cols-15 {
  grid-template-columns: repeat(15, minmax(0, 1fr));
}
.tile {
  aspect-ratio: 1;
  position: relative;
  min-width: 0;
  border-radius: 4px;
  background: #213124;
}
.tile.wall {
  background: linear-gradient(135deg, #4a5840, #384a32);
  box-shadow:
    inset 0 1px #6472548c,
    inset 0 -3px #25341f;
  outline: 1px solid #1a291a;
}
.tile.coin:before,
.coin-token:before {
  content: "";
  position: absolute;
  width: 35%;
  height: 35%;
  left: 32.5%;
  top: 32.5%;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 3px #7153237a,
    0 0 14px #edc56a26;
}
.tile.coin:after {
  content: "";
  position: absolute;
  width: 8%;
  height: 20%;
  left: 46%;
  top: 40%;
  background: #a77c2a;
  border-radius: 2px;
}
.tile.player {
  background: #29412d;
  box-shadow: inset 0 0 0 1px #91bb6159;
}
.tile.player:before,
.player-token:before {
  content: "";
  position: absolute;
  width: 46%;
  height: 46%;
  left: 27%;
  top: 27%;
  border-radius: 6px 6px 9px 9px;
  background: var(--accent);
  box-shadow:
    0 4px 0 #587a37,
    0 0 17px #c4df8944;
  transform: rotate(-5deg);
}
.tile.player:after {
  content: "••";
  font-size: clamp(7px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 1px;
  position: absolute;
  left: 34%;
  top: 28%;
  color: #273a1f;
}
.tile.trap:before,
.trap-token:before {
  content: "";
  position: absolute;
  inset: 26%;
  background: var(--danger);
  clip-path: polygon(50% 0, 100% 90%, 0 90%);
}
.tile.trap:after {
  content: "!";
  color: #42281c;
  position: absolute;
  left: 46%;
  top: 30%;
  font-size: clamp(9px, 1.4vw, 18px);
  font-weight: 900;
}
.board-loading {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #172620;
  color: var(--muted);
  font-size: 14px;
}
.game-feedback {
  padding: 0 30px 18px;
  min-height: 66px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.game-feedback p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0;
}
.game-feedback.success p {
  color: var(--accent);
}
.game-feedback.danger p {
  color: var(--danger);
}
.button {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.primary {
  background: var(--accent);
  color: #192919;
  border: 0;
}
.secondary {
  background: #273a2b;
  color: var(--ink);
  border: 1px solid var(--border);
}
.board-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 30px;
  background: #132019;
  border-top: 1px solid #2c3d2e;
  flex-wrap: wrap;
}
.board-footer > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}
.legend-token {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}
.board-footer .step-counter {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.control-card,
.journey-card {
  padding: 27px 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #1d2d2359;
}
.side-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 23px;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}
.control-card .eyebrow,
.journey-card .eyebrow {
  font-size: 9px;
  margin-bottom: 10px;
}
.control-card > p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 44px);
  gap: 7px;
  justify-content: center;
  margin: 25px 0;
}
.dpad button {
  border: 1px solid #506044;
  border-bottom: 3px solid #101d12;
  border-radius: 9px;
  color: var(--ink);
  background: #2e402b;
  font-size: 23px;
  touch-action: manipulation;
  transition: background 0.15s;
}
.dpad button:hover {
  background: #486038;
}
.dpad button:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}
.dpad .up {
  grid-column: 2;
  grid-row: 1;
}
.dpad .left {
  grid-column: 1;
  grid-row: 2;
}
.dpad .right {
  grid-column: 3;
  grid-row: 2;
}
.dpad .down {
  grid-column: 2;
  grid-row: 3;
}
.dpad-center {
  grid-column: 2;
  grid-row: 2;
  color: #6c805c;
  font-size: 24px;
  display: grid;
  place-items: center;
}
.restart-button {
  width: 100%;
  background: transparent;
  border: 1px solid #4a5a40;
  border-radius: 9px;
  color: var(--ink);
  font-size: 11px;
  padding: 12px;
}
.restart-button span {
  font-size: 17px;
  margin-right: 5px;
}
.control-card > .save-note {
  font-size: 10px !important;
  text-align: center;
  margin-top: 12px !important;
}
.journey-card {
  margin-top: 20px;
}
.journey-card h2 {
  font-size: 21px;
}
.world-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}
.world-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid #33432e;
  color: #81917f;
}
.world-list li > span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.world-list strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.world-list small {
  font-size: 10px;
  color: #8a9b87;
}
.world-list i {
  font-style: normal;
  font-size: 10px;
  margin-left: auto;
}
.world-list .current {
  color: var(--accent);
}
.world-list .complete {
  color: #d4dfc4;
}
.rules-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  margin: 22px 18px 0;
}
.rules-note strong {
  color: #cfdbc4;
  font-weight: 500;
}
.site-footer {
  max-width: 1228px;
  margin: 0 auto;
  display: flex;
  gap: 15px;
  justify-content: space-between;
  border-top: 1px solid #2f402f;
  padding: 23px 0 30px;
  color: #8d9f8c;
  font-size: 10px;
}
.site-footer a {
  color: #c9d5bc;
}
.noscript {
  padding: 20px;
  text-align: center;
  background: #562b20;
}
#board.busy {
  opacity: 0.85;
}
@media (min-width: 1600px) {
  main {
    padding-top: 12px;
  }
}
@media (max-width: 1320px) {
  main,
  .site-footer {
    margin-inline: 42px;
  }
  .intro-copy {
    right: 0;
  }
}
@media (max-width: 960px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
  }
  .world-heading {
    padding: 22px;
  }
  .stats {
    margin-inline: 22px;
  }
  .board-frame {
    padding: 22px 18px 10px;
  }
  .game-feedback {
    padding-inline: 22px;
  }
  .board-footer {
    padding-inline: 22px;
    gap: 10px;
  }
  .control-card,
  .journey-card {
    padding: 23px 20px;
  }
  .stat-suffix {
    display: block;
    margin-left: 0;
    margin-top: 3px;
  }
  .intro h1 {
    font-size: 62px;
  }
  .intro-copy {
    font-size: 13px;
    max-width: 300px;
  }
  .tile {
    border-radius: 2px;
  }
  .board {
    gap: 3px;
    padding: 6px;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 24px;
  }
  .source-link {
    font-size: 11px;
  }
  main,
  .site-footer {
    margin-inline: 24px;
  }
  .intro {
    padding: 30px 0;
  }
  .intro h1 {
    font-size: 58px;
  }
  .intro-copy {
    position: static;
    margin: 20px 0 0;
    font-size: 13px;
  }
  .play-layout {
    grid-template-columns: 1fr;
  }
  .side-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .journey-card {
    margin: 0;
  }
  .rules-note {
    grid-column: 1/-1;
    margin: 0 6px;
  }
  .site-footer {
    margin-top: 0;
    flex-wrap: wrap;
    justify-content: start;
    line-height: 1.8;
  }
  .site-footer a {
    margin-left: auto;
  }
  .board-frame {
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 16px;
  }
  .board {
    max-width: 560px;
  }
  .tile.player:after {
    font-size: 13px;
  }
  .tile.trap:after {
    font-size: 16px;
  }
  .game-feedback {
    flex-wrap: wrap;
  }
  .game-feedback .button {
    margin-bottom: 8px;
  }
  .world-stamp {
    width: 54px;
    height: 54px;
    line-height: 54px;
    font-size: 32px;
  }
}
@media (max-width: 450px) {
  .site-header {
    padding: 20px;
  }
  .brand {
    font-size: 18px;
  }
  main,
  .site-footer {
    margin-inline: 16px;
  }
  .intro {
    padding-top: 26px;
  }
  .intro h1 {
    font-size: 54px;
  }
  .intro .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .world-heading {
    padding: 22px 20px 18px;
  }
  .world-heading h2 {
    font-size: 22px;
  }
  .stats {
    margin-inline: 20px;
  }
  .board-frame {
    padding-inline: 12px;
  }
  .board {
    gap: 2px;
    padding: 4px;
    border-radius: 6px;
  }
  .tile.wall {
    box-shadow:
      inset 0 1px #6472548c,
      inset 0 -2px #25341f;
  }
  .tile.player:before {
    border-radius: 3px 3px 4px 4px;
    box-shadow: 0 2px 0 #587a37;
  }
  .tile.player:after {
    font-size: 8px;
    letter-spacing: 0;
    left: 35%;
    top: 27%;
  }
  .tile.trap:after {
    font-size: 9px;
    left: 44%;
    top: 25%;
  }
  .tile.coin:before {
    box-shadow: 0 0 0 1px #7153237a;
  }
  .side-panel {
    grid-template-columns: 1fr;
  }
  .rules-note {
    grid-column: 1;
  }
  .journey-card {
    padding-bottom: 10px;
  }
  .world-list {
    margin-top: 10px;
  }
  .control-card {
    position: relative;
    padding-bottom: 24px;
  }
  .dpad {
    margin-block: 20px;
  }
  .board-footer {
    padding-inline: 16px;
    gap: 9px;
  }
  .board-footer > span {
    font-size: 9px;
  }
  .stat-label {
    font-size: 8px;
  }
  .stats strong {
    font-size: 25px;
  }
  .game-feedback {
    padding-inline: 20px;
  }
  .site-footer {
    flex-direction: column;
    gap: 5px;
  }
  .site-footer a {
    margin: 0;
  }
  .world-heading .eyebrow {
    font-size: 8px;
  }
  .world-stamp {
    width: 45px;
    height: 45px;
    line-height: 45px;
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Shared-engine campaign edition: terrain and actors are separate layers. */
.site-header nav { display: flex; align-items: center; gap: 26px; }
.text-button { color: var(--muted); background: transparent; border: 0; padding: 5px 0; font-size: 12px; }
.text-button:hover { color: var(--accent); }
.intro-copy { max-width: 395px; }
.intro-copy span { font-size: 12px; color: #c2ccb7; }
.panel-actions { display: flex; gap: 9px; }
.icon-button { width: 39px; height: 39px; border: 1px solid #506044; border-radius: 11px; background: #223325; color: var(--ink); font-size: 19px; }
.icon-button:hover { background: #3a4f32; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats > div { padding-left: 18px; }
.stats strong { font-size: 27px; }
.stat-suffix { font-size: 10px; }
.objective { display: flex; align-items: center; gap: 10px; margin: 18px 30px 0; color: var(--accent); font-size: 12px; }
.objective > span:first-child { font-size: 20px; }
.objective p { margin: 0; line-height: 1.6; flex: 1; }
.freeze-badge { padding: 5px 9px; color: #bef1f1; background: #16434a; border: 1px solid #30737a; border-radius: 6px; white-space: nowrap; font-size: 11px; }
.board-frame { min-height: 0; padding-top: 22px; }
.board { display: flex; flex-direction: column; gap: 4px; }
.board-row { display: flex; gap: 4px; min-width: 0; }
.board .tile { flex: 1; overflow: visible; }
.board.toroidal { border-color: #8aa369; box-shadow: 0 0 0 3px #91b27519; }
.terrain-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(12px, 2vw, 27px); line-height: 1; color: #dfca84; }
.tile.door { background: #52452b; box-shadow: inset 0 0 0 1px #b6974766; }
.tile.door .terrain-mark { color: #d1b565; font-size: clamp(18px, 3vw, 37px); }
.tile.hourglass { background: #263a38; }
.tile.hourglass .terrain-mark { color: #a5d5d6; }
.tile.trophy { background: #4b4025; box-shadow: inset 0 0 0 1px #d4ba6555; }
.tile.trophy .terrain-mark { color: #f0ce69; }
.actor { position: absolute; display: grid; place-items: center; z-index: 2; width: 61%; height: 61%; left: 19.5%; top: 16%; font-size: clamp(8px, 1.35vw, 17px); font-weight: 800; }
.actor.player { z-index: 4; color: #273a1f; background: var(--accent); border-radius: 7px 7px 10px 10px; transform: rotate(-5deg); box-shadow: 0 4px #587a37, 0 0 14px #c4df8938; letter-spacing: 1px; }
.actor.enemy { box-shadow: 0 3px 0 #0007; }
.actor.random { background: #d68d71; color: #3c231d; border-radius: 8px 8px 6px 6px; }
.actor.ghost { background: #c4b3e7; color: #3b2a57; border-radius: 45% 45% 15% 15%; }
.actor.hunter { background: #d8bd65; color: #3b301a; border-radius: 5px; transform: rotate(4deg); }
.enemy-lives { position: absolute; right: -6px; bottom: -5px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; background: #111c16; border: 1px solid currentColor; color: #f1ead7; font-size: 8px; z-index: 3; }
.tile:has(.enemy:nth-of-type(2)) .enemy:first-of-type { transform: translate(-20%, -12%) scale(.88); }
.tile:has(.enemy:nth-of-type(2)) .enemy:nth-of-type(2) { transform: translate(20%, 12%) scale(.88); }
.pause-overlay { position: absolute; inset: 14px; background: #101c19f5; border: 1px solid #516540; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 8; padding: 18px; }
.pause-overlay .eyebrow { margin: 0 0 8px; font-size: 8px; }
.pause-overlay h3 { font: 30px Georgia, serif; margin: 0; }
.pause-overlay p { font-size: 11px; color: var(--muted); margin-bottom: 20px; }
.game-feedback { padding-bottom: 10px; }
.inventory-heading { margin: 0 30px 11px; border-top: 1px solid #344638; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.inventory-heading > div { display: flex; align-items: baseline; gap: 12px; }
.inventory-heading .eyebrow { font-size: 8px; letter-spacing: 1.5px; margin: 0; }
#inventory-count { color: var(--muted); font-size: 10px; }
.inventory { margin: 0 30px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.inventory-slot { position: relative; min-height: 84px; border: 1px solid #526148; border-radius: 9px; background: #1e3124; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 4px 8px; }
.inventory-slot.skill { background: #29332a; border-color: #9c995c; }
.inventory-slot:disabled { cursor: default; opacity: .45; }
.inventory-slot:not(:disabled):hover { border-color: var(--accent); background: #34492d; transform: translateY(-2px); }
.slot-key { position: absolute; left: 7px; top: 6px; color: var(--muted); font-size: 9px; }
.slot-icon { font-size: 24px; line-height: 1.2; }
.slot-name { font-size: 9px; overflow-wrap: anywhere; text-align: center; }
.inventory-tip { margin: 12px 30px 20px; color: #9bab9a; font-size: 10px; line-height: 1.7; }
.board-footer i { font-style: normal; }
.legend-player { color: var(--accent); }
.legend-coin { color: var(--gold); }
.legend-trap { color: var(--danger); }
.world-list li { gap: 10px; padding: 13px 0; }
.world-list li > strong { line-height: 1.5; }
.rules-card { margin-top: 20px; border: 1px solid var(--border); border-radius: 16px; background: #1d2d2359; }
.rules-card > summary { cursor: pointer; list-style: none; padding: 20px; display: flex; justify-content: space-between; font-size: 12px; color: #d2ddc7; }
.rules-card > summary::-webkit-details-marker { display: none; }
.rules-card[open] > summary span { transform: rotate(45deg); }
.rules-content { padding: 0 20px 18px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.rules-content h3 { color: #d6dfcc; font-size: 11px; margin: 16px 0 4px; }
.rules-content p { margin: 0 0 10px; }
.rules-content b { color: #d0d9c6; font-weight: 500; }
.rules-content .random-label { color: #e8b19a; }
.rules-content .ghost-label { color: #d5c8ed; }
.rules-content .hunter-label { color: #e9d48c; }
.guide-note { border-top: 1px solid var(--border); padding-top: 12px; font-size: 10px; }
dialog { background: #172620; color: var(--ink); border: 1px solid #60714f; padding: 32px; border-radius: 18px; max-width: 490px; width: calc(100% - 32px); box-shadow: 0 18px 80px #0008; }
dialog::backdrop { background: #060d0ac9; backdrop-filter: blur(5px); }
dialog h2 { font: 31px Georgia, serif; letter-spacing: -.7px; margin: 0 0 18px; }
dialog p { font-size: 13px; color: var(--muted); line-height: 1.8; }
dialog label { display: block; color: #d2dec6; font-size: 12px; margin: 18px 0 8px; }
dialog input { display: block; width: 100%; background: #0e1c13; border: 1px solid #5d704d; border-radius: 8px; padding: 13px; color: var(--ink); font: inherit; outline-color: var(--accent); }
dialog details { margin: 20px 0; }
dialog details summary { font-size: 11px; color: #b3c5a2; cursor: pointer; }
dialog .dialog-note { font-size: 11px; color: #bfc8aa; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.form-error { color: var(--danger); }
button:disabled { cursor: default; }
.dpad button { touch-action: none; user-select: none; }

@media (max-width: 1100px) {
  .stat-suffix { display: block; margin: 4px 0 0; }
  .stats > div { padding-left: 14px; }
  .intro-copy { max-width: 340px; }
}
@media (max-width: 960px) {
  .objective { margin-inline: 22px; }
  .inventory-heading, .inventory { margin-inline: 22px; }
  .inventory-tip { margin-inline: 22px; }
  .board-row { gap: 3px; }
  .inventory { gap: 5px; }
  .inventory-slot { min-height: 77px; }
  .slot-name { font-size: 8px; }
  .inventory-heading > div { gap: 7px; }
  .inventory-heading .eyebrow { letter-spacing: 1px; }
  .actor { font-size: 11px; }
}
@media (max-width: 760px) {
  .side-panel .rules-card { grid-column: 1 / -1; margin-top: 0; }
  .stats strong { font-size: 26px; }
  .intro-copy { max-width: none; }
  .board { max-width: 660px; }
  .actor { font-size: 15px; }
  .terrain-mark { font-size: 23px; }
  .tile.door .terrain-mark { font-size: 32px; }
}
@media (max-width: 450px) {
  .site-header nav { gap: 16px; }
  .site-header .text-button { font-size: 10px; }
  .objective { margin: 15px 20px 0; font-size: 11px; }
  .objective > span:first-child { font-size: 17px; }
  .stats > div { padding-left: 12px; }
  .stats strong { font-size: 23px; }
  .stats .stat-label { letter-spacing: 1px; font-size: 7px; }
  .stat-suffix { font-size: 9px; }
  .board-row { gap: 2px; }
  .actor { font-size: 9px; border-radius: 3px !important; }
  .actor.player { box-shadow: 0 2px #587a37; letter-spacing: 0; }
  .enemy-lives { width: 10px; height: 10px; right: -4px; bottom: -4px; font-size: 6px; }
  .terrain-mark { font-size: 14px; }
  .tile.door .terrain-mark { font-size: 20px; }
  .inventory-heading, .inventory { margin-inline: 20px; }
  .inventory-heading > div { flex-direction: column; gap: 4px; }
  .inventory-tip { margin-inline: 20px; font-size: 9px; }
  .inventory-slot { min-height: 72px; }
  .slot-icon { font-size: 20px; }
  .slot-name { font-size: 8px; }
  .panel-actions { gap: 6px; }
  .icon-button { width: 33px; height: 33px; font-size: 16px; }
  .world-heading h2 { font-size: 21px; }
  .world-subtitle { font-size: 10px; }
  .pause-overlay h3 { font-size: 24px; }
  .pause-overlay p { font-size: 10px; margin: 8px 0 14px; }
  .pause-overlay .eyebrow { display: none; }
  .pause-overlay .button { padding: 10px 12px; }
  dialog { padding: 25px; }
  dialog h2 { font-size: 27px; }
  .dialog-actions { flex-wrap: wrap; }
  .side-panel .rules-card { grid-column: 1; }
}
