:root {
  color-scheme: light;
  --ink: #20170e;
  --text: #2c241a;
  --muted: #766a5c;
  --paper: #fbf5e8;
  --paper-2: #fffaf0;
  --line: #d8b47b;
  --gold: #c9903d;
  --deep-gold: #8f5e24;
  --red: #b84537;
  --teal: #247b78;
  --blue: #1f4f7c;
  --violet: #6d4a86;
  --shadow: 0 18px 46px rgba(64, 43, 20, 0.18);
}

/* Homepage v2: premium multi-subject learning platform shell. */
body:has(.portal-v2) {
  background:
    linear-gradient(90deg, rgba(12, 39, 48, 0.06) 0 1px, transparent 1px 96px),
    linear-gradient(180deg, #f5f7f1 0%, #edf4f0 48%, #e8f0ec 100%);
}

.portal-v2 {
  width: min(1360px, calc(100% - 32px));
  color: #102d33;
}

.portal-v2 .site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  border: 1px solid rgba(12, 39, 48, 0.13);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(12, 39, 48, 0.08);
}

.portal-v2 .site-brand {
  color: #102d33;
  letter-spacing: 0;
}

.portal-v2 .site-meta a {
  color: #274d52;
}

.home-hero-v2 {
  min-height: min(780px, calc(100dvh - 92px));
  grid-template-columns: minmax(330px, 0.42fr) minmax(560px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(28px, 4.4vw, 58px) 0 34px;
}

.home-hero-v2 .home-hero-copy {
  max-width: 620px;
}

.home-hero-v2 .series-label {
  width: fit-content;
  border: 1px solid rgba(34, 128, 120, 0.2);
  border-radius: 999px;
  padding: 7px 11px;
  color: #1b766f;
  background: rgba(255, 253, 247, 0.72);
}

.home-hero-v2 h1 {
  max-width: 610px;
  margin-top: 18px;
  color: #102d33;
  font-size: clamp(46px, 5.6vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.home-hero-v2 .hook {
  max-width: 590px;
  color: #3d6163;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.75;
}

.home-hero-v2 .primary-action {
  border-color: #d9523f;
  color: #fffdf7;
  background: #d9523f;
  box-shadow: 0 12px 26px rgba(217, 82, 63, 0.16);
}

.home-hero-v2 .secondary-action,
.portal-v2 .track-link {
  border-color: rgba(12, 39, 48, 0.18);
  color: #102d33;
  background: #fffdf7;
}

.portal-v2 .home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(12, 39, 48, 0.12);
  border-radius: 8px;
  background: rgba(12, 39, 48, 0.12);
}

.portal-v2 .home-metrics span {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 0;
  padding: 13px 14px;
  color: #46686a;
  background: rgba(255, 253, 247, 0.84);
}

.portal-v2 .home-metrics span + span {
  padding-left: 14px;
}

.portal-v2 .home-metrics strong {
  color: #d9523f;
  font-size: clamp(26px, 2.6vw, 36px);
}

.home-hero-v2 .home-hero-visual {
  min-height: min(650px, calc(100dvh - 132px));
  border: 0;
  border-radius: 8px;
  background: #0f2d33;
  box-shadow: 0 30px 70px rgba(12, 39, 48, 0.18);
}

.home-hero-v2 .home-hero-art {
  filter: saturate(0.98) contrast(1.03);
}

.home-hero-v2 .home-hero-visual::after {
  background:
    linear-gradient(180deg, rgba(5, 22, 28, 0.02) 22%, rgba(5, 22, 28, 0.72) 100%),
    linear-gradient(90deg, rgba(5, 22, 28, 0.2), transparent 50%);
}

.home-hero-v2 .home-visual-top {
  max-width: 360px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.93);
  box-shadow: 0 18px 42px rgba(5, 22, 28, 0.16);
}

.home-hero-v2 .home-visual-top span {
  color: #d9523f;
  font-size: 12px;
  text-transform: uppercase;
}

.home-hero-v2 .home-visual-top strong {
  color: #102d33;
  font-size: 22px;
}

.home-hero-v2 .home-route-board {
  left: 20px;
  right: 20px;
  bottom: 82px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.2);
}

.home-hero-v2 .route-pin {
  min-height: 108px;
  border: 0;
  border-radius: 0;
  padding: 15px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: none;
}

.home-hero-v2 .route-pin span {
  color: #1b766f;
  font-size: 12px;
}

.home-hero-v2 .route-pin strong {
  color: #102d33;
  font-size: clamp(16px, 1.4vw, 21px);
}

.home-hero-v2 .home-subject-strip {
  left: 20px;
  right: 196px;
  bottom: 24px;
}

.home-hero-v2 .home-subject-strip span {
  border: 0;
  color: #19494e;
  background: rgba(255, 253, 247, 0.9);
}

.home-hero-v2 .home-visual-images img {
  width: 104px;
  height: 72px;
  border-radius: 8px;
}

.portal-v2 .home-proof,
.portal-v2 .home-path,
.portal-v2 .home-track,
.portal-v2 .home-growth {
  border-radius: 8px;
  box-shadow: none;
}

.portal-v2 .home-proof {
  border-color: rgba(12, 39, 48, 0.14);
}

.portal-v2 .home-proof div {
  background: rgba(255, 253, 247, 0.9);
}

.portal-v2 .home-proof span,
.portal-v2 .eyebrow,
.portal-v2 .path-steps span,
.portal-v2 .track-link,
.portal-v2 .science-map-preview span,
.portal-v2 .track-grid span {
  color: #1b766f;
}

.portal-v2 .home-proof strong,
.portal-v2 .home-path h2,
.portal-v2 .track-intro h2,
.portal-v2 .home-growth h2,
.portal-v2 .path-steps h3,
.portal-v2 .course-card h3,
.portal-v2 .track-grid h3 {
  color: #102d33;
}

.portal-v2 .home-path {
  grid-template-columns: minmax(270px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 50px);
}

.portal-v2 .home-path .section-heading,
.portal-v2 .track-intro {
  position: sticky;
  top: 100px;
}

.portal-v2 .path-steps {
  grid-template-columns: 1fr;
  gap: 0;
  border-left: 2px solid rgba(27, 118, 111, 0.24);
}

.portal-v2 .path-steps article {
  min-height: 132px;
  border: 0;
  border-radius: 0;
  padding: 0 0 28px 30px;
  background: transparent;
}

.portal-v2 .path-steps article::before {
  content: "";
  position: absolute;
  left: -7px;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 999px;
  background: #d9523f;
  box-shadow: 0 0 0 6px #fffdf7;
}

.portal-v2 .home-track {
  grid-template-columns: minmax(260px, 0.3fr) minmax(0, 1fr);
  background: rgba(255, 253, 247, 0.9);
}

.portal-v2 .home-track .course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-v2 .home-track .course-card {
  min-height: 238px;
  border: 1px solid rgba(12, 39, 48, 0.13);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf7;
  box-shadow: none;
}

.portal-v2 .home-track .course-card:hover {
  border-color: rgba(217, 82, 63, 0.42);
  transform: translateY(-2px);
}

.portal-v2 .home-track .course-card img,
.portal-v2 .home-track .course-placeholder {
  height: 138px;
  border-radius: 8px;
}

.portal-v2 .course-placeholder {
  color: rgba(16, 45, 51, 0.38);
  background:
    linear-gradient(135deg, rgba(27, 118, 111, 0.08), rgba(217, 82, 63, 0.06)),
    #f4f7ef;
}

.portal-v2 .science-map-preview {
  display: grid;
  grid-column: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.portal-v2 .science-map-preview a {
  min-height: 104px;
  border-color: rgba(27, 118, 111, 0.16);
  border-radius: 8px;
  background: #eef7f3;
  box-shadow: none;
}

.portal-v2 .home-growth {
  grid-template-columns: minmax(330px, 0.42fr) minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(239, 247, 243, 0.94)),
    #fffdf7;
}

.portal-v2 .subject-queue {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(12, 39, 48, 0.14);
  border-radius: 8px;
  background: rgba(12, 39, 48, 0.14);
}

.portal-v2 .home-growth .track-grid article {
  min-height: 178px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 253, 247, 0.92);
}

@media (max-width: 1120px) {
  .home-hero-v2,
  .portal-v2 .home-path,
  .portal-v2 .home-track,
  .portal-v2 .home-growth {
    grid-template-columns: 1fr;
  }

  .portal-v2 .home-path .section-heading,
  .portal-v2 .track-intro {
    position: relative;
    top: auto;
  }

  .portal-v2 .home-track .course-grid,
  .portal-v2 .science-map-preview,
  .portal-v2 .subject-queue {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .portal-v2 {
    width: min(100% - 20px, 1360px);
  }

  .home-hero-v2 h1 {
    max-width: 100%;
    font-size: clamp(38px, 10.5vw, 52px);
    line-height: 1.1;
    word-break: normal;
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }

  .portal-v2 .home-metrics,
  .portal-v2 .home-proof,
  .portal-v2 .home-track .course-grid,
  .portal-v2 .science-map-preview,
  .portal-v2 .subject-queue {
    grid-template-columns: 1fr;
  }

  .home-hero-v2 .home-hero-visual {
    min-height: 720px;
  }

  .home-hero-v2 .home-route-board {
    grid-template-columns: 1fr;
    bottom: 142px;
  }

  .home-hero-v2 .route-pin {
    min-height: 70px;
  }

  .home-hero-v2 .home-subject-strip {
    right: 20px;
    bottom: 82px;
  }

  .home-hero-v2 .home-visual-images {
    left: 20px;
    right: 20px;
    justify-content: flex-end;
  }
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(201, 144, 61, 0.22), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(109, 74, 134, 0.16), transparent 30%),
    linear-gradient(180deg, #fff8ec 0%, #f6ead6 48%, #efe1c7 100%);
}

.portal-shell {
  width: min(1260px, calc(100% - 30px));
}

.portal-shell .site-header,
.science-shell .site-header {
  border-color: rgba(31, 111, 159, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(239, 250, 246, 0.74)),
    rgba(255, 255, 255, 0.7);
}

.portal-shell .site-brand,
.science-shell .site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portal-shell .site-brand::before,
.science-shell .site-brand::before {
  content: "";
  width: 28px;
  aspect-ratio: 1;
  border: 2px solid #17324a;
  border-radius: 8px;
  background:
    radial-gradient(circle at 64% 34%, #fff 0 8%, transparent 9%),
    linear-gradient(135deg, #ffd35c 0 48%, #21a8a0 49% 100%);
  box-shadow: 3px 3px 0 rgba(23, 50, 74, 0.18);
}

.portal-stats,
.science-party {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.portal-stats span,
.science-party span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(23, 50, 74, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #17324a;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(38, 101, 114, 0.08);
}

.portal-stats b {
  color: #c4542d;
  font-size: 22px;
}

.adventure-console {
  isolation: isolate;
  border-color: #17324a;
  background:
    linear-gradient(180deg, rgba(229, 249, 245, 0.92), rgba(255, 244, 210, 0.86)),
    #dff7f2;
}

.adventure-console::after {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: 1;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  pointer-events: none;
}

.adventure-console img {
  filter: saturate(1.08) contrast(1.03);
}

.map-chip {
  position: absolute;
  z-index: 2;
  border: 2px solid #17324a;
  border-radius: 999px;
  padding: 9px 13px;
  color: #17324a;
  font-size: 14px;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 4px 4px 0 rgba(23, 50, 74, 0.18);
}

.chip-history {
  top: 9%;
  left: 8%;
}

.chip-science {
  top: 24%;
  right: 8%;
}

.chip-report {
  left: 11%;
  bottom: 28%;
}

.mission-brief-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.mission-brief-strip article,
.science-map-preview a,
.quest-dashboard article {
  border: 1px solid rgba(23, 50, 74, 0.2);
  border-radius: 12px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 249, 246, 0.78)),
    #fffdf7;
  box-shadow: 0 14px 28px rgba(37, 89, 96, 0.09);
}

.mission-brief-strip span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  margin-bottom: 14px;
  border: 2px solid #17324a;
  border-radius: 12px;
  color: #17324a;
  font-weight: 900;
  background: #ffd35c;
  box-shadow: 3px 3px 0 rgba(23, 50, 74, 0.2);
}

.mission-brief-strip h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.mission-brief-strip p {
  margin: 0;
  color: #5f6f68;
  line-height: 1.65;
}

.science-map-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.science-map-preview a {
  min-height: 104px;
  color: #17324a;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.science-map-preview span {
  display: block;
  margin-bottom: 8px;
  color: #16806f;
  font-size: 13px;
}

.science-shell {
  width: min(1220px, calc(100% - 30px));
  padding-bottom: 132px;
}

.science-shell .panel {
  border-color: rgba(31, 111, 159, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 252, 249, 0.91)),
    #fffdf7;
  box-shadow: 0 20px 46px rgba(31, 111, 159, 0.12);
}

.science-shell .panel::before {
  border-color: rgba(22, 128, 111, 0.18);
  border-radius: 10px;
}

.science-shell .hero {
  min-height: 74vh;
}

.science-party span b {
  color: #c4542d;
}

.quest-dashboard {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 18px;
}

.quest-dashboard article {
  min-height: 148px;
}

.quest-dashboard span {
  display: block;
  margin-bottom: 10px;
  color: #16806f;
  font-size: 13px;
  font-weight: 900;
}

.quest-dashboard strong {
  display: block;
  color: #17324a;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.2;
}

.quest-dashboard p {
  margin: 10px 0 0;
  color: #5f6f68;
  line-height: 1.6;
}

.quest-progress {
  height: 14px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9ece8;
}

.quest-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #21a8a0, #ffd35c);
  transition: width 0.25s ease;
}

.riceball-sos,
.lab-mission-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 14px;
  color: #17324a;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 211, 92, 0.36), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.94), rgba(236, 248, 244, 0.9));
  box-shadow: 5px 5px 0 rgba(23, 50, 74, 0.14);
}

.riceball-sos {
  max-width: 620px;
  margin: 18px 0 0;
}

