:root {
  --bg: #06101f;
  --panel: #0d1d38;
  --panel-soft: #152a4e;
  --text: #eef6ff;
  --muted: #a3badb;
  --accent: #ff6a3d;
  --accent-soft: rgba(255, 106, 61, 0.18);
  --accent-2: #cfe0ff;
  --gold: #ffc266;
  --silver: #bfd4f5;
  --red-flag: #e63946;
  --green: #78f59f;
  --danger: #ff8b8b;
  --world-math: #b388ff;
  --world-german: #7eb6ff;
  --world-english: #64e0b6;
  --world-idiom: #ffb454;
  --world-history: #ff8ea1;
  --border: #365a96;
  --shadow: 0 10px 0 rgba(0, 0, 0, 0.22);
  --glow: 0 0 0 1px rgba(207, 224, 255, 0.12), 0 0 28px rgba(126, 170, 255, 0.12);
  --zhurong-orange: #ff6a3d;
  --tiangong-blue: #2b6aff;
  --chang-e-silver: #d9e7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(43, 106, 255, 0.26), transparent 38%),
    radial-gradient(circle at 82% 16%, rgba(255, 106, 61, 0.18), transparent 32%),
    linear-gradient(180deg, #061226 0%, #071730 50%, #040c1b 100%);
  color: var(--text);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, rgba(207, 224, 255, 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 76%, rgba(255, 194, 102, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 82%, rgba(126, 182, 255, 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.38) 0 1px, transparent 2px);
  background-size: 220px 220px, 320px 320px, 180px 180px, 260px 260px, 140px 140px;
  opacity: 0.42;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
}

button,
input,
textarea {
  font: inherit;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.panel {
  border: 2px solid rgba(126, 170, 255, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(21, 42, 78, 0.96), rgba(10, 22, 45, 0.96)),
    linear-gradient(135deg, rgba(255, 106, 61, 0.18), transparent 40%),
    linear-gradient(315deg, rgba(43, 106, 255, 0.18), transparent 40%);
  box-shadow: var(--shadow), var(--glow);
  position: relative;
  overflow: hidden;
}

.topbar::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.45), rgba(43, 106, 255, 0.22) 40%, rgba(255, 194, 102, 0.32) 72%, rgba(191, 212, 245, 0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.topbar h1,
.section-head h2,
.hero-copy h2,
.question-head h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
}

.subtitle,
.tip,
.question-subtext,
.label {
  color: var(--muted);
}

.topbar-actions,
.hero-actions,
.question-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-actions .pixel-btn {
  white-space: nowrap;
}

.pixel-btn {
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 12px 18px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22);
}

.pixel-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.pixel-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.pixel-btn.primary {
  background: linear-gradient(180deg, #ffa07a, #ff5a2b);
  color: #30110a;
  font-weight: 800;
  border-color: rgba(255, 230, 217, 0.28);
  box-shadow: 0 6px 0 rgba(180, 62, 20, 0.32);
}

.pixel-btn.secondary {
  background: linear-gradient(180deg, #9fc2ff, #3a75ff);
  color: #071733;
  font-weight: 800;
  border-color: rgba(224, 235, 255, 0.28);
  box-shadow: 0 6px 0 rgba(30, 80, 180, 0.32);
}

.pixel-btn.ghost {
  background: linear-gradient(180deg, #324a73, #243859);
}

.pixel-btn.option-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #21365b, #192843);
  color: var(--text);
}

.pixel-btn.speak-btn {
  padding: 10px 12px;
  min-width: 86px;
  white-space: nowrap;
}

.pixel-btn.option-btn.correct {
  background: linear-gradient(180deg, #8af3b0, #31b85c);
  color: #062211;
}

.pixel-btn.option-btn.wrong {
  background: linear-gradient(180deg, #ffacac, #ef6363);
  color: #340808;
}

.pixel-btn.option-btn:disabled {
  cursor: default;
  opacity: 0.95;
}

.layout {
  display: grid;
  grid-template-columns: 1.34fr 0.66fr;
  gap: 20px;
  align-items: start;
}

.panel {
  padding: 22px;
}

.hero-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 20px;
  align-items: stretch;
}

.play-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.side-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.side-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 3px solid rgba(130, 177, 255, 0.16);
  background: rgba(10, 21, 40, 0.78);
  color: #dceaff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.side-nav-btn:hover,
.side-nav-btn.active {
  transform: translateY(-2px);
  border-color: rgba(255, 207, 90, 0.42);
  background: linear-gradient(180deg, rgba(36, 61, 104, 0.98) 0%, rgba(16, 33, 62, 0.98) 100%);
}

.side-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 207, 90, 0.18);
  border: 1px solid rgba(255, 207, 90, 0.32);
  color: #ffe9a2;
  font-size: 0.76rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 207, 90, 0.16);
  border: 2px solid rgba(255, 207, 90, 0.35);
  color: #ffecb6;
  border-radius: 999px;
  margin: 0 0 14px;
}

.voice-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(10, 21, 40, 0.7);
  border: 2px solid rgba(119, 230, 255, 0.18);
  color: #dff7ff;
}

.voice-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7ef5b1;
  box-shadow: 0 0 0 6px rgba(126, 245, 177, 0.14);
}

.coach-card,
.dialog-box,
.china-quest-card,
.feedback-box,
.world-complete {
  background: rgba(10, 21, 40, 0.78);
  border: 3px solid rgba(130, 177, 255, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
}

.coach-line,
.dialog-box p,
.feedback-box p,
.world-complete p {
  margin: 0;
}

.coach-line + .coach-line,
.dialog-box p + p,
.feedback-box p + p,
.world-complete p + p {
  margin-top: 8px;
}

.coach-line.de,
.dialog-de,
.coach-line.en,
.dialog-en {
  color: #b8e7ff;
}

.coach-line.en,
.dialog-en {
  color: #d7f7b4;
}

.china-quest-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-color: rgba(255, 207, 90, 0.22);
  background: linear-gradient(180deg, rgba(38, 26, 8, 0.82) 0%, rgba(10, 21, 40, 0.84) 100%);
}

.china-quest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.china-quest-card h3,
.culture-story-card h3,
.companion-card h3,
.collection-card h3,
.chapter-card h3 {
  margin: 0;
}

.china-quest-reward,
.culture-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 207, 90, 0.12);
  border: 1px solid rgba(255, 207, 90, 0.24);
  color: #ffe7a0;
  font-size: 0.78rem;
  font-weight: 700;
}

.china-quest-text,
.china-quest-companion,
.culture-card-text,
.companion-card p,
.collection-card p,
.chapter-card p {
  margin: 0;
  color: #dce9ff;
}

