@font-face {
  font-family: Barlow Arcade;
  src: url(fonts/barlow-condensed.ttf) format('truetype');
  font-display: swap;
  font-style: italic;
  font-weight: 800;
}
:root {
  color-scheme: dark;
  --bg: #10101e;
  --panel: #1b1b30;
  --line: #343349;
  --ink: #f8f5ff;
  --muted: #b0afc5;
  --mint: #83f5ca;
  --sun: #ffe56b;
  --display: 'Barlow Arcade', Impact, 'Arial Black', sans-serif;
  --sans: Inter, 'Helvetica Neue', Arial, sans-serif;
  --header: 68px;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 50% 10%, #24203865, transparent 62%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
input:focus-visible,
#board:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 4px;
}
button,
a,
input {
  touch-action: manipulation;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
}
h1,
h2,
h3 {
  letter-spacing: 0.01em;
}
small,
.micro {
  font-size: 12px;
}
button {
  text-align: inherit;
}
.pixel-art {
  image-rendering: pixelated;
  object-fit: contain;
  user-select: none;
}
.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.1em;
  height: 1.1em;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
  vertical-align: -0.14em;
}
.topbar {
  min-height: var(--header);
  background: #141322;
  border-bottom: 1px solid #39354b;
}
.top-inner {
  max-width: 1216px;
  padding: 0 40px;
  margin: auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 44px;
}
.brand {
  display: flex;
  align-items: center;
  color: #f9f8ff;
  font-size: 26px;
  letter-spacing: 0.015em;
  white-space: nowrap;
  line-height: 1;
}
.brand span {
  color: var(--mint);
  margin-left: 4px;
}
.logomark {
  position: relative;
  margin: 0 12px 0 2px;
  width: 23px;
  height: 23px;
  display: inline-block;
  transform: skew(-5deg);
}
.logomark:before {
  content: '';
  position: absolute;
  top: 0;
  left: 8px;
  width: 7px;
  height: 7px;
  background: #b9ffe2;
  box-shadow:
    -8px 8px #8af8c9,
    0 8px #76eab8,
    8px 8px #69cca9,
    -8px 16px #44bc98;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 24px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #a9a6bc;
  font-weight: 700;
  position: relative;
}
.nav-link[aria-current='page'] {
  color: var(--mint);
}
.nav-link[aria-current='page']:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mint);
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}
.wallet,
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201f32;
}
.wallet {
  gap: 7px;
  padding: 0 11px;
  font-size: 14px;
  font-weight: 800;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}
