:root {
  --ink-strong: #153145;
  --ink: #23485f;
  --ink-soft: #5c788f;
  --ink-faint: #87a0b2;
  --paper: rgba(255, 251, 243, 0.96);
  --paper-soft: rgba(255, 249, 239, 0.82);
  --panel: rgba(255, 250, 241, 0.9);
  --panel-deep: rgba(255, 245, 228, 0.95);
  --panel-line: rgba(77, 122, 151, 0.18);
  --panel-line-strong: rgba(77, 122, 151, 0.28);
  --shadow-lg: 0 22px 54px rgba(16, 38, 54, 0.24);
  --shadow-md: 0 14px 30px rgba(19, 50, 73, 0.18);
  --shadow-sm: 0 8px 18px rgba(19, 50, 73, 0.12);
  --accent-gold: #ffd76a;
  --accent-gold-deep: #ffab35;
  --accent-blue: #79d8ff;
  --accent-blue-deep: #2b93de;
  --accent-pink: #ff9fb8;
  --accent-green: #5ed3af;
  --danger: #ff8e72;
  --good: #6fddb2;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --font-ui: "Trebuchet MS", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  --home-bg: url("./assets/Texture/UI/ui_BackGround1_1280X720.png");
  --sky-bg: url("./assets/backgrounds/atlas/background_sheet_00/sky.png");
  --cloud-bg: url("./assets/backgrounds/atlas/background_sheet_00/cloud.png");
  --city-bg: url("./assets/backgrounds/atlas/background_sheet_00/city.png");
  --guide-icon: url("./assets/Texture/UI/UI_Guide.00034.png");
  --fx-blue-glow: url("./assets/Texture/effect/bright_blue.00011.png");
  --hero-reference: url("./assets/hero/reference/hero_reference.png");
  --ui-pulse-soft: 0.48;
  --ui-pulse-strong: 0.52;
  --ui-pulse-beat: 0.44;
  --fx-burst: 0;
  --fx-magnet: 0;
  --fx-guard: 0;
  --fx-impact: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow: hidden;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top, rgba(87, 195, 255, 0.36), rgba(87, 195, 255, 0) 32%),
    linear-gradient(180deg, rgba(9, 29, 48, 0.68), rgba(9, 21, 34, 0.96)),
    var(--city-bg) center bottom / auto 42% repeat-x,
    var(--cloud-bg) center 8% / auto 56% repeat-x,
    var(--sky-bg) center top / cover no-repeat;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hidden {
  display: none !important;
}

.game-shell {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  border-radius: min(2.4vw, 28px);
  background:
    linear-gradient(180deg, rgba(9, 26, 45, 0.08), rgba(9, 26, 45, 0.24)),
    var(--home-bg) center / cover no-repeat;
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.38);
}

@supports (width: 100dvw) and (height: 100dvh) {
  .game-shell {
    width: min(100dvw, calc(100dvh * 16 / 9));
    height: min(100dvh, calc(100dvw * 9 / 16));
    max-width: 100dvw;
    max-height: 100dvh;
  }
}

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

.stage-vignette,
.run-fx-layer,
.fx-burst,
.fx-magnet,
.fx-guard,
.fx-impact {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage-vignette {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0), rgba(7, 16, 26, 0.05) 60%, rgba(5, 12, 20, 0.28)),
    linear-gradient(180deg, rgba(7, 16, 26, 0.02), rgba(7, 16, 26, 0.14));
}

.run-fx-layer {
  overflow: hidden;
  z-index: 3;
}

.fx-burst {
  opacity: calc(var(--fx-burst) * 0.9);
  background:
    radial-gradient(circle at 42% 52%, rgba(255, 238, 172, 0.9), rgba(255, 215, 100, 0.45) 18%, rgba(255, 215, 100, 0) 44%),
    radial-gradient(circle at 55% 44%, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0) 28%);
  mix-blend-mode: screen;
}

.fx-magnet {
  opacity: calc(var(--fx-magnet) * 0.7);
  background:
    radial-gradient(circle at 50% 56%, rgba(121, 216, 255, 0.42), rgba(121, 216, 255, 0.12) 24%, rgba(121, 216, 255, 0) 48%);
  mix-blend-mode: screen;
}

.fx-guard {
  opacity: calc(var(--fx-guard) * 0.8);
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 211, 175, 0.24), rgba(94, 211, 175, 0.08) 26%, rgba(94, 211, 175, 0) 50%);
  mix-blend-mode: screen;
}

