:root {
  color-scheme: dark;
  --graphite: #17211e;
  --graphite-2: #22302c;
  --graphite-3: #31413c;
  --mineral: #e7eee8;
  --mineral-muted: #b8c7be;
  --ink: #111815;
  --signal: #d95232;
  --signal-dark: #862b20;
  --amber: #f1bd43;
  --teal: #478b78;
  --line-light: rgba(231, 238, 232, 0.18);
  --line-dark: rgba(17, 24, 21, 0.2);
  --topbar-height: 62px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --move-time: 170ms;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  background: var(--graphite);
}

body {
  min-width: 280px;
  min-height: 320px;
  overflow: hidden;
  background: var(--graphite);
  color: var(--mineral);
  font-family: "Bahnschrift", "Aptos", "Microsoft JhengHei", "PingFang TC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button,
select,
a {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--graphite);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(138px, 1fr) auto minmax(138px, 1fr);
  align-items: center;
  min-width: 0;
  padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line-light);
  background: #1d2925;
}

.brand-link,
.settings-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--mineral);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-link {
  gap: 9px;
  width: fit-content;
  text-decoration: none;
}

.back-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: var(--signal);
  color: white;
  font-size: 1rem;
  line-height: 1;
}

.title-lockup {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.title-lockup h1 {
  margin: 0;
  color: var(--mineral);
  font-family: "Haettenschweiler", "Bahnschrift Condensed", "Franklin Gothic Heavy", sans-serif;
  font-size: 1.62rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

.title-subtitle {
  color: var(--mineral-muted);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.settings-button {
  justify-self: end;
  gap: 9px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.settings-symbol {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
}

.settings-symbol::before,
.settings-symbol::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 22px;
  height: 2px;
  background: currentColor;
}

.settings-symbol::before {
  top: 4px;
  box-shadow: 0 8px 0 currentColor;
}

.settings-symbol::after {
  top: 1px;
  left: 6px;
  width: 5px;
  height: 8px;
  border: 2px solid currentColor;
  background: #1d2925;
  box-shadow: 9px 8px 0 -2px #1d2925, 9px 8px 0 0 currentColor;
}

.game-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 620px) minmax(260px, 356px);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.2vw, 44px);
  min-height: 0;
  padding: 16px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
  overflow: auto;
}

.board-zone {
  width: min(100%, calc(100dvh - var(--topbar-height) - 88px));
  max-width: 620px;
  min-width: 0;
  justify-self: end;
}

.board-frame {
  position: relative;
  width: 100%;
  padding: 44px clamp(10px, 2vw, 16px) clamp(10px, 2vw, 16px);
  border-radius: 12px;
  background: var(--signal);
  box-shadow: 0 8px 0 var(--signal-dark);
}

.frame-bolt {
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #68261e;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.24);
}

.bolt-nw,
.bolt-ne {
  top: 15px;
}

.bolt-sw,
.bolt-se {
  bottom: 14px;
}

.bolt-nw,
.bolt-sw {
  left: 14px;
}

.bolt-ne,
.bolt-se {
  right: 14px;
}

.board-readout {
  position: absolute;
  top: 9px;
  left: 34px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 26px;
  color: #fff4e8;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.run-lamp {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(241, 189, 67, 0.18);
}

[data-phase="playing"] .run-lamp {
  background: #80c79b;
  animation: lampPulse 1.7s ease-in-out infinite;
}

[data-phase="won"] .run-lamp {
  background: #fff1a4;
}

[data-phase="game-over"] .run-lamp {
  background: #561d18;
  box-shadow: none;
}

.readout-divider {
  width: 1px;
  height: 12px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.42);
}

.board-readout strong {
  color: var(--amber);
  font-size: 0.72rem;
}

.board-readout sup {
  position: relative;
  top: -0.16em;
  font-size: 0.66em;
}

.board {
  --board-pad: clamp(8px, 2.2%, 13px);
  --board-gap: clamp(7px, 1.8%, 12px);
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid #6f251d;
  border-radius: 8px;
  background: #111916;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  touch-action: none;
  user-select: none;
}

.board::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.grid-cells {
  position: absolute;
  inset: var(--board-pad);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: var(--board-gap);
}

.grid-cells span {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(231, 238, 232, 0.08);
  border-radius: 5px;
  background: #28342f;
}

