:root {
  --ink: #1a1a1a;
  --light-ink: #5c5c5c;
  --paper: #f5f0e8;
  --paper-deep: #ebe1d0;
  --surface: #fffaf1;
  --cinnabar: #cc3333;
  --cinnabar-dark: #9e2424;
  --jade: #4a8c6f;
  --gold: #b8860b;
  --divider: #d4c9b0;
  --shadow: 0 18px 45px rgba(58, 39, 24, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "PingFang SC", "Microsoft YaHei", serif;
  color: var(--ink);
  background: var(--paper);
}

img {
  display: block;
  width: 100%;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(245, 240, 232, 0.86);
  border-bottom: 1px solid rgba(212, 201, 176, 0.72);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--cinnabar);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(204, 51, 51, 0.22);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 4px;
  color: var(--light-ink);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--light-ink);
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--cinnabar);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 120px clamp(20px, 7vw, 96px) 9vh;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(26, 26, 26, 0.72), rgba(26, 26, 26, 0.36) 44%, rgba(26, 26, 26, 0.08)),
    linear-gradient(0deg, rgba(245, 240, 232, 0.24), rgba(245, 240, 232, 0));
}

.hero-content {
  position: relative;
  width: min(680px, 100%);
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #f5d68b;
}

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

h1 {
  margin: 0;
  font-size: clamp(58px, 9vw, 118px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 580px;
  margin: 24px 0 0;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.2;
}

.button.primary {
  color: #fff;
  background: var(--cinnabar);
  box-shadow: 0 10px 22px rgba(204, 51, 51, 0.26);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
}

.button.ghost {
  color: var(--ink);
  border-color: var(--divider);
  background: var(--surface);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1120px, calc(100% - 40px));
  margin: -48px auto 0;
  position: relative;
  z-index: 5;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stats-band div {
  min-height: 116px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: var(--surface);
}

.stats-band strong {
  color: var(--cinnabar);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
}

.stats-band span {
  color: var(--light-ink);
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

.section.soft {
  width: 100%;
  padding-left: max(20px, calc((100% - 1120px) / 2));
  padding-right: max(20px, calc((100% - 1120px) / 2));
  background: var(--paper-deep);
}

.section-head {
  max-width: 760px;
  margin-bottom: 38px;
}

.section h2,
.download-band h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow),
.about p,
.download-band p {
  color: var(--light-ink);
  font-size: 18px;
  line-height: 1.9;
}

.app-showcase {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.phone-frame {
  padding: 14px;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 30px;
  background: #191614;
  box-shadow: var(--shadow);
}

.phone-frame h3,
.phone-frame p {
  color: #fff;
}

.phone-frame h3 {
  margin: 18px 4px 6px;
  font-size: 21px;
}

.phone-frame p {
  margin: 0 4px 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

.phone-frame-large {
  position: sticky;
  top: 100px;
}

.phone-screen {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  background: var(--paper);
}

.app-status,
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-weight: 800;
}

.app-status {
  height: 28px;
  padding: 0 18px;
  font-size: 12px;
}

.app-status span:last-child {
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.22);
}

.app-topbar {
  height: 44px;
  padding: 0 14px;
  background: var(--paper);
  border-bottom: 1px solid rgba(212, 201, 176, 0.72);
}

.app-topbar span {
  width: 22px;
  color: var(--cinnabar);
  font-size: 26px;
  line-height: 1;
}

.app-topbar strong {
  flex: 1;
  text-align: center;
  font-size: 14px;
}

.app-home-screen img {
  height: 34%;
  object-fit: cover;
}

.screen-copy {
  padding: 16px 20px 10px;
  text-align: center;
}

.screen-copy span,
.screen-copy small {
  display: block;
  color: var(--light-ink);
}

.screen-copy strong {
  display: block;
  margin: 0 0 4px;
  color: var(--cinnabar);
  font-size: 42px;
  line-height: 1.05;
}

.home-copy span {
  margin-top: 6px;
  font-size: 13px;
}

.progress-panel {
  display: grid;
  gap: 4px;
  margin: 0 18px 14px;
  padding: 14px 16px;
  border: 1px solid rgba(212, 201, 176, 0.86);
  border-radius: 12px;
  background: var(--surface);
}

.progress-panel span {
  color: var(--light-ink);
  font-size: 13px;
}

.progress-panel strong {
  color: var(--ink);
  font-size: 16px;
}

.app-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

.app-menu-grid span {
  display: grid;
  place-items: center;
  min-height: 66px;
  color: var(--ink);
  border: 1px solid rgba(212, 201, 176, 0.84);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 800;
}

.screen-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 18px;
}

.mini-phone {
  width: min(100%, 240px);
  padding: 10px;
  border-radius: 24px;
}

.mini-phone:nth-child(even) {
  margin-top: 42px;
}

.mini-phone:nth-child(odd) {
  margin-bottom: 42px;
}

.mini-phone .phone-screen {
  border-radius: 16px;
}