.hero-art {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 194, 102, 0.55) 0, transparent 28%),
    linear-gradient(180deg, #1d0d26 0%, #411b20 38%, #8e3b2a 62%, #c75336 84%, #ff8c52 100%);
  border: 3px solid rgba(255, 106, 61, 0.36);
  box-shadow: inset 0 -30px 60px rgba(0, 0, 0, 0.38), 0 0 40px rgba(255, 106, 61, 0.18);
}

.hero-scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.sky,
.sun,
.block,
.avatar,
.face,
.mars-sky,
.mars-star,
.mars-phobos,
.mars-planet,
.zhurong,
.zhurong-head,
.zhurong-eye,
.zhurong-antenna,
.tiangong,
.tg-panel,
.tg-core,
.tg-solar-l,
.tg-solar-r,
.tg-flag,
.earth-peer {
  position: absolute;
}

.mars-sky {
  inset: 0 0 38% 0;
  background: linear-gradient(180deg, rgba(90, 22, 44, 0.9), rgba(158, 57, 40, 0.55));
}

.mars-star {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    48px 28px 0 0 rgba(207, 224, 255, 0.88),
    120px 14px 0 0 rgba(255, 255, 255, 0.85),
    200px 40px 0 -1px rgba(191, 212, 245, 0.78),
    280px 10px 0 0 rgba(255, 194, 102, 0.86),
    340px 34px 0 -1px rgba(255, 255, 255, 0.74);
  top: 24px;
  left: 28px;
}

.mars-phobos {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  right: 36px;
  top: 28px;
  background: radial-gradient(circle at 32% 32%, #e6d4b3, #8a6e46 68%, #5b4327);
  box-shadow: 0 0 0 8px rgba(255, 194, 102, 0.12);
}

.mars-planet {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  left: 24px;
  top: 22px;
  background:
    radial-gradient(circle at 30% 28%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 60% 62%, #fff 0 5%, transparent 6%),
    linear-gradient(135deg, #3a86ff, #1d4ed8 50%, #0b2268);
  box-shadow: 0 0 0 10px rgba(43, 106, 255, 0.12);
}

.earth-peer {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  left: 108px;
  top: 42px;
  background:
    radial-gradient(circle at 28% 28%, #fff 0 6%, transparent 7%),
    linear-gradient(135deg, #64e0b6, #2b6aff 55%, #0f2e77);
  opacity: 0.9;
}

.zhurong {
  width: 140px;
  height: 120px;
  left: 26%;
  bottom: 34px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ff9a6c, #e65a2f 60%, #b63b17);
  border: 3px solid rgba(78, 18, 6, 0.38);
  border-radius: 18px 18px 26px 26px;
  box-shadow: 0 12px 0 rgba(90, 20, 6, 0.32);
}

.zhurong-head {
  width: 96px;
  height: 56px;
  left: 50%;
  top: -50px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffc99a, #ff7a45 65%, #e65a2f);
  border: 3px solid rgba(78, 18, 6, 0.34);
  border-radius: 18px 18px 12px 12px;
}

.zhurong-eye {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  left: 22px;
  top: 22px;
  background: #1b2a55;
  box-shadow:
    0 0 0 3px rgba(127, 234, 255, 0.38),
    34px 0 #1b2a55,
    34px 0 0 3px rgba(127, 234, 255, 0.38);
}

.zhurong-antenna {
  width: 3px;
  height: 26px;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #cfe0ff, #7aa6ff);
  border-radius: 999px;
}

.zhurong-antenna::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  background: radial-gradient(circle, #fff, #ffc266 50%, #ff6a3d);
  box-shadow: 0 0 18px rgba(255, 106, 61, 0.65);
}

.tiangong {
  width: 150px;
  height: 68px;
  right: 16px;
  top: 78px;
}

.tg-core {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: 64px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #eaf2ff, #b9cfee 60%, #7a96c2);
  border: 2px solid rgba(20, 45, 90, 0.34);
  box-shadow: inset 0 -8px 0 rgba(43, 106, 255, 0.15);
}

.tg-panel {
  position: absolute;
  left: 16px;
  top: 28px;
  width: 32px;
  height: 12px;
  background: #4b6eb3;
  border-radius: 3px;
  box-shadow: 72px 0 #4b6eb3;
}

.tg-solar-l,
.tg-solar-r {
  top: 20px;
  width: 42px;
  height: 28px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, #2b6aff, #0f2e77);
  border: 2px solid rgba(12, 35, 82, 0.5);
}

.tg-solar-l {
  left: -6px;
}

.tg-solar-r {
  right: -6px;
}

.tg-flag {
  position: absolute;
  right: 4px;
  top: -16px;
  width: 18px;
  height: 12px;
  background:
    linear-gradient(180deg, #e63946 0 50%, #ffde59 50% 100%);
  border-radius: 2px;
  box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.3);
}

.sun {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  background: #ffe37b;
  right: 22px;
  top: 20px;
  box-shadow: 0 0 0 8px rgba(255, 227, 123, 0.16);
  display: none;
}

.block {
  background: #5fa85f;
  border: 4px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, 0.08);
}

.hill-a {
  width: 180px;
  height: 180px;
  left: 24px;
  bottom: -54px;
}

.hill-b {
  width: 140px;
  height: 140px;
  left: 160px;
  bottom: -32px;
  background: #4d9655;
}

.hill-c {
  width: 210px;
  height: 130px;
  right: -10px;
  bottom: -20px;
  background: #63b96e;
}

.hill-a,
.hill-b,
.hill-c {
  display: none;
}

.block.mars-ground-a {
  display: block;
  position: absolute;
  left: -14px;
  right: -10px;
  bottom: -60px;
  height: 150px;
  border-radius: 100% 100% 0 0 / 52% 48% 0 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(0, 0, 0, 0.28) 0 12px, transparent 14px),
    radial-gradient(circle at 72% 48%, rgba(0, 0, 0, 0.24) 0 10px, transparent 12px),
    linear-gradient(180deg, #d8623e, #9c3f22 60%, #5e2210);
  border: 4px solid rgba(60, 16, 6, 0.28);
  box-shadow: inset 0 -22px 0 rgba(0, 0, 0, 0.18);
}

.block.mars-ground-b {
  display: block;
  position: absolute;
  left: -10px;
  right: 40%;
  bottom: -30px;
  height: 110px;
  border-radius: 100% 100% 0 0 / 60% 50% 0 0;
  background: linear-gradient(180deg, #eb7e55, #c25028 60%, #853214);
  border: 4px solid rgba(60, 16, 6, 0.26);
}

.avatar {
  width: 82px;
  height: 122px;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #3e6cf6 0%, #2749bc 100%);
  border: 4px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  display: none;
}

.avatar::before {
  content: "";
  position: absolute;
  width: 56px;
  height: 38px;
  left: 10px;
  top: -34px;
  background: #ffd8a8;
  border: 4px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.face {
  width: 8px;
  height: 8px;
  background: #0f172a;
  left: 20px;
  top: -18px;
  box-shadow: 20px 0 #0f172a;
  display: none;
}

.hud-panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: thin;
  align-self: start;
}

.stat {
  flex: 0 0 auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(13, 24, 45, 0.66);
  border: 3px solid rgba(146, 180, 255, 0.16);
}

.stat strong {
  display: inline;
  margin-top: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
}

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

.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.history-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.culture-panel,
.creator-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.culture-story-summary,
.china-chapter-trail,
.china-companion-grid,
.china-collection-grid {
  display: grid;
  gap: 14px;
}

.culture-story-summary,
.china-chapter-trail,
.china-companion-grid,
.china-collection-grid,
.history-summary,
.history-chart,
.reward-summary,
.creator-options,
.creator-meta-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.culture-block {
  display: grid;
  gap: 12px;
}

.culture-story-card,
.companion-card,
.collection-card,
.chapter-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.72);
  border: 3px solid rgba(130, 177, 255, 0.14);
}

.culture-story-card.active,
.chapter-card.active {
  border-color: rgba(255, 207, 90, 0.34);
  background: linear-gradient(180deg, rgba(41, 31, 12, 0.9) 0%, rgba(10, 21, 40, 0.84) 100%);
}

.culture-story-card.locked,
.companion-card.locked,
.collection-card.locked,
.chapter-card.locked {
  opacity: 0.74;
}

.culture-story-meta,
.companion-meta,
.chapter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.culture-story-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.culture-kpi {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 19, 38, 0.78);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.culture-kpi span {
  display: block;
  color: #9fc3ff;
  font-size: 0.75rem;
}

.culture-kpi strong {
  display: block;
  margin-top: 6px;
  color: #ffe9a2;
  font-size: 1.1rem;
}

.companion-card-head,
.collection-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.companion-avatar,
.collection-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 207, 90, 0.12);
  border: 2px solid rgba(255, 207, 90, 0.2);
  font-size: 1.45rem;
}

.companion-tag,
.chapter-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(126, 245, 177, 0.12);
  border: 1px solid rgba(126, 245, 177, 0.2);
  color: #cffff1;
  font-size: 0.74rem;
  font-weight: 700;
}

