:root {
  color-scheme: light;
  --bg: #f4f8fb;
  --ink: #17212b;
  --line: #c9d6df;
  --accent: #0f7a9d;
  --accent-2: #2f8b57;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.keyboard-memory-page {
  overflow: hidden;
  color: #edfaff;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(94, 230, 255, 0.055) 18.2%, transparent 18.6% 64%, rgba(255, 209, 102, 0.04) 64.2%, transparent 64.6%),
    linear-gradient(90deg, rgba(94, 230, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(94, 230, 255, 0.1) 1px, transparent 1px),
    repeating-linear-gradient(45deg, rgba(232,251,255,0.025) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(135deg, rgba(255, 209, 102, 0.045) 0 1px, transparent 1px 34px),
    linear-gradient(115deg, #04121e 0%, #092d4c 47%, #071a30 74%, #17152c 100%);
  background-size: auto, 34px 34px, 34px 34px, 220px 220px, 170px 170px, auto;
}

body.keyboard-memory-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.12), transparent 9%),
    radial-gradient(circle at 78% 12%, rgba(94,230,255,0.16), transparent 10%),
    linear-gradient(120deg, transparent 0 12%, rgba(232,251,255,0.09) 12.2% 12.6%, transparent 12.8% 58%, rgba(255,209,102,0.08) 58.2% 58.7%, transparent 59%),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(232,251,255,0.05) 68px 70px);
  mix-blend-mode: screen;
  opacity: 0.86;
}

body.keyboard-memory-page .product-shell {
  min-height: 100vh;
  height: 100vh;
  gap: 0;
  padding: 8px;
}

body.keyboard-memory-page .product-surface {
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(100vh - 16px);
  border: 0;
  padding: 0;
  background: transparent;
}

.product-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: clamp(20px, 4vw, 56px);
}

.product-start,
.product-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: clamp(20px, 3vw, 36px);
}

.product-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1 { margin: 0; font-size: clamp(30px, 5vw, 56px); }
p, li, td, th { line-height: 1.6; }

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

button.done { background: var(--accent-2); }

.product-surface {
  display: block;
  outline: none;
}

.has-start-port .product-surface {
  display: none;
}

body.started .has-start-port .product-surface {
  display: block;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.schedule-table th,
.schedule-table td {
  min-width: 110px;
  border: 1px solid var(--line);
  padding: 12px;
  text-align: center;
}

.schedule-table th {
  color: #fff;
  background: var(--accent);
}

.simple-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.simple-list li,
.single-product,
.calculator-product,
.notes-product,
.timer-product,
.ledger-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.calculator-product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.calculator-product input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.notes-product {
  display: grid;
  gap: 12px;
}

.notes-product textarea {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}

.timer-product {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.timer-product strong {
  font-size: 48px;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  padding: 0;
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.manager-table th,
.manager-table td,
.ledger-table th,
.ledger-table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

.manager-table th {
  color: #fff;
  background: var(--accent);
}

.guess-game {
  display: grid;
  gap: 16px;
  max-width: 680px;
}

.guess-game-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
}

.guess-game-card h2 {
  margin: 0;
  color: var(--accent);
}

.guess-game-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.guess-game-controls input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.guess-game-message {
  min-height: 32px;
  color: #2f8b57;
  font-weight: 800;
}

.game-product {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.game-head,
.game-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.game-head h2 {
  margin: 0 0 8px;
  color: var(--accent);
}

.game-stats,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.game-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbfd;
  font-weight: 800;
}

.defense-board {
  display: grid;
  gap: 10px;
}

.defense-lane {
  display: grid;
  grid-template-columns: repeat(6, minmax(42px, 1fr));
  gap: 6px;
}

.defense-cell {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf7ef;
  font-weight: 900;
}

.defense-cell.enemy {
  color: #fff;
  background: #9d3d2f;
}

.defense-cell.plant {
  color: #fff;
  background: #2f8b57;
}

.arcade-target {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: #eef7fb;
}

.arcade-target button {
  min-width: 120px;
  min-height: 64px;
  font-size: 18px;
}

.keyboard-game {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(100%, 1220px);
  height: 100%;
  gap: 10px;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(94, 230, 255, 0.48);
  border-radius: 8px;
  padding: clamp(10px, 1.4vw, 18px);
  color: #edfaff;
  background:
    linear-gradient(115deg, rgba(94, 230, 255, 0.08), transparent 34%, rgba(255, 209, 102, 0.055) 62%, transparent 82%),
    linear-gradient(90deg, rgba(94, 230, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(94, 230, 255, 0.11) 1px, transparent 1px),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 136px),
    linear-gradient(135deg, #06131f 0%, #0b2d49 48%, #111832 100%);
  background-size: auto, 34px 34px, 34px 34px, 192px 192px, 136px 136px, auto;
  box-shadow:
    inset 0 0 0 1px rgba(232,251,255,0.1),
    inset 0 0 0 3px rgba(3, 17, 30, 0.62),
    inset 0 0 44px rgba(94, 230, 255, 0.09),
    inset 0 -34px 80px rgba(0, 9, 24, 0.22),
    0 18px 42px rgba(5, 16, 26, 0.28),
    0 0 34px rgba(94, 230, 255, 0.12),
    0 0 0 1px rgba(255, 209, 102, 0.08);
}

.keyboard-game::before,
.keyboard-game::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.keyboard-game::before {
  background:
    linear-gradient(135deg, transparent 0 28%, rgba(255,255,255,0.08) 28.15%, transparent 28.45% 63%, rgba(94, 230, 255, 0.1) 63.15%, transparent 63.45%),
    linear-gradient(90deg, transparent 0 10%, rgba(94, 230, 255, 0.14) 10.3%, transparent 10.7% 52%, rgba(255, 209, 102, 0.1) 52.2%, transparent 52.5%),
    linear-gradient(0deg, transparent 0 22%, rgba(94, 230, 255, 0.12) 22.2%, transparent 22.5% 68%, rgba(255, 209, 102, 0.08) 68.2%, transparent 68.5%);
  mix-blend-mode: screen;
  opacity: 0.92;
}

.keyboard-game::after {
  box-shadow:
    inset 0 0 0 1px rgba(94, 230, 255, 0.32),
    inset 0 0 0 2px rgba(3, 16, 28, 0.52),
    inset 0 0 34px rgba(94, 230, 255, 0.16),
    inset 0 0 80px rgba(0, 8, 22, 0.18);
}

.keyboard-game > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.keyboard-hero {
  display: grid;
  gap: 8px;
}

.keyboard-hero h2,
.keyboard-hero p {
  margin: 0;
}

.keyboard-hero h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.keyboard-stats,
.keyboard-actions,
.reward-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyboard-stats span,
.performance-mode-button,
.health-check-button,
.health-run-button,
.reward-badge {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(129, 232, 255, 0.62);
  border-radius: 8px;
  padding: 6px 9px;
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(16, 75, 112, 0.9), rgba(4, 25, 46, 0.86)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 14px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.2),
    inset 0 -8px 16px rgba(0, 12, 28, 0.2),
    0 0 17px rgba(94, 230, 255, 0.16),
    0 2px 0 rgba(0, 10, 22, 0.56);
  font-weight: 900;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(94,230,255,0.18);
}

.keyboard-security-cutoff {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(255, 102, 102, 0.85);
  border-radius: 8px;
  padding: 8px 11px;
  color: #ffe5e5;
  background:
    linear-gradient(135deg, rgba(113, 17, 32, 0.96), rgba(42, 7, 18, 0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 22px rgba(255, 70, 70, 0.34);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.keyboard-security-cutoff[hidden] {
  display: none;
}

.performance-mode-button,
.health-check-button,
.health-run-button,
.daily-challenge-button,
.promotion-close,
.promotion-action {
  min-height: 34px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.network-status-badge[data-state="offline"],
.network-status-badge[data-state="fail"] {
  border-color: rgba(255, 120, 120, 0.78);
  color: #ffe2e2;
  background: linear-gradient(180deg, rgba(117, 28, 44, 0.94), rgba(43, 9, 24, 0.9));
}

.network-status-badge[data-state="syncing"],
.network-status-badge[data-state="running"] {
  border-color: rgba(255, 209, 102, 0.78);
  color: #fff4c7;
  background: linear-gradient(180deg, rgba(114, 83, 20, 0.94), rgba(44, 31, 8, 0.9));
}

.performance-mode-button[data-state="on"] {
  border-color: rgba(126, 231, 135, 0.78);
  color: #e8ffe9;
  background: linear-gradient(180deg, rgba(31, 102, 64, 0.94), rgba(8, 43, 28, 0.9));
}

.keyboard-shop-button {
  min-width: 74px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  padding: 6px 13px;
  color: #fff;
  background:
    linear-gradient(180deg, #fff4b4 0%, #ffd166 36%, #d89318 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 4px 0 #8b5a0f,
    0 0 20px rgba(255, 209, 102, 0.34);
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(69, 26, 3, 0.38);
  cursor: pointer;
}

.keyboard-shop-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 5px 0 #8b5a0f,
    0 0 26px rgba(255, 209, 102, 0.5);
}

.level-shop-status-button {
  width: 144px;
  min-height: 40px;
  font-size: 15px;
}

.keyboard-stats span::after,
.reward-badge::after {
  content: "";
  position: absolute;
  inset: 1px 2px auto;
  height: 38%;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent);
  pointer-events: none;
}

.keyboard-stats span::before,
.reward-badge::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.95), rgba(94, 230, 255, 0.7));
  box-shadow: 0 0 12px rgba(94, 230, 255, 0.42);
}

.reward-badge.unlocked {
  border-color: #ffd166;
  color: #1d1606;
  background: #ffd166;
}

.keyboard-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(129, 232, 255, 0.26);
  border-radius: 8px;
  padding: clamp(14px, 2vw, 20px);
  background: rgba(7, 18, 31, 0.78);
}

.target-key {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px solid rgba(255, 209, 102, 0.72);
  border-radius: 8px;
  color: #ffd166;
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.16), rgba(94, 230, 255, 0.06) 45%, rgba(255, 209, 102, 0.13)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 28px),
    rgba(255, 209, 102, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -14px 28px rgba(0, 0, 0, 0.16),
    0 0 24px rgba(255, 209, 102, 0.15),
    0 0 34px rgba(94, 230, 255, 0.08),
    0 6px 0 rgba(65, 42, 8, 0.32);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.38),
    0 0 20px rgba(255, 209, 102, 0.62);
}

