:root {
  color-scheme: light;
  --mint-paper: #e8f5e9;
  --mint-soft: #f3fff6;
  --clover: #4caf50;
  --clover-deep: #1f7a3a;
  --soda: #00b0ff;
  --soda-deep: #087db2;
  --sun: #ffd54f;
  --sun-deep: #9a6a00;
  --peach: #ff8a80;
  --peach-deep: #c74348;
  --ink: #20313a;
  --muted: #5d6f78;
  --paper: #fffdf6;
  --white: #ffffff;
  --line: rgba(32, 49, 58, 0.14);
  --shadow: 0 18px 50px rgba(35, 80, 85, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
    linear-gradient(90deg, rgba(76, 175, 80, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(0, 176, 255, 0.07) 1px, transparent 1px),
    var(--mint-paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
}

p,
li,
dd {
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 253, 246, 0.88);
  border-bottom: 1px solid rgba(32, 49, 58, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  color: var(--clover-deep);
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(76, 175, 80, 0.28);
  border-radius: 12px 12px 16px 12px;
  background: linear-gradient(135deg, var(--sun), var(--mint-soft) 45%, var(--soda));
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(76, 175, 80, 0.18);
}

.brand-text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 750;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--ink);
  background: rgba(76, 175, 80, 0.12);
  outline: none;
}

.nav-detail {
  color: var(--peach-deep);
  margin-left: 4px;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-lines::before {
  transform: translateY(-7px);
}

.nav-toggle-lines::after {
  transform: translateY(5px);
}

.nav-open .nav-toggle-lines {
  transform: rotate(45deg);
}

.nav-open .nav-toggle-lines::before {
  opacity: 0;
}

.nav-open .nav-toggle-lines::after {
  transform: translateY(-2px) rotate(-90deg);
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: #dff9f1;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: rgba(232, 245, 233, 0.34);
  z-index: -2;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(23, 58, 46, 0.72), rgba(23, 58, 46, 0.35) 46%, rgba(255, 253, 246, 0.05)),
    linear-gradient(0deg, rgba(255, 253, 246, 0.95), rgba(255, 253, 246, 0.02) 36%);
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 213, 79, 0.92);
  color: #3f3a18;
  font-size: 0.9rem;
  font-weight: 850;
}

.hero h1 {
  margin: 18px 0 10px;
  color: var(--white);
  font-size: 4.35rem;
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 5px 24px rgba(0, 0, 0, 0.32);
}

.hero-subtitle {
  margin: 0 0 16px;
  color: #f3fff6;
  font-size: 1.28rem;
  font-weight: 850;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.hero-copy {
  max-width: 700px;
  margin: 0 0 26px;
  color: #f8fff9;
  font-size: 1.05rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.26);
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--peach), #ffb06c);
  color: #3d1d1f;
  box-shadow: 0 14px 28px rgba(255, 138, 128, 0.32);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--clover-deep);
  box-shadow: 0 10px 24px rgba(22, 72, 58, 0.12);
}

.btn-ghost {
  border: 1px solid rgba(76, 175, 80, 0.34);
  background: rgba(255, 255, 255, 0.78);
  color: var(--clover-deep);
}

.btn[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 44px;
}

.fact-chip {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.86);
  box-shadow: 0 12px 26px rgba(22, 72, 58, 0.1);
}

.fact-chip strong,
.mini-stat strong {
  display: block;
  color: var(--clover-deep);
  line-height: 1.2;
}

.fact-chip span,
.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding: 82px 0;
}

.section.alt {
  background: rgba(255, 253, 246, 0.68);
}

.section.tint {
  background:
    linear-gradient(135deg, rgba(0, 176, 255, 0.11), rgba(255, 213, 79, 0.16)),
    rgba(255, 253, 246, 0.72);
}

.section-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--peach-deep);
  font-size: 0.9rem;
  font-weight: 900;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.section-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 32px;
  align-items: center;
}

.prose p {
  margin: 0 0 14px;
}