.riceball-face {
  width: 70px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid #17324a;
  border-radius: 50% 50% 44% 44%;
  color: #17324a;
  font-size: 13px;
  font-weight: 900;
  background:
    radial-gradient(circle at 38% 34%, #17324a 0 4%, transparent 5%),
    radial-gradient(circle at 62% 34%, #17324a 0 4%, transparent 5%),
    radial-gradient(ellipse at 50% 74%, rgba(201, 144, 61, 0.2) 0 18%, transparent 19%),
    #fff;
  box-shadow: inset -4px -5px 0 rgba(201, 144, 61, 0.16);
}

.riceball-sos b,
.lab-mission-card span {
  display: inline-flex;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--red);
}

.riceball-sos p {
  margin: 0;
  font-weight: 900;
  line-height: 1.55;
}

.science-flow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.science-flow-strip article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(23, 50, 74, 0.2);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(236, 248, 244, 0.82)),
    #fffdf7;
  box-shadow: 0 12px 24px rgba(31, 111, 159, 0.08);
}

.science-flow-strip span {
  grid-row: span 2;
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid #17324a;
  border-radius: 8px;
  color: #17324a;
  font-weight: 900;
  background: #ffd35c;
  box-shadow: 3px 3px 0 rgba(23, 50, 74, 0.16);
}

.science-flow-strip strong {
  color: #17324a;
  font-size: 18px;
}

.science-flow-strip p {
  margin: 0;
  color: #5f6f68;
  line-height: 1.5;
}

.discovery-sticker-panel {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 12px;
  z-index: 90;
  width: min(1120px, calc(100% - 20px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.95), rgba(236, 248, 244, 0.9)),
    #fffdf7;
  box-shadow: 0 12px 32px rgba(23, 50, 74, 0.2);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

body:not(.stickers-active) .discovery-sticker-panel {
  transform: translate(-50%, calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.discovery-sticker-panel > div:first-child > span {
  display: inline-flex;
  margin-bottom: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--science-blue);
}

.discovery-sticker-panel strong {
  display: block;
  color: #17324a;
  font-size: 15px;
  line-height: 1.35;
}

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

.sticker-board .sticker-card {
  position: relative;
  min-height: 96px;
  display: grid;
  grid-template-rows: 58px auto 16px;
  justify-items: center;
  align-items: center;
  margin: 0;
  border: 3px dashed rgba(23, 50, 74, 0.28);
  border-radius: 16px 14px 18px 13px;
  padding: 7px 6px 6px;
  color: rgba(23, 50, 74, 0.56);
  font-size: 11px;
  text-align: center;
  background:
    repeating-linear-gradient(-45deg, rgba(23, 50, 74, 0.05) 0 6px, rgba(255, 255, 255, 0.72) 6px 12px),
    #f6f1e9;
  transform: rotate(-1deg);
  filter: grayscale(0.85);
  opacity: 0.78;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}

.sticker-board .sticker-card::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 20px 18px 22px 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 3px 4px 0 rgba(23, 50, 74, 0.14);
}

.sticker-board .sticker-card::after {
  content: "?";
  display: grid;
  place-items: center;
  position: absolute;
  top: 7px;
  right: 9px;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  background: rgba(23, 50, 74, 0.16);
}

.sticker-art {
  width: 64px;
  height: 64px;
  margin: 0;
  border: 0;
  border-radius: 18px;
  padding: 0;
  object-fit: contain;
  background: transparent;
  filter: grayscale(1) brightness(0.28) opacity(0.38);
  transform: scale(0.86);
  transition: filter 0.24s ease, transform 0.24s ease;
}

.sticker-name {
  display: block;
  margin: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.15;
  background: transparent;
}

.sticker-state {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border-radius: 999px;
  padding: 2px 6px;
  color: rgba(23, 50, 74, 0.5);
  font-size: 10px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.64);
}

.sticker-board .sticker-card:nth-child(2),
.sticker-board .sticker-card:nth-child(5) {
  transform: rotate(1.2deg);
}

.sticker-board .sticker-card.earned {
  border-style: solid;
  color: #17324a;
  border-color: #17324a;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
    linear-gradient(145deg, #ffe06f, #ff9f5a 48%, #66d3c5 49% 100%);
  box-shadow: 5px 5px 0 rgba(23, 50, 74, 0.2);
  filter: none;
  opacity: 1;
  transform: rotate(0deg) scale(1.04);
}

.sticker-board .sticker-card:nth-child(1).earned {
  background: linear-gradient(145deg, #ffe8a5, #ffb168 48%, #9be7d8 49% 100%);
}

.sticker-board .sticker-card:nth-child(2).earned {
  background: linear-gradient(145deg, #d8f8ff, #b8e06f 48%, #fff1a8 49% 100%);
}

.sticker-board .sticker-card:nth-child(3).earned {
  background: linear-gradient(145deg, #ffe1a5, #f17667 48%, #76b7ff 49% 100%);
}

.sticker-board .sticker-card:nth-child(4).earned {
  background: linear-gradient(145deg, #dff3ff, #8bc8ff 48%, #ffc86f 49% 100%);
}

.sticker-board .sticker-card:nth-child(5).earned {
  background: linear-gradient(145deg, #e6fff4, #70d6ff 48%, #ffd36b 49% 100%);
}

.sticker-board .sticker-card:nth-child(6).earned {
  background: linear-gradient(145deg, #ffe0f0, #a8d7ff 48%, #ffd36b 49% 100%);
}

.sticker-board .sticker-card.earned::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  background: #16806f;
}

.sticker-board .sticker-card.earned .sticker-art {
  filter: none;
  transform: scale(1.04);
}

.sticker-board .sticker-card.earned .sticker-state {
  color: #fff;
  background: #17324a;
}

.sticker-board .sticker-card.just-earned {
  animation: sticker-pop 0.42s ease;
}

@keyframes sticker-pop {
  0% {
    transform: rotate(-4deg) scale(0.86);
  }
  70% {
    transform: rotate(2deg) scale(1.12);
  }
  100% {
    transform: rotate(0deg) scale(1.04);
  }
}

.science-cast-panel,
.comic-sequence-panel {
  overflow: hidden;
}

.cast-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.cast-sheet {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 2px solid #17324a;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 16px 32px rgba(31, 111, 159, 0.12);
}

.cast-sheet img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

.cast-callouts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cast-callout {
  position: absolute;
  display: grid;
  gap: 2px;
  min-width: 112px;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 7px 10px;
  color: #17324a;
  line-height: 1.2;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 5px 5px 0 rgba(23, 50, 74, 0.16);
}

.cast-callout b,
.cast-callout em {
  display: block;
  font-style: normal;
  font-weight: 900;
}

.cast-callout b {
  font-size: 16px;
}

.cast-callout em {
  color: #16806f;
  font-size: 12px;
}

.cast-xiaolan {
  left: 6%;
  bottom: 9%;
}

.cast-ache {
  left: 31%;
  bottom: 8%;
}

.cast-qingye {
  right: 19%;
  top: 24%;
}

.cast-zhiwan {
  right: 5%;
  bottom: 22%;
}

.lesson-comic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lesson-comic-grid img {
  border: 2px solid #17324a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 6px 6px 0 rgba(23, 50, 74, 0.12);
}

.comic-library-shell {
  width: min(1320px, calc(100% - 30px));
}

.library-hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
}

.library-summary {
  border: 2px solid #17324a;
  border-radius: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 211, 92, 0.42), transparent 28%),
    linear-gradient(145deg, #f7fffc, #e6f7f2);
  box-shadow: 8px 8px 0 rgba(23, 50, 74, 0.16);
}

.library-summary strong {
  display: block;
  color: #c4542d;
  font-size: 72px;
  line-height: 0.95;
}

.library-summary span {
  display: block;
  color: #17324a;
  font-size: 24px;
  font-weight: 900;
}

.library-summary p {
  margin: 12px 0 0;
  color: #5f6f68;
  line-height: 1.6;
}

.comic-page-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.comic-page-grid img,
.comic-contact img {
  width: 100%;
  display: block;
  border: 1px solid rgba(23, 50, 74, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(31, 111, 159, 0.12);
}

.comic-page-grid img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
}

.comic-contact {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.comic-contact img {
  max-height: 380px;
  object-fit: contain;
}

.compact-comic-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compact-comic-grid a {
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 50, 74, 0.22);
  border-radius: 12px;
  color: #17324a;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(238, 249, 246, 0.82)),
    #fffdf7;
}

.automation-shell {
  background:
    linear-gradient(90deg, rgba(143, 94, 36, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(143, 94, 36, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 46px 46px;
}

.automation-panel {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid rgba(143, 94, 36, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
}

.automation-table-wrap {
  overflow-x: auto;
}

.automation-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
}

.automation-table th,
.automation-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(143, 94, 36, 0.16);
  text-align: left;
  vertical-align: top;
}

.automation-table th {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(143, 94, 36, 0.22);
  border-radius: 999px;
  background: #fff9ec;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.live {
  border-color: rgba(44, 131, 103, 0.35);
  background: #eaf8f0;
  color: #2c8367;
}

.status-pill.planned {
  border-color: rgba(180, 120, 32, 0.32);
  background: #fff4d8;
  color: #8a5a13;
}

.generated-poster {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(143, 94, 36, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(70, 148, 134, 0.28), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(205, 90, 68, 0.20), transparent 26%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.92), rgba(236, 247, 240, 0.86)),
    #fffdf7;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.generated-poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.02);
}

.generated-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 11, 5, 0.04), rgba(18, 11, 5, 0.42)),
    linear-gradient(90deg, rgba(255, 250, 240, 0.54), rgba(255, 250, 240, 0.08));
  pointer-events: none;
}

.generated-poster > *:not(.generated-poster-bg) {
  position: relative;
  z-index: 1;
}

.generated-history-shell .hero-copy::before {
  content: none;
  display: none;
}

.generated-poster-map {
  display: none;
}

.poster-map-title {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #17324a;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.92);
}

.generated-poster-map::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 16%;
  top: 54%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(205, 90, 68, 0.38), rgba(70, 148, 134, 0.48), transparent);
}

.map-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 2px solid rgba(23, 50, 74, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  color: #17324a;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 10px 20px rgba(25, 16, 8, 0.10);
  backdrop-filter: blur(6px);
}

.poster-cast {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.poster-cast-card {
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(23, 50, 74, 0.14);
  border-radius: 8px;
  padding: 8px 8px 7px;
  background: rgba(255, 253, 247, 0.94);
  text-align: center;
}

.poster-cast-card img {
  width: 100%;
  height: 88px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 8%;
  background: #fff;
}

.poster-cast-card figcaption {
  margin-top: 6px;
  color: #17324a;
  font-size: 13px;
  font-weight: 900;
}

.poster-storyboard {
  display: none;
}

.poster-storyboard span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 50, 74, 0.14);
  border-radius: 8px;
  padding: 6px;
  color: #17324a;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(5px);
}

.generated-poster .poster-overlay {
  left: 22px;
  right: auto;
  bottom: 24px;
  z-index: 4;
  width: min(248px, calc(100% - 44px));
  border-radius: 26px 24px 26px 10px;
  padding: 12px 14px 13px;
}

.generated-poster .poster-overlay::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -10px;
  width: 22px;
  height: 22px;
  border-left: 2px solid #21170d;
  border-bottom: 2px solid #21170d;
  background: rgba(255, 250, 240, 0.92);
  transform: rotate(-20deg);
}

.map-node:nth-child(1) {
  left: 10%;
  top: 20%;
}

.map-node:nth-child(2) {
  right: 10%;
  top: 18%;
}

.map-node:nth-child(3) {
  left: 18%;
  bottom: 18%;
}

.map-node:nth-child(4) {
  right: 18%;
  bottom: 16%;
}

.generated-scene-card {
  position: relative;
  min-height: 330px;
  padding: 16px;
  border: 2px solid rgba(32, 23, 14, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.18), rgba(255, 253, 247, 0.92)),
    radial-gradient(circle at 20% 12%, rgba(255, 211, 92, 0.28), transparent 24%),
    #fffdf7;
  box-shadow: 5px 5px 0 rgba(32, 23, 14, 0.08);
  overflow: hidden;
}

.generated-scene-card.featured {
  grid-column: span 2;
  min-height: 420px;
}

.generated-scene-card .scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.98) contrast(1.04);
}

.generated-scene-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(24, 16, 8, 0.01) 0%, rgba(24, 16, 8, 0.06) 46%, rgba(24, 16, 8, 0.52) 100%),
    linear-gradient(90deg, rgba(255, 250, 240, 0.03), rgba(255, 250, 240, 0.14));
  pointer-events: none;
}

.generated-scene-card .scene-character {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 18px;
  width: clamp(84px, 18%, 132px);
  height: clamp(116px, 32%, 176px);
  object-fit: cover;
  object-position: 50% 8%;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(255, 253, 247, 0.82);
  box-shadow: 0 14px 28px rgba(25, 16, 8, 0.24);
}

.generated-scene-card.featured .scene-character {
  width: clamp(118px, 17%, 170px);
  height: clamp(160px, 36%, 240px);
}

.generated-scene-card:nth-child(even) .scene-character {
  left: auto;
  right: 18px;
}

.generated-scene-card .scene-shot {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border: 1px solid rgba(23, 50, 74, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: #17324a;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.92);
}

.generated-scene-card .speech {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  border: 2px solid rgba(33, 23, 13, 0.84);
  border-radius: 24px 22px 24px 10px;
  max-width: min(300px, 42%);
  padding: 10px 12px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 10px 20px rgba(25, 16, 8, 0.14);
  backdrop-filter: blur(7px);
}

.generated-scene-card:nth-child(even) .speech {
  right: auto;
  left: 18px;
  border-radius: 22px 24px 10px 24px;
}

.generated-scene-card .speech::after {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 18px;
  width: 18px;
  height: 18px;
  border-left: 2px solid rgba(33, 23, 13, 0.84);
  border-bottom: 2px solid rgba(33, 23, 13, 0.84);
  background: rgba(255, 253, 247, 0.82);
  transform: rotate(28deg);
}

.generated-scene-card:nth-child(even) .speech::after {
  left: auto;
  right: -10px;
  transform: rotate(-154deg);
}

.generated-scene-card .speech b {
  display: inline-flex;
  margin-bottom: 5px;
  color: #c4542d;
  font-size: 16px;
}

.generated-scene-card .speech p {
  margin: 0;
  color: #17324a;
  font-size: 13px;
  line-height: 1.45;
}

.generated-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.generated-map-grid button {
  min-height: 120px;
  border: 1px solid rgba(23, 50, 74, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  color: #17324a;
  font-weight: 900;
  cursor: pointer;
}

.generated-map-grid button.done {
  border-color: rgba(70, 148, 134, 0.42);
  background: #e9f8f0;
  color: #2c8367;
}

.story-bridge {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: min(640px, 100%);
  display: inline-grid;
  grid-template-columns: 82px minmax(190px, max-content);
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0), rgba(238, 247, 246, 0)),
    transparent;
  box-shadow: none;
}

