/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 238, 223, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(38, 53, 66, 0.16);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--teal);
  color: #fffdf6;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.2);
  transform: rotate(-3deg);
}

.brand-mark .i {
  font-size: 22px;
}

.brand-type {
  display: grid;
  line-height: 1.15;
}

.brand-type strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-type small {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--ink-2);
}

.topbar-stats {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid rgba(38, 53, 66, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.72);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.stat-pill b {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.stat-pill .i {
  color: var(--gold);
  font-size: 16px;
}

.level-pill {
  gap: 8px;
  padding-right: 6px;
}

.level-pill .mini-bar {
  width: 46px;
  height: 6px;
  border-radius: 999px;
  background: rgba(38, 53, 66, 0.12);
  overflow: hidden;
}

.level-pill .mini-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

/* ============ 首页 ============ */
.home {
  display: grid;
  gap: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 24px;
  padding: 24px 26px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 90% 0%, rgba(234, 169, 60, 0.16), transparent 65%),
    linear-gradient(135deg, #fffdf6 0%, #fbf4e3 100%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  bottom: -80px;
  border: 2px dashed rgba(38, 53, 66, 0.12);
  border-radius: 50%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 6px 2px;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 62px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.hero h1 .accent {
  color: var(--teal);
  position: relative;
  display: inline-block;
}

.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 8px;
  background: rgba(234, 169, 60, 0.38);
  border-radius: 999px;
  z-index: -1;
}

.hero-lead {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 30em;
  line-height: 1.7;
}

.hero-lead b {
  color: var(--ink);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-art {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

.scene-frame {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 6px 6px 0 rgba(38, 53, 66, 0.14);
}

.scene-frame .island-svg {
  width: 100%;
  height: auto;
}

.hero-mascot {
  position: absolute;
  width: clamp(96px, 12vw, 142px);
  right: -4px;
  bottom: -30px;
  filter: drop-shadow(0 8px 0 rgba(38, 53, 66, 0.1));
  pointer-events: none;
}

.hero-bubble {
  position: absolute;
  right: 8%;
  top: 4%;
  max-width: 190px;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  background: #fffdf6;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.14);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  transform: rotate(2deg);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.prep-chapter {
  display: grid;
  gap: 16px;
}

.prep-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-block {
  display: grid;
  gap: 7px;
}

.team-editor {
  border-top: 1.5px dashed rgba(38, 53, 66, 0.18);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.team-slot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1.5px solid rgba(38, 53, 66, 0.16);
  border-radius: 12px;
  background: #fffef9;
}

.team-slot .avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--paper);
  border: 1.5px solid rgba(38, 53, 66, 0.2);
  font-size: 11px;
  font-weight: 900;
  color: var(--ink-2);
  flex: none;
}

.team-slot input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 0;
  outline: none;
  min-width: 0;
}

.team-slot input:focus {
  border-bottom: 1.5px solid var(--teal);
}

.role-note {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.role-note .chip {
  height: 26px;
  font-size: 11.5px;
  background: rgba(255, 253, 246, 0.6);
}

.daily-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(234, 169, 60, 0.22), transparent 70%),
    var(--card);
}

.daily-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.daily-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--gold-soft);
  color: #8a5d0c;
  flex: none;
  transform: rotate(-3deg);
}

.daily-icon .i {
  font-size: 24px;
}

.daily-dots {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.daily-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(38, 53, 66, 0.12);
}

