:root {
  --bg-deep: #120606;
  --bg-mid: #2b0f0f;
  --bg-light: #7c2a20;
  --ink: #f8eedf;
  --muted: #d6c6ae;
  --line: rgba(255, 226, 178, 0.28);
  --card: rgba(24, 8, 8, 0.78);
  --card-strong: rgba(35, 12, 12, 0.9);
  --gold: #f3bb5a;
  --gold-strong: #cf8627;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 900px at 12% -14%, #8a3430 0%, transparent 56%),
    radial-gradient(860px 480px at 100% 20%, #8d411f 0%, transparent 60%),
    linear-gradient(170deg, var(--bg-mid) 0%, var(--bg-deep) 58%, #050202 100%);
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: 0.8rem;
  top: -48px;
  padding: 0.46rem 0.78rem;
  border-radius: 0.45rem;
  font-weight: 700;
  background: #ffdb9f;
  color: #1e0d06;
  text-decoration: none;
  z-index: 99;
}

.skip-link:focus {
  top: 0.8rem;
}

.noscript-tip {
  margin: 0;
  padding: 0.72rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 220, 154, 0.45);
  color: #fdf0de;
  background: #5d1f1f;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(244, 190, 88, 0.08), transparent 20%),
    repeating-linear-gradient(
      108deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 17px
    );
  mix-blend-mode: screen;
  opacity: 0.6;
}

.hero,
.section,
.footer {
  width: min(1120px, calc(100% - 2.2rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 3.8rem 0 2.4rem;
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 1.1rem;
}

.kicker {
  margin: 0 0 0.76rem;
  font-size: 0.84rem;
  color: #f4cf8d;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.9vw, 4rem);
  line-height: 1.08;
}

.hero-copy {
  margin: 0.95rem 0 1.5rem;
  color: var(--muted);
  max-width: 44rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.install-tip {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255, 218, 156, 0.24);
  border-radius: 0.95rem;
  color: #f2ddbc;
  background: rgba(255, 243, 220, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 247, 234, 0.05);
}

.is-standalone .install-tip {
  display: none;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.66rem 1.22rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, #f3b349, #cb8628);
  color: #2b1107;
  box-shadow: 0 12px 26px rgba(211, 138, 43, 0.33);
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.btn.ghost:hover {
  color: #ffe2b0;
  border-color: rgba(255, 216, 141, 0.75);
}

.btn:focus-visible,
.switch-btn:focus-visible,
.quiz-option:focus-visible,
.challenge-option:focus-visible,
.color-btn:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #ffd58f;
  outline-offset: 2px;
}

.hero-tags {
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags li {
  border: 1px solid rgba(255, 215, 149, 0.36);
  border-radius: 999px;
  font-size: 0.79rem;
  color: #ffe6bb;
  padding: 0.2rem 0.74rem;
}

.progress-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.95rem;
  background: var(--card);
}

.progress-panel h2 {
  margin: 0;
  font-size: 1.32rem;
}

.progress-panel ul {
  margin: 0.68rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.progress-panel li {
  border: 1px solid rgba(255, 226, 176, 0.23);
  border-radius: 0.72rem;
  padding: 0.52rem 0.65rem;
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.progress-panel span {
  color: #d8c3a1;
  font-size: 0.86rem;
}

.progress-panel strong {
  color: #ffe4b5;
}

#progressHint {
  margin: 0;
  color: #e5cfad;
  font-size: 0.85rem;
}

.section {
  padding: 2.55rem 0 1.3rem;
}

.section-title h2 {
  margin: 0.1rem 0 0.52rem;
  font-size: clamp(1.52rem, 3.8vw, 2.28rem);
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: #f4c26f;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.two-col {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 1.1rem 1.25rem;
}

.two-col .section-title {
  grid-column: 1 / -1;
}

.stage-wrap,
.info-panel,
.quiz-card,
.challenge-card,
.workshop-card,
.support-card,
.poster-preview {
  border: 1px solid var(--line);
  border-radius: 1.06rem;
  background: var(--card);
  backdrop-filter: blur(6px);
}

.stage-wrap,
.info-panel,
.quiz-card,
.challenge-card,
.workshop-card,
.support-card,
.poster-preview {
  min-width: 0;
}

.stage-wrap {
  padding: 0.95rem;
}

.mask-stage {
  --face: #be1f24;
  --band: #f4e8d4;
  --pattern: #f4be58;
  --eye: #101010;
  --eyeCore: #f6f2ea;
  --lineMask: #f7f1e8;
  --ornament: #ffd58f;
  --mouth: #2a0f08;

  min-height: 330px;
  border-radius: 0.94rem;
  border: 1px solid rgba(255, 232, 186, 0.24);
  background:
    radial-gradient(circle at 50% 26%, rgba(245, 219, 175, 0.42), transparent 48%),
    linear-gradient(165deg, #130707 8%, #230909 55%, #120303 95%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.mask-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 239, 211, 0.08), transparent 38%, rgba(255, 209, 128, 0.08));
  pointer-events: none;
}

.mask-stage svg {
  width: min(100%, 350px);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  transition: transform 260ms ease, filter 260ms ease;
  z-index: 2;
}

.mask-stage.switching svg {
  transform: scale(0.96) rotateY(16deg);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32)) blur(0.5px);
}

.stage-flare {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 220, 144, 0.32), transparent 62%);
  filter: blur(2px);
  animation: breath 4.8s ease-in-out infinite;
}

.face-base {
  fill: var(--face);
  stroke: var(--lineMask);
  stroke-width: 8;
}

.forehead-band {
  fill: var(--band);
}

.cheek-left,
.cheek-right {
  fill: var(--pattern);
}

.eye-white {
  fill: var(--eyeCore);
}

.eye-core {
  fill: var(--eye);
}

.nose-line {
  fill: var(--lineMask);
}

.mouth-shape {
  fill: none;
  stroke: var(--mouth);
  stroke-width: 8;
  stroke-linecap: round;
}

.mouth-shape.lower {
  stroke-width: 5;
}

.ornament,
.ornament-dot {
  fill: var(--ornament);
}

.switch-row {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.switch-btn {
  border: 1px solid rgba(255, 228, 183, 0.3);
  border-radius: 0.74rem;
  background: rgba(255, 255, 255, 0.02);
  color: #f5e8d0;
  padding: 0.56rem 0.64rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background-color 170ms ease;
}

.switch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 219, 145, 0.65);
}

