:root {
  color-scheme: light;
  --ink: #1d2733;
  --muted: #66758a;
  --paper: rgba(255, 255, 255, 0.9);
  --line: rgba(31, 48, 66, 0.16);
  --sky: #8ed7ff;
  --blue: #1877b9;
  --green: #27a766;
  --grass: #70c747;
  --gold: #f8bf2f;
  --gold-dark: #b87514;
  --brick: #cf6b43;
  --rose: #e75d62;
  --violet: #7267d8;
  --shadow: 0 18px 55px rgba(23, 39, 56, 0.17);
}

/* hidden 属性必须永远隐藏，即使元素本身设了 display（否则拼写模式的“声”按钮藏不掉） */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #c7edff 0 34%, #fff3bd 34% 35%, #bde98f 35% 100%);
  overflow-x: hidden;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

button,
select,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 26px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.review-reminder {
  position: sticky;
  top: 8px;
  z-index: 20;
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
  box-shadow: 0 5px 0 rgba(29, 39, 51, 0.14);
  font-weight: 900;
}

.review-reminder[hidden] {
  display: none;
}

.reminder-bell {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: white;
  background: var(--rose);
  font-weight: 950;
}

#reminderText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reminderAction {
  min-height: 30px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  font-size: 13px;
  font-weight: 950;
}