.target-key::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 26%, rgba(255,255,255,0.18) 26.3%, transparent 26.8% 72%, rgba(94,230,255,0.12) 72.3%, transparent 72.8%),
    linear-gradient(0deg, transparent 0 48%, rgba(255,209,102,0.12) 48.3%, transparent 48.8%);
  animation: targetKeySweep 3.8s linear infinite;
}

.target-key::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    inset 0 0 22px rgba(255,209,102,0.18),
    inset 0 0 0 2px rgba(255,209,102,0.08);
}

@keyframes targetKeySweep {
  0% { background-position: -120px 0, 0 0; }
  100% { background-position: 120px 0, 0 0; }
}

.keyboard-grid {
  display: grid;
  gap: 10px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.keyboard-key {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(34px, 7vw, 62px);
  min-height: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(129, 232, 255, 0.46);
  border-radius: 8px;
  padding: 0;
  color: #c9f6ff;
  background:
    linear-gradient(180deg, #1b4360 0%, #0d2a42 58%, #071927 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 14px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    inset 0 -10px 18px rgba(0, 10, 22, 0.28),
    0 6px 0 #04111c,
    0 0 14px rgba(94, 230, 255, 0.12),
    0 0 0 1px rgba(255,255,255,0.025);
  font-size: clamp(16px, 3vw, 24px);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(94,230,255,0.32);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.keyboard-key::after {
  content: "";
  position: absolute;
  inset: 3px 5px auto;
  height: 28%;
  border-radius: 6px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
}

.keyboard-key.active {
  border-color: #ffd166;
  color: #101722;
  background:
    linear-gradient(180deg, #fff0a8, #ffd166 55%, #e5a92b);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.58),
    0 6px 0 #946b11,
    0 0 26px rgba(255, 209, 102, 0.58);
  text-shadow: 0 1px 0 rgba(255,255,255,0.42);
}

.keyboard-key:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.16),
    0 3px 0 #04111c,
    0 0 12px rgba(94, 230, 255, 0.12);
}

.keyboard-key.correct {
  border-color: #7ee787;
  color: #071b10;
  background: #7ee787;
}

.keyboard-key.wrong {
  border-color: #ff6b6b;
  color: #fff;
  background: #c03232;
}

.keyboard-play-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 350px;
  gap: 12px;
  align-items: start;
  min-height: 0;
}

.keyboard-play-wrap .keyboard-grid {
  position: relative;
  overflow: hidden;
  gap: 7px;
  border: 1px solid rgba(129, 232, 255, 0.32);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(7, 34, 55, 0.68), rgba(3, 18, 34, 0.48)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.055) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.1),
    inset 0 -18px 34px rgba(0, 9, 24, 0.2),
    0 12px 28px rgba(0,0,0,0.18),
    0 0 22px rgba(94,230,255,0.08),
    0 0 0 1px rgba(255,209,102,0.035);
}

.keyboard-play-wrap .keyboard-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(94,230,255,0.11) 18.2%, transparent 18.5% 76%, rgba(255,209,102,0.08) 76.2%, transparent 76.5%),
    linear-gradient(0deg, transparent 0 48%, rgba(255,255,255,0.06) 48.2%, transparent 48.5%);
}

.keyboard-play-wrap .keyboard-grid::after {
  content: "";
  position: absolute;
  inset: auto 10px 8px;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.76), rgba(94,230,255,0.72), transparent);
  box-shadow: 0 0 14px rgba(94,230,255,0.24);
}

.keyboard-play-wrap .keyboard-grid > * {
  position: relative;
  z-index: 1;
}

.keyboard-play-wrap .keyboard-row {
  gap: 5px;
}

.keyboard-play-wrap .keyboard-key {
  width: 40px;
  font-size: 16px;
}

.keyboard-play-wrap .space-key {
  width: min(270px, 100%);
}

.level-star-board {
  align-self: start;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(129, 232, 255, 0.52);
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(8, 49, 81, 0.98), rgba(3, 22, 40, 0.96)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.08) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    inset 0 -16px 26px rgba(0,0,0,0.18),
    0 14px 34px rgba(0,0,0,0.3),
    0 0 22px rgba(94,230,255,0.1);
}

.level-star-board::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94,230,255,0.75), rgba(255,209,102,0.5), transparent);
  pointer-events: none;
}

.star-board-title {
  margin-bottom: 5px;
  color: #e8fbff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

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

.level-star-row {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  column-gap: 2px;
  align-items: center;
  min-height: 16px;
  border: 1px solid rgba(129, 232, 255, 0.16);
  border-radius: 6px;
  padding: 2px 3px;
  background: rgba(7, 18, 31, 0.56);
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.06);
}

.level-star-row.current {
  border-color: rgba(255, 209, 102, 0.72);
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.18), rgba(255, 209, 102, 0.08)),
    rgba(7, 18, 31, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 10px rgba(255,209,102,0.14);
}

.level-star-label {
  min-width: 0;
  overflow: hidden;
  color: #c9f6ff;
  font-size: 9px;
  font-weight: 900;
}