.story-bridge::before {
  content: none;
}

.story-bridge img {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 106px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 8%;
  background: #fff;
  border: 1px solid rgba(33, 23, 13, 0.18);
  box-shadow: 0 10px 18px rgba(32, 23, 14, 0.12);
}

.story-bridge div {
  position: relative;
  z-index: 1;
  border: 2px solid #21170d;
  border-radius: 22px 22px 22px 8px;
  padding: 10px 13px 11px;
  max-width: 520px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 8px 18px rgba(32, 23, 14, 0.10);
}

.story-bridge div::before {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 18px;
  width: 16px;
  height: 16px;
  border-left: 2px solid #21170d;
  border-bottom: 2px solid #21170d;
  background: rgba(255, 250, 240, 0.9);
  transform: rotate(28deg);
}

.story-bridge span {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.story-bridge b {
  display: block;
  margin-bottom: 4px;
  color: #17324a;
  font-size: 17px;
}

.story-bridge p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.48;
  font-weight: 800;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(90deg, rgba(143, 94, 36, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(143, 94, 36, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 30px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.site-header {
  min-height: 54px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(143, 94, 36, 0.28);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(255, 250, 240, 0.72);
  backdrop-filter: blur(14px);
}

.site-brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-meta span {
  border: 1px solid rgba(36, 123, 120, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  background: rgba(238, 247, 246, 0.82);
}

.site-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(32, 23, 14, 0.36);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  background: #fffaf0;
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(340px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.portal-shell {
  padding-bottom: 80px;
}

.home-hero {
  min-height: calc(100dvh - 120px);
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(500px, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding: clamp(28px, 6vw, 72px) 0 34px;
}

.home-hero-copy {
  max-width: 590px;
  min-width: 0;
}

.home-hero h1 {
  max-width: 590px;
  margin-bottom: 22px;
  font-size: clamp(40px, 4.35vw, 62px);
  line-height: 1.08;
  text-shadow: none;
  word-break: normal;
  overflow-wrap: normal;
}

.home-hero .hook {
  max-width: 560px;
  color: #4f5f58;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.78;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.home-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.home-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px solid rgba(23, 50, 74, 0.22);
  padding: 0 0 8px;
  color: #4f5f58;
  font-weight: 900;
}

.home-metrics strong {
  color: #ad4e31;
  font-size: 28px;
  line-height: 1;
}

.home-hero-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(23, 50, 74, 0.22);
  border-radius: 18px;
  background: #eef8f3;
  box-shadow: 0 28px 70px rgba(31, 72, 74, 0.18);
}

.home-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.96) contrast(1.02);
}

.home-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 36, 42, 0.04), rgba(9, 36, 42, 0.34)),
    linear-gradient(90deg, rgba(255, 253, 247, 0.18), transparent 46%);
  pointer-events: none;
}

.home-visual-top {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  display: grid;
  gap: 6px;
  max-width: 330px;
  border: 1px solid rgba(23, 50, 74, 0.16);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 16px 36px rgba(31, 72, 74, 0.14);
}

.home-visual-top span,
.home-proof span,
.path-steps span,
.track-link,
.home-subject-strip span {
  color: #14766d;
  font-size: 13px;
  font-weight: 900;
}

.home-visual-top strong {
  color: #17324a;
  font-size: 22px;
  line-height: 1.2;
}

.home-route-board {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 112px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.route-pin {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(23, 50, 74, 0.18);
  border-radius: 14px;
  padding: 14px;
  color: #17324a;
  text-decoration: none;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 12px 30px rgba(31, 72, 74, 0.14);
}

.route-pin span {
  color: #ad4e31;
  font-size: 12px;
  font-weight: 900;
}

.route-pin strong {
  color: #17324a;
  font-size: 20px;
  line-height: 1.22;
}

.future-pin {
  background: rgba(246, 250, 232, 0.92);
}

.home-subject-strip {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 62px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-subject-strip span {
  border: 1px solid rgba(23, 50, 74, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 253, 247, 0.9);
}

.home-visual-images {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 22px;
  display: flex;
  gap: 10px;
}

.home-visual-images img {
  width: 112px;
  height: 78px;
  border: 2px solid rgba(255, 253, 247, 0.9);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(15, 35, 39, 0.22);
}

.home-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 50, 74, 0.14);
  border-radius: 18px;
  background: rgba(23, 50, 74, 0.12);
  box-shadow: 0 18px 46px rgba(31, 72, 74, 0.08);
}

.home-proof div {
  min-height: 178px;
  padding: 24px;
  background: rgba(255, 253, 247, 0.86);
}

.home-proof strong {
  display: block;
  margin: 12px 0 8px;
  color: #17324a;
  font-size: 26px;
  line-height: 1.18;
}

.home-proof p,
.path-steps p,
.track-intro p,
.home-growth p {
  color: #5f6f68;
  line-height: 1.68;
}

.home-path,
.home-track,
.home-growth {
  margin-top: 30px;
  border: 1px solid rgba(23, 50, 74, 0.13);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 46px);
  background: rgba(255, 253, 247, 0.88);
  box-shadow: 0 18px 46px rgba(31, 72, 74, 0.08);
}

.home-path {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.home-path .section-heading {
  max-width: 760px;
  margin-bottom: 0;
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.path-steps article {
  min-height: 188px;
  border: 1px solid rgba(23, 50, 74, 0.12);
  border-top: 4px solid #21a8a0;
  border-radius: 12px;
  padding: 18px 18px 20px;
  background: rgba(247, 255, 252, 0.82);
}

.path-steps article:nth-child(2) {
  border-top-color: #d7a23b;
}

.path-steps article:nth-child(3) {
  border-top-color: #ad4e31;
}

.path-steps article:nth-child(4) {
  border-top-color: #426d8f;
}

.path-steps h3 {
  margin: 12px 0 8px;
  color: #17324a;
  font-size: 23px;
}

.home-track {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.track-intro {
  position: sticky;
  top: 84px;
}

.track-intro h2,
.home-growth h2 {
  margin-bottom: 12px;
  color: #17324a;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.12;
}

.track-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid rgba(20, 118, 109, 0.34);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  background: #eefaf5;
}

.home-track .course-grid {
  grid-column: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-track .course-card {
  min-height: 238px;
  background: rgba(255, 253, 247, 0.9);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.home-track .course-card:hover {
  border-color: rgba(20, 118, 109, 0.42);
  box-shadow: 0 16px 34px rgba(31, 72, 74, 0.12);
  transform: translateY(-2px);
}

.home-track .course-card img,
.home-track .course-placeholder {
  height: 132px;
}

.home-track-science .science-map-preview {
  grid-column: 2;
  margin-bottom: 14px;
}

.home-growth {
  display: grid;
  grid-template-columns: minmax(260px, 0.46fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.home-growth .track-grid article {
  min-height: 180px;
  background: rgba(255, 253, 247, 0.86);
}

.portal-hero {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.82fr);
  gap: 34px;
  align-items: center;
}

.portal-copy {
  padding: 34px 0;
}

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

.portal-launch-grid a {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(23, 50, 74, 0.2);
  border-radius: 8px;
  padding: 16px;
  color: #17324a;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(238, 249, 246, 0.84)),
    #fffdf7;
  box-shadow: 0 12px 28px rgba(37, 89, 96, 0.1);
}

.portal-launch-grid span {
  color: #16806f;
  font-size: 12px;
  font-weight: 900;
}

.portal-launch-grid strong {
  color: #17324a;
  font-size: 22px;
  line-height: 1.22;
}

.portal-launch-grid p {
  margin: 8px 0 0;
  color: #5f6f68;
  line-height: 1.55;
}

.portal-cover {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 2px solid #21170d;
  border-radius: 10px;
  background: #21170d;
  box-shadow: var(--shadow);
}

.portal-cover img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
}

.portal-command-map {
  display: grid;
  align-items: stretch;
  border-color: #17324a;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 211, 92, 0.34), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(33, 168, 160, 0.26), transparent 25%),
    linear-gradient(145deg, rgba(255, 253, 247, 0.9), rgba(231, 247, 242, 0.9));
}

.portal-command-map::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 2px dashed rgba(23, 50, 74, 0.18);
  border-radius: 18px;
}

.portal-map-stage {
  position: relative;
  min-height: inherit;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr 0.9fr;
  gap: 16px;
  padding: 34px;
}

.portal-map-stage::before,
.portal-map-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.portal-map-stage::before {
  left: 22%;
  right: 22%;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c4542d, #21a8a0, #ffd35c);
  opacity: 0.58;
}

.portal-map-stage::after {
  left: 50%;
  top: 20%;
  bottom: 20%;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #21a8a0, #ffd35c);
  opacity: 0.38;
}

.portal-zone {
  position: relative;
  z-index: 2;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 2px solid rgba(23, 50, 74, 0.26);
  border-radius: 12px;
  padding: 18px;
  color: #17324a;
  text-decoration: none;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 6px 6px 0 rgba(23, 50, 74, 0.12);
}

.portal-zone span,
.portal-zone em {
  font-style: normal;
  font-weight: 900;
}

.portal-zone span {
  color: #16806f;
  font-size: 15px;
}

.portal-zone strong {
  color: #c4542d;
  font-size: 76px;
  line-height: 0.95;
}

.portal-zone em {
  color: #5f6f68;
}

.zone-science {
  margin-top: 56px;
}

.zone-auto {
  grid-column: 1 / -1;
  min-height: 160px;
  align-items: center;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 244, 210, 0.92), rgba(255, 253, 247, 0.94)),
    #fffdf7;
}

.zone-auto strong {
  font-size: 58px;
}

.portal-section {
  margin-top: 28px;
}

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

.course-card,
.track-grid article {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(143, 94, 36, 0.32);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 250, 240, 0.72);
}

.course-card.live {
  border-color: rgba(36, 123, 120, 0.48);
  box-shadow: 0 0 0 2px rgba(36, 123, 120, 0.10);
}

.course-card span,
.track-grid span {
  align-self: flex-start;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  background: #eef7f6;
}

.course-card img,
.course-placeholder {
  width: 100%;
  height: 150px;
  margin-bottom: 14px;
  border: 1px solid rgba(143, 94, 36, 0.28);
  border-radius: 8px;
}

.course-card img {
  object-fit: cover;
}

.course-placeholder {
  display: grid;
  place-items: center;
  color: rgba(143, 94, 36, 0.42);
  font-size: 56px;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.86), rgba(238, 247, 246, 0.92)),
    repeating-linear-gradient(45deg, rgba(143, 94, 36, 0.12) 0 8px, transparent 8px 16px);
}

.course-card h3,
.track-grid h3 {
  margin-bottom: 8px;
}

.course-card p,
.track-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.track-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-copy {
  position: relative;
  padding: 26px 0;
}

.hero-copy::before {
  content: "SUI DYNASTY CASE";
  display: inline-flex;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--deep-gold);
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 250, 240, 0.68);
}

.series-label,
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  color: #17120d;
  font-size: clamp(44px, 5.8vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
  word-break: keep-all;
  text-shadow: 0 5px 0 rgba(201, 144, 61, 0.18);
}

h2 {
  margin-bottom: 12px;
  color: #21170d;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: #21170d;
  font-size: 19px;
  line-height: 1.28;
}

.hook,
.section-heading p,
.role-card p,
.evidence-card p,
.choice-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

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

.primary-action,
.secondary-action,
.control-board button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #21170d;
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  background: #fffaf0;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, #21170d, #533019);
  box-shadow: 5px 5px 0 var(--gold);
}

.anime-poster {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 2px solid #21170d;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.88), rgba(244, 218, 176, 0.92)),
    radial-gradient(circle at 75% 16%, #ffe59d 0 9%, transparent 10%);
  box-shadow: var(--shadow);
}

.anime-poster::before,
.anime-poster::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(143, 94, 36, 0.38);
  border-radius: 8px;
  pointer-events: none;
}

.poster-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(1.02) contrast(1.02);
}

.poster-overlay {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(350px, calc(100% - 44px));
  border: 2px solid #21170d;
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 12px 28px rgba(32, 23, 14, 0.2);
}

.poster-overlay span,
.memory-card span,
.role-card span,
.evidence-card span,
.choice-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.poster-overlay strong,
.memory-card strong {
  display: block;
  color: #21170d;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.28;
}

.poster-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  font-weight: 900;
  background: rgba(184, 69, 55, 0.88);
  box-shadow: 0 10px 24px rgba(32, 23, 14, 0.16);
}

.mission-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: 2px 0 24px;
  border: 1px solid rgba(23, 50, 74, 0.16);
  border-radius: 8px;
  padding: 8px;
  overflow-x: auto;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.92), rgba(236, 248, 244, 0.9)),
    rgba(251, 245, 232, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(23, 50, 74, 0.08);
  scroll-snap-type: x proximity;
}

.mission-tabs a {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(143, 94, 36, 0.26);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(255, 250, 240, 0.9);
  scroll-snap-align: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mission-tabs a:hover,
.mission-tabs a:focus-visible {
  transform: translateY(-2px);
  background: #fffdf7;
  box-shadow: 0 8px 18px rgba(31, 111, 159, 0.12);
}

.panel {
  position: relative;
  margin-top: 22px;
  border: 1px solid rgba(143, 94, 36, 0.3);
  border-radius: 10px;
  padding: clamp(22px, 4vw, 42px);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(216, 180, 123, 0.35);
  border-radius: 7px;
  pointer-events: none;
}

.section-heading {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin-bottom: 24px;
}

.comic-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.episode-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.episode-steps span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(143, 94, 36, 0.34);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  background: #fffdf7;
}

.episode-steps span.active {
  color: #fff;
  border-color: #21170d;
  background: linear-gradient(135deg, #21170d, #69381e);
}

.comic-panel {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 2px solid #21170d;
  border-radius: 8px;
  background: #f6e4c5;
}

.comic-panel.large {
  grid-row: span 2;
  min-height: 638px;
}

.comic-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.comic-panel.large img {
  object-position: 50% 20%;
}

.speech {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border: 2px solid #21170d;
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 250, 240, 0.94);
}