.hud {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.eyebrow,
.label {
  margin: 0 0 7px;
  color: #075f6c;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.92;
  text-shadow: 0 5px 0 rgba(255, 255, 255, 0.78);
}

.wallet {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 950;
}

.wallet span {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 5px 0 rgba(29, 39, 51, 0.14);
}

.home-stage {
  position: relative;
  min-height: 360px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 68%, rgba(255, 255, 255, 0.28) 0 34px, transparent 36px),
    radial-gradient(circle at 60% 72%, rgba(255, 255, 255, 0.2) 0 26px, transparent 28px),
    linear-gradient(180deg, #8ed7ff 0 62%, #70c747 62% 100%);
  box-shadow: var(--shadow);
}

.cloud,
.cloud::before,
.cloud::after {
  position: absolute;
  width: 72px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.cloud::before,
.cloud::after {
  content: "";
  top: -18px;
}

.cloud::before {
  left: 14px;
  width: 38px;
  height: 38px;
}

.cloud::after {
  right: 12px;
  width: 46px;
  height: 46px;
}

.cloud-a {
  top: 54px;
  left: 9%;
}

.cloud-b {
  top: 84px;
  right: 12%;
  transform: scale(1.2);
}

.coin-arc {
  position: absolute;
  top: 62px;
  left: 42%;
  display: flex;
  gap: 12px;
}

.coin-arc span {
  width: 28px;
  height: 28px;
  border: 3px solid var(--gold-dark);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6a8, var(--gold) 58%, #d58b19);
  box-shadow: inset -3px -3px 0 rgba(130, 79, 9, 0.2);
}

.coin-arc span:nth-child(2),
.coin-arc span:nth-child(4) {
  transform: translateY(-20px);
}

.pet-preview {
  position: absolute;
  right: 9%;
  bottom: 62px;
  width: 138px;
  height: 142px;
  display: grid;
  place-items: center;
}

.pet-preview .mush-sprite {
  transform: scale(1.2);
}

.home-tree {
  position: absolute;
  bottom: 48px;
  width: 54px;
  height: 120px;
  border-radius: 28px 28px 10px 10px;
  background: #3c9b5b;
  border: 3px solid var(--ink);
}

.home-tree::before {
  content: "";
  border: 3px solid var(--ink);
  position: absolute;
  left: 18px;
  bottom: -2px;
  width: 18px;
  height: 62px;
  border-radius: 9px;
  background: #9b653f;
}

.tree-a {
  right: 23%;
  transform: scale(0.84);
}

.tree-b {
  right: 3%;
  transform: scale(1.06);
}

.mini-mush {
  position: absolute;
  bottom: 54px;
  width: 36px;
  height: 28px;
  border: 4px solid var(--ink);
  border-radius: 22px 22px 12px 12px;
  background:
    radial-gradient(circle at 35% 38%, #fff9c6 0 20%, transparent 21%),
    #ef6b7b;
}

.mini-mush::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: -21px;
  width: 18px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 9px 9px 11px 11px;
  background: #fff0d0;
}

.mini-a {
  right: 40%;
}

.mini-b {
  right: 18%;
  transform: scale(0.76);
}


.start-card {
  position: absolute;
  left: 34px;
  bottom: 52px;
  width: min(520px, calc(100% - 60px));
  padding: 22px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 0 rgba(29, 39, 51, 0.16);
}

.start-card h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.home-copy {
  color: var(--muted);
  font-weight: 800;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary,
.secondary,
.ghost,
.tiny,
.actions button,
.tab,
.shop-item,
.mode,
.spell-form button {
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 4px 0 rgba(29, 39, 51, 0.16);
  font-weight: 950;
}

.primary {
  min-height: 48px;
  padding: 0 16px;
  color: white;
  background: var(--blue);
}

.primary.alt {
  background: var(--green);
}

.secondary,
.ghost,
.tiny,
.actions button,
.tab {
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  border-top: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 48px),
    var(--brick);
  background-size: 48px 100%;
}

.dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 290px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.panel {
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.settings-panel,
.side-panel {
  padding: 14px;
}

.game-panel {
  padding: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.mode-list,
.settings {
  display: grid;
  gap: 9px;
}

.settings {
  margin-top: 16px;
}

.mode {
  min-height: 72px;
  padding: 11px;
  color: var(--ink);
  text-align: left;
  background: #fff7d6;
}

.mode.active {
  background: #d9f7ff;
}

.mode span,
.mode small {
  display: block;
}

.mode small {
  margin-top: 4px;
  color: var(--muted);
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

select,
input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font-weight: 800;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
}

.toggle input {
  width: 18px;
  min-height: 18px;
}

.weight-guide {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf2;
  box-shadow: 0 4px 0 rgba(29, 39, 51, 0.12);
}

.weight-guide strong {
  font-weight: 950;
}

.weight-guide span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stat-streak {
  display: none !important;
}

.stats div {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
}

.stats strong {
  font-size: 28px;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.round-progress {
  position: relative;
  height: 22px;
  margin-top: 10px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #27a766, #f8bf2f);
  transition: width 0.28s ease;
}

.progress-ticks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

.progress-ticks span {
  border-right: 2px solid rgba(29, 39, 51, 0.2);
}

.progress-ticks span:last-child {
  border-right: 0;
}

.scene {
  --jump-zone-x: 130px;
  --jump-coach-x: 92px;
  position: relative;
  height: 300px;
  margin: 14px 0;
  border: 3px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.78) 0 32px, transparent 34px),
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.62) 0 42px, transparent 44px),
    linear-gradient(180deg, #8ed7ff 0 62%, #70c747 62% 100%);
}

.scene.crash {
  animation: shake 0.32s ease;
}

.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  place-items: center;
  background: linear-gradient(180deg, rgba(142, 215, 255, 0.34), rgba(112, 199, 71, 0.18));
}

/* 一局结束后的重新开始浮层 */
.restart-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(255, 253, 242, 0.9);
}

.restart-overlay[hidden] {
  display: none !important;
}

.restart-overlay p {
  margin: 0;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff7d6;
  font-size: 15px;
  font-weight: 950;
}

/* 道具面板：一个道具一行 */
.power-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fffdf2;
}

.power-title {
  margin: 0 0 7px;
  color: #075f6c;
  font-size: 13px;
  font-weight: 900;
}

.power-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.power-row {
  display: grid;
  grid-template-columns: 30px auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 2px solid rgba(29, 39, 51, 0.18);
  border-radius: 8px;
  background: white;
}

.power-icon {
  width: 30px;
  height: 30px;
  display: block;
}