.level-star-icons {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-right: 3px;
  box-sizing: border-box;
  color: #ffd166;
  font-size: 9px;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
  transform: translateX(-1px);
}

.level-star-icons.empty {
  color: rgba(149, 230, 255, 0.28);
  text-shadow: none;
}

.level-leaderboard {
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  min-height: 208px;
  transform: translateX(-18px);
}

.leaderboard-star-button {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  min-height: 0;
  padding: 0;
  color: #101722;
  background:
    linear-gradient(145deg, #fff4b4 0%, #ffd166 42%, #eea72b 74%, #bf7412 100%);
  clip-path: polygon(50% 2%, 62% 35%, 97% 35%, 69% 56%, 80% 91%, 50% 70%, 20% 91%, 31% 56%, 3% 35%, 38% 35%);
  filter:
    drop-shadow(0 2px 0 #071622)
    drop-shadow(0 -2px 0 #071622)
    drop-shadow(2px 0 0 #071622)
    drop-shadow(-2px 0 0 #071622)
    drop-shadow(0 14px 22px rgba(0,0,0,0.42))
    drop-shadow(0 0 18px rgba(255,209,102,0.34));
  cursor: pointer;
  transition: transform 130ms ease, filter 130ms ease, background 130ms ease;
}

.leaderboard-star-button::before {
  content: "";
  position: absolute;
  inset: 16px 22px 38px;
  z-index: -1;
  background: linear-gradient(135deg, rgba(255,255,255,0.74), transparent 54%);
  opacity: 0.8;
}

.leaderboard-star-button::after {
  content: "";
  position: absolute;
  inset: 34px 34px 52px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 0 18px rgba(255,255,255,0.28);
}

.leaderboard-star-button:hover {
  background:
    linear-gradient(145deg, #fff8cf 0%, #ffe08a 42%, #f1b333 74%, #c77e16 100%);
  transform: translateY(-1px);
  filter:
    drop-shadow(0 2px 0 #071622)
    drop-shadow(0 -2px 0 #071622)
    drop-shadow(2px 0 0 #071622)
    drop-shadow(-2px 0 0 #071622)
    drop-shadow(0 16px 24px rgba(0,0,0,0.46))
    drop-shadow(0 0 24px rgba(255,209,102,0.5));
}

.leaderboard-star-button:active,
.ultimate-leaderboard-button:active,
.my-record-button:active,
.level-shop-status-button:active,
.page-return-button:active,
.replay-all-button:active,
.record-round-button:active {
  transform: translateY(2px);
}

.leaderboard-star-button:focus-visible,
.ultimate-leaderboard-button:focus-visible,
.my-record-button:focus-visible,
.level-shop-status-button:focus-visible,
.page-return-button:focus-visible,
.replay-all-button:focus-visible,
.record-round-button:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.9);
  outline-offset: 3px;
}

.leaderboard-star-text {
  position: relative;
  z-index: 1;
  width: 58px;
  color: #101722;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,0.38);
}

.leaderboard-panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 350px);
  border: 1px solid rgba(129, 232, 255, 0.52);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(8, 42, 69, 0.96), rgba(3, 23, 39, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.16),
    inset 0 -18px 28px rgba(0, 8, 20, 0.18),
    0 14px 34px rgba(0,0,0,0.28),
    0 0 20px rgba(94,230,255,0.1);
}

.leaderboard-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,209,102,0.76), rgba(94,230,255,0.66), transparent);
  pointer-events: none;
}

.leaderboard-title {
  margin-bottom: 8px;
  color: #ffd166;
  font-size: 14px;
  font-weight: 900;
}

.leaderboard-list {
  display: grid;
  gap: 6px;
  max-height: 188px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #5ee6ff rgba(7, 18, 31, 0.7);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 56px minmax(42px, 1fr) 62px 50px 40px 50px;
  gap: 3px;
  align-items: center;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid rgba(129, 232, 255, 0.24);
  border-radius: 6px;
  padding: 4px;
  background:
    linear-gradient(180deg, rgba(12, 55, 86, 0.84), rgba(5, 25, 45, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.1),
    0 1px 0 rgba(0,0,0,0.28),
    0 0 10px rgba(94,230,255,0.06);
  color: #c9f6ff;
  font-size: 10px;
  font-weight: 800;
}

.leaderboard-row span,
.leaderboard-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-row:nth-child(1) {
  border-color: rgba(255, 209, 102, 0.5);
  background:
    linear-gradient(180deg, rgba(61, 56, 23, 0.72), rgba(8, 32, 54, 0.78));
}

.leaderboard-row:hover,
.board-page-row:hover,
.record-level-row:hover {
  border-color: rgba(129, 232, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.16),
    0 0 18px rgba(94,230,255,0.18);
}

.leaderboard-empty {
  border: 1px solid rgba(129, 232, 255, 0.18);
  border-radius: 6px;
  padding: 8px;
  color: #95e6ff;
  background: rgba(7, 18, 31, 0.5);
  font-size: 11px;
  font-weight: 800;
}

.leaderboard-stars {
  min-width: 62px;
  color: #ffd166;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.42);
}

.leaderboard-name,
.leaderboard-rank,
.leaderboard-score,
.leaderboard-accuracy,
.leaderboard-time {
  min-width: 0;
  white-space: nowrap;
}

.leaderboard-rank {
  color: #ffd166;
}

.leaderboard-score,
.leaderboard-accuracy,
.leaderboard-time {
  color: #e8fbff;
}

.ultimate-leaderboard-button {
  position: relative;
  overflow: hidden;
  width: 144px;
  min-height: 38px;
  border: 1px solid rgba(129, 232, 255, 0.86);
  border-radius: 8px;
  padding: 7px 12px;
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(48, 181, 255, 0.98), rgba(8, 82, 156, 0.97) 56%, rgba(5, 41, 92, 0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.44),
    inset 0 -10px 18px rgba(0, 12, 38, 0.36),
    0 6px 0 rgba(1, 21, 46, 0.88),
    0 0 22px rgba(94, 230, 255, 0.48);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.ultimate-leaderboard-button::after,
.my-record-button::after,
.page-return-button::after,
.replay-all-button::after,
.record-round-button::after {
  content: "";
  position: absolute;
  inset: 1px 3px auto;
  height: 36%;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}

.ultimate-leaderboard-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.42),
    inset 0 -8px 18px rgba(0, 12, 38, 0.35),
    0 0 24px rgba(94, 230, 255, 0.62);
}

.my-record-button {
  position: relative;
  overflow: hidden;
  width: 144px;
  min-height: 38px;
  border: 1px solid rgba(94, 230, 255, 0.9);
  border-radius: 8px;
  padding: 7px 12px;
  color: #052033;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.99), rgba(198, 216, 230, 0.96) 58%, rgba(142, 168, 190, 0.96)),
    repeating-linear-gradient(90deg, rgba(11, 97, 156, 0.24) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(11, 97, 156, 0.16) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -10px 18px rgba(38, 74, 104, 0.24),
    0 0 0 1px rgba(94, 230, 255, 0.22),
    0 6px 0 rgba(45, 74, 98, 0.64),
    0 0 22px rgba(94, 230, 255, 0.45);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.my-record-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -8px 18px rgba(38, 74, 104, 0.22),
    0 0 0 1px rgba(94, 230, 255, 0.28),
    0 0 28px rgba(94, 230, 255, 0.68);
}

.my-record-button:disabled,
.record-round-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 12px rgba(94, 230, 255, 0.18);
}

.my-record-empty-note {
  width: min(100%, 230px);
  margin: 0;
  border: 1px solid rgba(255, 209, 102, 0.36);
  border-radius: 8px;
  padding: 8px 10px;
  color: #ffd166;
  background: rgba(7, 18, 31, 0.42);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.record-page-note {
  width: min(100%, 1120px);
  min-height: 44px;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.ultimate-leaderboard-panel {
  width: min(100%, 390px);
  max-height: 430px;
  border: 1px solid rgba(129, 232, 255, 0.5);
  border-radius: 8px;
  padding: 10px;
  overflow-y: auto;
  background:
    linear-gradient(135deg, rgba(3, 25, 48, 0.98), rgba(4, 18, 38, 0.96)),
    repeating-linear-gradient(0deg, rgba(129,232,255,0.08) 0 1px, transparent 1px 16px);
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.16), 0 16px 38px rgba(0,0,0,0.34);
  scrollbar-color: #5ee6ff rgba(7, 18, 31, 0.7);
}

.ultimate-leaderboard-title {
  margin-bottom: 8px;
  color: #5ee6ff;
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(94, 230, 255, 0.55);
}

.ultimate-player-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(129, 232, 255, 0.24);
  border-radius: 8px;
  padding: 8px;
  background: rgba(7, 18, 31, 0.62);
}

.ultimate-player-card + .ultimate-player-card {
  margin-top: 8px;
}

.ultimate-player-head {
  display: grid;
  grid-template-columns: 70px minmax(34px, 1fr) 58px 42px 72px;
  gap: 4px;
  align-items: center;
  color: #c9f6ff;
  font-size: 10px;
  font-weight: 900;
}

.ultimate-success-rank {
  color: #ffd166;
}

.ultimate-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ultimate-finished-time {
  margin: 0;
  color: #95e6ff;
  font-size: 10px;
  font-weight: 800;
}

.ultimate-level-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-color: #5ee6ff rgba(7, 18, 31, 0.7);
}

.ultimate-level-item {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) 38px 42px 34px 34px;
  gap: 3px;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(129, 232, 255, 0.16);
  border-radius: 6px;
  padding: 3px 4px;
  color: #c9f6ff;
  background: rgba(8, 42, 69, 0.48);
  font-size: 9px;
  font-weight: 800;
}

.ultimate-level-item b,
.ultimate-level-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-board-page,
.stage-record-page {
  align-content: start;
  gap: 14px;
  min-height: min(820px, calc(100vh - 24px));
  padding: 14px;
}

.stage-board-page {
  overflow-y: auto;
}

.board-page-head {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: min(100%, 1120px);
  border: 1px solid rgba(129, 232, 255, 0.62);
  border-radius: 8px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(6, 68, 120, 0.99), rgba(3, 25, 55, 0.98) 62%, rgba(14, 20, 50, 0.98)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.12) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.22),
    inset 0 -18px 30px rgba(0, 14, 30, 0.22),
    0 16px 34px rgba(0,0,0,0.3),
    0 0 26px rgba(94,230,255,0.18),
    0 0 0 1px rgba(255,209,102,0.08);
}