.grid-cells span::before,
.grid-cells span::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(231, 238, 232, 0.12);
}

.grid-cells span::before {
  top: 5px;
  left: 5px;
}

.grid-cells span::after {
  right: 5px;
  bottom: 5px;
}

.tile-layer,
.fx-layer {
  position: absolute;
  inset: var(--board-pad);
  pointer-events: none;
}

.tile-layer {
  z-index: 3;
}

.fx-layer {
  z-index: 5;
}

.tile,
.merge-flash,
.score-burst {
  --tile-size: calc((100% - (var(--board-gap) * 3)) / 4);
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tile-size);
  aspect-ratio: 1;
  transform: translate(var(--x, 0), var(--y, 0));
}

.tile {
  z-index: 2;
  transition: transform var(--move-time) var(--ease-out);
  will-change: transform;
}

.tile-face {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #e4ebe5;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.38);
  transform-origin: center;
}

.tile-face::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: 0.13;
}

.tile-face::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.22;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.16);
}

.tile-value {
  position: relative;
  z-index: 2;
  font-family: "Haettenschweiler", "Bahnschrift Condensed", "Franklin Gothic Heavy", sans-serif;
  font-size: clamp(1.15rem, 5.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tile-power {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 6px;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.42rem, 1.3vw, 0.68rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.72;
}

.tile-2 .tile-face {
  background: #e7eee8;
}

.tile-4 .tile-face {
  background: #c8d6ce;
}

.tile-8 .tile-face {
  background: #f0c95c;
}

.tile-16 .tile-face {
  background: #eaa044;
}

.tile-32 .tile-face {
  background: #df6b38;
}

.tile-64 .tile-face {
  background: #c84631;
  color: white;
}

.tile-128 .tile-face {
  background: #5b9b86;
  color: #0f1c18;
}

.tile-256 .tile-face {
  background: #39786a;
  color: white;
}

.tile-512 .tile-face {
  background: #365f70;
  color: white;
}

.tile-1024 .tile-face {
  background: #515775;
  color: white;
}

.tile-2048 .tile-face {
  background: var(--amber);
  color: #352408;
  box-shadow: 0 3px 0 #9b6c13, inset 0 0 0 3px rgba(255, 255, 255, 0.34);
}

.tile-super .tile-face {
  background: #0a100e;
  color: var(--mineral);
  box-shadow: 0 3px 0 #000, inset 0 0 0 2px var(--signal);
}

.tile-1024 .tile-value,
.tile-2048 .tile-value,
.tile-super .tile-value {
  font-size: clamp(0.88rem, 4.1vw, 2.45rem);
}

.tile.is-new .tile-face {
  animation: tileNew 240ms var(--ease-out);
}

.tile.is-merged .tile-face {
  animation: splitFlip 340ms var(--ease-out);
}

.merge-flash {
  z-index: 1;
  border: 3px solid var(--amber);
  border-radius: 6px;
  opacity: 0;
  animation: mergeRing 480ms var(--ease-out);
}

.score-burst {
  display: grid;
  place-items: start center;
  z-index: 7;
  padding-top: 8%;
  color: var(--amber);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.62rem, 1.7vw, 0.84rem);
  font-weight: 800;
  animation: scoreBurst 620ms var(--ease-out) forwards;
}

.board.is-blocked {
  animation: boardBlocked 230ms var(--ease-out);
}

.board.is-winning {
  animation: boardWinning 500ms var(--ease-out);
}

.game-overlay {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 25, 22, 0.94);
  color: var(--mineral);
  text-align: center;
}

.game-overlay[hidden] {
  display: none;
}