.summary-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--clover);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.summary-box strong {
  color: var(--clover-deep);
}

.image-frame {
  position: relative;
  overflow: hidden;
  border: 10px solid var(--paper);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.image-frame.alt-tilt {
  transform: rotate(-1deg);
}

.image-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper);
}

.caption {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.facts-grid,
.card-grid,
.feature-grid,
.quick-grid,
.link-grid {
  display: grid;
  gap: 16px;
}

.facts-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
}

.info-card,
.system-card,
.feature-card,
.guide-card,
.index-card,
.faq-card,
.timeline-item,
.friend-link,
.profile-card,
.route-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(35, 80, 85, 0.08);
}

.info-card {
  min-height: 112px;
  padding: 16px;
}

.info-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.info-card strong {
  color: var(--ink);
  font-size: 1.03rem;
}

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

.system-card,
.feature-card,
.guide-card,
.index-card,
.faq-card,
.route-card,
.note-card {
  padding: 20px;
}

.system-card {
  min-height: 212px;
}

.card-number,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(0, 176, 255, 0.14);
  color: var(--soda-deep);
  font-weight: 950;
}

.system-card p,
.feature-card p,
.guide-card p,
.index-card p,
.faq-card p,
.route-card p,
.note-card p {
  margin: 0;
  color: var(--muted);
}

.character-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.profile-card {
  overflow: hidden;
  min-height: 100%;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:nth-child(1) {
  transform: rotate(-1.2deg);
}

.profile-card:nth-child(2) {
  transform: rotate(1.1deg);
}

.profile-card:nth-child(3) {
  transform: rotate(-0.6deg);
}

.profile-card:nth-child(4) {
  transform: rotate(0.8deg);
}

.profile-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: var(--shadow);
}

.profile-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper);
}

.profile-body {
  padding: 16px;
}

.profile-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-body dt {
  color: var(--clover-deep);
  font-weight: 800;
}

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

.feature-card {
  min-height: 154px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.step-item {
  position: relative;
  min-height: 80px;
  padding: 18px 18px 18px 62px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.step-item::before {
  position: absolute;
  left: 18px;
  top: 18px;
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sun);
  color: #4b3b09;
  font-weight: 950;
}

.step-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
}

.timeline-item time,
.timeline-item .time-label {
  color: var(--peach-deep);
  font-weight: 950;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.index-card {
  display: flex;
  flex-direction: column;
  min-height: 196px;
}

.index-card h3 {
  color: var(--clover-deep);
}

.index-card .text-link {
  margin-top: auto;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  color: var(--soda-deep);
  font-weight: 900;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--peach-deep);
  outline: none;
}

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

details.faq-card {
  padding: 0;
  overflow: hidden;
}

details.faq-card summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 900;
}

details.faq-card summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: rgba(255, 138, 128, 0.18);
  color: var(--peach-deep);
}

details.faq-card[open] summary::after {
  content: "-";
}

details.faq-card p {
  padding: 0 18px 18px;
}

.cta-band {
  padding: 40px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(0, 176, 255, 0.14) 50%, rgba(255, 213, 79, 0.28)),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(76, 175, 80, 0.22);
}

.cta-band h2,
.cta-band p {
  max-width: 780px;
}

.cta-band p {
  color: var(--muted);
}

.friend-links {
  padding: 28px;
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 255, 246, 0.86)),
    var(--paper);
  box-shadow: 0 12px 28px rgba(35, 80, 85, 0.08);
}

.friend-links h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.friend-links-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.link-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.friend-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 850;
}

.friend-link:hover,
.friend-link:focus-visible {
  border-color: rgba(0, 176, 255, 0.46);
  color: var(--soda-deep);
  outline: none;
}

.site-footer {
  padding: 36px 0;
  background: #19342c;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner strong {
  display: block;
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--sun);
  outline: none;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 54px;
  background:
    linear-gradient(135deg, rgba(76, 175, 80, 0.84), rgba(0, 176, 255, 0.72)),
    var(--clover);
  color: var(--white);
}