.daily-dots span.done {
  background: var(--gold);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-cell {
  background: var(--card);
  border: 1.5px solid rgba(38, 53, 66, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-cell .i {
  font-size: 21px;
  color: var(--teal);
}

.stat-cell b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-cell small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* 章节 */
.chapters-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.chapters-head h2 {
  font-size: 24px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.chapter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.chapter-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(38, 53, 66, 0.18);
}

.chapter-card.is-selected {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.chapter-card.is-locked {
  opacity: 0.76;
  filter: saturate(0.6);
}

.chapter-card .chapter-art {
  border-bottom: 2px solid var(--line);
  background: var(--paper);
}

.chapter-card .mini-scene {
  width: 100%;
  height: auto;
}

.chapter-card .chapter-body {
  padding: 11px 13px 8px;
  flex: 1;
}

.chapter-card .chapter-body .num {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.chapter-card .chapter-body h3 {
  font-size: 17px;
  margin-top: 1px;
}

.chapter-card .chapter-body p {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chapter-card .chapter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 13px 10px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-2);
  border-top: 1.5px dashed rgba(38, 53, 66, 0.13);
}

.chapter-card .lock-badge {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 246, 0.9);
  color: var(--ink-2);
}

/* ============ 地图 ============ */
.map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.map-head .back-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.map-title h1 {
  font-size: clamp(26px, 3.4vw, 36px);
}

.map-title p {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 2px;
}

.run-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.run-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border: 1.5px solid rgba(38, 53, 66, 0.22);
  border-radius: 11px;
  background: var(--card);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.run-stamp b {
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.run-stamp .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sub, var(--teal));
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.map-panel {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 1040px;
  background:
    linear-gradient(180deg, var(--ch-tint, #f0f7ec) 0%, #fbf5e6 45%, var(--ch-tint, #f0f7ec) 100%);
  border-radius: 26px;
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(38, 53, 66, 0.08) 1px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.35;
}

.map-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.map-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.map-path .path-base {
  fill: none;
  stroke: rgba(38, 53, 66, 0.18);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 11;
  vector-effect: non-scaling-stroke;
}

.map-path .path-done {
  fill: none;
  stroke: var(--ch-deep, var(--teal));
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke-dashoffset 0.8s ease;
}

.map-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  max-width: 210px;
}

.map-node.side-left {
  flex-direction: row-reverse;
  text-align: right;
}

.map-node .dot {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-2);
  box-shadow: 3px 3px 0 rgba(38, 53, 66, 0.16);
  transition: transform 0.16s ease, background 0.16s ease;
}

.map-node .dot .i {
  font-size: 22px;
}

.map-node:hover .dot {
  transform: translateY(-2px);
}

.map-node.is-done .dot {
  background: var(--ch-mid, var(--teal));
  color: #fffdf6;
}

.map-node.is-current .dot {
  background: var(--gold);
  color: #4a330d;
  box-shadow: 0 0 0 4px rgba(234, 169, 60, 0.22), 3px 3px 0 rgba(38, 53, 66, 0.16);
}

.map-node.is-current .dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px dashed rgba(38, 53, 66, 0.5);
  border-radius: 50%;
  animation: spin 14s linear infinite;
}

.map-node.is-locked {
  cursor: not-allowed;
}

.map-node.is-locked .dot {
  background: #e9e1d0;
  color: #9da5a8;
  border-style: dashed;
  box-shadow: none;
}

.map-node.is-boss .dot {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--ch-deep, var(--teal));
  color: #fffdf6;
}

.map-node.is-boss.is-locked .dot {
  background: #e9e1d0;
  color: #9da5a8;
}

.map-node .node-label {
  display: inline-grid;
  gap: 1px;
  padding: 5px 9px;
  border: 1.5px solid rgba(38, 53, 66, 0.22);
  border-radius: 10px;
  background: rgba(255, 253, 246, 0.94);
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.1);
  max-width: 140px;
}

.map-node .node-label b {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-node .node-label small {
  font-size: 9.5px;
  color: var(--ink-2);
  line-height: 1.3;
  white-space: nowrap;
}

.map-node.is-current .node-label {
  border-color: var(--line);
  box-shadow: 3px 3px 0 rgba(38, 53, 66, 0.16);
}

.map-node.is-current .node-label b {
  color: var(--ch-deep, var(--teal-deep));
}

.map-panel-foot {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.8);
  border: 1.5px solid rgba(38, 53, 66, 0.14);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
  backdrop-filter: blur(4px);
}

.map-side {
  display: grid;
  gap: 13px;
  position: sticky;
  top: 78px;
}

.side-card {
  padding: 15px 16px;
}

.side-card h3 {
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}

.side-card .sub {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.side-node-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--ch-deep, var(--teal-deep));
  margin-bottom: 4px;
}

.side-card .btn {
  margin-top: 12px;
}

.team-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.team-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 11.5px;
  border: 1.5px solid transparent;
}

.team-person.is-active {
  background: var(--gold-soft);
  border-color: rgba(234, 169, 60, 0.4);
}

.team-person .avatar {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1.5px solid rgba(38, 53, 66, 0.2);
  font-size: 9.5px;
  font-weight: 900;
  flex: none;
}

.team-person b {
  font-size: 11.5px;
}

.team-person small {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 10px;
}

.skill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.skill-tiny {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1.5px solid rgba(38, 53, 66, 0.2);
  border-radius: 9px;
  background: #fffef9;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.skill-tiny .i {
  color: var(--teal);
}

.skill-tiny b {
  color: var(--ink);
}

.mini-stamps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.mini-stamp {
  text-align: center;
  padding: 7px 4px;
  border: 1.5px dashed rgba(38, 53, 66, 0.24);
  border-radius: 10px;
  background: var(--sub-soft);
}

.mini-stamp b {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
}

.mini-stamp small {
  font-size: 9.5px;
  color: var(--ink-2);
  font-weight: 700;
}

