:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffef9;
  --ink: #142e32;
  --teal: #12645c;
  --muted: #526360;
  --rule: #cdd6cd;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", "STSong", Georgia, serif;
  --sans: "Inter", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding: 1rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.7 var(--sans); overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #cd731f; outline-offset: 3px; }
button, a, summary { touch-action: manipulation; }
[hidden], .no-js .js-only, html:not(.no-js) .fallback-only { display: none !important; }
.frame { width: calc(100% - 2.5rem); max-width: 74rem; margin-inline: auto; }
.skip { position: absolute; top: -8rem; left: 1rem; padding: .7rem 1rem; background: var(--ink); color: white; z-index: 10; }
.skip:focus { top: .5rem; }
.mast { display: flex; align-items: center; justify-content: space-between; min-height: 5.3rem; gap: 1rem; }
.identity, .utility, .hero-actions, .dialog-actions, .footer nav { display: flex; align-items: center; }
.identity { gap: .9rem; white-space: nowrap; }
.brand, .footer-brand { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; }
.brand { font-size: 1.85rem; line-height: 1; }
.mast-divider { width: 1px; height: 1.35rem; background: #a2afaa; }
.series { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; letter-spacing: .1em; }
.utility { gap: 1.5rem; }
.utility a, .flat, .footer a { color: var(--muted); font-size: .89rem; }
.flat { border: 0; background: transparent; padding: .5rem 0; }
.utility a:hover, .flat:hover, .footer a:hover { color: var(--teal); text-decoration: underline; }
.cover { position: relative; isolation: isolate; overflow: hidden; background: #173a43; color: #fffdf3; }
.photo { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,rgba(9,35,39,.95) 0%,rgba(9,35,39,.82) 34%,rgba(9,35,39,.48) 56%,rgba(9,35,39,.06) 84%), url("./coast.webp") center 58% / cover; }
.cover-content { padding: clamp(2rem,5vw,4.6rem); min-height: 24rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.cover-meta { display: flex; align-items: center; gap: .6rem; color: #e1e9db; font-size: .85rem; letter-spacing: .09em; }
.cover-rule { height: 1px; background: #b7cabc; width: 1.3rem; }
.current-pill { border: 1px solid #afc0b4; border-radius: 2rem; padding: .07rem .5rem; font-size: .75rem; letter-spacing: .04em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); }
h1 { margin: 1.15rem 0 .95rem; font-size: clamp(2.3rem,4.4vw,4.35rem); line-height: 1.19; letter-spacing: -.045em; font-weight: 600; max-width: 12.5em; text-wrap: balance; }
.cover-content > p { max-width: 38em; font-size: 1rem; line-height: 1.8; color: #f3f4eb; }
.hero-actions, .dialog-actions { flex-wrap: wrap; gap: .65rem; }
.hero-actions { margin-top: 1.65rem; }
.button { min-height: 2.75rem; padding: .52rem 1.12rem; border-radius: .28rem; font-weight: 600; font-size: .93rem; line-height: 1.5; }
.ivory { background: #f7f5e8; border: 1px solid #f7f5e8; color: var(--ink); }
.ivory:hover { background: white; }
.glass { border: 1px solid #afc3bd; background: rgba(10,35,38,.42); color: #fff; }
.glass:hover { background: #1a4445; }
.issues { display: grid; grid-template-columns: repeat(4,1fr); border-block: 1px solid var(--rule); margin-top: 1rem; }
.issues a { padding: .9rem 1rem; display: grid; border-bottom: 3px solid transparent; color: var(--muted); line-height: 1.5; }
.issues a[aria-current="page"] { color: var(--teal); border-color: var(--teal); background: #e9eee5; }
.issues a:hover { background: #eff1e9; }
.issues a span { font-size: .75rem; letter-spacing: .07em; }
.issues a strong { font: 600 1.08rem/1.6 var(--serif); }
.reading-grid { display: grid; grid-template-columns: minmax(0,2.05fr) minmax(15rem,1fr); gap: clamp(2rem,6vw,5rem); padding: 3.7rem clamp(0rem,2.4vw,1.7rem) 4.3rem; }
#reading:focus { outline: none; }
.section-line { display: flex; gap: .8rem; align-items: center; color: var(--teal); }
.section-line span:first-child { font-size: .82rem; font-weight: 600; letter-spacing: .14em; }
.section-line span:last-child { height: 1px; background: var(--rule); flex: 1; }
.scene h2 { margin: .7rem 0 1rem; font-size: clamp(1.75rem,3vw,2.55rem); line-height: 1.4; }
.scene p, .turn-body > p, .aside-box p { line-height: 1.95; }
.scene p + p { margin-top: .8rem; }
blockquote { margin: 1.4rem 0 1.6rem; border-left: 3px solid var(--teal); padding: .25rem 0 .25rem 1rem; font: 600 1.16rem/1.8 var(--serif); color: #144c46; }
.note-heading, .dialog-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.note-heading h3, .turn-body h3 { font-size: 1.2rem; }
.note-meta { color: var(--muted); font-size: .78rem; }
.help, #note-policy, #save-status { font-size: .89rem; color: var(--muted); }
.help { margin-bottom: .6rem; }
textarea { display: block; background: var(--white); color: var(--ink); border: 1px solid #9daea4; border-radius: .22rem; width: 100%; resize: vertical; padding: .8rem .92rem; line-height: 1.75; min-height: 5rem; }
textarea::placeholder { color: #69796e; }
.turn { margin-top: 1.6rem; border-block: 1px solid #a9bcb3; }
.turn summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem .1rem; color: var(--ink); cursor: pointer; list-style: none; }
.turn summary::-webkit-details-marker { display: none; }
.turn summary > span { display: grid; gap: .1rem; }
.turn summary strong { font: 600 1.3rem/1.6 var(--serif); }
.turn summary small { color: var(--muted); font-size: .88rem; }
.disclosure { width: 1.75rem; height: 1.75rem; border: 1px solid #a7b9b1; border-radius: 50%; position: relative; flex-shrink: 0; }
.disclosure::before,.disclosure::after { content: ""; position: absolute; background: var(--teal); width: .66rem; height: 1px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.disclosure::after { transform: translate(-50%,-50%) rotate(90deg); }
.turn[open] .disclosure::after { display: none; }
.turn-body { padding: .3rem 0 1.2rem; }
.turn-body h3 { margin: .2rem 0; }
.turn-question { margin: .6rem 0 1.3rem; color: var(--teal); font-weight: 600; }
.save-area { margin-top: .8rem; display: flex; align-items: flex-start; gap: .7rem; justify-content: space-between; flex-wrap: wrap; }
#save-status { font-weight: 600; color: var(--teal); }
.text-link { display: inline-block; padding: .3rem 0; border: none; background: transparent; color: var(--teal); text-decoration: underline; text-underline-offset: .27em; font-size: .89rem; text-align: left; }
aside { display: grid; align-content: start; gap: 1rem; }
.aside-box { padding: 1.4rem 1.45rem; }
.partner { background: #e8eee5; }
.tomorrow { background: #f0ede2; }
.aside-box h2 { font-size: 1.42rem; margin: .9rem 0 .55rem; }
.aside-box p { color: #344b46; }
.aside-box button { margin-top: .8rem; }
.wall-link { padding: .45rem .15rem; font-size: .88rem; color: var(--muted); }
.wall-link a { color: var(--teal); text-decoration: underline; text-underline-offset: .2em; }
.footer { padding: 1.25rem 0 2.4rem; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { font-size: 1.35rem; }
.footer-brand small { font: 500 .84rem var(--sans); margin-left: .4rem; }
.footer nav { flex-wrap: wrap; gap: .8rem 1.4rem; }
.no-script { padding-block: 1rem; }
dialog { color: var(--ink); background: var(--white); border: 1px solid #a9b9af; border-radius: .5rem; width: min(29rem,calc(100vw - 2rem)); padding: 1.55rem; max-height: 85vh; overflow: auto; }
dialog::backdrop { background: rgba(9,32,32,.52); }
.dialog-top { margin-bottom: .55rem; }
.dialog-top h2 { font-size: 1.57rem; }
.close { border: 1px solid var(--rule); color: var(--ink); background: transparent; border-radius: 50%; font-size: 1.42rem; width: 2.45rem; height: 2.45rem; line-height: 1; flex-shrink: 0; }
dialog label { font-weight: 600; font-size: .9rem; }
.dialog-actions { margin-top: .95rem; }
.dark { color: white; background: var(--teal); border: 1px solid var(--teal); }
.outline { color: var(--teal); background: transparent; border: 1px solid #9eb4a8; }
#share-status:not(:empty) { margin-top: .55rem; }
.note-item { display: block; width: 100%; text-align: left; color: var(--ink); background: transparent; border: 0; border-top: 1px solid var(--rule); padding: .9rem 0; }
.note-item strong, .note-item small { display: block; }
.note-item strong { font: 600 1.06rem/1.7 var(--serif); }
.note-item small { font-size: .85rem; color: var(--muted); }
.blank-note { background: #edf0e8; padding: .8rem 1rem; }
@media (max-width: 55rem) {
  .reading-grid { gap: 1.4rem; grid-template-columns: minmax(0,1.75fr) minmax(12rem,1fr); padding-inline: 0; }
  .cover-content { min-height: 21rem; }
}
@media (max-width: 43rem) {
  .frame { width: calc(100% - 2rem); }
  .mast { min-height: 4.25rem; gap: .5rem; }
  .identity { gap: .55rem; }
  .brand { font-size: 1.6rem; }
  .series { font-size: .94rem; }
  .utility { gap: .8rem; }
  .utility a, .flat { font-size: .83rem; }
  .cover-content { min-height: 20rem; padding: 1.5rem 1.15rem; }
  .photo { background-position: 57% center; background-image: linear-gradient(90deg,rgba(8,32,35,.9),rgba(8,32,35,.63) 72%,rgba(8,32,35,.48)),url("./coast.webp"); }
  h1 { font-size: clamp(2em,8vw,3.2rem); }
  .cover-content > p { font-size: .96rem; }
  .hero-actions { margin-top: 1.15rem; }
  .issues { grid-template-columns: 1fr 1fr; margin-top: .75rem; }
  .issues a { padding: .55rem .7rem; }
  .issues a strong { font-size: 1rem; }
  .reading-grid { display: block; padding-block: 2.4rem; }
  aside { margin-top: 2rem; }
  .aside-box { padding: 1.1rem 1.2rem; }
  .footer { align-items: flex-start; }
}
@media (max-width: 22rem) {
  .frame { width: calc(100% - 1.25rem); }
  .utility { gap: .55rem; }
  .issues a { padding-inline: .45rem; }
}
@media print {
  .mast nav, .hero-actions, .issues, .footer, .save-area button, aside button, dialog, .skip, .note-section, .turn-body .note-heading, .turn-body .note-heading ~ *, .save-area { display: none !important; }
  .cover { background: transparent; color: black; }
  .photo { display: none; }
  .cover-content { min-height: 0; padding: 0; }
  .cover-meta, .cover-content > p { color: black; }
  .reading-grid { display: block; padding: 1rem 0; }
  aside { margin-top: 1rem; }
}