.fx-impact {
  opacity: calc(var(--fx-impact) * 0.8);
  background:
    linear-gradient(90deg, rgba(255, 141, 111, 0), rgba(255, 141, 111, 0.16), rgba(255, 141, 111, 0)),
    radial-gradient(circle at center, rgba(255, 141, 111, 0.16), rgba(255, 141, 111, 0) 48%);
  mix-blend-mode: screen;
}

.scene,
.overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.scene {
  display: block;
}

.scene.is-active,
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.scene-home {
  z-index: 6;
  background:
    linear-gradient(180deg, rgba(8, 22, 37, 0.14), rgba(8, 22, 37, 0.38)),
    var(--home-bg) center / cover no-repeat;
}

.scene-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 247, 183, 0.18), rgba(255, 247, 183, 0) 20%),
    radial-gradient(circle at 88% 12%, rgba(124, 214, 255, 0.22), rgba(124, 214, 255, 0) 24%),
    linear-gradient(180deg, rgba(7, 18, 29, 0.04), rgba(7, 18, 29, 0.22));
  pointer-events: none;
}

.scene-run {
  z-index: 5;
}

.scene-run .stage-run-shell {
  position: absolute;
  inset: 0;
}

.home-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  gap: 14px;
}

.home-topbar,
.floating-topbar,
.panel-card,
.module-card,
.summary-stat,
.hud-pill,
.resource-pill,
.route-pill,
.overlay-card,
.rotate-card,
.stack-item,
.reward-box,
.result-box,
.stat-box {
  border: 1px solid var(--panel-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 246, 236, 0.82));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.home-topbar,
.floating-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 22px;
}

.home-topbar {
  position: relative;
  z-index: 2;
}

.player-badge,
.player-meta,
.resource-rail,
.utility-rail,
.selection-chip,
.summary-stat,
.brand-tag,
.route-pill,
.hud-pill,
.stack-topline,
.stack-meta,
.menu-actions,
.home-page-head,
.home-page-heading,
.result-grid,
.reward-row,
.touch-controls {
  display: flex;
}

.player-badge,
.resource-rail,
.utility-rail,
.menu-actions,
.touch-controls {
  align-items: center;
}

.player-badge {
  gap: 12px;
  min-width: 0;
}

.player-avatar {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #7ad4ff, #2c8dd8);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.12), 0 10px 18px rgba(18, 49, 74, 0.18);
}

.player-avatar::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 34%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(255, 225, 163, 0.95), rgba(255, 152, 86, 0.98));
}

.player-meta {
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.player-meta strong,
.resource-pill strong,
.summary-stat strong,
.hud-pill strong,
.selection-chip strong,
.result-box strong,
.stat-box strong,
.reward-box strong {
  color: var(--ink-strong);
  font-weight: 900;
  line-height: 1;
}

.player-meta strong {
  font-size: 20px;
}

.player-meta span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}

.resource-rail {
  gap: 12px;
  min-width: 0;
}

.resource-pill {
  position: relative;
  min-width: 140px;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 0 18px 0 58px;
  border-radius: 20px;
}

.resource-pill::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 50%;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.28), 0 6px 12px rgba(19, 50, 73, 0.18);
}

.resource-pill-coin::before {
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffe286, #ffb443);
}

.resource-pill-record::before {
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #96e4ff, #48a8ea);
}

.resource-pill span,
.summary-stat span,
.hud-pill span,
.selection-chip span,
.small-chip,
.panel-kicker,
.eyebrow {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-pill strong {
  font-size: 22px;
}

.utility-rail {
  gap: 10px;
}

.home-pages {
  position: relative;
  flex: 1;
  min-height: 0;
}

.home-page {
  display: none;
  height: 100%;
}

.home-page-menu {
  --menu-page-scale: 1;
  transform-origin: top center;
  will-change: transform;
}

.home-page.is-active {
  display: block;
}

.home-page-menu.is-active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-page-menu.menu-page-scaled {
  width: calc(100% / var(--menu-page-scale));
  min-height: calc(100% / var(--menu-page-scale));
  margin: 0 auto;
  transform: scale(var(--menu-page-scale));
}

.home-page-detail.is-active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-page-menu .home-main {
  flex: 1;
  min-height: 0;
  height: auto;
}

.home-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.72fr);
  gap: 18px;
  align-items: stretch;
  min-height: 0;
  padding: 2px 0 0;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 28px 28px 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(19, 44, 62, 0.18), rgba(19, 44, 62, 0.42)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 20% 16%, rgba(255, 240, 176, 0.28), rgba(255, 240, 176, 0) 26%),
    radial-gradient(circle at 86% 24%, rgba(122, 212, 255, 0.3), rgba(122, 212, 255, 0) 28%),
    var(--home-bg) center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 28px 58px rgba(10, 28, 42, 0.26);
}