.companion-card.locked .companion-tag,
.chapter-card.locked .chapter-tag {
  background: rgba(130, 177, 255, 0.08);
  border-color: rgba(130, 177, 255, 0.16);
  color: #caddff;
}

.collection-card.unlocked {
  border-color: rgba(255, 207, 90, 0.26);
}

.collection-card.locked .collection-icon {
  opacity: 0.5;
}

.collection-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chapter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chapter-step {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe9a2;
  font-weight: 800;
}

.chapter-card.active .chapter-step {
  background: rgba(255, 207, 90, 0.18);
}

.creator-foldout {
  border-radius: 18px;
  border: 3px solid rgba(130, 177, 255, 0.14);
  background: rgba(10, 21, 40, 0.58);
  overflow: hidden;
}

.creator-foldout summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  color: #e5f0ff;
  font-weight: 700;
}

.creator-foldout summary::-webkit-details-marker {
  display: none;
}

.creator-foldout[open] summary {
  border-bottom: 1px solid rgba(130, 177, 255, 0.12);
}

.creator-settings {
  padding: 14px 16px;
  background: rgba(10, 21, 40, 0.76);
}

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

.settings-switch-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  text-align: left;
}

.settings-switch-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.2rem;
}

.settings-switch-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-switch-title {
  color: #eff6ff;
  font-size: 0.98rem;
}

.settings-switch-description {
  color: #a7bad6;
  font-size: 0.8rem;
  line-height: 1.45;
}

.settings-switch-status {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 207, 90, 0.12);
  border: 1px solid rgba(255, 207, 90, 0.2);
  color: #ffe8ad;
  font-size: 0.76rem;
  font-weight: 700;
}

.settings-focus-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  border: 3px solid rgba(130, 177, 255, 0.14);
  background:
    radial-gradient(circle at right top, rgba(255, 207, 90, 0.12), transparent 30%),
    rgba(10, 21, 40, 0.74);
}

.settings-focus-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.08);
  font-size: 1.5rem;
}

.settings-focus-copy {
  display: grid;
  gap: 6px;
}

.settings-focus-copy h3,
.settings-focus-copy p {
  margin: 0;
}

.settings-section {
  display: grid;
}

.settings-card {
  border-radius: 18px;
  border: 3px solid rgba(130, 177, 255, 0.14);
}

.idiom-video-manual-settings {
  display: grid;
  gap: 14px;
}

.creator-toggle-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.creator-toggle-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.creator-intro {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.74);
  border: 3px solid rgba(130, 177, 255, 0.16);
}

.creator-intro p {
  margin: 0;
}

.creator-steps {
  color: #e8f4ff;
  margin-bottom: 8px;
}

.generator-wizard-header {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(10, 21, 40, 0.72);
  border: 3px solid rgba(130, 177, 255, 0.14);
}

.generator-step-copy {
  display: grid;
  gap: 6px;
}

.generator-step-copy p {
  margin: 0;
}

.generator-step-dots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.generator-step-dot {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 12px;
  border-radius: 16px;
  border: 2px solid rgba(130, 177, 255, 0.16);
  background: rgba(7, 19, 38, 0.78);
  color: #dceaff;
  text-align: left;
  cursor: pointer;
}

.generator-step-dot.active {
  border-color: rgba(255, 207, 90, 0.4);
  background: rgba(36, 61, 104, 0.92);
}

.generator-step-index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe9a2;
}

.generator-step-label {
  font-size: 0.84rem;
  line-height: 1.4;
}

.generator-choice-block {
  padding: 16px;
  border-radius: 20px;
  background: rgba(10, 21, 40, 0.72);
  border: 3px solid rgba(130, 177, 255, 0.14);
}

.generator-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.generator-world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.generator-card-group {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generator-card-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(7, 19, 38, 0.72);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.generator-card-title {
  margin: 0;
  color: #deebff;
  font-size: 0.92rem;
}

.generator-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}

.generator-card-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.generator-world-card,
.generator-choice-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 3px solid rgba(130, 177, 255, 0.16);
  background: linear-gradient(180deg, rgba(20, 40, 72, 0.94) 0%, rgba(11, 24, 46, 0.94) 100%);
  color: var(--text);
  text-align: left;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.generator-world-card::after,
.generator-choice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%, transparent 100%);
  pointer-events: none;
}

.generator-world-card:hover,
.generator-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 207, 90, 0.38);
}

.generator-world-card.active,
.generator-choice-card.active {
  border-color: rgba(255, 207, 90, 0.56);
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.12), 0 16px 32px rgba(255, 207, 90, 0.12);
  background: linear-gradient(180deg, rgba(36, 61, 104, 0.98) 0%, rgba(16, 33, 62, 0.98) 100%);
  animation: generatorPulse 1.8s ease-in-out infinite;
}