.page-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 12px;
  content: "";
  background: linear-gradient(90deg, var(--sun), var(--peach), var(--soda), var(--clover));
}

.page-hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: 3rem;
  line-height: 1.14;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
}

.breadcrumb a {
  font-weight: 850;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 850;
}

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

.content-layout > *,
.article-block {
  min-width: 0;
}

.aside-box {
  position: sticky;
  top: 92px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(35, 80, 85, 0.1);
}

.aside-box h2 {
  font-size: 1.22rem;
}

.aside-box ul {
  padding-left: 18px;
}

.article-block {
  margin-bottom: 36px;
}

.article-block h2 {
  margin-bottom: 14px;
}

.article-block p {
  margin: 0 0 14px;
}

.list-check {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.list-check li {
  position: relative;
  padding-left: 28px;
}

.list-check li::before {
  position: absolute;
  left: 0;
  top: 0.25em;
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clover), var(--soda));
}

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

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(76, 175, 80, 0.12);
  color: var(--clover-deep);
}

tr:last-child td {
  border-bottom: 0;
}

.soft-note {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 213, 79, 0.2);
  border: 1px solid rgba(255, 213, 79, 0.48);
  color: #51431c;
}

.not-found {
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: center;
  padding: 74px 0;
}

.not-found h1 {
  margin: 0 0 14px;
  font-size: 3.2rem;
}

@media (max-width: 1040px) {
  .hero-facts,
  .facts-grid,
  .character-wall,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .content-layout {
    grid-template-columns: 1fr;
  }

  .aside-box {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 64px;
    padding: 10px 20px;
  }

  .brand-text {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: 64px 14px auto;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 246, 0.98);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    justify-content: space-between;
    border-radius: var(--radius);
  }

  .hero {
    min-height: 86svh;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .section {
    padding: 58px 0;
  }

  .section-head,
  .footer-inner,
  .two-col,
  .guide-layout {
    display: block;
  }

  .image-frame {
    margin-top: 24px;
  }

  .page-hero h1 {
    font-size: 2.35rem;
  }
}

@media (max-width: 620px) {
  .section-inner,
  .hero-inner,
  .page-hero-inner,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .hero-inner {
    padding-top: 96px;
  }

  .hero-copy,
  .section-lead,
  .page-hero p {
    font-size: 0.98rem;
  }

  .hero-actions,
  .cta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .hero-actions a,
  .hero-actions button,
  .cta-row a,
  .cta-row button {
    width: 100%;
  }

  .hero-facts,
  .facts-grid,
  .card-grid,
  .feature-grid,
  .quick-grid,
  .character-wall,
  .link-grid,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cta-band {
    padding: 24px;
  }

  h2 {
    font-size: 1.72rem;
  }

  .profile-card,
  .profile-card:nth-child(1),
  .profile-card:nth-child(2),
  .profile-card:nth-child(3),
  .profile-card:nth-child(4) {
    transform: none;
  }

  .not-found h1 {
    font-size: 2.35rem;
  }
}

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

/* Summer journal / horizontal portal theme from 颜色要求.txt */
body {
  background:
    linear-gradient(rgba(255, 253, 246, 0.46), rgba(255, 253, 246, 0.46)),
    radial-gradient(circle at 18% 22%, rgba(255, 213, 79, 0.3) 0 9%, transparent 10%),
    linear-gradient(90deg, rgba(76, 175, 80, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(0, 176, 255, 0.08) 1px, transparent 1px),
    #e8f5e9;
  background-size: auto, 620px 620px, 30px 30px, 30px 30px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 64% 18%, rgba(0, 176, 255, 0.18), transparent 18%),
    radial-gradient(circle at 78% 72%, rgba(76, 175, 80, 0.18), transparent 22%);
  opacity: 0.92;
}