.board-page-head::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(255,209,102,0.9), rgba(94,230,255,0.78));
  box-shadow: 0 0 18px rgba(94,230,255,0.45);
}

.board-page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.9), rgba(94,230,255,0.82), transparent);
}

.board-page-head > * {
  position: relative;
  z-index: 1;
}

.board-page-head h2 {
  margin: 0;
  color: #e8fbff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.board-page-head p {
  margin: 3px 0 0;
  color: #95e6ff;
  font-size: 13px;
  font-weight: 800;
}

.page-return-button {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  border: 1px solid rgba(129, 232, 255, 0.78);
  border-radius: 8px;
  padding: 6px 12px;
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(35, 159, 235, 0.98), rgba(4, 62, 124, 0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.3),
    inset 0 -8px 16px rgba(0, 18, 42, 0.28),
    0 0 20px rgba(94,230,255,0.34);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.page-return-button.secondary {
  background: linear-gradient(180deg, rgba(54, 73, 96, 0.96), rgba(18, 39, 65, 0.96));
}

.replay-all-button {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  border: 1px solid rgba(116, 255, 177, 0.78);
  border-radius: 8px;
  padding: 7px 14px;
  color: #eafff4;
  background:
    linear-gradient(180deg, rgba(25, 188, 108, 0.98), rgba(4, 92, 62, 0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.13) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(232,255,244,0.32),
    inset 0 -8px 16px rgba(0, 34, 22, 0.36),
    0 0 20px rgba(72, 255, 159, 0.42);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.replay-all-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(232,255,244,0.38),
    inset 0 -8px 16px rgba(0, 34, 22, 0.36),
    0 0 28px rgba(72, 255, 159, 0.64);
}

.board-page-panel {
  width: min(100%, 1120px);
  position: relative;
  overflow: hidden;
  border-color: rgba(129, 232, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(4, 36, 66, 0.98), rgba(3, 20, 38, 0.98)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.06) 0 1px, transparent 1px 20px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    inset 0 -24px 42px rgba(0, 9, 24, 0.18),
    0 18px 42px rgba(0,0,0,0.3),
    0 0 28px rgba(94,230,255,0.12);
}

.board-page-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(94,230,255,0.1) 8.2%, transparent 8.5% 72%, rgba(255,209,102,0.08) 72.2%, transparent 72.5%),
    linear-gradient(0deg, transparent 0 58%, rgba(94,230,255,0.08) 58.2%, transparent 58.5%);
}

.board-page-panel > * {
  position: relative;
  z-index: 1;
}

.shop-panel {
  display: grid;
  gap: 12px;
}

.shop-title {
  color: #e8fbff;
  font-size: 20px;
  font-weight: 900;
}

.shop-wallet {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 209, 102, 0.58);
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff4c7;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(94, 230, 255, 0.12)),
    rgba(7, 24, 45, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 0 22px rgba(255, 209, 102, 0.14);
  font-weight: 900;
  line-height: 1.25;
}

.shop-note {
  margin: 0;
  color: #fff4c7;
  font-weight: 900;
}

.shop-note {
  min-height: 20px;
  color: #ffd166;
}

.shop-game-list {
  display: grid;
  gap: 12px;
}

.shop-history {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(129, 232, 255, 0.26);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(8, 36, 58, 0.72), rgba(3, 18, 35, 0.8)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.055) 0 1px, transparent 1px 16px);
}

.shop-history-title {
  color: #e8fbff;
  font-size: 15px;
  font-weight: 900;
}

.shop-history-empty {
  margin: 0;
  color: #8fdcef;
  font-size: 13px;
  font-weight: 800;
}

.shop-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(94, 230, 255, 0.2);
  border-radius: 8px;
  padding: 7px 9px;
  color: #dffaff;
  background: rgba(3, 22, 40, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.shop-history-game {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-history-cost {
  color: #fff4c7;
}

.shop-history-time {
  color: #b9f2ff;
}

.shop-game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 209, 102, 0.44);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(10, 45, 70, 0.86), rgba(5, 22, 40, 0.94)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.08) 0 1px, transparent 1px 20px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 14px 30px rgba(0,0,0,0.24),
    0 0 24px rgba(255, 209, 102, 0.08);
}

