:root {
  color-scheme: light dark;
  --page:#f8f8f5; --surface:#fff; --hero:#e9edf0; --ink:#192b36; --muted:#52616b;
  --line:#d7dcd9; --faint:#eef1f0; --accent:#285177; --on-accent:#fff; --focus:#2470ab;
  --danger:#8e3725; --alert:#f4e8e2; --shadow:0 8px 24px #162a3910; --paper:#f4eddc;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink); background:var(--page); accent-color:var(--accent); font-synthesis:none;
}
@media(prefers-color-scheme:dark){:root {
  --page:#171d20; --surface:#20282c; --hero:#29363d; --ink:#f1f1eb; --muted:#b5c1c6;
  --line:#3b494e; --faint:#2b353a; --accent:#a5c7e7; --on-accent:#172d41; --focus:#a5c7e7;
  --danger:#ffc9ae; --alert:#472e26; --shadow:0 8px 24px #0001; --paper:#e9dec8;
}}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-width:250px}
button,input,select{font:inherit}
button,select,input[type=range]{cursor:pointer}
button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;color:inherit;background:none;border:0;padding:7px 13px;border-radius:9px;font-size:14px;font-weight:600}
button:hover:not(:disabled),a:hover{filter:brightness(.95)}
button:disabled,select:disabled,input:disabled{opacity:.45;cursor:default}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
button svg,[data-icon] svg,.row svg{display:block;width:19px;height:19px;flex:none}
h1,h2,h3,p{margin:0}
h1,.hero h2,.console h2,.brand,.cover-title{font-family:ui-serif,"Iowan Old Style","Palatino Linotype",Georgia,serif}
h1,h2,h3{overflow-wrap:anywhere}
h1,.hero h2,.console h2{font-weight:500;letter-spacing:-.045em;line-height:1.08}
h1{font-size:clamp(44px,6vw,68px)}
p{line-height:1.5}
.masthead{border-bottom:1px solid var(--line);background:var(--page)}
.bar,main{width:min(100% - clamp(36px,9vw,120px),1080px);margin-inline:auto}
.bar{display:flex;align-items:center;justify-content:space-between;min-height:76px;gap:12px}
.brand{display:inline-flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;font-size:26px;font-weight:600;letter-spacing:-.045em}
.brand img{border-radius:8px}
.quiet{background:var(--surface);border:1px solid var(--line);font-weight:540;color:var(--muted)}
main{padding:clamp(30px,5vw,66px) 0 max(50px,env(safe-area-inset-bottom))}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}
.section-head.compact{margin-bottom:14px}
.section-head.compact h2,.dialog-head h2{font-size:22px;letter-spacing:-.035em;font-weight:650}
.subtle,.times,.source-instruction,.count{color:var(--muted)}
.primary{background:var(--accent);color:var(--on-accent);padding-inline:18px;border:1px solid transparent}
.primary svg{width:17px;height:17px}
.icon-button{width:44px;padding:0;color:var(--muted)}
.icon-button:hover,.transport button:not(.play):hover,.shelf-item:hover,.row:hover,.chapter:hover{background:var(--faint)}
.hero{display:grid;grid-template-columns:1fr 1.05fr;background:var(--hero);border-radius:18px;overflow:hidden;min-height:310px;border:1px solid var(--line)}
.hero-copy{padding:clamp(28px,5vw,64px);align-self:center}
.lead-icon{color:var(--accent);display:block;margin-bottom:18px}
.lead-icon svg{width:23px;height:23px}
.hero h2{font-size:clamp(38px,4.5vw,59px);margin-bottom:13px}
.hero p{max-width:32ch;margin-bottom:24px;color:var(--muted);font-size:16px}
.hero-art{background:#a7b9c2 url('/cover.jpg') center center / cover no-repeat;min-height:200px}
.section{margin-top:34px}
.sources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.source,.shelf-item{border:1px solid var(--line);background:var(--surface);border-radius:12px;min-width:0;text-align:left;justify-content:flex-start;font-weight:500;padding:15px 16px;gap:12px}
.source>span:nth-child(2),.shelf-text{min-width:0}
.source strong,.source small,.shelf-text strong,.shelf-text small{display:block;overflow-wrap:anywhere}
.source strong{font-size:15px;font-weight:630}
.source small,.shelf-text small{margin-top:4px;font-size:12px;font-weight:450;color:var(--muted)}
.source>svg:last-child{margin-left:auto;width:14px;color:var(--muted)}
.provider-icon{flex:0 0 37px;height:37px;display:grid;place-items:center;border-radius:9px;background:var(--faint);color:var(--accent)}
.provider-icon svg{width:23px;height:23px}
.source-instruction{font-size:13px;margin-top:14px}
.player{display:grid;grid-template-columns:minmax(180px,.82fr) minmax(0,1.75fr);align-items:center;gap:clamp(25px,5vw,65px);padding:clamp(24px,4vw,46px);background:var(--surface);border:1px solid var(--line);border-radius:18px}
.cover{--cover:#31516a;--cover-ink:#f1e4c6;position:relative;isolation:isolate;overflow:hidden;aspect-ratio:4/5;align-self:center;background:var(--cover);color:var(--cover-ink);display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;border-radius:1px 5px 5px 1px;box-shadow:inset 3px 0 2px #0003,inset 5px 0 1px #fff2,1px 2px 3px #0002}
.cover[data-variant="1"]{--cover:#713f35;--cover-ink:#fae5c0}
.cover[data-variant="2"]{--cover:#315747;--cover-ink:#f3e7c6}
.cover[data-variant="3"]{--cover:#5c4b68;--cover-ink:#f7eacb}
.cover[data-variant="4"]{--cover:#755522;--cover-ink:#fff1cf}
.featured-cover{width:min(100%,232px);margin:auto;box-shadow:inset 4px 0 3px #0004,inset 7px 0 1px #fff2,3px 8px 13px #12232b25}
.cover-rule{display:block;border-top:1px solid currentColor;margin:11% 12% 0;opacity:.7}
.cover-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;text-wrap:balance;overflow-wrap:anywhere;font-size:clamp(22px,3.4vw,41px);line-height:1.03;padding:0 12%;letter-spacing:-.045em;position:relative;z-index:1}
.cover i{position:relative;display:block;height:32%;background:repeating-radial-gradient(ellipse at 55% 110%,transparent 0 4%,currentColor 4.7% 5%,transparent 5.5% 10%);opacity:.7}
.console{min-width:0}
.player-label{font-size:12px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);margin-bottom:8px}
.console h2{font-size:clamp(30px,4.3vw,52px)}
.console>p{font-size:14px;margin-top:5px;overflow-wrap:anywhere}
#timeline{display:block;appearance:none;width:100%;margin:15px 0 0;height:26px;background:transparent;--fill:0%;outline-offset:0}
#timeline::-webkit-slider-runnable-track{height:4px;border-radius:3px;background:linear-gradient(to right,var(--accent) var(--fill),var(--line) var(--fill))}
#timeline::-webkit-slider-thumb{appearance:none;width:13px;height:13px;border-radius:50%;background:var(--accent);margin-top:-4.5px}
#timeline::-moz-range-track{height:4px;border-radius:3px;background:var(--line)}
#timeline::-moz-range-progress{height:4px;background:var(--accent)}
#timeline::-moz-range-thumb{background:var(--accent);border:0}
.times{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums;font-size:12px}
.transport,.tools{display:flex;align-items:center;justify-content:center}
.transport{gap:clamp(5px,1.3vw,18px);margin:12px 0}
.transport button{width:46px;height:46px;border-radius:50%;padding:0}
.transport svg{width:29px;height:29px}
.transport .play{width:57px;height:57px;background:var(--accent);color:var(--on-accent)}
.transport .play svg{width:24px;height:24px}
.tools{gap:8px}
.speed,.pill{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;font-size:13px;font-weight:550;padding:0 12px;border:1px solid var(--line);background:var(--surface);border-radius:24px}
.speed svg,.pill svg{width:15px;height:15px}
.speed select{font-weight:600;color:inherit;background:transparent;border:0;appearance:none;padding:8px 12px 8px 0;min-height:42px;max-width:88px}
.speed>[data-icon=down]{position:absolute;right:9px;pointer-events:none}
.speed>[data-icon=down] svg{width:11px}
#player-status{font-size:13px;margin-top:11px;color:var(--muted);text-align:center}
#chapters-panel{grid-column:1/-1;border-top:1px solid var(--line);padding-top:18px}
#chapters-panel h3{font-size:16px;margin-bottom:10px}
#chapters{margin:0;padding:0;list-style:none;max-height:340px;overflow:auto}
.chapter{width:100%;text-align:left;justify-content:flex-start;font-weight:450;gap:12px}
.chapter b{font-variant-numeric:tabular-nums;min-width:20px;color:var(--muted);font-size:12px}
.chapter span{overflow-wrap:anywhere}
.chapter small{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
.chapter[aria-current=true]{background:var(--faint);color:var(--accent);font-weight:650}
.shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.shelf-item{width:100%;padding:12px}
.shelf-item[aria-current=true]{border-color:var(--accent);box-shadow:inset 0 0 0 .5px var(--accent)}
.shelf-item .cover{flex:0 0 38px}
.shelf-text{flex:1}
.shelf-text strong{line-height:1.3;font-size:14px}
.shelf-text small{font-size:12px;line-height:1.35}
.notice,#dialog-body .error{padding:12px 16px;color:var(--danger);background:var(--alert);border-radius:9px;margin-bottom:15px;font-size:14px}
.gate{text-align:center;margin:clamp(40px,12vh,160px) auto;max-width:480px}
.gate-icon,.gate .spinner{display:inline-flex;align-items:center;justify-content:center;margin-bottom:20px;color:var(--accent)}
.gate-icon svg{width:40px;height:40px}
.gate h1{font-size:38px}
.gate p{color:var(--muted);margin:14px 0 24px}
.spinner{display:inline-block;width:20px;height:20px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
dialog{padding:0;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:17px;width:min(520px,calc(100% - 28px));max-height:85dvh;box-shadow:0 20px 80px #0003}
dialog::backdrop{background:#14222d6b;backdrop-filter:blur(4px)}
.dialog-shell{padding:22px}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.dialog-head h2{font-size:24px}
#dialog-body>p{color:var(--muted);font-size:14px;margin:7px 0 14px}
#dialog-body .sources{grid-template-columns:1fr}
#dialog-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px}
#dialog-actions:not(:empty){border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.dialog-subhead{display:flex;align-items:center;gap:8px;margin:4px 0 10px}
.dialog-subhead strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
.entry-list{max-height:45dvh;min-height:55px;overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.row{display:flex;align-items:center;justify-content:flex-start;width:100%;gap:12px;font-size:14px;overflow-wrap:anywhere;min-height:47px;text-align:left;font-weight:450;border-radius:6px;padding:8px 9px}
.row>span{flex:1}
.row svg{color:var(--accent);flex:none}
.row input{width:18px;height:18px;flex:none}
.row>svg:last-child:not(:first-child){width:14px;color:var(--muted)}
.field{display:grid;gap:7px;font-size:13px;font-weight:600;margin:12px 0}
.field input{min-height:42px;padding:9px 10px;background:var(--page);color:inherit;border:1px solid var(--line);border-radius:8px;width:100%;min-width:0}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:740px){.sources,.shelf{grid-template-columns:1fr 1fr}.sources .source:only-child{grid-column:1/-1}.bar{min-height:66px}.hero-copy{padding:27px}.player{gap:22px}.featured-cover{max-width:165px}.hero-art{min-height:170px}.source{padding:11px}}
@media(max-width:550px){.bar,main{width:calc(100% - 32px)}.bar{min-height:61px}.brand{font-size:23px;gap:8px}.brand img{width:31px;height:31px}.quiet{font-size:12px;gap:6px;padding:5px 9px}.section-head{margin-bottom:17px}h1{font-size:43px}.hero{grid-template-columns:1fr;min-height:0}.hero-art{grid-row:1;min-height:0;height:clamp(120px,39vw,205px);background-position:50% 52%}.hero-copy{padding:23px}.lead-icon{display:none}.hero h2{font-size:36px}.hero h2 br{display:none}.hero h2 br::after{content:' '}.hero p{max-width:38ch;font-size:14px;margin:9px 0 16px}.sources,.shelf{grid-template-columns:1fr;gap:8px}.section{margin-top:25px}.section-head.compact{margin-bottom:9px}.section-head.compact h2{font-size:20px}.source{padding:11px 14px}.player{grid-template-columns:1fr;gap:0;padding:20px}.featured-cover{max-width:132px;margin:0 auto 18px}.console h2,.console>p,.player-label{text-align:center}.console h2{font-size:31px}.player-label{margin-bottom:6px}.console>p{font-size:13px}.section-head .primary{padding-inline:12px}.transport{justify-content:space-between;gap:3px}.transport .play{width:55px;height:55px}#chapters-panel{margin-top:18px}.dialog-shell{padding:15px}.shelf-item .cover{flex-basis:33px}}
@media(max-width:345px){.bar,main{width:calc(100% - 22px)}.brand{font-size:20px}.bar .quiet span:last-child{max-width:62px}.player{padding:14px}.transport button{width:39px}.hero-copy{padding:18px}.dialog-head h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0s!important;scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce){dialog::backdrop{backdrop-filter:none;background:#23323acc}}
