:root {
  --bg: #f1e7d4;
  --paper: #fffaf0;
  --ink: #211a14;
  --muted: #6d5d4d;
  --line: #d8c1a2;
  --red: #9e3127;
  --red-dark: #641d18;
  --jade: #2f6b53;
  --blue: #244f74;
  --gold: #c99a38;
  --shadow: 0 20px 44px rgba(55, 34, 18, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    linear-gradient(90deg, rgba(100, 29, 24, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fff6e7 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(115deg, rgba(33, 26, 20, 0.14) 0, rgba(33, 26, 20, 0.14) 1px, transparent 1px, transparent 11px);
}

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

button {
  font: inherit;
}

input {
  font: inherit;
}

.app-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 58px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 330px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 250, 240, 0.45);
  border-radius: 18px;
  padding: 30px;
  color: #fffaf0;
  background:
    linear-gradient(90deg, rgba(36, 27, 20, 0.86), rgba(36, 27, 20, 0.18) 64%),
    url("assets/qianliu/qianliu-cover.png") center / cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-label {
  margin-bottom: 9px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.96;
}

.hero p {
  line-height: 1.85;
}

.ghost-button,
.primary-button,
.choice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ghost-button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 250, 240, 0.52);
  color: #fffaf0;
  background: rgba(255, 250, 240, 0.13);
}

.primary-button,
.choice-button {
  color: #fffaf0;
  background: var(--red);
}

.choice-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.ghost-button:hover,
.primary-button:hover,
.choice-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(100, 29, 24, 0.2);
}

.panel,
.score-card,
.choice-card,
.growth-card,
.six-grid article,
.route-item {
  border: 1px solid rgba(100, 29, 24, 0.15);
  background: rgba(255, 250, 240, 0.96);
  box-shadow: var(--shadow);
}

.panel {
  border-radius: 14px;
  padding: 24px;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.55fr);
  gap: 20px;
  align-items: center;
}

.intro-panel h2,
.summary-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.18;
}

.intro-panel p,
.scene-text,
.analysis-block,
.history-block,
.framework-block,
.profile-text,
.closing {
  line-height: 1.9;
}

.rule-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column: 1 / -1;
  gap: 12px;
}

.rule-board div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fffdf8;
}

.rule-board strong {
  display: block;
  color: var(--red-dark);
  font-size: 36px;
}

.rule-board span {
  color: var(--muted);
  font-weight: 800;
}

.student-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  margin-top: 2px;
}

.student-form label {
  color: var(--red-dark);
  font-weight: 900;
}

.student-form-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.student-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fffdf8;
}

.student-form .primary-button:disabled {
  background: #bda98d;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.game-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 18px;
  align-items: start;
}

.score-rail {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}

.score-card,
.progress-card {
  border-radius: 8px;
  padding: 16px;
}

.score-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 800;
}

.score-card strong {
  display: block;
  color: var(--red-dark);
  font-size: 34px;
}

.score-card.reason strong {
  color: var(--blue);
}

.score-card small {
  font-size: 0.56em;
}

.meter {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #eadac1;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.reason .meter i {
  background: var(--blue);
}

.progress-card {
  color: var(--red-dark);
  font-weight: 900;
  background: #f5e7d2;
}

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

.stage-head h2 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.state-pill,
.score-delta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  color: #fffaf0;
  font-size: 13px;
  font-weight: 900;
  background: var(--jade);
}

.stage-image {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border: 1px solid rgba(100, 29, 24, 0.22);
  border-radius: 10px;
  background: #eadac1;
}

.bridge-text {
  margin: 16px 0 0;
  border-left: 6px solid var(--gold);
  padding: 12px 14px;
  color: var(--red-dark);
  font-weight: 900;
  background: #fff4dc;
}

.scene-text {
  margin: 18px 0;
  border-left: 6px solid rgba(47, 107, 83, 0.45);
  padding: 3px 0 3px 16px;
}

.scene-text p:last-child {
  margin-bottom: 0;
}

.question-box {
  margin: 18px 0;
  border: 1px solid rgba(158, 49, 39, 0.2);
  border-radius: 8px;
  padding: 18px;
  color: var(--red-dark);
  font-size: 21px;
  font-weight: 900;
  background: #fffdf8;
}

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

.choice-card {
  display: grid;
  min-height: 210px;
  align-content: space-between;
  gap: 16px;
  border-radius: 8px;
  padding: 18px;
  box-shadow: none;
}

.choice-card.selected {
  outline: 3px solid rgba(158, 49, 39, 0.22);
  background: #fff4e5;
}

.choice-card.muted {
  opacity: 0.58;
}

.choice-id {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fffaf0;
  font-weight: 900;
  background: var(--red-dark);
}

.choice-card h3 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.45;
}

.result-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.score-delta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-block,
.history-block,
.framework-block,
.takeaway,
.closing {
  border-radius: 8px;
  padding: 18px;
  background: #fffdf8;
  border: 1px solid rgba(47, 107, 83, 0.18);
}

.analysis-block h3,
.history-block h3,
.framework-block h3 {
  color: var(--red-dark);
}

.analysis-block p:last-child,
.history-block p:last-child,
.framework-block p:last-child {
  margin-bottom: 0;
}

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

.framework-item {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.framework-item strong {
  display: block;
  color: var(--jade);
}

.takeaway {
  color: var(--red-dark);
  font-weight: 900;
  background: #f7ead3;
}

.final-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.final-score div {
  border-radius: 10px;
  padding: 18px;
  color: #fffaf0;
  background: var(--red-dark);
}

.final-score div + div {
  background: var(--blue);
}

.final-score span,
.final-score small {
  font-weight: 800;
  opacity: 0.84;
}

.final-score strong {
  display: inline-block;
  margin: 0 7px;
  font-size: 46px;
}

.growth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.growth-card,
.six-grid article,
.route-item {
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
}

.growth-card span {
  color: var(--gold);
  font-weight: 900;
}

.growth-card h4 {
  margin: 8px 0;
  color: var(--red-dark);
  font-size: 20px;
}

.growth-card p,
.six-grid p {
  line-height: 1.75;
}

.six-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 14px;
  margin-bottom: 18px;
}

.closing {
  margin: 16px 0 20px;
  color: var(--red-dark);
  font-size: 20px;
  font-weight: 900;
}

.route-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.route-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.route-item span {
  color: var(--muted);
  font-weight: 800;
}

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

  .hero {
    display: grid;
    min-height: 360px;
    padding: 22px;
  }

  .intro-panel,
  .game-layout,
  .choices-grid,
  .final-score,
  .growth-grid,
  .six-grid {
    grid-template-columns: 1fr;
  }

  .score-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-card {
    grid-column: 1 / -1;
  }

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

  .stage-head {
    display: grid;
  }

  .route-item {
    grid-template-columns: 1fr;
  }
}