.speech b,
.dialogue b {
  color: var(--red);
}

.speech p,
.dialogue p {
  margin: 0;
  color: var(--text);
  line-height: 1.62;
  font-weight: 700;
}

.team-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.role-card {
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(143, 94, 36, 0.34);
  border-top: 5px solid var(--gold);
  border-radius: 8px;
  background: #fffdf7;
}

.role-aran {
  border-top-color: #b84537;
}

.role-lanchuan {
  border-top-color: #247b78;
}

.role-shanye {
  border-top-color: #6d5636;
}

.role-xiaoying {
  border-top-color: #8b62ad;
}

.role-moyan {
  border-top-color: #1f4f7c;
}

.role-xiaolei {
  border-top-color: #d99a2b;
}

.role-card img {
  width: 100%;
  height: 210px;
  display: block;
  object-fit: cover;
  object-position: 50% 18%;
}

.role-card span,
.role-card h3,
.role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.role-card span {
  margin-top: 14px;
}

.role-card p {
  font-size: 14px;
}

.role-brief,
.role-clue,
.role-action {
  margin: 10px 14px 0;
  border: 1px solid rgba(143, 94, 36, 0.18);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 248, 232, 0.72);
  color: #3e3124;
  font-size: 13px;
  line-height: 1.45;
}

.role-brief {
  color: #17324a;
  font-weight: 900;
  background: rgba(238, 247, 246, 0.76);
}

.role-clue b,
.role-action b {
  display: inline-flex;
  margin-right: 7px;
  color: var(--red);
  font-size: 12px;
}

.visual-route .comic-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.visual-route .generated-scene-card,
.visual-route .generated-scene-card.featured {
  grid-column: auto;
  min-height: 340px;
  border-color: rgba(31, 79, 124, 0.34);
  box-shadow: 0 16px 30px rgba(31, 79, 124, 0.12);
}

.visual-route .generated-scene-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 26px;
  top: 56px;
  bottom: 56px;
  width: 2px;
  background: linear-gradient(180deg, rgba(36, 123, 120, 0), rgba(36, 123, 120, 0.75), rgba(36, 123, 120, 0));
}

.visual-route .generated-scene-card .scene-shot {
  left: 20px;
  border-color: rgba(36, 123, 120, 0.34);
  background: rgba(236, 250, 247, 0.9);
}

.visual-route .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-route .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-top: 0;
  border-left: 5px solid #247b78;
}

.visual-route .role-card img {
  height: 100%;
  min-height: 180px;
}

.visual-route .role-card span,
.visual-route .role-card h3,
.visual-route .role-card p {
  margin-left: 16px;
  margin-right: 16px;
}

.visual-treasure .comic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-treasure .generated-scene-card {
  min-height: 360px;
  border-color: rgba(185, 125, 43, 0.48);
  background: #fff8e8;
  box-shadow: 0 12px 0 rgba(185, 125, 43, 0.08), 0 18px 34px rgba(90, 54, 20, 0.12);
}

.visual-treasure .generated-scene-card.featured {
  grid-column: span 2;
}

.visual-treasure .generated-scene-card:nth-child(5) {
  grid-column: span 3;
  min-height: 390px;
}

.visual-treasure .generated-scene-card .scene-shot {
  color: #6e4216;
  border-color: rgba(185, 125, 43, 0.36);
  background: rgba(255, 248, 232, 0.92);
}

.visual-treasure .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-treasure .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-top: 0;
  border-left: 5px solid #d99a2b;
  background:
    linear-gradient(90deg, rgba(255, 246, 222, 0.95), rgba(255, 253, 247, 0.96)),
    #fffdf7;
}

.visual-treasure .role-card img {
  height: 100%;
  min-height: 170px;
}

.visual-treasure .role-card span,
.visual-treasure .role-card h3,
.visual-treasure .role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-court .comic-grid {
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.visual-court .generated-scene-card {
  min-height: 365px;
  border-color: rgba(116, 65, 35, 0.32);
  background: #fff8ee;
  box-shadow: 0 18px 32px rgba(83, 52, 31, 0.13);
}

.visual-court .generated-scene-card.featured,
.visual-court .generated-scene-card:nth-child(5) {
  grid-column: span 2;
  min-height: 410px;
}

.visual-court .generated-scene-card:nth-child(2),
.visual-court .generated-scene-card:nth-child(3) {
  min-height: 430px;
}

.visual-court .generated-scene-card .scene-shot {
  color: #5d331e;
  border-color: rgba(140, 82, 45, 0.3);
  background: rgba(255, 248, 235, 0.92);
}

.visual-court .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-court .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  border-top: 0;
  border-left: 5px solid #8f5130;
  background:
    linear-gradient(90deg, rgba(255, 249, 238, 0.96), rgba(250, 253, 249, 0.94)),
    #fffdf8;
}

.visual-court .role-card img {
  height: 100%;
  min-height: 172px;
}

.visual-court .role-card span,
.visual-court .role-card h3,
.visual-court .role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-frontier .comic-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.visual-frontier .generated-scene-card {
  min-height: 350px;
  border-color: rgba(67, 97, 83, 0.34);
  background: #fbf7ea;
  box-shadow: 0 16px 30px rgba(50, 78, 69, 0.13);
}

.visual-frontier .generated-scene-card.featured {
  grid-column: span 2;
  min-height: 420px;
}

.visual-frontier .generated-scene-card:nth-child(2),
.visual-frontier .generated-scene-card:nth-child(3) {
  min-height: 390px;
}

.visual-frontier .generated-scene-card:nth-child(4),
.visual-frontier .generated-scene-card:nth-child(5) {
  grid-column: span 2;
  min-height: 400px;
}

.visual-frontier .generated-scene-card .scene-shot {
  color: #274d45;
  border-color: rgba(55, 111, 94, 0.32);
  background: rgba(240, 250, 244, 0.92);
}

.visual-frontier .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-frontier .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  border-top: 0;
  border-left: 5px solid #376f5e;
  background:
    linear-gradient(90deg, rgba(244, 251, 242, 0.95), rgba(255, 249, 236, 0.94)),
    #fffdf7;
}

.visual-frontier .role-card img {
  height: 100%;
  min-height: 172px;
}

.visual-frontier .role-card span,
.visual-frontier .role-card h3,
.visual-frontier .role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-confrontation .comic-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.visual-confrontation .generated-scene-card {
  min-height: 370px;
  border-color: rgba(76, 62, 86, 0.34);
  background: #fbf6ee;
  box-shadow: 0 16px 30px rgba(63, 51, 70, 0.14);
}

.visual-confrontation .generated-scene-card.featured {
  grid-column: span 2;
  min-height: 420px;
}

.visual-confrontation .generated-scene-card:nth-child(2) {
  grid-column: span 2;
  min-height: 430px;
}

.visual-confrontation .generated-scene-card:nth-child(5) {
  grid-column: span 2;
  min-height: 405px;
}

.visual-confrontation .generated-scene-card .scene-shot {
  color: #563a54;
  border-color: rgba(99, 68, 100, 0.32);
  background: rgba(251, 244, 239, 0.93);
}

.visual-confrontation .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-confrontation .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto auto auto;
  border-top: 0;
  border-left: 5px solid #6c4568;
  background:
    linear-gradient(90deg, rgba(251, 245, 239, 0.96), rgba(246, 249, 245, 0.94)),
    #fffdf7;
}

.visual-confrontation .role-card img {
  grid-row: 1 / -1;
  height: 100%;
  min-height: 232px;
}

.visual-confrontation .role-card span,
.visual-confrontation .role-card h3,
.visual-confrontation .role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-confrontation .role-card span {
  margin-top: 12px;
}

.visual-confrontation .role-card h3 {
  margin-top: 6px;
  margin-bottom: 0;
}

.visual-confrontation .role-card p {
  margin-top: 7px;
  margin-bottom: 0;
}

.visual-confrontation .role-brief,
.visual-confrontation .role-clue,
.visual-confrontation .role-action {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-imperial .comic-grid {
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.visual-imperial .generated-scene-card {
  min-height: 365px;
  border-color: rgba(74, 83, 118, 0.32);
  background: #f8f7ef;
  box-shadow: 0 16px 30px rgba(55, 61, 94, 0.13);
}

.visual-imperial .generated-scene-card.featured,
.visual-imperial .generated-scene-card:nth-child(4),
.visual-imperial .generated-scene-card:nth-child(5) {
  grid-column: span 2;
  min-height: 410px;
}

.visual-imperial .generated-scene-card .scene-shot {
  color: #33406b;
  border-color: rgba(74, 83, 118, 0.34);
  background: rgba(241, 246, 252, 0.93);
}

.visual-imperial .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-imperial .role-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto auto auto;
  border-top: 0;
  border-left: 5px solid #4a5376;
  background:
    linear-gradient(90deg, rgba(242, 246, 252, 0.96), rgba(255, 249, 236, 0.94)),
    #fffdf7;
}

.visual-imperial .role-card img {
  grid-row: 1 / -1;
  height: 100%;
  min-height: 232px;
}

.visual-imperial .role-card span,
.visual-imperial .role-card h3,
.visual-imperial .role-card p {
  margin-left: 14px;
  margin-right: 14px;
}

.visual-imperial .role-card span {
  margin-top: 12px;
}

.visual-imperial .role-card h3 {
  margin-top: 6px;
  margin-bottom: 0;
}

.visual-imperial .role-card p {
  margin-top: 7px;
  margin-bottom: 0;
}

.visual-imperial .role-brief,
.visual-imperial .role-clue,
.visual-imperial .role-action {
  margin-left: 14px;
  margin-right: 14px;
}

.evidence-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.evidence-card,
.choice-card {
  min-height: 178px;
  border: 1px solid rgba(143, 94, 36, 0.34);
  border-radius: 8px;
  padding: 18px;
  text-align: left;
  background: #fffdf7;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.evidence-card:hover,
.choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(64, 43, 20, 0.12);
}

.evidence-card.collected,
.choice-card.selected {
  border-color: #21170d;
  background: linear-gradient(180deg, #fff5d8, #fffaf0);
  box-shadow: inset 0 0 0 2px rgba(201, 144, 61, 0.32);
}

.collection-bar {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  border: 1px solid rgba(143, 94, 36, 0.32);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--muted);
  background: #fff7e6;
}

.collection-bar strong {
  color: var(--teal);
}

.canal-layout,
.sim-layout,
.compare-layout,
.quiz-layout,
.material-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

svg {
  width: 100%;
  min-height: 360px;
  border: 1px solid rgba(143, 94, 36, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #eef3e8, #f5edd6);
}

.land {
  fill: #eadcae;
  stroke: #b59a60;
  stroke-width: 2;
}

.route {
  fill: none;
  stroke: #a7b0a7;
  stroke-width: 14;
  stroke-linecap: round;
  opacity: 0.5;
  transition: stroke 0.25s ease, opacity 0.25s ease;
}

.route.active {
  stroke: #1f5e9d;
  opacity: 1;
}

.city circle {
  fill: var(--red);
  stroke: #fff;
  stroke-width: 3;
}

.city text {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.mission-console,
.control-board,
.status-board,
.quiz-card,
.choice-stage,
.material-task,
.material-scroll {
  min-width: 0;
  border: 1px solid rgba(143, 94, 36, 0.32);
  border-radius: 8px;
  padding: 18px;
  background: #fffdf7;
}

.material-scroll {
  display: grid;
  align-content: center;
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(255, 247, 230, 0.96), rgba(255, 253, 247, 0.96)),
    #fffdf7;
}

.material-scroll span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(184, 69, 55, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  background: #fff2e7;
}

.material-scroll p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.55;
  font-weight: 900;
}

.material-task {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.material-task > img {
  width: 100%;
  height: clamp(220px, 32vw, 360px);
  display: block;
  border: 1px solid rgba(143, 94, 36, 0.30);
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 42%;
}

.dialogue {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(143, 94, 36, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: #fff7e6;
}

.dialogue.tall {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
}

.dialogue img {
  width: 72px;
  aspect-ratio: 1;
  border: 1px solid rgba(143, 94, 36, 0.34);
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 50%;
}

.dialogue.tall img {
  width: 110px;
}

.segment-buttons,
.answers,
.material-buttons {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

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

.segment-buttons button,
.answers button,
.material-buttons button {
  min-height: 46px;
  border: 1px solid #21170d;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: normal;
  background: #fffaf0;
  cursor: pointer;
}

.segment-buttons button.done,
.answers button.correct,
.material-buttons button.correct {
  color: #fff;
  background: var(--teal);
}

.answers button.wrong,
.material-buttons button.wrong {
  color: #fff;
  background: var(--red);
}

.water-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.water-tags span {
  border: 1px solid rgba(31, 79, 124, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  background: #eef7fb;
}

.timeline-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.timeline-buttons button {
  min-height: 70px;
  border: 1px solid #21170d;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  background: #fffaf0;
  cursor: pointer;
}

.timeline-buttons button.done {
  color: #fff;
  background: var(--teal);
}

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

.mirror-card {
  min-height: 150px;
  border: 1px solid rgba(143, 94, 36, 0.34);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  background: #fffaf0;
  cursor: pointer;
}

.mirror-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(36, 123, 120, 0.15);
}

.feedback,
.verdict {
  border: 1px solid rgba(143, 94, 36, 0.32);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  line-height: 1.7;
  background: #fff7e6;
}

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

.choice-stage .feedback {
  grid-column: 1 / -1;
}

.control-board label {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--ink);
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--red);
}

.status-board {
  display: grid;
  gap: 14px;
}

.tool-board {
  display: grid;
  gap: 12px;
  align-content: start;
}

.tool-board button.done {
  color: #fff;
  background: var(--teal);
}

.meter {
  border: 1px solid rgba(143, 94, 36, 0.26);
  border-radius: 8px;
  padding: 16px;
  background: #f7fbf9;
}

.meter > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 900;
}

.meter strong {
  color: var(--teal);
  font-size: 34px;
}

.meter.danger strong {
  color: var(--red);
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #dde6e5;
}

.bar i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.2s ease;
}

.danger .bar i {
  background: var(--red);
}

#questionText {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.55;
}