.wallet .icon {
  font-size: 19px;
}
.icon-button {
  width: 36px;
  color: #d3cde3;
  font-size: 17px;
}
.icon-button:hover,
.wallet:hover {
  border-color: #79708c;
}
#lobby {
  max-width: 1216px;
  margin: 0 auto;
  padding: 28px 40px 42px;
  outline: 0;
}
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border: 1px solid #7d5897;
  border-radius: 18px;
  min-height: clamp(302px, 32vw, 407px);
  display: flex;
  align-items: center;
  background: #30163d url(art/arcade.webp) center center/cover no-repeat;
  box-shadow:
    0 5px 0 #080811,
    0 18px 40px #0003;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #211030d9 0%, #31133fbd 24%, #29173926 50%, transparent 70%);
}
.hero-copy {
  padding: 30px 4.6% 34px;
}
.mode-label,
.micro,
.level small,
.progress-count,
.stock {
  font-family: ui-monospace, 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.mode-label {
  color: #a2f6d1;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.mode-label .icon {
  font-size: 13px;
}
.hero h1 {
  font-size: clamp(72px, 7.8vw, 110px);
  line-height: 0.77;
  letter-spacing: -0.018em;
  transform: rotate(-2deg);
  transform-origin: left;
}
.hero h1 span,
.hero h1 em {
  display: block;
  text-shadow:
    2px 4px 0 #50274f,
    4px 7px 0 #1b102f;
}
.hero h1 span {
  color: #fff7e9;
}
.hero h1 em {
  font-size: 0.76em;
  color: #ffe66c;
  margin-top: 10px;
}
.hero-copy > p {
  margin-top: 20px;
  color: #ede4f3;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.primary,
.secondary,
.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  border-radius: 8px;
}
.primary {
  background: var(--sun);
  color: #272032;
  border: 1px solid #ffec9a;
  box-shadow: 0 3px 0 #b58a39;
  min-height: 44px;
  padding: 0 20px;
}
.primary:hover {
  background: #ffed8a;
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px #a5843c;
}
.hero-play {
  margin-top: 19px;
  padding: 0 24px;
  min-height: 46px;
}
.primary .icon {
  font-size: 14px;
}
.secondary {
  padding: 12px 18px;
  background: #302d45;
  border: 1px solid #48445d;
  color: var(--ink);
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-height: 36px;
}
.text-button:hover {
  color: var(--mint);
}
.shelf,
.records {
  margin-top: 26px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
  gap: 12px;
}
.section-heading h2 {
  font-size: 28px;
  line-height: 1.1;
}
.shelf-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.shelf-card {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: 144px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: linear-gradient(115deg, var(--shade), var(--shade) 48%, var(--tint));
  box-shadow: 0 3px 0 #080811;
  transition:
    transform 0.18s,
    border-color 0.18s;
}
.shelf-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.journey {
  --shade: #292039;
  --tint: #50335f;
  --edge: #614472;
  --accent: #d6a9ff;
}
.collection {
  --shade: #192e35;
  --tint: #22504d;
  --edge: #375957;
  --accent: #8af2c8;
}
.toolbox {
  --shade: #352a29;
  --tint: #563d2b;
  --edge: #66503c;
  --accent: #ffcb7b;
}
.card-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-image: radial-gradient(ellipse at 80% 26%, var(--tint), transparent 55%);
}
.card-scene:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56%;
  right: 0;
  background-image: radial-gradient(#fff2 0.8px, transparent 1px);
  background-size: 5px 5px;
  mask-image: linear-gradient(115deg, transparent, #000);
}
.card-scene img {
  position: absolute;
  right: 7%;
  top: 7%;
  width: clamp(75px, 8.5vw, 120px);
  height: 74%;
  filter: drop-shadow(4px 5px 0 #120f2366);
  transform: rotate(-4deg);
}
.shelf-copy {
  padding: 18px 16px 18px 20px;
  max-width: 87%;
}
.shelf-copy h3 {
  font-size: 29px;
  line-height: 1.1;
  margin-bottom: 5px;
  text-shadow: 0 2px #201b2a;
}
.shelf-copy span {
  display: block;
  font-size: 12px;
  color: #e2dce7;
}
.card-arrow {
  position: absolute;
  bottom: 16px;
  right: 15px;
  width: 25px;
  height: 25px;
  border: 1px solid var(--edge);
  background: var(--shade);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 13px;
}
.record-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #1b1a2c;
  border-radius: 12px;
  padding: 15px 0;
}
.record {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.record + .record {
  border-left: 1px solid var(--line);
}
.record-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
  width: 42px;
  height: 42px;
  font-size: 22px;
  background: #302b37;
  color: var(--sun);
}
.record-icon.lines {
  background: #20323b;
  color: var(--mint);
}
.record-icon.block {
  background: #302a42;
  color: #c69df7;
}
.record small,
.record strong {
  display: block;
}
.record small {
  color: var(--muted);
  margin-bottom: 4px;
}
.record strong {
  font: 800 italic 26px/0.94 var(--display);
  font-variant-numeric: tabular-nums;
}
.intro {
  padding: 20px 0 25px;
}
.intro h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  margin-bottom: 8px;
}
.intro p,
.tool-card p,
.dialog-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.switcher,
.collection-bar,
.journey-progress,
.level-status,
.specimen small {
  display: flex;
  align-items: center;
}
.collection-bar,
.journey-progress {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.switcher {
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 3px;
  gap: 3px;
}
.switcher button {
  padding: 9px 17px;
  font-size: 13px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
}
.switcher button[aria-pressed='true'] {
  background: #365448;
  color: var(--mint);
}
.progress-count,
.stock,
.level small {
  font-size: 10px;
  color: var(--muted);
}
.collection-grid,
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.specimen,
.level,
.tool-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(150deg, #24233a, #1a192b);
  padding: 17px;
  overflow: hidden;
}
.specimen,
.level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.specimen:hover,
.level:not(:disabled):hover {
  border-color: #807193;
}
.specimen-img,
.level-art,
.tool-art,
.detail-art {
  background: radial-gradient(ellipse, #37334d 0, transparent 68%);
  width: 100%;
  display: grid;
  place-items: center;
  height: 85px;
}
.specimen-img img {
  height: 60px;
}
.specimen.unseen .specimen-img {
  filter: saturate(0.28);
  opacity: 0.58;
}
.specimen strong,
.level strong {
  font: 800 italic 24px/1.1 var(--display);
}
.specimen small,
.level-status {
  color: var(--muted);
  font-size: 11px;
  gap: 4px;
}
.specimen.found small,
.level.done .level-status {
  color: var(--mint);
}
.mini-shape {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  filter: drop-shadow(3px 4px 0 #08061766);
}
.mini-shape > i {
  width: 15px;
  height: 15px;
  position: relative;
}
.mini-shape > .tile {
  border: 1px solid #0002;
}
.tool-card {
  display: flex;
  flex-direction: column;
}
.tool-art {
  height: 136px;
  background: radial-gradient(ellipse, #533b58, transparent 66%);
}
.tool-art img {
  width: 90px;
}
.stock {
  align-self: flex-start;
  color: var(--mint);
  margin: 6px 0;
}
.tool-card h2 {
  font-size: 30px;
}
.tool-card p {
  font-size: 14px;
  flex: 1;
  margin: 6px 0 16px;
}
.buy {
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  background: #343044;
  border: 1px solid #594b60;
  color: var(--ink);
  font-size: 14px;
}
.buy span {
  color: var(--sun);
}
.buy:disabled {
  opacity: 0.52;
}
.level-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.level-art img {
  width: 65px;
}
.level.locked .level-art {
  filter: grayscale(0.88);
  opacity: 0.48;
}
.level.current {
  border-color: #927ab5;
}
.level-status {
  margin-top: 7px;
  color: #d2c0f7;
}
.level.locked .level-status {
  color: var(--muted);
}
.journey-progress {
  font-size: 13px;
  color: var(--muted);
}
progress {
  height: 7px;
  width: min(28vw, 200px);
  accent-color: var(--mint);
}
#stage {
  position: relative;
  max-width: 1240px;
  margin: auto;
  min-height: calc(100svh - var(--header) - 1px);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(100px, 1fr) var(--side) minmax(100px, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
  user-select: none;
  --side: min(54vw, calc(100svh - var(--header) - 146px), 630px);
  --slot-unit: calc(var(--side) * 0.079);
}
.game-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.game-hud .micro {
  color: var(--mint);
  font-size: 11px;
}
.game-hud #score {
  display: block;
  font: 800 italic clamp(40px, 5vw, 76px) / 1 var(--display);
  color: var(--ink);
  margin-top: 6px;
}
#game-record {
  color: var(--sun);
  font-weight: 700;
  font-size: 14px;
}
#game-record .pixel-art {
  height: 20px;
  vertical-align: middle;
  margin-right: 3px;
}
#game-record span + span {
  margin-left: 7px;
}
#frame {
  width: var(--side);
  height: var(--side);
  padding: 1.5%;
  padding: calc(var(--side) * 0.015);
  border: 1px solid #79718b;
  border-radius: 12px;
  background: #3d3a59;
  box-shadow: 0 5px 0 #090917;
}
#board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template: repeat(8, 1fr) / repeat(8, 1fr);
  background: #131c33;
  border: 2px solid #172038;
  border-radius: 5px;
  overflow: hidden;
  touch-action: none;
}
.cell {
  position: relative;
  background: #202e47;
  box-shadow: inset 0 0 0 1px #17243a;
}
.cell .gem {
  position: absolute;
  z-index: 1;
  inset: 17%;
  width: 66%;
  height: 66%;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px 1px #0009);
  pointer-events: none;
}
.cell.aim {
  box-shadow: inset 0 0 0 2px var(--sun);
  z-index: 1;
}
.cell:has(.ghost) {
  background: #395366;
}
.cell > .tile {
  pointer-events: none;
}
#rack {
  display: flex;
  flex-direction: column;
  align-self: center;
  height: 90%;
  max-height: var(--side);
  touch-action: none;
}
.slot {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  touch-action: none;
  border-radius: 10px;
}
.slot.selected {
  outline: 1px dashed var(--mint);
  background: #83f5ca0c;
}
.slot:disabled {
  cursor: default;
}
.slot:enabled {
  cursor: grab;
}
.slot .shape {
  pointer-events: none;
}
.slot:active {
  cursor: grabbing;
}
#floating {
  position: fixed;
  z-index: 5;
  pointer-events: none;
}
#game-tools {
  grid-column: 1/-1;
  text-align: center;
}
#boosters {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.tool-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 10px;
  background: #28263c;
  border: 1px solid #48445c;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
