:root {
  color-scheme: dark;
  --temple: #151006;
  --temple-2: #24190b;
  --temple-3: #0b1710;
  --panel: #2d2111;
  --panel-2: #382914;
  --stone: #d7bc82;
  --stone-d: #9b7437;
  --line: rgba(222, 184, 103, 0.28);
  --gold: #efbb35;
  --gold-l: #ffe18a;
  --gold-d: #b98313;
  --jade: #169a78;
  --jade-d: #0d6c53;
  --red: #e45436;
  --parch: #f1e3bf;
  --parch-2: #dfca9b;
  --ink: #251b10;
  --ink-2: #6d572e;
  --muted: #96783e;
  --shadow: rgba(0, 0, 0, 0.42);
}

.app-shell[data-theme="aztec"] {
  --temple: #151006;
  --temple-2: #24190b;
  --temple-3: #0b1710;
  --panel: #2d2111;
  --panel-2: #382914;
  --stone: #d7bc82;
  --stone-d: #9b7437;
  --line: rgba(222, 184, 103, 0.28);
  --gold: #efbb35;
  --gold-l: #ffe18a;
  --gold-d: #b98313;
  --jade: #169a78;
  --jade-d: #0d6c53;
  --red: #e45436;
  --parch: #f1e3bf;
  --parch-2: #dfca9b;
  --ink: #251b10;
  --ink-2: #6d572e;
  --muted: #96783e;
  --shadow: rgba(0, 0, 0, 0.42);
}

.app-shell[data-theme="temple"] {
  --temple: #10181b;
  --temple-2: #1d2522;
  --temple-3: #0a1516;
  --panel: #2f2518;
  --panel-2: #3d2e1a;
  --stone: #d6b47c;
  --stone-d: #8c6730;
  --line: rgba(214, 180, 124, 0.3);
  --gold: #f0b72d;
  --gold-l: #ffe28a;
  --gold-d: #b77914;
  --jade: #168f7c;
  --jade-d: #07544d;
  --red: #f05a3e;
  --parch: #f0dfb3;
  --parch-2: #d9c28e;
  --ink: #21180f;
  --ink-2: #69512a;
  --muted: #9b7b40;
  --shadow: rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 48% 52%, rgba(34, 77, 47, 0.2), transparent 28rem),
    linear-gradient(135deg, #172214 0%, #211509 48%, #120d06 100%);
  color: var(--parch);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(54, 40, 19, 0.84);
  color: var(--parch);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0.7rem 1rem;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}

button:hover {
  border-color: var(--gold);
  color: var(--gold-l);
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.view {
  width: 100vw;
  height: 100vh;
}

.view[hidden] {
  display: none !important;
}

.screen {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 221, 133, 0.035), transparent 12rem),
    var(--temple);
  border-radius: 0 0 22px 22px;
}

.menu-frame,
.levels-frame,
.settings-frame,
.game-frame,
.over-bg {
  position: relative;
  width: 100%;
  height: 100%;
}

.menu-frame {
  --menu-scale: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(61, 46, 26, 0.9) 0, rgba(36, 26, 15, 0.72) 55%, rgba(19, 13, 6, 0.96) 100%),
    #0a0d08;
}

.app-shell[data-theme="temple"] .menu-frame {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(43, 65, 62, 0.88) 0, rgba(31, 35, 25, 0.76) 55%, rgba(9, 16, 17, 0.98) 100%),
    #080d0e;
}

.menu-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.48) 100%);
}

.menu-board {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  border-radius: 22px;
  background:
    var(--theme-menu-background, radial-gradient(90% 75% at 50% 30%, #3d2e1a 0, #241a0f 55%, #130d06 100%));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 50px 130px -28px rgba(0, 0, 0, 0.8);
  transform: scale(var(--menu-scale));
  transform-origin: center center;
}

.menu-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 73%, rgba(132, 45, 28, 0.52) 0 74px, rgba(132, 45, 28, 0.2) 108px, transparent 140px),
    radial-gradient(circle at 84% 26%, rgba(39, 82, 45, 0.56) 0 64px, rgba(39, 82, 45, 0.2) 104px, transparent 138px),
    radial-gradient(circle at 74% 72%, rgba(143, 106, 42, 0.38) 0 54px, rgba(143, 106, 42, 0.14) 86px, transparent 118px),
    radial-gradient(ellipse at 50% 43%, transparent 0 240px, rgba(0, 0, 0, 0.26) 640px);
  filter: blur(6px);
}

.app-shell[data-theme="temple"] .menu-board[style*="--theme-menu-background"]::after {
  background: radial-gradient(ellipse at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.34) 100%);
  filter: none;
}

.app-shell[data-theme="temple"] .menu-board[style*="--theme-menu-background"],
.app-shell[data-theme="temple"] .levels-frame[style*="--theme-menu-background"] {
  background-position: 50% 50%;
}

.menu-top,
.screen-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.menu-top {
  padding: 24px 32px;
}

.brand-lockup,
.screen-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-word,
.screen-top h1,
.world-heading h2 {
  color: var(--gold-l);
  font-weight: 1000;
  letter-spacing: 0;
}

.brand-word {
  font-size: 17px;
}

.logo-marbles {
  display: flex;
  align-items: center;
}

.logo-marbles--small {
  width: auto;
}

.hero-emblem {
  justify-content: center;
  margin-bottom: 2px;
}

.logo-marble {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-left: -10px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6), inset 0 -4px 7px rgba(0, 0, 0, 0.4);
}