.hero-stage-bg,
.hero-stage-ring {
  position: absolute;
  pointer-events: none;
}

.hero-stage-bg {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(11, 31, 46, 0.28), rgba(11, 31, 46, 0.04) 42%, rgba(11, 31, 46, 0));
}

.hero-stage-ring {
  right: 34px;
  bottom: 26px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 18px solid rgba(255, 232, 160, 0.16);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 0 80px rgba(255, 219, 123, 0.18);
  opacity: 0.9;
}

.hero-stage-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 56%;
  color: #fffef7;
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 248, 218, 0.72);
  color: #9b6a19;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-stage-copy p,
.overlay-card p,
.stack-item p,
.rotate-card p {
  margin: 0;
  color: rgba(245, 250, 255, 0.92);
  line-height: 1.65;
}

#menuHint {
  max-width: 460px;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: balance;
  text-shadow: 0 4px 18px rgba(7, 16, 26, 0.42);
}

.selection-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.mode-column {
  display: grid;
  justify-items: end;
  align-content: end;
  gap: 18px;
}

.summary-stat {
  min-width: 214px;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 24px;
  text-align: right;
}

.summary-stat strong {
  font-size: 34px;
}

.home-dock {
  position: relative;
  z-index: 2;
  gap: 12px;
  align-items: stretch;
  margin-top: 0;
  padding: 10px 12px 8px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(13, 30, 47, 0.76), rgba(8, 19, 31, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 36px rgba(7, 20, 32, 0.3);
}

.home-tab-btn {
  flex: 1 1 0;
}

.home-page-head {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-page-heading {
  flex-direction: column;
  gap: 8px;
}

.home-page-head h2,
.overlay-card h2,
.card-head h2,
.game-title {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 900;
  line-height: 1.05;
}

.home-page-head h2,
.overlay-card h2,
.card-head h2 {
  font-size: 32px;
}

.home-page-panel {
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-xl);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.home-pane {
  display: none;
  height: 100%;
  overflow: auto;
}

.home-pane.is-active {
  display: block;
}

.home-pane::-webkit-scrollbar,
.home-dock::-webkit-scrollbar,
.overlay-card::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.home-pane::-webkit-scrollbar-thumb,
.home-dock::-webkit-scrollbar-thumb,
.overlay-card::-webkit-scrollbar-thumb {
  background: rgba(92, 120, 143, 0.26);
  border-radius: var(--radius-pill);
}

.module-card,
.panel-card,
.overlay-card {
  position: relative;
  border-radius: var(--radius-xl);
}

.module-card,
.panel-card {
  overflow: hidden;
  padding: 22px;
}

.overlay-card {
  width: min(92%, 820px);
  max-height: min(82%, 620px);
  padding: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

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

.stat-box,
.result-box {
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
}

.stat-box strong,
.result-box strong {
  font-size: 26px;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.support-list,
.result-card #resultBreakdown,
.result-card #resultTasks {
  margin-top: 14px;
}

.stack-item {
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
}

.stack-topline {
  align-items: center;
  gap: 12px;
}

.stack-topline h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ink-strong);
  font-size: 22px;
  line-height: 1.15;
}

.stack-meta {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.small-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(35, 72, 95, 0.08);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.small-chip.locked,
.reward-box.claimed .small-chip {
  background: rgba(120, 144, 158, 0.14);
  color: var(--ink-faint);
}

.small-chip.warn {
  background: rgba(255, 215, 106, 0.22);
  color: #8f6117;
}

.support-active,
.reward-box.active {
  border-color: rgba(255, 179, 69, 0.34);
  box-shadow:
    0 16px 28px rgba(255, 189, 81, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.reward-row {
  flex-wrap: wrap;
  gap: 12px;
}

.reward-box {
  flex: 1 1 calc(14.285% - 12px);
  min-width: 110px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 20px;
}

.reward-box span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.reward-box.claimed {
  opacity: 0.74;
}

.sign-summary,
.result-grid {
  display: grid;
  gap: 14px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.ui-sprite-icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background-color: rgba(233, 243, 250, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 16px rgba(19, 50, 73, 0.12);
}

.meter-track,
.mini-meter {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(21, 49, 69, 0.12), rgba(21, 49, 69, 0.18));
  box-shadow: inset 0 2px 4px rgba(8, 18, 30, 0.12);
}

.mini-meter {
  height: 10px;
}

.meter-fill,
.mini-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 227, 132, 0.98), rgba(255, 165, 68, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  box-shadow: 0 0 18px rgba(255, 190, 76, 0.28);
  transition: width 120ms linear;
}

.result-card .menu-actions,
.guide-card .menu-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.floating-topbar {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  z-index: 7;
  align-items: flex-start;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-tag {
  position: relative;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 304px;
  min-width: 304px;
  min-height: 112px;
  padding: 14px 28px 18px 48px;
  filter: drop-shadow(0 14px 22px rgba(46, 18, 78, 0.22));
}

.brand-tag span,
.route-pill span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-tag strong,
.route-pill strong {
  color: var(--ink-strong);
  font-size: 30px;
  line-height: 1;
}

.brand-tag[data-ui-skin="titleRibbon"] span {
  color: rgba(255, 236, 176, 0.94);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 10px rgba(49, 15, 82, 0.32);
}

.brand-tag[data-ui-skin="titleRibbon"] strong {
  color: #fff8ff;
  font-size: 32px;
  text-shadow: 0 4px 14px rgba(49, 15, 82, 0.4);
}

.route-pill {
  flex-direction: column;
  justify-content: center;
  min-width: 286px;
  min-height: 98px;
  padding: 14px 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 239, 227, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  text-align: right;
}

.route-pill strong {
  font-size: 28px;
}

.floating-topbar {
  display: none;
}

.stage-run-shell {
  pointer-events: none;
}

.stage-run-shell > * {
  pointer-events: auto;
}

.run-hud {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.run-hud .hud-pill {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 18px;
  border-radius: 28px;
  border: 1px solid rgba(180, 223, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(69, 112, 160, 0.74), rgba(34, 62, 105, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(5, 18, 36, 0.22);
  backdrop-filter: blur(10px);
}

.run-hud .hud-pill span {
  font-size: 17px;
  font-weight: 800;
  color: rgba(255, 251, 244, 0.96);
  letter-spacing: 0.03em;
}

.run-hud .hud-pill strong {
  margin-left: auto;
  font-size: 28px;
  line-height: 1;
}

.hud-pill-bonus {
  top: 18px;
  left: 18px;
  min-width: 320px;
}

.hud-pill-bonus strong {
  color: #59e6ff;
}

.hud-pill-distance {
  top: 18px;
  left: 50%;
  min-width: 244px;
  transform: translateX(-50%);
}

.hud-pill-distance strong {
  color: #ffe17a;
}

.hud-pill-coins {
  top: 18px;
  right: 18px;
  min-width: 156px;
}

.hud-pill-coins strong {
  color: #ffd56d;
}

.hud-pill-energy {
  left: 50%;
  bottom: 12px;
  width: min(540px, calc(100% - 360px));
  min-width: 320px;
  padding: 10px 20px 10px 10px;
  transform: translateX(-50%);
}

.hud-energy-medal {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 235, 156, 0.62);
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 254, 235, 0.94), rgba(255, 226, 92, 0.9) 42%, rgba(201, 110, 16, 0.95) 100%);
  color: #5b3413;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 10px 22px rgba(12, 23, 42, 0.24);
}

.hud-energy-copy {
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
}

.hud-energy-meter {
  height: 22px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 34, 0.52);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.08);
}

.hud-pill-energy strong {
  margin-left: 0;
  text-align: center;
  color: #fff9f0;
  font-size: 22px;
}

.combo-pill,
.alert-pill {
  display: none !important;
}

.touch-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 18px;
  padding-right: calc(18px + env(safe-area-inset-right));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  padding-left: calc(18px + env(safe-area-inset-left));
  pointer-events: none;
}

.touch-controls-left,
.touch-controls-right {
  display: flex;
  pointer-events: none;
}

.touch-controls-left {
  align-items: flex-end;
}

.touch-controls-right {
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.touch-btn-slide,
.touch-btn-jump,
.touch-btn-skill {
  pointer-events: auto;
}

.menu-active .touch-controls,
.menu-active .floating-topbar,
.menu-active .run-hud {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

.run-active .touch-controls,
.run-active .floating-topbar,
.run-active .run-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

[data-ui-skin] {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
}

button[data-ui-skin] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  user-select: none;
  color: #fffdf7;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 6px rgba(34, 27, 19, 0.42);
  transform: translateY(0);
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

button[data-ui-skin]:hover {
  filter: brightness(1.04) saturate(1.03);
}

button[data-ui-skin]:active:not(:disabled) {
  transform: translateY(4px) scale(0.985);
}

button.touch-btn-skill {
  transform: none;
}

button.touch-btn-skill:active:not(:disabled) {
  transform: translateY(4px) scale(0.985);
}

.login-start-btn,
.login-register-btn,
#startRunBtn,
.cta-btn,
.secondary-btn,
.ghost-btn,
.stack-action,
.utility-btn,
.home-tab-btn,
.selection-chip {
  min-height: 88px;
}

.login-start-btn,
.login-register-btn,
#startRunBtn {
  min-width: 250px;
  padding: 0 30px 12px;
  font-size: 30px;
}

.utility-btn,
.ghost-btn,
.secondary-btn,
.cta-btn,
.stack-action,
.block-btn {
  min-width: 154px;
  padding: 0 24px 12px;
  font-size: 22px;
}

.utility-btn {
  min-width: 114px;
  min-height: 74px;
  padding: 0 18px 10px;
  font-size: 19px;
}

.home-tab-btn {
  min-width: 92px;
  min-height: 82px;
  padding: 0 12px 14px;
  font-size: 18px;
}

.selection-chip {
  width: 100%;
  min-height: 94px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 18px 16px;
  text-align: left;
}

.selection-chip strong {
  margin-top: 8px;
  font-size: 24px;
}

.touch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fffef6;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 8px rgba(12, 22, 32, 0.48);
  filter: drop-shadow(0 12px 18px rgba(7, 20, 40, 0.22));
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.touch-btn:active:not(:disabled) {
  transform: translateY(4px) scale(0.98);
}

.touch-btn-slide,
.touch-btn-jump {
  width: 136px;
  height: 136px;
  padding: 0;
}

.touch-btn-skill {
  width: 132px;
  height: 78px;
  font-size: 18px;
  padding-bottom: 6px;
  margin: 0;
}

.touch-btn[data-ui-skin="controlSlide"] {
  justify-content: center;
}

.touch-btn[data-ui-skin="controlJump"] {
  justify-content: center;
}

.touch-btn[data-ui-skin="controlSkill"] {
  justify-content: center;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.3), rgba(8, 24, 38, 0.76)),
    var(--home-bg) center / cover no-repeat;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
}