.shop-game-card-sale {
  border-color: rgba(255, 209, 102, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 16px 34px rgba(0,0,0,0.28),
    0 0 30px rgba(255, 209, 102, 0.28),
    0 0 26px rgba(94, 230, 255, 0.16);
}

.shop-game-info {
  display: grid;
  gap: 8px;
}

.shop-game-name {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(94,230,255,0.26);
}

.shop-game-price {
  width: fit-content;
  border: 1px solid rgba(255, 209, 102, 0.5);
  border-radius: 8px;
  padding: 5px 9px;
  color: #101722;
  background: linear-gradient(180deg, #fff4b4, #ffd166);
  font-weight: 900;
}

.shop-game-price.discounted {
  color: #130d02;
  background:
    linear-gradient(180deg, #fff8c9, #ffd166 42%, #f59e0b),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 0 18px rgba(255, 209, 102, 0.36);
}

.shop-game-description {
  max-width: 560px;
  margin: 0;
  color: #b9f2ff;
  font-weight: 800;
}

.shop-game-media {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.shop-game-preview {
  position: relative;
  overflow: hidden;
  width: 240px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #d8f0b0 0 28%, #84c45d 29% 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 20px rgba(0,0,0,0.22);
}

.shop-preview-houses {
  position: absolute;
  inset: 18px auto 12px 8px;
  display: grid;
  gap: 8px;
  width: 34px;
}

.shop-preview-houses span {
  position: relative;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff7ed, #dbeafe);
  box-shadow: 0 2px 5px rgba(15,23,42,0.22);
}

.shop-preview-houses span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -8px;
  width: 27px;
  height: 16px;
  clip-path: polygon(50% 0, 100% 58%, 88% 100%, 12% 100%, 0 58%);
  background: linear-gradient(180deg, #64748b, #0f172a);
}

.shop-preview-lawn {
  position: absolute;
  inset: 22px 42px 16px 54px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
}

.shop-preview-lawn i {
  display: block;
  width: 25px;
  height: 34px;
  border-bottom: 8px solid #b45309;
  border-radius: 50% 50% 6px 6px;
  background:
    radial-gradient(ellipse at 60% 30%, #f0fdf4 0 16%, transparent 17%),
    radial-gradient(ellipse at 50% 32%, #bbf7d0 0 24%, #15803d 25% 58%, transparent 59%),
    linear-gradient(180deg, transparent 0 62%, #d97706 63% 100%);
  box-shadow: 0 8px 10px rgba(20,83,45,0.18);
}

.shop-preview-zombie {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 29px;
  height: 58px;
  border-radius: 15px 15px 8px 8px;
  background:
    radial-gradient(circle at 38% 18%, #0f172a 0 6%, transparent 7%),
    radial-gradient(circle at 62% 18%, #0f172a 0 6%, transparent 7%),
    linear-gradient(180deg, #829575 0 32%, #2f3a32 33% 100%);
  box-shadow: -10px 12px 0 -7px #1f2937, 10px 12px 0 -7px #1f2937;
}

.shop-buy-button {
  position: relative;
  width: 110px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 8px 8px 14px 14px;
  color: #fff;
  background: linear-gradient(180deg, #fff4b4, #ffd166 42%, #d89318 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 5px 0 #8b5a0f,
    0 0 22px rgba(255,209,102,0.4);
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(69,26,3,0.38);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shop-buy-button::before {
  content: "";
  position: absolute;
  inset: -10px 26px auto;
  height: 18px;
  border: 4px solid #ffd166;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  filter: drop-shadow(0 1px 0 #8b5a0f);
}

.promotion-announcement {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(115deg, rgba(1, 10, 20, 0.72), rgba(2, 26, 46, 0.82)),
    repeating-linear-gradient(90deg, rgba(94,230,255,0.08) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(255,209,102,0.05) 0 1px, transparent 1px 28px);
  backdrop-filter: blur(8px);
}

.promotion-card {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  border: 1px solid rgba(255, 209, 102, 0.74);
  border-radius: 8px;
  padding: clamp(22px, 5vw, 34px);
  color: #e8fbff;
  background:
    linear-gradient(135deg, rgba(10, 52, 84, 0.98), rgba(4, 17, 34, 0.98)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.08) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -24px 60px rgba(0, 7, 18, 0.28),
    0 22px 60px rgba(0,0,0,0.42),
    0 0 42px rgba(94,230,255,0.28),
    0 0 34px rgba(255,209,102,0.2);
}

.promotion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 11%, rgba(94,230,255,0.14) 11.2%, transparent 11.8% 72%, rgba(255,209,102,0.12) 72.2%, transparent 72.8%),
    linear-gradient(0deg, transparent 0 62%, rgba(232,251,255,0.1) 62.2%, transparent 62.6%);
}

.promotion-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  min-height: 36px;
  border: 1px solid rgba(232,251,255,0.58);
  border-radius: 8px;
  padding: 0;
  color: #e8fbff;
  background: rgba(3, 18, 35, 0.9);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 18px rgba(94,230,255,0.2);
}

.promotion-badge,
.promotion-title,
.promotion-copy,
.promotion-action {
  position: relative;
  z-index: 1;
}

.promotion-badge {
  width: fit-content;
  border: 1px solid rgba(255, 209, 102, 0.7);
  border-radius: 8px;
  padding: 5px 10px;
  color: #130d02;
  background: linear-gradient(180deg, #fff8c9, #ffd166);
  font-size: 12px;
  font-weight: 900;
}

.promotion-title {
  margin: 14px 0 8px;
  color: #ffffff;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.12;
  text-shadow: 0 0 20px rgba(94,230,255,0.42);
}

.promotion-copy {
  margin: 0 0 18px;
  color: #d8f9ff;
  font-weight: 900;
}

.promotion-action {
  min-width: 150px;
}

.board-page-list {
  max-height: min(640px, calc(100vh - 210px));
  padding-right: 4px;
  overflow-y: auto;
}

.board-page-row {
  grid-template-columns: 76px minmax(90px, 1fr) 82px 70px 56px 76px;
  min-height: 34px;
  font-size: 12px;
  border-color: rgba(129, 232, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(10, 48, 78, 0.9), rgba(5, 25, 45, 0.86));
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.12);
}

.board-page-row:nth-child(1) {
  border-color: rgba(255, 209, 102, 0.56);
  background:
    linear-gradient(180deg, rgba(66, 58, 20, 0.82), rgba(8, 34, 58, 0.86));
}

.stage-board-page .ultimate-leaderboard-panel {
  width: min(100%, 1120px);
  max-height: min(680px, calc(100vh - 168px));
  overflow-y: auto;
}

.stage-board-page .ultimate-level-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 360px;
}

.health-panel {
  width: min(100%, 760px);
  display: grid;
  gap: 12px;
  border: 1px solid rgba(129, 232, 255, 0.56);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(6, 42, 70, 0.96), rgba(5, 18, 36, 0.95)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 16px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.16),
    0 18px 42px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(94, 230, 255, 0.14);
}

.health-summary {
  margin: 0;
  color: #c9f6ff;
  font-size: 14px;
  font-weight: 900;
}

.health-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health-run-button {
  min-width: 128px;
  color: #08111f;
  background:
    linear-gradient(180deg, #dffbff, #5ee6ff 48%, #1689bc),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 12px);
}

.health-list {
  display: grid;
  gap: 7px;
}

.health-row {
  display: grid;
  grid-template-columns: 110px 70px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  box-sizing: border-box;
  min-height: 38px;
  max-width: 100%;
  border: 1px solid rgba(129, 232, 255, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
  color: #e8fbff;
  background: rgba(7, 18, 31, 0.64);
  font-size: 12px;
  font-weight: 850;
}

.health-row[data-state="running"] {
  border-color: rgba(255, 209, 102, 0.58);
}

.health-row[data-state="pass"] {
  border-color: rgba(126, 231, 135, 0.62);
}

.health-row[data-state="fail"] {
  border-color: rgba(255, 120, 120, 0.76);
}

.health-status {
  color: #ffd166;
  white-space: nowrap;
}

.health-row[data-state="pass"] .health-status {
  color: #7ee787;
}

.health-row[data-state="fail"] .health-status {
  color: #ffb4b4;
}

.health-detail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-record-fixed-head {
  position: relative;
  overflow: hidden;
  display: grid;
  width: min(100%, 1120px);
  border: 1px solid rgba(129, 232, 255, 0.68);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(7, 76, 140, 0.98), rgba(4, 32, 72, 0.96)),
    repeating-linear-gradient(90deg, rgba(232,251,255,0.12) 0 1px, transparent 1px 20px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.22),
    0 0 26px rgba(94,230,255,0.28);
}

.my-record-fixed-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94,230,255,0.86), rgba(255,209,102,0.76), transparent);
}

.my-record-fixed-head > * {
  position: relative;
  z-index: 1;
}

.my-record-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.my-record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.my-record-fixed-head h2 {
  margin: 0;
  color: #e8fbff;
  font-size: 28px;
  font-weight: 900;
}

.my-record-fixed-head p {
  margin: 4px 0 0;
  color: #95e6ff;
  font-size: 15px;
  font-weight: 900;
}

.record-round-panel,
.record-level-panel {
  width: min(100%, 1120px);
  border: 1px solid rgba(129, 232, 255, 0.44);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(3, 25, 48, 0.98), rgba(4, 18, 38, 0.96));
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.16), 0 16px 38px rgba(0,0,0,0.3);
}

.record-round-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.record-round-button {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  border: 1px solid rgba(129, 232, 255, 0.56);
  border-radius: 8px;
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(10, 116, 188, 0.96), rgba(4, 45, 92, 0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 14px);
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.22), 0 0 18px rgba(94,230,255,0.28);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.record-round-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.3),
    0 6px 0 rgba(1, 21, 46, 0.72),
    0 0 24px rgba(94,230,255,0.42);
}

.record-level-title {
  margin-bottom: 10px;
  color: #5ee6ff;
  font-size: 16px;
  font-weight: 900;
}

.record-level-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.record-level-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  min-height: 72px;
  border: 1px solid rgba(129, 232, 255, 0.28);
  border-radius: 8px;
  padding: 6px;
  color: #c9f6ff;
  background:
    linear-gradient(180deg, rgba(10, 48, 78, 0.86), rgba(5, 25, 45, 0.82));
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.1), 0 0 14px rgba(94,230,255,0.06);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.record-level-row::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(94,230,255,0.52), transparent);
}

