/* PER-230: one shared scale, preserving the workshop's cool paper / blue ink identity. */
:root{--ui-paper:#f7faff;--ui-ink:#243452;--ui-muted:#576984;--ui-accent:#306f91;--ui-line:#cdd9e7;--ui-surface:#fff;--ui-radius:6px;font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC","Noto Sans SC","Segoe UI",sans-serif;font-size:16px;color:var(--ui-ink)}
*{box-sizing:border-box}.skip{position:absolute;left:1rem;top:-100px;z-index:100;padding:.5rem;background:white}.skip:focus{top:.5rem}body{font-family:inherit;font-size:1rem;line-height:1.8;min-width:0}button,input,select,textarea{font:inherit}h1{font-size:clamp(1.6rem,3vw,2.15rem);line-height:1.35}h2{font-size:1.35rem;line-height:1.45}h3{font-size:1.1rem;line-height:1.5}p{margin-block:.6em}main{overflow-wrap:anywhere}button,.button-link{min-height:44px;border-radius:var(--ui-radius);font-weight:550;padding:.45rem .8rem;cursor:pointer}button:disabled{cursor:not-allowed}a.button-link{background:var(--ui-surface);display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-line);text-decoration:none;color:var(--ui-accent);gap:.4em}a{color:var(--ui-accent);text-underline-offset:.2em}a:where(.brand,.auth-link,.story-card,.index-row,.board-row,.card-story-link,.story-random),.topbar a,.reader-pager a,.reader-back a,.episode-toc a,.feature-cta a,.foot-nav a{text-decoration:none}.topbar nav a{font-weight:500;min-height:44px;display:inline-flex;align-items:center}.topbar{position:sticky;top:0;z-index:30;background:var(--ui-paper);gap:1rem;padding-block:.65rem}.topbar .brand{font-size:1rem;font-weight:650;white-space:nowrap}.topbar .brand .latin{font-family:Georgia,serif;font-size:1.05em;font-style:italic;font-weight:500}.topbar-side{min-width:0}.topbar nav{gap:.75rem}.topbar nav a[aria-current=page]{box-shadow:inset 0 -2px var(--ui-accent)}.site-footer{max-width:1200px;margin:3rem auto 0;padding:1.4rem;color:var(--ui-muted);font-size:.875rem;border-top:1px solid var(--ui-line)}.site-footer a{margin-left:1rem}.calendar-sections a,.auth-tabs a{text-decoration:none;display:inline-flex;align-items:center;min-height:44px;padding:.4rem .7rem;border:1px solid var(--ui-line);border-radius:6px}.calendar-sections,.auth-tabs{display:flex;flex-wrap:wrap;gap:.5rem}.calendar-sections a[aria-current=page],.auth-tabs a[aria-current=page]{background:#e1edf8;text-decoration:none}.small,small,.story-card-meta,.episode-meta{font-size:.875rem;color:var(--ui-muted)}:focus-visible{outline:3px solid #b45a30;outline-offset:3px}dialog{border:1px solid var(--ui-line);border-radius:10px;max-width:min(92vw,32rem);color:var(--ui-ink);background:var(--ui-surface)}dialog::backdrop{background:#18283f66}dialog label{display:block;padding:.65rem}.display-dialog label{display:flex;align-items:center;gap:.75rem;min-height:44px;margin:.35rem 0;padding:.5rem}.display-dialog input[type=checkbox]{flex:none;width:22px;height:22px;min-height:22px;margin:0;padding:0;accent-color:var(--ui-accent)}.display-dialog{width:min(92vw,28rem);max-height:90dvh;padding:1rem}.display-dialog h2{margin-top:.25rem}.filter-chips{display:flex;flex-wrap:wrap;gap:.5rem}.filter-chip{display:inline-flex;align-items:center;gap:.4rem;border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-ink)}.filter-chip img{object-fit:contain;border-radius:50%;flex:none}.filter-chip[aria-pressed=true]{background:#e1edf8;border:2px solid var(--ui-accent);padding:calc(.45rem - 1px) calc(.8rem - 1px)}.filter-label{font-weight:550;margin-top:1rem}.character-chips{max-height:13rem;overflow-y:auto;padding:4px}.card-filter-grid{margin-top:1rem}.card-filter-foot{flex-wrap:wrap;gap:.7rem}.card-filter-foot label{display:flex;align-items:center;gap:.5rem}.card-filter-foot input[type=checkbox]{width:20px;height:20px}.card-art{background:#edf2f8;aspect-ratio:1/1;min-height:0;display:flex;align-items:center;justify-content:center;position:relative}.card-art img{display:block;width:100%;height:auto;object-fit:contain}.card-detail .card-art{aspect-ratio:4/3}.card-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.regional-date{margin-block:.15rem}.card-tile h3{font-size:1rem}.reader-toolbar{position:static;flex-wrap:wrap;gap:.7rem;border:1px solid var(--ui-line);border-radius:var(--ui-radius);padding:.75rem;background:var(--ui-surface)}.reader-tools{flex-wrap:wrap}.reading-sync{margin:1rem 0;padding:.75rem;border-left:3px solid var(--ui-accent);background:#edf3f9}.reading-sync button{margin:.25rem .5rem .25rem 0}.line-speaker{display:flex;align-self:start;align-items:center;gap:.4rem;flex-wrap:nowrap}.speaker-avatar{object-fit:contain;width:36px;height:36px;flex:none}.speaker-name{font-size:.9em;white-space:nowrap}.hide-speaker-names .reader-content .line:not(.narration){grid-template-columns:36px minmax(0,1fr)}.hide-speaker-names .line-speaker:not(.speaker-unknown){display:flex}.hide-speaker-names .line-speaker:not(.speaker-unknown) .speaker-name{display:none}.hide-speaker-avatars .speaker-avatar{display:none}.episode-head button{font-size:.875rem}.reader-content{min-width:0}.reader-content .line-text{line-height:1.9}.episode{scroll-margin-top:9rem}.admin-actions{display:flex;flex-wrap:wrap;gap:.5rem}.admin-table-wrap{overflow-x:auto}.home-page .intro{padding-block:1.2rem}.home-page .feature-body{padding:1rem}.home-page .feature-cta a{text-decoration:none}.home-page .feature-cta a:focus-visible{outline-offset:2px}.home-page .feature-countdown{padding:.8rem}.topbar nav a[aria-current=page]{text-decoration:none}.reader-toolbar .reader-lang button,.reader-toolbar .reader-tools button{border-radius:6px}.reading-sync p{margin:0 0 .4rem}.home-page .intro h1{font-size:1.55rem}.reader-page.story-dark .reading-sync,.reader-page.story-dark .reader-toolbar{background:#202b3b;color:#e5ecf4}
.story-feature-body .regional-dates{margin-block:12px;color:var(--ui-muted);font-size:.875rem}.story-feature-body .regional-dates p{margin-block:0}
a.button-link:hover{background:#e1edf8;color:var(--ui-ink)}
@media(max-width:600px){.rules dl{grid-template-columns:1fr}.story-search-row{flex-wrap:wrap}.story-search-row input{min-width:10rem}.story-search-row #event-order{white-space:nowrap}.topbar{display:block;padding:.35rem 1rem}.topbar .brand{display:block;line-height:1.5}.topbar-side{display:flex;justify-content:space-between;align-items:center;gap:.3rem}.topbar nav{display:flex;gap:.7rem;flex-wrap:nowrap}.topbar nav a{font-size:.9rem;min-height:44px}.account-entry .auth-link{font-size:.9rem}.account-name{max-width:4rem}.shell,.story-shell,.reader-shell{padding-inline:1rem;max-width:100%}.card-filter-grid{grid-template-columns:1fr}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.card-grid .story-card-body{padding:.65rem}.filter-chip{font-size:.875rem}.character-chips{max-height:7.5rem}#card-bands{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}#card-bands .filter-chip{justify-content:center;padding:.35rem;min-width:0}#card-bands .filter-chip img{width:48px;height:30px}#card-bands .band-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.filter-chip img{width:30px;height:30px}.reader-tools{gap:.35rem}.reader-toolbar button{font-size:.875rem;padding:.4rem .6rem}.reader-content .line{grid-template-columns:4.2rem minmax(0,1fr)}.reader-content .line-pair .line{grid-template-columns:4.2rem 1.2rem minmax(0,1fr)}.hide-speaker-names .reader-content .line:not(.narration){grid-template-columns:30px minmax(0,1fr)}.line-speaker{font-size:.85rem;align-content:start;align-items:center;gap:.2rem}.speaker-avatar{width:30px;height:30px}.site-footer{padding:1rem}.admin-dialog-actions{flex-wrap:wrap}}
/* PER-267: shared finishing layer, no content or navigation changes. */
:root{--site-header-height:76px}
html{scroll-padding-top:calc(var(--site-header-height) + 16px)}
body{font-family:inherit}
h1,h2,h3{font-weight:700;letter-spacing:normal}
.story-page .story-intro h1,.reader-page #reader-title{font-size:clamp(1.6rem,3vw,2.15rem);line-height:1.4;letter-spacing:normal}
.topbar{width:min(1120px,calc(100% - 32px));max-width:1120px;padding:10px 16px;border-bottom:1px solid var(--ui-line);box-shadow:0 3px 12px #24345208;background:var(--paper,var(--ui-paper));align-items:center}
.topbar .brand{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:0 .2em;font-weight:700;white-space:normal;line-height:1.5}
.topbar .brand .latin{color:inherit;font-size:1em}
.topbar nav[aria-label="站点导航"]{display:flex;gap:4px;align-items:center;font-size:1rem}
.topbar nav[aria-label="站点导航"] a,.topbar .auth-link{justify-content:center;min-width:44px;min-height:44px;padding:6px 8px;border-radius:4px;transition:background-color .15s ease}
.topbar nav a:hover,.topbar .auth-link:hover{background:var(--sleeve,#e9e4fa)}
.topbar a[aria-current="page"]{text-decoration:none;box-shadow:inset 0 -2px var(--seal)}
button:not(:disabled),a.button-link{transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
button:not(.account-logout):not(.filter-chip):not(.story-char):not(.story-band){box-shadow:0 1px 2px #24345212}
button:active:not(:disabled),a.button-link:active{box-shadow:inset 0 1px 3px #24345226}
button:disabled{box-shadow:none}
a.button-link.button-secondary{background:transparent;color:var(--lake);border-color:var(--ui-line)}
.chapter-sidebar{top:calc(var(--site-header-height) + 16px);max-height:calc(100dvh - var(--site-header-height) - 32px);scroll-padding-block:8px}
.story-page.story-dark .topbar{border-color:var(--line);background:var(--paper)}
@media(max-width:1000px){.chapter-sidebar{top:0;max-height:none}}
@media(max-width:760px){
 :root{--site-header-height:110px}
 .topbar,.story-page .topbar{width:calc(100% - 24px);padding:10px 12px 6px;gap:4px;align-items:stretch}
 .topbar .brand{display:inline-flex;line-height:1.5}
 .topbar .topbar-side,.story-page .topbar-side{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px}
 .topbar nav[aria-label="站点导航"],.story-page .topbar nav{display:flex;gap:0;flex-wrap:nowrap}
 .topbar nav[aria-label="站点导航"] a,.topbar .auth-link{font-size:.9375rem;padding:6px}
 .topbar .account-chip{min-width:44px;justify-content:center;padding:4px 8px}
 .topbar .account-name{max-width:3em}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