.generator-world-card {
  min-height: 226px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 0 14px 14px;
}

.generator-world-top,
.generator-choice-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.generator-world-icon,
.generator-choice-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.generator-world-cover {
  width: calc(100% + 28px);
  height: 108px;
  margin: 0 -14px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.generator-world-name,
.generator-choice-name {
  margin: 0;
  color: #f9f3ba;
  font-size: 1rem;
}

.generator-world-subtitle,
.generator-choice-hint,
.generator-world-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.generator-choice-card {
  min-height: 102px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.generator-choice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 207, 90, 0.12);
  border: 1px solid rgba(255, 207, 90, 0.2);
  color: #ffe7a4;
  font-size: 0.76rem;
}

.generator-preview {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.76);
  border: 3px solid rgba(126, 245, 177, 0.18);
}

.generator-preview p {
  margin: 0;
}

.generator-preview .tip + .generator-source {
  margin-top: 10px;
}

.generator-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 245, 177, 0.12);
  border: 2px solid rgba(126, 245, 177, 0.2);
  color: #dfffee;
  font-size: 0.86rem;
}

.generator-wizard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.generator-final-actions {
  justify-content: flex-start;
}

.creator-form {
  display: grid;
  gap: 14px;
}

.creator-options,
.creator-meta-row {
  display: grid;
  gap: 12px;
}

.creator-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creator-meta-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.creator-field {
  display: grid;
  gap: 8px;
}

.creator-field span {
  color: #deebff;
  font-size: 0.9rem;
}

.creator-field input,
.creator-field select,
.creator-field textarea,
.creator-json-preview {
  width: 100%;
  border-radius: 16px;
  border: 3px solid rgba(146, 180, 255, 0.16);
  background: rgba(12, 22, 40, 0.82);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.creator-field input:focus,
.creator-field select:focus,
.creator-field textarea:focus {
  border-color: rgba(255, 207, 90, 0.4);
}

.creator-field-wide {
  grid-column: 1 / -1;
}

.creator-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.idiom-video-connection-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 21, 40, 0.78);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.douyin-credential-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 2px solid rgba(130, 177, 255, 0.14);
}

.douyin-credential-card p {
  margin: 0;
}

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

.douyin-credential-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.douyin-credential-item strong {
  color: #eef6ff;
}

.idiom-video-connection-status[data-state="checking"] {
  border-color: rgba(255, 207, 90, 0.26);
  color: #ffe39a;
}

.idiom-video-connection-status[data-state="success"] {
  border-color: rgba(120, 245, 159, 0.34);
  color: #bbffd1;
}

.idiom-video-connection-status[data-state="warning"] {
  border-color: rgba(255, 208, 138, 0.34);
  color: #ffd8a3;
}

.idiom-video-connection-status[data-state="error"] {
  border-color: rgba(255, 139, 139, 0.34);
  color: #ffc0c0;
}

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

.creator-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 3px solid rgba(130, 177, 255, 0.18);
}

.creator-card h3,
.creator-card p {
  margin: 0;
}

.creator-card h3 {
  color: #fdf2b5;
}

.creator-card p {
  color: var(--muted);
}

.creator-card-meta,
.creator-card-tags,
.creator-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.creator-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbebff;
  border: 2px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.creator-json-preview {
  min-height: 220px;
  resize: vertical;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.creator-json-preview.copied {
  border-color: rgba(126, 245, 177, 0.45);
}

.creator-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.58);
  border: 2px dashed rgba(130, 177, 255, 0.18);
  color: var(--muted);
  text-align: center;
}

.reward-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.reward-ticket-card,
.reward-summary-note,
.reward-game-card,
.reward-stage-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 3px solid rgba(130, 177, 255, 0.18);
}

.reward-ticket-value {
  margin: 8px 0 6px;
  color: #ffe9a2;
  font-size: 1.7rem;
  font-weight: 800;
}

.reward-summary-note p,
.reward-ticket-card p {
  margin: 0;
}

.reward-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.reward-game-card {
  display: grid;
  gap: 12px;
}

.reward-game-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.reward-game-top h3,
.reward-game-top p,
.reward-stage-card h3,
.reward-result-text {
  margin: 0;
}

.reward-game-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.3rem;
}

.reward-game-stage {
  min-height: 220px;
}

.reward-stage-card {
  display: grid;
  gap: 12px;
}

.reward-stage-card.success {
  border-color: rgba(120, 245, 159, 0.28);
  background: rgba(10, 34, 18, 0.72);
}

.reward-stage-card.gentle {
  border-color: rgba(255, 207, 90, 0.28);
  background: rgba(42, 31, 6, 0.68);
}

.reward-options {
  display: grid;
  gap: 10px;
}

.reward-option-btn {
  width: 100%;
  justify-content: flex-start;
}

.reward-result-text {
  color: #dfefff;
  line-height: 1.5;
}

.reward-stage-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.history-card,
.history-day-card,
.history-list-item {
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 3px solid rgba(130, 177, 255, 0.18);
}

.history-card {
  padding: 14px 16px;
}

.history-card p,
.history-card h3,
.history-day-card p,
.history-day-card h3,
.history-list-item p,
.history-list-item h3 {
  margin: 0;
}

.history-card p,
.history-list-item .history-meta,
.history-head .tip {
  color: var(--muted);
}

.history-card h3 {
  margin-top: 8px;
  color: var(--accent);
}

.history-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-parent-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
  gap: 12px;
}

.history-search-field {
  display: grid;
  gap: 8px;
}

.history-search-field span {
  color: #dce9ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.history-search-field input,
.history-search-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(130, 177, 255, 0.18);
  background: rgba(10, 21, 40, 0.78);
  color: var(--text);
}

.history-search-field input::placeholder {
  color: rgba(220, 233, 255, 0.56);
}

