/* The four footer pages (用户协议, 隐私政策, 适龄提示, 家长监护): the landing's palette and footer,
   a dusk-sky header with the wooden sign, and one quiet reading column for long Chinese text.
   WenKai is the landing's subset, so it is used only for text that also appears on the landing
   (the page titles, the footer); everything else uses the system Chinese sans. */
@font-face { font-family: "WenKai"; src: url(/fonts/LXGWWenKai-Regular.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: "WenKai"; src: url(/fonts/LXGWWenKai-Medium.woff2) format("woff2"); font-weight: 500; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-Regular.woff2) format("woff2"); }

:root {
  --dusk-ink: #2b2238;
  --dusk: #4a3d78;
  --lavender: #8d7bbf;
  --apricot: #f4ad7f;
  --honey: #f8cf74;
  --cream: #fff7e8;
  --paper: #fbf3e2;
  --paper-line: rgba(140, 104, 52, .16);
  --wood: #7a3f1b;
  --wood-dark: #4a230d;
  --forest-ink: #18231b;
  --kai: "WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { background: var(--paper); color: var(--dusk-ink); font-family: var(--sans); font-size: 16px; line-height: 1.95;
  -webkit-font-smoothing: antialiased; }
a { color: var(--wood); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--wood); outline-offset: 3px; border-radius: 3px; }

/* header: the landing's sunset sky, the sign and the title */
.sky { background: linear-gradient(180deg, var(--dusk) 0%, #6b5797 34%, var(--lavender) 52%, var(--apricot) 84%, var(--honey) 100%);
  color: var(--cream); text-align: center; padding: 16px 24px 46px; }
.sky .bar { max-width: 980px; margin: 0 auto 30px; display: flex; justify-content: space-between; align-items: center; }
.sky .sign { display: block; width: 156px; aspect-ratio: 483 / 159; overflow: hidden;
  filter: drop-shadow(0 8px 10px rgba(43, 34, 56, .35)); }
.sky .sign img { display: block; width: 100%; }
.sky .play { color: var(--wood-dark); background: var(--honey); padding: 7px 20px; border-radius: 999px; text-decoration: none;
  font-size: 15px; font-weight: 600; box-shadow: 0 3px 0 rgba(74, 35, 13, .38); }
.sky .play:focus-visible { outline-color: var(--cream); }
.sky h1 { font-family: var(--kai); font-weight: 500; font-size: clamp(36px, 6.4vw, 56px); line-height: 1.2;
  letter-spacing: .32em; padding-left: .32em; text-shadow: 0 3px 16px rgba(43, 34, 56, .38); }
.sky .dates { margin-top: 12px; font-size: 14px; line-height: 1.7; color: rgba(255, 247, 232, .9); }
.sky .dates mark { color: var(--wood-dark); }

/* switch between the four documents */
.docs { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px 6px; padding: 10px 16px;
  background: var(--cream); border-bottom: 1px solid var(--paper-line); }
.docs a { padding: 6px 12px; font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; }
.docs a:hover { border-bottom-color: rgba(122, 63, 27, .35); }
.docs a[aria-current="page"] { color: var(--wood-dark); font-weight: 600; border-bottom-color: var(--wood); }

/* the reading column: about 40 Chinese characters a line */
.doc { max-width: 42em; margin: 0 auto; padding: 44px 24px 80px; text-align: justify; }
.doc .lead { font-size: 17px; }
.doc h2 { font-size: 19px; line-height: 1.5; color: var(--wood-dark); margin: 2.1em 0 .55em; text-align: left; }
.doc p, .doc li { margin: .5em 0; }
.doc ol, .doc ul { padding-left: 1.7em; }
.doc li::marker { color: var(--wood); }
.doc strong { color: var(--wood-dark); font-weight: 600; }
.doc .toc { margin: 32px 0 8px; padding: 18px 0 14px; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.doc .toc h2 { margin: 0 0 6px; font-size: 16px; }
.doc .toc ol { columns: 2; column-gap: 32px; list-style-type: cjk-ideographic; padding-left: 2.4em; }
.doc .toc li { margin: .15em 0; break-inside: avoid; }
.doc .contact { list-style: none; padding-left: 0; }
mark { background: rgba(248, 207, 116, .6); color: var(--wood-dark); padding: 0 .12em; border-radius: 2px; }

/* 适龄提示: the age badge */
.doc .rating { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
.doc .rating p { margin: 0; font-size: 17px; }
.doc .badge { flex: none; width: 96px; height: 96px; border-radius: 22px; display: grid; place-items: center;
  background: var(--dusk); color: var(--cream); font-family: var(--serif); font-size: 46px; line-height: 1;
  box-shadow: inset 0 0 0 4px rgba(255, 247, 232, .22); }

/* footer: identical to the landing */
footer { background: var(--forest-ink); color: rgba(255, 247, 232, .62); text-align: center; padding: 56px 24px 64px;
  font-size: 13px; line-height: 2; }
footer .advice-title { font-family: var(--kai); font-size: 16px; letter-spacing: .5em; color: rgba(255, 247, 232, .86); margin-bottom: 6px; }
footer .advice { font-family: var(--kai); font-size: 14px; letter-spacing: .14em; }
footer .rule { width: 72px; height: 1px; background: rgba(255, 247, 232, .22); margin: 26px auto; }
footer .links a { margin: 0 14px; color: rgba(255, 247, 232, .78); }
footer .legal { margin-top: 6px; font-size: 12px; color: rgba(255, 247, 232, .5); }
footer .legal span { margin: 0 10px; }
footer .legal a { margin: 0 10px; color: inherit; text-decoration: none; }
footer .legal a:hover, footer .legal a:focus-visible { text-decoration: underline; }

/* browsers without aspect-ratio (Safari before 15) */
@supports not (aspect-ratio: 1 / 1) {
  .sky .sign { height: 51px; }
}

@media (max-width: 760px) {
  .sky { padding: 12px 16px 34px; }
  .sky .bar { margin-bottom: 22px; }
  .sky .sign { width: 120px; }
  .sky .play { padding: 6px 16px; font-size: 14px; }
  .docs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .docs a { white-space: nowrap; }
  .doc { padding: 32px 16px 64px; text-align: left; }
  .doc .toc ol { columns: 1; }
  .doc .rating { gap: 16px; }
  .doc .badge { width: 76px; height: 76px; font-size: 36px; border-radius: 18px; }
  footer .advice { font-size: 13px; letter-spacing: .06em; }
  footer .advice span { display: block; }
  footer .advice br.d { display: none; }
  footer .links a { margin: 0 8px; }
  footer .legal span { display: block; margin: 0; }
  footer .legal a { display: block; margin: 0; }
}

@supports not (aspect-ratio: 1 / 1) {
  @media (max-width: 760px) {
    .sky .sign { height: 40px; }
  }
}