/* ============ 答题 ============ */
.quiz-screen {
  max-width: 1000px;
  margin: 0 auto;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.quiz-progress {
  flex: 1;
  min-width: 0;
}

.quiz-progress .line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.quiz-progress .line b {
  font-size: 13px;
}

.quiz-progress .line small {
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 700;
}

.quiz-progress .bar {
  height: 8px;
}

.quiz-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.combo-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1.5px solid rgba(234, 169, 60, 0.45);
  color: #7a5510;
  font-size: 11.5px;
  font-weight: 900;
}

.combo-pill .i {
  font-size: 14px;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 18px;
  align-items: start;
}

.qcard {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-top: 8px solid var(--sub, var(--teal));
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.qcard.enter {
  animation: card-in 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.qcard.elite {
  box-shadow: 0 0 0 3px rgba(234, 169, 60, 0.24), var(--shadow-lg);
}

.qcard-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 22px;
  background: linear-gradient(180deg, var(--sub-soft, #eef6f2), rgba(255, 253, 246, 0));
  border-bottom: 1.5px dashed rgba(38, 53, 66, 0.16);
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--sub);
  color: #fffdf6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.subject-tag .i {
  font-size: 14px;
}

.layer-tag,
.qtype-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1.5px solid rgba(38, 53, 66, 0.18);
  background: rgba(255, 253, 246, 0.7);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
}

.qtype-tag {
  border-style: dashed;
}

.qcard-head .stars {
  margin-left: auto;
}

.qcard-body {
  padding: 24px 26px 20px;
}

.q-prompt {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.48;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.q-passage {
  margin-top: 16px;
  padding: 15px 17px;
  border-left: 4px solid var(--sub);
  border-radius: 0 12px 12px 0;
  background: var(--sub-soft);
  font-size: 15px;
  line-height: 1.95;
  color: #33434e;
}

.q-subquestion {
  margin-top: 13px;
  font-size: 17px;
  font-weight: 800;
}

.q-visual {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.q-answer {
  margin-top: 22px;
}

.q-hint-inline {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--gold-soft);
  border: 1.5px dashed rgba(234, 169, 60, 0.55);
  font-size: 12.5px;
  line-height: 1.6;
  color: #6c4a0e;
  animation: fade-up 0.25s ease both;
}

.q-hint-inline .i {
  margin-top: 2px;
  color: #a97412;
}

.qcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 18px;
  border-top: 1.5px dashed rgba(38, 53, 66, 0.14);
  background: rgba(250, 245, 233, 0.55);
}

.q-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.q-foot-hint {
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 700;
}

/* 选项 */
.option-list {
  display: grid;
  gap: 9px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  border: 2px solid rgba(38, 53, 66, 0.2);
  border-radius: 13px;
  background: #fffef9;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.option:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  border-color: var(--sub);
  box-shadow: 3px 3px 0 rgba(38, 53, 66, 0.12);
}

.option-key {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1.5px solid rgba(38, 53, 66, 0.2);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.option[aria-checked="true"] {
  border-color: var(--sub);
  background: var(--sub-soft);
  box-shadow: inset 0 0 0 1.5px var(--sub);
}

.option[aria-checked="true"] .option-key {
  background: var(--sub);
  color: #fff;
  border-color: var(--sub);
}

.option.correct {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

.option.correct .option-key {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.option.wrong {
  border-color: var(--coral);
  background: #fdf0ec;
  box-shadow: inset 0 0 0 1.5px var(--coral);
  animation: shake 0.4s ease;
}

.option.wrong .option-key {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.option:disabled {
  cursor: default;
}

/* 数字输入 */
.number-answer {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.number-display {
  min-width: 220px;
  min-height: 74px;
  padding: 6px 20px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid var(--ink);
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.number-display.is-empty {
  color: #c9c0ae;
}

.number-display .caret {
  width: 3px;
  height: 38px;
  background: var(--sub);
  margin-left: 3px;
  animation: blink 1.1s steps(2) infinite;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: min(100%, 330px);
}

.key {
  height: 48px;
  border: 1.5px solid rgba(38, 53, 66, 0.22);
  border-radius: 11px;
  background: #fffef9;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.08);
  transition: transform 0.1s ease, background 0.1s ease;
}

.key:hover {
  background: var(--sub-soft);
}

.key:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.key.wide {
  grid-column: span 1;
  font-size: 14px;
}

.number-note {
  font-size: 11.5px;
  color: var(--ink-2);
}

/* 文本输入 */
.text-answer {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.text-answer .input {
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.text-answer .text-note {
  font-size: 11.5px;
  color: var(--ink-2);
}

/* 排序 */
.order-board {
  min-height: 90px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 2px dashed rgba(38, 53, 66, 0.28);
  border-radius: 15px;
  background: rgba(245, 238, 223, 0.5);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.order-board.is-drop {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.order-board:empty::before,
.order-board.is-empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  padding-left: 4px;
}

.order-board.shake,
.stroke-seq.shake {
  animation: shake 0.45s ease;
  border-color: var(--coral);
}

.order-pool-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}

.token-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  margin-top: 7px;
  padding: 8px;
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.5);
}

.token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 12px;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: #fffef9;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.14);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.token:hover {
  background: var(--sub-soft);
  transform: translate(-1px, -1px);
}

.token:active {
  cursor: grabbing;
}

.token.is-dragging {
  opacity: 0.3;
}

.token.in-answer {
  background: var(--sub-soft);
  border-color: var(--sub);
}

.token .idx {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(38, 53, 66, 0.1);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-2);
}

.token-ghost {
  position: fixed;
  z-index: 130;
  pointer-events: none;
  margin: 0;
  transform: rotate(-2deg) scale(1.04);
  box-shadow: 5px 5px 0 rgba(38, 53, 66, 0.2);
  opacity: 0.96;
}

/* 笔顺 */
.stroke-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.stroke-stage-wrap {
  display: grid;
  gap: 9px;
  justify-items: center;
}

.tian-grid {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.7px), rgba(38, 53, 66, 0.16) 50%, transparent calc(50% + 0.7px)),
    linear-gradient(0deg, transparent calc(50% - 0.7px), rgba(38, 53, 66, 0.16) 50%, transparent calc(50% + 0.7px)),
    repeating-linear-gradient(45deg, transparent 0 47px, rgba(38, 53, 66, 0.06) 47px 48px),
    repeating-linear-gradient(-45deg, transparent 0 47px, rgba(38, 53, 66, 0.06) 47px 48px),
    #fffef8;
  overflow: hidden;
  box-shadow: inset 0 0 0 5px rgba(255, 253, 246, 0.7);
}

.tian-grid svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 8%;
}

.stroke-svg .trace-path {
  fill: #f3b5a5;
  opacity: 0.55;
}

.stroke-svg .ink-path {
  fill: #2c3d49;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.stroke-svg.play .ink-path {
  animation: stroke-in 0.3s ease forwards;
  animation-delay: calc(var(--i) * 0.26s);
}

.stroke-svg.static .ink-path {
  opacity: 1;
}

.stroke-svg.play .trace-path {
  animation: trace-fade 0.3s ease forwards;
  animation-delay: calc(var(--i) * 0.26s);
}

.stroke-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.stroke-caption {
  font-size: 11px;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.5;
}

.count-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.count-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid rgba(38, 53, 66, 0.24);
  border-radius: 12px;
  background: #fffef9;
  padding: 3px;
}

.stepper button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 16px;
  background: var(--paper);
  border: 1.5px solid rgba(38, 53, 66, 0.16);
}

