:root {
  color-scheme: light;
  --paper: #f7f4e9;
  --ink: #292e25;
  --muted: #5c6152;
  --olive: #414c33;
  --gold: #755821;
  --rule: #c9c6b4;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", SimSun, Georgia, serif;
  --sans: system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden]:not(.preview-panel) { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
::selection { color: var(--ink); background: #eddbab; }

.wrap { width: min(1280px, calc(100% - clamp(36px, 8vw, 112px))); margin-inline: auto; }
.skip-link { position: absolute; z-index: 3; top: 14px; left: 14px; padding: 10px 14px; background: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: 18px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: 9px; font: 700 23px/1 var(--serif); white-space: nowrap; }
.brand img { border-radius: 9px; }
.mast nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); font-size: 15px; }
.mast nav a:hover, .foot a:hover { text-decoration: underline; text-underline-offset: .3em; }
.mast > .button { justify-self: end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--olive); border-radius: 8px; font-weight: 650; white-space: nowrap; }
.button-outline { color: var(--olive); font-size: 14px; min-height: 36px; padding-inline: 15px; }
.button-outline:hover { background: #eae9d9; }
.button-solid { color: #fffdf6; background: var(--olive); padding-inline: 22px; }
.button-solid:hover { background: #303926; }
.icon { width: 19px; height: 19px; }

.hero { min-height: 574px; display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(24px, 4vw, 61px); padding-block: 36px 42px; }
.hero-copy { padding-inline-start: clamp(0px, 2vw, 33px); }
.english-name { margin-bottom: 13px; font: italic 600 clamp(20px, 2.15vw, 30px)/1.15 Georgia, serif; color: var(--olive); }
.hero h1 { font: 700 clamp(56px, 6.8vw, 102px)/1.06 var(--serif); letter-spacing: .055em; }
.hero-line { margin-top: 18px; color: var(--gold); font: 700 clamp(23px, 2.5vw, 36px)/1.25 var(--serif); }
.hero-description { max-width: 27em; margin-top: 23px; color: var(--muted); font-size: clamp(16px, 1.32vw, 19px); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.text-link { padding-block: 9px; color: var(--olive); font-weight: 600; text-decoration: underline; text-underline-offset: .35em; text-decoration-color: #959b81; }
.text-link:hover { text-decoration-color: var(--olive); }
.platform { margin-top: 21px; color: var(--muted); font-size: 14px; }

.hero-art { position: relative; isolation: isolate; min-width: 0; }
.book-cover { position: absolute; z-index: -1; inset: 6% 0 5%; overflow: hidden; border-radius: 20px; background: linear-gradient(120deg, #d1d3be, #b8bea5); }
.book-cover::before { content: ""; position: absolute; inset: 0; background: url("./assets/rice-paper.webp") center / 420px auto; opacity: .27; mix-blend-mode: multiply; }
.book-cover::after { content: ""; position: absolute; inset: 23px; border: 1px solid #e9ead9; outline: 1px solid #e9ead9; outline-offset: 6px; border-radius: 11px; }
.hero-phones { display: flex; justify-content: center; align-items: center; gap: clamp(11px, 1.9vw, 29px); padding-inline: 23px; }
.phone { flex: 0 1 240px; min-width: 0; padding: 4px; border: 1px solid #656c58; border-radius: clamp(18px, 2.25vw, 32px); background: #30372c; box-shadow: 0 16px 28px #3037242e, inset 0 0 0 1px #141711; }
.phone img { width: 100%; border-radius: clamp(14px, 1.95vw, 27px); }
.phone-reading { position: relative; z-index: 1; }
.phone-bookshelf { flex-basis: 213px; transform: translateY(13px) rotate(3deg); }

.showcase { border-top: 1px solid var(--rule); padding: clamp(37px, 5.2vw, 74px) clamp(0px, 2vw, 33px); }
h2 { font: 700 clamp(33px, 4.05vw, 57px)/1.18 var(--serif); }
.showcase h2 { margin-bottom: 17px; }
.preview-tabs { display: flex; gap: clamp(5px, 1vw, 13px); max-width: 505px; border-bottom: 1px solid var(--rule); }
.preview-tabs button { display: block; min-height: 44px; padding: 8px clamp(10px, 1.35vw, 19px); border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; white-space: nowrap; color: var(--muted); }
.preview-tabs button:hover { color: var(--ink); background: #eeebde; }
.preview-tabs button[aria-selected="true"] { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.preview-panels { display: grid; margin-top: 22px; }
.preview-panel {
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.preview-panel[hidden] { visibility: hidden; }
.panel-copy h3 { margin-bottom: 12px; font: 700 clamp(25px, 2.6vw, 37px)/1.24 var(--serif); }
.panel-copy p { max-width: 28em; color: var(--muted); font-size: 17px; line-height: 1.8; }
.feature-points { list-style: none; margin: 23px 0 0; padding: 0; }
.feature-points li { display: grid; grid-template-columns: max-content 1fr; align-items: baseline; gap: 8px 15px; border-top: 1px solid var(--rule); padding-block: 12px; font-size: 15px; line-height: 1.5; }
.feature-points span { color: var(--muted); }
.panel-art { display: flex; align-items: flex-start; justify-content: center; gap: 12px; height: clamp(270px, 33vw, 380px); overflow: hidden; padding: 22px 16px 0; background: #ebe5d4; border: 1px solid #e3decd; border-radius: 15px; }
.panel-art img { width: 49%; border: 4px solid #3f4539; border-radius: 19px; box-shadow: 0 8px 17px #3a3a3029; }
.panel-art.panel-reading img { width: min(90%, 430px); }
.panel-pair img { width: min(44%, 220px); }
.panel-pair img + img { margin-top: 18px; }

.scene-link { display: inline-block; font-size: 15px; }
.story-section {
  border-top: 1px solid var(--rule);
  padding: clamp(37px, 5.2vw, 74px) clamp(0px, 2vw, 33px);
}
.story-heading > p {
  max-width: 35em;
  margin-top: 15px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.reading-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  margin-top: 28px;
  border: 1px solid var(--rule);
  border-radius: 15px;
  background: #efe9d7;
}
.reading-excerpt, .companion-card { padding: clamp(18px, 3vw, 38px); }
.excerpt-heading, .companion-heading, .note-paper figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.excerpt-heading strong, .note-paper figcaption strong { font: 700 22px/1.2 var(--serif); }
.excerpt-heading span, .companion-heading span, .note-paper figcaption span {
  color: var(--muted);
  font-size: 14px;
}
.reading-progress { margin: 19px 0 0; padding: 0; border: 0; }
.reading-progress legend { margin-bottom: 7px; padding: 0; color: var(--muted); font-size: 14px; }
.reading-progress label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: 0 7px 7px 0;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font-size: 14px;
}
.reading-progress label:hover { border-color: var(--olive); }
.reading-progress label:has(input:checked) { border-color: var(--olive); background: #e2e4d2; color: var(--olive); }
.reading-progress input { margin: 0; accent-color: var(--olive); }
.reading-excerpt blockquote { margin: 12px 0 0; font: 19px/1.85 var(--serif); }
.reading-excerpt blockquote p + p { margin-top: 9px; }
.story-section mark { padding-inline: .08em; color: inherit; background: #ebdbab; }
.companion-card {
  border-left: 1px solid var(--rule);
  border-radius: 0 14px 14px 0;
  background: #f3f3e8;
}
.companion-heading { gap: 9px; }
.companion-heading img { border-radius: 8px; }
.companion-heading span { margin-left: auto; }
.example-question { margin-block: 18px 16px; font: 700 clamp(21px, 2vw, 29px)/1.4 var(--serif); }
.example-answer { font-size: 16px; line-height: 1.75; }
.answer-quote {
  margin-top: 17px;
  padding: 10px 13px;
  border-left: 2px solid #8d946d;
  background: #e8eadb;
  color: var(--olive);
  font: 16px/1.6 var(--serif);
}
.answer-quote span { margin-right: 7px; font: 600 14px/1.5 var(--sans); }

.notes-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}
.notes-scene .story-heading { grid-column: 2; }
.note-paper {
  grid-area: 1 / 1;
  padding: clamp(21px, 3vw, 38px);
  border: 1px solid var(--rule);
  border-radius: 15px;
  background: linear-gradient(#f0e8d5f2, #f0e8d5f2), url("./assets/rice-paper.webp") center / 420px auto;
}
.note-paper figcaption { margin-bottom: 19px; padding-bottom: 13px; border-bottom: 1px solid var(--rule); }
.note-label { margin-bottom: 5px; color: var(--gold); font-size: 14px; font-weight: 650; }
.note-paper blockquote { margin: 0; font: 700 clamp(22px, 2.25vw, 33px)/1.6 var(--serif); }
.own-note { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--rule); }
.own-note p:last-child { font-size: 16px; line-height: 1.75; }

.questions { display: grid; grid-template-columns: .65fr 1.35fr; gap: 30px; padding: clamp(39px, 5vw, 72px) clamp(0px, 2vw, 33px); border-top: 1px solid var(--rule); }
.question-list { border-top: 1px solid var(--rule); }
.question-list details { border-bottom: 1px solid var(--rule); }
.question-list summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 57px; padding-block: 13px; line-height: 1.5; list-style: none; cursor: pointer; font-weight: 650; }
.question-list summary::-webkit-details-marker { display: none; }
.question-list summary::after { content: ""; flex: 0 0 8px; height: 8px; margin-inline-end: 5px; border: solid var(--olive); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.question-list details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.question-list p { max-width: 37em; margin: 0 22px 16px 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-block: 22px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.foot span { margin-inline-end: auto; color: var(--ink); font-weight: 650; }

@media (prefers-reduced-motion: no-preference) {
  .js-motion .reader-page .reveal { transition: transform .55s ease, opacity .55s ease; }
  .js-motion .reader-page .reveal:not(.is-visible) { opacity: 0; transform: translateY(13px); }
}

@media (max-width: 960px) {
  .hero { min-height: 480px; }
  .hero h1 { font-size: clamp(53px, 8vw, 76px); }
  .hero-actions { gap: 10px 15px; }
  .hero-phones { padding-inline: 15px; }
}

@media (max-width: 725px) {
  .mast { grid-template-columns: 1fr auto; gap: 0 14px; min-height: 62px; padding-top: 9px; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: clamp(16px, 6vw, 35px); }
  .mast nav a { padding-block: 11px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 34px; padding-block: 38px 38px; }
  .hero-copy { padding-inline-start: 0; }
  .hero-line { margin-top: 13px; }
  .hero-description { margin-top: 17px; }
  .hero-actions { margin-top: 19px; }
  .platform { margin-top: 13px; }
  .hero-art { width: min(100%, 495px); margin-inline: auto; }
  .hero-phones { padding-inline: clamp(13px, 6vw, 35px); }
  .phone { flex-basis: 192px; }
  .phone-bookshelf { flex-basis: 166px; }
  .preview-panel, .questions, .reading-demo, .notes-scene { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { align-items: start; }
  @supports (grid-template-rows: subgrid) {
    .preview-panels { grid-template-rows: auto auto; row-gap: clamp(24px, 5vw, 72px); }
    .preview-panel { grid-row: 1 / -1; grid-template-rows: subgrid; }
  }
  .companion-card { border-top: 1px solid var(--rule); border-left: 0; border-radius: 0 0 14px 14px; }
  .notes-scene .story-heading, .note-paper { grid-area: auto; }
  .notes-break { display: none; }
  .questions { gap: 22px; }
  .panel-art { padding-top: 16px; }
}

@media (max-width: 390px) {
  .brand { font-size: 21px; }
  .hero h1 { font-size: 49px; }
  .feature-points li { grid-template-columns: 1fr; gap: 3px; }
  .foot span { flex-basis: 100%; }
}