.site-header {
  background:
    linear-gradient(90deg, rgba(232, 245, 233, 0.94), rgba(255, 253, 246, 0.9) 64%, rgba(0, 176, 255, 0.16)),
    rgba(255, 253, 246, 0.94);
  box-shadow: 0 10px 30px rgba(31, 122, 58, 0.1);
}

.brand-mark {
  border-radius: 12px 12px 16px 12px;
  background:
    linear-gradient(135deg, #ffd54f 0 34%, #e8f5e9 35% 66%, #00b0ff 67%),
    #e8f5e9;
  transform: rotate(-4deg);
}

.brand-text,
h1,
h2,
h3 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.56);
}

.site-nav a {
  border: 1px solid transparent;
  background: rgba(232, 245, 233, 0.48);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  border-color: rgba(76, 175, 80, 0.28);
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.34), rgba(0, 176, 255, 0.12));
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff8a80, #ffd54f);
}

.btn-primary::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

.btn-primary:hover::after,
.btn-primary:focus-visible::after {
  transform: translateX(120%);
}

.btn-secondary,
.btn-ghost {
  border: 1px solid rgba(0, 176, 255, 0.26);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 245, 233, 0.9));
}

.section,
.page-hero {
  position: relative;
  background:
    linear-gradient(rgba(255, 253, 246, 0.72), rgba(255, 253, 246, 0.72)),
    linear-gradient(90deg, rgba(76, 175, 80, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(0, 176, 255, 0.07) 1px, transparent 1px),
    #e8f5e9;
  background-size: auto, 30px 30px, 30px 30px, auto;
}

.section.alt {
  background:
    linear-gradient(135deg, rgba(232, 245, 233, 0.94), rgba(255, 213, 79, 0.22)),
    #e8f5e9;
}

.section.tint {
  background:
    linear-gradient(135deg, rgba(0, 176, 255, 0.2), rgba(232, 245, 233, 0.88) 54%, rgba(255, 213, 79, 0.26)),
    #e8f5e9;
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(76, 175, 80, 0.92), rgba(0, 176, 255, 0.78) 58%, rgba(255, 213, 79, 0.76)),
    #4caf50;
}

.section-inner,
.page-hero-inner,
.hero-inner {
  position: relative;
}

.section-inner::before,
.page-hero-inner::before {
  position: absolute;
  left: -18px;
  top: -18px;
  z-index: -1;
  width: 86px;
  height: 32px;
  content: "";
  border: 1px solid rgba(255, 213, 79, 0.5);
  border-radius: 3px;
  background: rgba(255, 213, 79, 0.54);
  transform: rotate(-5deg);
  box-shadow: 0 8px 18px rgba(154, 106, 0, 0.1);
}

.info-card,
.system-card,
.feature-card,
.guide-card,
.index-card,
.faq-card,
.timeline-item,
.friend-link,
.profile-card,
.route-card,
.note-card,
.summary-box,
.aside-box {
  border-color: rgba(76, 175, 80, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 255, 246, 0.86)),
    #fffdf6;
}

.card-number,
.tag {
  border: 1px solid rgba(0, 176, 255, 0.24);
  background: linear-gradient(135deg, rgba(0, 176, 255, 0.2), rgba(255, 213, 79, 0.28));
}

body[data-page="home"] .hero {
  align-items: center;
  min-height: calc(100svh - 72px);
}

body[data-page="home"] .hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at 18% 16%, rgba(255, 255, 255, 0.88) 0 8%, transparent 9%),
    radial-gradient(ellipse at 31% 12%, rgba(255, 255, 255, 0.76) 0 6%, transparent 7%),
    linear-gradient(0deg, rgba(76, 175, 80, 0.72), transparent 18%);
  transform: translate3d(var(--cloud-x, 0), var(--cloud-y, 0), 0);
  transition: transform 0.18s ease-out;
}

body[data-page="home"] .hero::after {
  background:
    linear-gradient(180deg, rgba(0, 176, 255, 0.24), rgba(232, 245, 233, 0.14) 42%, rgba(31, 122, 58, 0.58)),
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.18), transparent 38%);
}