.report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 22px;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(32, 23, 14, 0.96), rgba(36, 63, 89, 0.94) 58%, rgba(111, 47, 41, 0.94)),
    #21170d;
}

.report::before {
  border-color: rgba(255, 255, 255, 0.18);
}

.report h2 {
  color: #fff;
}

.report .eyebrow,
.report p {
  color: #f6d891;
}

.report p {
  line-height: 1.85;
}

.report-intro {
  max-width: 720px;
}

.report.locked {
  filter: saturate(0.92);
}

.report.unlocked {
  box-shadow: 0 0 0 3px rgba(246, 216, 145, 0.35), var(--shadow);
}

.report-status {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.10);
}

.cloze-report span {
  display: inline-flex;
  min-width: 96px;
  justify-content: center;
  border: 1px dashed rgba(246, 216, 145, 0.62);
  border-radius: 999px;
  padding: 0 10px;
  color: #f6d891;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.cloze-report span.filled {
  border: 1px solid rgba(246, 216, 145, 0.42);
  border-radius: 999px;
  padding: 0 10px;
  color: #21170d;
  background: #f6d891;
}

.memory-card {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.report-art {
  width: 100%;
  height: 170px;
  display: block;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 48%;
}

.memory-card span {
  color: #f6d891;
}

.memory-card strong {
  color: #fff;
}

.lesson-footer-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.lesson-footer-actions .secondary-action {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.science-shell {
  --science-blue: #1f6f9f;
  --science-teal: #16806f;
  --science-green: #5c9a44;
  --science-cream: #fffdf7;
}

.science-hero .hero-copy::before {
  content: "SCIENCE QUEST";
  color: var(--science-blue);
  border-color: rgba(31, 111, 159, 0.28);
  background: rgba(236, 248, 244, 0.78);
}

.science-poster {
  background:
    linear-gradient(180deg, rgba(236, 248, 244, 0.88), rgba(224, 242, 231, 0.92)),
    radial-gradient(circle at 78% 14%, rgba(92, 154, 68, 0.24) 0 9%, transparent 10%);
}

.science-poster .poster-badge {
  background: rgba(31, 111, 159, 0.9);
}

.science-lesson-cover {
  position: relative;
  isolation: isolate;
  min-height: min(760px, calc(100dvh - 116px));
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(220px, 0.22fr);
  align-items: end;
  gap: clamp(18px, 4vw, 46px);
  overflow: hidden;
  border: 2px solid #17324a;
  border-radius: 12px;
  padding: clamp(22px, 5vw, 58px);
  background:
    linear-gradient(90deg, rgba(9, 31, 49, 0.84) 0%, rgba(9, 31, 49, 0.64) 42%, rgba(9, 31, 49, 0.2) 72%),
    linear-gradient(180deg, rgba(9, 31, 49, 0.02), rgba(9, 31, 49, 0.68)),
    url("assets/science/grade3b/lesson1/hero-body-journey-cover-ai-v1.webp") center / cover no-repeat;
  box-shadow: 0 22px 46px rgba(23, 50, 74, 0.22);
}

.science-lesson-cover::before {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  pointer-events: none;
}

.science-lesson-cover .hero-copy {
  max-width: 720px;
  padding: 0;
}

.science-lesson-cover .hero-copy::before {
  content: "SCIENCE QUEST";
  border-color: rgba(255, 255, 255, 0.46);
  color: #e9fffb;
  background: rgba(23, 50, 74, 0.54);
}

.science-lesson-cover .series-label {
  color: #c8fff4;
}

.science-lesson-cover h1 {
  max-width: 650px;
  color: #fff;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.04;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.science-lesson-cover .hook {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.5vw, 19px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.science-lesson-cover .riceball-sos {
  max-width: 560px;
  background: rgba(255, 253, 247, 0.9);
}

.science-lesson-cover .science-party span {
  border-color: rgba(255, 255, 255, 0.4);
  color: #f2fffb;
  background: rgba(23, 50, 74, 0.48);
  box-shadow: none;
}

.science-lesson-cover .science-party span b {
  color: #ffd35c;
}

.science-lesson-cover .science-poster {
  display: none;
}

.science-story .section-heading {
  max-width: 900px;
}

.story-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}

.story-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid #17324a;
  border-radius: 8px;
  background: #eaf6f3;
}

.story-card.feature {
  grid-row: span 2;
}

.story-card img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  object-fit: cover;
  object-position: 50% 0%;
}

.story-card.feature img {
  min-height: 620px;
}

.story-card h3 {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17324a;
  background: rgba(255, 253, 247, 0.94);
}

.science-team {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.science-team .role-card {
  border-top-color: var(--science-blue);
}

.science-team .role-card:nth-child(2) {
  border-top-color: var(--science-teal);
}

.science-team .role-card:nth-child(3) {
  border-top-color: var(--science-green);
}

.science-team .role-card:nth-child(4) {
  border-top-color: var(--violet);
}

.science-team .role-card img {
  object-position: 50% 10%;
}

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

.science-route-panel {
  overflow: hidden;
}

.route-layout,
.organ-layout,
.habit-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 22px;
  align-items: stretch;
}

.body-map {
  min-width: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: clamp(18px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(235, 247, 255, 0.96), rgba(238, 249, 240, 0.96)),
    repeating-linear-gradient(45deg, rgba(31, 111, 159, 0.08) 0 12px, transparent 12px 24px);
}

.body-stage {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.body-stage span {
  min-height: 108px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(31, 111, 159, 0.36);
  border-radius: 999px;
  color: #17324a;
  font-size: clamp(17px, 2.3vw, 25px);
  font-weight: 900;
  background: #fffdf7;
  box-shadow: 0 12px 22px rgba(31, 111, 159, 0.1);
}

.body-stage span.active {
  color: #fff;
  border-color: #17324a;
  background: linear-gradient(135deg, #1f6f9f, #16806f);
}

.body-stage span.wrong {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.route-picks,
.organ-board,
.habit-board {
  display: grid;
  gap: 10px;
}

.route-picks {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.route-picks button,
.organ-board button,
.habit-board button {
  min-height: 56px;
  border: 1px solid #17324a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17324a;
  font-weight: 900;
  background: #fffdf7;
  cursor: pointer;
}

.route-picks button:disabled {
  opacity: 0.48;
  cursor: default;
}

.route-progress {
  margin: 14px 0;
  border: 1px solid rgba(31, 111, 159, 0.28);
  border-radius: 8px;
  padding: 14px;
  color: #17324a;
  line-height: 1.7;
  font-weight: 900;
  background: #edf8fb;
}

.reset-button {
  width: 100%;
}

.organ-board {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.organ-board button {
  min-height: 104px;
  display: grid;
  gap: 6px;
  place-items: center;
}

.organ-board button span {
  color: var(--science-teal);
  font-size: 13px;
}

.organ-board button strong {
  font-size: 24px;
}

.organ-board button.selected {
  color: #fff;
  background: var(--science-teal);
}

.organ-board button.selected span {
  color: #e9fff9;
}

.organ-note {
  display: grid;
  gap: 14px;
}

.organ-note img {
  width: 100%;
  max-height: 330px;
  border: 1px solid rgba(31, 111, 159, 0.24);
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 28%;
}

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

.habit-board button.correct {
  color: #fff;
  background: var(--science-teal);
}

.habit-board button.wrong {
  color: #fff;
  background: var(--red);
}

.myth-buttons button.correct {
  color: #fff;
  background: var(--science-blue);
}

.quest-layout,
.secret-map-layout,
.lab-layout,
.match-layout,
.comment-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
}

.quest-stage {
  min-width: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: clamp(18px, 4vw, 30px);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 211, 92, 0.34), transparent 24%),
    radial-gradient(circle at 16% 88%, rgba(92, 154, 68, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(237, 248, 251, 0.96), rgba(238, 249, 240, 0.96)),
    repeating-linear-gradient(-12deg, rgba(31, 111, 159, 0.08) 0 10px, transparent 10px 22px);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 247, 0.7), 0 16px 34px rgba(31, 111, 159, 0.12);
}

.phenomenon-card,
.life-scene-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin: 0 0 18px;
  border: 2px solid #17324a;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 14px 28px rgba(31, 111, 159, 0.12);
}

.phenomenon-card::after {
  content: "第一幕";
  position: absolute;
  left: 14px;
  top: 14px;
  border: 2px solid #17324a;
  border-radius: 999px;
  padding: 6px 10px;
  color: #17324a;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 211, 92, 0.94);
  box-shadow: 3px 3px 0 rgba(23, 50, 74, 0.14);
}

.phenomenon-card img,
.life-scene-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.phenomenon-card img.comic-page-preview,
.life-scene-card img.comic-page-preview {
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}

.phenomenon-card figcaption,
.life-scene-card figcaption {
  margin: 0;
  padding: 14px 16px;
  color: #17324a;
  font-weight: 900;
  line-height: 1.65;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.96), rgba(236, 248, 244, 0.94)),
    #fffdf7;
}

.phenomenon-card b {
  display: inline-flex;
  margin-right: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  font-size: 13px;
  background: var(--science-blue);
}

.avatar-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.avatar-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(23, 50, 74, 0.24);
  border-radius: 8px;
  padding: 14px;
  color: #17324a;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 4px 4px 0 rgba(23, 50, 74, 0.08);
}

.avatar-card b {
  font-size: 18px;
  font-weight: 900;
}

.avatar-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.dialogue-box {
  min-height: 150px;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 18px;
  color: #17324a;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.65;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.94);
}

.story-choices,
.guess-grid,
.reason-picks {
  display: grid;
  gap: 10px;
}

.story-choices button,
.guess-grid button,
.reason-picks button,
.function-bank button,
.organ-slots button,
.myth-grid button,
.life-grid button {
  min-height: 52px;
  border: 1px solid #17324a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17324a;
  font-weight: 900;
  text-align: left;
  line-height: 1.5;
  background: #fffdf7;
  cursor: pointer;
}

.guess-grid {
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}

.guess-grid button {
  min-height: 64px;
  display: flex;
  align-items: center;
  border-width: 2px;
  padding: 14px 16px;
  font-size: 16px;
  box-shadow: 4px 4px 0 rgba(23, 50, 74, 0.1);
}

.story-choices button.selected,
.reason-picks button.selected,
.function-bank button.selected {
  color: #fff;
  background: var(--science-blue);
}

.guess-grid button.correct {
  color: #fff;
  background: var(--science-teal);
}

.guess-grid button.wrong {
  color: #fff;
  background: var(--red);
}

.reason-picks button.correct {
  color: #fff;
  background: var(--science-teal);
}

.reason-picks button.wrong {
  color: #fff;
  background: var(--red);
}

.digest-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 2px solid #17324a;
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 30%, rgba(255, 211, 92, 0.4), transparent 13%),
    radial-gradient(circle at 54% 46%, rgba(31, 111, 159, 0.22), transparent 24%),
    radial-gradient(circle at 84% 68%, rgba(92, 154, 68, 0.24), transparent 22%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.95), rgba(237, 248, 251, 0.92) 48%, rgba(238, 249, 240, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 253, 247, 0.75);
}

.digest-map::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 48%;
  height: 96px;
  border-top: 12px solid rgba(31, 111, 159, 0.24);
  border-radius: 50%;
  transform: rotate(-3deg);
  opacity: 0.86;
}

.digest-map::after {
  content: "秘境路线";
  position: absolute;
  right: 16px;
  top: 14px;
  border: 1px solid rgba(23, 50, 74, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: #17324a;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.86);
}

.organ-path {
  position: absolute;
  inset: 0;
}

.organ-node {
  position: absolute;
  width: min(150px, 25vw);
  min-height: 96px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(23, 50, 74, 0.44);
  border-radius: 999px;
  padding: 12px;
  color: #17324a;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 211, 92, 0.26), transparent 42%),
    rgba(255, 253, 247, 0.96);
  box-shadow: 0 14px 26px rgba(31, 111, 159, 0.16), 4px 4px 0 rgba(23, 50, 74, 0.08);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.organ-node:hover,
.organ-node:focus-visible {
  transform: translate(-50%, -55%);
  box-shadow: 0 18px 30px rgba(31, 111, 159, 0.18), 5px 5px 0 rgba(23, 50, 74, 0.12);
}

.organ-node strong,
.organ-node span {
  display: block;
  text-align: center;
}

.organ-node strong {
  font-size: 21px;
}

.organ-node span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.organ-node.active {
  color: #fff;
  border-color: #17324a;
  background: linear-gradient(135deg, #1f6f9f, #16806f);
  box-shadow: 0 0 0 5px rgba(255, 211, 92, 0.34), 0 18px 30px rgba(31, 111, 159, 0.2);
}

.organ-node.wrong {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.rice-ball {
  position: absolute;
  z-index: 2;
  left: 8%;
  top: 30%;
  width: 70px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -150%);
  border: 2px solid #17324a;
  border-radius: 50% 50% 44% 44%;
  color: #17324a;
  font-size: 14px;
  font-weight: 900;
  background: #fff;
  box-shadow: 0 12px 22px rgba(31, 111, 159, 0.18);
  transition: left 0.35s ease, top 0.35s ease, transform 0.22s ease;
  animation: riceball-float 2.4s ease-in-out infinite;
}

@keyframes riceball-float {
  0%, 100% {
    transform: translate(-50%, -150%) rotate(-2deg);
  }
  50% {
    transform: translate(-50%, -160%) rotate(2deg);
  }
}

.experiment-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.experiment-steps article {
  border: 1px solid rgba(23, 50, 74, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: #fffdf7;
}

.experiment-steps span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--science-blue);
}

.experiment-steps p {
  margin: 0;
  color: #17324a;
  line-height: 1.6;
  font-weight: 900;
}

.lab-mission-card {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.lab-mission-card strong {
  display: block;
  color: #17324a;
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.3;
}

.chew-simulator {
  min-width: 0;
  display: grid;
  gap: 18px;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 18px;
  background: #fffdf7;
}

.food-particles {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(23, 50, 74, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 34%, transparent 35%),
    linear-gradient(135deg, #e7f7fa, #fff4dd);
}

.food-particles span {
  position: absolute;
  border: 1px solid rgba(143, 94, 36, 0.3);
  border-radius: 999px;
  background: #fff7e4;
  box-shadow: inset -3px -4px 0 rgba(201, 144, 61, 0.16);
  transition: width 0.2s ease, height 0.2s ease;
}

.chew-simulator label,
.comment-card label {
  display: grid;
  gap: 10px;
  color: #17324a;
  font-weight: 900;
}

.lab-control-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 12px;
  color: #17324a;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 211, 92, 0.36), transparent 30%),
    #fffdf7;
}

.lab-control-title span {
  color: var(--science-teal);
  font-size: 13px;
  font-weight: 900;
}

.lab-control-title strong {
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  font-size: 13px;
  background: var(--science-blue);
}

.function-bank,
.organ-slots,
.myth-grid,
.life-grid {
  display: grid;
  gap: 10px;
}

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

.organ-slots {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.organ-slots button {
  min-height: 110px;
  text-align: center;
}

.function-bank button.matched,
.organ-slots button.correct,
.myth-grid button.correct,
.life-grid button.correct {
  color: #fff;
  background: var(--science-teal);
}

.organ-slots button.wrong,
.myth-grid button.wrong,
.life-grid button.wrong {
  color: #fff;
  background: var(--red);
}

.match-feedback {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.myth-grid,
.life-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.comment-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(31, 111, 159, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: #fffdf7;
}

.comment-card textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(23, 50, 74, 0.34);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  background: #fff;
}

.speak-card {
  align-content: start;
}

.speak-card > span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--science-blue);
}

.speak-card #speakSentence {
  margin: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  padding: 16px;
  color: #17324a;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.65;
  font-weight: 900;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 211, 92, 0.3), transparent 30%),
    #fffdf7;
  box-shadow: 4px 4px 0 rgba(23, 50, 74, 0.12);
}

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