.record-level-row span,
.record-level-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-level-row b {
  color: #e8fbff;
  font-size: 13px;
}

.record-stars {
  color: #ffd166;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.4);
}

.keyboard-message {
  position: relative;
  overflow: hidden;
  min-height: 0;
  width: fit-content;
  border: 1px solid rgba(129, 232, 255, 0.66);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(10, 56, 88, 0.94), rgba(4, 24, 42, 0.9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 14px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    inset 0 -8px 16px rgba(0, 12, 28, 0.22),
    0 0 20px rgba(94,230,255,0.16),
    0 2px 0 rgba(0, 8, 18, 0.62);
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(94,230,255,0.22);
}

.keyboard-message::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #ffd166, #5ee6ff);
  box-shadow: 0 0 14px rgba(94,230,255,0.42);
}

.score-breakdown-note {
  min-height: 20px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff4c7;
  background: rgba(5, 24, 42, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 16px rgba(255, 209, 102, 0.1);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.keyboard-flow {
  align-content: start;
}

.nickname-cover {
  position: relative;
  place-items: center;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.11) 1px, transparent 1px),
    repeating-linear-gradient(135deg, rgba(255,209,102,0.05) 0 1px, transparent 1px 36px),
    linear-gradient(135deg, #04172b 0%, #06477a 48%, #061f3d 72%, #161c3b 100%);
  background-size: 38px 38px, 38px 38px, 180px 180px, auto;
}

.nickname-cover::before,
.nickname-cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(129, 232, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(232,251,255,0.12), rgba(5,24,44,0.02)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 16px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 28px rgba(94,230,255,0.2);
}

.nickname-cover::before {
  top: 26px;
  left: 30px;
  width: min(28vw, 280px);
  height: 34px;
  transform: skewX(-22deg);
}

.nickname-cover::after {
  right: 34px;
  bottom: 30px;
  width: min(34vw, 360px);
  height: 42px;
  transform: skewX(-18deg);
}

.nickname-cover-screen {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 760px);
  text-align: center;
}

.nickname-cover-title {
  margin: 0;
  color: #ffd166;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow:
    0 2px 0 #101722,
    0 0 24px rgba(255, 209, 102, 0.55),
    0 0 42px rgba(255, 209, 102, 0.34);
}

.nickname-cover-subtitle {
  margin: 0;
  color: #e8fbff;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(93, 220, 255, 0.5);
}

.nickname-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(100%, 480px);
  border: 1px solid rgba(164, 236, 255, 0.76);
  border-radius: 8px;
  padding: 22px;
  color: #e8fbff;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.11), transparent 18% 76%, rgba(255,209,102,0.08)),
    linear-gradient(135deg, rgba(5, 38, 68, 0.98), rgba(3, 22, 42, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    inset 0 0 0 2px rgba(3, 16, 30, 0.82),
    inset 0 0 34px rgba(94, 230, 255, 0.11),
    inset 0 -22px 38px rgba(0, 12, 28, 0.2),
    0 22px 48px rgba(0,0,0,0.34),
    0 0 30px rgba(93, 220, 255, 0.18),
    0 0 0 1px rgba(255,209,102,0.06);
}

.nickname-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,209,102,0.9), rgba(94,230,255,0.8), transparent);
}

.nickname-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(232,251,255,0.16);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(232,251,255,0.12) 0 2px, transparent 2px calc(100% - 2px), rgba(232,251,255,0.12) calc(100% - 2px)),
    linear-gradient(0deg, rgba(232,251,255,0.12) 0 2px, transparent 2px calc(100% - 2px), rgba(232,251,255,0.12) calc(100% - 2px));
  opacity: 0.84;
}

.nickname-card > * {
  position: relative;
  z-index: 1;
}

.nickname-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 88px;
}

.nickname-star {
  display: block;
  width: 54px;
  height: 54px;
  background: #ffd166;
  clip-path: polygon(50% 2%, 62% 35%, 97% 35%, 69% 56%, 80% 91%, 50% 70%, 20% 91%, 31% 56%, 3% 35%, 38% 35%);
  filter:
    drop-shadow(0 2px 0 #101722)
    drop-shadow(0 -2px 0 #101722)
    drop-shadow(2px 0 0 #101722)
    drop-shadow(-2px 0 0 #101722)
    drop-shadow(0 0 18px rgba(255,209,102,0.5));
}

.nickname-star.big {
  width: 86px;
  height: 86px;
}

.nickname-label {
  color: #70e7ff;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(112, 231, 255, 0.48);
}

.nickname-input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(129, 232, 255, 0.62);
  border-radius: 8px;
  padding: 0 14px;
  color: #e8fbff;
  background: rgba(4, 20, 36, 0.82);
  outline: none;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.12);
}

.lucky-number-input {
  letter-spacing: 2px;
}

.nickname-input:focus {
  border-color: #ffd166;
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.18),
    0 0 0 3px rgba(255, 209, 102, 0.18);
}

.nickname-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.nickname-confirm {
  min-width: 150px;
  color: #101722;
  background: #ffd166;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 6px 0 #946b11;
}

.nickname-confirm:hover {
  background: #ffe08a;
}

.cover-shop-button {
  min-width: 112px;
  min-height: 44px;
  font-size: 15px;
}

.daily-challenge-button {
  min-width: 128px;
  min-height: 44px;
  border: 1px solid rgba(129, 232, 255, 0.74);
  color: #e8fbff;
  background:
    linear-gradient(180deg, rgba(43, 164, 255, 0.96), rgba(9, 70, 126, 0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 12px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 6px 0 #05365f,
    0 0 22px rgba(94, 230, 255, 0.34);
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(94,230,255,0.4);
}

.nickname-error {
  min-height: 20px;
  margin: 0;
  color: #ffb4b4;
  font-size: 13px;
  font-weight: 900;
}

.keyboard-cover,
.win-panel {
  display: grid;
  gap: 16px;
}

.keyboard-cover {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  align-items: center;
  cursor: pointer;
}

.intro-poster {
  width: 100%;
  border: 1px solid rgba(129, 232, 255, 0.44);
  border-radius: 8px;
  background: #071622;
  box-shadow: 0 18px 42px rgba(0,0,0,0.34);
}

.cover-copy {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(129, 232, 255, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 42, 69, 0.96), rgba(3, 23, 39, 0.94));
  box-shadow: inset 0 1px 0 rgba(232,251,255,0.16), 0 18px 42px rgba(0,0,0,0.26);
}

.cover-copy h2,
.typing-head h2,
.win-panel h2 {
  margin: 0;
  color: #e8fbff;
  font-size: clamp(30px, 5vw, 54px);
}

.cover-copy p,
.typing-head p,
.win-panel p {
  margin: 0;
  color: #95e6ff;
  font-weight: 700;
}

.cover-copy strong,
.win-panel strong {
  border: 1px solid rgba(255, 209, 102, 0.56);
  border-radius: 8px;
  padding: 12px 14px;
  color: #101722;
  background: #ffd166;
  font-weight: 900;
}

.typing-head {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(129, 232, 255, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  background:
    linear-gradient(100deg, rgba(8, 42, 69, 0.58), rgba(4, 22, 41, 0.18) 64%, rgba(255, 209, 102, 0.06)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.06) 0 1px, transparent 1px 20px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.1),
    0 0 20px rgba(94,230,255,0.08);
}

.typing-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,209,102,0.72), rgba(94,230,255,0.54), transparent);
  pointer-events: none;
}