body[data-page="home"] .hero-inner {
  max-width: 880px;
  margin: auto;
  padding: 78px 24px 42px;
  text-align: center;
}

body[data-page="home"] .hero h1 {
  display: inline-block;
  padding: 14px 30px 18px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px 18px 24px 18px;
  background:
    linear-gradient(135deg, rgba(232, 245, 233, 0.62), rgba(0, 176, 255, 0.3)),
    rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 24px 60px rgba(7, 73, 64, 0.28);
  backdrop-filter: blur(12px);
}

body[data-page="home"] .hero-copy {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

body[data-page="home"] .hero-actions,
body[data-page="home"] .hero-facts {
  justify-content: center;
}

.image-frame,
.profile-card {
  border-width: 14px 14px 38px;
  border-color: #fffdf6;
  border-style: solid;
}

.image-frame::before,
.profile-card::before {
  position: absolute;
  left: 50%;
  top: -14px;
  z-index: 2;
  width: 78px;
  height: 24px;
  content: "";
  border: 1px solid rgba(0, 176, 255, 0.2);
  border-radius: 2px;
  background: rgba(232, 245, 233, 0.72);
  transform: translateX(-50%) rotate(-3deg);
}

.profile-card {
  position: relative;
  cursor: pointer;
  perspective: 900px;
}

.profile-card::after {
  position: absolute;
  right: 14px;
  bottom: 8px;
  content: "点击翻面";
  color: rgba(199, 67, 72, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-card.is-flipped img {
  filter: saturate(0.72) opacity(0.16);
}

.profile-card.is-flipped .profile-body {
  position: absolute;
  inset: 16px;
  display: grid;
  align-content: center;
  border: 1px dashed rgba(76, 175, 80, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 253, 246, 0.92), rgba(255, 253, 246, 0.92)),
    linear-gradient(90deg, rgba(0, 176, 255, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(76, 175, 80, 0.09) 1px, transparent 1px);
  background-size: auto, 18px 18px, 18px 18px;
  transform: rotateY(360deg);
}

.gacha-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
}

.gacha-machine,
.gacha-panel {
  margin: 0;
  border: 1px solid rgba(76, 175, 80, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 213, 79, 0.34), rgba(0, 176, 255, 0.18)),
    rgba(255, 253, 246, 0.9);
  box-shadow: var(--shadow);
}

.gacha-machine {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 56px;
}

.gacha-machine::before {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 138px;
  height: 32px;
  content: "";
  border: 4px solid #4caf50;
  border-radius: 999px;
  background: #ffd54f;
  transform: translateX(-50%);
}

.gacha-machine::after {
  position: absolute;
  right: 24px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  content: "";
  border: 5px solid rgba(32, 49, 58, 0.22);
  border-radius: 50%;
  background: #ff8a80;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.54);
}

.gacha-machine img {
  width: 100%;
  height: auto;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--paper);
}

.gacha-machine figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 178px);
  color: var(--clover-deep);
  font-weight: 900;
}

.gacha-panel {
  position: relative;
  padding: 24px;
}

.gacha-panel::after {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.95) 0 16%, transparent 17%),
    linear-gradient(135deg, #00b0ff 0 50%, #ffd54f 51%);
  box-shadow: 0 12px 24px rgba(0, 176, 255, 0.2);
}

.feature-card.is-highlighted {
  border-color: rgba(255, 138, 128, 0.62);
  box-shadow: 0 22px 46px rgba(255, 138, 128, 0.2);
  transform: translateY(-4px) rotate(-0.5deg);
}

.lucky-grass {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-color: rgba(76, 175, 80, 0.36);
  background:
    linear-gradient(180deg, rgba(232, 245, 233, 0.62), rgba(76, 175, 80, 0.24)),
    repeating-linear-gradient(102deg, rgba(76, 175, 80, 0.24) 0 10px, rgba(31, 122, 58, 0.28) 11px 18px, transparent 19px 30px),
    #e8f5e9;
}

