*{box-sizing:border-box}
[hidden]{display:none!important}
:root{
 --bg:#f7f5ef;--paper:#fffdf8;--text:#213633;--body:#34443f;--muted:#64716b;--line:#e2e5dc;--soft:#f2f3ed;
 --accent:#216b60;--on:#fffdf4;--mint:#e6f1e9;--gold:#996019;--mark:#f5e4b4;--blue:#466688;--red:#ad4e34;--pink:#fbebe6;
 --sun:#efa66a;--sky:#e5efe4;--hill:#275e59;--sail:#fffdf1;--size:17px;--shadow:0 5px 16px -8px #293c3022;
 color-scheme:light
}
:root[data-theme=dark]{
 --bg:#1c262e;--paper:#26333c;--text:#e8ede8;--body:#d6dfdd;--muted:#afbfbe;--line:#3a4a52;--soft:#2d3c45;
 --accent:#95d9c6;--on:#182f31;--mint:#2d4949;--gold:#ebc386;--mark:#605235;--blue:#acd0ee;--red:#ffae97;--pink:#503c3c;
 --sun:#dfc28c;--sky:#304a54;--hill:#142d38;--sail:#e1d5ae;color-scheme:dark
}
:root[data-font="1"]{--size:19px}:root[data-font="2"]{--size:22px}
html{background:var(--bg);color:var(--text);font-family:system-ui,"Microsoft YaHei",sans-serif;overflow-anchor:none;-webkit-text-size-adjust:100%}
body{margin:0;min-height:100dvh;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
button{background:none;border:none;padding:0;font:inherit;color:inherit;cursor:pointer;min-height:48px;touch-action:manipulation;display:inline-flex;align-items:center;justify-content:center;gap:5px}
button:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
button:active:not(:disabled){opacity:.72}
button:disabled{cursor:auto}
.ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}
.wrap{max-width:610px;padding-inline:max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-right));margin:auto}
#head{position:sticky;top:0;z-index:2;background:var(--bg);padding-top:env(safe-area-inset-top);border-bottom:1px solid var(--line)}
.bar,.pair,.result,.meta,.kind,.badge,.artText>div,.sheetBar,#installBar{display:flex;align-items:center}
.bar{height:62px}
.bar>button{width:44px}
.bar>#collapse{justify-content:start;width:auto;gap:3px;font-size:21px;letter-spacing:1px}
.logo{width:34px;color:var(--accent);margin-right:2px}
#collapse .ic{width:14px;color:var(--muted)}
[aria-expanded=true] .ic:last-child{transform:rotate(180deg)}
#count{margin:0 auto 0 7px;color:var(--muted);font-size:12px}
#count b{color:var(--accent)}
#font{font:600 20px Georgia;gap:0}
#font span{font-size:15px;transform:translateY(2px)}
nav{display:flex;align-items:stretch}
nav:first-child{padding:3px;background:var(--line);border-radius:15px}
nav:first-child button{flex:1;border-radius:12px;font-size:15px;font-weight:600;color:var(--body)}
nav:first-child button[aria-pressed=true],.primary,.empty button{background:var(--accent);color:var(--on);box-shadow:var(--shadow)}
nav+nav{justify-content:space-between}
nav+nav button{gap:2px;position:relative;color:var(--muted);font-size:13px;white-space:nowrap;flex:auto}
nav+nav [aria-pressed=true]{color:var(--accent);font-weight:700}
nav+nav [aria-pressed=true]::after{content:"";position:absolute;bottom:0;width:22px;height:3px;border-radius:5px;background:var(--accent)}
nav .ic,.badge .ic{width:15px;height:15px}
[data-icon=bolt],.hot{color:var(--gold)}
[data-icon=flame],.core{color:var(--red)}
[data-icon=snow],.rare{color:var(--blue)}
main.wrap{padding-top:15px}
#installBar{background:var(--mint);border-radius:14px;color:var(--accent);margin-bottom:14px;font-size:14px}
#installBar .install{flex:1}
#dismiss,#close{width:48px}
article,.empty{font-size:var(--size);overflow-wrap:anywhere;border:1px solid var(--line);border-radius:21px;overflow:hidden;margin-bottom:17px;box-shadow:var(--shadow);background:var(--paper)}
.banner{position:relative;height:clamp(87px,23vw,129px);background:var(--sky);isolation:isolate}
[data-subject="204"]{--sky:#e4edf3;--hill:#385f77}
[data-subject="101"]{--sky:#f4e7d9;--hill:#815038}
[data-theme=dark] [data-subject="204"]{--sky:#374862;--hill:#192c42}
[data-theme=dark] [data-subject="101"]{--sky:#534344;--hill:#312a34}
.scene{position:absolute;inset:0;width:100%;height:100%;color:var(--hill);z-index:-1;mask-image:linear-gradient(90deg,transparent 3%,#0002 28%,black 59%)}
.artText{padding:0 20px;display:flex;gap:5px;justify-content:center;height:100%}
.artText{flex-direction:column;color:var(--text)}
.artText>b{font-size:18px;max-width:55%;letter-spacing:1px}
.kind,.badge{gap:5px;font-size:13px;font-weight:600}
.kind{color:var(--accent)}
.kind .ic{width:17px}
.subLabel{font-size:13px;border-left:1px solid currentColor;padding-left:9px;margin-left:10px;line-height:1.1}
.pad{padding:20px}
.badge{margin-left:auto;font-size:12px;font-weight:500}
[data-type=read] .badge{margin:0}
.time{margin-left:auto;font-size:12px;color:var(--muted)}
h2{font-size:1.18em;margin:12px 0 16px;line-height:1.5;text-wrap:pretty}
[data-type=read] h2{font-size:1.34em;line-height:1.43;text-wrap:balance}
p{margin:0;color:var(--body);line-height:1.86}
p+p{margin-top:.78em}
p[lang=en]{font:1.13em/1.68 Georgia,serif}
mark{background:linear-gradient(transparent 60%,var(--mark) 60%);color:var(--text);font-weight:600}
section{background:var(--soft);padding:16px;border-radius:14px;margin-top:15px;line-height:1.7;font-size:.96em}
.points{border-left:3px solid var(--accent);border-radius:2px 14px 14px 2px}
h3{font-size:max(14px,.83em);line-height:1.55;color:var(--accent);margin:16px 0 6px}
h3:first-child{margin-top:0}
.source{font-size:max(12px,.73em);color:var(--muted);line-height:1.65;margin-top:16px}
.source span{white-space:nowrap}
footer{display:flex;position:relative;border-top:1px solid var(--line);padding:4px}
footer::before{content:"";position:absolute;left:50%;height:17px;top:20px;width:1px;background:var(--line)}
footer button{color:var(--muted);flex:1;font-size:14px}
footer .ic{width:17px}
.save[aria-pressed=true]{color:var(--gold)}
.save[aria-pressed=true] svg{fill:currentColor}
.options{display:grid;gap:10px}
.opt{justify-content:start;text-align:left;padding:11px 13px;gap:12px;border:1px solid var(--line);border-radius:13px;line-height:1.6}
.opt b{min-width:27px;border-radius:50%;background:var(--soft);text-align:center;font-size:15px;line-height:27px}
.opt svg{margin-left:auto}
.opt.correct{color:var(--accent);background:var(--mint)}
.opt.wrong{color:var(--red);background:var(--pink)}
.opt.correct,.opt.wrong{border-color:currentColor}
.result{justify-content:space-between;margin-top:-9px;color:var(--accent)}
.retry{font-size:14px}
.retry svg{width:16px}
.reveal,.sheet button,.empty button{border-radius:12px;width:100%;padding:6px}
.reveal{background:var(--mint);color:var(--accent);font-weight:600}
p+.reveal{margin-top:18px}
.keys{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}
.keys b{border-radius:20px;font-size:.86em;padding:4px 11px;background:var(--mint);color:var(--accent)}
.out{transform:translateX(-28px);opacity:0;transition:transform .17s,opacity .17s}
.empty{text-align:center;padding:38px 26px}
.empty button{margin-top:24px}
#toast{position:fixed;z-index:3;left:50%;transform:translateX(-50%);bottom:calc(18px + env(safe-area-inset-bottom));display:flex;align-items:center;background:var(--text);color:var(--paper);font-size:14px;border-radius:25px;padding:0 20px;min-height:48px;width:max-content;max-width:92%;box-shadow:0 5px 20px #0002;pointer-events:none}
#undo{margin-left:16px;font-weight:bold;text-decoration:underline;pointer-events:auto}
html:has(dialog[open]){overflow:hidden}
dialog{margin:auto auto 0;padding:0;color:var(--text);background:var(--paper);max-height:90dvh;width:min(100%,580px);max-width:100%;border:0;border-radius:24px 24px 0 0;overscroll-behavior:contain}
dialog::backdrop{background:#101f3177}
.sheetBar{position:sticky;top:0;padding:6px 16px 6px 24px;background:var(--paper);justify-content:space-between;border-bottom:1px solid var(--line)}
.sheetBar h2{margin:0}
.sheet{padding:20px 24px calc(20px + env(safe-area-inset-bottom))}
.sheet p,#notice{font-size:14px;line-height:1.6;color:var(--muted)}
.sheet h3{font-size:16px;margin-top:20px}
.sheet h3:first-child{margin-top:0}
.sheet button{margin-top:10px;font-size:15px;font-weight:600}
.sheet button:not(.primary){background:var(--soft)}
.sheet button:disabled{opacity:.55}
.pair{gap:12px}
#fallback{width:100%;min-height:110px}
#edition{font-size:12px;margin-top:18px}
#notice:not(:empty){position:sticky;bottom:0;color:var(--accent);background:var(--mint);padding:12px 24px calc(12px + env(safe-area-inset-bottom))}
@media(max-width:375px){
 .wrap{padding-inline:10px}.bar>button{width:38px}
 .pad{padding:17px}nav+nav button,footer button{font-size:12px}
}
@media(max-width:346px){
 nav+nav .ic{display:none}.bar>button{width:33px}#count{margin-left:2px}.banner{height:78px}
}
@media(min-width:525px){.pad{padding:26px}.bar>button{width:48px}}