.login-screen::before {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 243, 180, 0.22), rgba(255, 243, 180, 0) 22%),
    radial-gradient(circle at 50% 82%, rgba(125, 214, 255, 0.12), rgba(125, 214, 255, 0) 28%);
}

.login-screen::after {
  backdrop-filter: blur(10px);
}

.login-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.login-content {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  min-height: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 24px;
  margin: 0 auto;
  padding:
    max(24px, env(safe-area-inset-top))
    18px
    calc(24px + env(safe-area-inset-bottom));
}

.login-panel {
  width: min(92vw, 540px);
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(11, 28, 44, 0.58), rgba(11, 28, 44, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  box-shadow: 0 20px 46px rgba(6, 17, 28, 0.34);
  backdrop-filter: blur(14px);
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: rgba(255, 247, 228, 0.92);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.login-input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink-strong);
  box-shadow: inset 0 2px 4px rgba(12, 31, 46, 0.08);
}

.login-input:focus {
  border-color: rgba(121, 216, 255, 0.74);
  box-shadow: 0 0 0 4px rgba(121, 216, 255, 0.18);
}

.login-status {
  min-height: 24px;
  margin: 0;
  color: rgba(244, 250, 255, 0.88);
  font-size: 15px;
  line-height: 1.55;
}

.login-status[data-tone="warn"] {
  color: #ffd2bc;
}