.stepper button:hover {
  background: var(--sub-soft);
}

.stepper b {
  min-width: 44px;
  text-align: center;
  font-family: var(--mono);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.first-stroke-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.stroke-name-btn {
  height: 38px;
  border: 1.5px solid rgba(38, 53, 66, 0.22);
  border-radius: 9px;
  background: #fffef9;
  font-size: 12.5px;
  font-weight: 800;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.stroke-name-btn:hover {
  background: var(--sub-soft);
}

.stroke-name-btn[aria-pressed="true"] {
  background: var(--sub);
  border-color: var(--sub);
  color: #fff;
}

.stroke-name-btn.correct {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.stroke-name-btn.wrong {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
  animation: shake 0.35s;
}

.stroke-seq {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stroke-slot {
  position: relative;
  width: 64px;
  height: 78px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  border: 2px solid rgba(38, 53, 66, 0.22);
  border-radius: 11px;
  background: #fffef9;
  padding: 4px;
}

.stroke-slot .num {
  position: absolute;
  left: 4px;
  top: 3px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
  font-weight: 700;
}

.stroke-slot .mini-svg {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.stroke-slot .mini-svg svg {
  width: 100%;
  height: 100%;
}

.stroke-slot .name {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-2);
  line-height: 1.2;
}

.stroke-slot.is-missing {
  border-style: dashed;
  border-color: var(--coral);
  background: #fdf1ed;
}

.stroke-slot.is-missing .name {
  color: var(--coral);
  font-size: 15px;
  font-weight: 900;
}

.stroke-slot.is-picked {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(234, 169, 60, 0.3);
}

.spot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.spot-card {
  position: relative;
  width: 78px;
  min-height: 92px;
  padding: 6px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  border: 2px solid rgba(38, 53, 66, 0.22);
  border-radius: 12px;
  background: #fffef9;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.spot-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--sub);
}

.spot-card .mini-svg {
  width: 52px;
  height: 52px;
}

.spot-card .name {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.spot-card[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 2px rgba(234, 169, 60, 0.3);
}

.spot-card.correct {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.spot-card.wrong {
  border-color: var(--coral);
  background: #fdf0ec;
  animation: shake 0.4s;
}

/* 创作题 */
.open-answer {
  display: grid;
  gap: 9px;
}

.open-answer .textarea {
  min-height: 110px;
  font-size: 15px;
}

.open-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
}

/* 反馈条 */
.q-feedback {
  margin: 0 22px 20px;
  padding: 13px 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 2px solid var(--teal);
  border-radius: 14px;
  background: var(--teal-soft);
  animation: fade-up 0.25s ease both;
}

.q-feedback.is-wrong {
  border-color: #e0a33e;
  background: #fdf4df;
}

.q-feedback .fb-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
}

.q-feedback.is-wrong .fb-icon {
  background: #d99a2b;
}

.q-feedback .fb-title {
  font-size: 14px;
  font-weight: 900;
}

.q-feedback .fb-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: #3b4a54;
  margin-top: 1px;
}

.q-feedback .fb-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  flex: none;
}

/* 侧栏 */
.quiz-side {
  display: grid;
  gap: 13px;
  position: sticky;
  top: 78px;
}

.mascot-card {
  padding: 12px 12px 10px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(234, 169, 60, 0.18), transparent 70%),
    var(--card);
}

.mascot-card .mascot {
  width: 108px;
  margin: 0 auto -2px;
}

.speech {
  position: relative;
  margin-top: 6px;
  padding: 9px 11px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fffef9;
  font-size: 11.5px;
  line-height: 1.55;
  text-align: left;
  color: var(--ink-2);
}

.speech::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 10px;
  height: 10px;
  background: #fffef9;
  border-left: 2px solid var(--line);
  border-top: 2px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

.skill-dock {
  display: grid;
  gap: 6px;
}

.skill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid rgba(38, 53, 66, 0.18);
  border-radius: 10px;
  background: #fffef9;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.12s ease, transform 0.12s ease;
}