.switch-btn.is-active {
  background: linear-gradient(130deg, rgba(243, 182, 86, 0.2), rgba(212, 128, 43, 0.22));
  border-color: rgba(255, 220, 150, 0.8);
  color: #ffe6bd;
  box-shadow: 0 8px 16px rgba(163, 85, 18, 0.22);
}

.info-panel {
  padding: 1rem 1rem 1.05rem;
}

.badge {
  margin: 0;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(255, 217, 151, 0.4);
  color: #ffe0ac;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  padding: 0.22rem 0.7rem;
}

.info-panel h3 {
  margin: 0.65rem 0 0.33rem;
  font-size: 1.56rem;
}

.tagline {
  margin: 0;
  color: #ead7b9;
}

.meta-list {
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.58rem;
}

.meta-list li {
  border: 1px solid rgba(255, 226, 176, 0.23);
  border-radius: 0.76rem;
  background: rgba(0, 0, 0, 0.14);
  padding: 0.56rem 0.68rem;
}

.meta-list span {
  display: block;
  font-size: 0.8rem;
  color: #d7c3a3;
  margin-bottom: 0.12rem;
}

.meta-list strong {
  display: block;
  color: #fbe7c1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background: var(--card-strong);
  padding: 0.8rem 0.88rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
}

.feature-card p {
  margin: 0;
  color: #e2cfb0;
  font-size: 0.93rem;
}

.quiz-card,
.challenge-card,
.workshop-card {
  padding: 0.96rem;
}

.quiz-count {
  margin: 0;
  color: #ffd89a;
  font-size: 0.85rem;
}

.quiz-card h3,
.challenge-card h3 {
  margin: 0.48rem 0 0.8rem;
}

.quiz-options,
.challenge-options {
  display: grid;
  gap: 0.56rem;
}