.login-status[data-tone="good"] {
  color: #d2ffe6;
}

.login-status[data-tone="info"] {
  color: rgba(244, 250, 255, 0.88);
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-actions .login-start-btn,
.login-actions .login-register-btn {
  min-width: 0;
  width: 100%;
  font-size: 28px;
}

.login-subactions {
  display: flex;
  justify-content: center;
}

.login-admin-btn {
  min-width: 188px;
  min-height: 76px;
  padding: 0 22px 12px;
  font-size: 20px;
}

.game-title {
  font-size: clamp(72px, 9vw, 126px);
  color: #fffaf0;
  text-shadow:
    0 4px 0 #c66d1a,
    0 10px 0 #9b4e00,
    0 26px 36px rgba(5, 15, 24, 0.34);
  letter-spacing: 0.08em;
}

.login-ready-ribbon {
  width: 280px;
  height: 116px;
  opacity: 0.96;
  filter: drop-shadow(0 18px 24px rgba(13, 31, 44, 0.24));
}

.overlay {
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(8, 18, 30, 0.48);
  backdrop-filter: blur(10px);
}

.overlay.show {
  display: flex;
}

.overlay-card {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(249, 242, 229, 0.92));
}

.overlay-card p,
.rotate-card p {
  color: var(--ink);
}

