@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #0b1217;
  --surface: #111c23;
  --surface2: #17232c;
  --line: #24343d;
  --text: #eef3f0;
  --muted: #8b9eaa;
  --dim: #5c7483;
  --accent: #c4f674;
  --cyan: #6ce2d2;
  --violet: #b5a4f3;
  --danger: #ff8c8e;
  --gold: #f9c978;
  --radius: 22px;
  --font:
    Inter, "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse at 74% -25%, #243e3a55, transparent 58%), var(--bg);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.42;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--cyan);
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
svg use[href="#i-play"],
svg use[href="#i-bolt"] {
  fill: currentColor;
  stroke-width: 1;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.3;
}
small {
  font-size: 11px;
}
b,
strong {
  font-weight: 650;
}
button {
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s,
    opacity 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  max-width: 1450px;
  margin: auto;
  padding: 0 56px;
}
.app-header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  text-align: left;
  letter-spacing: 0.045em;
  font-size: 17px;
  font-weight: 750;
  white-space: nowrap;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 43px;
  color: var(--accent);
  border: 1px solid #657c4d;
  border-radius: 11px;
  transform: skewY(-5deg);
}
.brand-icon svg {
  width: 24px;
  height: 24px;
}
.brand-light {
  font-weight: 400;
  color: #b1c1c6;
  margin-left: 5px;
}
.brand small {
  display: block;
  letter-spacing: 0.19em;
  color: var(--dim);
  font-size: 8px;
  font-weight: 500;
  margin-top: 3px;
}
.main-nav {
  display: flex;
  gap: 30px;
  height: 100%;
  align-items: center;
}
.nav-item {
  height: 100%;
  padding: 0 5px;
  position: relative;
  color: var(--muted);
  font-size: 14px;
}
.nav-item.active {
  color: var(--text);
}
.nav-item.active:after {
  content: "";
  height: 2px;
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  background: var(--accent);
}
.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.profile-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}
.profile-pill b {
  display: block;
  color: var(--text);
  font-size: 12px;
}
.profile-orb {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: #27342c;
  border: 1px solid #485941;
  border-radius: 50%;
  font:
    500 13px ui-monospace,
    monospace;
  color: var(--accent);
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #15202880;
}
.icon-button:hover {
  background: #23323a;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}
.view {
  padding-top: 32px;
  animation: appear 0.28s ease;
}
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--dim);
  margin-bottom: 21px;
}
.section-eyebrow > span:last-child {
  margin-left: auto;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px #c4f62820;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 20px;
}
.hero-card {
  min-height: 382px;
  position: relative;
  overflow: hidden;
  border: 1px solid #2e413d;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 85% 40%, #30574a40, transparent 60%),
    linear-gradient(115deg, #172823, #142127 70%);
  display: flex;
}
.hero-copy {
  padding: 36px 32px;
  position: relative;
  z-index: 2;
  width: 58%;
}
.hero-copy .tag {
  color: #93b299;
  font-size: 9px;
}
.hero-copy h1 {
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.2;
  margin-top: 19px;
  letter-spacing: -0.06em;
}
.hero-copy h1 > span {
  color: var(--accent);
}
.hero-copy p {
  font-size: 13px;
  color: #a5b9b3;
  margin: 19px 0 25px;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 19px;
  flex-wrap: wrap;
}
.button {
  min-height: 46px;
  padding: 12px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
}
.button svg {
  width: 18px;
  height: 18px;
}
.button-primary {
  background: var(--accent);
  color: #1b2b18;
  box-shadow: 0 3px 16px #0002;
}
.button-primary:hover {
  background: #d0ff8e;
}
.button-ghost {
  background: #17242b88;
  border-color: #34464d;
  color: #dbe6e6;
}
.button-ghost:hover {
  background: #24363c;
  border-color: #4a6167;
}
.text-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
}
.text-button:hover {
  color: var(--text);
}
.text-button svg {
  width: 15px;
  height: 15px;
}
.hero-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 31px;
  font-size: 9px;
  color: #7f9b8c;
}
.hero-bottom span {
  white-space: nowrap;
}
.hero-bottom b {
  color: #bdd7bb;
  margin-right: 5px;
  font:
    500 10px ui-monospace,
    monospace;
}
.hero-bottom i {
  width: 24px;
  height: 1px;
  background: #466354;
}
.hero-visual {
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 44%;
  display: grid;
  place-items: center;
  opacity: 0.95;
  mask-image: linear-gradient(to right, transparent, #000 8%);
}
.hero-grid-art {
  width: 247px;
  height: 247px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  transform: rotate(-10deg);
  position: relative;
  z-index: 1;
}
.art-tile {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  border: 1px solid #3d635655;
  background: linear-gradient(135deg, #29483b, #203a32);
  box-shadow: 0 8px 18px #0003;
  display: grid;
  place-items: center;
}
.art-tile svg {
  width: 100%;
  height: 100%;
  stroke: #5c8f7d;
  stroke-width: 2.8;
}
.art-tile.lit {
  border-color: #739c4966;
  background: #324c33;
}
.art-tile.lit svg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 5px #c4f67488);
}
.visual-orbit {
  position: absolute;
  border: 1px solid #659d7133;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  transform: rotate(-25deg);
}
.orbit-two {
  width: 410px;
  height: 410px;
  border-style: dashed;
  opacity: 0.5;
}
.art-label {
  position: absolute;
  font:
    9px ui-monospace,
    monospace;
  color: #729d80;
  letter-spacing: 0.1em;
  z-index: 2;
}
.art-label span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  margin-top: 3px;
}
.label-in {
  top: 28px;
  left: 48px;
}
.label-out {
  bottom: 40px;
  right: 25px;
}
.art-signal {
  position: absolute;
  bottom: 40px;
  left: 30px;
  display: flex;
  align-items: end;
  gap: 4px;
  height: 18px;
  transform: rotate(-10deg);
}
.art-signal span {
  width: 3px;
  height: 8px;
  background: #74a657;
}
.art-signal span:nth-child(3n) {
  height: 17px;
}
.art-signal span:nth-child(2n) {
  height: 13px;
}
.journey-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: linear-gradient(150deg, #18242e, #121c24);
}
.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-topline svg {
  color: #8399a8;
  width: 18px;
  height: 18px;
}
.journey-card h2 {
  font-size: 25px;
  margin: 18px 0 8px;
}
.journey-card > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.journey-progress {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 19px;
}
.journey-progress strong {
  font-size: 43px;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.journey-progress > span {
  font-size: 14px;
  color: var(--dim);
}
.journey-progress small {
  display: block;
  font-size: 9px;
}
.progress-track {
  height: 4px;
  background: #30403988;
  overflow: hidden;
  border-radius: 3px;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  width: 0;
  transition: width 0.3s;
}
.journey-card > .progress-track {
  margin-top: 8px;
}
.journey-next {
  margin: 20px 0 18px;
}
.journey-next small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--dim);
}
.journey-next strong {
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.journey-card > .button {
  width: 100%;
  justify-content: space-between;
  font-size: 11px;
  min-height: 39px;
  padding: 9px 13px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 33px 0 19px;
}
.section-heading .tag {
  font-size: 8px;
  color: var(--dim);
}
.section-heading h2 {
  font-size: 22px;
  margin-top: 6px;
}
.section-note {
  font-size: 11px;
  color: var(--dim);
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mode-card {
  text-align: left;
  position: relative;
  padding: 24px 25px 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #131e26;
  overflow: hidden;
  min-height: 224px;
  isolation: isolate;
}
.mode-card:hover {
  border-color: #536b71;
  transform: translateY(-3px);
  background: #18262e;
}
.mode-number {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.mode-icon {
  position: absolute;
  right: 24px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #2b3832;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.daily-card .mode-icon {
  color: #c5b2ed;
  background: #302c43;
}
.practice-card .mode-icon {
  color: #70d8cc;
  background: #1d3739;
}
.mode-icon svg {
  width: 23px;
  height: 23px;
}
.mode-card h3 {
  font-size: 23px;
  margin: 20px 0 9px;
}
.mode-card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.mode-card-footer {
  margin-top: 23px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b5c2c7;
  font-size: 10px;
}
.mode-card-footer svg {
  width: 16px;
  height: 16px;
  color: var(--dim);
}
.home-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 22px 0 8px;
  font-size: 11px;
  color: var(--dim);
}
.home-bottom > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.home-bottom svg {
  width: 15px;
  height: 15px;
}
.home-bottom .text-button {
  color: #bdcec6;
}
.muted {
  color: var(--dim);
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 23px 0 26px;
  margin-top: 35px;
  color: #56707c;
  font-size: 8px;
  letter-spacing: 0.12em;
}
.footer-dot {
  margin: 0 7px;
  color: #3a4f5c;
}
.app-footer > div {
  display: flex;
  gap: 18px;
  align-items: center;
}
.app-footer button {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0;
  padding: 6px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 35px;
}
.page-heading h1 {
  font-size: 38px;
  margin: 12px 0;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
}
.large-counter b {
  font-size: 42px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
}
.large-counter span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 10px;
}
.campaign-chapters {
  display: grid;
  gap: 25px;
}
.chapter {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.chapter-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.chapter-heading h2 {
  font-size: 19px;
}
.chapter-heading .tag {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.1em;
}
.chapter-heading p {
  font-size: 11px;
  color: var(--dim);
  margin-top: 6px;
}
.levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
  min-height: 140px;
  padding: 17px;
  border: 1px solid #30414a;
  border-radius: 12px;
  background: #1a2730;
}
.level-card:hover {
  border-color: #8ba36b;
}
.level-card.completed {
  background: linear-gradient(135deg, #25372b, #17262a);
  border-color: #526747;
}
.level-card.locked {
  background: #111a20;
  border-color: #223039;
  opacity: 0.55;
}
.level-card.current {
  border-color: var(--accent);
}
.level-number {
  font:
    13px ui-monospace,
    monospace;
  color: var(--muted);
}
.level-card > svg {
  position: absolute;
  top: 17px;
  right: 16px;
  width: 16px;
  height: 16px;
  color: var(--dim);
}
.level-card h3 {
  font-size: 14px;
  margin: 18px 0 5px;
  letter-spacing: -0.025em;
}
.level-card p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.level-stars {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-top: auto;
  padding-top: 9px;
}
.record-overview {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}
.record-level,
.record-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 23px;
}
.record-level {
  display: flex;
  gap: 23px;
  align-items: center;
}
.record-level > div:last-child {
  flex: 1;
}
.level-seal {
  width: 66px;
  height: 72px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: #34472d;
  color: var(--accent);
  font-size: 32px;
}
.record-level h2 {
  font-size: 18px;
  margin: 5px 0;
}
.record-level p {
  font-size: 10px;
  color: var(--muted);
  margin: 8px 0;
}
.record-level .tag {
  font-size: 8px;
}
.record-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.record-stat small {
  color: var(--muted);
}
.record-stat strong {
  font-size: 33px;
  margin: 5px 0;
}
.record-stat > span {
  font:
    8px ui-monospace,
    monospace;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.records-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #111b23;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-heading h2 {
  font-size: 19px;
}
.panel-heading .tag {
  font-size: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--accent);
  background: #2b3a25;
  font-size: 9px;
  letter-spacing: 0.03em;
}
.empty-state {
  padding: 29px 8px;
  color: var(--dim);
  font-size: 12px;
  text-align: center;
  line-height: 1.9;
}
.run-row,
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #22323a;
}
.run-row:last-child,
.rank-row:last-child {
  border: 0;
}
.run-row strong,
.rank-row strong {
  font-size: 12px;
}
.run-row small {
  display: block;
  color: var(--dim);
  font-size: 10px;
  margin-top: 3px;
}
.run-row > b,
.rank-row > b {
  font:
    500 16px ui-monospace,
    monospace;
  color: #d7e5dd;
}
.rank-row .rank-number {
  font:
    500 15px ui-monospace,
    monospace;
  width: 24px;
  color: var(--accent);
}
.rank-row strong {
  margin-right: auto;
}
.achievements-panel {
  margin-top: 20px;
}
.achievement-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.achievement {
  padding: 18px;
  border: 1px solid #28383f;
  border-radius: 12px;
  opacity: 0.4;
}
.achievement.earned {
  opacity: 1;
  background: #1d2b28;
  border-color: #43573d;
}
.achievement svg {
  color: var(--accent);
  margin-bottom: 10px;
}
.achievement b {
  display: block;
  font-size: 12px;
}
.achievement small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
/* Focused play view */
body.is-playing .app-header,
body.is-playing .app-footer {
  display: none;
}
body.is-playing .app-shell {
  max-width: 1320px;
}
.game-view {
  padding: 0;
}
.game-topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}
.game-heading {
  flex: 1;
}
.game-heading h1 {
  font-size: 18px;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.game-heading .tag {
  font-size: 8px;
  color: var(--cyan);
}
.sound-mini {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 14px;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(280px, 450px) minmax(
      150px,
      1fr
    );
  gap: 35px;
  align-items: start;
}
.play-aside {
  padding-top: 25px;
  max-width: 245px;
}
.play-aside h2 {
  font-size: 25px;
  line-height: 1.45;
  margin: 16px 0;
}
.play-aside > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.mission-tip {
  display: flex;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 24px 0;
}
.mission-tip svg {
  color: var(--cyan);
  width: 17px;
  height: 17px;
  margin-top: 3px;
}
.mission-tip p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.legend {
  display: grid;
  gap: 11px;
  color: var(--dim);
  font-size: 10px;
  margin-bottom: 30px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.legend-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
}
.cyan {
  background: var(--cyan);
}
.violet {
  background: var(--violet);
}
.gold {
  background: var(--gold);
}
.play-aside > .button {
  font-size: 11px;
  padding: 10px 14px;
}
.play-main {
  min-width: 0;
}
.game-hud {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.game-hud > div {
  min-width: 0;
}
.game-hud small {
  display: block;
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.game-hud strong {
  display: block;
  font-size: 25px;
  font-weight: 450;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  line-height: 1.2;
}
.game-hud > div:first-child strong {
  color: var(--accent);
}
.goal-strip {
  margin-bottom: 12px;
}
.goal-strip > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
}
.goal-strip b {
  color: #d7e3db;
}
.goal-strip .progress-track {
  height: 3px;
}
.wave-strip {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #18272c;
  border: 1px solid #2e454a;
  border-radius: 8px;
  margin-bottom: 10px;
  color: #a2c5c4;
  font-size: 10px;
  height: 38px;
}
.wave-strip b {
  margin-left: auto;
  font:
    500 13px ui-monospace,
    monospace;
  color: var(--cyan);
}
.wave-strip .status-dot {
  background: var(--cyan);
}
.wave-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.wave-progress > span {
  height: 100%;
  display: block;
  background: var(--cyan);
  width: 0;
  opacity: 0.7;
}
.wave-strip.warning {
  background: #35291d;
  border-color: #715135;
  color: var(--gold);
}
.wave-strip.warning b {
  color: var(--gold);
}
.wave-strip.overload {
  background: #3d2028;
  border-color: #9e475b;
  color: #ffdce0;
}
.wave-strip.overload b {
  color: #ffbcc5;
}
.wave-strip.overload .wave-progress > span {
  background: var(--danger);
}
.board-wrap {
  position: relative;
  width: 100%;
  margin: auto;
  border: 1px solid #31434d;
  border-radius: 17px;
  overflow: hidden;
  background: #0b141b;
  box-shadow: 0 20px 50px #0003;
}
.board-wrap canvas {
  display: block;
  width: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: -3px;
  border-radius: 17px;
}
.board-wrap.overload {
  border-color: #c55c73;
  box-shadow: 0 0 28px #c63f5618;
}
.board-announcement {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translate(-50%, -5px);
  white-space: nowrap;
  padding: 7px 14px;
  border: 1px solid #567b5c;
  background: #172b23ef;
  color: var(--accent);
  font: 600 10px var(--font);
  border-radius: 20px;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
.board-announcement.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font:
    8px ui-monospace,
    monospace;
  color: var(--dim);
}
.board-footer .status-dot {
  width: 4px;
  height: 4px;
  margin-right: 6px;
}
.board-footer .text-button {
  font-size: 10px;
  padding: 5px 0;
}
.keyboard-help {
  text-align: center;
  font-size: 9px;
  color: #56707c;
  margin-top: 7px;
}
.play-stats {
  padding-top: 10px;
  max-width: 240px;
  justify-self: end;
  width: 100%;
  display: grid;
  gap: 18px;
}
.small-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121e25;
  padding: 20px;
}
.small-panel .tag {
  font-size: 9px;
}
.small-panel dl {
  margin: 15px 0 0;
}
.small-panel dl > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #26353d;
  font-size: 11px;
}
.small-panel dl > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.small-panel dt {
  color: var(--muted);
}
.small-panel dd {
  margin: 0;
  font:
    500 17px ui-monospace,
    monospace;
}
.wave-preview-panel canvas {
  display: block;
  width: 100%;
  margin: 10px 0;
}
.wave-preview-panel p {
  font-size: 9px;
  color: var(--dim);
  line-height: 1.8;
}
.online-run-status {
  border: 1px solid #315e4b;
  background: #173228;
  padding: 12px;
  border-radius: 10px;
  font-size: 10px;
  color: #acdbba;
  line-height: 1.8;
}
.online-run-status.failed {
  border-color: #80504b;
  background: #302022;
  color: #e7a6a8;
}
.count-in {
  position: absolute;
  inset: 0;
  background: #0b141bd9;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 64px;
  backdrop-filter: blur(5px);
}
/* Dialogs */
.dialog {
  padding: 0;
  border: 1px solid #3b5159;
  border-radius: 24px;
  background: #142129;
  color: var(--text);
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 30px 100px #0008;
}
.dialog::backdrop {
  background: #050c13bf;
  backdrop-filter: blur(8px);
}
.dialog-body {
  padding: 29px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin-top: 4px;
}
.dialog h2 {
  font-size: 26px;
  line-height: 1.45;
}
.dialog p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  margin: 13px 0 20px;
}
.dialog-body > .button {
  width: 100%;
  margin-top: 10px;
}
.dialog-body > .text-button {
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
}
.pause-dialog .dialog-body {
  text-align: center;
  padding: 37px 28px;
}
.pause-dialog h2 {
  font-size: 23px;
  margin-top: 18px;
}
.result-dialog {
  text-align: center;
  max-width: 430px;
}
.result-emblem {
  width: 52px;
  height: 56px;
  margin: 0 auto 19px;
  display: grid;
  place-items: center;
  background: #334c31;
  color: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.result-emblem svg {
  width: 27px;
  height: 27px;
}
.result-dialog h2 {
  font-size: 27px;
  margin-top: 10px;
}
.result-dialog p {
  font-size: 11px;
  margin: 11px 0;
}
.result-stars {
  color: var(--accent);
  font-size: 23px;
  letter-spacing: 9px;
  margin: 12px 0;
}
.result-score {
  margin: 20px 0 24px;
}
.result-score small {
  display: block;
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.15em;
  color: var(--dim);
}
.result-score strong {
  display: block;
  font-size: 50px;
  font-weight: 450;
  letter-spacing: -0.05em;
  color: var(--accent);
  line-height: 1.35;
}
.result-score .chip {
  margin-top: 6px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-block: 1px solid #30434a;
  padding: 15px 0;
}
.result-stats b {
  display: block;
  font:
    500 19px ui-monospace,
    monospace;
}
.result-stats small {
  display: block;
  color: var(--dim);
  font-size: 10px;
  margin-top: 5px;
}
.result-xp {
  font-size: 12px;
  color: var(--cyan);
  margin: 15px 0 8px;
}
.result-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 11px;
}
.result-secondary .button {
  font-size: 11px;
  gap: 8px;
  padding: 11px 12px;
}
.dialog p.result-online {
  font-size: 10px;
  background: #223b32;
  border-radius: 7px;
  padding: 8px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #2b3b43;
  padding: 15px 0;
  cursor: pointer;
}
.setting-row b {
  display: block;
  font-size: 13px;
}
.setting-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.setting-row input {
  appearance: none;
  width: 39px;
  height: 23px;
  border-radius: 20px;
  background: #3c4d56;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.setting-row input:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #d9e1df;
  transition: transform 0.2s;
}
.setting-row input:checked {
  background: #7c9b4e;
}
.setting-row input:checked:after {
  transform: translateX(16px);
  background: #e8ffd0;
}
.setting-theme {
  margin: 21px 0;
}
.setting-theme > b {
  font-size: 12px;
}
.setting-theme > small {
  display: block;
  color: var(--dim);
  margin-top: 10px;
  font-size: 9px;
}
.theme-options {
  display: flex;
  gap: 12px;
  margin-top: 11px;
}
.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  position: relative;
  box-shadow: inset 0 0 0 8px #172229;
}
.theme-swatch.selected {
  border-color: #e3f1e6;
}
.theme-swatch:disabled:after {
  content: "•";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
}
.settings-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.settings-data .button {
  font-size: 11px;
  padding: 10px;
  cursor: pointer;
}
.small-copy {
  font-size: 10px !important;
  color: var(--dim) !important;
  line-height: 1.8;
  display: block;
}
.danger-text {
  color: var(--danger) !important;
}
.difficulty-options {
  display: grid;
  gap: 11px;
}
.difficulty-options > button {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 6px;
  text-align: left;
  padding: 18px;
  border: 1px solid #34464f;
  border-radius: 12px;
  background: #1b2931;
}
.difficulty-options > button:hover {
  border-color: var(--accent);
}
.difficulty-options .recommended {
  border-color: #759548;
  background: #26352b;
}
.difficulty-options b {
  font-size: 15px;
}
.difficulty-options b i {
  font-style: normal;
  color: var(--accent);
  font-size: 9px;
  margin-left: 8px;
}
.difficulty-options span {
  font-size: 11px;
  color: var(--muted);
}
.difficulty-options small {
  font:
    9px ui-monospace,
    monospace;
  color: var(--dim);
  margin-top: 5px;
}
.how-to {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.how-to li {
  counter-increment: step;
  padding-left: 33px;
  position: relative;
  margin: 20px 0;
}
.how-to li:before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font:
    10px ui-monospace,
    monospace;
  color: var(--accent);
}
.how-to b {
  font-size: 13px;
}
.how-to p {
  font-size: 11px;
  margin: 6px 0;
}
.input-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 17px;
}
.input-label input {
  display: block;
  width: 100%;
  background: #0e1920;
  border: 1px solid #344851;
  border-radius: 9px;
  min-height: 46px;
  color: var(--text);
  padding: 11px 13px;
  margin-top: 7px;
  font-size: 13px;
}
.input-label input::placeholder {
  color: #54707f;
}
.form-error {
  color: var(--danger) !important;
  font-size: 11px !important;
  min-height: 15px;
}
.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
#account-connected > .button {
  width: 100%;
  margin: 8px 0;
}
#account-connected > .text-button {
  display: block;
  margin: 14px auto;
}
.privacy-copy p {
  font-size: 12px;
}
.privacy-copy a {
  display: block;
  font-size: 12px;
  margin-top: 10px;
}
.confirm-dialog {
  max-width: 390px;
}
.confirm-dialog h2 {
  font-size: 21px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(30px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  padding: 12px 19px;
  border: 1px solid #4a6659;
  border-radius: 11px;
  background: #20352eed;
  color: #d6ebda;
  font-size: 12px;
  box-shadow: 0 12px 35px #0005;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100% - 32px);
  text-align: center;
  white-space: normal;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.update-banner {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border: 1px solid #526c56;
  background: #21332a;
  border-radius: 12px;
  z-index: 100;
  color: #d7ebd8;
  font-size: 11px;
}
.update-banner button {
  color: var(--accent);
  padding: 6px;
}
.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  z-index: 2000;
  padding: 30px;
}
.high-contrast {
  --muted: #bbcbd2;
  --dim: #93aebc;
  --line: #54717e;
}
.reduce-effects * {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}
.reduce-effects .hero-visual {
  filter: none;
}
.reduce-effects dialog::backdrop {
  backdrop-filter: none;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1100px) and (max-height: 880px) {
  .game-topbar {
    height: 65px;
    margin-bottom: 14px;
  }
  .play-main {
    max-width: 390px;
    justify-self: center;
    width: 100%;
  }
  .game-hud {
    margin-bottom: 9px;
  }
  .game-hud strong {
    font-size: 22px;
  }
  .wave-strip {
    height: 32px;
    padding-block: 7px;
    margin-bottom: 7px;
  }
  .goal-strip {
    margin-bottom: 8px;
  }
  .keyboard-help {
    display: none;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    padding: 0 30px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 16px;
  }
  .hero-copy {
    padding: 30px 25px;
    width: 64%;
  }
  .hero-copy h1 {
    font-size: 38px;
  }
  .hero-visual {
    width: 40%;
    right: -20px;
  }
  .hero-grid-art {
    width: 215px;
    height: 215px;
  }
  .hero-copy p {
    font-size: 12px;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .button {
    font-size: 12px;
    padding: 11px 14px;
  }
  .hero-bottom {
    margin-top: 24px;
  }
  .hero-card {
    min-height: 365px;
  }
  .journey-card {
    padding: 24px 20px;
  }
  .home-bottom > .muted {
    display: none;
  }
  .play-layout {
    grid-template-columns: 170px minmax(280px, 430px) 165px;
    gap: 20px;
  }
  .play-aside h2 {
    font-size: 21px;
  }
  .small-panel {
    padding: 15px;
  }
  .record-overview {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .record-stat:last-child {
    display: none;
  }
  .hero-actions .text-button {
    font-size: 10px;
  }
}
@media (max-width: 900px) {
  .app-shell {
    padding: 0 24px;
  }
  .app-header {
    height: 86px;
    gap: 13px;
  }
  .main-nav {
    gap: 22px;
  }
  .brand {
    font-size: 14px;
  }
  .brand-icon {
    width: 33px;
    height: 37px;
  }
  .brand small {
    font-size: 6px;
  }
  .profile-pill > span:last-child {
    display: none;
  }
  .header-actions {
    gap: 9px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    min-height: 330px;
  }
  .hero-copy {
    width: 60%;
    padding: 32px;
  }
  .hero-copy h1 {
    font-size: 43px;
  }
  .hero-visual {
    width: 42%;
    right: 0;
  }
  .hero-grid-art {
    width: 230px;
    height: 230px;
  }
  .journey-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 10px 22px;
    padding: 20px 24px;
    align-items: center;
  }
  .journey-card .card-topline {
    grid-column: 1;
    grid-row: 1;
  }
  .journey-card .card-topline svg {
    display: none;
  }
  .journey-card h2 {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    font-size: 21px;
  }
  .journey-card > p {
    display: none;
  }
  .journey-progress {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
  }
  .journey-progress strong {
    font-size: 33px;
  }
  .journey-card > .progress-track {
    grid-column: 1/3;
    grid-row: 3;
    margin: 4px 0 0;
  }
  .journey-next {
    display: none;
  }
  .journey-card > .button {
    grid-column: 3;
    grid-row: 1/4;
    width: auto;
  }
  .mode-card {
    padding: 22px 20px 16px;
  }
  .mode-card h3 {
    font-size: 21px;
  }
  .mode-card p {
    font-size: 11px;
  }
  .mode-icon {
    right: 17px;
    top: 20px;
    width: 33px;
    height: 33px;
  }
  .mode-icon svg {
    width: 20px;
  }
  .mode-number {
    font-size: 8px;
  }
  .mode-card-footer {
    font-size: 9px;
  }
  .section-note {
    display: none;
  }
  .play-layout {
    grid-template-columns: 1fr minmax(260px, 440px) 1fr;
    gap: 0;
  }
  .play-main {
    grid-column: 2;
  }
  .play-aside,
  .play-stats {
    display: none;
  }
  .game-topbar {
    height: 70px;
    margin-bottom: 17px;
  }
  .game-view {
    max-width: 690px;
    margin: auto;
  }
  .record-overview {
    grid-template-columns: 1.6fr 1fr;
  }
  .record-stat:nth-last-child(2) {
    display: none;
  }
  .achievement-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .levels-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .level-card {
    padding: 14px;
  }
  .chapter {
    padding: 23px;
  }
  .records-grid {
    grid-template-columns: 1fr;
  }
  .page-heading h1 {
    font-size: 32px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 13px;
  }
  .app-shell {
    padding: 0 17px;
    padding-top: env(safe-area-inset-top);
  }
  .app-header {
    height: 72px;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 44px;
  }
  .brand {
    font-size: 14px;
    gap: 9px;
  }
  .brand small {
    font-size: 6px;
  }
  .brand-icon {
    width: 31px;
    height: 35px;
  }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    height: 44px;
    justify-content: center;
    gap: 48px;
    border-bottom: 1px solid var(--line);
  }
  .nav-item {
    font-size: 12px;
    padding: 0 8px;
  }
  .header-actions {
    gap: 9px;
  }
  .profile-orb {
    width: 31px;
    height: 31px;
    font-size: 11px;
  }
  .header-actions > .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .view {
    padding-top: 24px;
  }
  .section-eyebrow {
    font-size: 7px;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
  }
  .section-eyebrow > span:last-child {
    font-size: 9px;
  }
  .home-grid {
    gap: 13px;
  }
  .hero-card {
    min-height: 340px;
    border-radius: 18px;
  }
  .hero-copy {
    padding: 25px 22px;
    width: 100%;
  }
  .hero-copy .tag {
    font-size: 8px;
  }
  .hero-copy h1 {
    font-size: 36px;
    margin-top: 16px;
  }
  .hero-copy p {
    font-size: 11px;
    line-height: 1.8;
    margin: 16px 0 23px;
    max-width: 235px;
  }
  .hero-visual {
    width: 45%;
    right: -44px;
    top: 40px;
    bottom: 40px;
    opacity: 0.5;
    mask-image: linear-gradient(to right, transparent, #000 25%);
  }
  .hero-grid-art {
    width: 190px;
    height: 190px;
    gap: 5px;
  }
  .art-tile {
    border-radius: 7px;
  }
  .label-in,
  .label-out,
  .art-signal,
  .orbit-two {
    display: none;
  }
  .hero-actions {
    position: relative;
    z-index: 3;
    gap: 18px;
  }
  .hero-actions .button {
    font-size: 12px;
    min-height: 43px;
  }
  .hero-actions .text-button {
    font-size: 10px;
  }
  .hero-bottom {
    margin-top: 25px;
    font-size: 8px;
    gap: 10px;
  }
  .hero-bottom i {
    width: 19px;
  }
  .journey-card {
    grid-template-columns: 1fr auto;
    padding: 17px 19px;
    gap: 6px 10px;
    border-radius: 16px;
  }
  .journey-card .card-topline .tag {
    font-size: 7px;
  }
  .journey-card h2 {
    font-size: 18px;
  }
  .journey-progress {
    display: none;
  }
  .journey-card > .progress-track {
    grid-column: 1;
    grid-row: 3;
    margin-top: 5px;
  }
  .journey-card > .button {
    grid-column: 2;
    font-size: 10px;
    min-height: 38px;
    padding: 9px 10px;
    gap: 9px;
  }
  .journey-card .button svg {
    width: 14px;
  }
  .section-heading {
    margin: 28px 0 15px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .section-heading .tag {
    font-size: 7px;
  }
  .mode-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .mode-card {
    min-height: 150px;
    padding: 19px 20px;
    border-radius: 15px;
  }
  .mode-icon {
    right: 20px;
    top: 22px;
    width: 40px;
    height: 40px;
  }
  .mode-number {
    font-size: 8px;
  }
  .mode-card h3 {
    margin: 10px 0 7px;
    font-size: 22px;
  }
  .mode-card p {
    font-size: 11px;
    line-height: 1.7;
  }
  .mode-card p br {
    display: none;
  }
  .mode-card-footer {
    margin-top: 13px;
    padding-top: 11px;
    font-size: 9px;
  }
  .home-bottom {
    margin-top: 18px;
    font-size: 10px;
  }
  .home-bottom > div {
    gap: 8px;
  }
  .home-bottom .text-button {
    font-size: 10px;
  }
  .app-footer {
    margin-top: 25px;
    padding-block: 19px;
    font-size: 6px;
    letter-spacing: 0.07em;
  }
  .app-footer > div {
    gap: 10px;
  }
  .app-footer button {
    font-size: 8px;
  }
  .page-heading {
    padding: 10px 0 25px;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 29px;
    margin: 8px 0;
  }
  .page-heading .tag {
    font-size: 8px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.8;
  }
  .large-counter b {
    font-size: 31px;
  }
  .large-counter span {
    font-size: 9px;
    display: block;
    margin: 4px 0 0;
  }
  .chapter {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .chapter-heading h2 {
    font-size: 17px;
  }
  .chapter-heading p {
    font-size: 10px;
  }
  .chapter-heading .tag {
    font-size: 9px;
  }
  .levels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .level-card {
    min-height: 132px;
    padding: 14px;
  }
  .level-card h3 {
    font-size: 13px;
  }
  .record-overview {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .record-level {
    grid-column: 1/-1;
    padding: 21px;
  }
  .record-stat:nth-last-child(2) {
    display: flex;
  }
  .record-stat:last-child {
    display: none;
  }
  .record-stat {
    padding: 18px;
  }
  .record-stat strong {
    font-size: 28px;
  }
  .records-grid {
    gap: 15px;
  }
  .panel {
    padding: 20px;
    border-radius: 16px;
  }
  .panel-heading h2 {
    font-size: 17px;
  }
  .panel-heading .tag {
    font-size: 7px;
  }
  .achievement {
    padding: 14px;
  }
  .achievement b {
    font-size: 11px;
  }
  .achievement small {
    font-size: 9px;
  }
  .page-heading > .button {
    font-size: 10px;
    padding: 9px 11px;
    white-space: nowrap;
    min-height: 38px;
  }
  .dialog-body {
    padding: 25px 22px;
  }
  .dialog h2 {
    font-size: 24px;
  }
  .result-dialog .dialog-body {
    padding: 24px;
  }
  .result-emblem {
    margin-bottom: 13px;
    width: 44px;
    height: 49px;
  }
  .result-dialog h2 {
    font-size: 24px;
  }
  .result-score {
    margin: 15px 0 18px;
  }
  .result-score strong {
    font-size: 43px;
  }
  .result-stats {
    padding: 12px 0;
  }
  .result-dialog .button {
    min-height: 43px;
  }
  .dialog {
    max-height: calc(
      100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
  }
  .update-banner {
    left: 15px;
    right: 15px;
    bottom: 15px;
    justify-content: space-between;
  }
  .toast {
    font-size: 11px;
  }
  /* Mobile gameplay uses height as well as width. */
  body.is-playing {
    overscroll-behavior: none;
  }
  body.is-playing .app-shell {
    padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  }
  .game-view {
    padding: 0;
  }
  .game-topbar {
    height: 57px;
    margin-bottom: 10px;
    gap: 10px;
  }
  .game-topbar .icon-button {
    width: 37px;
    height: 37px;
    border-radius: 10px;
  }
  .game-heading h1 {
    font-size: 14px;
    line-height: 1.3;
  }
  .game-heading .tag {
    font-size: 7px;
  }
  .sound-mini {
    font-size: 7px;
    padding: 9px 3px;
  }
  .play-layout {
    display: block;
  }
  .play-main {
    max-width: 430px;
    margin: auto;
  }
  .game-hud {
    gap: 9px;
    margin-bottom: 9px;
  }
  .game-hud small {
    font-size: 7px;
  }
  .game-hud strong {
    font-size: 22px;
    margin-top: 3px;
  }
  .goal-strip {
    margin-bottom: 8px;
  }
  .goal-strip > div:first-child {
    font-size: 9px;
    margin-bottom: 5px;
  }
  .wave-strip {
    height: 31px;
    padding: 6px 10px;
    margin-bottom: 7px;
    font-size: 9px;
    border-radius: 7px;
  }
  .wave-strip b {
    font-size: 12px;
  }
  .board-wrap {
    border-radius: 13px;
  }
  .board-wrap canvas {
    border-radius: 13px;
  }
  .board-footer {
    margin-top: 5px;
    font-size: 7px;
    min-height: 25px;
  }
  .keyboard-help {
    display: none;
  }
  .board-announcement {
    top: 10px;
    font-size: 9px;
    padding: 6px 11px;
  }
  .game-hud > div:first-child {
    min-width: 80px;
  }
  .game-hud {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
@media (max-width: 360px) {
  .app-shell {
    padding-inline: 12px;
  }
  .brand {
    font-size: 12px;
  }
  .brand-light {
    margin-left: 3px;
  }
  .hero-copy {
    padding: 23px 18px;
  }
  .hero-copy h1 {
    font-size: 32px;
  }
  .hero-actions {
    gap: 12px;
  }
  .hero-actions .button {
    font-size: 11px;
    padding-inline: 12px;
  }
  .hero-actions .text-button {
    font-size: 9px;
  }
  .hero-visual {
    opacity: 0.35;
  }
  .home-bottom > div > svg {
    display: none;
  }
  .game-heading h1 {
    font-size: 12px;
  }
  .sound-mini {
    display: none;
  }
  .hero-bottom {
    gap: 7px;
  }
  .header-actions {
    gap: 6px;
  }
}
/* Keep the board usable on short phones without changing the shared grid. */
@media (max-width: 600px) and (max-height: 740px) {
  .game-topbar {
    height: 44px;
    margin-bottom: 4px;
  }
  .game-hud {
    margin-bottom: 5px;
  }
  .game-hud > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
  }
  .game-hud strong {
    font-size: 18px;
    margin-top: 0;
  }
  .game-hud small {
    font-size: 7px;
    letter-spacing: 0;
  }
  .game-hud > div:first-child {
    min-width: 0;
  }
  .goal-strip {
    margin-bottom: 5px;
  }
  .goal-strip > div:first-child {
    margin-bottom: 3px;
  }
  .wave-strip {
    height: 28px;
    margin-bottom: 5px;
  }
}
body.portrait-required {
  overflow: hidden;
}
body.portrait-required .play-layout {
  visibility: hidden;
}
body.portrait-required .pause-dialog {
  max-height: calc(100dvh - 24px);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Content-aware card and theme controls. */
.level-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.level-number svg {
  width: 15px;
  height: 15px;
}
.level-card > strong {
  font-size: 14px;
  margin: 18px 0 5px;
  letter-spacing: -0.025em;
  line-height: 1.4;
}
.level-card > small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.chapter-heading > span {
  font:
    10px ui-monospace,
    monospace;
  color: var(--muted);
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.theme-swatch {
  width: 100%;
  height: auto;
  min-height: 92px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #101c23;
  box-shadow: none;
  padding: 10px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 4px;
}
.theme-swatch i {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  border: 5px solid #24343d;
  box-shadow: 0 0 0 1px #48616b;
}
.theme-swatch span {
  font-size: 8px;
  white-space: nowrap;
  margin-top: 5px;
}
.theme-swatch small {
  font-size: 7px;
  color: var(--muted);
}
.theme-swatch.selected {
  border-color: var(--accent);
}
.theme-swatch:disabled:after {
  display: none;
}
.rank-row > span:nth-child(2) {
  flex: 1;
  font-size: 12px;
}
.rank-row > strong {
  margin-right: 0;
}
.run-row > strong {
  text-align: right;
  font-size: 16px;
}
.run-row > div > b {
  font-size: 12px;
}
.empty-state > svg {
  display: block;
  margin: 0 auto 12px;
  width: 26px;
  height: 26px;
}
.empty-state > b {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.empty-state p {
  font-size: 11px;
  margin-top: 8px;
}
.achievement-list {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 600px) {
  .level-card > strong {
    font-size: 13px;
  }
  .achievement-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