.history-parent-summary {
  display: grid;
  gap: 12px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.history-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.history-day-card {
  padding: 14px;
}

.history-day-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.history-day-top h3 {
  font-size: 1rem;
}

.history-day-top p {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-metrics {
  display: grid;
  gap: 10px;
}

.history-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.history-metric span {
  color: #dce9ff;
}

.history-value {
  color: #ffe6a6;
  font-size: 0.84rem;
}

.history-bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.history-bar {
  height: 100%;
  border-radius: 999px;
}

.history-bar.stars {
  background: linear-gradient(90deg, #ffde7a, #f7b500);
}

.history-bar.coins {
  background: linear-gradient(90deg, #77e6ff, #3db8e6);
}

.history-bar.streak {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
}

.history-bar.hearts {
  background: linear-gradient(90deg, #ff9ac0, #ff5d8f);
}

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

.history-parent-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 3px solid rgba(255, 207, 90, 0.18);
}

.history-parent-top,
.history-parent-meta,
.history-parent-topics,
.history-parent-log {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-parent-top {
  justify-content: space-between;
  align-items: flex-start;
}

.history-parent-top h3,
.history-parent-card p,
.history-parent-log-item p,
.history-parent-log-item h4 {
  margin: 0;
}

.history-parent-overview {
  color: #eef6ff;
  line-height: 1.6;
}

.history-parent-meta {
  align-items: center;
}

.history-parent-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #deebff;
  font-size: 0.82rem;
}

.history-topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(126, 245, 177, 0.12);
  border: 1px solid rgba(126, 245, 177, 0.18);
  color: #d6fff0;
  font-size: 0.8rem;
}

.history-parent-log {
  display: grid;
}

.history-parent-log-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.history-parent-log-item p {
  color: var(--muted);
}

.history-parent-log-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-parent-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.58);
  border: 2px dashed rgba(130, 177, 255, 0.18);
  color: var(--muted);
}

.history-list-item {
  padding: 14px 16px;
}

.history-list-top,
.history-list-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.history-list-stats {
  margin-top: 10px;
}

.history-list-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #deebff;
  font-size: 0.84rem;
}

.history-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.58);
  border: 2px dashed rgba(130, 177, 255, 0.18);
  color: var(--muted);
  text-align: center;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at right top, rgba(119, 230, 255, 0.16), transparent 28%),
    rgba(10, 21, 40, 0.74);
  border: 3px solid rgba(146, 180, 255, 0.16);
}

.map-toolbar-title {
  margin: 0 0 10px;
  color: #d9ebff;
  font-size: 0.95rem;
}

.interest-filters,
.world-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-chip,
.world-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #dbe9ff;
  font-size: 0.85rem;
}

.interest-chip {
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.interest-chip:hover {
  transform: translateY(-1px);
  background: rgba(119, 230, 255, 0.12);
}

.interest-chip.active {
  background: rgba(255, 207, 90, 0.18);
  border-color: rgba(255, 207, 90, 0.35);
  color: #ffe7a2;
}

.world-card {
  border-radius: 20px;
  padding: 16px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 22, 40, 0.82);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.world-scene-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.world-card.locked {
  opacity: 0.5;
  filter: grayscale(0.25);
}

.world-card[data-world-color="math"] {
  box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.25);
}

.world-card[data-world-color="german"] {
  box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.25);
}

.world-card[data-world-color="english"] {
  box-shadow: inset 0 0 0 2px rgba(52, 211, 153, 0.25);
}

.world-card[data-world-color="idiom"] {
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.world-card[data-world-color="history"] {
  box-shadow: inset 0 0 0 2px rgba(251, 113, 133, 0.25);
}

.world-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.world-icon {
  font-size: 2rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: #dbebff;
}

.world-card h3,
.world-card p {
  margin: 0;
}

.world-card p {
  color: var(--muted);
}

.world-card .world-summary {
  min-height: 44px;
}

.mission-panel {
  min-height: 560px;
}

.mission-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(119, 230, 255, 0.14);
  color: #c5f3ff;
  border: 2px solid rgba(119, 230, 255, 0.18);
}

.hidden,
.question-card.hidden,
.feedback-box.hidden,
.world-complete.hidden,
.pixel-btn.hidden {
  display: none !important;
}

.question-card {
  margin-top: 18px;
  position: relative;
}

.idiom-video-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.idiom-video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.76);
  backdrop-filter: blur(4px);
}

.idiom-video-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 4px solid rgba(130, 177, 255, 0.16);
  background: linear-gradient(180deg, rgba(19, 32, 61, 0.98), rgba(10, 20, 41, 0.98));
  box-shadow: 0 28px 56px rgba(4, 10, 20, 0.42);
}

.idiom-video-search-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.78);
  border: 2px solid rgba(130, 177, 255, 0.12);
}

.idiom-video-search-summary p {
  margin: 0;
}

.idiom-video-result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.idiom-video-result-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 2px solid rgba(130, 177, 255, 0.12);
  background: linear-gradient(180deg, rgba(29, 45, 74, 0.94), rgba(12, 22, 42, 0.94));
  color: var(--text);
  text-align: left;
}

.idiom-video-result-card.active {
  border-color: rgba(255, 207, 90, 0.62);
  box-shadow: 0 0 0 2px rgba(255, 207, 90, 0.12);
}

.idiom-video-result-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(2, 10, 22, 0.86);
}

.idiom-video-result-placeholder {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 10, 22, 0.86);
  color: var(--muted);
  text-align: center;
}

.idiom-video-result-card strong,
.idiom-video-result-card span,
.idiom-video-result-card small {
  display: block;
}

.idiom-video-result-card strong {
  font-size: 0.96rem;
}

.idiom-video-result-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.idiom-video-result-card small {
  color: #9edcff;
  font-size: 0.78rem;
}

.idiom-video-result-card[data-playable="false"] small {
  color: #ffd08a;
}

.idiom-video-top,
.idiom-video-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.idiom-video-top h3,
.idiom-video-info p {
  margin: 0;
}

.idiom-video-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 10, 22, 0.86);
  border: 2px solid rgba(130, 177, 255, 0.14);
}

.idiom-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.question-portal-flash {
  position: absolute;
  inset: 12px 12px auto 12px;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.question-portal-flash.active {
  animation: portalFadeOut 1.8s ease forwards;
}

.question-portal-card {
  min-width: min(100%, 420px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(126, 245, 177, 0.34);
  background: linear-gradient(135deg, rgba(12, 54, 62, 0.96), rgba(34, 39, 90, 0.94));
  box-shadow: 0 10px 32px rgba(18, 39, 70, 0.35);
  color: #e7fbff;
}

.question-portal-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.05rem;
}

.question-pack-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 207, 90, 0.26);
  background: linear-gradient(135deg, rgba(56, 36, 8, 0.82), rgba(28, 50, 72, 0.86));
  box-shadow: 0 0 0 1px rgba(255, 207, 90, 0.08), 0 12px 24px rgba(7, 14, 30, 0.22);
}

.question-pack-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #ffe8a0;
  animation: portalBannerRise 0.45s ease;
}

.question-pack-title::before {
  content: "✨";
}

.question-pack-text {
  color: #dff4ff;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.question-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.question-title-row h3 {
  margin: 0;
}

.question-world {
  margin: 0 0 8px;
  color: var(--accent-2);
}

.question-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  color: #d9f4ff;
}

.pixel-btn.generating {
  box-shadow: 0 0 0 2px rgba(126, 245, 177, 0.22), 0 0 20px rgba(126, 245, 177, 0.18);
  animation: generatorPulse 1.5s ease-in-out infinite;
}