.skill-btn:hover:not(:disabled) {
  background: var(--gold-soft);
  transform: translateX(-2px);
}

.skill-btn .i {
  color: var(--teal);
  font-size: 16px;
}

.skill-btn .count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid rgba(38, 53, 66, 0.16);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.skill-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.skill-btn.is-used {
  opacity: 0.4;
}

.role-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1.5px solid rgba(38, 53, 66, 0.16);
  border-radius: 10px;
  background: rgba(255, 253, 246, 0.6);
  font-size: 11px;
  color: var(--ink-2);
}

.role-mini .avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--gold-soft);
  border: 1.5px solid rgba(38, 53, 66, 0.16);
  font-size: 9px;
  font-weight: 900;
  color: var(--ink);
  flex: none;
}

.role-mini b {
  display: block;
  font-size: 11px;
  color: var(--ink);
}

/* 计时 */
.timer-wrap {
  padding: 10px 22px 0;
}

.timer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 4px;
}

.timer-line b {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}

.timer-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(38, 53, 66, 0.1);
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.5s linear, background 0.3s ease;
}

.timer-fill.warn {
  background: var(--gold);
}

.timer-fill.danger {
  background: var(--coral);
  animation: blink 0.9s steps(2) infinite;
}

.challenge-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border: 2px dashed rgba(234, 169, 60, 0.65);
  border-radius: 12px;
  background: var(--gold-soft);
  font-size: 12px;
  color: #6c4a0e;
  font-weight: 700;
}

.challenge-banner .grow {
  flex: 1;
}

.challenge-banner .btn {
  height: 32px;
  font-size: 11px;
  padding: 0 10px;
}

/* ============ 事件 ============ */
.event-screen {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.event-screen .eyebrow {
  justify-content: center;
}

.event-card {
  position: relative;
  width: min(100%, 480px);
  margin: 20px auto;
  padding: 30px 28px 26px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--ev) 18%, transparent), transparent 70%),
    var(--card);
  box-shadow: var(--shadow-lg);
  animation: card-flip 0.6s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.event-seal {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--ink-3);
}

.event-icon {
  width: 78px;
  height: 78px;
  margin: 12px auto 12px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--ev) 18%, #fffdf6);
  color: var(--ev);
  box-shadow: 4px 4px 0 rgba(38, 53, 66, 0.14);
  transform: rotate(-3deg);
  animation: bob 3s ease-in-out infinite;
}

.event-icon .i {
  font-size: 38px;
}

.event-card h2 {
  font-size: 28px;
  margin-top: 2px;
}

.event-card .event-desc {
  margin: 10px auto 0;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

.event-effect {
  margin: 16px auto 18px;
  padding: 9px 12px;
  max-width: 26em;
  border-radius: 10px;
  background: rgba(245, 238, 223, 0.65);
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1.5px dashed rgba(38, 53, 66, 0.2);
}

.fork-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 720px;
  margin: 24px auto 0;
}

.fork-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
}

.fork-card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 7px 8px 0 rgba(38, 53, 66, 0.16);
}

