/* BOOK library only: natural rows, unified cover/title links and one quiet shelf per row. */
.toa-pages{--tp-bronze:#b29777;box-sizing:border-box;position:relative;width:100vw;max-width:none;min-width:0;left:50%;transform:translateX(-50%);margin:0;padding:0 0 calc(160px + env(safe-area-inset-bottom,0px));overflow-x:clip;background:#000;color:#d7cbbb;font:400 12px/1.5 Arial,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;color-scheme:dark;text-align:left}
.toa-pages *,.toa-pages *::before,.toa-pages *::after{box-sizing:border-box}
.toa-pages .toa-pages-shell{width:min(1180px,calc(100vw - 64px));max-width:none;margin:0 auto}
.toa-pages .toa-pages-label{display:flex;justify-content:space-between;align-items:center;gap:0;margin:0;padding:22px 0;border-bottom:1px solid #342b23;color:var(--tp-bronze);font-size:9px;line-height:1.5;letter-spacing:.16em}
.toa-pages .toa-pages-label::after{content:none}
.toa-pages .toa-pages-label>span:first-child{font:20px Georgia,serif;letter-spacing:.13em}
.toa-pages .toa-pages-room{width:100%;max-width:none;margin:60px auto 0;padding-bottom:57px;border-bottom:1px solid #342b23}
.toa-pages .toa-pages-bookcase{container-type:inline-size;margin-top:24px;padding:0;background:none;border:0}
.toa-pages .toa-pages-shelves{
 --tp-columns:4;--tp-gap:32px;--tp-inset:24px;
 --tp-cover-width:min(210px,calc((100cqw - var(--tp-inset)*2 - var(--tp-gap)*(var(--tp-columns) - 1))/var(--tp-columns)*.88));
 display:grid;grid-template-columns:repeat(var(--tp-columns),minmax(0,1fr));grid-auto-rows:auto;gap:8px var(--tp-gap);align-content:start;
 list-style:none;margin:0;padding:0 var(--tp-inset);min-height:0;background:none;
}
/* Subgrid shares cover and title tracks within each row, without a library-wide fixed height. */
.toa-pages .toa-pages-slot{--tp-show-shelf:none;position:relative;display:grid;grid-template-rows:subgrid;grid-row:span 2;min-width:0;height:auto;padding:20px 0 32px;margin:0;list-style:none}
.toa-pages .toa-pages-slot::before{content:none}
.toa-pages .toa-pages-slot::after{content:"";display:var(--tp-show-shelf);position:absolute;pointer-events:none;left:calc(-1*var(--tp-inset));bottom:6px;width:calc((100% + var(--tp-gap))*var(--tp-columns) - var(--tp-gap) + var(--tp-inset)*2);height:6px;border-top:1px solid #8a694a55;background:linear-gradient(#654a3155,#241b1380)}
.toa-pages .toa-pages-slot:where(:nth-child(4n + 1 of :not([hidden]))){--tp-show-shelf:block}
.toa-pages .toa-pages-book{display:grid;grid-template-rows:subgrid;grid-row:span 2;justify-items:center;row-gap:8px;position:relative;min-width:0;width:100%;margin:0;padding:0;border:0;background:none;box-shadow:none;color:inherit;text-decoration:none}
.toa-pages .toa-pages-book::before,.toa-pages .toa-pages-book::after{content:none}
.toa-pages .toa-pages-cover-visual{position:relative;display:block;align-self:end;width:var(--tp-cover-width);max-width:100%;background:none;box-shadow:0 2px 5px #0002}
.toa-pages .toa-pages-cover-image{display:block;position:static;width:100%;max-width:100%;height:auto;object-fit:contain}
.toa-pages .toa-pages-cover-visual--fallback,.toa-pages .toa-pages-book--demo .toa-pages-cover-visual{aspect-ratio:2/3}
.toa-pages .toa-pages-book-title{display:block;align-self:start;width:var(--tp-cover-width);max-width:100%;min-width:0;margin:0;padding:0;border:0;background:none;color:#d8c5ae;font:500 15px/1.55 "TOA Book Serif","Noto Serif KR","Nanum Myeongjo","AppleMyungjo","Batang",Georgia,serif;letter-spacing:0;text-align:center;text-transform:none;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
.toa-pages a.toa-pages-book:focus-visible{outline:2px solid #b29777;outline-offset:5px}
/* A generated cover is retained only when a publication has no cover media. */
.toa-pages .toa-pages-cover{position:absolute;inset:0;overflow:hidden;padding:10%;display:flex;flex-direction:column}
.toa-pages .toa-pages-book--ivory{background:#b9af99;color:#262820}
.toa-pages .toa-pages-cover-brand{font-size:clamp(7px,1cqw,9px);letter-spacing:.16em;line-height:1.4}
.toa-pages .toa-pages-identifier{margin-top:7%;padding-top:6%;border-top:1px solid #34362b66;font-size:clamp(8px,1.2cqw,10px);letter-spacing:.08em;line-height:1.4}
.toa-pages .toa-pages-title{position:relative;z-index:1;margin:12% 0 0;padding:0;font:400 clamp(15px,2.4cqw,27px)/1.07 Georgia,"Times New Roman",serif;letter-spacing:-.035em;color:inherit;overflow-wrap:anywhere}
.toa-pages .toa-pages-cover-art{flex:1;min-height:12px;margin-top:12%;background:linear-gradient(115deg,transparent 38%,#30382e 38% 64%,transparent 64%),linear-gradient(70deg,#777a66 38%,#9a9b82 38% 70%,#666b59 70%)}
.toa-pages .toa-pages-cover-footer{display:flex;justify-content:space-between;margin-top:7%;font-size:7px;letter-spacing:.13em;line-height:1.3}
.toa-pages .toa-pages-new{position:absolute;right:0;top:-18px;color:#bcad92;font-size:7px;letter-spacing:.13em;line-height:1}
/* Demo artworks are anonymous material/composition studies, never publications. */
.toa-pages .toa-pages-demo-art { position:absolute; inset:0; overflow:hidden; }
.toa-pages .toa-pages-book--charcoal { background:#242825; }
.toa-pages .toa-pages-book--charcoal .toa-pages-demo-art { background:linear-gradient(0deg,transparent 12%,#a3a38b 12% 13%,transparent 13% 17%,#a3a38b 17% 18%,transparent 18%),linear-gradient(125deg,transparent 40%,#657064 40% 61%,transparent 61%); }
.toa-pages .toa-pages-book--umber { background:#3b2e27; }
.toa-pages .toa-pages-book--umber .toa-pages-demo-art { inset:12%; border:1px solid #b99d6b55; background:radial-gradient(ellipse at 50% 43%,#93836a 0 24%,transparent 24.5%); }
.toa-pages .toa-pages-book--slim { background:#1d2021; }
.toa-pages .toa-pages-book--slim .toa-pages-demo-art { inset:10% 14%; background:repeating-linear-gradient(90deg,#c6c2ae88 0 1px,transparent 1px 12%); clip-path:polygon(0 15%,100% 0,100% 75%,0 100%); }
.toa-pages .toa-pages-book--taupe { background:#777568; }
.toa-pages .toa-pages-book--taupe .toa-pages-demo-art { inset:12%; background:linear-gradient(0deg,#232b26 0 43%,transparent 43%),linear-gradient(90deg,#a4a28d 0 48%,#545b4e 48%); }
.toa-pages .toa-pages-book--graphite { background:#262727; }
.toa-pages .toa-pages-book--graphite .toa-pages-demo-art { background:radial-gradient(circle at 65% 38%,#a6a08c 0 20%,transparent 20.5%),linear-gradient(0deg,transparent 18%,#8f8c7944 18% 18.5%,transparent 18.5%); }
.toa-pages .toa-pages-book--cloth { background:#34372e; }
.toa-pages .toa-pages-book--cloth .toa-pages-demo-art { inset:14% 16%; border-block:1px solid #c4b68f77; background:linear-gradient(90deg,transparent 49%,#c4b68f66 49% 50%,transparent 50%); }
.toa-pages .toa-pages-book--black { background:#111413; }
.toa-pages .toa-pages-book--black .toa-pages-demo-art { inset:16% 14%; background:linear-gradient(145deg,transparent 25%,#726953 25% 27%,transparent 27% 60%,#726953 60% 62%,transparent 62%); }

@container(max-width:820px){
 .toa-pages .toa-pages-shelves{--tp-columns:3;--tp-gap:26px;--tp-inset:20px}
 .toa-pages .toa-pages-slot{--tp-show-shelf:none}
 .toa-pages .toa-pages-slot:where(:nth-child(3n + 1 of :not([hidden]))){--tp-show-shelf:block}
}
@container(max-width:580px){
 .toa-pages .toa-pages-shelves{--tp-columns:2;--tp-gap:18px;--tp-inset:0px}
 .toa-pages .toa-pages-slot{--tp-show-shelf:none}
 .toa-pages .toa-pages-slot:where(:nth-child(2n + 1 of :not([hidden]))){--tp-show-shelf:block}
 .toa-pages .toa-pages-title{font-size:clamp(15px,4.1cqw,24px)}
}
@media(max-width:900px){.toa-pages .toa-pages-shell{width:calc(100vw - 48px)}}
@media(min-width:601px) and (max-width:900px){.toa-pages .toa-pages-room{padding-bottom:55px}}
@media(max-width:600px){
 .toa-pages .toa-pages-shell{width:calc(100vw - 32px)}
 .toa-pages .toa-pages-label{padding:18px 0}
 .toa-pages .toa-pages-room{margin-top:44px;padding-bottom:53px}
 .toa-pages .toa-pages-book-title{font-size:14px}
}
body.toa-pages-page .toa-pages{padding-top:82px}
/* Phase 1 final: release the theme's constrained chain only around this shell.
   Local Twenty Twenty-* templates use constrained Post Content and Group blocks.
   No viewport breakout/negative margins; global template parts stay untouched. */
body.toa-pages-page main:has(.toa-pages),
body.toa-pages-page :is(.site-main,.content-area,.site-content):has(.toa-pages),
body.toa-pages-page main :is(.wp-block-group,.wp-block-post-content,.entry-content,article,.wp-block-shortcode):has(.toa-pages) {
    box-sizing:border-box; width:100%; max-width:none!important; min-width:0;
    margin-inline:auto!important; padding-inline:0!important;
}
body.toa-pages-page main:has(.toa-pages),
body.toa-pages-page main :is(.wp-block-group,.wp-block-post-content,.entry-content):has(.toa-pages) {
    margin-top:0!important; padding-top:0!important;
}
body.toa-pages-page main:has(.toa-pages) :is(.wp-block-post-title,.entry-title,.page-title):not(.toa-pages *) { display:none!important; }
/* Remove wrappers made only of the theme heading and its spacer blocks.
   Do not hide a shared wrapper containing content or a featured image. */
body.toa-pages-page main:has(.toa-pages) :is(.wp-block-group,.entry-header,.page-header):has(> :is(.wp-block-post-title,.entry-title,.page-title)):not(:has(> :not(.wp-block-post-title,.entry-title,.page-title,.wp-block-spacer))) { display:none!important; }
body.toa-pages-page main:has(.toa-pages) .wp-block-spacer:has(+ .wp-block-post-title),
body.toa-pages-page main:has(.toa-pages) .wp-block-post-title + .wp-block-spacer { display:none!important; }
body.toa-pages-page main .toa-pages { max-width:none!important; margin-top:0!important; }

/* Bookshelf controls and page ending; original masthead, shelf and reader retained. */
.toa-pages [hidden]{display:none!important}
.toa-pages .toa-pages-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.toa-pages .toa-pages-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:0;padding:0;border:0}
.toa-pages .toa-pages-count{margin:0;flex:none;white-space:nowrap;color:#9e9588;font:400 9px/1.5 Arial,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;letter-spacing:.1em}
.toa-pages .toa-pages-tool-icon{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;margin:0;padding:0;color:#b29777;font:inherit;background:none;border:0;border-radius:0;box-shadow:none;cursor:pointer;letter-spacing:inherit}
.toa-pages .toa-pages-tool-icon::before,.toa-pages .toa-pages-tool-icon::after{content:none}
.toa-pages .toa-pages-tool-icon svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.2}
.toa-pages .toa-pages-tool-icon:focus-visible,.toa-pages .toa-pages-search input:focus-visible{outline:1px solid #d2b896;outline-offset:5px}
.toa-pages .toa-pages-search-toggle[aria-expanded=true]{color:#ead7bd;background:#b2977710}
.toa-pages .toa-pages-search-panel{display:flex;align-items:center;gap:8px;margin:10px 0 0;padding:0;background:transparent}
.toa-pages .toa-pages-search{display:flex;align-items:center;flex:1;min-width:0;gap:10px;margin:0;color:var(--tp-bronze);font-size:9px;letter-spacing:.1em}
.toa-pages .toa-pages-search input{display:block;width:100%;min-width:0;min-height:44px;margin:0;padding:8px 3px;border:0;border-bottom:1px solid #342b23;border-radius:0;box-shadow:none;background:transparent;color:#d7cbbb;font:11px Arial,sans-serif}
.toa-pages .toa-pages-search input::placeholder{color:#9e9588}
.toa-pages .toa-pages-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
.toa-pages .toa-pages-search-status{margin:8px 0 0;color:#9e9588;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.toa-pages{--toa-page-end-space:160px;padding-bottom:calc(var(--toa-page-end-space) + env(safe-area-inset-bottom,0px))}
@media(hover:hover){.toa-pages .toa-pages-tool-icon:hover{color:#ead7bd;background:#b2977710}}
@media(max-width:600px){.toa-pages{--toa-page-end-space:128px}.toa-pages .toa-pages-toolbar{gap:8px}.toa-pages .toa-pages-count{font-size:8px;letter-spacing:.04em}.toa-pages .toa-pages-search input{font-size:16px}}
