:root {
  color-scheme: dark;
  --ink: #080d21;
  --navy: #0c1430;
  --navy-soft: #111d40;
  --cream: #fff5df;
  --paper: #f1e5cb;
  --amber: #f4a62a;
  --amber-light: #ffd77c;
  --mint: #9ce3cb;
  --sky: #8adcf0;
  --rose: #f17c75;
  --line: rgba(255, 245, 223, 0.15);
  --muted: #aeb8ce;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% -10%, rgba(69, 100, 166, 0.28), transparent 38rem),
    radial-gradient(circle at 8% 35%, rgba(244, 166, 42, 0.08), transparent 26rem),
    var(--ink);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid var(--amber-light);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  color: var(--ink);
  background: var(--cream);
  font-weight: 900;
  transform: translateY(-180%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  width: min(100% - 2.5rem, 1240px);
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--amber);
  border-radius: 8px 8px 14px 14px;
  box-shadow: inset 0 -5px 0 rgba(116, 54, 11, 0.18);
}

.brand-ear {
  position: absolute;
  top: -7px;
  width: 18px;
  height: 18px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 3px;
}

.brand-ear-left {
  left: 3px;
}

.brand-ear-right {
  right: 3px;
}

.brand-face {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 1000;
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-name {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.17rem;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  margin-top: 0.42rem;
  color: var(--amber-light);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.signal-dot {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(156, 227, 203, 0.1);
  animation: signal-pulse 2.4s ease-out infinite;
}

.game-layout {
  width: min(100% - 2.5rem, 1240px);
  margin: 3.2rem auto 4.5rem;
  display: grid;
  grid-template-columns: minmax(205px, 0.82fr) minmax(360px, 540px) minmax(205px, 0.82fr);
  align-items: start;
  gap: clamp(1.3rem, 3vw, 3.2rem);
}

.side-panel {
  padding-top: 1rem;
}

.panel-heading {
  margin-bottom: 1.35rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.48rem;
  color: var(--amber-light);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.panel-heading h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.metric-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.metric {
  min-height: 88px;
  padding: 1rem 0.95rem;
  background: rgba(17, 29, 64, 0.7);
}

.metric-primary {
  background: var(--amber);
  color: var(--ink);
}

.metric dt {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-primary dt {
  color: rgba(8, 13, 33, 0.64);
}

.metric dd {
  margin: 0;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.scramble-card {
  margin-top: 1rem;
  padding: 1.05rem;
  background: rgba(17, 29, 64, 0.52);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.scramble-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scramble-copy strong {
  color: var(--mint);
}

.power-track {
  height: 8px;
  margin: 0.75rem 0 0.8rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.power-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--mint);
  border-radius: inherit;
  transform-origin: left;
  transition: transform 120ms linear, background 180ms ease;
}

.scramble-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.club-callout {
  margin-top: 1.1rem;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-cat {
  position: relative;
  flex: 0 0 auto;
  width: 37px;
  height: 35px;
  background: var(--amber);
  border-radius: 50% 50% 46% 46%;
}

.mini-cat::before,
.mini-cat::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 14px;
  height: 14px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 2px;
}

.mini-cat::before {
  left: 2px;
}

.mini-cat::after {
  right: 2px;
}

.club-callout strong {
  display: block;
  margin-bottom: 0.26rem;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.club-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.42;
}

.game-column {
  min-width: 0;
}

.game-frame {
  position: relative;
  padding: 13px;
  background: linear-gradient(145deg, #263665, #111b3a 58%);
  border: 1px solid rgba(255, 245, 223, 0.22);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.game-frame::before,
.game-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  background: rgba(255, 245, 223, 0.34);
  border-radius: 50%;
}

.game-frame::before {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.game-frame::after {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.frame-label {
  position: absolute;
  top: 50%;
  z-index: 3;
  color: rgba(255, 245, 223, 0.42);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.frame-label-left {
  left: 3px;
  transform: translateY(-50%) rotate(180deg);
}

.frame-label-right {
  right: 3px;
  transform: translateY(-50%);
}

.canvas-shell {
  position: relative;
  overflow: hidden;
  background: #152349;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  isolation: isolate;
}

#gameCanvas {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 12;
  display: block;
  touch-action: none;
  cursor: grab;
}

#gameCanvas:active {
  cursor: grabbing;
}

.canvas-topbar {
  position: absolute;
  z-index: 3;
  top: 0.8rem;
  left: 0.8rem;
  right: 0.8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.hud-pill {
  width: max-content;
  min-width: 76px;
  padding: 0.48rem 0.62rem;
  display: grid;
  background: rgba(7, 13, 33, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(7px);
}

.hud-pill-right {
  justify-self: end;
  text-align: right;
}

.hud-pill span {
  color: rgba(255, 245, 223, 0.68);
  font-size: 0.49rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.hud-pill strong {
  margin-top: 0.11rem;
  color: var(--cream);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 0.82rem;
}

.hud-lives {
  color: var(--rose);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 8px rgba(125, 29, 35, 0.3);
}

.utility-controls {
  position: absolute;
  z-index: 5;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  gap: 0.42rem;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgba(7, 13, 33, 0.67);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.17);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.icon-button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--amber-light);
}

.icon-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.game-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  padding: 2rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(7, 12, 31, 0.28), rgba(7, 12, 31, 0.58)),
    radial-gradient(circle at 50% 38%, rgba(244, 166, 42, 0.09), transparent 19rem);
  backdrop-filter: blur(1.5px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.game-overlay.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  width: min(100%, 344px);
  padding: 2.15rem 1.8rem 1.6rem;
  color: var(--cream);
  text-align: center;
  background: rgba(8, 13, 33, 0.83);
  border: 1px solid rgba(255, 245, 223, 0.2);
  border-radius: 23px;
  box-shadow: 0 24px 65px rgba(1, 4, 15, 0.42);
}

.overlay-card-compact {
  padding-top: 2rem;
}

.overlay-kicker {
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  color: var(--amber-light);
  font-size: 0.55rem;
  font-weight: 1000;
  letter-spacing: 0.18em;
}

.overlay-kicker span {
  width: 19px;
  height: 1px;
  background: rgba(255, 215, 124, 0.55);
}

.hero-art {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 0.9rem;
  overflow: hidden;
  background: #fff;
  border: 4px solid var(--cream);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(8, 13, 33, 0.42),
    0 10px 28px rgba(0, 0, 0, 0.24);
}

.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
}

.hero-art span {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 5px;
  padding: 0.24rem 0.45rem;
  color: var(--cream);
  background: var(--ink);
  border-radius: 999px;
  transform: translateX(-50%);
  font-size: 0.45rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
}

.overlay-card h1,
.overlay-card h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
}

.overlay-card h1 {
  font-size: clamp(2.5rem, 9vw, 3.7rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
}

.overlay-card h2 {
  font-size: 2.4rem;
  line-height: 0.96;
}

.overlay-description,
.overlay-card-compact > p:not(.overlay-kicker, .key-hint) {
  margin: 1rem auto 1.25rem;
  max-width: 28ch;
  color: #c0c9dc;
  font-size: 0.78rem;
  line-height: 1.55;
}

.primary-button {
  width: 100%;
  min-height: 51px;
  padding: 0.75rem 0.9rem 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--amber);
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 -4px 0 rgba(118, 53, 8, 0.16);
  font-size: 0.7rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.primary-button span:last-child {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: rgba(8, 13, 33, 0.12);
  border-radius: 8px;
  font-size: 1rem;
}

.primary-button:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
}

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

.key-hint {
  margin: 1rem 0 0;
  color: #8f9bb4;
  font-size: 0.58rem;
}

kbd {
  padding: 0.2rem 0.34rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.52rem;
  font-weight: 900;
}

.final-score {
  margin: 1.25rem 0 0.8rem;
  padding: 1rem;
  display: grid;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
}

.final-score span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.final-score strong {
  margin-top: 0.15rem;
  color: var(--amber-light);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 2rem;
}

.touch-deck {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 0.86fr 1fr;
  gap: 0.55rem;
}

.control-button {
  min-height: 72px;
  padding: 0.65rem 0.45rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.1rem 0.55rem;
  color: var(--cream);
  background: rgba(17, 29, 64, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.control-button > span:nth-child(2) {
  justify-self: start;
  font-size: 0.59rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.control-button kbd {
  grid-column: 2;
  justify-self: start;
  color: var(--muted);
}

.control-arrow,
.scramble-burst {
  grid-row: 1 / 3;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: var(--amber-light);
  background: rgba(244, 166, 42, 0.11);
  border-radius: 9px;
  font-size: 1.1rem;
}

.scramble-button {
  background: rgba(244, 166, 42, 0.13);
  border-color: rgba(244, 166, 42, 0.34);
}

.scramble-burst {
  color: var(--ink);
  background: var(--amber);
}

.control-button:hover,
.control-button.is-pressed {
  color: var(--ink);
  background: var(--amber-light);
  border-color: var(--amber-light);
}

.control-button:hover .control-arrow,
.control-button.is-pressed .control-arrow {
  color: var(--ink);
  background: rgba(8, 13, 33, 0.12);
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  padding: 0 0 1.15rem;
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 0.8rem;
}

.guide-number {
  padding-top: 0.16rem;
  color: var(--amber-light);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 0.61rem;
}

.guide-list strong {
  font-size: 0.76rem;
  text-transform: uppercase;
}

.guide-list p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.48;
}

.legend {
  margin-top: 0.3rem;
  padding: 1rem;
  background: rgba(17, 29, 64, 0.58);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.legend-title {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.legend-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.legend-row + .legend-row {
  margin-top: 0.68rem;
}

.legend-row strong {
  color: var(--cream);
}

.legend-icon {
  position: relative;
  width: 27px;
  height: 27px;
  display: block;
}

.fish-icon::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 4px;
  width: 16px;
  height: 10px;
  background: var(--sky);
  border-radius: 60% 45% 45% 60%;
}

.fish-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 1px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--sky);
}

.bell-icon::before {
  content: "";
  position: absolute;
  inset: 5px 6px 4px;
  background: var(--amber);
  border-radius: 50% 50% 38% 38%;
}

.bell-icon::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  background: var(--amber-light);
  border-radius: 50%;
}

.knot-icon::before,
.knot-icon::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 4px solid #b8763f;
  border-radius: 50%;
}

.knot-icon::after {
  inset: 9px 2px;
  border-width: 3px;
}

.keyboard-note {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.keyboard-icon {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--cream);
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 1000;
  box-shadow: inset 0 -3px 0 rgba(8, 13, 33, 0.16);
}

.keyboard-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.keyboard-note strong {
  color: var(--cream);
}

.club-strip {
  min-height: 80px;
  padding: 1.5rem max(1.25rem, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  overflow: hidden;
  color: var(--ink);
  background: var(--amber);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1.35rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.club-strip i {
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0.42;
}

footer {
  width: min(100% - 2.5rem, 1240px);
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #78849d;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

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

.noscript {
  position: fixed;
  z-index: 200;
  inset: auto 1rem 1rem;
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  background: var(--amber-light);
  border-radius: 10px;
  text-align: center;
  font-weight: 900;
}

@keyframes signal-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(156, 227, 203, 0.38);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(156, 227, 203, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(156, 227, 203, 0);
  }
}

@media (max-width: 980px) {
  .game-layout {
    grid-template-columns: minmax(180px, 0.72fr) minmax(350px, 500px);
  }

  .guide-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 0.6fr 1.3fr 0.9fr;
    gap: 1.6rem;
  }

  .guide-panel .panel-heading {
    align-self: start;
  }

  .legend {
    margin-top: 0;
  }

  .keyboard-note {
    grid-column: 3;
  }
}

@media (max-width: 720px) {
  .topbar,
  .game-layout,
  footer {
    width: min(100% - 1.25rem, 540px);
  }

  .topbar {
    min-height: 78px;
  }

  .header-note {
    display: none;
  }

  .game-layout {
    margin-top: 1.4rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .game-column {
    grid-row: 1;
  }

  .score-panel {
    grid-row: 2;
  }

  .guide-panel {
    grid-row: 3;
    grid-column: 1;
    display: block;
  }

  .metric {
    min-height: 78px;
  }

  .frame-label {
    display: none;
  }

  .game-frame {
    padding: 8px;
    border-radius: 24px;
  }

  .canvas-shell {
    border-radius: 17px;
  }

  .club-strip {
    justify-content: flex-start;
  }

  .club-strip span:nth-of-type(n + 3),
  .club-strip i:nth-of-type(n + 2) {
    display: none;
  }

  footer {
    padding: 1.7rem 0;
    display: grid;
    gap: 0.5rem;
  }

  footer p {
    margin: 0;
  }
}

@media (max-width: 430px) {
  .brand-name {
    font-size: 1rem;
  }

  .brand-subtitle {
    font-size: 0.54rem;
  }

  .game-overlay {
    padding: 1rem;
  }

  .overlay-card {
    width: min(100%, 310px);
    padding: 1.7rem 1.25rem 1.25rem;
  }

  .hero-art {
    width: 92px;
    height: 92px;
  }

  .overlay-card h1 {
    font-size: 2.75rem;
  }

  .overlay-description {
    margin-top: 0.8rem;
  }

  .canvas-topbar {
    top: 0.55rem;
    left: 0.55rem;
    right: 0.55rem;
  }

  .hud-pill {
    min-width: 64px;
    padding: 0.4rem 0.48rem;
  }

  .touch-deck {
    gap: 0.35rem;
  }

  .control-button {
    min-height: 65px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 0.2rem;
  }

  .control-button > span:nth-child(2) {
    justify-self: center;
    font-size: 0.51rem;
  }

  .control-arrow,
  .scramble-burst {
    grid-row: auto;
    width: 29px;
    height: 29px;
  }

  .control-button kbd {
    display: none;
  }
}

@media (max-width: 350px) {
  .game-overlay {
    padding: 0.55rem;
  }

  .overlay-card {
    width: min(100%, 290px);
    padding: 0.85rem 0.9rem 0.75rem;
  }

  .overlay-kicker {
    margin-bottom: 0.5rem;
  }

  .hero-art {
    width: 68px;
    height: 68px;
    margin-bottom: 0.5rem;
  }

  .overlay-card h1 {
    font-size: 2.2rem;
  }

  .overlay-description {
    margin: 0.55rem auto 0.7rem;
    font-size: 0.7rem;
    line-height: 1.4;
  }

  .key-hint {
    margin-top: 0.55rem;
  }
}

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