.fork-card::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--fork) 16%, transparent);
}

.fork-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--fork) 18%, #fffdf6);
  color: var(--fork);
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.12);
}

.fork-icon .i {
  font-size: 26px;
}

.fork-card h3 {
  font-size: 21px;
}

.fork-card p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.fork-card .fork-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--fork);
  margin-top: auto;
}

/* ============ Boss ============ */
.boss-screen {
  max-width: 820px;
  margin: 0 auto;
}

.boss-arena {
  position: relative;
  padding: 14px 20px 0;
  border: 2px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, var(--ch-soft, #ddefe3), transparent 72%),
    linear-gradient(180deg, #fffdf6, #f8f0dd);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.boss-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(38, 53, 66, 0.07) 1px, transparent 1.2px);
  background-size: 18px 18px;
  opacity: 0.4;
}

.boss-hp {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto 4px;
}

.boss-hp .boss-name {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  white-space: nowrap;
}

.hp-pips {
  display: flex;
  gap: 5px;
  flex: 1;
}

.hp-pip {
  height: 10px;
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fffdf6;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hp-pip.on {
  background: var(--coral);
}

.hp-pip.hit {
  animation: hp-hit 0.4s ease;
}

.boss-hp small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 700;
}

.boss-art-wrap {
  position: relative;
  z-index: 1;
  width: min(280px, 62vw);
  margin: 0 auto;
  animation: bob 4s ease-in-out infinite;
}

.boss-art {
  width: 100%;
  filter: drop-shadow(0 12px 0 rgba(38, 53, 66, 0.08));
}

.boss-art.is-hit {
  animation: boss-hit 0.45s ease;
}

.boss-speech {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-width: 30em;
  margin: -2px auto 12px;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fffdf6;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
  font-weight: 600;
}

.boss-speech::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 10px;
  height: 10px;
  background: #fffdf6;
  border-left: 2px solid var(--line);
  border-top: 2px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

.boss-quiz {
  margin-top: 16px;
}

/* ============ 结算 ============ */
.result-screen {
  max-width: 940px;
  margin: 0 auto;
}

.result-hero {
  text-align: center;
  padding: 8px 0 4px;
}

.result-hero .eyebrow {
  justify-content: center;
}

.result-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-top: 6px;
}

.result-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 20px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--gold-soft);
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow-sm);
}

.result-title .i {
  font-size: 26px;
  color: var(--gold);
}

.result-title b {
  display: block;
  font-size: 19px;
  line-height: 1.2;
}

.result-title small {
  font-size: 10.5px;
  color: var(--ink-2);
  font-weight: 700;
}

.stamp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 18px;
}

.stamp-card {
  position: relative;
  padding: 18px 14px 14px;
  text-align: center;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--sub-soft);
  box-shadow: var(--shadow-sm);
  animation: stamp-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.stamp-card:nth-child(2) {
  animation-delay: 0.12s;
}

.stamp-card:nth-child(3) {
  animation-delay: 0.24s;
}

.stamp-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed color-mix(in srgb, var(--sub) 45%, transparent);
  border-radius: 12px;
  pointer-events: none;
}

.stamp-card .stamp-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--sub);
  letter-spacing: 0.08em;
}

.stamp-card b {
  display: block;
  font-size: 42px;
  line-height: 1.1;
  font-family: var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stamp-card small {
  font-size: 10px;
  color: var(--ink-2);
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.result-grid .panel h2 {
  font-size: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1.5px solid rgba(38, 53, 66, 0.2);
  border-radius: 10px;
  background: #fffef9;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
}

.badge-mini .i {
  color: var(--badge, var(--gold));
  font-size: 15px;
}

.sprite-unlock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1.5px dashed rgba(38, 53, 66, 0.22);
  border-radius: 12px;
  background: #fffef9;
  margin-top: 8px;
}

.sprite-unlock .emoji {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--paper);
  font-size: 24px;
}

.sprite-unlock b {
  display: block;
  font-size: 12.5px;
}

.sprite-unlock small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.4;
}

.self-eval {
  display: grid;
  gap: 10px;
}

.self-eval label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}

.self-eval .input {
  margin-top: 4px;
}

.review-list {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.review-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(245, 238, 223, 0.55);
  font-size: 11.5px;
  line-height: 1.5;
}

.review-item .mark {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  margin-top: 1px;
}

.review-item .mark.wrong {
  background: var(--gold);
  color: #3b2a0d;
}

.review-item .mark .i {
  font-size: 11px;
}

.review-item .q-text {
  flex: 1;
  color: var(--ink-2);
}

.review-item .q-text b {
  color: var(--ink);
  font-weight: 800;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ============ 图鉴 ============ */
.collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.collection-head h1 {
  font-size: clamp(28px, 4vw, 38px);
}

.collection-tabs {
  margin-bottom: 18px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 13px;
}

.collect-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.collect-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cc, var(--gold)) 14%, transparent);
}

