:root {
  font-family: Inter, "Helvetica Neue", "PingFang TC", sans-serif;
  --bg: #10121c;
  --panel: #181d2c;
  --text: #f3f1e9;
  --muted: #929baa;
  --line: #d3e0fa20;
  --accent: #f4d391;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: #b2c0da09;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #b2c0da1e;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button.primary {
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: #202027;
  font-weight: 700;
  padding: 16px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
button.primary:hover {
  background: #ffe7b5;
}
.primary span {
  font-size: 20px;
  font-weight: 400;
}
.eyebrow {
  font: 10px monospace;
  letter-spacing: 2px;
  color: var(--accent);
}
.launch {
  min-height: 100dvh;
  position: relative;
  background: #111321;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.launch-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.launch-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    #10121c 0%,
    #10121ce0 8%,
    #10121c20 44%,
    #10121c00 80%
  );
}
.launch-top {
  position: absolute;
  top: 35px;
  left: 45px;
  right: 45px;
  display: flex;
  justify-content: space-between;
  font: 9px monospace;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px #000;
  color: #f8e4bd;
}
.launch-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 350px;
  padding-bottom: 38px;
  text-shadow: 0 2px 16px #0f0b19;
}
.launch-copy h1 {
  font-size: 42px;
  letter-spacing: 5px;
  margin: 13px 0 8px;
}
.launch-copy > p:not(.eyebrow) {
  font: 12px monospace;
  letter-spacing: 5px;
  color: #d3c8c4;
}
.launch-copy .primary {
  margin: 24px 0 12px;
  box-shadow: 0 8px 45px #e6ad5625;
}
.launch-copy small {
  font-size: 10px;
  letter-spacing: 0.7px;
  color: #b4b3be;
}
#app {
  max-width: 1440px;
  margin: auto;
  padding: 0 5vw;
}
header {
  height: 94px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand > b {
  font: italic 35px monospace;
  color: var(--accent);
  letter-spacing: -10px;
  margin-right: 10px;
}
.brand > b span {
  font-size: 25px;
  color: #fff;
}
.brand > div {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 650;
}
.brand small {
  display: block;
  font: 8px monospace;
  letter-spacing: 3px;
  color: var(--muted);
  margin-top: 5px;
}
header nav {
  display: flex;
  gap: 7px;
  margin-left: auto;
}
header nav button {
  font-size: 11px;
  padding: 10px 14px;
}
.edition {
  font: 8px monospace;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.hub-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 55px 0 34px;
}
.hub-intro h1 {
  font-size: 52px;
  letter-spacing: -1px;
  margin: 15px 0;
}
.hub-intro h1 span {
  color: var(--accent);
}
.hub-intro > div > p:last-child {
  font-size: 13px;
  color: var(--muted);
}
.collection-stats {
  display: flex;
  gap: 14px;
  align-items: center;
}
.collection-stats strong {
  font: italic 45px monospace;
  color: var(--accent);
}
.collection-stats span {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.game-card {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-align: left;
  padding: 29px;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}
.game-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #10121ce6, #10121c22),
    linear-gradient(0deg, #10121cbb, transparent);
  z-index: -1;
}
.game-card:hover {
  background-size: cover;
  border-color: #d3e0fa66;
}
.game-card .eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
}
.game-card h2 {
  font-size: 32px;
  letter-spacing: 3px;
  margin: 26px 0 8px;
}
.game-card .en {
  font: 10px monospace;
  letter-spacing: 4px;
  color: var(--muted);
}
.game-card .description {
  font-size: 11px;
  color: #c2c9d3;
  line-height: 1.9;
  max-width: 310px;
  margin-top: 17px;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  font-size: 10px;
  color: var(--muted);
}
.card-bottom .arrow {
  width: 34px;
  height: 34px;
  border: 1px solid #f1ead944;
  display: grid;
  place-content: center;
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
}
.card-symbol {
  position: absolute;
  right: 35px;
  top: 45px;
  width: 135px;
  height: 135px;
  opacity: 0.9;
  filter: drop-shadow(0 0 25px #b5dcff44);
  z-index: -1;
}
.racer-banner {
  display: flex;
  gap: 22px;
  align-items: center;
  background: linear-gradient(100deg, #283c2e, #1b2530);
  border: 1px solid #d9fc7433;
  border-radius: 10px;
  padding: 22px 28px;
  margin-top: 22px;
}
.racer-icon {
  font: 40px monospace;
  color: #d9fc74;
}
.racer-banner small {
  font: 8px monospace;
  letter-spacing: 2px;
  color: #bacb9c;
}
.racer-banner h3 {
  font-size: 20px;
  margin-top: 7px;
  letter-spacing: 2px;
}
.racer-banner h3 span {
  font: 9px monospace;
  letter-spacing: 2px;
  margin-left: 10px;
  color: var(--muted);
}
.racer-banner > span:last-child {
  margin-left: auto;
  font-size: 11px;
  color: #cfddb8;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 27px 0;
  font: 9px monospace;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.back-link {
  background: none;
  border: none;
  padding: 0;
  margin: 25px 0;
  font-size: 11px;
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
}
.game-poster {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 485px;
  border-radius: 13px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #10121cf5 2%, #10121c30 100%);
  z-index: -1;
}
.poster-copy {
  padding: 35px;
}
.poster-copy h1 {
  font-size: 45px;
  letter-spacing: 4px;
  margin: 18px 0 10px;
}
.poster-copy > p:nth-last-child(2) {
  font: 12px monospace;
  letter-spacing: 5px;
  color: var(--muted);
}
.poster-copy > p:last-child {
  font-size: 12px;
  line-height: 1.9;
  max-width: 360px;
  color: #c6c9d4;
  margin-top: 22px;
}
.mission-panel {
  padding: 26px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.mission-panel h2 {
  font-size: 24px;
  letter-spacing: 2px;
  margin: 12px 0 22px;
}
.level-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.level-button {
  padding: 15px;
  text-align: left;
  min-height: 94px;
  border-radius: 7px;
}
.level-button.selected {
  border-color: var(--accent);
  background: #e9d29d0a;
}
.level-button strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin: 8px 0;
}
.level-button small {
  font: 8px monospace;
  color: var(--muted);
}
.level-button .stars {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 3px;
}
.level-button.locked {
  opacity: 0.45;
}
.upgrade-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0;
  margin: 7px 0 9px;
  gap: 14px;
}
.upgrade-card strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.upgrade-card small {
  font: 9px monospace;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.upgrade-card button {
  font: 10px monospace;
  padding: 11px;
  white-space: nowrap;
}
.objective {
  font-size: 10px;
  line-height: 1.85;
  color: var(--muted);
  margin-top: 15px;
}
.controls-note {
  display: flex;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 22px 0 35px;
  align-items: center;
}
.controls-note b {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.controls-note p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
body.playing {
  overflow: hidden;
}
body.playing #app {
  max-width: none;
  padding: 0 25px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
#play {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.play-top {
  height: 75px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}
.play-top > button {
  padding: 10px 14px;
  font-size: 11px;
}
.play-top h2 {
  font-size: 17px;
  letter-spacing: 2px;
}
.play-top small {
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.play-time {
  margin-left: auto;
  margin-right: 12px;
}
.play-time strong {
  font: 17px monospace;
}
.play-time small {
  font: 7px monospace;
  letter-spacing: 1px;
}
.metrics {
  display: flex;
  max-width: 960px;
  width: 100%;
  justify-content: space-between;
  margin: 0 auto 12px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  flex-shrink: 0;
  gap: 10px;
}
.metrics small {
  font-size: 9px;
  color: var(--muted);
}
.metrics strong {
  font: 16px monospace;
  margin-left: 13px;
}
.play-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
  gap: 16px;
}
.board {
  position: relative;
  width: min(100%, calc((100dvh - 220px) * 1.5));
  max-width: 1100px;
  aspect-ratio: 3/2;
  max-height: 100%;
  border: 1px solid #c1d6f633;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 90px #02071366;
  flex-shrink: 1;
}
#stage {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #071323;
}
.stage-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  background: #10121c;
  color: var(--muted);
  font-size: 12px;
}
#tower-panel {
  width: 225px;
  flex-shrink: 0;
  background: var(--panel);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 100%;
  overflow-y: auto;
}
#tower-panel h3 {
  font-size: 13px;
  margin-bottom: 10px;
}
#tower-panel p {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 8px 0 15px;
}
.tower-button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  margin-bottom: 8px;
  font-size: 11px;
}
.tower-button small {
  font: 9px monospace;
  color: var(--muted);
}
#wave-button {
  margin-top: 15px;
  padding: 13px;
  font-size: 12px;
}
#tower-panel .tower-actions {
  display: flex;
  gap: 7px;
}
#tower-panel .tower-actions button {
  flex: 1;
  font-size: 10px;
  padding: 10px;
}
.play-hint {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  padding: 17px 0;
  line-height: 1.8;
  flex-shrink: 0;
}
.touch-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5px 22px;
  flex-shrink: 0;
}
.joystick {
  position: relative;
  border: 1px solid #c6d9ff4d;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: #c6d9ff09;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.joystick i {
  position: absolute;
  left: 29px;
  top: 29px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #d9dcf329;
  border: 1px solid #d9dcf355;
  pointer-events: none;
}
.joystick span {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  bottom: 8px;
  font-size: 8px;
  color: var(--muted);
  pointer-events: none;
}
.action-button {
  border-color: var(--accent);
  color: var(--accent);
  background: #e9d29d0e;
  border-radius: 50%;
  width: 87px;
  height: 87px;
  font-size: 12px;
  touch-action: none;
  user-select: none;
}
.action-button.held {
  background: #e9d29d33;
}
.touch-tip {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
  padding: 0 15px;
}
dialog {
  width: min(570px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  border: 1px solid #becae944;
  border-radius: 14px;
  background: #181d2cf9;
  color: var(--text);
  padding: 30px;
  box-shadow: 0 40px 130px #0008;
}
dialog::backdrop {
  background: #050913bf;
  backdrop-filter: blur(8px);
}
.modal-eyebrow {
  font: 9px monospace;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 13px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.modal-head h2 {
  font-size: 26px;
  letter-spacing: 1px;
}
.close {
  width: 32px;
  height: 32px;
  font-size: 20px;
}
.modal-copy {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 17px 0 23px;
}
.secondary {
  padding: 13px;
  width: 100%;
  font-size: 12px;
  margin-top: 10px;
}
.result-mark {
  text-align: center;
  font: italic 72px monospace;
  color: var(--accent);
  letter-spacing: -3px;
  margin: 18px 0;
}
.result-summary {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 21px 0;
  border-block: 1px solid var(--line);
  margin: 20px 0;
}
.result-summary small {
  font-size: 10px;
  color: var(--muted);
}
.result-summary strong {
  font: 20px monospace;
  display: block;
  margin-top: 9px;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions button {
  flex: 1;
  margin: 0;
}
.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.choice-list button {
  text-align: left;
  padding: 17px 20px;
}
.choice-list strong {
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}
.choice-list small {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.setting-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.setting-line input {
  accent-color: var(--accent);
  width: 19px;
  height: 19px;
}
.backup-actions {
  display: flex;
  gap: 10px;
}
.backup-actions button {
  flex: 1;
  padding: 12px;
  font-size: 11px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #252c3cf5;
  color: #f2e6ce;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 20px;
  z-index: 30;
  pointer-events: none;
  font-size: 11px;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}
#toast.show {
  opacity: 1;
}
@media (min-width: 1500px) {
  #app {
    padding: 0 60px;
  }
  .game-card {
    min-height: 300px;
  }
  .launch-art {
    object-fit: contain;
    background: #111321;
  }
  .launch-shade {
    background: linear-gradient(0deg, #10121c 0%, transparent 50%);
  }
  .launch-copy {
    padding-bottom: 40px;
  }
}
@media (max-width: 900px) {
  .edition {
    display: none;
  }
  .game-card {
    padding: 23px;
    min-height: 275px;
  }
  .game-card h2 {
    font-size: 28px;
  }
  .card-symbol {
    width: 95px;
    height: 95px;
    right: 20px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 17px;
  }
  .mission-panel {
    padding: 20px;
  }
  .poster-copy {
    padding: 25px;
  }
  .poster-copy h1 {
    font-size: 34px;
  }
  .poster-copy > p:nth-last-child(2) {
    font-size: 10px;
    letter-spacing: 3px;
  }
  .play-top {
    height: 65px;
  }
  .metrics {
    padding: 11px 16px;
  }
  .metrics strong {
    font-size: 14px;
    margin-left: 8px;
  }
  .board {
    width: min(100%, calc((100dvh - 210px) * 1.5));
  }
  #tower-panel {
    width: 190px;
    padding: 13px;
  }
}
@media (max-width: 650px) {
  #app {
    padding: 0 20px;
  }
  header {
    height: 76px;
    gap: 10px;
  }
  .brand > div {
    font-size: 12px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .brand > b {
    font-size: 30px;
  }
  header nav {
    gap: 5px;
  }
  header nav button {
    padding: 9px 10px;
    font-size: 10px;
  }
  .hub-intro {
    padding: 34px 0 25px;
  }
  .hub-intro h1 {
    font-size: 39px;
    margin: 12px 0;
  }
  .hub-intro .eyebrow {
    font-size: 7px;
    letter-spacing: 1.1px;
  }
  .hub-intro > div > p:last-child {
    font-size: 11px;
  }
  .collection-stats {
    gap: 8px;
  }
  .collection-stats strong {
    font-size: 30px;
  }
  .collection-stats span {
    font-size: 8px;
  }
  .game-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .game-card {
    min-height: 255px;
    padding: 25px;
  }
  .game-card h2 {
    font-size: 30px;
    margin-top: 25px;
  }
  .card-symbol {
    right: 28px;
    top: 40px;
    width: 125px;
    height: 125px;
  }
  .game-card .description {
    max-width: 245px;
    font-size: 10px;
  }
  .racer-banner {
    padding: 18px;
    gap: 14px;
    margin-top: 16px;
  }
  .racer-banner h3 {
    font-size: 16px;
  }
  .racer-banner h3 span {
    display: block;
    margin: 8px 0 0;
    font-size: 8px;
  }
  .racer-banner > span:last-child {
    font-size: 9px;
    max-width: 80px;
    line-height: 1.8;
  }
  .racer-icon {
    font-size: 28px;
  }
  footer {
    font-size: 8px;
    line-height: 1.8;
    gap: 15px;
  }
  footer > span:last-child {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .game-poster {
    min-height: 280px;
  }
  .poster-copy {
    padding: 26px;
  }
  .poster-copy h1 {
    font-size: 38px;
  }
  .poster-copy > p:last-child {
    font-size: 11px;
    margin-top: 14px;
  }
  .mission-panel {
    padding: 23px;
  }
  .mission-panel h2 {
    font-size: 22px;
  }
  .controls-note {
    display: block;
    padding: 18px;
  }
  .controls-note p {
    margin-top: 9px;
    font-size: 10px;
  }
  .launch-art {
    height: 58%;
    object-fit: contain;
    object-position: center;
    top: 9%;
  }
  .launch-shade {
    background: linear-gradient(0deg, #10121c 0%, #10121c 19%, #10121c00 52%);
  }
  .launch-top {
    top: 24px;
    left: 22px;
    right: 22px;
    font-size: 7px;
    letter-spacing: 1px;
  }
  .launch-top > span:last-child {
    display: none;
  }
  .launch-copy {
    width: calc(100% - 65px);
    padding-bottom: max(45px, env(safe-area-inset-bottom));
  }
  .launch-copy h1 {
    font-size: 35px;
    letter-spacing: 4px;
  }
  .launch-copy > p:not(.eyebrow) {
    font-size: 10px;
    letter-spacing: 4px;
  }
  .launch-copy .eyebrow {
    font-size: 7px;
    letter-spacing: 1.3px;
  }
  body.playing #app {
    padding: 0 13px;
  }
  .play-top {
    height: 67px;
    gap: 10px;
  }
  .play-top h2 {
    font-size: 15px;
  }
  .play-top small {
    font-size: 8px;
    max-width: 180px;
  }
  .play-top > button {
    font-size: 10px;
    padding: 9px 10px;
  }
  .play-time {
    margin-right: 0;
  }
  .play-time strong {
    font-size: 14px;
  }
  .metrics {
    padding: 12px 9px;
    gap: 5px;
    margin-bottom: 8px;
  }
  .metrics small {
    display: block;
    font-size: 8px;
    margin-bottom: 5px;
  }
  .metrics strong {
    display: block;
    font-size: 13px;
    margin: 0;
  }
  .metrics > div {
    min-width: 50px;
    text-align: center;
  }
  .play-layout {
    flex-direction: column;
    gap: 9px;
  }
  .board {
    width: 100%;
    max-height: none;
    border-radius: 8px;
    flex-shrink: 0;
  }
  #tower-panel {
    width: 100%;
    max-height: 145px;
    padding: 11px 13px;
    overflow: auto;
  }
  #tower-panel h3 {
    font-size: 10px;
    margin-bottom: 6px;
  }
  #tower-panel p {
    font-size: 9px;
    margin: 4px 0 7px;
  }
  #tower-panel .tower-builds {
    display: flex;
    gap: 5px;
  }
  .tower-button {
    padding: 9px 7px;
    margin: 0;
    font-size: 10px;
    gap: 7px;
  }
  .tower-button small {
    font-size: 8px;
  }
  #wave-button {
    margin-top: 8px;
    padding: 10px;
    font-size: 11px;
  }
  #tower-panel .tower-actions {
    display: flex;
    gap: 6px;
  }
  #tower-panel .tower-actions button {
    padding: 9px;
  }
  #tower-panel h3 ~ p {
    display: none;
  }
  .play-hint {
    font-size: 9px;
    padding: 10px 8px;
    line-height: 1.8;
  }
  .touch-bar {
    display: flex;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .joystick {
    width: 94px;
    height: 94px;
  }
  .joystick i {
    left: 25px;
    top: 25px;
  }
  .action-button {
    width: 80px;
    height: 80px;
    font-size: 11px;
  }
  .touch-tip {
    font-size: 9px;
  }
  .touch-bar.breaker .joystick,
  .touch-bar.tower .joystick {
    visibility: hidden;
    width: 20px;
  }
  .touch-bar.tower {
    display: none;
  }
  .touch-bar.breaker .action-button {
    width: 70px;
    height: 70px;
  }
  .modal-head h2 {
    font-size: 23px;
  }
  dialog {
    padding: 25px;
  }
  .result-mark {
    font-size: 55px;
  }
  .result-summary strong {
    font-size: 17px;
  }
  .modal-actions button {
    font-size: 12px;
    padding: 13px;
  }
  .backup-actions button {
    font-size: 10px;
    padding: 10px;
  }
}
@media (pointer: coarse) and (min-width: 651px) {
  .touch-bar {
    display: flex;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 15px;
    pointer-events: none;
    padding: 0;
  }
  .touch-bar > * {
    pointer-events: auto;
  }
  .touch-tip {
    display: none;
  }
  .joystick {
    width: 85px;
    height: 85px;
    background: #132b41c9;
  }
  .joystick i {
    left: 21px;
    top: 21px;
  }
  .action-button {
    width: 75px;
    height: 75px;
    background: #192632d9;
  }
  .touch-bar.tower {
    display: none;
  }
  .touch-bar.breaker .joystick {
    visibility: hidden;
  }
  .board {
    width: min(100%, calc((100dvh - 170px) * 1.5));
  }
  .play-hint {
    font-size: 9px;
    padding: 8px;
  }
  .metrics {
    margin-bottom: 8px;
  }
}
@media (max-height: 520px) and (min-width: 651px) {
  .play-top {
    height: 52px;
  }
  .metrics {
    padding: 8px 15px;
    margin-bottom: 5px;
  }
  .metrics small {
    font-size: 8px;
  }
  .metrics strong {
    font-size: 12px;
  }
  .board {
    width: min(100%, calc((100dvh - 135px) * 1.5));
  }
  .play-hint {
    padding: 6px;
    font-size: 9px;
  }
  #tower-panel {
    max-height: 260px;
    width: 180px;
  }
  .tower-button {
    padding: 8px;
    font-size: 10px;
  }
  .play-layout {
    gap: 10px;
  }
  .launch-copy {
    padding-bottom: 22px;
  }
  .launch-copy h1 {
    font-size: 30px;
    margin: 7px 0;
  }
  .launch-copy .primary {
    margin: 13px 0 8px;
    padding: 11px 17px;
  }
  .launch-top {
    top: 20px;
  }
  .launch-copy .eyebrow {
    font-size: 8px;
  }
  .launch-art {
    object-fit: cover;
    object-position: 50% 36%;
  }
  dialog {
    padding: 22px;
  }
  .result-mark {
    font-size: 45px;
    margin: 8px 0;
  }
  .result-summary {
    padding: 13px;
    margin: 14px 0;
  }
  .modal-copy {
    margin: 12px 0 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