@keyframes portalBannerRise {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portalFadeOut {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }

  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  70% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(1.02);
  }
}

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

.option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.feedback-box {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.feedback-group {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 24, 28, 0.34);
  overflow: hidden;
}

.feedback-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.feedback-group-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

.feedback-group-title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.feedback-group-body {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.feedback-group-cheer {
  border-color: rgba(126, 245, 177, 0.2);
}

.feedback-group-cheer .feedback-group-head {
  background: rgba(126, 245, 177, 0.08);
  color: #c9ffe0;
}

.feedback-group-explanation {
  border-color: rgba(111, 203, 255, 0.22);
}

.feedback-group-explanation .feedback-group-head {
  background: rgba(111, 203, 255, 0.08);
  color: #d4f2ff;
}

.feedback-group-fact {
  border-color: rgba(255, 207, 90, 0.22);
}

.feedback-group-fact .feedback-group-head {
  background: rgba(255, 207, 90, 0.08);
  color: #ffe9a2;
}

.feedback-group-repeat {
  border-color: rgba(191, 147, 255, 0.22);
}

.feedback-group-repeat .feedback-group-head {
  background: rgba(191, 147, 255, 0.08);
  color: #e7d8ff;
}

.feedback-group-rest {
  border-color: rgba(255, 161, 198, 0.2);
}

.feedback-group-rest .feedback-group-head {
  background: rgba(255, 161, 198, 0.08);
  color: #ffd7ea;
}

.feedback-box .feedback-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.feedback-line-lang {
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.feedback-line-zh .feedback-line-lang {
  background: rgba(126, 245, 177, 0.14);
  color: #baffd8;
}

.feedback-line-de .feedback-line-lang {
  background: rgba(111, 203, 255, 0.14);
  color: #d7f2ff;
}

.feedback-line-en .feedback-line-lang {
  background: rgba(255, 207, 90, 0.14);
  color: #ffe8ad;
}

.feedback-box .speech-line-active {
  background: rgba(255, 207, 90, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 207, 90, 0.32);
  transform: translateX(4px);
}

.feedback-box .speech-group-active {
  box-shadow: 0 0 0 2px rgba(255, 207, 90, 0.22), 0 12px 24px rgba(255, 207, 90, 0.08);
  transform: translateY(-1px);
}

.feedback-box .speech-group-active .feedback-group-head {
  border-bottom-color: rgba(255, 207, 90, 0.24);
}

/* ===========================================================
   A. 学习进度仪表盘 / 日历 / 徽章墙 / 保存按钮组
   =========================================================== */

.tech-savebar {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(6, 18, 42, 0.78);
  border: 2px solid rgba(126, 170, 255, 0.18);
}

.tech-savebar .pixel-btn {
  padding: 10px 14px;
  font-size: 0.86rem;
}

.save-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 245, 177, 0.1);
  border: 1px solid rgba(126, 245, 177, 0.28);
  color: #c9ffe0;
  font-size: 0.78rem;
  font-weight: 700;
}

.save-status-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7ef5b1;
  box-shadow: 0 0 0 5px rgba(126, 245, 177, 0.16);
}

.save-status-chip.warn .dot {
  background: #ffc266;
  box-shadow: 0 0 0 5px rgba(255, 194, 102, 0.16);
}

.save-status-chip.warn {
  background: rgba(255, 194, 102, 0.12);
  border-color: rgba(255, 194, 102, 0.32);
  color: #ffe6ad;
}

/* Hero 标题下的中国小探险家 banner */
.hero-tech-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 106, 61, 0.18), rgba(43, 106, 255, 0.18));
  border: 2px solid rgba(255, 106, 61, 0.28);
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #ffe4d0;
}

.hero-tech-banner .flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #e63946 0 58%, #ffde59 58% 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* 仪表盘面板 */
.progress-dashboard {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dashboard-head h3 {
  margin: 0;
  font-size: 1.22rem;
}

.dashboard-head .tip {
  margin: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.kpi-card {
  position: relative;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 36, 68, 0.92), rgba(8, 20, 42, 0.92));
  border: 2px solid rgba(126, 170, 255, 0.18);
  box-shadow: inset 0 -10px 0 rgba(43, 106, 255, 0.08);
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.28), transparent 60%);
  opacity: 0.9;
}

.kpi-card.zhurong::after { background: radial-gradient(circle, rgba(255, 106, 61, 0.32), transparent 60%); }
.kpi-card.tiangong::after { background: radial-gradient(circle, rgba(43, 106, 255, 0.32), transparent 60%); }
.kpi-card.beidou::after  { background: radial-gradient(circle, rgba(191, 212, 245, 0.3), transparent 60%); }
.kpi-card.chang-e::after { background: radial-gradient(circle, rgba(217, 231, 255, 0.3), transparent 60%); }
.kpi-card.revival::after { background: radial-gradient(circle, rgba(255, 194, 102, 0.3), transparent 60%); }
.kpi-card.jiaolong::after { background: radial-gradient(circle, rgba(100, 224, 182, 0.3), transparent 60%); }
.kpi-card.c919::after { background: radial-gradient(circle, rgba(179, 136, 255, 0.3), transparent 60%); }

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 106, 61, 0.18);
  border: 1px solid rgba(255, 106, 61, 0.36);
  color: #ffd9c7;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tiangong .kpi-icon { background: rgba(43, 106, 255, 0.18); border-color: rgba(43, 106, 255, 0.36); color: #d9e7ff; }