.collect-card .collect-art {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 15px;
  border: 2px solid var(--line);
  background: var(--cc-soft, var(--gold-soft));
  font-size: 30px;
  box-shadow: 2px 2px 0 rgba(38, 53, 66, 0.1);
}

.collect-card h3 {
  font-size: 14.5px;
}

.collect-card .kind {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.collect-card p {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 4px;
}

.collect-card.is-locked {
  background: #efe7d7;
  border-style: dashed;
  box-shadow: none;
  color: var(--ink-3);
}

.collect-card.is-locked .collect-art {
  background: #e4dac6;
  border-style: dashed;
  filter: grayscale(1);
  opacity: 0.55;
}

.collect-card.is-locked p {
  color: var(--ink-3);
}

.badge-card {
  text-align: left;
}

.badge-card .badge-disc {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--cc-soft, var(--gold-soft));
  color: var(--cc, var(--gold));
  box-shadow: inset 0 0 0 3px rgba(255, 253, 246, 0.6), 2px 2px 0 rgba(38, 53, 66, 0.12);
}

.badge-card .badge-disc .i {
  font-size: 27px;
}

.badge-card.is-locked .badge-disc {
  background: #e4dac6;
  color: #a69a83;
  border-style: dashed;
  box-shadow: none;
}

/* ============ 每日挑战 ============ */
.daily-screen {
  max-width: 820px;
  margin: 0 auto;
}

.daily-head {
  text-align: center;
  margin-bottom: 16px;
}

.daily-head h1 {
  font-size: clamp(26px, 3.6vw, 36px);
}