.observation-note {
  border: 1px solid rgba(22, 128, 111, 0.34);
  border-radius: 8px;
  padding: 14px;
  color: #17324a;
  font-weight: 900;
  line-height: 1.7;
  background: rgba(236, 248, 244, 0.88);
}

.science-scroll {
  background:
    linear-gradient(135deg, rgba(237, 248, 251, 0.96), rgba(255, 253, 247, 0.96)),
    #fffdf7;
}

.scene-frame {
  min-width: 0;
  border: 2px solid #17324a;
  border-radius: 8px;
  overflow: hidden;
  background: #fffdf7;
  box-shadow: 0 12px 24px rgba(31, 111, 159, 0.12);
}

.scene-frame img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: block;
  object-fit: cover;
}

.scan-grid,
.food-grid,
.wash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.scan-grid button,
.food-grid button,
.wash-grid button {
  min-height: 54px;
  border: 1px solid #17324a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17324a;
  font-weight: 900;
  text-align: left;
  background: #fffdf7;
  cursor: pointer;
}

.scan-grid button.correct,
.food-grid button.correct,
.wash-grid button.correct {
  color: #fff;
  background: var(--science-teal);
}

.scan-grid button.wrong,
.food-grid button.wrong,
.wash-grid button.wrong {
  color: #fff;
  background: var(--red);
}

.wash-progress,
.route-case {
  margin-bottom: 14px;
  border: 1px solid rgba(31, 111, 159, 0.28);
  border-radius: 8px;
  padding: 14px;
  color: #17324a;
  line-height: 1.7;
  font-weight: 900;
  background: #edf8fb;
}

.exchange-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.exchange-board button {
  min-height: 58px;
  border: 1px solid #17324a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17324a;
  font-weight: 900;
  text-align: left;
  background: #fffdf7;
  cursor: pointer;
}

.exchange-board button.correct,
.breath-model.inhale {
  color: #fff;
  background: var(--science-teal);
}

.exchange-board button.wrong,
.breath-model.exhale {
  color: #fff;
  background: var(--science-blue);
}

.breath-model {
  min-height: 120px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(31, 111, 159, 0.28);
  border-radius: 8px;
  padding: 18px;
  color: #17324a;
  font-size: 24px;
  font-weight: 900;
  background: #edf8fb;
}

.level-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.level-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 111, 159, 0.28);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: #fffdf7;
  box-shadow: 0 10px 22px rgba(31, 111, 159, 0.08);
}

.level-card img {
  width: 100%;
  height: 160px;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

.level-card span,
.level-card h3,
.level-card p {
  margin-left: 12px;
  margin-right: 12px;
}

.level-card span {
  display: inline-flex;
  margin-top: 12px;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--science-blue);
}

.level-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.map-visual-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.secret-map-panel .map-visual-stack {
  position: relative;
}

.secret-map-panel .map-visual-stack::before {
  content: "点击正确器官门，饭团会沿路线前进";
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  border: 2px solid #17324a;
  border-radius: 999px;
  padding: 8px 12px;
  color: #17324a;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 4px 4px 0 rgba(23, 50, 74, 0.12);
}

.level-scene,
.lab-scene,
.match-explain img {
  width: 100%;
  display: block;
  border: 2px solid #17324a;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(31, 111, 159, 0.12);
}

.level-scene {
  height: clamp(230px, 28vw, 360px);
  object-position: 50% 50%;
}

.lab-scene {
  height: clamp(220px, 27vw, 330px);
  object-position: 50% 50%;
}

.lab-scene.comic-lab-scene {
  height: clamp(320px, 36vw, 500px);
  object-fit: cover;
  object-position: 50% 12%;
  background: #fff;
}

.match-explain {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid rgba(31, 111, 159, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: #fffdf7;
}

.match-explain span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--science-blue);
}

.match-explain strong {
  display: block;
  margin-bottom: 8px;
  color: #17324a;
  font-size: 20px;
}

.match-explain p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.match-explain img {
  height: 190px;
}

