@font-face{font-family:Pyidaungsu;src:url('/Pyidaungsu-2.5.3-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
:root{color-scheme:light;--bg:#f5f1e7;--paper:#fffaf0;--ink:#222c24;--muted:#596459;--line:#d6d2c4;--accent:#315845;--hero:#18372c;--cream:#fbefcf;--size:19px}
:root[data-theme=dark]{color-scheme:dark;--bg:#182522;--paper:#21302b;--ink:#f5ebd8;--muted:#c6c9b9;--line:#43524a;--accent:#b9dbc2;--hero:#122f25}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.85 Pyidaungsu,serif}
button,input,select{font:inherit;color:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}
:focus-visible{outline:3px solid #bd6b36;outline-offset:4px}h1,h2,p{margin:0}
.wrap,.top-inner{width:min(1216px,calc(100% - 64px));margin-inline:auto}
.top{border-bottom:1px solid var(--line)}.top-inner{height:68px;display:flex;justify-content:space-between;align-items:center}
.brand{font-family:Pyidaungsu,serif;display:flex;gap:12px;align-items:center;font-size:19px;font-weight:bold}.mark{background:var(--accent);color:var(--bg);display:grid;place-items:center;width:34px;height:34px;border-radius:8px;font:24px/1 Pyidaungsu,serif}
button,.back,.pager a{border:1px solid var(--line);background:var(--paper);border-radius:9px;padding:8px 14px}#theme{font:22px/1 Pyidaungsu,serif;padding:9px 12px}
.hero{margin:36px 0 42px;position:relative;isolation:isolate;overflow:hidden;min-height:335px;border-radius:17px;background:var(--hero);color:var(--cream);display:flex;align-items:center;padding:44px clamp(28px,6vw,79px)}
.hero-copy{z-index:1;max-width:55%}.eyebrow{font-size:13px;color:var(--accent)}.hero .eyebrow{color:#e0bc7e}
.hero h1{font:700 clamp(28px,4.2vw,53px)/1.6 Pyidaungsu,serif;margin:5px 0}
.intro{color:#e8e3cb}.primary{display:inline-flex;align-items:center;gap:18px;background:#efdbab;color:#243229;padding:10px 18px;border-radius:7px;margin-top:24px;font-weight:bold}
.art{position:absolute;right:7%;bottom:0;width:37%;height:100%;pointer-events:none}
.orbit{position:absolute;inset:11% -6% -25% 2%;border:1px solid #8c9a6d55;border-radius:50%;box-shadow:0 0 0 24px #c0be9410,0 0 0 49px #c0be940b}
.vol{position:absolute;bottom:13%;height:63%;width:37%;background:var(--cover);border-radius:4px 8px 8px 4px;border-left:7px solid #0003;box-shadow:7px 11px 20px #0005;transform:rotate(var(--angle));display:grid;place-items:center}
.vol:before{content:'';width:67%;height:78%;border:1px solid #fff6;border-radius:30% 30% 2px 2px}
.vol:after{content:'';position:absolute;width:43%;aspect-ratio:1;border:1px solid #fff6;transform:rotate(45deg);box-shadow:inset 0 0 0 7px #ffffff12}
.v1{--cover:#bb7b53;--angle:-17deg;left:5%}.v2{--cover:#547659;--angle:16deg;left:52%}.v3{--cover:#d1a457;--angle:0deg;left:29%;bottom:11%;height:71%}
.shelf-tools{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:17px}.shelf-tools h2{font:700 25px/1.6 Pyidaungsu,serif}.shelf-tools p{color:var(--muted);font-size:13px}
.search{display:flex;align-items:center;gap:10px;border:1px solid var(--line);background:var(--paper);padding:8px 13px;border-radius:8px;width:min(350px,100%)}.search span{font:25px/1 Pyidaungsu,serif}.search input{min-width:0;width:100%;border:0;background:transparent}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:15px}
.cover{display:flex;align-items:flex-end;justify-content:flex-end;aspect-ratio:3/4;padding:10px;background:#4b261b url('series-cover.webp') center 35%/cover no-repeat;color:#fff9eb}
.cover-number{padding:5px 8px;border-radius:6px;background:#1c120fe8;font:700 16px/1 Pyidaungsu,serif;font-variant-numeric:tabular-nums}
footer{border-top:1px solid var(--line);margin-top:42px!important;padding:19px 0;color:var(--muted);font-size:13px}footer span{padding:0 8px}
.reader-tools{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:18px 0;background:var(--bg);position:sticky;top:0;z-index:2}.reader-actions{display:flex;justify-self:end;gap:6px}.back{font-size:13px;justify-self:start}.reader-location{color:var(--accent);font:700 15px/1.65 Pyidaungsu,serif;text-align:center}
.layout{display:flex;gap:22px;align-items:flex-start;justify-content:center}.page{width:min(100%,850px);min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:clamp(20px,5vw,58px);position:relative;overflow:hidden}.progress{position:absolute;inset:0 0 auto;height:4px;background:var(--line)}.progress div{height:100%;background:var(--accent);width:0}.page h1{font:700 clamp(24px,3.5vw,39px)/1.65 Pyidaungsu,serif;margin:.35em 0 .8em}.page h1:focus{outline:none}
article{font:var(--size)/2.02 Pyidaungsu,serif;overflow-wrap:anywhere}article p{margin:0 0 1.14em;white-space:pre-wrap}
#toc{width:285px;flex-shrink:0;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:15px;position:sticky;top:80px;max-height:calc(100dvh - 152px - env(safe-area-inset-bottom,0px));overflow:auto}select{width:100%;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:5px;margin:6px 0 12px}
#chapters a{display:block;padding:8px;border-radius:6px;font-size:13px}#chapters a:hover,#chapters a[aria-current]{background:var(--bg);color:var(--accent)}#reader{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}.pager{position:fixed;inset:auto 0 0;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px;background:var(--bg);border-top:1px solid var(--line);padding:8px max(15px,calc((100% - 1216px)/2)) calc(8px + env(safe-area-inset-bottom,0px))}.pager a{justify-self:start}.pager #next{grid-column:2;justify-self:end}.pager:has([hidden]+[hidden]){display:none}
@media(max-width:760px){.wrap,.top-inner{width:calc(100% - 30px)}.hero{margin-top:22px;min-height:285px}.hero-copy{max-width:100%}.art{right:0;opacity:.35;width:48%}.grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.layout{display:block}#toc{position:static;width:100%;max-height:55vh;margin-bottom:12px}.page{width:100%}}
@media(max-width:500px){.hero{padding:28px 20px}.art{width:58%;right:-12%}.shelf-tools{align-items:stretch;flex-direction:column;gap:11px}.search{width:100%}.reader-tools{grid-template-columns:1fr auto;gap:6px 10px;padding:10px 0}.reader-tools button{padding:7px 10px}.reader-location{grid-column:1/-1;grid-row:2}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.shelf-controls{display:flex;align-items:center;justify-content:flex-end;flex:1;min-width:0;gap:12px}
.view-switch{display:inline-flex;flex-shrink:0;gap:3px;padding:3px;background:var(--paper);border:1px solid var(--line);border-radius:9px}
.view-switch button{border:0;padding:7px 10px;background:transparent;font:600 13px/1.4 Pyidaungsu,serif;white-space:nowrap}
.view-switch button[aria-pressed=true]{background:var(--accent);color:var(--bg)}
.grid.list-view{grid-template-columns:minmax(0,1fr);gap:7px}
@media(max-width:760px){.shelf-controls{flex-wrap:wrap}}
@media(max-width:500px){.shelf-controls{justify-content:flex-start}}

.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.hero-carousel{margin:30px 0 24px}
.book-heroes{display:grid;grid-auto-flow:column;grid-auto-columns:100%;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;border-radius:16px}
.book-heroes::-webkit-scrollbar{display:none}
.book-hero{scroll-snap-align:start}
.hero-carousel-controls{display:flex;justify-content:center;gap:2px;margin-top:5px}
.hero-carousel-controls button{display:grid;place-items:center;width:36px;height:34px;padding:0;border:0;background:transparent}
.hero-carousel-controls button::before{content:"";width:9px;height:9px;border-radius:50%;border:1.5px solid var(--accent)}
.hero-carousel-controls button[aria-pressed=true]::before{background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 17%,transparent)}
.book-hero{display:flex;align-items:center;min-height:370px;padding:clamp(22px,5vw,58px);overflow:hidden;border-radius:16px;position:relative;isolation:isolate;background:radial-gradient(ellipse at 77% 50%,#92562f 0%,transparent 51%),linear-gradient(125deg,#131d18 20%,#423025 82%,#2a201c);color:#fff7e7}
.book-hero::after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:linear-gradient(0deg,#080c0a76,transparent 36%)}
.book-hero.wanglin-hero{background:#0a0807 url("wanglin/hero-background.png") 68% center/cover no-repeat}
.book-hero.togh-hero{background:#07121a url("togh-hero-background.png") 65% center/cover no-repeat}
.book-hero::before{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:linear-gradient(90deg,#061018d9 0%,#06101887 38%,transparent 73%)}
@media(max-width:600px){.book-hero::before{background:linear-gradient(90deg,#061018ed 0%,#0610189c 49%,#0610180d 90%)}}
.hero-content{min-width:0;width:100%;max-width:56%}
.hero-content h2{max-width:18em;font:700 clamp(22px,3.05vw,40px)/1.65 Pyidaungsu,serif;text-shadow:0 2px 10px #0008}
.book-highlight{display:inline-flex;align-items:center;gap:12px;margin-top:12px;padding:7px 12px;background:#f9edd7;color:#202720;border-radius:7px;font-size:13px;font-weight:700}
.book-highlight:hover{background:#fff}
.continue-reading{margin:0 0 28px}
.continue-reading h2{font-size:24px;margin-bottom:13px}
.continue-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),195px));gap:12px}
.continue-empty{grid-column:1/-1;min-width:0;color:var(--muted);padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.continue-card{display:flex;align-items:center;gap:12px;min-width:0;padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.continue-card:hover{border-color:var(--accent)}
.continue-cover{width:42px;height:58px;flex:none;object-fit:cover;border-radius:5px}
.continue-copy{display:grid;gap:3px;min-width:0}
.continue-copy small{color:var(--muted);overflow-wrap:anywhere}
.continue-arrow{margin-left:auto;color:var(--accent)}
@media(max-width:760px){.hero-carousel{margin-top:20px}.book-hero{min-height:245px}}
.collections h2{font-size:24px;margin-bottom:13px}
.collection{scroll-margin-top:16px;margin:0 0 12px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.collection-summary{display:flex;align-items:center;gap:16px;min-height:102px;padding:12px 16px;cursor:pointer;list-style:none}
.collection-summary::-webkit-details-marker{display:none}
.collection-summary img{width:54px;height:76px;flex:none;border-radius:6px;object-fit:cover;object-position:center 32%}
.collection-summary:hover strong{color:var(--accent)}
.collection-copy{display:grid;gap:4px;min-width:0;font-size:clamp(15px,2.3vw,19px)}
.collection-copy small,.collection-toolbar p{color:var(--muted);font-size:13px}
.collection-chevron{margin-left:auto;color:var(--accent);font-size:24px;line-height:1}
.collection[open] .collection-chevron{transform:rotate(180deg)}
.collection-panel{padding:12px 16px 16px;border-top:1px solid var(--line)}
.collection-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.wanglin-grid .cover{background-image:url('wanglin/cover.png')}
@media(max-width:500px){.collection-toolbar{align-items:flex-start;flex-direction:column}.collection-summary{gap:12px;padding:10px 12px}.collection-panel{padding:10px}}

.home-section-header{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:13px}
.home-section-header h2{margin-bottom:0}
.continue-grid:not(.home-list-view) .continue-card{display:grid;align-content:start;gap:9px;padding:8px 8px 11px}
.continue-cover-frame{display:grid;place-items:center;flex:none}
.continue-grid:not(.home-list-view) .continue-cover-frame{height:130px;border-radius:6px;overflow:hidden;background:var(--bg)}
.continue-grid:not(.home-list-view) .continue-cover{display:block;width:100%;height:100%;min-height:0;object-fit:cover;object-position:center 32%;border-radius:0}
.continue-grid:not(.home-list-view) .continue-copy{padding-inline:3px}
.continue-grid:not(.home-list-view) .continue-copy strong{font-size:14px}
.continue-grid:not(.home-list-view) .continue-arrow{display:none}
.continue-grid:has(.continue-empty),.continue-grid.home-list-view{grid-template-columns:1fr}
.continue-grid.home-list-view .continue-cover{width:38px;height:52px;object-position:center 34%}
.collection-summary{min-height:76px;gap:12px}
.collection-summary img{width:40px;height:56px}
@media(max-width:500px){
  .book-hero{padding:18px;min-height:215px}
  .hero-content{max-width:76%}.hero-content h2{font-size:18px}
}

@media(max-width:500px){.continue-grid:not(.home-list-view):not(:has(.continue-empty)){grid-template-columns:repeat(2,minmax(0,1fr))}}

.series-hero{margin:28px 0 32px}
.hero-content h1{max-width:18em;font:700 clamp(22px,3.05vw,40px)/1.65 Pyidaungsu,serif}
.series-page-link{display:inline-flex;gap:8px;color:var(--accent);font-weight:700;margin-bottom:11px}

.volume-card{min-width:0;align-self:start;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.volume-card[open]{grid-column:1/-1;border-color:var(--accent)}
.volume-summary{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 10px;cursor:pointer;list-style:none;border-radius:inherit;overflow:hidden}
.volume-summary::-webkit-details-marker{display:none}
.volume-card[open] .volume-summary{border-radius:11px 11px 0 0}
.volume-summary .cover{grid-column:1/-1}
.volume-info{display:grid;gap:4px;min-width:0;padding:10px 0 10px 12px}
.volume-info strong{font-size:17px}
.volume-info small{color:var(--muted);font-size:13px}
.volume-chevron{color:var(--accent);font-size:22px;line-height:1;margin-right:13px}
.volume-card[open] .volume-chevron{transform:rotate(180deg)}
.list-view .volume-summary,.volume-card[open] .volume-summary{grid-template-columns:68px minmax(0,1fr) auto;gap:0 12px}
.list-view .volume-summary .cover,.volume-card[open] .volume-summary .cover{grid-column:auto;align-self:stretch;min-height:74px;aspect-ratio:auto;padding:6px}
.list-view .volume-info,.volume-card[open] .volume-info{padding-left:0}
.volume-chapters{margin:0;padding:0 10px;border-top:1px solid var(--line);list-style:none}
.volume-chapters li+li{border-top:1px solid var(--line)}
.volume-chapters a{display:block;padding:10px 6px;line-height:1.85;overflow-wrap:anywhere}
.volume-chapters a:hover,.matching-chapter{color:var(--accent);background:var(--bg)}
.volume-chapters a:focus-visible{outline-offset:-3px}

.pdf-pages{display:grid;gap:10px}
.pdf-page{width:100%;aspect-ratio:612/792;background:#fff;display:grid;place-items:center;overflow:hidden;border:1px solid var(--line)}
.pdf-page canvas{display:block;width:100%;height:auto}
.pdf-page a{color:#244f3c;padding:10px;text-decoration:underline}
@media(max-width:600px){.page:has(.pdf-pages){padding-inline:6px}}

.btth-grid .cover{background:#512628 url('btth/cover-art.webp') center/cover no-repeat}
.book-hero.btth-hero{background:#102b39 url("btth/hero-background.webp") 67% center/cover no-repeat}
.book-hero.btth-hero::before{background:linear-gradient(90deg,#061018ec 0%,#061018bb 33%,#06101833 57%,transparent 76%)}

.library-columns > *,
.original-library > * { min-width: 0; }
.library-columns { display: grid; gap: 24px; margin-block-end: 34px; }
.translated-directory { margin-block: 24px 40px; }
body[data-series-page="harry-potter"] .reader-location { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .library-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.harry-grid .cover {
  background: var(--bg);
  padding: 0;
  overflow: hidden;
}
.harry-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#harry-home-grid { grid-template-columns: minmax(0,1fr); }