.daily-head p {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

.daily-progress {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
}

.daily-progress span {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(38, 53, 66, 0.12);
}

.daily-progress span.done {
  background: var(--gold);
}

.daily-progress span.current {
  background: var(--teal);
}

/* ============ 弹窗 ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 53, 66, 0.36);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease both;
}

.modal {
  width: min(100%, 460px);
  max-height: 86vh;
  overflow: auto;
  padding: 22px;
  animation: modal-in 0.26s cubic-bezier(0.2, 1, 0.3, 1) both;
}

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

.modal-head h2 {
  font-size: 22px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1.5px dashed rgba(38, 53, 66, 0.16);
}

.switch-row:last-of-type {
  border-bottom: 0;
}

.switch-row b {
  display: block;
  font-size: 13.5px;
}

.switch-row small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  margin-top: 2px;
  line-height: 1.5;
}

.switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #e9dfcb;
  transition: background 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fffdf6;
  transition: transform 0.18s ease;
}

.switch[aria-checked="true"] {
  background: var(--teal);
}

.switch[aria-checked="true"]::after {
  transform: translateX(21px);
}

.modal-foot {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.about-note {
  margin-top: 14px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(245, 238, 223, 0.7);
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .hero-art {
    order: -1;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }
  .hero-mascot {
    width: 96px;
    bottom: -18px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .chapter-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .map-layout {
    grid-template-columns: 1fr;
  }
  .map-side {
    position: static;
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
  .map-side .side-card:first-child {
    grid-column: span 2;
  }
  .map-panel {
    min-height: 960px;
  }
  .quiz-layout {
    grid-template-columns: 1fr;
  }
  .quiz-side {
    position: static;
    grid-template-columns: 1fr;
  }
  .mascot-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  .mascot-card .mascot {
    width: 82px;
    flex: none;
    margin: 0;
  }
  .speech {
    flex: 1;
    margin-top: 0;
  }
  .speech::before {
    left: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border-left: 0;
    border-top: 0;
    border-right: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    width: 8px;
    height: 8px;
  }
  .skill-dock {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    padding: 8px 14px;
    gap: 8px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .brand-mark .i {
    font-size: 19px;
  }
  .brand-type strong {
    font-size: 14.5px;
  }
  .brand-type small {
    display: none;
  }
  .stat-pill {
    height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }
  .stat-pill b {
    font-size: 12px;
  }
  .level-pill {
    display: none;
  }
  .topbar-stats {
    gap: 5px;
  }
  .topbar-stats .icon-btn:nth-of-type(2) {
    display: none;
  }
  .chapter-pill {
    display: none;
  }
  .toast-root {
    top: 62px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .hero {
    gap: 14px;
    padding: 16px;
  }
  .hero h1 {
    font-size: clamp(34px, 11vw, 46px);
  }
  .hero-lead {
    font-size: 14px;
  }
  .hero-meta .chip {
    height: 26px;
    font-size: 10.5px;
    padding: 0 8px;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    font-size: 13px;
  }
  .hero-bubble {
    display: none;
  }
  .prep-row {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .chapter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-stats {
    grid-template-columns: 1fr 1fr;
  }
  .map-head {
    align-items: flex-start;
  }
  .map-panel {
    min-height: 900px;
  }
  .map-node .dot {
    width: 46px;
    height: 46px;
  }
  .map-node.is-boss .dot {
    width: 58px;
    height: 58px;
  }
  .map-node .node-label {
    max-width: 104px;
    padding: 4px 7px;
  }
  .map-node .node-label b {
    font-size: 10px;
  }
  .map-node .node-label small {
    font-size: 8.5px;
  }
  .map-side {
    grid-template-columns: 1fr;
  }
  .map-side .side-card:first-child {
    grid-column: auto;
  }
  .qcard-body {
    padding: 18px 16px 16px;
  }
  .qcard-head {
    padding: 10px 16px;
  }
  .q-prompt {
    font-size: 19px;
  }
  .q-passage {
    font-size: 14px;
    padding: 12px 14px;
  }
  .qcard-foot {
    padding: 12px 16px 16px;
    flex-wrap: wrap;
  }
  .qcard-foot .btn {
    flex: 1;
  }
  .q-tools {
    order: 2;
    width: 100%;
  }
  .q-feedback {
    margin: 0 16px 16px;
    flex-wrap: wrap;
  }
  .q-feedback .fb-actions {
    width: 100%;
    margin-left: 44px;
  }
  .stroke-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .tian-grid {
    width: 176px;
  }
  .count-picker {
    justify-content: center;
  }
  .stroke-layout > div:last-child {
    width: 100%;
  }
  .first-stroke-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stamp-row {
    gap: 8px;
  }
  .stamp-card {
    padding: 13px 8px 10px;
  }
  .stamp-card b {
    font-size: 32px;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .fork-grid {
    grid-template-columns: 1fr;
  }
  .event-card {
    padding: 26px 18px 20px;
  }
  .event-card h2 {
    font-size: 24px;
  }
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .num-keypad {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .screen {
    padding-left: 11px;
    padding-right: 11px;
  }
  .hero-art {
    margin-bottom: 6px;
  }
  .hero-mascot {
    width: 78px;
    right: -2px;
    bottom: -10px;
  }
  .chapter-grid {
    gap: 9px;
  }
  .chapter-card .chapter-body h3 {
    font-size: 15px;
  }
  .chapter-card .chapter-body p {
    display: none;
  }
  .home-stats {
    gap: 8px;
  }
  .stat-cell {
    padding: 9px 10px;
  }
  .stat-cell b {
    font-size: 15px;
  }
  .map-panel {
    min-height: 850px;
  }
  .map-node .node-label {
    max-width: 88px;
  }
  .map-node .node-label b {
    font-size: 9.5px;
  }
  .map-node .node-label small {
    display: none;
  }
  .map-node .dot {
    width: 42px;
    height: 42px;
  }
  .map-node.is-boss .dot {
    width: 52px;
    height: 52px;
  }
  .map-node .dot .i {
    font-size: 18px;
  }
  .stamp-card b {
    font-size: 26px;
  }
  .stamp-card .stamp-label {
    font-size: 9.5px;
  }
}

/* ============ 补充状态 ============ */
.hero h1 .accent {
  isolation: isolate;
}

.option.is-eliminated {
  opacity: 0.38;
  pointer-events: none;
  text-decoration: line-through;
}

.order-board.correct {
  border-color: var(--teal);
  border-style: solid;
  background: var(--teal-soft);
}

.order-board.wrong {
  border-color: var(--coral);
  background: #fdf0ec;
}

.map-node.is-treasure .dot {
  background: var(--ch-mid, var(--teal));
  color: #fffdf6;
}

.result-mascot {
  width: 72px;
  flex: none;
}

.boss-mascot {
  width: 64px;
  flex: none;
  margin: 0;
}

.journal-list {
  display: grid;
  gap: 10px;
}

.journal-entry {
  padding: 15px 17px;
  border-radius: 14px;
  border: 1.5px solid rgba(38, 53, 66, 0.18);
  background: var(--card);
}

.journal-date {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 5px;
}

.journal-entry p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.journal-entry p + p {
  margin-top: 3px;
}

.daily-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.daily-dots {
  gap: 7px;
  margin-top: 4px;
}

.event-card {
  background-color: var(--card);
}

.fork-card::after {
  background: rgba(234, 169, 60, 0.12);
}

.stroke-svg.static .trace-path {
  opacity: 0;
}

.token .mini-svg {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.token .mini-svg svg,
.stroke-slot .mini-svg svg {
  width: 100%;
  height: 100%;
}

.stroke-slot .mini-svg {
  display: grid;
  place-items: center;
}

.praise-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: -4px 0 18px;
}

.praise-row .chip {
  background: rgba(255, 253, 246, 0.78);
}