.tool-action img {
  width: 30px;
  height: 30px;
}
.tool-action b {
  color: var(--mint);
  font-size: 11px;
}
.tool-action.active {
  border-color: var(--sun);
  background: #38303e;
}
.tool-action:disabled {
  opacity: 0.45;
}
#play-tip {
  font-size: 12px;
  color: var(--muted);
  margin: 10px auto 0;
  line-height: 1.4;
}
dialog {
  width: min(380px, calc(100vw - 28px));
  padding: 24px;
  border: 1px solid #655878;
  border-radius: 16px;
  background: #222035;
  color: var(--ink);
  box-shadow: 0 12px 52px #05041199;
  max-height: 90svh;
  overflow: auto;
}
dialog::backdrop {
  background: #080717bd;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.dialog-head h2 {
  font-size: 32px;
}
.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.dialog-actions button {
  width: 100%;
}
.dialog-text + .dialog-text {
  margin-top: 8px;
}
.dialog-stat {
  font: 800 italic 50px/1 var(--display);
  color: var(--sun);
  margin: 12px 0;
}
.volume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
}
.volume input {
  width: 54%;
  accent-color: var(--mint);
}
.detail-art {
  height: 118px;
  margin-bottom: 10px;
}
.detail-art img {
  width: 70px;
}
.detail-art .mini-shape > i {
  width: 24px;
  height: 24px;
}
#toast {
  position: fixed;
  z-index: 8;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  color: #eaffef;
  background: #15382e;
  border: 1px solid #539479;
  border-radius: 9px;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  max-width: 92vw;
  width: max-content;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 850px) {
  .top-inner {
    gap: 22px;
    padding: 0 22px;
  }
  nav {
    gap: 16px;
  }
  #lobby {
    padding: 20px 22px 32px;
  }
  .shelf-card {
    min-height: 153px;
  }
  .card-scene img {
    width: 90px;
    height: 65%;
    top: 0;
  }
  .shelf-copy {
    padding: 12px;
  }
  .shelf-copy span {
    font-size: 11px;
  }
  .section-heading h2 {
    font-size: 26px;
  }
  .level-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  :root {
    --header: 56px;
  }
  .top-inner {
    padding: 0 15px;
    gap: 12px;
  }
  .brand {
    font-size: 23px;
  }
  .logomark {
    margin-right: 7px;
  }
  nav {
    display: none;
  }
  .account {
    gap: 6px;
  }
  .wallet,
  .icon-button {
    min-height: 34px;
  }
  .icon-button {
    width: 33px;
  }
  .wallet {
    padding: 0 7px;
  }
  #lobby {
    padding: 14px 14px 30px;
  }
  .hero {
    min-height: 300px;
    border-radius: 13px;
    background-position: 58% center;
  }
  .hero:before {
    background: linear-gradient(90deg, #230f30eb 0%, #251235b5 39%, #2917390a 86%);
  }
  .hero-copy {
    padding: 26px 18px;
  }
  .hero h1 {
    font-size: 70px;
  }
  .hero-copy > p {
    font-size: 12px;
    max-width: 160px;
  }
  .mode-label {
    font-size: 9px;
  }
  .hero-play {
    min-height: 42px;
    padding: 0 15px;
    font-size: 14px;
  }
  .shelf,
  .records {
    margin-top: 23px;
  }
  .shelf-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .shelf-card {
    min-height: 88px;
    align-items: center;
  }
  .card-scene {
    left: 0;
    width: 82px;
  }
  .card-scene img {
    right: 0;
    top: 4%;
    width: 78px;
    height: 88%;
  }
  .shelf-copy {
    padding: 13px 14px 13px 94px;
    max-width: 94%;
  }
  .shelf-copy h3 {
    font-size: 25px;
  }
  .shelf-copy span {
    font-size: 12px;
  }
  .card-arrow {
    bottom: calc(50% - 13px);
    right: 12px;
  }
  .record-row {
    padding: 12px 0;
  }
  .record {
    padding: 0 10px;
    gap: 6px;
  }
  .record-icon {
    width: 24px;
    height: 27px;
    font-size: 17px;
  }
  .record small {
    font-size: 10px;
  }
  .record strong {
    font-size: 22px;
  }
  .collection-grid,
  .level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 3px 12px;
  }
  .tool-card .tool-art {
    grid-row: 1/5;
    height: 84px;
    align-self: center;
  }
  .tool-art img {
    width: 65px;
  }
  .tool-card h2 {
    font-size: 25px;
  }
  .tool-card p {
    margin: 0 0 7px;
  }
  .buy {
    grid-column: 2;
  }
  .progress-count {
    font-size: 9px;
  }
  .intro {
    padding: 9px 0 20px;
  }
}
@media (max-aspect-ratio: 6/5) {
  #stage {
    --side: min(93vw, 58svh, 610px);
    --slot-unit: calc(var(--side) * 0.066);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }
  .game-hud {
    width: var(--side);
    flex-direction: row;
    justify-content: space-between;
    gap: 5px;
  }
  .game-hud #score {
    font-size: 32px;
    margin: 0;
  }
  .game-hud > div:nth-child(2) {
    text-align: center;
  }
  .game-hud .micro {
    font-size: 9px;
  }
  #game-record {
    max-width: 33%;
    font-size: 12px;
  }
  #rack {
    width: var(--side);
    height: calc(var(--side) * 0.23);
    flex-direction: row;
  }
  #boosters {
    gap: 6px;
  }
  .tool-action {
    font-size: 12px;
    padding: 3px 6px;
  }
  .tool-action img {
    width: 26px;
  }
  #play-tip {
    margin-top: 7px;
  }
  .text-button {
    font-size: 12px;
  }
}
@media (max-height: 490px) and (min-aspect-ratio: 6/5) {
  :root {
    --header: 44px;
  }
  #stage {
    --side: min(50vw, calc(100svh - 106px));
    padding: 5px 15px;
    gap: 5px;
  }
  .game-hud {
    gap: 8px;
  }
  #play-tip {
    display: none;
  }
  .tool-action {
    min-height: 34px;
  }
  .tool-action img {
    width: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.return-game {
  margin-top: 20px;
}
.cell .flash {
  z-index: 2;
}
.tool-action:hover:not(:disabled),
.buy:hover:not(:disabled),
.secondary:hover {
  border-color: #aca0bb;
  background: #39344b;
}
#frame {
  position: relative;
}
#clear-callout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}
#clear-callout b {
  display: grid;
  justify-items: center;
  color: #ffec82;
  text-shadow:
    2px 3px #2f1c48,
    0 0 14px #1c163a;
  font: 800 italic clamp(28px, 5.5vw, 64px) / 0.92 var(--display);
  animation: clear-label 0.9s ease-out forwards;
}
#clear-callout small {
  font-size: 0.55em;
  color: white;
}
.flying-gem {
  position: fixed;
  z-index: 6;
  pointer-events: none;
}
@keyframes clear-label {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.8) rotate(-5deg);
  }
  18%,
  68% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(1.02) rotate(-5deg);
  }
}
.slot.in-flight .shape {
  opacity: 0;
}
@media (max-width: 380px) {
  html {
    scrollbar-gutter: auto;
  }
  .top-inner {
    padding: 0 10px;
    gap: 7px;
  }
  .brand {
    font-size: 21px;
  }
  .account {
    gap: 4px;
  }
  .tool-action {
    padding: 4px;
    gap: 3px;
    font-size: 11px;
  }
  .tool-action img {
    width: 22px;
  }
  #boosters {
    gap: 4px;
  }
  .card-arrow {
    right: 8px;
  }
  .shelf-copy {
    padding-left: 84px;
  }
}

.chapter-controls,
.ad-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}
.chapter-controls button {
  min-width: 44px;
}
.level-conditions {
  font-size: 12px;
  color: var(--muted);
}
.wave-hud {
  display: block;
  font-size: 12px;
  color: var(--mint);
  padding: 5px 0;
}
.ad-player {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 406;
  border-radius: 10px;
  background: #121321;
  margin: 12px 0;
}
.ad-status {
  font-size: 13px;
  color: var(--muted);
}
.tool-action b {
  white-space: nowrap;
}
.tool-action.tool-suggestion {
  border-color: var(--mint);
}
@media (max-width: 420px) {
  .tool-action {
    gap: 3px;
    padding-inline: 5px;
  }
  .tool-action b {
    font-size: 9px;
  }
  .game-hud {
    gap: 3px;
  }
}

:root {
  --display: 'Barlow Arcade', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
}
.hero h1 {
  line-height: 1.02;
  letter-spacing: .035em;
}
.hero h1 em {
  margin-top: 0;
  font-size: 1em;
}
.hero-copy p {
  max-width: 20em;
}
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(48px, 14vw, 68px); }
  .hero-copy p { max-width: 13em; }
}