.power-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.power-name {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.power-name strong {
  color: #b8730a;
}

.power-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.power-empty {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.start-overlay.show {
  display: grid;
}

.round-start {
  min-width: 156px;
  min-height: 62px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  color: white;
  background: linear-gradient(180deg, #2e9fe0, #1766a7);
  box-shadow: 0 8px 0 rgba(29, 39, 51, 0.2);
  font-size: 24px;
  font-weight: 950;
}

.round-start:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 rgba(29, 39, 51, 0.2);
}

.scene.hide-timing .timing-zone {
  opacity: 0;
}

.scene.teach-jump .timing-zone {
  opacity: 1;
  border-style: solid;
  background: rgba(217, 247, 255, 0.42);
  animation: coachPulse 1.1s ease-in-out infinite;
}

.jump-coach {
  position: absolute;
  left: var(--jump-coach-x);
  bottom: 166px;
  z-index: 6;
  width: min(260px, calc(100% - 140px));
  display: none;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
  box-shadow: 0 5px 0 rgba(29, 39, 51, 0.14);
  font-size: 12px;
  font-weight: 900;
  transition: left 0.16s linear;
}

.jump-coach strong,
.jump-coach span {
  display: block;
}

.jump-coach span {
  margin-top: 3px;
  color: var(--muted);
}

.scene.teach-jump .jump-coach {
  display: block;
}

.scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 38px;
  height: 46px;
  border-top: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 54px),
    var(--brick);
  background-size: 54px 100%;
  animation: roadScroll 1.4s linear infinite;
}

.ground-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 60px;
  height: 5px;
  background: repeating-linear-gradient(90deg, rgba(29, 39, 51, 0.28) 0 22px, transparent 22px 42px);
  animation: groundScroll 0.85s linear infinite;
}

.timing-zone {
  position: absolute;
  left: var(--jump-zone-x);
  bottom: 62px;
  width: 96px;
  height: 76px;
  display: grid;
  place-items: start center;
  padding-top: 6px;
  border: 3px dashed rgba(39, 167, 102, 0.78);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: rgba(7, 95, 108, 0.7);
  font-size: 12px;
  font-weight: 950;
  transition: left 0.16s linear, opacity 0.2s ease;
}

.game-panel.reading-mode .stats,
.game-panel.reading-mode .round-progress,
.game-panel.reading-mode .scene {
  display: none;
}

.runner {
  --jump-y: 0px;
  position: absolute;
  left: 54px;
  bottom: 62px;
  width: 82px;
  height: 96px;
  transform: translateY(calc(-1 * var(--jump-y)));
  z-index: 3;
}

.runner.moving .mush-sprite {
  animation: mushRun 0.58s ease-in-out infinite;
}

.runner.jump .char-body {
  animation: jumpTilt 0.82s ease-in-out;
}

.runner.jump .mush-sprite {
  animation: jumpSquash 0.82s ease-in-out;
}

.runner.hit {
  animation: crashShake 0.42s ease-in-out;
}

.runner.dead {
  transform: translateY(22px) rotate(-82deg);
}

.mush-sprite {
  position: relative;
  width: 90px;
  height: 102px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 0 rgba(29, 39, 51, 0.12));
}

/* 形象本体（SVG）铺满 sprite，装饰层叠在头顶 */
.char-body {
  position: absolute;
  inset: 0;
}

.char-body svg {
  width: 100%;
  height: 100%;
  display: block;
}