.quiz-option,
.challenge-option {
  border: 1px solid rgba(255, 228, 182, 0.28);
  border-radius: 0.76rem;
  background: rgba(255, 255, 255, 0.03);
  color: #f4e8d4;
  text-align: left;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.quiz-option:hover,
.challenge-option:hover {
  border-color: rgba(255, 214, 140, 0.72);
  transform: translateY(-1px);
}

.quiz-option.correct,
.challenge-option.correct {
  border-color: rgba(129, 211, 120, 0.9);
  background: rgba(97, 166, 88, 0.2);
}

.quiz-option.wrong,
.challenge-option.wrong {
  border-color: rgba(225, 133, 105, 0.9);
  background: rgba(173, 88, 64, 0.2);
}

.quiz-status,
.challenge-status {
  margin: 0.72rem 0;
  min-height: 1.5rem;
  color: #f2dab0;
}

.challenge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.challenge-head p {
  margin: 0;
  color: #f2c980;
  font-size: 0.86rem;
}

.support-card {
  padding: 0.9rem 0.9rem 0.95rem;
}

.support-card h3 {
  margin: 0 0 0.35rem;
}

.support-card p {
  margin: 0;
  color: #ddc9ab;
}

.field {
  display: grid;
  gap: 0.38rem;
  margin-bottom: 0.72rem;
}

.field > span {
  font-size: 0.86rem;
  color: #e9d2ab;
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.color-btn {
  border: 1px solid rgba(255, 228, 182, 0.28);
  border-radius: 0.64rem;
  background: rgba(255, 255, 255, 0.03);
  color: #f2e4cf;
  min-width: 42px;
  padding: 0.42rem 0.56rem;
  cursor: pointer;
}

.color-btn.is-active {
  border-color: rgba(255, 213, 143, 0.9);
  background: rgba(243, 179, 73, 0.17);
  color: #ffe4b7;
}

select,
input {
  width: 100%;
  border: 1px solid rgba(255, 228, 182, 0.28);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.03);
  color: #f8ecd8;
  padding: 0.58rem 0.65rem;
  font: inherit;
}

option {
  color: #24100b;
}

.workshop-actions {
  margin-top: 0.26rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.poster-preview {
  padding: 1rem;
  --preview-a: #b71d24;
  --preview-b: #6f1e1e;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 220, 145, 0.22), transparent 52%),
    linear-gradient(150deg, var(--preview-a), var(--preview-b) 64%, #1c0808);
}

.poster-preview .preview-kicker {
  margin: 0;
  color: #ffe3b3;
  font-size: 0.84rem;
}

.poster-preview h3 {
  margin: 0.52rem 0 0.35rem;
  font-size: 1.58rem;
}

.poster-preview p {
  margin: 0;
  color: #fff0d4;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.rule-card {
  border: 1px solid var(--line);
  border-radius: 0.94rem;
  background: var(--card-strong);
  padding: 0.84rem 0.88rem;
}

.rule-card h3 {
  margin: 0 0 0.36rem;
  font-size: 1.05rem;
}

.rule-card p {
  margin: 0;
  color: #dfcbac;
  font-size: 0.91rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.74rem;
}

.timeline-item {
  border: 1px solid var(--line);
  border-radius: 0.94rem;
  background: rgba(23, 7, 7, 0.84);
  padding: 0.82rem 0.88rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3bd67, #d3873b);
  position: absolute;
  top: 0.55rem;
  right: 0.72rem;
}

.timeline-item h3 {
  margin: 0.64rem 0 0.36rem;
  font-size: 1.03rem;
}

.timeline-item p {
  margin: 0;
  color: #dfcbac;
  font-size: 0.91rem;
}

.footer {
  padding: 1.2rem 0 2.2rem;
}

.footer p {
  margin: 0;
  text-align: center;
  color: #bda98d;
  font-size: 0.88rem;
}

@keyframes breath {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.85;
  }
}

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

  .card-grid,
  .timeline,
  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero,
  .section,
  .footer {
    width: min(1120px, calc(100% - 1.2rem));
  }

  .hero {
    padding-top: 3.2rem;
  }

  .switch-row,
  .card-grid,
  .timeline,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .mask-stage {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}
