:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #f5f0df;
  --muted: #afbdd0;
  --night: #07121f;
  --panel: rgba(7, 18, 31, 0.93);
  --panel-soft: rgba(15, 31, 47, 0.9);
  --line: rgba(151, 204, 224, 0.36);
  --cyan: #75d8f4;
  --cyan-dark: #176781;
  --amber: #ffc15b;
  --amber-dark: #9d5d17;
  --red: #ff6f70;
  --green: #75d59e;
  --violet: #b795ef;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  overscroll-behavior: none;
  touch-action: manipulation;
}

button,
input,
select { font: inherit; }

button {
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

button:disabled { opacity: 0.5; cursor: default; }

[hidden] { display: none !important; }

#stage {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
  background: #081625;
}

.world {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("assets/night-pass.webp") center center / cover no-repeat;
}

.world::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 15, 0.23);
}

.world::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: rgba(4, 12, 20, 0.48);
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  min-height: calc(58px + var(--safe-top));
  padding: calc(7px + var(--safe-top)) 8px 7px;
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  background: rgba(4, 13, 24, 0.9);
  border-bottom: 1px solid rgba(117, 216, 244, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.pause-button {
  grid-column: 1;
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(18, 35, 51, 0.88);
  border: 1px solid rgba(151, 204, 224, 0.3);
  border-radius: 6px;
}

.pause-button span,
.pause-button span::after {
  width: 5px;
  height: 17px;
  display: block;
  background: var(--cyan);
  border-radius: 1px;
}

.pause-button span { position: relative; transform: translateX(-4px); }
.pause-button span::after { content: ""; position: absolute; left: 8px; top: 0; }
.pause-button[hidden] { display: none; }

.brand {
  grid-column: 2;
  min-width: 0;
  line-height: 0.86;
  text-align: center;
  color: var(--amber);
}

.brand strong,
.brand span { display: block; letter-spacing: 0; }
.brand strong { font-size: 13px; }
.brand span { margin-top: 5px; font-size: 10px; color: var(--cyan); font-weight: 900; }

.hud {
  grid-column: 3;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.hud-item {
  min-width: 0;
  height: 42px;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(18, 35, 51, 0.88);
  border: 1px solid rgba(151, 204, 224, 0.28);
  border-radius: 6px;
}

.hud-item span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.hud-item b { margin-top: 3px; font-size: 14px; line-height: 1; color: var(--ink); }
.hud-item.fortress b { color: var(--green); }

.surface {
  position: absolute;
  inset: calc(58px + var(--safe-top)) 0 0;
  overflow: hidden;
}

.play-surface {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) 114px;
  padding: 6px 7px calc(7px + var(--safe-bottom));
  gap: 6px;
}

.coach {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px 9px;
  text-align: center;
  background: rgba(7, 18, 31, 0.9);
  border: 1px solid rgba(255, 193, 91, 0.58);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.coach b { color: var(--amber); font-size: 12px; line-height: 1.1; }
.coach span { margin-top: 3px; color: var(--ink); font-size: 10px; line-height: 1.15; }
.coach.done { border-color: rgba(117, 213, 158, 0.5); }
.coach.done b { color: var(--green); }

.battlefield {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(117, 216, 244, 0.44);
  border-radius: 6px;
  background: rgba(4, 13, 23, 0.24);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.28), 0 8px 22px rgba(0, 0, 0, 0.2);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.lane-buttons {
  position: absolute;
  z-index: 6;
  left: 5px;
  right: 5px;
  bottom: 5px;
  height: 49px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  pointer-events: none;
}

.lane-button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  padding: 5px 7px;
  color: var(--ink);
  background: rgba(9, 28, 43, 0.92);
  border: 1px solid rgba(117, 216, 244, 0.55);
  border-radius: 6px;
  pointer-events: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lane-button b { min-width: 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.lane-key {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.lane-button i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--charge, 100%);
  height: 4px;
  background: var(--cyan);
  transition: width 80ms linear;
}

.lane-button.ready { border-color: var(--amber); background: rgba(38, 39, 39, 0.94); }
.lane-button.ready i { background: var(--amber); }
.lane-button.danger { box-shadow: 0 0 0 2px var(--red), 0 5px 13px rgba(0, 0, 0, 0.35); }
.lane-button.hit { animation: lane-hit 180ms ease-out; }

@keyframes lane-hit {
  45% { transform: translateY(-3px); background: rgba(48, 92, 102, 0.96); }
}

.feedback {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(5, 14, 24, 0.9);
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.feedback.show { opacity: 1; }

.battle-dock {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 94px;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  background: rgba(6, 17, 30, 0.94);
  border: 1px solid rgba(151, 204, 224, 0.3);
  border-radius: 6px;
}

.warden-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(33, 68, 79, 0.36);
}

.warden-wrap img {
  position: absolute;
  width: 106px;
  max-width: none;
  left: -13px;
  bottom: -9px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.44));
}