.overlay-code,
.dialog-serial,
.section-label,
.counter-label {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overlay-code {
  color: var(--amber);
}

.game-overlay h2 {
  margin: 10px 0 6px;
  color: white;
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.game-overlay p {
  max-width: 36ch;
  margin: 0;
  color: var(--mineral-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.control-deck {
  position: relative;
  width: 100%;
  max-width: 356px;
  min-width: 0;
  justify-self: start;
  padding: clamp(16px, 3vw, 24px);
  border-radius: 12px;
  background: var(--mineral);
  color: var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.26);
}

.control-deck::before {
  content: "MERGE OPERATOR / M-2048";
  display: block;
  margin-bottom: 12px;
  color: #5c6c64;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.score-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--graphite);
}

.counter-module {
  min-width: 0;
  padding: 12px 13px 10px;
  color: var(--mineral);
}

.counter-module + .counter-module {
  border-left: 1px solid rgba(231, 238, 232, 0.14);
}

.counter-label {
  display: block;
  margin-bottom: 3px;
  color: var(--mineral-muted);
}

.counter-value {
  display: block;
  overflow: hidden;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
  text-overflow: clip;
}

.counter-module.is-updated .counter-value,
.counter-value.is-updated {
  animation: counterTick 220ms var(--ease-out);
}

.counter-module-best {
  background: #273530;
}

.power-section {
  margin-top: 18px;
}

.power-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-label {
  display: block;
  margin-bottom: 3px;
  color: #5c6c64;
}

.power-heading strong {
  font-family: "Haettenschweiler", "Bahnschrift Condensed", "Franklin Gothic Heavy", sans-serif;
  font-size: 1.75rem;
  letter-spacing: -0.035em;
  line-height: 1;
}

.power-label {
  color: var(--signal-dark);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
}

.power-gauge {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 3px;
  height: 9px;
  margin-top: 9px;
}

.gauge-segment {
  background: #c3cec7;
}

.gauge-segment.is-active {
  background: var(--teal);
}

.gauge-segment.is-current {
  background: var(--signal);
  animation: gaugeTick 260ms var(--ease-out);
}

.mission-copy {
  min-height: 104px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
}

.mission-copy h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}

.mission-copy p {
  max-width: 43ch;
  margin: 0;
  color: #485851;
  font-size: 0.83rem;
  line-height: 1.52;
  text-wrap: pretty;
}

.action-row {
  display: flex;
  gap: 9px;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--signal);
  color: white;
  box-shadow: 0 3px 0 var(--signal-dark);
}

.button-primary:hover {
  background: #e45b3a;
}

.button-quiet {
  border: 1px solid rgba(231, 238, 232, 0.34);
  background: transparent;
  color: var(--mineral);
}

.control-deck .button-quiet {
  border-color: rgba(17, 24, 21, 0.28);
  color: var(--ink);
}

.start-button,
.restart-button {
  width: 100%;
}

.control-hints {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #52635b;
  font-size: 0.68rem;
  line-height: 1.25;
}

.key-cluster {
  display: inline-flex;
  gap: 2px;
}

kbd,
.swipe-glyph {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #9aaba2;
  border-radius: 3px;
  background: #d8e1db;
  color: #29332e;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 800;
}

.swipe-glyph {
  width: 34px;
  font-size: 0.8rem;
}

.settings-dialog {
  width: min(92vw, 390px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--mineral);
  color: var(--ink);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.38);
}

.settings-dialog::backdrop {
  background: rgba(9, 15, 12, 0.76);
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line-dark);
}

.dialog-serial {
  color: var(--signal-dark);
}

.dialog-heading h2 {
  margin: 4px 0 0;
  font-size: 1.25rem;
}

.dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: var(--graphite);
  color: var(--mineral);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.field-label {
  display: block;
  padding: 18px 20px 7px;
  color: #4e5e56;
  font-size: 0.74rem;
  font-weight: 700;
}

.settings-dialog select {
  display: block;
  width: calc(100% - 40px);
  min-height: 46px;
  margin: 0 20px;
  padding: 0 12px;
  border: 1px solid #9aaba2;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
}

.dialog-note {
  margin: 10px 20px 0;
  color: #52635b;
  font-size: 0.72rem;
  line-height: 1.45;
}

.dialog-version {
  display: block;
  margin: 18px 20px 20px;
  color: #52635b;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
}

.version-info {
  position: fixed;
  z-index: 22;
  right: 7px;
  bottom: 5px;
  color: rgba(231, 238, 232, 0.42);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.55rem;
  pointer-events: none;
}

@keyframes lampPulse {
  0%,
  100% {
    opacity: 0.58;
  }
  50% {
    opacity: 1;
  }
}