.logo-marble--sprite {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-emblem .logo-marble {
  width: 44px;
  height: 44px;
  margin-left: -13px;
  animation: marble-wave 2.6s ease-in-out infinite;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 -5px 9px rgba(0, 0, 0, 0.35);
}

.hero-emblem .logo-marble:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-emblem .logo-marble:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-emblem .logo-marble:nth-child(4) {
  animation-delay: 0.6s;
}

.hero-emblem .logo-marble:nth-child(5) {
  animation-delay: 0.8s;
}

.hero-emblem .logo-marble:nth-child(6) {
  animation-delay: 1s;
}

@keyframes marble-wave {
  50% {
    transform: translateY(-7px);
  }
}

.logo-marble:first-child {
  margin-left: 0;
}

.m-blue {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #4f96ff, #1c5fd0 66%, #0b3a8f);
}

.m-red {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #ff6a4a, #d9482b 66%, #8f2412);
}

.m-green {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #3fd39b, #12996f 66%, #0a5a41);
}

.m-amber {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #ffd36b, #eba51e 66%, #9c6e10);
}

.m-purple {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #b985f0, #8e4fd0 66%, #54268f);
}

.m-teal {
  background: radial-gradient(circle at 33% 27%, #fff 0, rgba(255, 255, 255, 0) 36%), radial-gradient(circle at 50% 55%, #56e0e6, #12b3bc 66%, #0a6d73);
}

.coin-chip,
.top-chip,
.level-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(54, 40, 19, 0.7);
  color: var(--gold-l);
  font-size: 0.78rem;
  font-weight: 1000;
  padding: 0.55rem 0.8rem;
  text-transform: uppercase;
}

.menu-top .coin-chip {
  border-color: #4a3a22;
  background: linear-gradient(180deg, #342a1b, #241b10);
  color: var(--parch);
  font-size: 14px;
  padding: 7px 15px 7px 11px;
  box-shadow: inset 0 1px 0 rgba(246, 215, 134, 0.14);
}

.logo-marbles--small .logo-marble {
  width: 18px;
  height: 18px;
  margin-left: -6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.logo-marble--sprite {
  background: transparent;
  background-image: var(--logo-marble-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.hero-emblem .logo-marble--sprite,
.logo-marbles--small .logo-marble--sprite {
  box-shadow: none;
}

.menu-center {
  position: relative;
  flex: 1;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  padding-bottom: 26px;
  text-align: center;
}

.sunstone {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(232, 184, 75, 0.16) 0 3deg, transparent 3deg 9deg);
  mask: radial-gradient(circle, transparent 30%, #000 34%, #000 47%, transparent 56%);
  opacity: 0.8;
  animation: spin 60s linear infinite;
  transform: translate(-50%, -58%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -58%) rotate(360deg);
  }
}

.sunring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 300px;
  height: 300px;
  border: 2px solid rgba(232, 184, 75, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(232, 184, 75, 0.06), inset 0 0 40px rgba(232, 184, 75, 0.08);
  transform: translate(-50%, -58%);
}

.app-shell[data-theme="temple"] .sunstone {
  opacity: 0.62;
  animation-name: spin-centered;
  mask: radial-gradient(circle, #000 0 50%, transparent 60%);
  transform: translate(-50%, -50%);
}

.app-shell[data-theme="temple"] .sunring {
  display: none;
}

@keyframes spin-centered {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.menu-center h1 {
  z-index: 1;
  background: linear-gradient(180deg, #f8e2a0, #d69b28);
  background-clip: text;
  color: transparent;
  font-size: 70px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.5);
}

.menu-title.menu-title--theme-image {
  width: 560px;
  height: 166px;
  margin: -26px 0 -34px;
  background: var(--menu-logo-image) center / contain no-repeat;
  color: transparent;
  text-shadow: none;
}

.app-shell[data-theme="temple"] .hero-emblem {
  z-index: 3;
  margin-bottom: -96px;
  transform: translateY(-20px);
}

.app-shell[data-theme="temple"] .hero-emblem .logo-marble {
  width: 38px;
  height: 38px;
  margin-left: -11px;
}

.app-shell[data-theme="temple"] .menu-title.menu-title--theme-image {
  filter:
    drop-shadow(-18px 18px 13px rgba(0, 0, 0, 0.52))
    drop-shadow(18px 18px 13px rgba(0, 0, 0, 0.42))
    drop-shadow(0 22px 18px rgba(0, 0, 0, 0.34));
}

.menu-subtitle {
  z-index: 1;
  margin-top: -2px;
  color: var(--parch-2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.app-shell[data-theme="temple"] .menu-subtitle {
  margin-top: 28px;
}

.menu-actions,
.menu-secondary-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.menu-actions {
  margin-top: 0;
}

.menu-info-actions {
  margin-top: -8px;
}

.menu-board[data-loading-assets="true"] .menu-actions,
.menu-board[data-loading-assets="true"] .menu-secondary-actions,
.menu-board[data-loading-assets="true"] .continue-card {
  display: none;
}

.asset-loading {
  position: relative;
  z-index: 1;
  display: grid;
  width: 292px;
  margin-top: 18px;
  gap: 8px;
  justify-items: center;
}

.asset-loading-meter {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 221, 128, 0.36);
  border-radius: 999px;
  background: rgba(28, 18, 6, 0.58);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.55), 0 0 16px rgba(214, 155, 40, 0.12);
}

.asset-loading-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #19a78c, #f6cf61);
  box-shadow: 0 0 12px rgba(246, 207, 97, 0.28);
  transition: width 0.22s ease;
}

.asset-loading-copy {
  color: var(--gold-l);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.btn-pri,
.btn-play {
  border-color: var(--gold-d);
  background: linear-gradient(180deg, #f6d073, #d69b28);
  color: #3a2a10;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(120, 80, 10, 0.4);
}

.btn-play {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 17px 50px;
  text-transform: uppercase;
  box-shadow: 0 12px 26px -8px rgba(214, 155, 40, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(120, 80, 10, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-play:hover {
  color: #3a2a10;
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -8px rgba(214, 155, 40, 0.7), inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(120, 80, 10, 0.4);
}

.btn-play:active {
  transform: translateY(0);
}

.btn-play .lvtag {
  margin-left: 2px;
  border-left: 1px solid rgba(58, 42, 16, 0.4);
  padding-left: 12px;
  font-weight: 700;
  font-size: 13px;
  opacity: 0.8;
}

.btn-sec {
  min-width: 0;
  min-height: 0;
}

.menu-board .btn-sec {
  display: flex;
  align-items: center;
  gap: 9px;
  border-color: #5a4529;
  border-radius: 12px;
  background: linear-gradient(180deg, #342a1b, #241b10);
  color: var(--parch);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 13px 24px;
  box-shadow: inset 0 1px 0 rgba(246, 215, 134, 0.12);
  text-transform: uppercase;
}

.menu-board .btn-sec:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, #3d3120, #2a2013);
  color: var(--parch);
}

.continue-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  width: auto;
  min-height: 0;
  margin-top: 2px;
  padding: 14px 20px;
  border-color: #4a3a22;
  border-radius: 16px;
  background: linear-gradient(180deg, #342a1b, #241b10);
  text-align: left;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(246, 215, 134, 0.12);
}

.continue-card.continue-card--theme-image {
  width: 444px;
  min-height: 136px;
  margin-top: -4px;
  padding: 33px 40px 24px 124px;
  border: 0;
  border-radius: 0;
  background: var(--continue-card-image) center / contain no-repeat;
  box-shadow: none;
}

.continue-card.continue-card--theme-image:hover {
  color: var(--parch);
}

.continue-card.continue-card--theme-image .continue-icon {
  display: none;
}

.continue-card.continue-card--theme-image .continue-text {
  min-width: 0;
}

.continue-card.continue-card--theme-image .continue-copy {
  color: #d6b47c;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.65);
}

.continue-card.continue-card--theme-image strong {
  color: #fff2bd;
  font-size: 15px;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.68);
}

.continue-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--jade), var(--jade-d));
  color: #eafff6;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.continue-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.continue-copy {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.continue-card strong {
  color: var(--parch);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.menu-footer-stack {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: translateX(-50%);
}

.menu-footer {
  margin: 0;
  color: #6b5735;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-star-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(196, 147, 47, 0.42);
  border-radius: 999px;
  background: rgba(34, 23, 10, 0.32);
  color: #a98b50;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.82;
  transition: border-color 0.16s, background 0.16s, color 0.16s, opacity 0.16s;
}

.project-star-link:hover,
.project-star-link:focus-visible {
  border-color: rgba(255, 211, 107, 0.72);
  background: rgba(68, 46, 18, 0.42);
  color: #ffe49b;
  opacity: 1;
}

.project-star-link:focus-visible {
  outline: 2px solid rgba(255, 211, 107, 0.54);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
#gameCanvas:focus-visible {
  outline: 3px solid rgba(255, 211, 107, 0.78);
  outline-offset: 3px;
}

.app-shell[data-theme="temple"] .menu-footer {
  color: #f3d184;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 14px rgba(54, 28, 8, 0.65);
}

.app-shell[data-theme="temple"] .project-star-link {
  border-color: rgba(243, 209, 132, 0.5);
  background: rgba(24, 15, 7, 0.38);
  color: #f3d184;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.continue-stars {
  display: flex;
  gap: 3px;
  margin-left: 10px;
  color: var(--gold);
  font-size: 16px;
}

.menu-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.menu-icon--play,
.menu-icon--continue {
  width: 20px;
  height: 20px;
}

.menu-icon--play::before,
.menu-icon--continue::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.menu-icon--temples {
  background:
    linear-gradient(currentColor 0 0) 2px 2px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 11px 2px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 2px 11px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 11px 11px / 5px 5px no-repeat;
}

.menu-icon--settings {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.menu-icon--settings::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.menu-icon--settings::after {
  content: "";
  position: absolute;
  inset: -3px;
  background: repeating-conic-gradient(currentColor 0 12deg, transparent 12deg 45deg);
  mask: radial-gradient(circle, transparent 0 9px, #000 9px 12px, transparent 12px);
}

.menu-icon--how-to-play {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.menu-icon--how-to-play::before {
  content: "?";
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
}

.menu-icon--credits::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 88%, 50% 68%, 22% 88%, 33% 55%, 5% 35%, 39% 35%);
}

.eyebrow,
.set-h,
.setting-subtitle,
.level-label,
.world-heading p,
.over-eyebrow,
.over-score-l {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen-top {
  border-bottom: 1px solid rgba(215, 188, 130, 0.16);
  background: linear-gradient(180deg, #2a2013, #221a10);
  padding: 20px 26px;
}

.app-shell[data-theme="temple"] .screen-top {
  border-bottom: 0;
  background: transparent;
}

.screen-top h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #5a4529;
  border-radius: 12px;
  background: linear-gradient(180deg, #3a2e1c, #2a2013);
  color: var(--gold-l);
  font-size: 0;
  box-shadow: none;
  flex: none;
  transition: border-color .16s;
}

.icon-button:hover {
  border-color: var(--gold);
  color: var(--gold-l);
}

.icon-button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: rotate(45deg) translate(1px, -1px);
}

.icon-button--back::before {
  width: 20px;
  height: 20px;
  border: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: none;
}

.levels-view.screen {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: #0a0d08;
}

.levels-frame {
  --menu-scale: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  border-radius: 22px;
  background:
    var(
      --theme-menu-background,
      radial-gradient(120% 90% at 50% 0, rgba(51, 38, 23, 0) 0, #241a0f 60%),
      linear-gradient(180deg, #2a2013, #1c1509)
    );
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 50px 130px -28px rgba(0, 0, 0, 0.8);
  transform: scale(var(--menu-scale));
  transform-origin: center center;
}

.screen-top .top-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border-color: #4a3a22;
  background: #2a2013;
  color: var(--parch);
  font-size: 15px;
  padding: 8px 15px;
}

.world-heading {
  padding: 22px 40px 6px;
}

.world-heading h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.world-heading p {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.temple-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 30px;
  width: calc(100% - 80px);
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

.level-diamond {
  position: relative;
  display: grid;
  grid-template-rows: 86px 15px 14px;
  justify-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 133px;
  border: 0;
  background: transparent;
  color: var(--parch);
  padding: 0;
  text-align: center;
  box-shadow: none;
}

.level-disc {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(215, 188, 130, 0.24);
  border-radius: 18px;
  background: rgba(54, 40, 19, 0.72);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.6);
  transition: transform 160ms ease;
  transform: rotate(45deg);
}

.level-disc > * {
  transform: rotate(-45deg);
}

.level-diamond.done .level-disc,
.level-diamond.available .level-disc {
  border-color: transparent;
  background: linear-gradient(135deg, var(--jade), var(--jade-d));
  box-shadow: 0 10px 20px -8px rgba(14, 107, 80, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.level-diamond.current .level-disc {
  border-color: transparent;
  background: linear-gradient(135deg, #f6d073, #d69b28);
  animation: pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 5px rgba(232, 184, 75, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.level-diamond:not(:disabled):hover .level-disc {
  transform: rotate(45deg) translateY(-3px);
}

.level-diamond:disabled:hover .level-disc {
  transform: rotate(45deg);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 11px rgba(232, 184, 75, 0.07), inset 0 2px 0 rgba(255, 255, 255, 0.4);
  }
}

.level-diamond:disabled {
  opacity: 1;
}

.level-diamond.level-diamond--theme-tile .level-disc {
  width: 112px;
  height: 112px;
  opacity: 1;
  border-color: transparent;
  background: var(--level-tile-image) center / contain no-repeat;
  box-shadow: none;
  transform: none;
}

.level-diamond.level-diamond--theme-tile .level-disc > * {
  transform: none;
}

.level-diamond.level-diamond--theme-tile:not(:disabled):hover .level-disc {
  transform: translateY(-4px) scale(1.03);
}

.level-diamond.level-diamond--theme-tile:disabled:hover .level-disc {
  transform: none;
}

.level-diamond.level-diamond--theme-tile.current .level-disc {
  animation: none;
  box-shadow: none;
}

.level-diamond.level-diamond--theme-tile.locked .level-lock-icon {
  display: none;
}

.level-number {
  position: relative;
  z-index: 1;
  align-self: center;
  color: var(--parch);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.level-diamond.current .level-number {
  color: var(--ink);
}

.level-diamond.level-diamond--theme-tile .level-number {
  color: #f6d77d;
  text-shadow: 0 2px 0 rgba(33, 20, 9, 0.8), 0 0 8px rgba(0, 0, 0, 0.55);
}

.level-diamond.level-diamond--theme-tile.current .level-number {
  color: #34200e;
  text-shadow: 0 1px 0 rgba(255, 232, 160, 0.5);
}

.level-stars {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  height: 15px;
  color: rgba(151, 120, 62, 0.38);
  line-height: 0;
}

.star-glyph {
  color: rgba(151, 120, 62, 0.38);
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
}

.star-glyph.on {
  color: var(--gold);
}

.level-stars .star-glyph {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 88%, 50% 68%, 22% 88%, 33% 55%, 5% 35%, 39% 35%);
  font-size: 0;
  line-height: 0;
}

.continue-stars .star-glyph {
  width: auto;
  height: auto;
  background: none;
  clip-path: none;
  font-size: 15px;
  line-height: 1;
}

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

.level-lock-icon {
  position: relative;
  z-index: 1;
  align-self: center;
  width: 22px;
  height: 15px;
  margin-top: 0;
  border: 2px solid rgba(215, 188, 130, 0.44);
  border-radius: 4px;
}

.level-lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 16px;
  height: 12px;
  border: 2px solid rgba(215, 188, 130, 0.44);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transform: translateX(-50%);
}

.level-label {
  position: relative;
  z-index: 1;
  align-self: start;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.4px;
}

.level-play-badge {
  position: absolute;
  top: -6px;
  right: 6px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--jade), var(--jade-d));
  color: #eafff6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.level-play-badge::before {
  border-top-width: 4px;
  border-bottom-width: 4px;
  border-left-width: 7px;
}

.level-play-badge.level-play-badge--theme-image {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: var(--level-play-badge-image) center / contain no-repeat;
  color: transparent;
  box-shadow: none;
}

.level-play-badge.level-play-badge--theme-image::before {
  display: none;
}

.app-shell[data-theme="temple"] .level-play-badge.level-play-badge--theme-image {
  top: 12px;
  left: calc(50% + 42px);
  right: auto;
}

.settings-view.screen {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: #0a0d08;
}

.settings-frame {
  --menu-scale: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #2a2013, #1c1509);
  box-shadow: 0 50px 130px -28px rgba(0, 0, 0, 0.8);
  transform: scale(var(--menu-scale));
  transform-origin: center center;
}

.app-shell[data-theme="temple"] .settings-frame {
  background: linear-gradient(180deg, #28312d, #131b1b);
}

.app-shell[data-theme="temple"] .settings-frame[style*="--theme-settings-background"] {
  background: var(--theme-settings-background) center / cover no-repeat;
}

.app-shell[data-theme="temple"] .levels-frame {
  background:
    var(--theme-menu-background, linear-gradient(180deg, #28312d, #131b1b));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.settings-stack.set-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  overflow: auto;
  padding: 24px 40px 48px;
  gap: 18px;
}

.app-shell[data-theme="temple"] .settings-stack.set-body {
  position: absolute;
  left: 50%;
  top: 118px;
  flex: none;
  width: 720px;
  height: 560px;
  max-width: none;
  margin: 0;
  padding: 18px 34px 30px;
  transform: translateX(-50%);
}

.settings-section.set-card {
  width: 100%;
  max-width: 640px;
  border: 1px solid #4a3a22;
  border-radius: 16px;
  background: linear-gradient(180deg, #342a1b, #241b10);
  padding: 8px 22px;
  box-shadow: inset 0 1px 0 rgba(246, 215, 134, 0.1);
}

.app-shell[data-theme="temple"] .settings-section.set-card {
  background: linear-gradient(180deg, #342c20, #1e211d);
}

.set-h {
  margin: 0;
  padding: 16px 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.setting-row.set-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 0;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid #3a2c1a;
}

.set-h + .set-row {
  border-top: 0;
}

.setting-copy.set-rl {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  width: 170px;
}

.setting-copy.set-rl--auto {
  width: auto;
}

.setting-copy .t {
  color: var(--parch);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.setting-subtitle.s {
  color: #8a7346;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
}

.set-ctl {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

input[type="range"].rng {
  flex: 1;
  width: 100%;
  max-width: 300px;
  height: 6px;
  border-radius: 9999px;
  background: #4a3a22;
  accent-color: var(--gold);
  appearance: none;
  outline: none;
}

input[type="range"].rng:focus-visible {
  outline: 3px solid rgba(255, 211, 107, 0.78);
  outline-offset: 6px;
}

input[type="range"].rng::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #f6d073, #d69b28);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  -webkit-appearance: none;
}

input[type="range"].rng::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #f6d073, #d69b28);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.setting-value.rng-val {
  width: 38px;
  color: var(--gold-l);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.set-ctl input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track.toggle {
  position: relative;
  display: inline-block;
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: 9999px;
  background: #4a3a22;
  cursor: pointer;
  transition: background 0.16s ease;
}

.switch-track.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--parch);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: left 0.16s ease;
}

.switch-track.toggle.on,
.set-ctl input[type="checkbox"]:checked + .switch-track.toggle {
  background: var(--jade);
}

.switch-track.toggle.on::after,
.set-ctl input[type="checkbox"]:checked + .switch-track.toggle::after {
  left: 23px;
  background: #fff;
}

.difficulty-segments.seg {
  display: flex;
  background: #241b10;
  border: 1px solid #4a3a22;
  border-radius: 10px;
  padding: 3px;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 330px;
  gap: 8px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border-color: #4a3a22;
  border-radius: 12px;
  background: #241b10;
  color: var(--parch);
  padding: 8px 10px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(246, 215, 134, 0.08);
}

.theme-option:hover {
  border-color: var(--gold);
  color: var(--parch);
}

.theme-option.is-active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(239, 187, 53, 0.22), rgba(22, 154, 120, 0.14));
}

.theme-swatch {
  display: block;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 225, 138, 0.44);
  border-radius: 999px;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.theme-swatch--image {
  border: 0;
  background: var(--theme-icon-image) center / contain no-repeat;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.32);
}

.theme-option[data-theme-option="aztec"] .theme-swatch:not(.theme-swatch--image) {
  background: conic-gradient(from 35deg, #efbb35, #169a78, #24190b, #d7bc82, #efbb35);
}

.theme-option[data-theme-option="temple"] .theme-swatch:not(.theme-swatch--image) {
  background: conic-gradient(from 35deg, #f0b72d, #56e0e6, #10181b, #d6b47c, #f0b72d);
}

.theme-option .theme-swatch--image {
  background: var(--theme-icon-image) center / contain no-repeat;
}

.theme-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.theme-copy strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.theme-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment {
  min-height: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #8a7346;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 7px 18px;
  box-shadow: none;
}

.segment:hover {
  color: #8a7346;
}

.segment.on,
.segment.is-active {
  background: linear-gradient(180deg, #f6d073, #d69b28);
  color: #3a2a10;
}

.segment.on:hover,
.segment.is-active:hover {
  color: #3a2a10;
}

.set-prof {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
}

.set-av {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8e4fd0, #54268f);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.set-danger {
  width: 100%;
  min-height: 0;
  border: 0;
  border-top: 1px solid #3a2c1a;
  border-radius: 0;
  background: none;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  padding: 15px 0;
  text-align: left;
  box-shadow: none;
}

.set-reset-settings {
  width: 100%;
  min-height: 0;
  border: 0;
  border-top: 1px solid #3a2c1a;
  border-radius: 0;
  background: none;
  color: var(--parch);
  font-size: 14px;
  font-weight: 700;
  padding: 15px 0;
  text-align: left;
  box-shadow: none;
}

.set-reset-settings:hover {
  color: var(--gold-l);
}

.set-danger:hover {
  color: var(--red);
}

.gameplay-view.screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  border-radius: 0;
  background: #0a0d08;
}

.game-frame {
  --menu-scale: 1;
  --gameplay-ui-margin: 20px;
  --gameplay-playfield-gutter: 40px;
  --gameplay-ui-margin-x-inner: 26px;
  --gameplay-ui-margin-x: calc(var(--gameplay-playfield-gutter) + var(--gameplay-ui-margin-x-inner));
  position: relative;
  flex: none;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  border-radius: 22px;
  transform: scale(var(--menu-scale));
  transform-origin: center center;
  box-shadow: inset 0 0 0 1px rgba(246, 215, 134, 0.08), inset 0 0 220px 45px rgba(0, 0, 0, 0.62);
}

.game-frame.game-bg {
  background: radial-gradient(100% 80% at 50% 40%, #1f3326 0, #152218 46%, #0c130c 100%);
}

.app-shell[data-theme="temple"] .game-frame.game-bg {
  background: radial-gradient(100% 80% at 50% 40%, #243a3a 0, #152323 48%, #090f10 100%);
}

.temple-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.td-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 60, 0.16), transparent 68%);
  filter: blur(6px);
}

.td-glow.tl {
  top: -90px;
  left: -90px;
}

.td-glow.tr {
  top: -90px;
  right: -90px;
}

.td-sun {
  position: absolute;
  top: 432px;
  left: 50%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(232, 184, 75, 0.13) 0 4deg, transparent 4deg 10deg);
  mask: radial-gradient(circle, transparent 0 30%, #000 34% 48%, transparent 58%);
  opacity: 0.78;
  animation: spin2 90s linear infinite;
  transform: translate(-50%, -50%);
}

.td-vig {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  box-shadow: inset 0 0 220px 50px rgba(0, 0, 0, 0.6);
}

@keyframes spin2 {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--gameplay-ui-margin) var(--gameplay-ui-margin-x);
  z-index: 8;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.hud-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lvl-chip {
  align-self: flex-start;
  padding: 5px 13px;
  border: 1px solid rgba(246, 215, 134, 0.3);
  background: rgba(20, 14, 8, 0.55);
  color: var(--gold-l);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.score {
  color: var(--parch);
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.lives {
  display: flex;
  min-width: 92px;
  justify-content: flex-end;
  color: var(--red);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 46px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.pause-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgba(246, 215, 134, 0.3);
  border-radius: 12px;
  background: rgba(20, 14, 8, 0.55);
  color: var(--gold-l);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  box-shadow: none;
}

.pause-btn:hover {
  border-color: var(--gold);
  color: var(--gold-l);
}

.line-meter {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 8;
  display: grid;
  grid-template-columns: auto 300px;
  align-items: center;
  gap: 9px 12px;
  pointer-events: none;
  transform: translateX(-50%);
}

.lm-label {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  color: rgba(246, 215, 134, 0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.lm-track {
  width: 300px;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(246, 215, 134, 0.15);
  border-radius: 9999px;
  background: rgba(20, 14, 8, 0.55);
}

.lm-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 9999px;
  background: var(--jade);
  transition: width 180ms ease, background 300ms ease;
}

.canvas-stage--full {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: min(100%, 1200px);
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  aspect-ratio: 3 / 2;
  touch-action: none;
}

.prog-wrap {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 8;
  display: flex;
  width: 330px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  transform: translateX(-50%);
}

.prog-label {
  color: rgba(246, 215, 134, 0.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.prog-track {
  width: 330px;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(246, 215, 134, 0.15);
  border-radius: 9999px;
  background: rgba(20, 14, 8, 0.55);
}

.prog-fill {
  display: block;
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 9999px;
  background: linear-gradient(90deg, #d69b28, #f6d786);
  color: transparent;
  line-height: 0;
  white-space: nowrap;
  transition: width 180ms ease;
}

.dock {
  position: absolute;
  bottom: 24px;
  left: var(--gameplay-ui-margin-x);
  z-index: 8;
  display: flex;
  gap: 14px;
}

.pw {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 58px;
  min-width: 58px;
  height: 76px;
  min-height: 76px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--gold-l);
  font-size: 14px;
  padding: 0;
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.pw::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 58px;
  border: 1px solid #5a4529;
  border-radius: 14px;
  background: linear-gradient(180deg, #342a1b, #241b10);
  box-shadow: inset 0 1px 0 rgba(246, 215, 134, 0.12);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pw::before,
.pw-count,
.pw-icon,
.pw-name {
  pointer-events: none;
}

.pw:hover {
  color: var(--gold-l);
  transform: translateY(-2px);
}

.pw:hover::before {
  border-color: var(--gold);
}

.pw-count {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #1a140d;
  border-radius: 9999px;
  background: var(--gold);
  color: #3a2a10;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.pw-icon {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: var(--gold-l);
  font-size: 25px;
  line-height: 1;
}

.pw-name {
  position: absolute;
  bottom: 0;
  left: 50%;
  color: rgba(246, 215, 134, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.pw-active,
.pw[aria-pressed="true"] {
  color: var(--gold-l);
}

.pw-active::before,
.pw[aria-pressed="true"]::before {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(239, 187, 53, 0.2), inset 0 1px 0 rgba(246, 215, 134, 0.18);
}

.pw.empty {
  cursor: not-allowed;
  opacity: 0.4;
}

.pw.empty .pw-count {
  background: #6b5735;
  color: #241b10;
}

.pw:disabled:hover {
  transform: none;
}

.pw:disabled:hover::before {
  border-color: #5a4529;
}

.pw.pw--theme-tile {
  width: 68px;
  min-width: 68px;
  height: 106px;
  min-height: 106px;
}

.pw.pw--theme-tile::before {
  left: 50%;
  width: 68px;
  height: 92px;
  border: 0;
  border-radius: 0;
  background: var(--power-up-image) center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.42));
  transition: filter 160ms ease;
  transform: translateX(-50%);
}

.pw.pw--theme-tile:hover::before {
  border-color: transparent;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.48)) brightness(1.08);
}

.pw.pw--theme-tile .pw-icon {
  opacity: 0;
}

.pw.pw--theme-tile .pw-name {
  bottom: 0;
  opacity: 1;
  color: rgba(246, 215, 134, 0.72);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.66);
}

.pw.pw--theme-tile.pw-active::before,
.pw.pw--theme-tile[aria-pressed="true"]::before {
  border-color: transparent;
  box-shadow: none;
  filter:
    drop-shadow(0 0 8px rgba(240, 183, 45, 0.5))
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5))
    brightness(1.08);
}

.pw.pw--theme-tile.empty {
  opacity: 0.48;
}

.pw.pw--theme-tile.empty .pw-count {
  background: var(--gold);
  color: #3a2a10;
}

.pw.pw--theme-tile:disabled:hover::before {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.42));
}

.menu-board .overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: rgba(10, 8, 4, 0.72);
}

.menu-board .dialog {
  width: 390px;
  max-height: calc(100% - 52px);
  overflow: auto;
  border: 3px solid #b48a3a;
  border-radius: 20px;
  background: linear-gradient(180deg, #efe2c6, #ddc99f);
  color: var(--ink);
  padding: 30px;
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  text-align: center;
  animation: dialog-pop 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-board .dialog.credits {
  width: 440px;
  padding: 26px 28px;
}

@keyframes dialog-pop {
  from {
    transform: scale(0.94);
  }

  to {
    transform: scale(1);
  }
}

.dlg-title {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dlg-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.htlist,
.crlist {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  text-align: left;
}

.htrow {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
}

.htn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6d073, #d69b28);
  color: #3a2a10;
  font-size: 14px;
  font-weight: 1000;
}

.httx {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.httx strong {
  color: var(--ink);
}

.crrow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(155, 116, 55, 0.25);
  padding-bottom: 9px;
}

.crsection {
  margin-top: 20px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0.8px;
  text-align: left;
  text-transform: uppercase;
}

.music-credits-list,
.sfx-credits-list,
.hotkeys-list {
  margin-top: 12px;
}

.music-credit-row .crl,
.sfx-credit-row .crl,
.hotkey-row .crl {
  text-transform: none;
}

.crl {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.crv {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.crfoot {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dlg-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.menu-board .dialog .btn-pri {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border: 0;
  border-radius: 12px;
  color: #3a2a10;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 14px;
  text-transform: uppercase;
}

.overlay {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.62);
}

.pause-backdrop-game {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 56%, transparent 0 14rem, rgba(215, 188, 130, 0.22) 14.2rem 15.2rem, transparent 15.4rem 21rem, rgba(215, 188, 130, 0.16) 21.2rem 22.2rem, transparent 22.4rem),
    radial-gradient(circle at 50% 50%, #173323 0%, #0b1710 65%, #050906 100%);
  filter: brightness(0.55);
}

.app-shell[data-theme="temple"] .pause-backdrop-game {
  background:
    radial-gradient(ellipse at 50% 56%, transparent 0 14rem, rgba(214, 180, 124, 0.22) 14.2rem 15.2rem, transparent 15.4rem 21rem, rgba(86, 224, 230, 0.12) 21.2rem 22.2rem, transparent 22.4rem),
    radial-gradient(circle at 50% 50%, #1d3736 0%, #0d1718 65%, #050808 100%);
}

.pause-card,
.over-card {
  position: relative;
  z-index: 2;
  border: 3px solid var(--gold-d);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--parch), var(--parch-2));
  color: var(--ink);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.38);
  text-align: center;
}

.pause-card {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  justify-items: stretch;
  align-content: start;
  gap: 18px;
  width: min(100% - 48px, 700px);
  min-height: min(calc(100% - 48px), 690px);
  border-radius: 28px;
  padding: 44px 58px 56px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.pause-card h2 {
  font-size: 42px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.pause-meta {
  margin-top: -8px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 22px;
  font-weight: 900;
}

.pause-action-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  height: 76px;
  min-height: 76px;
  border-radius: 18px;
  color: #3a2a10;
  font-size: 28px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pause-action-primary:hover {
  color: #3a2a10;
}

.pause-action-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 70px;
  min-height: 70px;
  border-color: rgba(155, 116, 55, 0.38);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8df, #ead9ad);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 3px 0 rgba(85, 61, 26, 0.2);
}

.pause-action-secondary:hover {
  border-color: var(--gold-d);
  color: var(--ink);
}

.pause-action-icon {
  display: block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: currentColor;
}

.pause-action-icon--restart {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7'/%3E%3Cpath d='M3 4v6h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7'/%3E%3Cpath d='M3 4v6h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pause-action-icon--settings {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.1a3.1 3.1 0 1 0 0-6.2 3.1 3.1 0 0 0 0 6.2Z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.05.05a2.05 2.05 0 1 1-2.9 2.9l-.05-.05a1.7 1.7 0 0 0-1.87-.34 1.7 1.7 0 0 0-1.02 1.56V21a2.05 2.05 0 1 1-4.1 0v-.08a1.7 1.7 0 0 0-1.02-1.56 1.7 1.7 0 0 0-1.87.34l-.05.05a2.05 2.05 0 1 1-2.9-2.9l.05-.05A1.7 1.7 0 0 0 4.4 15a1.7 1.7 0 0 0-1.56-1.02H2.75a2.05 2.05 0 1 1 0-4.1h.08A1.7 1.7 0 0 0 4.4 8.86a1.7 1.7 0 0 0-.34-1.87l-.05-.05a2.05 2.05 0 1 1 2.9-2.9l.05.05a1.7 1.7 0 0 0 1.87.34 1.7 1.7 0 0 0 1.02-1.56V2.8a2.05 2.05 0 1 1 4.1 0v.08a1.7 1.7 0 0 0 1.02 1.56 1.7 1.7 0 0 0 1.87-.34l.05-.05a2.05 2.05 0 1 1 2.9 2.9l-.05.05a1.7 1.7 0 0 0-.34 1.87 1.7 1.7 0 0 0 1.56 1.02h.08a2.05 2.05 0 1 1 0 4.1h-.08A1.7 1.7 0 0 0 19.4 15Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.1a3.1 3.1 0 1 0 0-6.2 3.1 3.1 0 0 0 0 6.2Z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.05.05a2.05 2.05 0 1 1-2.9 2.9l-.05-.05a1.7 1.7 0 0 0-1.87-.34 1.7 1.7 0 0 0-1.02 1.56V21a2.05 2.05 0 1 1-4.1 0v-.08a1.7 1.7 0 0 0-1.02-1.56 1.7 1.7 0 0 0-1.87.34l-.05.05a2.05 2.05 0 1 1-2.9-2.9l.05-.05A1.7 1.7 0 0 0 4.4 15a1.7 1.7 0 0 0-1.56-1.02H2.75a2.05 2.05 0 1 1 0-4.1h.08A1.7 1.7 0 0 0 4.4 8.86a1.7 1.7 0 0 0-.34-1.87l-.05-.05a2.05 2.05 0 1 1 2.9-2.9l.05.05a1.7 1.7 0 0 0 1.87.34 1.7 1.7 0 0 0 1.02-1.56V2.8a2.05 2.05 0 1 1 4.1 0v.08a1.7 1.7 0 0 0 1.02 1.56 1.7 1.7 0 0 0 1.87-.34l.05-.05a2.05 2.05 0 1 1 2.9 2.9l-.05.05a1.7 1.7 0 0 0-.34 1.87 1.7 1.7 0 0 0 1.56 1.02h.08a2.05 2.05 0 1 1 0 4.1h-.08A1.7 1.7 0 0 0 19.4 15Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pause-action-icon--quit {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2v-3'/%3E%3Cpath d='M9 12h12'/%3E%3Cpath d='m17 8 4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2v-3'/%3E%3Cpath d='M9 12h12'/%3E%3Cpath d='m17 8 4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.quit-link {
  display: flex;
  align-items: center;
  align-self: end;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
  box-shadow: none;
}

.quit-link:hover {
  color: var(--red);
}

.over-bg {
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle at 50% 50%, #173323 0%, #0b1710 64%, #050906 100%);
}

.app-shell[data-theme="temple"] .over-bg {
  background: radial-gradient(circle at 50% 50%, #1d3736 0%, #0d1718 64%, #050808 100%);
}

.over-card {
  display: grid;
  justify-items: center;
  width: min(100% - 48px, 520px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 28px;
  padding: 42px 36px 38px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.over-badge {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 20px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 45% 34%, #ffea94 0 18%, #f5c94f 54%, #e3a82f 100%);
  color: var(--ink);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.22), 0 8px 22px rgba(180, 132, 31, 0.24);
}

.over-medal-icon {
  display: block;
  width: 38px;
  height: 38px;
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h12v3h3v2c0 2.5-1.9 4.6-4.4 4.9A5.8 5.8 0 0 1 13 15.9V19h4v2H7v-2h4v-3.1a5.8 5.8 0 0 1-3.6-3C4.9 12.6 3 10.5 3 8V6h3V3Zm12 5V6h-1v4.7c.6-.6 1-1.6 1-2.7ZM6 6H5v2c0 1.1.4 2.1 1 2.7V6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h12v3h3v2c0 2.5-1.9 4.6-4.4 4.9A5.8 5.8 0 0 1 13 15.9V19h4v2H7v-2h4v-3.1a5.8 5.8 0 0 1-3.6-3C4.9 12.6 3 10.5 3 8V6h3V3Zm12 5V6h-1v4.7c.6-.6 1-1.6 1-2.7ZM6 6H5v2c0 1.1.4 2.1 1 2.7V6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.over-card.lose .over-medal-icon {
  background: transparent;
  -webkit-mask: none;
  mask: none;
}

.over-card.lose .over-medal-icon::before {
  content: "X";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-size: 34px;
  font-weight: 1000;
}

.over-title {
  color: var(--ink);
  font-size: 34px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.over-eyebrow {
  color: #9b7437;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.over-score-l {
  margin-top: 0;
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.over-score {
  color: var(--jade-d);
  font-size: 72px;
  font-weight: 1000;
  line-height: 1;
}

.over-stars {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 22px 0 18px;
}

.over-star-glyph {
  display: block;
  width: 58px;
  height: 56px;
  background: rgba(109, 87, 46, 0.28);
  clip-path: polygon(50% 3%, 61% 35%, 95% 35%, 67% 55%, 78% 88%, 50% 68%, 22% 88%, 33% 55%, 5% 35%, 39% 35%);
}

.over-star-glyph.earned {
  background: var(--gold-d);
}

.over-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid rgba(155, 116, 55, 0.45);
  border-radius: 18px;
  background: rgba(255, 248, 223, 0.18);
}

.stat {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-height: 86px;
  place-items: center;
  padding: 20px 8px 18px;
  border-right: 1px solid rgba(155, 116, 55, 0.45);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.stat__label {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.over-actions {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 36px;
}

.over-actions button {
  width: 100%;
}

.over-actions .over-action-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 64px;
  min-height: 64px;
  border-radius: 18px;
  font-size: 24px;
  font-weight: 1000;
  text-transform: uppercase;
}

.over-actions .over-action-primary:hover {
  color: #3a2a10;
}

.over-actions .over-action-secondary {
  height: 58px;
  min-height: 58px;
  border-color: rgba(155, 116, 55, 0.38);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8df, #ead9ad);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 3px 0 rgba(85, 61, 26, 0.2);
}

.over-actions .over-action-secondary:hover {
  border-color: var(--gold-d);
  color: var(--ink);
}

@media (max-width: 760px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell,
  .view,
  .screen {
    min-height: 100vh;
    height: auto;
  }

  .menu-view.screen {
    height: 100vh;
    min-height: 100vh;
  }

  .menu-frame {
    display: flex;
    min-height: 100vh;
    padding: 0;
  }

  .levels-view.screen {
    height: 100vh;
    min-height: 100vh;
  }

  .gameplay-view.screen,
  .pause-view.screen {
    height: 100vh;
    min-height: 100vh;
  }

  .settings-stack {
    width: min(100% - 1rem, 40rem);
  }

  .setting-row,
  .setting-row--difficulty {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.7rem 0;
  }

  .setting-row--toggle {
    grid-template-columns: 1fr auto;
  }

}

@media (max-width: 640px) {
  .pause-card {
    gap: 14px;
    width: min(100% - 24px, 700px);
    min-height: auto;
    padding: 32px 24px 38px;
  }

  .pause-card h2 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .pause-meta {
    margin-bottom: 8px;
    font-size: clamp(18px, 5vw, 22px);
  }

  .pause-action-primary {
    height: 64px;
    min-height: 64px;
    font-size: 22px;
  }

  .pause-action-secondary {
    height: 58px;
    min-height: 58px;
    font-size: 20px;
  }

  .quit-link {
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .brand-word {
    display: none;
  }

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

  .stat {
    border-right: 0;
    border-bottom: 1px solid rgba(155, 116, 55, 0.45);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sunstone,
  .hero-emblem .logo-marble {
    animation: none;
  }
}