.wave-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.wave-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.25; }
.wave-progress {
  position: relative;
  height: 27px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 216, 244, 0.35);
  border-radius: 4px;
  background: rgba(3, 12, 22, 0.8);
}

.wave-progress span { position: relative; z-index: 2; font-size: 11px; font-weight: 900; }
.wave-progress i {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(42, 130, 151, 0.72);
  transition: width 160ms ease;
}

.focus-button {
  min-width: 0;
  min-height: 62px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(54, 34, 73, 0.92);
  border: 1px solid rgba(183, 149, 239, 0.72);
  border-radius: 6px;
}

.focus-button > span:last-child { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.focus-button b { max-width: 100%; font-size: 9px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-button small { margin-top: 2px; color: #ddd0f2; font-size: 8px; line-height: 1.1; }
.focus-icon {
  width: 23px;
  height: 23px;
  border: 3px solid var(--violet);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(183, 149, 239, 0.18);
}

.home-surface {
  display: grid;
  grid-template-rows: minmax(120px, 42%) minmax(0, 1fr);
  padding: 8px 10px calc(10px + var(--safe-bottom));
  background: rgba(4, 12, 22, 0.44);
}

.home-art { position: relative; min-height: 0; overflow: hidden; pointer-events: none; }
.home-art img {
  position: absolute;
  left: 50%;
  bottom: -18px;
  height: min(38vh, 330px);
  max-height: 115%;
  transform: translateX(-50%);
  filter: drop-shadow(0 10px 13px rgba(0, 0, 0, 0.5));
}

.home-copy {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  text-align: center;
  background: rgba(6, 17, 30, 0.94);
  border: 1px solid rgba(117, 216, 244, 0.38);
  border-radius: 6px;
}

.eyebrow { color: var(--amber); font-size: 10px; font-weight: 900; }
.home-copy h1,
.decision-copy h1 { margin: 5px 0 6px; font-size: 22px; line-height: 1.05; }
.home-copy > p { margin: 0 auto 9px; max-width: 480px; color: var(--muted); font-size: 11px; line-height: 1.3; }

.home-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.home-stats div {
  min-width: 0;
  padding: 6px;
  background: rgba(15, 35, 51, 0.9);
  border: 1px solid rgba(151, 204, 224, 0.24);
  border-radius: 5px;
}

.home-stats span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; }
.home-stats b { display: block; margin-top: 2px; color: var(--amber); font-size: 15px; }

.primary-button,
.free-button,
.ad-button {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.18;
}

.primary-button { color: #07131d; background: var(--amber); }
.free-button { color: var(--ink); background: #244c5e; border: 1px solid rgba(117, 216, 244, 0.56); }
.ad-button { color: #1e1305; background: #f2b24d; border: 1px solid #ffe0a2; }

.video-mark {
  position: relative;
  flex: 0 0 25px;
  width: 25px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.video-mark i {
  position: absolute;
  left: 8px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid currentColor;
}

.home-dock {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.home-dock button {
  min-width: 0;
  min-height: 66px;
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: 1px solid rgba(151, 204, 224, 0.28);
  border-radius: 5px;
}

.home-dock b { max-width: 100%; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-dock small { color: var(--muted); font-size: 8px; }
.dock-icon,
.order-icon { position: relative; width: 24px; height: 24px; display: inline-block; color: var(--cyan); }
.power-icon::before { content: ""; position: absolute; inset: 4px 8px; transform: skew(-20deg); background: var(--amber); }
.power-icon::after { content: ""; position: absolute; left: 4px; top: 9px; width: 16px; height: 5px; background: var(--amber); }
.reload-icon { border: 3px solid var(--cyan); border-left-color: transparent; border-radius: 50%; }
.reload-icon::after { content: ""; position: absolute; left: -1px; top: -4px; border-right: 7px solid var(--cyan); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.wall-icon::before { content: ""; position: absolute; inset: 4px 3px 2px; background: var(--green); clip-path: polygon(0 15%,25% 15%,25% 0,48% 0,48% 15%,72% 15%,72% 0,100% 0,100% 100%,0 100%); }

.status-line { min-height: 16px; margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.2; }

.decision-surface {
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 9px 9px calc(9px + var(--safe-bottom));
  background: rgba(2, 8, 15, 0.74);
}

.decision-panel {
  width: min(100%, 520px);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(92px, 28%) minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid rgba(117, 216, 244, 0.48);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.decision-art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: rgba(30, 70, 82, 0.32);
  border-bottom: 1px solid rgba(151, 204, 224, 0.22);
}

.decision-art img {
  position: absolute;
  left: 50%;
  bottom: -36px;
  height: 190%;
  max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.44));
}

.decision-art.crate-art img { bottom: 5px; height: 92%; }
.crate-bob img { animation: crate-bob 1.8s ease-in-out infinite; }
@keyframes crate-bob { 50% { transform: translate(-50%, -5px); } }

.decision-copy {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  text-align: center;
}

.decision-copy h1 { font-size: 19px; }
.decision-copy > p:not(.status-line) { margin: 0 0 9px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.reward-line { color: var(--green) !important; font-weight: 800; }
.decision-actions { display: grid; gap: 7px; margin-top: 7px; }

.field-orders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.field-orders button {
  min-width: 0;
  min-height: 76px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--panel-soft);
  border: 1px solid rgba(151, 204, 224, 0.3);
  border-radius: 5px;
}

.field-orders button.selected { border-color: var(--amber); background: rgba(82, 56, 28, 0.85); }
.field-orders button > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.field-orders b { font-size: 9px; line-height: 1.1; }
.field-orders small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.15; }

.toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  max-width: calc(100% - 30px);
  padding: 8px 12px;
  transform: translate(-50%, 16px);
  border-radius: 5px;
  background: rgba(4, 12, 21, 0.96);
  border: 1px solid rgba(255, 193, 91, 0.58);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 340px) {
  .topbar { grid-template-columns: 44px 48px minmax(0, 1fr); padding-left: 5px; padding-right: 5px; }
  .play-surface { grid-template-rows: 48px minmax(0, 1fr) 102px; padding-left: 5px; padding-right: 5px; }
  .coach b { font-size: 10px; }
  .coach span { font-size: 9px; }
  .battle-dock { grid-template-columns: 62px minmax(0, 1fr) 80px; padding: 4px; gap: 4px; }
  .warden-wrap img { width: 88px; left: -13px; }
  .wave-card p { font-size: 9px; }
  .lane-button { padding: 4px; grid-template-columns: 18px minmax(0, 1fr); }
  .lane-key { width: 16px; height: 18px; }
  .lane-button b { font-size: 9px; }
  .home-copy { padding: 9px; }
  .home-copy h1 { font-size: 18px; }
  .decision-copy { padding: 9px; }
  .decision-copy h1 { font-size: 17px; }
}

@media (max-height: 620px) and (orientation: portrait) {
  .surface { top: calc(52px + var(--safe-top)); }
  .topbar { min-height: calc(52px + var(--safe-top)); padding-top: calc(4px + var(--safe-top)); padding-bottom: 4px; }
  .hud-item { height: 38px; }
  .play-surface { grid-template-rows: 42px minmax(0, 1fr) 92px; gap: 4px; padding-top: 4px; }
  .coach { padding: 3px 7px; }
  .coach span { margin-top: 1px; font-size: 9px; }
  .battle-dock { grid-template-columns: 55px minmax(0, 1fr) 75px; padding: 4px; gap: 4px; }
  .warden-wrap img { width: 80px; left: -12px; }
  .wave-card { gap: 4px; }
  .wave-card p { font-size: 8px; }
  .wave-progress { height: 22px; }
  .focus-button { min-height: 54px; padding: 4px; }
  .focus-icon { width: 18px; height: 18px; }
  .home-surface { grid-template-rows: minmax(72px, 27%) minmax(0, 1fr); }
  .home-art img { bottom: -40px; height: 190px; }
  .home-copy h1 { font-size: 17px; margin-top: 2px; }
  .home-copy > p { margin-bottom: 5px; font-size: 9px; }
  .home-stats { margin-bottom: 5px; }
  .primary-button { min-height: 44px; }
  .home-dock { margin-top: 5px; }
  .home-dock button { min-height: 55px; }
  .decision-panel { grid-template-rows: 74px minmax(0, 1fr); }
  .decision-copy { padding: 8px 10px; }
  .decision-copy h1 { margin: 2px 0 4px; font-size: 16px; }
  .decision-copy > p:not(.status-line) { margin-bottom: 5px; font-size: 9px; }
  .field-orders button { min-height: 62px; padding: 4px; }
  .decision-actions { gap: 5px; margin-top: 4px; }
  .primary-button, .free-button, .ad-button { min-height: 44px; padding: 6px 8px; font-size: 10px; }
}

@media (orientation: landscape) {
  .topbar {
    right: auto;
    bottom: 0;
    width: 104px;
    min-height: 100%;
    padding: calc(8px + var(--safe-top)) 7px calc(8px + var(--safe-bottom));
    grid-template-columns: 1fr;
    grid-template-rows: 42px 44px minmax(0, 1fr);
    align-items: start;
    border-right: 1px solid rgba(117, 216, 244, 0.28);
    border-bottom: 0;
  }
  .pause-button { justify-self: center; width: 44px; height: 44px; grid-row: 2; }
  .pause-button, .brand, .hud { grid-column: 1; }
  .brand { grid-row: 1; }
  .hud { grid-row: 3; }
  .brand strong { font-size: 14px; }
  .brand span { font-size: 10px; }
  .hud { grid-template-columns: 1fr; gap: 5px; align-content: center; }
  .hud-item { height: 46px; }
  .surface { inset: 0 0 0 104px; }
  .play-surface {
    grid-template-columns: minmax(0, 1fr) 190px;
    grid-template-rows: 46px minmax(0, 1fr);
    padding: 7px calc(7px + env(safe-area-inset-right, 0px)) calc(7px + var(--safe-bottom)) 7px;
    gap: 6px;
  }
  .coach { grid-column: 1; grid-row: 1; }
  .battlefield { grid-column: 1; grid-row: 2; }
  .battle-dock { grid-column: 2; grid-row: 1 / span 2; grid-template-columns: 1fr; grid-template-rows: minmax(78px, 1fr) auto 82px; }
  .warden-wrap img { width: min(170px, 23vw); left: 50%; bottom: -10px; transform: translateX(-50%); }
  .wave-card { padding: 6px; }
  .focus-button { min-height: 70px; }
  .home-surface { grid-template-columns: minmax(150px, 38%) minmax(0, 1fr); grid-template-rows: 1fr; padding: 8px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + var(--safe-bottom)) 8px; }
  .home-art img { bottom: -28px; height: min(96%, 430px); }
  .home-copy { align-self: center; max-height: 100%; }
  .decision-panel { width: min(720px, 100%); grid-template-columns: minmax(145px, 31%) minmax(0, 1fr); grid-template-rows: 1fr; }
  .decision-art { border-right: 1px solid rgba(151, 204, 224, 0.22); border-bottom: 0; }
  .decision-art img { height: min(125%, 430px); bottom: -28px; }
  .decision-art.crate-art img { width: 90%; height: auto; bottom: 50%; transform: translate(-50%, 50%); }
  .decision-copy { align-self: stretch; }
}

@media (orientation: landscape) and (max-height: 420px) {
  .topbar { width: 92px; }
  .surface { left: 92px; }
  .play-surface { grid-template-columns: minmax(0, 1fr) 164px; grid-template-rows: 40px minmax(0, 1fr); padding: 5px; gap: 4px; }
  .coach { padding: 3px 7px; }
  .coach span { font-size: 9px; }
  .battle-dock { grid-template-rows: minmax(58px, 1fr) auto 64px; padding: 4px; gap: 4px; }
  .warden-wrap img { width: min(135px, 19vw); bottom: -18px; }
  .wave-card { gap: 3px; padding: 2px; }
  .wave-card p { font-size: 8px; }
  .wave-progress { height: 21px; }
  .focus-button { min-height: 56px; padding: 3px; }
  .home-surface { grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); padding: 5px; }
  .home-art img { height: 118%; bottom: -70px; }
  .home-copy { padding: 8px 10px; }
  .home-copy h1 { margin: 2px 0 3px; font-size: 16px; }
  .home-copy > p { margin-bottom: 4px; font-size: 9px; }
  .home-stats { margin-bottom: 4px; }
  .home-dock { margin-top: 4px; }
  .home-dock button { min-height: 50px; }
  .primary-button { min-height: 44px; padding: 5px; }
  .decision-surface { padding: 5px; }
  .decision-panel { width: min(650px, 100%); grid-template-columns: 142px minmax(0, 1fr); }
  .decision-copy { padding: 7px 10px; }
  .decision-copy h1 { margin: 2px 0 3px; font-size: 15px; }
  .decision-copy > p:not(.status-line) { margin-bottom: 4px; font-size: 9px; }
  .field-orders button { min-height: 58px; padding: 3px; }
  .decision-actions { grid-template-columns: 1.25fr 0.75fr; gap: 5px; margin-top: 4px; }
  .ad-button, .free-button { min-height: 44px; padding: 5px 7px; font-size: 9px; }
}

@media (min-width: 900px) and (orientation: landscape) {
  .topbar { width: 126px; }
  .surface { left: 126px; }
  .play-surface { grid-template-columns: minmax(0, 760px) minmax(210px, 270px); justify-content: center; }
  .battle-dock { padding: 10px; }
}

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