.lucky-grass::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at var(--grass-x, 50%) var(--grass-y, 50%), rgba(255, 213, 79, 0.9) 0 0.8%, rgba(255, 213, 79, 0.28) 1% 7%, transparent 8%),
    linear-gradient(90deg, rgba(31, 122, 58, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(31, 122, 58, 0.2) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  mix-blend-mode: multiply;
}

.lucky-grass > * {
  position: relative;
  z-index: 1;
}

.lucky-grass .btn-primary {
  box-shadow: 0 0 0 8px rgba(255, 213, 79, 0.24), 0 22px 44px rgba(199, 67, 72, 0.26);
}

.archive-links-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 24px;
  align-items: stretch;
}

.archive-links-layout .lucky-grass,
.archive-links-layout .friend-links {
  min-height: 360px;
}

.archive-links-layout .link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.archive-links-layout .friend-link:last-child {
  grid-column: 1 / -1;
}

@media (min-width: 861px) {
  body[data-page="home"] main {
    display: flex;
    height: calc(100svh - 72px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-color: #4caf50 rgba(232, 245, 233, 0.9);
    scrollbar-width: thin;
  }

  body[data-page="home"] main > section {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body:not([data-page="home"]):not([data-page="404"]) main {
    display: block;
    height: auto;
    overflow-x: visible;
    overflow-y: visible;
  }

  body:not([data-page="home"]):not([data-page="404"]) main > section {
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-page="home"] .section {
    display: grid;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  body[data-page="home"] .section::after {
    position: absolute;
    inset: auto 24px 18px auto;
    content: "横向长卷";
    color: rgba(31, 122, 58, 0.46);
    font-size: 0.82rem;
    font-weight: 900;
    pointer-events: none;
  }

  body[data-page="home"] .section-inner {
    max-height: calc(100svh - 140px);
    overflow-y: auto;
    padding: 12px 0 22px;
  }

  body:not([data-page="home"]):not([data-page="404"]) .page-hero,
  body:not([data-page="home"]):not([data-page="404"]) .section {
    display: block;
  }

  body:not([data-page="home"]):not([data-page="404"]) .page-hero {
    padding: 56px 0 36px;
  }

  body:not([data-page="home"]):not([data-page="404"]) .page-hero h1 {
    font-size: 2.55rem;
  }

  body:not([data-page="home"]):not([data-page="404"]) .section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  body:not([data-page="home"]):not([data-page="404"]) .section-inner {
    max-height: none;
    overflow-y: visible;
  }

  body:not([data-page="home"]):not([data-page="404"]) .content-layout {
    max-height: none;
    overflow-y: visible;
    padding: 10px 0 28px;
  }
}

@media (max-width: 1040px) and (min-width: 861px) {
  .site-header {
    gap: 12px;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav a {
    padding-left: 9px;
    padding-right: 9px;
    font-size: 0.9rem;
  }

  body[data-page="home"] .hero h1 {
    font-size: 3.65rem;
  }
}

@media (max-width: 860px) {
  body {
    background-size: auto, 420px 420px, 24px 24px, 24px 24px, auto;
  }

  body[data-page="home"] .hero-inner {
    text-align: left;
  }

  body[data-page="home"] .hero h1 {
    font-size: 2.55rem;
    border-radius: 14px;
  }

  .gacha-stage {
    grid-template-columns: 1fr;
  }

  .archive-links-layout {
    grid-template-columns: 1fr;
  }

  .archive-links-layout .lucky-grass,
  .archive-links-layout .friend-links {
    min-height: 0;
  }

  .gacha-machine figcaption {
    max-width: calc(100% - 142px);
    font-size: 0.86rem;
  }

  .lucky-grass {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary::after,
  .profile-card,
  .hero-media,
  body[data-page="home"] .hero::before {
    transition: none !important;
  }
}