.beidou  .kpi-icon { background: rgba(191, 212, 245, 0.18); border-color: rgba(191, 212, 245, 0.36); color: #e8f0ff; }
.chang-e .kpi-icon { background: rgba(217, 231, 255, 0.18); border-color: rgba(217, 231, 255, 0.34); color: #f3f7ff; }
.revival .kpi-icon { background: rgba(255, 194, 102, 0.18); border-color: rgba(255, 194, 102, 0.36); color: #ffe9c2; }
.jiaolong .kpi-icon { background: rgba(100, 224, 182, 0.18); border-color: rgba(100, 224, 182, 0.36); color: #d3fff1; }
.c919    .kpi-icon { background: rgba(179, 136, 255, 0.18); border-color: rgba(179, 136, 255, 0.36); color: #ecd9ff; }

.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.kpi-value {
  display: block;
  font-size: 1.58rem;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.01em;
}

.kpi-value small {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
}

.kpi-hint {
  display: block;
  margin-top: 8px;
  color: #c5d9ff;
  font-size: 0.76rem;
}

/* 日历 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-head-row {
  display: contents;
}

.calendar-head-cell {
  padding: 8px 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: #a8c3ee;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(43, 106, 255, 0.1);
}

.calendar-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 14px;
  background: rgba(9, 22, 46, 0.72);
  border: 2px solid rgba(126, 170, 255, 0.14);
  color: #d9e7ff;
  font-weight: 800;
  font-size: 0.9rem;
}

.calendar-cell.today {
  border-color: rgba(255, 106, 61, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.18);
  background: linear-gradient(180deg, rgba(255, 106, 61, 0.22), rgba(9, 22, 46, 0.8));
  color: #ffe2d0;
}

.calendar-cell.checked {
  background: linear-gradient(180deg, rgba(43, 106, 255, 0.32), rgba(9, 22, 46, 0.8));
  border-color: rgba(126, 170, 255, 0.44);
  color: #e6efff;
}

.calendar-cell.checked::after {
  content: "🚀";
  font-size: 0.95rem;
}

.calendar-cell.checked.streak-7::after { content: "🏅"; }
.calendar-cell.checked.streak-30::after { content: "🛰️"; }

.calendar-cell.empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.calendar-day-num {
  line-height: 1;
}

.calendar-stars {
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.calendar-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.calendar-legend {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend .sw {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(126, 170, 255, 0.2);
}

.calendar-legend .sw.today { background: rgba(255, 106, 61, 0.28); border-color: rgba(255, 106, 61, 0.44); }
.calendar-legend .sw.checked { background: rgba(43, 106, 255, 0.3); border-color: rgba(126, 170, 255, 0.44); }

/* 徽章墙 */
.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.badge-card {
  position: relative;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(8, 18, 38, 0.72);
  border: 2px dashed rgba(126, 170, 255, 0.2);
  opacity: 0.82;
  filter: saturate(0.3) brightness(0.82);
  text-align: center;
  overflow: hidden;
}

.badge-card.unlocked {
  border-style: solid;
  border-color: rgba(255, 194, 102, 0.38);
  background:
    linear-gradient(180deg, rgba(41, 28, 6, 0.92), rgba(10, 22, 46, 0.92));
  opacity: 1;
  filter: saturate(1) brightness(1);
  box-shadow: 0 0 0 3px rgba(255, 194, 102, 0.1), 0 0 40px rgba(255, 194, 102, 0.1);
}

.badge-ribbon {
  position: absolute;
  top: 10px;
  right: -22px;
  transform: rotate(35deg);
  padding: 3px 28px;
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(90deg, #e63946, #ffde59);
  color: #321b00;
  letter-spacing: 0.08em;
  opacity: 0;
  transform-origin: center;
}

.badge-card.unlocked .badge-ribbon {
  opacity: 0.98;
}

.badge-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.4), transparent 38%),
    linear-gradient(180deg, rgba(255, 194, 102, 0.38), rgba(43, 106, 255, 0.2));
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 1.8rem;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.15);
}

.badge-name {
  font-weight: 900;
  font-size: 0.94rem;
  margin: 0 0 4px;
  color: #ffe9c2;
}

.badge-card:not(.unlocked) .badge-name {
  color: #aec5ec;
}

.badge-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.badge-progress {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(126, 170, 255, 0.18);
  font-size: 0.74rem;
  color: #c3d8ff;
}

/* side-nav 新按钮样式兼容 */
.side-nav-btn .badge-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
  height: 20px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6a3d, #ffc266);
  color: #2b1000;
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.18);
}

/* 响应式 */
@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .badge-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-head { align-items: flex-start; }
  .tech-savebar { width: 100%; justify-content: flex-start; }
  .hero-tech-banner { margin-top: 4px; }
}

.feedback-box .feedback-line:hover,
.feedback-box .feedback-line:focus-visible {
  border-color: rgba(126, 245, 177, 0.32);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.feedback-line-text {
  min-width: 0;
}

.feedback-line-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(126, 245, 177, 0.1);
  color: #b8ffe1;
  font-size: 0.78rem;
  white-space: nowrap;
}

.feedback-line-action::before {
  content: "🔊";
}

@media (max-width: 640px) {
  .settings-switcher {
    grid-template-columns: 1fr;
  }

  .settings-switch-btn,
  .settings-focus-card {
    grid-template-columns: 1fr;
  }

  .douyin-credential-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes generatorPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.12), 0 16px 32px rgba(255, 207, 90, 0.12);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 207, 90, 0.18), 0 18px 36px rgba(255, 207, 90, 0.18);
  }
}

@media (max-width: 860px) {
  .side-nav,
  .generator-step-dots,
  .generator-card-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .feedback-box .feedback-line {
    grid-template-columns: auto 1fr;
  }

  .feedback-line-action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.feedback-box.success {
  border-color: rgba(120, 245, 159, 0.28);
  background: rgba(10, 34, 18, 0.72);
}

.feedback-box.gentle {
  border-color: rgba(255, 207, 90, 0.28);
  background: rgba(42, 31, 6, 0.68);
}

.reward-unlock-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 207, 90, 0.14);
  border: 1px solid rgba(255, 207, 90, 0.24);
  color: #ffe9a2;
}

.world-complete {
  margin-top: 18px;
  border-color: rgba(255, 207, 90, 0.28);
}

.world-complete h3 {
  margin-top: 0;
  color: #ffe9a2;
}

@media (max-width: 980px) {
  .layout,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .play-column,
  .side-column {
    gap: 16px;
  }

  .history-summary,
  .history-parent-toolbar,
  .culture-story-summary,
  .china-chapter-trail,
  .china-companion-grid,
  .china-collection-grid,
  .history-chart,
  .reward-summary,
  .creator-options,
  .creator-meta-row {
    grid-template-columns: 1fr 1fr;
  }

  .option-row {
    grid-template-columns: 1fr;
  }

  .question-title-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 14px;
  }

  .history-parent-toolbar,
  .culture-story-summary,
  .china-chapter-trail,
  .china-companion-grid,
  .china-collection-grid,
  .culture-story-kpis {
    grid-template-columns: 1fr;
  }

  .topbar,
  .map-toolbar,
  .history-head,
  .section-head,
  .question-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-summary,
  .history-chart,
  .reward-summary,
  .creator-options,
  .creator-meta-row {
    grid-template-columns: 1fr;
  }

  .history-metric {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

}

/* =========================================================
 *  Footer + 法律合规页（Impressum / Datenschutz）
 * ========================================================= */

.site-footer {
  position: relative;
  margin-top: 48px;
  padding: 28px 24px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 106, 61, 0.18);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 106, 61, 0.10), transparent 55%),
    radial-gradient(120% 120% at 100% 0%, rgba(43, 106, 255, 0.12), transparent 55%),
    rgba(9, 12, 24, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #d9deea;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.55), rgba(43, 106, 255, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px 32px;
  align-items: start;
}

.site-footer h4 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #ffcf5a;
  text-transform: uppercase;
}