.guide-card {
  width: min(92%, 720px);
}

.result-card {
  width: min(94%, 920px);
}

.toast-layer {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 12;
  display: grid;
  gap: 12px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 28, 44, 0.86);
  color: #f4fbff;
  box-shadow: 0 12px 24px rgba(7, 16, 26, 0.34);
  animation: toast-pop 240ms ease;
}

.toast.good {
  background: rgba(24, 92, 72, 0.9);
}

.toast.warn {
  background: rgba(122, 62, 36, 0.92);
}

@keyframes toast-pop {
  from {
    opacity: 0;
    transform: translate3d(0, -12px, 0) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(8, 18, 30, 0.86);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.rotate-card {
  width: min(90vw, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-radius: 28px;
  text-align: center;
}

.rotate-card strong {
  color: #fff8ef;
  font-size: 28px;
  line-height: 1.1;
}

.rotate-phone {
  width: 72px;
  height: 118px;
  border-radius: 22px;
  border: 4px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(121, 216, 255, 0.8), rgba(43, 147, 222, 0.86)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: rotate(-90deg);
  animation: rotatePrompt 1.6s ease-in-out infinite;
}

.rotate-action-btn {
  min-width: 220px;
  min-height: 74px;
  font-size: 20px;
}

body.mobile-portrait-blocked {
  overflow: hidden;
  touch-action: none;
}

body.mobile-portrait-blocked .rotate-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-portrait-blocked #loginScreen,
body.mobile-portrait-blocked .game-shell {
  filter: blur(4px);
}

@keyframes rotatePrompt {
  0%,
  100% {
    transform: rotate(-90deg) translateX(0);
  }

  50% {
    transform: rotate(0deg) translateX(0);
  }
}

@media (max-width: 1380px) {
  .home-main {
    grid-template-columns: minmax(0, 1.22fr) minmax(250px, 0.78fr);
  }

  .hero-stage-copy {
    max-width: 62%;
  }

  .hud-pill-bonus {
    min-width: 272px;
  }

  .hud-pill-distance {
    min-width: 216px;
  }

  .hud-pill-energy {
    width: min(500px, calc(100% - 320px));
  }
}

@media (max-width: 1120px) {
  .home-screen {
    padding: 20px 20px 18px;
  }

  .home-topbar,
  .floating-topbar {
    padding: 12px 14px;
  }

  .hero-stage {
    padding: 26px 24px 22px;
  }

  .hero-stage-ring {
    width: 216px;
    height: 216px;
  }

  .hero-stage-copy {
    max-width: 68%;
  }

  .selection-row {
    gap: 10px;
  }

  .selection-chip strong {
    font-size: 20px;
  }

  .hud-pill-bonus {
    min-width: 236px;
  }

  .hud-pill-distance {
    min-width: 192px;
  }

  .hud-pill-coins {
    min-width: 132px;
  }

  .hud-pill-energy {
    width: min(460px, calc(100% - 260px));
  }
}

@media (max-width: 900px) {
  .home-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mode-column {
    justify-items: stretch;
  }

  .summary-stat,
  #startRunBtn {
    width: 100%;
  }

  .hero-stage-copy {
    max-width: 100%;
  }

  .hero-stage-ring {
    width: 180px;
    height: 180px;
    right: 20px;
    bottom: 20px;
  }

  .stats-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-box {
    flex: 1 1 calc(25% - 12px);
  }
}

@media (max-width: 720px) {
  .game-shell {
    border-radius: 0;
  }

  .home-screen {
    padding: 16px;
    gap: 14px;
  }

  .home-topbar,
  .floating-topbar,
  .home-page-head,
  .stack-meta,
  .menu-actions {
    flex-wrap: wrap;
  }

  .resource-rail {
    width: 100%;
    justify-content: space-between;
  }

  .resource-pill {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }

  .home-dock {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .home-tab-btn {
    flex: 0 0 112px;
  }

  .selection-row {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .reward-box {
    flex: 1 1 calc(50% - 12px);
  }

  .run-hud .hud-pill {
    min-height: 56px;
    padding: 10px 14px;
  }

  .run-hud .hud-pill span {
    font-size: 15px;
  }

  .run-hud .hud-pill strong {
    font-size: 24px;
  }

  .hud-pill-bonus,
  .hud-pill-distance,
  .hud-pill-coins {
    top: 16px;
  }

  .hud-pill-bonus {
    left: 16px;
    min-width: 176px;
  }

  .hud-pill-distance {
    min-width: 152px;
  }

  .hud-pill-coins {
    right: 16px;
    min-width: 108px;
  }

  .hud-pill-energy {
    bottom: 12px;
    width: min(360px, calc(100% - 184px));
    min-width: 236px;
    padding-right: 14px;
  }

  .hud-energy-medal {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .touch-btn-slide,
  .touch-btn-jump {
    width: 120px;
    height: 120px;
    font-size: 20px;
  }

  .touch-btn-skill {
    width: 120px;
    height: 70px;
    font-size: 16px;
  }

  .login-panel {
    width: min(92vw, 460px);
    padding: 18px;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .login-actions .login-start-btn,
  .login-actions .login-register-btn,
  .login-admin-btn {
    font-size: 22px;
  }
}

@container (max-width: 900px) {
  .home-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mode-column {
    justify-items: stretch;
  }

  .summary-stat,
  #startRunBtn {
    width: 100%;
  }

  .hero-stage-copy {
    max-width: 100%;
  }

  .hero-stage-ring {
    width: 180px;
    height: 180px;
    right: 20px;
    bottom: 20px;
  }

  .stats-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-box {
    flex: 1 1 calc(25% - 12px);
  }
}

@container (max-width: 720px) {
  .game-shell {
    border-radius: 0;
  }

  .home-screen {
    padding: 16px;
    gap: 14px;
  }

  .home-topbar,
  .floating-topbar,
  .home-page-head,
  .stack-meta,
  .menu-actions {
    flex-wrap: wrap;
  }

  .resource-rail {
    width: 100%;
    justify-content: space-between;
  }

  .resource-pill {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }

  .home-dock {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .home-tab-btn {
    flex: 0 0 112px;
  }

  .selection-row {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .reward-box {
    flex: 1 1 calc(50% - 12px);
  }

  .run-hud .hud-pill {
    min-height: 56px;
    padding: 10px 14px;
  }

  .run-hud .hud-pill span {
    font-size: 15px;
  }

  .run-hud .hud-pill strong {
    font-size: 24px;
  }

  .hud-pill-bonus,
  .hud-pill-distance,
  .hud-pill-coins {
    top: 16px;
  }

  .hud-pill-bonus {
    left: 16px;
    min-width: 176px;
  }

  .hud-pill-distance {
    min-width: 152px;
  }

  .hud-pill-coins {
    right: 16px;
    min-width: 108px;
  }

  .hud-pill-energy {
    bottom: 12px;
    width: min(360px, calc(100% - 184px));
    min-width: 236px;
    padding-right: 14px;
  }

  .hud-energy-medal {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .touch-btn-slide,
  .touch-btn-jump {
    width: 120px;
    height: 120px;
    font-size: 20px;
  }

  .touch-btn-skill {
    width: 120px;
    height: 70px;
    font-size: 16px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .login-content {
    align-content: start;
    gap: 14px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .game-title {
    font-size: clamp(44px, 7vw, 76px);
  }

  .login-ready-ribbon {
    width: 208px;
    height: 86px;
  }

  .login-panel {
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
  }

  .login-field {
    gap: 6px;
  }

  .login-input {
    min-height: 50px;
  }

  .login-status {
    min-height: 20px;
    font-size: 13px;
    line-height: 1.4;
  }

  .login-actions {
    gap: 10px;
  }

  .login-actions .login-start-btn,
  .login-actions .login-register-btn {
    min-height: 72px;
    font-size: 22px;
  }

  .home-screen {
    padding: 12px;
    gap: 10px;
  }

  .home-topbar {
    gap: 10px;
    padding: 10px 12px;
  }

  .player-avatar {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .player-meta strong {
    font-size: 16px;
  }

  .player-meta span {
    font-size: 12px;
  }

  .resource-rail {
    gap: 8px;
  }

  .resource-pill {
    min-height: 50px;
    padding: 0 14px 0 48px;
  }

  .resource-pill::before {
    left: 12px;
    width: 26px;
    height: 26px;
  }

  .resource-pill strong {
    font-size: 18px;
  }

  .utility-btn {
    min-width: 98px;
    min-height: 62px;
    font-size: 17px;
  }

  .home-main {
    gap: 12px;
  }

  .hero-stage {
    padding: 18px 18px 16px;
  }

  .hero-stage-copy {
    gap: 8px;
  }

  #menuHint {
    font-size: 14px;
    line-height: 1.45;
  }

  .selection-row {
    margin-top: 12px;
    gap: 8px;
  }

  .selection-chip {
    min-height: 74px;
    padding: 10px 14px 12px;
  }

  .selection-chip strong {
    margin-top: 6px;
    font-size: 20px;
  }

  .mode-column {
    gap: 12px;
  }

  .summary-stat {
    min-width: 0;
    padding: 12px 14px;
  }

  .summary-stat strong {
    font-size: 28px;
  }

  #startRunBtn {
    min-width: 0;
    min-height: 74px;
    padding: 0 24px 10px;
    font-size: 26px;
  }

  .home-dock {
    gap: 8px;
    padding: 8px 10px 6px;
  }

  .home-tab-btn {
    min-height: 68px;
    padding: 0 10px 10px;
    font-size: 16px;
  }

  .overlay-card {
    max-height: min(88%, 540px);
    padding: 22px;
  }

  .home-page-head h2,
  .overlay-card h2,
  .card-head h2 {
    font-size: 28px;
  }

  .run-hud .hud-pill {
    min-height: 52px;
    padding: 10px 12px;
  }

  .run-hud .hud-pill span {
    font-size: 14px;
  }

  .run-hud .hud-pill strong {
    font-size: 22px;
  }

  .hud-pill-bonus,
  .hud-pill-distance,
  .hud-pill-coins {
    top: 12px;
  }

  .hud-pill-bonus {
    left: 12px;
    min-width: 160px;
  }

  .hud-pill-distance {
    min-width: 144px;
  }

  .hud-pill-coins {
    right: 12px;
    min-width: 100px;
  }

  .hud-pill-energy {
    bottom: 8px;
    min-width: 220px;
    padding: 8px 12px 8px 8px;
  }

  .hud-energy-medal {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .hud-energy-meter {
    height: 18px;
  }

  .hud-pill-energy strong {
    font-size: 18px;
  }

  .touch-controls {
    padding-top: 10px;
    padding-right: calc(12px + env(safe-area-inset-right));
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-left: calc(12px + env(safe-area-inset-left));
  }

  .touch-controls-right {
    gap: 10px;
  }

  .touch-btn-slide,
  .touch-btn-jump {
    width: 102px;
    height: 102px;
    font-size: 18px;
  }

  .touch-btn-skill {
    width: 104px;
    height: 62px;
    font-size: 15px;
  }
}

.home-page-menu.menu-page-force-scale {
  gap: 12px;
}

.home-page-menu.menu-page-force-scale .home-main {
  grid-template-columns: minmax(0, 1.38fr) minmax(220px, 0.72fr);
  align-items: stretch;
}

.home-page-menu.menu-page-force-scale .mode-column {
  justify-items: end;
  align-content: end;
}

.home-page-menu.menu-page-force-scale .summary-stat,
.home-page-menu.menu-page-force-scale #startRunBtn {
  width: auto;
}

.home-page-menu.menu-page-force-scale .summary-stat {
  min-width: 214px;
}

.home-page-menu.menu-page-force-scale #startRunBtn {
  min-width: 250px;
}

.home-page-menu.menu-page-force-scale .hero-stage-copy {
  max-width: 56%;
}

.home-page-menu.menu-page-force-scale .selection-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page-menu.menu-page-force-scale .home-dock {
  overflow: hidden;
}