.app-card-screen img,
.app-reader-screen img,
.app-allusion-screen img {
  height: 34%;
  object-fit: cover;
}

.flashcard-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 4px;
  margin: 14px;
  min-height: 148px;
  padding: 16px 8px;
  text-align: center;
  border: 1px solid rgba(204, 51, 51, 0.25);
  border-radius: 18px;
  background: var(--surface);
}

.flashcard-panel small,
.sentence-list small,
.allusion-card small {
  display: block;
  color: var(--light-ink);
  font-size: 11px;
}

.flashcard-panel strong {
  display: block;
  color: var(--cinnabar);
  font-size: 28px;
  line-height: 1.2;
}

.reader-section {
  padding: 9px 14px 7px;
  color: var(--cinnabar);
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
  font-weight: 800;
}

.sentence-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.sentence-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.72);
}

.sentence-list li:first-child {
  background: rgba(74, 140, 111, 0.1);
}

.sentence-list span {
  grid-row: span 2;
  color: var(--light-ink);
  font-size: 11px;
}

.sentence-list strong {
  color: var(--ink);
  font-size: 17px;
}

.allusion-card {
  display: grid;
  gap: 6px;
  margin: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(204, 51, 51, 0.08);
}

.allusion-card strong {
  color: var(--cinnabar);
  font-size: 18px;
  line-height: 1.35;
}

.allusion-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.related-pill {
  width: fit-content;
  margin: 0 14px;
  padding: 7px 10px;
  color: var(--jade);
  border-radius: 999px;
  background: rgba(74, 140, 111, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.app-history-screen {
  padding-bottom: 14px;
}

.history-card {
  display: grid;
  gap: 6px;
  margin: 12px 14px 0;
  padding: 13px;
  border: 1px solid rgba(212, 201, 176, 0.84);
  border-radius: 12px;
  background: var(--surface);
}

.history-card strong {
  color: var(--cinnabar);
  font-size: 15px;
}

.history-card p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

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

.module-grid article,
.feature-list article,
.contact-grid a,
.contact-grid div {
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--surface);
}

.module-grid span {
  color: var(--jade);
  font-weight: 800;
}

h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.module-grid p,
.feature-list p {
  margin: 0;
  color: var(--light-ink);
  line-height: 1.8;
}

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

figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(212, 201, 176, 0.9);
  border-radius: 8px;
  background: var(--surface);
}

figure img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

figcaption {
  padding: 16px 18px 18px;
  color: var(--ink);
  font-weight: 700;
}

.download-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(1120px, calc(100% - 40px));
  margin: 20px auto;
  padding: 44px;
  color: var(--ink);
  border: 1px solid var(--divider);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(245, 240, 232, 0.92)),
    url("images/chapter-nature.png") center / cover;
  box-shadow: var(--shadow);
}

.download-band > div:first-child {
  max-width: 680px;
}

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-grid a:hover strong {
  color: var(--cinnabar);
}

.contact-grid span {
  display: block;
  color: var(--light-ink);
  margin-bottom: 10px;
}

.contact-grid strong {
  font-size: 20px;
  line-height: 1.5;
}

.site-footer {
  padding: 34px clamp(20px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.76);
  background: #201814;
}

.site-footer div,
.site-footer nav,
.site-footer p {
  width: min(1120px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: #fff;
  font-size: 20px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 22px;
  margin-bottom: 22px;
}

.site-footer a:hover {
  color: #fff;
}

.record {
  margin-top: 8px;
}

.legal-page {
  padding-top: 92px;
}

.legal-hero,
.legal-content {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-hero {
  padding: 72px 0 34px;
}

.legal-hero h1 {
  color: var(--cinnabar);
  font-size: clamp(42px, 8vw, 78px);
}

.legal-content {
  padding-bottom: 90px;
}

.legal-content section {
  padding: 24px 0;
  border-top: 1px solid var(--divider);
}

.legal-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.legal-content p,
.legal-content li {
  color: var(--light-ink);
  line-height: 1.9;
}

.legal-content ul {
  padding-left: 1.2em;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 71px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .hero {
    min-height: 88vh;
    padding-bottom: 70px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(26, 26, 26, 0.82), rgba(26, 26, 26, 0.12));
  }

  .stats-band,
  .module-grid,
  .feature-list,
  .content-showcase,
  .about,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .app-showcase {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .stats-band {
    margin-top: 0;
  }

  .phone-frame,
  .phone-frame-large {
    position: static;
    width: min(360px, 100%);
  }

  .screen-gallery {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .mini-phone,
  .mini-phone:nth-child(even),
  .mini-phone:nth-child(odd) {
    width: min(320px, 100%);
    margin-top: 0;
    margin-bottom: 0;
  }

  .download-band {
    display: block;
    padding: 28px;
  }
}

@media (max-width: 540px) {
  .brand small {
    display: none;
  }

  .hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-actions,
  .download-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 70px 0;
  }
}