.char-deco {
  position: absolute;
  top: -9%;
  left: 50%;
  width: 54%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.char-deco svg {
  width: 100%;
  height: auto;
  display: block;
}

.char-deco:empty {
  display: none;
}

.celebration {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 5;
  min-width: min(430px, calc(100% - 32px));
  transform: translate(-50%, -120%);
  padding: 12px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
  box-shadow: 0 7px 0 rgba(29, 39, 51, 0.18);
  color: #8a4d00;
  font-weight: 950;
  text-align: center;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.celebration.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.obstacle {
  --x: 720px;
  position: absolute;
  left: var(--x);
  bottom: 62px;
  width: 52px;
  height: 54px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--rose);
  box-shadow: 0 9px 0 rgba(29, 39, 51, 0.16);
}

.obstacle::before,
.obstacle::after {
  content: "";
  position: absolute;
}

.obstacle-block {
  background:
    linear-gradient(135deg, transparent 0 44%, rgba(255, 255, 255, 0.36) 45% 55%, transparent 56%),
    var(--rose);
}

.obstacle-cat {
  width: 70px;
  height: 46px;
  border-radius: 22px 22px 13px 13px;
  background: #ffd16a;
}

.obstacle-cat::before {
  left: 8px;
  top: -18px;
  width: 18px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 6px 10px 4px 4px;
  background: #ffd16a;
  box-shadow: 34px 0 0 #ffd16a, 34px 0 0 3px var(--ink);
}

.obstacle-cat::after {
  left: 17px;
  top: 15px;
  width: 7px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 28px 0 0 var(--ink), 14px 12px 0 -2px #ff7d7d;
}

.obstacle-skulls {
  width: 92px;
  height: 36px;
  border: 0;
  background:
    radial-gradient(circle at 17px 18px, #fff 0 17px, var(--ink) 18px 20px, transparent 21px),
    radial-gradient(circle at 46px 18px, #fff 0 17px, var(--ink) 18px 20px, transparent 21px),
    radial-gradient(circle at 75px 18px, #fff 0 17px, var(--ink) 18px 20px, transparent 21px);
  box-shadow: none;
}

.obstacle-skulls::before {
  left: 10px;
  top: 15px;
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow:
    10px 0 0 var(--ink),
    29px 0 0 var(--ink),
    39px 0 0 var(--ink),
    58px 0 0 var(--ink),
    68px 0 0 var(--ink);
}

.obstacle-skulls::after {
  left: 15px;
  top: 25px;
  width: 8px;
  height: 3px;
  background: var(--ink);
  box-shadow: 29px 0 0 var(--ink), 58px 0 0 var(--ink);
}

.obstacle-stump {
  width: 48px;
  height: 62px;
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.32) 0 8px, transparent 8px 100%),
    #a86d3d;
}

.obstacle-stump::before {
  left: -8px;
  top: 13px;
  width: 22px;
  height: 11px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #ce915a;
}

/* 空中砖块：跳起来顶到它会掉下去消失（马里奥问号砖块的感觉） */
.collectible {
  --x: 720px;
  --pickup-bottom: 214px;
  position: absolute;
  left: var(--x);
  bottom: var(--pickup-bottom);
  z-index: 4;
  width: 44px;
  height: 36px;
  display: none;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 5px 0 rgba(29, 39, 51, 0.18);
}

.collectible.show {
  display: grid;
  place-items: center;
  animation: blockPulse 1s ease-in-out infinite;
}

.air-block {
  background: linear-gradient(180deg, #ffd88a, #f0a93a);
}

.air-block::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7a4a06;
  font-size: 17px;
  font-weight: 950;
}

.block-coin::before { content: "?"; }
.block-shield::before { content: "盾"; font-size: 14px; }
.block-double::before { content: "x2"; font-size: 14px; }
.block-slow::before { content: "慢"; font-size: 14px; }
.block-speed::before { content: "快"; font-size: 14px; }

.block-shield { background: linear-gradient(180deg, #b6efff, #3fa0df); }
.block-double { background: linear-gradient(180deg, #c9bcff, #7d6be0); }
.block-slow { background: linear-gradient(180deg, #d9f7ff, #4cb6d8); }
.block-speed { background: linear-gradient(180deg, #ffcf7a, #e75d62); }

/* 被顶到：向上一弹，然后掉下去淡出消失 */
.collectible.popped {
  animation: blockPop 0.6s ease-in forwards;
}

@keyframes blockPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@keyframes blockPop {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  22%  { transform: translateY(-16px) rotate(-8deg); opacity: 1; }
  100% { transform: translateY(120px) rotate(38deg); opacity: 0; }
}

.word-gate {
  position: absolute;
  right: 22px;
  top: 18px;
  min-width: 96px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 950;
}

.prompt-box {
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf2;
}

.prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompt-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.word-speak {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  color: #075f6c;
  font-size: 13px;
  font-weight: 950;
}

.word-speak:disabled {
  opacity: 0.45;
}

.weight-badge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #d9f7ff;
  color: #075f6c;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

#meaning {
  min-height: 58px;
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

.hint {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 850;
}

.context-zh,
.context-en {
  display: block;
}

.context-zh {
  margin-bottom: 10px;
  color: #075f6c;
  font-size: 19px;
  line-height: 1.35;
}

.context-en {
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  font-size: 22px;
  line-height: 1.5;
}

.context-blank {
  color: #b8730a;
  font-weight: 950;
  letter-spacing: 2px;
}

.context-meaning {
  color: #16744b;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.option {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 0 rgba(29, 39, 51, 0.14);
  font-weight: 950;
  text-align: left;
}

.option-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.option-weight,
.option-sound,
.review-weight,
.review-status {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #eef8ff;
  color: #075f6c;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.option-sound {
  min-width: 28px;
  background: #fff7d6;
  color: #8a4d00;
}

.option-weight[data-level="核心考点"],
.review-weight[data-level="核心考点"] {
  background: #ffe4ad;
  color: #8a4d00;
}

.option-weight[data-level="高频重点"],
.review-weight[data-level="高频重点"] {
  background: #ffd7d7;
  color: #a02e36;
}

.option:hover,
.option:focus-visible {
  outline: 0;
  background: #d9f7ff;
}

.option.correct {
  background: #dff8ce;
}

.option.wrong {
  background: #ffd7d7;
}

.option:disabled {
  cursor: default;
}

.spell-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  margin-top: 12px;
}

.spell-form.active {
  display: grid;
}

.story-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  width: fit-content;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  color: var(--ink);
  font-weight: 950;
}

.story-toggle.active {
  display: flex;
}

.story-toggle input {
  width: 18px;
  min-height: 18px;
}

.review-start-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.review-start-panel button {
  min-height: 94px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf2;
  box-shadow: 0 5px 0 rgba(29, 39, 51, 0.16);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.review-start-panel button:nth-child(1) {
  background: #d9f7ff;
}

.review-start-panel button:nth-child(2) {
  background: #fff0d0;
}

.review-start-panel button:nth-child(3) {
  background: #dff8ce;
}

.review-start-panel strong,
.review-start-panel span {
  display: block;
}

.review-start-panel strong {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 950;
}

.review-start-panel span,
.review-start-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.review-start-panel p {
  grid-column: 1 / -1;
  margin: 0;
}

.spell-form button {
  color: white;
  background: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.feedback {
  min-height: 30px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.feedback.good {
  color: #16744b;
}

.feedback.bad {
  color: #bd3039;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.tab.active {
  background: #d9f7ff;
}

.side-view {
  display: none;
}

.side-view.active {
  display: block;
}

#recentList {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

#recentList li,
#recentList strong {
  display: block;
}

#recentList span,
.side-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

/* ---------- 主页形象切换器 ---------- */
.char-picker {
  margin: 4px 0 12px;
}

.char-picker-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.char-picker-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.char-chip {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 60px;
  padding: 5px 2px 4px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  cursor: pointer;
}

.char-chip-art {
  width: 40px;
  height: 44px;
  display: block;
}

.char-chip-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.char-chip-name {
  font-size: 11px;
  font-weight: 900;
  color: var(--ink);
}

.char-chip.active {
  border-color: var(--blue);
  background: #d9f7ff;
  box-shadow: 0 3px 0 var(--blue);
}

/* ---------- 装饰商店 ---------- */
.shop-tip {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

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

.shop-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fffdf2;
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  text-align: left;
  cursor: pointer;
}

.shop-icon {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef8ff;
}

.shop-icon svg {
  width: 34px;
  height: 34px;
  display: block;
}

.shop-item strong {
  align-self: end;
  font-size: 14px;
}

.shop-price {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-item.owned {
  background: #f3fbef;
}

.shop-item.owned .shop-icon {
  background: #e4f6da;
}

.shop-item.equipped {
  border-color: #16744b;
  background: #dff8ce;
  box-shadow: 0 3px 0 #16744b;
}

.shop-item.equipped .shop-price {
  color: #16744b;
}

/* ---------- 家园 ---------- */
.room {
  position: relative;
  min-height: 236px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f4e6ff 0 56%, #ffd9e6 56% 70%, #bfe9a8 70%);
}

.room-window {
  position: absolute;
  left: 18px;
  top: 20px;
  width: 62px;
  height: 52px;
  border-radius: 30px 30px 12px 12px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 46%, rgba(29,39,51,.45) 47% 53%, transparent 54%),
    linear-gradient(180deg, transparent 46%, rgba(29,39,51,.45) 47% 53%, transparent 54%),
    linear-gradient(160deg, #bfe9ff 0 55%, #86d0ff 56%);
}

.room-cloud {
  position: absolute;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 39, 51, 0.12);
}

.room-cloud.cloud-1 {
  left: 26px;
  top: 30px;
  width: 30px;
}

.room-cloud.cloud-2 {
  left: 40px;
  top: 44px;
  width: 22px;
  opacity: .85;
}

.room-shelf {
  position: absolute;
  right: 16px;
  top: 56px;
  width: 96px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e0a97b, #b6794f);
  box-shadow: 0 4px 0 rgba(29, 39, 51, 0.14);
}

.room-book {
  position: absolute;
  top: 34px;
  width: 12px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.room-book.book-a { right: 30px; background: #ff9bb8; transform: rotate(-4deg); }
.room-book.book-b { right: 44px; background: #ffd15c; }
.room-book.book-c { right: 58px; background: #7ac8ff; transform: rotate(3deg); }

.room-plant {
  position: absolute;
  left: 22px;
  bottom: 30px;
  width: 30px;
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(180deg, #ff9d86, #f47f66);
}

.room-plant::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 20px;
  width: 24px;
  height: 26px;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 30% 60%, #6fbf5a 0 40%, transparent 41%),
    radial-gradient(circle at 70% 55%, #5fae49 0 42%, transparent 43%),
    #7cc457;
}

.room-lamp {
  position: absolute;
  right: 26px;
  bottom: 30px;
  width: 26px;
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 14px 14px 6px 6px;
  background: #fff2b8;
  box-shadow: 0 0 22px rgba(255, 210, 90, 0.7);
}

.room-rug {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 150px;
  height: 26px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: repeating-radial-gradient(circle at 50% 120%, #ffd7e6 0 12px, #ffc2d6 12px 22px);
}

.room-pet {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 2;
}

.room-pet .mush-sprite {
  width: 96px;
  height: 108px;
  animation: bobRoom 1.6s ease-in-out infinite;
}

@keyframes bobRoom {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50%      { transform: translateY(-5px) scale(0.99, 1.01); }
}

.room-balloon {
  position: absolute;
  right: 30px;
  top: 74px;
  width: 24px;
  height: 30px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 50% 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 13%), #ff8fa3;
  animation: floatBalloon 3s ease-in-out infinite;
}

.room-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 2px;
  height: 18px;
  background: rgba(29, 39, 51, 0.5);
}

@keyframes floatBalloon {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.side-note {
  margin: 10px 0 0;
}

.review-board {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1560px, calc(100vw - 26px));
  min-height: min(820px, calc(100vh - 32px));
  margin-top: 18px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 242, 0.94);
  box-shadow: var(--shadow);
}

.review-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.review-board-head h2 {
  margin-bottom: 6px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.review-board-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 850;
}

.review-table-wrap {
  position: relative;
  min-height: calc(min(820px, 100vh) - 150px);
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.review-table th,
.review-table td {
  padding: 10px;
  border-bottom: 2px solid rgba(31, 48, 66, 0.12);
  text-align: left;
  vertical-align: middle;
  font-weight: 850;
}

/* 四个打卡列（第5~8列：第1/3/5/7天）居中 */
.review-table th:nth-child(n + 5):nth-child(-n + 8),
.review-table td:nth-child(n + 5):nth-child(-n + 8) {
  text-align: center;
}

.review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #d9f7ff;
  color: #075f6c;
  font-size: 13px;
  font-weight: 950;
}

.review-table tr.due {
  background: #fff7d6;
}

.review-table td strong,
.review-table td small {
  display: block;
}

.review-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.review-status.is-due {
  background: #dff8ce;
  color: #16744b;
}

.review-status.is-done {
  background: #d9f7ff;
  color: #075f6c;
}

/* 复习类型角标：错题重练 / 巩固复习 / 顽固错题 */
.track-badge {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.track-badge.mastery {
  background: #dff8ce;
  color: #16744b;
}

.track-badge.mistake {
  background: #ffd7d7;
  color: #a02e36;
}

.track-badge.stubborn {
  background: #ffe4ad;
  color: #8a4d00;
}

/* 打卡格子：✓ 已打卡 / ● 今天该打 / ○ 还没到 */
.checkin {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(29, 39, 51, 0.22);
  background: #f2f6fb;
  color: #9aa7b4;
  font-size: 16px;
  font-weight: 950;
}

.checkin.done {
  border-color: #16744b;
  background: #dff8ce;
  color: #16744b;
}

.checkin.due {
  border-color: var(--gold-dark);
  background: #fff7d6;
  color: #b8730a;
  animation: checkinPulse 1.2s ease-in-out infinite;
}

@keyframes checkinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.review-practice {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.review-practice button {
  min-height: 32px;
  padding: 0 7px;
  white-space: nowrap;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  box-shadow: 0 3px 0 rgba(29, 39, 51, 0.12);
  font-size: 12px;
  font-weight: 950;
}

.review-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.review-empty[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .hud {
    align-items: start;
    flex-direction: column;
  }

  .wallet {
    justify-content: flex-start;
  }

  .mode-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-level {
  display: inline-block;
  width: max-content;
  margin-top: 5px;
  padding: 2px 6px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff7d6;
  color: #8a4d00;
  font-weight: 950;
}

.review-done {
  display: inline-grid;
  width: max-content;
  margin-top: 6px;
  padding: 3px 7px;
  border: 2px solid #16744b;
  border-radius: 8px;
  background: #dff8ce;
  color: #16744b;
  font-weight: 950;
}

.review-plan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 5px;
  min-width: 330px;
}

.plan-step {
  min-height: 44px;
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  padding: 4px 5px;
  border: 2px solid rgba(29, 39, 51, 0.22);
  border-radius: 8px;
  background: #eef8ff;
  color: #075f6c;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.plan-step strong {
  font-size: 11px;
  white-space: nowrap;
}

.plan-step em {
  min-height: 16px;
  color: #16744b;
  font-size: 16px;
  font-style: normal;
  line-height: 1;
}

.plan-step.done {
  border-color: #16744b;
  background: #dff8ce;
  color: #16744b;
}

.plan-step.current {
  border-color: var(--gold-dark);
  background: #fff7d6;
  color: #8a4d00;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.report-card {
  min-height: 140px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf2;
}

.report-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.report-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-card li {
  display: grid;
  gap: 2px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(217, 247, 255, 0.45);
}

.report-card li span,
.report-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.story-card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf2;
}

.story-english {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.55;
}

.story-chinese {
  display: none;
  margin: 0;
  padding-top: 10px;
  border-top: 2px solid rgba(31, 48, 66, 0.14);
  color: var(--muted);
  font-weight: 850;
  line-height: 1.6;
}

.story-chinese.show {
  display: block;
}

.story-mark {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.mark-0 {
  text-decoration-color: #f05d5e;
  background: rgba(240, 93, 94, 0.1);
}

.mark-1 {
  text-decoration-color: #228be6;
  background: rgba(34, 139, 230, 0.1);
}

.mark-2 {
  text-decoration-color: #2f9e44;
  background: rgba(47, 158, 68, 0.1);
}

.mark-3 {
  text-decoration-color: #f08c00;
  background: rgba(240, 140, 0, 0.12);
}

.mark-4 {
  text-decoration-color: #7048e8;
  background: rgba(112, 72, 232, 0.1);
}

.mark-5 {
  text-decoration-color: #0ca678;
  background: rgba(12, 166, 120, 0.1);
}

.mark-6 {
  text-decoration-color: #e64980;
  background: rgba(230, 73, 128, 0.1);
}

.mark-7 {
  text-decoration-color: #15aabf;
  background: rgba(21, 170, 191, 0.1);
}

/* 故事里的词按当天对错标色：绿色=全对，红色=今天错过 */
.story-mark.story-ok {
  text-decoration-color: #2f9e44;
  background: rgba(47, 158, 68, 0.14);
}

.story-mark.story-bad {
  text-decoration-color: #f03e3e;
  background: rgba(240, 62, 62, 0.14);
}

.story-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.story-legend .story-mark {
  padding: 0 4px;
}

.story-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.story-words .story-chip {
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
}

.story-words .story-chip.story-ok {
  background: rgba(47, 158, 68, 0.16);
  color: #16744b;
}

.story-words .story-chip.story-bad {
  background: rgba(240, 62, 62, 0.16);
  color: #a02e36;
}

@media (max-width: 760px) {
  .report-grid {
    grid-template-columns: 1fr;
  }

  .review-start-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .shell {
    width: min(100% - 18px, 1220px);
    padding-top: 12px;
  }

  .home-stage {
    min-height: 500px;
  }

  .start-card {
    left: 14px;
    right: 14px;
    bottom: 50px;
    width: auto;
  }

  .pet-preview {
    right: 20px;
    bottom: 258px;
    transform: scale(0.82);
  }

  .mode-list,
  .stats,
  .options,
  .spell-form {
    grid-template-columns: 1fr;
  }

  /* 场景高度和跑者位置必须和 app.js 里的物理常量一致，
     否则跳跃会飞出场景、碰撞判定也会落在错误的位置 */
  .scene {
    height: 300px;
  }

  .timing-zone {
    width: 82px;
  }
}

/* 马里奥式弹跳：快速蓄力→爆发上升→顶部悬停→加速下落→落地，无旋转 */
/* 跳跃时身体前倾一点，落地回正（垂直位移由 JS 的 --jump-y 负责） */
@keyframes jumpTilt {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-7deg); }
  60%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

@keyframes crashShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25%      { transform: translateX(-9px) rotate(-8deg); }
  60%      { transform: translateX(6px) rotate(6deg); }
}

/* 挤压拉伸：蹲→拉长起跳→空中恢复→落地压扁→回弹 */
@keyframes jumpSquash {
  0% {
    transform: scale(1, 1);
  }

  8% {
    transform: scale(1.14, 0.86);
  }

  22% {
    transform: scale(0.84, 1.18);
  }

  45% {
    transform: scale(1, 1);
  }

  80% {
    transform: scale(0.95, 1.07);
  }

  92% {
    transform: scale(1.2, 0.78);
  }

  100% {
    transform: scale(1, 1);
  }
}

@keyframes mushRun {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes pickupBob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}

@keyframes coachPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(248, 191, 47, 0.1), 0 0 0 rgba(248, 191, 47, 0);
  }

  50% {
    box-shadow: inset 0 0 0 5px rgba(248, 191, 47, 0.2), 0 0 20px rgba(248, 191, 47, 0.5);
  }
}

@keyframes roadScroll {
  to {
    background-position: -54px 0;
  }
}

@keyframes groundScroll {
  to {
    background-position: -42px 0;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-8px);
  }

  60% {
    transform: translateX(7px);
  }
}

/* ---------- 访问门禁 ---------- */
/* 门禁没通过之前整页锁住：底下的游戏虽然已经初始化，但滚不动也点不到。 */
body.access-locked {
  overflow: hidden;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  /* 用和页面一样的天空-草地渐变铺满，避免透出还没解锁的界面 */
  background: linear-gradient(180deg, #c7edff 0 56%, #fff3bd 56% 57%, #bde98f 57% 100%);
}

.access-card {
  width: min(460px, 100%);
  padding: 26px 24px 22px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 0 rgba(29, 39, 51, 0.16);
}

.access-eyebrow {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.access-card h1 {
  margin: 4px 0 14px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.05;
}

.access-copy {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.5;
}

.access-form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.access-form label {
  color: var(--muted);
  font-weight: 900;
}

.access-form input {
  min-height: 46px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.access-error {
  min-height: 20px;
  margin: 0;
  color: var(--rose);
  font-weight: 900;
}

.access-form .primary {
  width: 100%;
}

.access-foot {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}