.typing-head-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.typing-head h2 {
  font-size: clamp(22px, 3.4vw, 34px);
  text-shadow:
    0 2px 0 rgba(0,0,0,0.36),
    0 0 18px rgba(94,230,255,0.28);
}

.typing-head p {
  font-size: 13px;
  color: #b9f2ff;
  text-shadow: 0 0 12px rgba(94,230,255,0.2);
}

.sequence-track {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 42px;
  max-height: 76px;
  align-items: center;
  border: 1px solid rgba(129, 232, 255, 0.24);
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 7px 8px;
  background:
    linear-gradient(90deg, rgba(6, 30, 50, 0.94), rgba(4, 18, 34, 0.9)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.08) 0 1px, transparent 1px 18px);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.12),
    inset 0 -12px 18px rgba(0, 10, 22, 0.18);
  scrollbar-color: #5ee6ff rgba(7, 18, 31, 0.7);
}

.sequence-token {
  min-width: 30px;
  border: 1px solid rgba(129, 232, 255, 0.36);
  border-radius: 8px;
  padding: 5px 7px;
  text-align: center;
  color: #c9f6ff;
  background:
    linear-gradient(180deg, rgba(21, 64, 92, 0.96), rgba(8, 32, 54, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.12),
    0 3px 0 rgba(1, 12, 22, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.sequence-token.current {
  border-color: #ffd166;
  color: #101722;
  background:
    linear-gradient(180deg, #fff3aa, #ffd166 58%, #e4a524);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.56),
    0 3px 0 #946b11,
    0 0 24px rgba(255, 209, 102, 0.52);
  transform: translateY(-1px);
}

.sequence-token.done {
  border-color: #7ee787;
  color: #071b10;
  background:
    linear-gradient(180deg, #b6ffbf, #7ee787 58%, #43b866);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 3px 0 #238447,
    0 0 16px rgba(126, 231, 135, 0.3);
}

.lesson-note {
  border: 1px solid rgba(255, 209, 102, 0.36);
  border-left: 4px solid #ffd166;
  border-radius: 8px;
  padding: 8px 11px;
  color: #fff8d6;
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.18), rgba(255, 209, 102, 0.08) 42%, rgba(94,230,255,0.06)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 18px);
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.space-row {
  padding-left: 0 !important;
}

.space-key {
  width: min(360px, 70vw);
  aspect-ratio: auto;
}

.sequence-track::-webkit-scrollbar,
.leaderboard-list::-webkit-scrollbar,
.ultimate-leaderboard-panel::-webkit-scrollbar,
.ultimate-level-details::-webkit-scrollbar,
.stage-board-page::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sequence-track::-webkit-scrollbar-track,
.leaderboard-list::-webkit-scrollbar-track,
.ultimate-leaderboard-panel::-webkit-scrollbar-track,
.ultimate-level-details::-webkit-scrollbar-track,
.stage-board-page::-webkit-scrollbar-track {
  background: rgba(7, 18, 31, 0.72);
  border-radius: 999px;
}

.sequence-track::-webkit-scrollbar-thumb,
.leaderboard-list::-webkit-scrollbar-thumb,
.ultimate-leaderboard-panel::-webkit-scrollbar-thumb,
.ultimate-level-details::-webkit-scrollbar-thumb,
.stage-board-page::-webkit-scrollbar-thumb {
  border: 1px solid rgba(232,251,255,0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(94,230,255,0.96), rgba(8,91,155,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.stage-win {
  place-items: center;
}

.win-panel {
  max-width: 720px;
  border: 1px solid rgba(255, 209, 102, 0.56);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  background: rgba(8, 31, 46, 0.82);
}

body.keyboard-memory-page::before,
body.keyboard-memory-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.keyboard-memory-page::before {
  background:
    linear-gradient(72deg, transparent 0 14%, rgba(255, 209, 102, 0.08) 14.2%, transparent 14.8% 72%, rgba(255, 86, 168, 0.055) 72.2%, transparent 72.8%),
    linear-gradient(118deg, transparent 0 22%, rgba(94, 230, 255, 0.075) 22.2%, transparent 22.7% 58%, rgba(126, 231, 135, 0.055) 58.2%, transparent 58.7%);
}

body.keyboard-memory-page::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(255,255,255,0.028) 88px 89px, transparent 89px 176px),
    repeating-linear-gradient(0deg, transparent 0 88px, rgba(255,209,102,0.022) 88px 89px, transparent 89px 176px);
}

body.keyboard-memory-page .product-shell,
body.keyboard-memory-page .product-surface {
  position: relative;
  z-index: 1;
}

.keyboard-game {
  border-color: rgba(94, 230, 255, 0.7);
  background:
    linear-gradient(115deg, rgba(94, 230, 255, 0.1), transparent 30%, rgba(255, 86, 168, 0.06) 52%, rgba(255, 209, 102, 0.065) 68%, transparent 84%),
    linear-gradient(90deg, rgba(94, 230, 255, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(94, 230, 255, 0.12) 1px, transparent 1px),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 136px),
    linear-gradient(135deg, #06131f 0%, #0b2d49 46%, #111832 74%, #20173a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(232,251,255,0.14),
    inset 0 0 0 3px rgba(3, 17, 30, 0.62),
    inset 0 0 52px rgba(94, 230, 255, 0.12),
    inset 0 -34px 80px rgba(0, 9, 24, 0.22),
    0 18px 42px rgba(5, 16, 26, 0.3),
    0 0 38px rgba(94, 230, 255, 0.18),
    0 0 0 1px rgba(255, 209, 102, 0.12);
}

body.keyboard-low-performance *,
body.keyboard-low-performance *::before,
body.keyboard-low-performance *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body.keyboard-low-performance .keyboard-game,
body.keyboard-low-performance .typing-head,
body.keyboard-low-performance .board-page-head,
body.keyboard-low-performance .target-key,
body.keyboard-low-performance .keyboard-key,
body.keyboard-low-performance .leaderboard-panel,
body.keyboard-low-performance .health-panel,
body.keyboard-low-performance .shop-panel {
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.14),
    0 0 14px rgba(94,230,255,0.1);
}

body.keyboard-low-performance .target-key::before,
body.keyboard-low-performance .sequence-token.current::after,
body.keyboard-low-performance .keyboard-key::after {
  display: none;
}

body.keyboard-power-dim .keyboard-game {
  filter: brightness(0.82) saturate(0.92);
}

.typing-head,
.board-page-head,
.my-record-fixed-head {
  border-color: rgba(129, 232, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(232,251,255,0.24),
    inset 0 -16px 30px rgba(0, 12, 30, 0.22),
    0 0 26px rgba(94,230,255,0.18),
    0 0 0 1px rgba(255,209,102,0.08);
}

.typing-head h2,
.board-page-head h2,
.my-record-fixed-head h2 {
  color: #f5fdff;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.42),
    0 0 18px rgba(94,230,255,0.36),
    0 0 26px rgba(255,209,102,0.16);
}

.keyboard-stats span {
  border-color: rgba(129, 232, 255, 0.76);
}

.keyboard-stats span:nth-child(2) {
  border-color: rgba(255, 209, 102, 0.74);
  color: #fff4c7;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -8px 16px rgba(0, 12, 28, 0.2),
    0 0 18px rgba(255, 209, 102, 0.26),
    0 2px 0 rgba(0, 10, 22, 0.56);
}

.target-key {
  border-color: rgba(255, 209, 102, 0.9);
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.22), rgba(94, 230, 255, 0.08) 42%, rgba(255, 86, 168, 0.08) 62%, rgba(255, 209, 102, 0.18)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 28px),
    rgba(255, 209, 102, 0.09);
  text-shadow:
    0 3px 0 rgba(0,0,0,0.42),
    0 0 18px rgba(255, 209, 102, 0.72),
    0 0 28px rgba(255, 86, 168, 0.18);
}

.sequence-token.current {
  border-color: rgba(255, 209, 102, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.58),
    0 3px 0 #946b11,
    0 0 24px rgba(255, 209, 102, 0.6),
    0 0 0 1px rgba(255, 86, 168, 0.18);
  animation: currentTokenFlash 1.4s ease-in-out infinite;
}

@keyframes currentTokenFlash {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 3px 0 #946b11, 0 0 20px rgba(255, 209, 102, 0.48), 0 0 0 1px rgba(255, 86, 168, 0.12); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 3px 0 #946b11, 0 0 28px rgba(255, 209, 102, 0.72), 0 0 0 1px rgba(255, 86, 168, 0.26); }
}

.keyboard-key {
  border-color: rgba(129, 232, 255, 0.58);
}

.keyboard-key.active {
  border-color: rgba(255, 209, 102, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.64),
    inset 0 -10px 16px rgba(113, 68, 6, 0.18),
    0 6px 0 #946b11,
    0 0 30px rgba(255, 209, 102, 0.66),
    0 0 0 1px rgba(255, 86, 168, 0.12);
}

.leaderboard-star-button {
  background:
    linear-gradient(145deg, #fff8cf 0%, #ffd166 38%, #ffb12d 70%, #c96f13 100%);
  filter:
    drop-shadow(0 2px 0 #071622)
    drop-shadow(0 -2px 0 #071622)
    drop-shadow(2px 0 0 #071622)
    drop-shadow(-2px 0 0 #071622)
    drop-shadow(0 16px 24px rgba(0,0,0,0.44))
    drop-shadow(0 0 24px rgba(255,209,102,0.46));
}

.ultimate-leaderboard-button,
.my-record-button,
.page-return-button,
.replay-all-button,
.record-round-button {
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.leaderboard-row:nth-child(1),
.board-page-row:nth-child(1) {
  border-color: rgba(255, 209, 102, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 18px rgba(255,209,102,0.14);
}

.nickname-card {
  background:
    linear-gradient(135deg, rgba(5, 44, 78, 0.98), rgba(3, 22, 42, 0.96) 58%, rgba(27, 23, 62, 0.94)),
    repeating-linear-gradient(90deg, rgba(129,232,255,0.07) 0 1px, transparent 1px 18px);
}

@media (max-width: 760px) {
  body.keyboard-memory-page {
    overflow: auto;
  }
  body.keyboard-memory-page .product-shell {
    min-height: 100vh;
    height: auto;
  }
  body.keyboard-memory-page .product-surface {
    min-height: calc(100vh - 16px);
    height: auto;
    align-items: start;
  }
  .product-start { align-items: stretch; flex-direction: column; }
  .schedule-table { display: block; overflow-x: auto; }
  .guess-game-controls { grid-template-columns: 1fr; }
  .keyboard-game {
    width: 100%;
    height: auto;
    min-height: calc(100vh - 16px);
    overflow: visible;
    padding: 10px;
  }
  .keyboard-cover { grid-template-columns: 1fr; }
  .keyboard-play-wrap { grid-template-columns: minmax(0, 1fr); }
  .keyboard-play-wrap {
    width: 100%;
    min-width: 0;
  }
  .keyboard-play-wrap > *,
  .keyboard-grid,
  .keyboard-row {
    min-width: 0;
    max-width: 100%;
  }
  .typing-head h2 {
    font-size: clamp(20px, 7vw, 28px);
    overflow-wrap: anywhere;
  }
  .typing-head p {
    font-size: 12px;
  }
  .keyboard-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .keyboard-stats span {
    min-width: 0;
    padding: 6px 7px;
    font-size: 12px;
    text-align: center;
  }
  .keyboard-shop-button {
    min-width: 0;
    padding: 6px 8px;
    font-size: 12px;
  }
  .level-shop-status-button {
    width: auto;
    min-height: 38px;
    padding: 6px 10px;
    font-size: 12px;
  }
  .target-key {
    min-height: 72px;
  }
  .sequence-track,
  .lesson-note,
  .keyboard-message,
  .score-breakdown-note,
  .level-star-board,
  .level-leaderboard {
    width: 100%;
    max-width: 100%;
  }
  .level-leaderboard {
    transform: none;
  }
  .level-star-board {
    max-height: 245px;
    overflow-y: auto;
  }
  .keyboard-play-wrap .keyboard-key {
    width: min(32px, 8vw);
    font-size: 13px;
  }
  .keyboard-play-wrap .keyboard-row {
    gap: 3px;
  }
  .keyboard-play-wrap .space-key {
    width: min(240px, 70vw);
  }
  .star-board-grid {
    grid-template-columns: 1fr;
  }
  .level-star-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .level-star-icons {
    overflow: hidden;
    text-overflow: clip;
  }
  .level-leaderboard.hidden { display: none; }
  .sequence-token { min-width: 36px; }
  .board-page-head { grid-template-columns: 1fr; }
  .my-record-title-row { grid-template-columns: 1fr; }
  .my-record-actions { justify-content: start; }
  .board-page-row {
    grid-template-columns: 50px minmax(38px, 1fr) 50px 42px 34px 46px;
    gap: 2px;
    padding: 3px;
    font-size: 9px;
  }
  .health-row {
    grid-template-columns: 78px 56px minmax(0, 1fr);
    gap: 5px;
    padding: 6px;
    font-size: 10px;
  }
  .health-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop-history-row { grid-template-columns: 1fr; }
  .shop-game-card { grid-template-columns: 1fr; }
  .shop-game-media { justify-items: start; }
  .shop-game-preview { width: min(100%, 240px); }
  .promotion-card { padding: 22px 16px; }
  .record-round-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .record-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-board-page .ultimate-level-details { grid-template-columns: 1fr; }
  .ultimate-player-head { grid-template-columns: 72px minmax(44px, 1fr) 58px; }
}
