:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #10161d;
  --panel-2: #141c25;
  --panel-3: #19232d;
  --text: #edf4f7;
  --muted: #92a1ad;
  --dim: #53616d;
  --line: rgba(162, 190, 205, .15);
  --accent: #88e6ff;
  --accent-2: #b7a6ff;
  --warm: #f1d6a2;
  --shadow: 0 28px 80px rgba(0,0,0,.35);
  --sans: "Aptos", "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
  --display: "Aptos Display", "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.7; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.app-noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E"); z-index: 10; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 89%, transparent); backdrop-filter: blur(20px); }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.brand strong { display: block; font-family: var(--display); font-size: 15px; letter-spacing: .08em; }
.brand small { display: block; color: var(--dim); font-size: 8px; letter-spacing: .22em; margin-top: 2px; }
.brand-mark { width: 24px; height: 26px; display: inline-flex; align-items: end; gap: 3px; }
.brand-mark span { width: 5px; background: var(--accent); border-radius: 4px 4px 1px 1px; box-shadow: 0 0 14px rgba(136,230,255,.35); }
.brand-mark span:nth-child(1) { height: 12px; opacity: .42; }.brand-mark span:nth-child(2) { height: 22px; }.brand-mark span:nth-child(3) { height: 16px; opacity: .7; }
.topbar-actions { display: flex; gap: 20px; align-items: center; }.sync-status { color: var(--muted); font-size: 11px; letter-spacing: .08em; }.sync-status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 99px; background: #81dfb0; box-shadow: 0 0 10px #81dfb0; }.icon-button { width: 34px; height: 34px; background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--accent); }
.shell { width: min(1240px, 90vw); margin: 0 auto; }.shelf-view { padding: 7.5vw 0 5vw; }.hero-grid { min-height: 480px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: center; gap: 8vw; }.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .24em; margin: 0 0 22px; font-weight: 650; }.hero-copy h1 { max-width: 680px; margin: 0; font-family: var(--display); font-size: clamp(42px, 6vw, 82px); line-height: .98; letter-spacing: -.06em; font-weight: 450; }.hero-copy h1 em { display: block; color: var(--muted); font-style: normal; }.hero-lede { max-width: 570px; color: var(--muted); font-size: 15px; line-height: 1.9; margin: 31px 0 34px; }.hero-actions { display: flex; align-items: center; gap: 20px; }.primary-button { border: 0; border-radius: 8px; padding: 13px 17px 13px 20px; background: var(--accent); color: #071117; font-weight: 700; cursor: pointer; box-shadow: 0 8px 26px rgba(136,230,255,.16); transition: transform .2s, box-shadow .2s; }.primary-button span { margin-left: 16px; font-size: 18px; }.primary-button:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(136,230,255,.25); }.micro-note { color: var(--dim); font-size: 10px; letter-spacing: .05em; }
.hero-signal { position: relative; min-height: 360px; border-left: 1px solid var(--line); display: grid; align-content: center; padding-left: clamp(35px, 8vw, 120px); overflow: hidden; }.hero-signal::before { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(136,230,255,.15); border-radius: 50%; left: 10%; top: 50%; transform: translateY(-50%); box-shadow: 0 0 80px rgba(136,230,255,.07), inset 0 0 50px rgba(136,230,255,.03); }.signal-orbit { position: relative; z-index: 1; width: 195px; height: 195px; border: 1px solid rgba(136,230,255,.3); border-radius: 50%; display: grid; place-items: center; margin-bottom: 24px; }.signal-orbit::after { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(183,166,255,.25); border-radius: inherit; animation: orbit 18s linear infinite; }.orbit-core { font-family: var(--display); font-size: 60px; letter-spacing: -.08em; color: var(--accent); }.orbit-label { position: absolute; top: 48px; right: -76px; color: var(--muted); font-size: 9px; line-height: 1.5; letter-spacing: .14em; }.signal-lines { display: flex; gap: 4px; margin-left: 52px; height: 38px; align-items: end; }.signal-lines span { display: block; width: 2px; background: var(--accent); opacity: .5; }.signal-lines span:nth-child(1) { height: 18px; }.signal-lines span:nth-child(2) { height: 32px; }.signal-lines span:nth-child(3) { height: 23px; opacity: .25; }.hero-metric { display: flex; align-items: baseline; gap: 12px; margin: 13px 0 0 47px; }.hero-metric strong { font-size: 26px; font-weight: 500; }.hero-metric span { font-size: 9px; line-height: 1.5; letter-spacing: .15em; color: var(--dim); }
.section-heading { display: flex; align-items: end; gap: 20px; margin: 74px 0 28px; }.section-heading .eyebrow { margin: 0 0 10px; }.section-heading h2 { font-family: var(--display); font-size: 25px; font-weight: 500; margin: 0; letter-spacing: -.04em; }.section-rule { height: 1px; background: var(--line); flex: 1; margin-bottom: 6px; }.section-meta { color: var(--dim); font-size: 9px; letter-spacing: .15em; margin-bottom: 3px; white-space: nowrap; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 17px; }.book-card { position: relative; min-height: 330px; padding: 25px; display: flex; flex-direction: column; background: linear-gradient(145deg, color-mix(in srgb, var(--panel-2) 94%, var(--accent) 6%), var(--panel)); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; }.book-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .62; }.book-card:hover { transform: translateY(-5px); border-color: rgba(136,230,255,.42); box-shadow: var(--shadow); }.book-topline { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-size: 9px; letter-spacing: .14em; }.book-index { color: var(--accent); }.book-card h3 { max-width: 290px; margin: 58px 0 7px; font-family: var(--display); font-weight: 500; font-size: 29px; line-height: 1.1; letter-spacing: -.045em; }.book-subtitle { margin: 0; color: var(--muted); font-size: 12px; }.book-description { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 20px 0 0; max-width: 360px; }.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }.tag { padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; }.book-bottom { display: flex; align-items: center; gap: 15px; margin-top: 19px; }.progress-track { flex: 1; height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; }.progress-track span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }.progress-label { color: var(--dim); font-size: 10px; min-width: 42px; text-align: right; }.book-open { display: block; width: fit-content; margin-top: 15px; color: var(--accent); font-size: 11px; text-decoration: none; letter-spacing: .08em; }.book-open span { display: inline-block; margin-left: 7px; transition: transform .2s; }.book-open:hover span { transform: translateX(4px); }.shelf-footer { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; letter-spacing: .14em; margin-top: 40px; }.shelf-footer b { color: var(--accent); font-size: 14px; margin-left: 8px; }
.hidden { display: none !important; }.reader-view { padding: 38px 0 90px; }.reader-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--line); }.back-button, .toc-toggle { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 12px; padding: 0; }.back-button:hover, .toc-toggle:hover { color: var(--accent); }.reader-context { display: flex; gap: 10px; color: var(--dim); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }.reader-context span:first-child { color: var(--text); }.toc-toggle { display: none; }.reader-layout { display: grid; grid-template-columns: 270px minmax(0, 750px); gap: clamp(40px, 8vw, 130px); margin-top: 60px; }.toc-panel { position: sticky; top: 125px; align-self: start; border-top: 1px solid var(--line); padding-top: 20px; }.toc-panel .eyebrow { margin-bottom: 14px; }.toc-title { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 19px; margin-bottom: 26px; }.toc-count { color: var(--accent); font-size: 11px; font-family: var(--sans); letter-spacing: .15em; }.toc-item { position: relative; display: block; padding: 11px 0 11px 17px; color: var(--dim); font-size: 12px; line-height: 1.45; text-decoration: none; border-left: 1px solid var(--line); transition: color .2s, border .2s; }.toc-item::before { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; left: -3px; top: 17px; background: var(--dim); }.toc-item.active { color: var(--text); border-left-color: var(--accent); }.toc-item.active::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }.toc-num { display: block; color: var(--accent); font-size: 9px; letter-spacing: .15em; margin-bottom: 3px; }.toc-footnote { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 10px; line-height: 1.5; margin-top: 80px; max-width: 160px; }.pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: #81dfb0; box-shadow: 0 0 9px #81dfb0; flex: none; }.reader-content { min-width: 0; }.article-meta { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; letter-spacing: .1em; margin-bottom: 17px; }.article-progress { height: 2px; background: var(--line); margin-bottom: 54px; }.article-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s; }.prose h1 { max-width: 750px; margin: 0 0 26px; font-family: var(--display); font-size: clamp(38px, 5vw, 64px); line-height: 1.04; font-weight: 500; letter-spacing: -.055em; }.prose h2 { margin: 54px 0 16px; font-family: var(--display); font-size: 25px; font-weight: 500; letter-spacing: -.04em; }.prose h3 { margin: 38px 0 10px; font-size: 17px; font-weight: 650; }.prose p, .prose li { color: var(--muted); font-size: 15px; line-height: 1.95; }.prose strong { color: var(--text); font-weight: 650; }.prose ul, .prose ol { padding-left: 23px; }.prose li { padding-left: 5px; margin: 4px 0; }.prose blockquote { margin: 34px 0; padding: 18px 22px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, rgba(136,230,255,.07), transparent); }.prose blockquote p { margin: 5px 0; color: var(--text); }.callout-label { display: block; color: var(--accent); font-size: 10px; letter-spacing: .14em; font-weight: 700; }.prose pre { margin: 28px 0; padding: 21px; background: #070a0e; border: 1px solid var(--line); border-radius: 8px; color: #b4d8e0; overflow-x: auto; font-size: 12px; line-height: 1.75; }.prose code { font-family: "Cascadia Code", Consolas, monospace; }.prose p code { padding: 2px 5px; background: var(--panel-3); border-radius: 4px; color: var(--accent); font-size: .85em; }.prose table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 12px; }.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }.prose th { color: var(--text); font-weight: 600; }.prose td { color: var(--muted); }.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 76px; padding-top: 20px; border-top: 1px solid var(--line); }.chapter-link { min-height: 82px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 15px; transition: border .2s, background .2s; }.chapter-link:hover { border-color: var(--accent); background: rgba(136,230,255,.045); }.chapter-link.next { text-align: right; }.chapter-link.disabled { opacity: .35; pointer-events: none; }.chapter-link small { color: var(--accent); font-size: 9px; letter-spacing: .15em; }.chapter-link strong { font-size: 12px; font-weight: 500; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 26px; transform: translate(-50%, 18px); padding: 10px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-3); color: var(--text); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.light { color-scheme: light; --bg: #eef2f3; --panel: #f7fafa; --panel-2: #ffffff; --panel-3: #e4eaed; --text: #152027; --muted: #53636d; --dim: #7b8a92; --line: rgba(21,32,39,.14); --accent: #007d9d; --accent-2: #6a55ca; --shadow: 0 28px 80px rgba(36,54,64,.14); }.light .app-noise { opacity: .025; }.light .prose pre { background: #172127; color: #d6f4f8; }.light .primary-button { color: #f5feff; background: #007d9d; }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .topbar { height: 66px; padding: 0 5vw; }.sync-status { display: none; }.shell { width: 90vw; }.shelf-view { padding-top: 12vw; }.hero-grid { min-height: 0; display: block; }.hero-copy h1 { font-size: clamp(44px, 13vw, 68px); }.hero-lede { font-size: 14px; }.hero-actions { display: block; }.micro-note { display: block; margin-top: 15px; }.hero-signal { min-height: 245px; margin-top: 48px; padding-left: 29vw; border-left: 0; border-top: 1px solid var(--line); }.hero-signal::before { width: 260px; height: 260px; top: 50%; left: 18%; }.signal-orbit { width: 150px; height: 150px; }.orbit-core { font-size: 48px; }.orbit-label { top: 36px; right: -82px; }.section-heading { margin-top: 55px; display: block; }.section-rule { display: block; margin: 16px 0; }.section-meta { display: block; }.book-grid { grid-template-columns: 1fr; }.book-card { min-height: 300px; }.shelf-footer { line-height: 1.6; gap: 20px; }.reader-view { padding-top: 25px; }.reader-head { gap: 10px; }.reader-context { display: none; }.toc-toggle { display: block; }.reader-layout { display: block; margin-top: 30px; }.toc-panel { position: fixed; z-index: 15; left: 0; right: 0; top: 66px; padding: 20px 5vw; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .25s; }.toc-panel.open { transform: translateY(0); }.toc-footnote { display: none; }.toc-title { margin-bottom: 10px; }.toc-item { padding: 8px 0 8px 17px; }.toc-item::before { top: 14px; }.article-meta { gap: 15px; line-height: 1.4; }.article-meta span:last-child { text-align: right; }.prose h1 { font-size: 42px; }.prose p, .prose li { font-size: 14px; }.chapter-nav { margin-top: 52px; }.chapter-link { min-height: 95px; }.chapter-link strong { line-height: 1.4; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Paper edition: a reading room first, dashboard second. */
:root { color-scheme: light; }
body:not(.dark) {
  --bg: #f4f0e7;
  --panel: #fffdf8;
  --panel-2: #fffefa;
  --panel-3: #ece6da;
  --text: #1d2a2e;
  --muted: #667174;
  --dim: #92999a;
  --line: rgba(29, 42, 46, .15);
  --accent: #2a6971;
  --accent-2: #b56a3b;
  --shadow: 0 28px 80px rgba(57, 47, 33, .14);
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.9), transparent 34%), var(--bg);
}
body:not(.dark) .brand-mark span { box-shadow: 0 0 14px rgba(42,105,113,.25); }
body:not(.dark) .hero-copy h1, body:not(.dark) .section-heading h2, body:not(.dark) .book-card h3, body:not(.dark) .toc-title, body:not(.dark) .prose h1, body:not(.dark) .prose h2 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif TC", Georgia, serif; }
body:not(.dark) .hero-copy h1 { letter-spacing: -.055em; font-weight: 500; }
body:not(.dark) .book-card { padding: 29px 28px 25px 32px; background: linear-gradient(105deg, #e7dfd0 0 7px, var(--panel-2) 7px 100%); border: 1px solid rgba(74, 61, 44, .18); border-radius: 3px 9px 9px 3px; box-shadow: 7px 8px 0 rgba(126, 102, 72, .08), 0 12px 24px rgba(58, 47, 33, .08); }
body:not(.dark) .book-card::before { left: 8px; width: 1px; background: var(--accent); opacity: .5; }
body:not(.dark) .book-card::after { content: ""; position: absolute; right: 0; top: 17px; bottom: 17px; width: 9px; background: repeating-linear-gradient(to bottom, rgba(117,99,77,.22) 0 1px, transparent 1px 4px); opacity: .7; }
body:not(.dark) .book-card:hover { transform: translateY(-5px) rotate(-.25deg); border-color: rgba(42,105,113,.45); box-shadow: 9px 14px 0 rgba(126, 102, 72, .08), 0 22px 38px rgba(58, 47, 33, .13); }
body:not(.dark) .reader-content { padding: 45px clamp(28px, 5vw, 68px) 54px; background: rgba(255,253,248,.86); border: 1px solid rgba(74, 61, 44, .14); box-shadow: 8px 10px 0 rgba(126, 102, 72, .06), 0 18px 42px rgba(58, 47, 33, .08); }
body:not(.dark) .prose h1 { letter-spacing: -.045em; }
body:not(.dark) .prose blockquote { border-left-color: var(--accent-2); background: linear-gradient(90deg, rgba(181,106,59,.09), transparent); }
body.dark { color-scheme: dark; }

/* Bookshelf view: dense enough for a collection, quiet enough for reading. */
.book-grid { display: block; }
.bookcase-intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin: 18px 0 25px; }
.bookcase-intro .eyebrow { margin: 0 0 10px; }
.bookcase-intro h2 { margin: 0; color: var(--text); font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif TC", Georgia, serif; font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -.05em; }
.bookcase-intro p:last-child { max-width: 380px; margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.bookcase { position: relative; padding: 48px 30px 28px; overflow: hidden; border: 1px solid rgba(74,61,44,.16); border-radius: 5px; background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(232,224,211,.6)); box-shadow: 0 18px 45px rgba(58,47,33,.11), inset 0 1px rgba(255,255,255,.95); }
.bookcase::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 72px, rgba(110,90,63,.025) 72px 73px); }
.book-peek { position: absolute; z-index: 5; top: 18px; left: 22px; width: min(330px, calc(100% - 44px)); max-height: min(380px, calc(100vh - 42px)); overflow-y: auto; padding: 18px 19px 16px; pointer-events: none; opacity: 0; transform: translateY(-7px); border: 1px solid rgba(74,61,44,.2); border-radius: 3px 9px 9px 3px; background: rgba(255,253,248,.96); box-shadow: 6px 7px 0 rgba(126,102,72,.08), 0 17px 35px rgba(58,47,33,.16); transition: opacity .18s ease, transform .18s ease; }
.book-peek.is-visible { opacity: 1; transform: translateY(0); }
.book-peek::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent-2); }
.peek-kicker { margin: 0 0 8px; color: var(--accent); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.book-peek h3 { margin: 0; color: var(--text); font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif TC", Georgia, serif; font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -.04em; }
.peek-subtitle { margin: 5px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.peek-description { display: -webkit-box; overflow: hidden; margin: 0; color: var(--text); font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.peek-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.peek-tags span { padding: 3px 7px; border: 1px solid rgba(42,105,113,.2); border-radius: 99px; color: var(--accent); font-size: 9px; }
.peek-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--line); }
.peek-meta div { display: grid; gap: 2px; }
.peek-meta span { color: var(--dim); font-size: 9px; }
.peek-meta strong { color: var(--text); font-size: 11px; font-weight: 650; }
.peek-progress { height: 3px; margin-top: 12px; overflow: hidden; background: rgba(29,42,46,.1); }
.peek-progress span { display: block; height: 100%; background: var(--accent-2); }
.peek-hint { margin: 12px 0 0; color: var(--dim); font-size: 9px; letter-spacing: .07em; text-align: right; }
.peek-hint span { margin-left: 5px; color: var(--accent); font-size: 13px; }
.shelf-level { position: relative; height: 204px; }
.shelf-shadow { position: absolute; left: 5%; right: 5%; bottom: 18px; height: 25px; background: rgba(77,57,36,.16); filter: blur(15px); border-radius: 50%; }
.shelf-books { position: absolute; z-index: 1; left: 2%; right: 2%; bottom: 13px; height: 173px; display: flex; align-items: end; justify-content: center; gap: 15px; }
.shelf-board { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 15px; border: 1px solid rgba(82,62,39,.22); border-radius: 2px; background: linear-gradient(180deg, #d9c8ad, #b9a183); box-shadow: 0 7px 0 rgba(126,102,72,.1), inset 0 2px rgba(255,255,255,.55); }
.book-spine { position: relative; flex: 0 0 82px; height: 151px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 10px 11px; overflow: hidden; border: 0; border-left: 6px solid rgba(0,0,0,.16); border-radius: 2px 5px 2px 2px; color: #fffaf0; cursor: pointer; box-shadow: 5px 3px 0 rgba(54,37,22,.15), 0 8px 16px rgba(54,37,22,.2); transition: transform .25s ease, filter .25s ease, box-shadow .25s ease; }
.book-spine::before { content: ""; position: absolute; inset: 8px 7px; border: 1px solid rgba(255,255,255,.38); opacity: .7; pointer-events: none; }
.book-spine:hover, .book-spine:focus-visible { z-index: 3; transform: translateY(-14px) rotate(-1.5deg); filter: saturate(1.12); box-shadow: 7px 12px 0 rgba(54,37,22,.12), 0 18px 28px rgba(54,37,22,.23); }
.book-spine:nth-child(2n) { height: 166px; transform-origin: bottom center; }.book-spine:nth-child(2n):hover { transform: translateY(-14px) rotate(1.5deg); }.book-spine:nth-child(3n) { flex-basis: 70px; height: 137px; }
.spine-top, .spine-author { position: relative; z-index: 1; font-family: var(--sans); font-size: 8px; letter-spacing: .15em; opacity: .82; }.spine-author { font-size: 7px; letter-spacing: .08em; writing-mode: vertical-rl; align-self: end; }
.spine-title { position: relative; z-index: 1; display: block; max-height: 103px; overflow: hidden; font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif TC", Georgia, serif; font-size: 15px; line-height: 1.08; letter-spacing: .08em; writing-mode: vertical-rl; text-orientation: mixed; text-align: left; }
.spine-progress { position: absolute; z-index: 2; left: 0; bottom: 0; width: var(--progress); max-width: 100%; height: 4px; background: #f2d79a; box-shadow: 0 0 9px rgba(242,215,154,.65); }
.spine-progress[style="--progress:0%"] { opacity: .12; width: 100%; background: rgba(255,255,255,.3); box-shadow: none; }
.sea { background: linear-gradient(155deg, #3e8582, #1d555c); }.rust { background: linear-gradient(155deg, #b96e48, #743a39); }.navy { background: linear-gradient(155deg, #354d76, #202c4b); }.ochre { background: linear-gradient(155deg, #b48a43, #7a5a2e); }.plum { background: linear-gradient(155deg, #76516e, #47334f); }.ink { background: linear-gradient(155deg, #46525d, #232e38); }
.shelf-empty { flex: 1; min-width: 22px; height: 122px; border-left: 1px solid rgba(110,90,63,.15); border-right: 1px solid rgba(110,90,63,.08); background: repeating-linear-gradient(0deg, rgba(110,90,63,.07) 0 1px, transparent 1px 5px); }
body.dark .bookcase { background: linear-gradient(180deg, #1b2429, #11181e); border-color: var(--line); box-shadow: none; } body.dark .shelf-board { background: linear-gradient(180deg, #44525a, #27323a); border-color: var(--line); } body.dark .shelf-shadow { background: rgba(0,0,0,.45); } body.dark .book-peek { background: rgba(20,28,37,.97); border-color: var(--line); box-shadow: 0 17px 35px rgba(0,0,0,.35); }
@media (max-width: 760px) { .bookcase-intro { display: block; }.bookcase-intro p:last-child { margin-top: 14px; }.bookcase { padding: 36px 13px 24px; overflow: visible; }.book-peek { position: absolute; right: auto; max-height: min(380px, calc(100vh - 42px)); margin: 0; }.shelf-level { height: 190px; }.shelf-books { justify-content: flex-start; overflow-x: auto; padding: 0 17px; gap: 12px; scrollbar-width: thin; }.book-spine { flex-basis: 70px; }.shelf-empty { display: none; } }

/* Readability pass: larger type, one bookish family, and no decorative fake spines. */
:root { --book-serif: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PingFang TC", "Microsoft JhengHei", Georgia, serif; }
body { font-size: 16px; }
body:not(.dark) .hero-copy h1,
body:not(.dark) .section-heading h2,
body:not(.dark) .book-card h3,
body:not(.dark) .toc-title,
body:not(.dark) .prose h1,
body:not(.dark) .prose h2,
body:not(.dark) .bookcase-intro h2,
body:not(.dark) .book-peek h3,
body:not(.dark) .spine-title { font-family: var(--book-serif); }
.hero-lede { font-size: 17px; }
.micro-note { font-size: 12px; }
.bookcase-intro h2 { font-size: clamp(28px, 3vw, 42px); }
.bookcase-intro p:last-child { font-size: 14px; }
.book-peek h3 { font-size: 24px; }
.peek-subtitle { font-size: 13px; }
.peek-description { font-size: 14px; }
.book-spine { flex-basis: 90px; height: 164px; }
.book-spine:nth-child(2n) { height: 176px; }
.book-spine:nth-child(3n) { flex-basis: 82px; height: 152px; }
.spine-top, .spine-author { font-size: 9px; }
.spine-author { font-size: 8px; }
.spine-title { max-height: 128px; font-size: 16px; line-height: 1.12; letter-spacing: .06em; }
.toc-item { font-size: 14px; line-height: 1.55; }
.prose p, .prose li { font-size: 17px; line-height: 1.95; }
.prose h2 { font-size: 29px; }
.prose h3 { font-size: 20px; }
.shelf-empty { display: none !important; }
@media (max-width: 760px) {
  .hero-lede { font-size: 16px; }
  .book-spine { flex-basis: 78px; height: 158px; }
  .book-spine:nth-child(2n) { height: 168px; }
  .book-spine:nth-child(3n) { flex-basis: 74px; height: 148px; }
  .spine-title { max-height: 124px; font-size: 15px; }
  .prose p, .prose li { font-size: 17px; line-height: 1.95; }
}

.chapter-illustration { margin: 0 0 42px; border: 1px solid var(--line); background: var(--panel-2); box-shadow: 0 18px 38px rgba(0,0,0,.14); overflow: hidden; }
.chapter-illustration img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.chapter-illustration figcaption { padding: 10px 14px 12px; color: var(--dim); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* Book spines: Kai-style lettering and a readable dark cover for book 04. */
.spine-top, .spine-title, .spine-author {
  font-family: "DFKai-SB", "BiauKai", "標楷體", "KaiTi", "Microsoft JhengHei", serif;
}
.gold { background: linear-gradient(155deg, #71869b, #3f5368); color: #fffaf0; }
.gold .spine-top, .gold .spine-title, .gold .spine-author { color: #fffaf0; }