@media (max-width: 1040px) {
  .mission-brief-strip,
  .library-hero,
  .quest-dashboard,
  .science-flow-strip,
  .cast-layout,
  .discovery-sticker-panel,
  .portal-launch-grid,
  .home-proof,
  .path-steps {
    grid-template-columns: 1fr;
  }

  .science-map-preview,
  .comic-page-grid,
  .compact-comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

  .science-lesson-cover {
    grid-template-columns: 1fr;
    min-height: 680px;
    background-position: 58% 50%;
  }

  .sticker-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .body-stage,
  .organ-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .organ-slots,
  .myth-grid,
  .life-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .hero,
  .portal-hero,
  .home-hero,
  .home-path,
  .home-track,
  .home-growth,
  .comic-grid,
  .story-grid,
  .canal-layout,
  .sim-layout,
  .compare-layout,
  .quiz-layout,
  .material-layout,
  .report,
  .route-layout,
  .organ-layout,
  .habit-layout,
  .quest-layout,
  .secret-map-layout,
  .lab-layout,
  .match-layout,
  .comment-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .generated-poster-map {
    display: none;
  }

  .generated-poster .poster-overlay {
    bottom: 74px;
  }

  .generated-scene-card,
  .generated-scene-card.featured {
    grid-column: auto;
    min-height: 360px;
  }

  .generated-scene-card .scene-character,
  .generated-scene-card.featured .scene-character {
    left: 12px;
    right: auto;
    bottom: 12px;
    width: 86px;
    height: 118px;
  }

  .generated-scene-card:nth-child(even) .scene-character {
    left: auto;
    right: 12px;
  }

  .generated-scene-card .speech,
  .generated-scene-card:nth-child(even) .speech {
    left: 108px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    padding: 10px 12px;
    border-radius: 20px 18px 20px 8px;
  }

  .generated-scene-card:nth-child(even) .speech {
    left: 12px;
    right: 108px;
    border-radius: 18px 20px 8px 20px;
  }

  .generated-scene-card .speech::after {
    left: -8px;
    bottom: 16px;
    width: 15px;
    height: 15px;
  }

  .generated-scene-card:nth-child(even) .speech::after {
    left: auto;
    right: -8px;
  }

  .generated-scene-card .speech b {
    margin-bottom: 5px;
    font-size: 16px;
  }

  .generated-scene-card .speech p {
    font-size: 14px;
    line-height: 1.5;
  }

  .story-bridge {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
  }

  .story-bridge img {
    width: 76px;
    height: 98px;
  }

  .story-bridge div {
    padding: 9px 11px;
  }

  .story-bridge b {
    font-size: 16px;
  }

  .story-bridge p {
    font-size: 13px;
    line-height: 1.45;
  }

  .visual-route .team-grid,
  .visual-treasure .team-grid,
  .visual-court .team-grid,
  .visual-frontier .team-grid,
  .visual-confrontation .team-grid,
  .visual-imperial .team-grid,
  .visual-treasure .comic-grid,
  .visual-court .comic-grid,
  .visual-frontier .comic-grid,
  .visual-confrontation .comic-grid,
  .visual-imperial .comic-grid {
    grid-template-columns: 1fr;
  }

  .visual-route .role-card,
  .visual-treasure .role-card,
  .visual-court .role-card,
  .visual-frontier .role-card,
  .visual-confrontation .role-card,
  .visual-imperial .role-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .visual-route .role-card img,
  .visual-treasure .role-card img,
  .visual-court .role-card img,
  .visual-frontier .role-card img,
  .visual-confrontation .role-card img,
  .visual-imperial .role-card img {
    min-height: 168px;
  }

  .visual-treasure .generated-scene-card.featured,
  .visual-treasure .generated-scene-card:nth-child(5),
  .visual-court .generated-scene-card.featured,
  .visual-court .generated-scene-card:nth-child(5),
  .visual-frontier .generated-scene-card.featured,
  .visual-frontier .generated-scene-card:nth-child(4),
  .visual-frontier .generated-scene-card:nth-child(5),
  .visual-confrontation .generated-scene-card.featured,
  .visual-confrontation .generated-scene-card:nth-child(2),
  .visual-confrontation .generated-scene-card:nth-child(5),
  .visual-imperial .generated-scene-card.featured,
  .visual-imperial .generated-scene-card:nth-child(4),
  .visual-imperial .generated-scene-card:nth-child(5) {
    grid-column: auto;
  }

  .anime-poster,
  .comic-panel.large {
    min-height: 520px;
  }

  .comic-panel {
    min-height: 380px;
  }

  .portal-cover {
    min-height: 480px;
  }

  .home-hero {
    min-height: auto;
    padding-top: 26px;
  }

  .home-hero-visual {
    min-height: 620px;
  }

  .home-route-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-path .section-heading {
    margin-bottom: 18px;
  }

  .track-intro {
    position: relative;
    top: auto;
  }

  .home-track .course-grid,
  .home-track-science .science-map-preview {
    grid-column: auto;
  }

  .portal-map-stage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    padding: 24px;
  }

  .portal-map-stage::before,
  .portal-map-stage::after {
    display: none;
  }

  .portal-zone,
  .zone-science,
  .zone-auto {
    min-height: 136px;
    margin-top: 0;
    align-items: flex-start;
    text-align: left;
  }

  .portal-zone strong,
  .zone-auto strong {
    font-size: 48px;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .mission-brief-strip {
    margin-top: 18px;
  }

  .mission-tabs {
    grid-template-columns: repeat(9, minmax(72px, 1fr));
  }

  .science-flow-strip article {
    min-height: 94px;
  }

  .material-task > img {
    height: auto;
    max-height: 360px;
    aspect-ratio: 16 / 10;
  }

  .story-card.feature img {
    min-height: 520px;
  }

  .digest-map {
    min-height: 520px;
  }

  .organ-node {
    width: min(150px, 42vw);
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

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

  .site-meta {
    justify-content: flex-start;
  }

  .science-map-preview {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    font-size: 38px;
    line-height: 1.12;
  }

  .home-hero-visual {
    min-height: 660px;
  }

  .home-route-board {
    left: 16px;
    right: 16px;
    bottom: 156px;
    grid-template-columns: 1fr;
  }

  .route-pin {
    min-height: 76px;
  }

  .home-subject-strip {
    left: 16px;
    right: 16px;
    bottom: 104px;
  }

  .home-visual-images {
    left: 16px;
    right: 16px;
    justify-content: flex-end;
  }

  .comic-page-grid,
  .lesson-comic-grid,
  .compact-comic-grid {
    grid-template-columns: 1fr;
  }

  .cast-sheet img {
    min-height: 280px;
  }

  .experiment-steps,
  .avatar-row,
  .function-bank {
    grid-template-columns: 1fr;
  }

  .discovery-sticker-panel {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .discovery-sticker-panel strong {
    display: none;
  }

  .discovery-sticker-panel > div:first-child {
    line-height: 1;
  }

  .sticker-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    padding: 3px 2px 6px;
    scroll-snap-type: x proximity;
  }

  .sticker-board .sticker-card {
    min-height: 74px;
    grid-template-rows: 40px auto 13px;
    padding: 5px;
    scroll-snap-align: start;
  }

  .sticker-board .sticker-card::before {
    inset: -4px;
  }

  .sticker-art {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .sticker-name {
    font-size: 11px;
  }

  .sticker-state {
    padding: 1px 5px;
    font-size: 9px;
  }

  .map-chip {
    position: relative;
    inset: auto;
    display: inline-flex;
    width: fit-content;
    margin: 8px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.12;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .hero-actions a {
    width: 100%;
    min-height: 50px;
  }

  .anime-poster,
  .portal-cover,
  .comic-panel.large,
  .comic-panel {
    min-height: 420px;
  }

  .portal-command-map {
    min-height: 560px;
  }

  .portal-map-stage {
    padding: 18px;
  }

  .team-grid,
  .evidence-grid,
  .science-team,
  .choice-stage,
  .episode-steps,
  .track-grid,
  .science-evidence,
  .body-stage,
  .route-picks,
  .organ-board,
  .habit-board,
  .avatar-row,
  .function-bank,
  .organ-slots,
  .myth-grid,
  .life-grid,
  .scan-grid,
  .food-grid,
  .wash-grid,
  .exchange-board,
  .level-grid,
  .match-explain {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: auto;
  }

  .role-card img {
    height: 260px;
  }

  .segment-buttons {
    grid-template-columns: 1fr;
  }

  .timeline-buttons,
  .mirror-grid {
    grid-template-columns: 1fr;
  }

  .dialogue,
  .dialogue.tall {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .dialogue.tall img {
    width: 70px;
  }

  .story-card img,
  .story-card.feature img {
    min-height: 420px;
  }

  .digest-map {
    min-height: auto;
  }

  .level-scene,
  .lab-scene,
  .match-explain img,
  .level-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .phenomenon-card img.comic-page-preview,
  .life-scene-card img.comic-page-preview {
    aspect-ratio: 2 / 3;
    object-fit: contain;
  }

  .lab-scene.comic-lab-scene {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: 50% 12%;
  }

  .organ-node {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    transform: none;
    margin: 12px auto;
  }

  .organ-path {
    position: static;
    display: grid;
    gap: 10px;
    padding: 18px;
  }

  .digest-map::before,
  .rice-ball {
    display: none;
  }
}

.reference-shell {
  padding-bottom: 72px;
}

.reference-hero {
  max-width: 860px;
  padding: clamp(36px, 6vw, 74px) 0 24px;
}

.reference-hero h1 {
  max-width: 720px;
  margin-bottom: 16px;
  color: #0e332f;
  text-shadow: none;
}

.reference-hero p:last-child {
  max-width: 760px;
  color: #466761;
  font-size: 18px;
  line-height: 1.75;
}

.reference-grid {
  display: grid;
  gap: 24px;
}

.reference-grid article {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 247, 0.9);
}

.reference-grid span {
  color: #e95e49;
  font-size: 13px;
  font-weight: 950;
}

.reference-grid h2 {
  margin: 8px 0 10px;
  color: #0e332f;
  font-size: clamp(24px, 2.4vw, 34px);
  text-shadow: none;
}

.reference-grid p {
  color: #466761;
  line-height: 1.7;
}

.reference-grid img {
  width: 100%;
  display: block;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
}

@media (max-width: 860px) {
  .reference-grid article {
    grid-template-columns: 1fr;
  }
}

/* Homepage redesign: image-led brand surface with automation-safe course grids. */
body:has(.portal-shell) {
  background:
    linear-gradient(90deg, rgba(16, 71, 66, 0.06) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, #f7f8f2 0%, #f2f5ee 54%, #eaf2ed 100%);
}

.portal-shell {
  width: min(1320px, calc(100% - 32px));
  color: #123d39;
}

.portal-shell .site-header {
  position: sticky;
  z-index: 20;
  top: 12px;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 8px rgba(16, 71, 66, 0.05);
}

.portal-shell .site-brand {
  color: #0e332f;
  font-weight: 950;
  letter-spacing: 0;
}

.portal-shell .site-brand::before {
  border-color: #0e332f;
  border-radius: 8px;
  background:
    radial-gradient(circle at 64% 34%, #fffdf7 0 9%, transparent 10%),
    linear-gradient(135deg, #f2c75b 0 48%, #17947f 49% 100%);
  box-shadow: none;
}

.site-meta a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: #27514c;
  background: transparent;
}

.site-meta a:hover,
.site-meta a:focus-visible {
  border-color: rgba(16, 71, 66, 0.18);
  background: #eef6f0;
  outline: none;
}

.home-hero {
  min-height: min(720px, calc(100dvh - 98px));
  grid-template-columns: minmax(320px, 0.44fr) minmax(560px, 1fr);
  gap: clamp(24px, 4.2vw, 56px);
  padding: clamp(24px, 4vw, 48px) 0 32px;
}

.home-hero-copy {
  align-self: center;
  max-width: 590px;
  padding-bottom: 0;
}

.series-label,
.eyebrow {
  color: #146d62;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

.home-hero h1 {
  max-width: 450px;
  margin-bottom: 18px;
  color: #0e332f;
  font-size: clamp(42px, 4.6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: none;
  text-wrap: balance;
  word-break: keep-all;
}

.home-hero .hook {
  max-width: 560px;
  color: #355b56;
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.72;
  text-wrap: pretty;
}

.home-hero-actions {
  gap: 10px;
  margin-top: 26px;
}

.home-hero-actions a,
.track-link {
  min-height: 46px;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

.home-hero-actions a:active,
.track-link:active {
  transform: translateY(1px);
}

.home-hero-actions .primary-action {
  border-color: #f0644f;
  color: #fffdf7;
  background: #e95e49;
  box-shadow: none;
}

.home-hero-actions .secondary-action,
.track-link {
  border: 1px solid rgba(16, 71, 66, 0.24);
  color: #0e332f;
  background: #fffdf7;
}

.home-metrics {
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid rgba(16, 71, 66, 0.16);
  border-bottom: 1px solid rgba(16, 71, 66, 0.16);
}

.home-metrics span {
  min-width: 150px;
  border: 0;
  border-right: 1px solid rgba(16, 71, 66, 0.14);
  padding: 14px 18px 14px 0;
  color: #355b56;
}

.home-metrics span + span {
  padding-left: 18px;
}

.home-metrics span:last-child {
  border-right: 0;
}

.home-metrics strong {
  color: #e95e49;
  font-size: 30px;
}

.home-hero-visual {
  min-height: min(610px, calc(100dvh - 150px));
  border: 0;
  border-radius: 8px;
  background: #123d39;
  box-shadow: 0 8px 8px rgba(16, 71, 66, 0.08);
}

.home-hero-art {
  filter: saturate(0.92) contrast(1.04);
}

.home-hero-visual::after {
  background:
    linear-gradient(180deg, rgba(4, 24, 23, 0.02) 22%, rgba(4, 24, 23, 0.78) 100%),
    linear-gradient(90deg, rgba(4, 24, 23, 0.26), transparent 44%);
}

.home-visual-top {
  top: 20px;
  left: 20px;
  max-width: 300px;
  border: 0;
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 253, 247, 0.93);
  box-shadow: 0 8px 8px rgba(4, 24, 23, 0.08);
}

.home-visual-top span,
.home-proof span,
.path-steps span,
.track-link,
.home-subject-strip span {
  color: #146d62;
  letter-spacing: 0;
}

.home-visual-top strong {
  color: #0e332f;
  font-size: 20px;
}

.home-route-board {
  left: 20px;
  right: 20px;
  bottom: 72px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.18);
}

.route-pin {
  min-height: 98px;
  border: 0;
  border-radius: 0;
  padding: 14px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: none;
}

.route-pin span {
  color: #e95e49;
}

.route-pin strong {
  color: #0e332f;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.2;
}

.home-subject-strip {
  left: 20px;
  right: auto;
  bottom: 22px;
  max-width: calc(100% - 210px);
}

.home-subject-strip span {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 253, 247, 0.9);
}

.home-visual-images {
  right: 20px;
  bottom: 18px;
}

.home-visual-images img {
  width: 102px;
  height: 70px;
  border: 2px solid rgba(255, 253, 247, 0.92);
  border-radius: 8px;
  box-shadow: none;
}

.home-proof {
  gap: 0;
  border: 1px solid rgba(16, 71, 66, 0.16);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: none;
}

.home-proof div {
  min-height: 166px;
  border-right: 1px solid rgba(16, 71, 66, 0.14);
  padding: 24px;
  background: transparent;
}

.home-proof div:last-child {
  border-right: 0;
}

.home-proof strong {
  color: #0e332f;
  font-size: clamp(22px, 2.1vw, 30px);
}

.home-proof p,
.path-steps p,
.track-intro p,
.home-growth p,
.trust-list span {
  color: #466761;
  line-height: 1.7;
}

.home-path,
.home-track,
.home-growth {
  margin-top: 26px;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(255, 253, 247, 0.9);
  box-shadow: none;
}

.home-path {
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
}

.home-path .section-heading {
  position: sticky;
  top: 96px;
}

.home-path h2,
.track-intro h2,
.home-growth h2 {
  color: #0e332f;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  text-wrap: balance;
}

.path-steps {
  position: relative;
  grid-template-columns: 1fr;
  gap: 0;
  border-left: 2px solid rgba(20, 109, 98, 0.24);
}

.path-steps article {
  min-height: 128px;
  border: 0;
  border-radius: 0;
  padding: 0 0 26px 28px;
  background: transparent;
}

.path-steps article::before {
  content: "";
  position: absolute;
  left: -7px;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 999px;
  background: #e95e49;
  box-shadow: 0 0 0 6px #fffdf7;
}

.path-steps h3 {
  margin: 8px 0 6px;
  color: #0e332f;
  font-size: 25px;
}

.home-track {
  grid-template-columns: minmax(250px, 0.3fr) minmax(0, 1fr);
}

.track-intro {
  top: 96px;
}

.home-track .course-grid {
  gap: 10px;
}

.home-track .course-card {
  min-height: 220px;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf7;
  box-shadow: none;
}

.home-track .course-card:hover {
  border-color: rgba(233, 94, 73, 0.42);
  box-shadow: none;
  transform: translateY(-2px);
}

.course-card.live {
  border-color: rgba(20, 109, 98, 0.32);
  box-shadow: none;
}

.course-card span,
.track-grid span {
  color: #146d62;
  background: #eef6f0;
}

.home-track .course-card img,
.home-track .course-placeholder {
  height: 124px;
  border-color: rgba(16, 71, 66, 0.12);
  border-radius: 8px;
}

.course-placeholder {
  color: rgba(20, 109, 98, 0.42);
  background: linear-gradient(135deg, #f8f6ee, #eaf5ef);
}

.science-map-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.science-map-preview a {
  flex: 1 1 170px;
  border-color: rgba(20, 109, 98, 0.16);
  border-radius: 8px;
  background: #eef6f0;
  box-shadow: none;
}

.home-growth {
  grid-template-columns: minmax(310px, 0.42fr) minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(238, 246, 240, 0.94)),
    #fffdf7;
}

.growth-copy {
  display: grid;
  gap: 16px;
}

.trust-list {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(16, 71, 66, 0.14);
}

.trust-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(16, 71, 66, 0.14);
}

.trust-list strong {
  color: #0e332f;
}

.subject-queue {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(16, 71, 66, 0.14);
  border-radius: 8px;
  background: rgba(16, 71, 66, 0.14);
}

.home-growth .track-grid article {
  min-height: 172px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 253, 247, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-actions a,
  .track-link,
  .home-track .course-card {
    transition: none;
  }
}

@media (max-width: 1040px) {
  .home-hero,
  .home-path,
  .home-track,
  .home-growth {
    grid-template-columns: 1fr;
  }

  .home-hero-copy,
  .home-path .section-heading,
  .track-intro {
    position: relative;
    top: auto;
    max-width: 760px;
  }

  .home-hero-visual {
    min-height: 600px;
  }

  .home-proof,
  .subject-queue {
    grid-template-columns: 1fr;
  }

  .home-proof div {
    border-right: 0;
    border-bottom: 1px solid rgba(16, 71, 66, 0.14);
  }

  .home-proof div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 860px) {
  .portal-shell {
    width: min(100% - 24px, 1320px);
  }

  .home-hero {
    min-height: auto;
    padding-top: 22px;
  }

  .home-hero-copy {
    align-self: start;
    padding-bottom: 0;
  }

  .home-hero h1 {
    max-width: 680px;
    font-size: clamp(40px, 8vw, 58px);
  }

  .home-route-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-track .course-grid {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .portal-shell {
    width: min(100% - 20px, 1320px);
  }

  .portal-shell .site-header {
    top: 8px;
  }

  .home-hero h1,
  h1 {
    font-size: 38px;
    line-height: 1.12;
  }

  .home-hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .home-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-metrics span,
  .home-metrics span + span {
    border-right: 0;
    border-bottom: 1px solid rgba(16, 71, 66, 0.14);
    padding: 12px 0;
  }

  .home-metrics span:last-child {
    border-bottom: 0;
  }

  .home-hero-visual {
    min-height: 640px;
  }

  .home-route-board {
    left: 14px;
    right: 14px;
    bottom: 112px;
    grid-template-columns: 1fr;
  }

  .route-pin {
    min-height: 62px;
    gap: 8px;
  }

  .home-subject-strip {
    left: 14px;
    right: 14px;
    bottom: 60px;
    max-width: none;
  }

  .home-visual-images {
    display: none;
  }

  .home-path,
  .home-track,
  .home-growth {
    padding: 22px;
  }

  .home-track .course-grid,
  .science-map-preview,
  .subject-queue,
  .trust-list li {
    grid-template-columns: 1fr;
  }

  .science-lesson-cover {
    min-height: 690px;
    padding: 22px 16px;
    background:
      linear-gradient(180deg, rgba(9, 31, 49, 0.42) 0%, rgba(9, 31, 49, 0.62) 34%, rgba(9, 31, 49, 0.88) 100%),
      url("assets/science/grade3b/lesson1/hero-body-journey-cover-ai-v1.webp") 58% 50% / cover no-repeat;
  }

  .science-lesson-cover::before {
    inset: 10px;
  }

  .science-lesson-cover h1 {
    font-size: clamp(42px, 12vw, 54px);
    line-height: 1.08;
  }

  .science-lesson-cover .hook {
    font-size: 16px;
    line-height: 1.68;
  }

  .science-lesson-cover .riceball-sos {
    margin-top: 14px;
    padding: 12px;
  }

  .science-lesson-cover .science-party {
    gap: 7px;
    margin-top: 16px;
  }

  .science-lesson-cover .science-party span {
    padding: 7px 9px;
    font-size: 13px;
  }

  .cast-sheet img {
    aspect-ratio: 16 / 10;
  }

  .cast-callout {
    min-width: 82px;
    border-width: 1px;
    padding: 5px 7px;
    box-shadow: 3px 3px 0 rgba(23, 50, 74, 0.14);
  }

  .cast-callout b {
    font-size: 13px;
  }

  .cast-callout em {
    font-size: 10px;
  }

  .cast-xiaolan {
    left: 6%;
    bottom: 7%;
  }

  .cast-ache {
    left: 31%;
    bottom: 7%;
  }

  .cast-qingye {
    right: 20%;
    top: 22%;
  }

  .cast-zhiwan {
    right: 5%;
    bottom: 14%;
  }
}

@media (max-width: 680px) {
  .portal-v2 .home-hero-v2 h1 {
    max-width: 100%;
    font-size: clamp(36px, 9.4vw, 48px);
    line-height: 1.12;
    word-break: normal;
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }
}

/* Homepage v3: immersive anime learning mission hub. */
body:has(.portal-v3) {
  color: #eef8f3;
  background:
    linear-gradient(90deg, rgba(241, 199, 123, 0.08) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, #071216 0%, #0b2024 46%, #f2f6eb 46%, #eef4ed 100%);
}

.portal-v3 {
  width: min(1440px, calc(100% - 28px));
}

.portal-v3 .site-header {
  border-color: rgba(255, 248, 230, 0.18);
  background: rgba(8, 24, 29, 0.66);
  color: #f8f2dc;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.portal-v3 .site-brand,
.portal-v3 .site-meta a {
  color: #f8f2dc;
}

.home-hero-v3 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  min-height: min(840px, calc(100dvh - 90px));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 230, 0.16);
  border-radius: 8px;
  padding: clamp(26px, 5vw, 70px);
  background: #08191e;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.home-hero-v3::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 18, 22, 0.94) 0%, rgba(5, 18, 22, 0.8) 33%, rgba(5, 18, 22, 0.28) 61%, rgba(5, 18, 22, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 18, 22, 0.04) 0%, rgba(5, 18, 22, 0.38) 72%, rgba(5, 18, 22, 0.86) 100%);
  pointer-events: none;
}

.home-hero-v3::after {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 248, 230, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.home-hero-v3 .home-hero-copy {
  position: relative;
  z-index: 4;
  align-self: center;
  max-width: 650px;
  color: #f9f4df;
}

.home-hero-v3 .series-label {
  border-color: rgba(245, 192, 116, 0.34);
  color: #f5c074;
  background: rgba(7, 18, 22, 0.54);
  backdrop-filter: blur(14px);
}

.home-hero-v3 h1 {
  max-width: 640px;
  color: #fff9e8;
  font-size: clamp(46px, 6.1vw, 92px);
  line-height: 0.98;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.home-hero-v3 .hook {
  max-width: 620px;
  color: rgba(245, 250, 236, 0.86);
  font-size: clamp(17px, 1.35vw, 21px);
}

.home-hero-v3 .home-hero-actions {
  position: relative;
  z-index: 5;
}

.home-hero-v3 .primary-action {
  border-color: #ef745d;
  background: #ef745d;
  color: #fffaf0;
  box-shadow: 0 16px 34px rgba(239, 116, 93, 0.22);
}

.home-hero-v3 .secondary-action {
  border-color: rgba(255, 248, 230, 0.3);
  background: rgba(255, 248, 230, 0.1);
  color: #fff8e6;
  backdrop-filter: blur(14px);
}

.portal-v3 .home-metrics {
  max-width: 610px;
  border-color: rgba(255, 248, 230, 0.18);
  background: rgba(255, 248, 230, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.portal-v3 .home-metrics span {
  color: rgba(245, 250, 236, 0.78);
  background: rgba(7, 18, 22, 0.54);
}

.portal-v3 .home-metrics strong {
  color: #f5c074;
}

.home-hero-v3 .home-hero-visual {
  position: absolute;
  inset: 0;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}

.home-hero-v3 .home-hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  filter: saturate(1.08) contrast(1.04);
}

.home-hero-v3 .home-hero-visual::after {
  display: none;
}

.home-hero-v3 .home-visual-top {
  top: clamp(28px, 4vw, 58px);
  right: clamp(28px, 4vw, 58px);
  z-index: 4;
  max-width: 330px;
  border: 1px solid rgba(255, 248, 230, 0.2);
  background: rgba(7, 18, 22, 0.72);
  color: #f9f4df;
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.home-hero-v3 .home-visual-top span {
  color: #f5c074;
}

.home-hero-v3 .home-visual-top strong {
  color: #fff9e8;
}

.home-hero-v3 .home-route-board {
  left: auto;
  right: clamp(28px, 4vw, 58px);
  bottom: clamp(28px, 4vw, 58px);
  z-index: 4;
  width: min(620px, 46vw);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  pointer-events: auto;
}

.home-hero-v3 .route-pin {
  min-height: 106px;
  border: 1px solid rgba(255, 248, 230, 0.18);
  border-radius: 8px;
  padding: 14px 15px;
  background: rgba(7, 18, 22, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.home-hero-v3 .route-pin:hover {
  border-color: rgba(245, 192, 116, 0.58);
  transform: translateY(-2px);
}

.home-hero-v3 .route-pin span {
  color: #79d9c8;
}

.home-hero-v3 .route-pin strong {
  color: #fff8e6;
}

.home-hero-v3 .home-subject-strip {
  left: clamp(26px, 5vw, 70px);
  right: auto;
  bottom: clamp(24px, 3.8vw, 50px);
  z-index: 4;
  max-width: min(580px, 42vw);
  pointer-events: auto;
}

.home-hero-v3 .home-subject-strip span {
  border: 1px solid rgba(255, 248, 230, 0.18);
  color: #f8f2dc;
  background: rgba(7, 18, 22, 0.48);
  backdrop-filter: blur(14px);
}

.home-hero-v3 .home-visual-images {
  display: none;
}

.portal-v3 .home-proof {
  margin-top: 18px;
  border-color: rgba(11, 45, 48, 0.12);
  background: #fffaf0;
}

.portal-v3 .home-path,
.portal-v3 .home-track,
.portal-v3 .home-growth {
  border: 1px solid rgba(11, 45, 48, 0.1);
  background: rgba(255, 253, 247, 0.94);
}

@media (max-width: 1120px) {
  .home-hero-v3 {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 30px;
  }

  .home-hero-v3::before {
    background:
      linear-gradient(180deg, rgba(5, 18, 22, 0.82) 0%, rgba(5, 18, 22, 0.5) 48%, rgba(5, 18, 22, 0.9) 100%);
  }

  .home-hero-v3 .home-hero-copy {
    max-width: 760px;
    padding-bottom: clamp(270px, 42vw, 440px);
  }

  .home-hero-v3 .home-visual-top {
    max-width: 300px;
  }

  .home-hero-v3 .home-route-board {
    left: clamp(26px, 5vw, 70px);
    right: clamp(26px, 5vw, 70px);
    width: auto;
  }

  .home-hero-v3 .home-subject-strip {
    max-width: min(620px, calc(100% - 52px));
  }
}

@media (max-width: 680px) {
  .portal-v3 {
    width: min(100% - 18px, 1440px);
  }

  .portal-v3 .site-header {
    gap: 14px;
    padding: 14px;
  }

  .portal-v3 .site-brand {
    font-size: 23px;
  }

  .portal-v3 .site-brand::before {
    width: 42px;
    height: 42px;
  }

  .portal-v3 .site-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
  }

  .portal-v3 .site-meta a {
    font-size: 15px;
    line-height: 1.25;
  }

  .home-hero-v3 {
    margin-top: 12px;
    padding: 20px 16px 18px;
    border-radius: 8px;
  }

  .home-hero-v3::after {
    inset: 8px;
  }

  .home-hero-v3 .home-hero-art {
    object-position: 68% 50%;
  }

  .home-hero-v3 .home-hero-copy {
    padding-bottom: 520px;
  }

  .home-hero-v3 h1 {
    max-width: 100%;
    font-size: clamp(34px, 10.4vw, 46px);
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }

  .home-hero-v3 .hook {
    font-size: 15.5px;
    line-height: 1.68;
  }

  .home-hero-v3 .home-visual-top {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 386px;
    max-width: none;
    padding: 12px;
  }

  .home-hero-v3 .home-visual-top strong {
    font-size: 17px;
  }

  .home-hero-v3 .home-route-board {
    left: 16px;
    right: 16px;
    bottom: 96px;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .home-hero-v3 .route-pin {
    min-height: 58px;
    padding: 10px 12px;
  }

  .home-hero-v3 .route-pin strong {
    font-size: 16px;
  }

  .home-hero-v3 .home-subject-strip {
    left: 16px;
    right: 16px;
    bottom: 24px;
    max-width: none;
  }
}

/* Science lesson 2: germ-defense mission pass. */
.science-lesson2-shell {
  --defense-ink: #102f3d;
  --defense-blue: #1f74a6;
  --defense-teal: #139780;
  --defense-mint: #dff8ef;
  --defense-coral: #ec6d58;
  --defense-gold: #f0bd56;
}

.science-germ-cover {
  border-color: rgba(16, 47, 61, 0.72);
  background:
    linear-gradient(90deg, rgba(8, 32, 46, 0.88) 0%, rgba(8, 32, 46, 0.68) 44%, rgba(8, 32, 46, 0.16) 78%),
    linear-gradient(180deg, rgba(8, 32, 46, 0.04), rgba(8, 32, 46, 0.66)),
    url("assets/optimized/science/grade3b/lesson2/hero-germ-defense-hero.webp") center / cover no-repeat;
}

.science-germ-cover .hero-copy::before {
  content: "GERM DEFENSE QUEST";
  border-color: rgba(212, 255, 244, 0.52);
  color: #eafff9;
  background: rgba(16, 47, 61, 0.62);
}

.science-germ-cover .series-label {
  color: #bffcf0;
}

.science-germ-cover h1 {
  max-width: 690px;
}

.germ-alert {
  max-width: 620px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin: 20px 0 0;
  border: 1px solid rgba(217, 255, 245, 0.46);
  border-radius: 10px;
  padding: 13px 14px;
  color: #effffb;
  background: rgba(10, 37, 48, 0.58);
  backdrop-filter: blur(14px);
}

.germ-alert > span {
  align-self: start;
  border-radius: 999px;
  padding: 6px 10px;
  color: #102f3d;
  font-size: 13px;
  font-weight: 900;
  background: #f0bd56;
}

.germ-alert b,
.germ-alert p {
  margin: 0;
}

.germ-alert b {
  display: block;
  font-size: 18px;
  line-height: 1.32;
}

.germ-alert p {
  margin-top: 4px;
  color: rgba(239, 255, 251, 0.82);
  line-height: 1.55;
  font-weight: 800;
}

.science-defense-team span {
  border-color: rgba(212, 255, 244, 0.38);
  background: rgba(10, 37, 48, 0.46);
}

.science-defense-team span b {
  color: #f0bd56;
}

.defense-dashboard article {
  border-top-color: var(--defense-teal);
}

.defense-dashboard article:nth-child(2) {
  border-top-color: var(--defense-gold);
}

.defense-dashboard article:nth-child(3) {
  border-top-color: var(--defense-coral);
}

.defense-flow-strip article {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(223, 248, 239, 0.7)),
    #fffdf7;
}

.defense-sticker-panel {
  border-color: rgba(16, 47, 61, 0.22);
  background:
    radial-gradient(circle at 12% 18%, rgba(31, 116, 166, 0.12), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(240, 189, 86, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(226, 248, 242, 0.94));
  box-shadow: 0 20px 46px rgba(31, 116, 166, 0.12);
}

.defense-sticker-panel > div:first-child > span {
  color: var(--defense-teal);
}

.defense-sticker-panel strong {
  color: var(--defense-ink);
}

.defense-sticker-panel .sticker-card {
  border-color: rgba(16, 47, 61, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(240, 253, 249, 0.94)),
    #fffdf7;
}

.defense-sticker-panel .sticker-art {
  overflow: hidden;
  border-radius: 999px;
  background: #e8f8f1;
  box-shadow: inset 0 0 0 1px rgba(16, 47, 61, 0.08);
}

.defense-sticker-panel .sticker-card.earned {
  border-color: rgba(19, 151, 128, 0.55);
  background:
    radial-gradient(circle at 50% 14%, rgba(240, 189, 86, 0.2), transparent 34%),
    #fffdf7;
}

.science-lesson2-shell .level-panel {
  background:
    radial-gradient(circle at 10% 10%, rgba(31, 116, 166, 0.12), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(240, 189, 86, 0.18), transparent 24%),
    rgba(255, 253, 247, 0.94);
}

.science-lesson2-shell .level-card {
  overflow: hidden;
  border-color: rgba(16, 47, 61, 0.18);
  background: #fffdf7;
}

.science-lesson2-shell .level-card img {
  filter: saturate(1.04) contrast(1.02);
}

.science-lesson2-shell .level-card span {
  color: var(--defense-teal);
}

.science-lesson2-shell .level-card:hover {
  border-color: rgba(19, 151, 128, 0.46);
  transform: translateY(-2px);
}

.science-lesson2-shell .scene-frame {
  overflow: hidden;
  border: 2px solid rgba(16, 47, 61, 0.78);
  border-radius: 10px;
  background: #eaf8f6;
  box-shadow: 0 16px 34px rgba(31, 116, 166, 0.13);
}

.science-lesson2-shell .scene-frame img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
}

.science-lesson2-shell .mission-console {
  border-color: rgba(16, 47, 61, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(235, 250, 246, 0.9)),
    #fffdf7;
}

.science-lesson2-shell .scan-grid button,
.science-lesson2-shell .wash-grid button,
.science-lesson2-shell .food-grid button,
.science-lesson2-shell .reason-picks button,
.science-lesson2-shell .material-buttons button {
  border-color: rgba(16, 47, 61, 0.58);
  color: var(--defense-ink);
  background: #fffdf7;
}

.science-lesson2-shell .scan-grid button.correct,
.science-lesson2-shell .wash-grid button.correct,
.science-lesson2-shell .food-grid button.correct,
.science-lesson2-shell .reason-picks button.selected,
.science-lesson2-shell .material-buttons button.correct {
  color: #fff;
  background: var(--defense-teal);
}

.science-lesson2-shell .scan-grid button.wrong,
.science-lesson2-shell .wash-grid button.wrong,
.science-lesson2-shell .food-grid button.wrong,
.science-lesson2-shell .material-buttons button.wrong {
  color: #fff;
  background: var(--defense-coral);
}

.science-lesson2-shell .wash-progress,
.science-lesson2-shell .route-case {
  border: 1px solid rgba(31, 116, 166, 0.22);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--defense-ink);
  font-weight: 900;
  line-height: 1.6;
  background: rgba(223, 248, 239, 0.76);
}

.science-lesson2-shell .memory-card {
  background:
    radial-gradient(circle at 92% 10%, rgba(240, 189, 86, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(223, 248, 239, 0.94), rgba(255, 253, 247, 0.96));
}

@media (max-width: 860px) {
  .science-lesson2-shell .scene-frame img {
    min-height: 280px;
  }
}

@media (max-width: 620px) {
  .science-germ-cover {
    min-height: 720px;
    background:
      linear-gradient(180deg, rgba(8, 32, 46, 0.58) 0%, rgba(8, 32, 46, 0.68) 44%, rgba(8, 32, 46, 0.9) 100%),
      url("assets/optimized/science/grade3b/lesson2/hero-germ-defense-hero.webp") 54% 50% / cover no-repeat;
  }

  .germ-alert {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .science-lesson2-shell .scene-frame img {
    min-height: 230px;
  }
}