@keyframes tileNew {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splitFlip {
  0% {
    transform: rotateX(0deg) scale(1);
  }
  42% {
    transform: rotateX(-66deg) scale(0.93);
    filter: brightness(1.18);
  }
  100% {
    transform: rotateX(0deg) scale(1);
  }
}

@keyframes mergeRing {
  0% {
    opacity: 0.95;
    scale: 0.88;
  }
  100% {
    opacity: 0;
    scale: 1.38;
  }
}

@keyframes scoreBurst {
  0% {
    opacity: 0;
    translate: 0 5px;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: 0 -18px;
  }
}

@keyframes boardBlocked {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-4px);
  }
  70% {
    transform: translateX(3px);
  }
}

@keyframes boardWinning {
  0%,
  100% {
    filter: none;
  }
  45% {
    filter: brightness(1.25);
  }
}

@keyframes counterTick {
  0% {
    transform: translateY(3px);
    opacity: 0.55;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes gaugeTick {
  0% {
    transform: scaleY(0.35);
  }
  100% {
    transform: scaleY(1);
  }
}

@media (max-width: 720px) and (min-height: 560px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 0 9px;
  }

  .brand-link {
    width: 40px;
    overflow: hidden;
  }

  .brand-link > span:last-child,
  .settings-text,
  .title-subtitle {
    display: none;
  }

  .back-arrow {
    flex: 0 0 auto;
  }

  .settings-button {
    width: 40px;
    justify-content: center;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 18px;
    min-height: calc(100dvh - var(--topbar-height));
    padding: 15px 14px 34px;
    overflow: visible;
  }

  .board-zone {
    width: min(100%, 440px);
    justify-self: center;
  }

  .control-deck {
    width: min(100%, 440px);
    max-width: none;
    justify-self: center;
  }

  .mission-copy {
    min-height: 0;
  }
}

@media (max-width: 410px) {
  .board-frame {
    padding-top: 40px;
  }

  .board-readout {
    left: 30px;
    right: 30px;
    font-size: 0.58rem;
  }

  .control-deck {
    padding: 16px;
  }

  .control-deck::before {
    margin-bottom: 9px;
  }

  .power-section,
  .mission-copy {
    margin-top: 14px;
  }

  .mission-copy {
    padding-top: 13px;
  }

  .tile-power {
    right: 5px;
    bottom: 4px;
  }

  #fa-help-btn.fa-help-btn {
    top: 11px;
    right: 54px;
    bottom: auto;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root {
    --topbar-height: 50px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .brand-link,
  .settings-button {
    min-height: 36px;
  }

  .game-layout {
    grid-template-columns: minmax(250px, 1fr) minmax(250px, 340px);
    gap: clamp(14px, 3vw, 34px);
    padding: 8px 18px 14px;
    overflow: hidden;
  }

  .board-zone {
    width: min(100%, calc(100dvh - var(--topbar-height) - 48px));
  }

  .board-frame {
    padding-top: 36px;
    padding-bottom: 9px;
    box-shadow: 0 5px 0 var(--signal-dark);
  }

  .board-readout {
    top: 6px;
    height: 23px;
  }

  .control-deck {
    max-width: 340px;
    padding: 13px 15px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.26);
  }

  .control-deck::before {
    margin-bottom: 8px;
  }

  .counter-module {
    padding: 8px 10px 7px;
  }

  .counter-value {
    font-size: 1.26rem;
  }

  .power-section {
    margin-top: 10px;
  }

  .power-heading strong {
    font-size: 1.35rem;
  }

  .mission-copy {
    min-height: 0;
    margin-top: 10px;
    padding-top: 9px;
  }

  .mission-copy h2 {
    margin-bottom: 3px;
    font-size: 0.92rem;
  }

  .mission-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.7rem;
    line-height: 1.36;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .action-row {
    margin-top: 8px;
  }

  .button {
    min-height: 36px;
  }

  .control-hints {
    display: none;
  }

  #fa-help-btn.fa-help-btn {
    top: calc(var(--topbar-height) + 6px);
    right: auto;
    bottom: auto;
    left: 8px;
  }
}

@media (max-width: 620px) and (max-height: 460px) and (orientation: landscape) {
  .title-subtitle,
  .brand-link > span:last-child,
  .settings-text {
    display: none;
  }

  .topbar {
    grid-template-columns: 44px 1fr 44px;
  }

}

@media (prefers-reduced-motion: reduce) {
  :root {
    --move-time: 1ms;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