.site-footer p,
.site-footer li {
  margin: 4px 0;
  color: #b9c0d1;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: #7db0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(125, 176, 255, 0.4);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer a:hover {
  color: #ffcf5a;
  border-color: rgba(255, 207, 90, 0.6);
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.footer-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6a3d, #2b6aff);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(43, 106, 255, 0.35);
}

.footer-brand-title {
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.footer-brand-sub {
  font-size: 12px;
  color: #8b94a8;
}

.footer-copy {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(153, 163, 185, 0.25);
  font-size: 12px;
  color: #8b94a8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
}

.footer-copy .footer-copy-right {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- 法律合规页容器 ---- */

.legal-page {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  color: #dfe4ef;
  font-size: 15px;
  line-height: 1.75;
}

.legal-page .legal-header {
  margin-bottom: 28px;
  padding: 28px 28px 24px;
  border-radius: 22px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 106, 61, 0.12), transparent 55%),
    radial-gradient(120% 120% at 100% 0%, rgba(43, 106, 255, 0.14), transparent 55%),
    rgba(10, 13, 26, 0.9);
  border: 1px solid rgba(255, 106, 61, 0.2);
}

.legal-page .legal-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.55), rgba(43, 106, 255, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.legal-header-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 106, 61, 0.14);
  color: #ffcf5a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.legal-page h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #fff;
}

.legal-page .legal-lead {
  margin: 0;
  color: #b9c0d1;
  font-size: 14px;
}

.legal-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(43, 106, 255, 0.18);
  color: #cfe0ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(43, 106, 255, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

.legal-home-link:hover {
  transform: translateY(-1px);
  background: rgba(43, 106, 255, 0.28);
  color: #fff;
}

.legal-page .legal-body {
  padding: 28px;
  border-radius: 22px;
  background: rgba(10, 13, 26, 0.78);
  border: 1px solid rgba(153, 163, 185, 0.18);
}

.legal-page h2 {
  margin: 28px 0 10px;
  padding-bottom: 6px;
  font-size: 19px;
  font-weight: 800;
  color: #ffcf5a;
  border-bottom: 1px dashed rgba(255, 207, 90, 0.22);
}

.legal-page h2:first-child {
  margin-top: 0;
}

.legal-page h3 {
  margin: 20px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #7db0ff;
}

.legal-page p {
  margin: 8px 0;
  color: #cfd4df;
}

.legal-page ul,
.legal-page ol {
  padding-left: 22px;
  margin: 8px 0;
  color: #cfd4df;
}

.legal-page li {
  margin: 4px 0;
}

.legal-page strong {
  color: #fff;
}

.legal-page a {
  color: #7db0ff;
  word-break: break-all;
}

.legal-page address {
  font-style: normal;
  line-height: 1.7;
  color: #cfd4df;
}

.legal-page .legal-note {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 207, 90, 0.08);
  border: 1px dashed rgba(255, 207, 90, 0.3);
  font-size: 13px;
  color: #e4d29c;
}

.legal-page .legal-version {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px dashed rgba(153, 163, 185, 0.25);
  font-size: 12px;
  color: #8b94a8;
}

/* ---- 响应式：Footer + 法律页 ---- */

@media (max-width: 960px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 22px 16px 18px;
    margin-top: 28px;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .legal-page {
    padding: 22px 12px 60px;
  }

  .legal-page .legal-header,
  .legal-page .legal-body {
    padding: 18px;
  }

  .legal-page h1 {
    font-size: 22px;
  }
}

/* ============================================================
   题目 Modal · 全宽弹出遮罩 + 窗口
   ============================================================ */
.question-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: start center;
  padding: 28px 20px 40px;
  overflow: hidden;
}
.question-modal-overlay.hidden { display: none !important; }

.question-modal-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -10%, rgba(110, 231, 249, 0.14), transparent 55%), rgba(3, 10, 22, 0.82);
  backdrop-filter: blur(6px);
}

.question-modal-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  border: 3px solid rgba(130, 177, 255, 0.22);
  background: linear-gradient(180deg, rgba(20, 34, 64, 0.98), rgba(9, 19, 40, 0.98));
  box-shadow: 0 32px 64px rgba(2, 8, 18, 0.52), 0 0 0 1px rgba(255, 207, 90, 0.08) inset;
  overflow: hidden;
}

.question-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 6px 10px;
  border-bottom: 1px dashed rgba(130, 177, 255, 0.22);
}
.question-modal-header h3 {
  font-size: 22px;
  color: #fff;
}
.question-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.question-modal-header .close-x {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 18px;
  color: #fff;
  background: rgba(255, 83, 83, 0.12);
  border: 2px solid rgba(255, 83, 83, 0.28);
}
.question-modal-header .close-x:hover {
  background: rgba(255, 83, 83, 0.22);
}

.question-modal-body {
  overflow-y: auto;
  padding-right: 4px;
}
.question-modal-body::-webkit-scrollbar { width: 10px; }
.question-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2b4d82, #1e3558);
  border-radius: 8px;
}

.question-modal-wrap .question-card {
  margin-top: 10px;
  padding: 20px;
  border-radius: 22px;
}
.question-modal-wrap .question-head {
  gap: 18px;
}
.question-modal-wrap .question-title-row h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
}
.question-modal-wrap .world-complete {
  margin-top: 10px;
  padding: 22px;
  border-radius: 22px;
}

@media (max-width: 960px) {
  .question-modal-overlay { padding: 12px 0 24px; }
  .question-modal-wrap {
    max-height: calc(100vh - 20px);
    border-radius: 22px;
    padding: 14px;
  }
  .question-modal-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .question-modal-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   管理员模式解锁 · 设置面板 API Key 区
   ============================================================ */
.admin-lock-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(255, 207, 90, 0.07);
  border: 2px dashed rgba(255, 207, 90, 0.32);
}
.admin-lock-row label {
  font-weight: 600;
  color: #ffdd90;
}
.admin-lock-row input[type="password"] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid rgba(130, 177, 255, 0.22);
  background: rgba(3, 11, 24, 0.72);
  color: #fff;
  font-size: 14px;
  outline: none;
}
.admin-lock-row input[type="password"]:focus {
  border-color: rgba(255, 207, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.12);
}
.admin-lock-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: rgba(255, 83, 83, 0.14);
  color: #ff9a9a;
  border: 1px solid rgba(255, 83, 83, 0.32);
}
.admin-lock-chip.unlocked {
  background: rgba(96, 255, 164, 0.14);
  color: #78f2ae;
  border-color: rgba(96, 255, 164, 0.32);
}
.admin-lock-tip {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  color: #a9b6c8;
  background: rgba(10, 20, 40, 0.6);
  border-left: 4px solid #ffcf5a;
}
.admin-lock-row + .field input:disabled,
.admin-disabled input {
  background: rgba(3, 11, 24, 0.72) !important;
  color: #6d7890 !important;
  -webkit-text-security: disc;
}

