/* A flowing cabinet, built from small text-free pieces of the existing wood.
   The country room remains one aspect-correct image, never tiled or stretched. */
.continuous-room-scene{position:relative;display:grid;grid-template-columns:100%;isolation:isolate;container-type:inline-size;direction:ltr;background:#382213;overflow:clip}
.room-scenery{grid-area:1/1;position:sticky;top:0;align-self:start;overflow:hidden;height:51.8vw;z-index:-1;pointer-events:none}
.room-scenery img{display:block;width:100%;height:auto;max-width:none;margin-top:-4.5%;}
/* Cover the baked-in back label as the room artwork scales on wide displays. */
.continuous-room-back{position:absolute;left:8.2%;top:1.6cqw;z-index:2;background:#ddbb8c;padding:8px 12px;font-size:18px;min-width:12%;min-height:44px;display:flex;align-items:center}
.continuous-cabinet{--cover-height:clamp(210px,20vw,320px);grid-area:1/1;align-self:start;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:0;row-gap:0;margin:10.2vw 28.9% 0 10.7%;padding:28px 10px 24px;border-inline:12px ridge #704725;border-bottom:18px ridge #57361f;background:#3b2111 url('/assets/optimized/shelf-wood-panel.webp') repeat;box-shadow:inset 0 12px 20px #180b08a8,0 6px 12px #160b0870;min-width:0}
.shelf-volume{position:relative;display:grid;grid-template-rows:var(--cover-height) auto 1fr;min-width:0;margin:0;}
@supports(grid-template-rows:subgrid){.shelf-volume{grid-row:span 3;grid-template-rows:subgrid}.continuous-cabinet{grid-auto-rows:auto}.shelf-volume>.book-cover-link{height:var(--cover-height)}}
.shelf-volume .book-cover-link{width:100%;height:var(--cover-height);padding:0 14px;display:flex;align-items:flex-end;justify-content:center;filter:none;min-width:0;}
.shelf-volume .shelf-hardcover{height:auto;max-height:100%;width:auto;max-width:95%;filter:drop-shadow(0 5px 3px #150b09b0);}
.shelf-volume .real-cover{height:auto;max-height:calc(var(--cover-height) - 7px);width:auto;object-fit:contain;min-width:0;}
.shelf-volume [data-shelf-src]{opacity:0;}
.book-plinth{position:relative;display:flex;align-items:stretch;padding:12px 8px 14px;border-top:6px ridge #a2703d;border-bottom:6px ridge #57321b;background:#784c28 url('/assets/optimized/shelf-wood-beam.webp') repeat-x;background-size:auto 100%;box-shadow:0 8px 8px #1d0d0990;}
.shelf-volume:nth-child(3n+1) .book-plinth::before{content:'';position:absolute;left:0;top:-6px;bottom:-6px;width:300%;background:#784c28 url('/assets/optimized/shelf-wood-beam.webp') repeat-x;background-size:auto 100%;border-top:6px ridge #a2703d;border-bottom:6px ridge #57321b;box-shadow:0 8px 8px #1d0d0990;pointer-events:none;}
.book-plinth .shelf-label{z-index:1;}
.shelf-volume .shelf-label{position:relative;width:100%;height:auto;min-height:82px;margin:0;padding:9px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:linear-gradient(115deg,#b69a60,#d8c48d 42%,#b79b60);border:1px solid #806338;outline:1px solid #eee0bba0;outline-offset:-4px;color:#302313;box-shadow:0 2px 3px #1e11075c;font-size:18px;line-height:1.35;}
.shelf-volume .shelf-label strong{font:inherit;font-weight:500;word-break:normal;overflow-wrap:anywhere;}
.shelf-volume .shelf-label .shelf-languages{font:13px/1.4 system-ui,sans-serif;overflow-wrap:anywhere;}
.shelf-volume .shelf-access{position:static;inset:auto;width:auto;margin:0;padding:18px 10px 50px;color:#ffedcc;text-shadow:0 1px 2px #211107;}
.shelf-volume .book-access{background:none;padding:0;gap:8px;display:flex;flex-direction:column;align-items:center;text-align:center;}
.shelf-volume .access-status{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 10px;}
.shelf-volume .book-price{font-size:18px;}.shelf-volume .sales-state{font-size:13px;}
.shelf-volume .access-read{min-height:44px;padding:7px 12px;font-size:20px;display:flex;align-items:center;justify-content:center;}
.shelf-volume .book-preparation{font:14px/1.6 system-ui,sans-serif;text-wrap:pretty;word-break:normal;overflow-wrap:anywhere;}
.shelf-audio-languages{font:14px/1.55 system-ui,sans-serif;max-width:100%;}
.shelf-audio-languages summary{cursor:pointer;padding:10px 3px;min-height:44px;text-decoration:underline;text-underline-offset:4px;}
.shelf-audio-languages p{padding:4px 0 12px;overflow-wrap:anywhere;}
.shelf-volume .support-frame{max-width:100%;}
.shelf-empty{grid-column:1/-1;color:#fff1d6;text-align:center;padding:70px 20px;font-size:24px;}
.shelf-total{font-size:16px;}.continuous-room:lang(ko) .shelf-label strong,.continuous-room:lang(ko) .book-preparation{word-break:keep-all;overflow-wrap:anywhere;}
.site:has(.entry),.site:has(.new-hall),.site:has(.room-page){background-image:none}
@media(min-width:1800px){.continuous-cabinet{margin-right:28.9%;}.shelf-volume .shelf-label{font-size:21px}}
@media(max-width:1100px){
 .shelf-volume:nth-child(3n+1) .book-plinth::before{display:none;}
 .shelf-volume:nth-child(2n+1) .book-plinth::before{content:'';display:block;position:absolute;left:0;top:-6px;bottom:-6px;width:200%;background:#784c28 url('/assets/optimized/shelf-wood-beam.webp') repeat-x;background-size:auto 100%;border-top:6px ridge #a2703d;border-bottom:6px ridge #57321b;box-shadow:0 8px 8px #1d0d0990;pointer-events:none;}
 .continuous-cabinet{--cover-height:260px;grid-template-columns:repeat(2,minmax(0,1fr));margin-right:28.9%;margin-left:10.7%;padding-inline:6px;border-inline-width:9px;}
 .continuous-room-back{font-size:16px;padding:6px 10px;}
}
@media(max-width:700px){
 .continuous-cabinet{--cover-height:240px;margin:16vw 4% 0;padding:24px 5px 12px;border-inline-width:8px;}
 .room-scenery{position:sticky;height:51.8vw;}
 .continuous-room-back{left:4%;top:0;font-size:15px;min-height:40px;}
 .shelf-volume .shelf-label{font-size:18px;padding:9px 12px;}
 .shelf-volume .shelf-label .shelf-languages{font-size:13px;}
 .shelf-volume .shelf-access{padding:18px 10px 42px;}
 .shelf-introduction{padding:12px 18px 8px}.shelf-introduction>p{font-size:16px;line-height:1.5}.shelf-introduction .shelf-giving{font-size:13px;line-height:1.5}.shelf-introduction .restore-access,.shelf-introduction summary{font-size:14px}
 .shelf-total{font-size:14px;}
}
@media(max-width:600px){
 .shelf-volume .book-plinth::before{display:none!important;}
 .continuous-cabinet{--cover-height:280px;grid-template-columns:minmax(0,1fr);margin:22vw 4% 0;padding:26px 8px 0;}
 .shelf-volume .book-cover-link{padding-inline:20px;}
 .book-plinth{padding:12px 15px 14px;}.shelf-volume .shelf-label{font-size:20px;min-height:80px;}
 .room-controls{flex-wrap:wrap;}.continuous-room-back{top:3px;}
}

/* Country navigation has its own flowing area. Crop only the baked navigation strip,
   retaining the original cabinet and room artwork without stretching it. */
.room-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);align-items:center;gap:16px;padding:24px 6% 12px;background:#ead7b6;color:#3b2414}
.room-heading h1{font-size:clamp(32px,4vw,58px);font-weight:400;line-height:1.18;text-align:center;margin:0;overflow-wrap:anywhere;word-break:normal}
.room-heading a{display:flex;align-items:center;min-height:44px;font-size:18px}.room-my-books{justify-self:end}
.continuous-room .room-controls{padding-block:10px;min-height:0}.room-scenery img{margin-top:-10.5%}.room-scenery{height:45.8vw}
.continuous-cabinet{margin-top:4.3vw}.shelf-volume .shelf-access{padding-bottom:28px}.shelf-introduction{padding-block:12px}.shelf-introduction p{margin:0 0 5px}.shelf-introduction .restore-access{display:inline-flex;min-height:44px;align-items:center}
@media(max-width:700px){.room-heading{padding:18px 18px 8px;grid-template-columns:1fr 1fr;gap:6px 15px}.room-heading h1{grid-row:1;grid-column:1/-1;text-align:left}.room-heading a{font-size:16px}.room-my-books{grid-column:2}.continuous-cabinet{margin-top:5vw}.room-scenery{height:45.8vw}.shelf-volume .shelf-access{padding-bottom:28px}}
/* Flowing shelves reserve the full package height; no fixed-position price or CTA. */
.shelf-volume .book-access{gap:8px}.shelf-volume .book-package{margin:3px 0 0;font-size:16px;line-height:1.55}.shelf-volume .package-medium{font-size:14px;line-height:1.5}.shelf-volume .shelf-audio-languages{font-size:15px}.shelf-volume .book-price{font-size:23px}.shelf-volume .sales-state{font-size:14px;line-height:1.5}.shelf-volume .access-read{margin-top:4px;font-size:18px;min-height:44px}.shelf-volume .shelf-access{padding:18px 12px 32px}

/* Load only the next row while retaining the original continuous shelves. */
.list-load{text-align:center;padding:20px;min-height:110px;color:#f4e3c7}
.catalogue .list-load{color:#402a1b}.list-load p{margin-bottom:10px}
.loading-site{background-image:none!important}.loading-page{padding:30px 6%;color:#f4e3c7;min-height:70vh}

@media(max-width:700px){
 .site{background-image:linear-gradient(#4c301bb3,#321d12d9),image-set(url('/assets/optimized/korea-detail-840.webp') 1x,url('/assets/optimized/korea-detail-1672.webp') 2x)}
 .paper{background-image:image-set(url('/assets/optimized/korea-detail-840.webp') 1x,url('/assets/optimized/korea-detail-1672.webp') 2x)}
 .activity-paper{background-image:linear-gradient(90deg,transparent 48%,#a9927133 50%,transparent 52%),image-set(url('/assets/optimized/korea-detail-840.webp') 1x,url('/assets/optimized/korea-detail-1672.webp') 2x)}
 .reader-site{background-image:linear-gradient(#50331ee6,#2f1c10ee),image-set(url('/assets/optimized/book-room-blank-v2-840.webp') 1x,url('/assets/optimized/book-room-blank-v2-1672.webp') 2x)}
 .learning-site,.learning-site.theme-room{background-image:linear-gradient(#462b17bb,#2d1c10dd),image-set(url('/assets/optimized/book-desk-blank-v2-840.webp') 1x,url('/assets/optimized/book-desk-blank-v2-1672.webp') 2x)}
 .site:has(.entry),.site:has(.new-hall),.site:has(.room-page){background-image:none}
}
/* The shared header already paints the original timber in header-wood. */
.site .site-header.common-header{background-image:none}
@media(max-width:700px){
 .site:not(.reader-site):not(.learning-site):not(:has(.entry,.new-hall,.room-page)){background-image:image-set(url('/assets/optimized/korea-shelf-840.webp') 1x,url('/assets/optimized/korea-shelf-1672.webp') 2x)}
}

@media(max-width:700px){
 .learning-site .activity-paper{background-image:linear-gradient(90deg,#af906229,transparent 8%,transparent 94%,#a5835922),image-set(url('/assets/optimized/book-desk-blank-v2-840.webp') 1x,url('/assets/optimized/book-desk-blank-v2-1672.webp') 2x)!important}
}
