/* Preserve the library shell; the browser owns PDF controls and scrolling. */
.layout{height:100dvh;min-height:0;overflow:hidden}
.sidebar{overflow:auto}.main{height:100dvh;min-height:0}
.toolbar{display:none}
.native-viewer{display:flex;flex-direction:column;padding:0;overflow:hidden;min-height:0}
.native-viewer .message{flex:none;margin:0;padding:8px 16px;font-size:12px}
.native-pdf-shell{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;background:#525659}
.reader-pagebar{position:relative;z-index:4;display:flex;flex:none;align-items:center;justify-content:center;gap:8px;height:60px;padding:0 12px;overflow-x:auto;border-bottom:1px solid #ffffff12;background:linear-gradient(180deg,#3d4147,#32363b);color:#fff;box-shadow:0 3px 12px #0004;scrollbar-width:none}
.reader-pagebar::-webkit-scrollbar{display:none}
.reader-tool-group{display:flex;flex:none;align-items:center;gap:2px;padding:4px;border:1px solid #ffffff1c;border-radius:13px;background:#1118274d;box-shadow:inset 0 1px #ffffff0d,0 4px 12px #0003}
.reader-pagebar button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:transparent;color:#d6dce5;line-height:1;transition:color .16s ease,background .16s ease,transform .16s ease}
.reader-pagebar button svg,.native-edge svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.reader-pagebar button:hover{background:#ffffff17;color:#fff}.reader-pagebar button:active{transform:scale(.93)}
.reader-pagebar button:focus-visible,.native-edge:focus-visible{outline:2px solid #8ec5ff;outline-offset:2px}
.reader-pagebar button:disabled{opacity:.25;cursor:default;background:transparent;transform:none}
.reader-pagebar button[aria-pressed="true"]{background:#e9f3ff;color:#173c63;box-shadow:0 1px 4px #0004}
.desktop-toc-toggle{position:absolute;left:12px;display:flex!important;align-items:center;width:auto!important;min-width:102px;padding:0 12px!important;border:1px solid #ffffff1c!important;background:#1118274d!important;color:#e7edf5!important;font-size:12px;font-weight:700;white-space:nowrap;box-shadow:inset 0 1px #ffffff0d,0 4px 12px #0003}
.desktop-toc-toggle:hover{background:#ffffff17!important;color:#fff!important}
.reader-page-status{display:flex;align-items:center;justify-content:center;min-width:72px;height:34px;margin:0 3px;padding:0 10px;border:1px solid #ffffff14;border-radius:8px;background:#111418b8;color:#f6f8fb;text-align:center;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:.02em;box-shadow:inset 0 1px 3px #0005}
.reader-page-input{width:4ch;min-width:28px;padding:3px 2px;border:0;border-radius:5px;outline:0;background:transparent;color:inherit;text-align:right;font:inherit;font-variant-numeric:tabular-nums;appearance:textfield}.reader-page-input::-webkit-inner-spin-button,.reader-page-input::-webkit-outer-spin-button{margin:0;appearance:none}.reader-page-input:focus{background:#ffffff14;box-shadow:0 0 0 2px #8ec5ff}.reader-page-input:disabled{opacity:.55}
.reader-zoom-status{display:grid;place-items:center;min-width:54px;height:34px;color:#f6f8fb;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.focus-tool{grid-template-rows:17px 10px;width:auto!important;min-width:48px;padding:2px 7px 1px!important;gap:0!important}.reader-pagebar .focus-tool svg{width:17px;height:17px}.focus-tool span{font-size:10px;font-weight:700;line-height:1;white-space:nowrap;transform:translateY(-1px)}
.bookmark-tool{display:flex!important;grid-auto-flow:column;align-items:center;gap:5px;width:auto!important;min-width:34px;padding:0 8px!important;white-space:nowrap}.bookmark-tool svg{width:17px!important;height:17px!important}.bookmark-tool span{font-size:10px;font-weight:700;line-height:1}.bookmark-controls button[hidden]{display:none!important}
.mobile-header,.mobile-page-jumps,.mobile-primary-tools{display:none}
#mobileMore{display:none}
.reader-secondary-tools{display:contents}
.native-pages{display:flex;flex:1;min-width:0;min-height:0;background:#252525}
.native-pages.pdfjs-pages{display:block;overflow:auto;overscroll-behavior:none}.native-pages.page-fitted{overflow:hidden}
.spread-stage{display:flex;align-items:flex-start;justify-content:center;gap:3px;width:max-content;min-width:100%;min-height:100%;padding:var(--spread-padding,24px);box-sizing:border-box}
.spread-stage[hidden]{display:none}
.spread-page,.spread-blank{display:block;flex:none;background:#f8f9f7;box-shadow:0 7px 24px #0009}.spread-page{image-rendering:auto}
.spread-left{border-radius:3px 0 0 3px;box-shadow:inset -10px 0 18px #26394b12,0 7px 24px #0009}
.spread-right{border-radius:0 3px 3px 0;box-shadow:inset 10px 0 18px #26394b12,0 7px 24px #0009}
.spread-single{border-radius:3px}
.native-edge{position:absolute;z-index:3;top:calc(50% + 30px);display:grid;place-items:center;width:46px;height:68px;padding:0;transform:translateY(-50%);border:1px solid #ffffff2b;border-radius:12px;background:#111827b3;color:#fff;line-height:1;box-shadow:0 6px 20px #0005;opacity:.2;transition:opacity .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease}
.native-edge svg{width:28px;height:28px;stroke-width:1.8}
.native-edge:hover,.native-edge:focus-visible{opacity:.95;background:#111827ed;transform:translateY(-50%) scale(1.04);box-shadow:0 9px 28px #0008}
.native-edge:active{transform:translateY(-50%) scale(.97)}.native-edge:disabled{opacity:.06;cursor:default;transform:translateY(-50%)}
.native-edge-prev{left:16px}.native-edge-next{right:16px}
.layout.focus-reading .native-viewer{min-height:0;padding:0}
.layout.focus-reading .desktop-toc-toggle{display:none!important}
@media (min-width:761px) and (max-width:1100px) and (pointer:fine){
 .desktop-toc-toggle{width:34px!important;min-width:34px;padding:0!important;font-size:0}
 .desktop-toc-toggle::before{content:'☰';font-size:16px;line-height:1}
 .bookmark-tool{width:34px!important;padding:0!important}.bookmark-tool span{display:none}
}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 body{overflow:hidden}.layout{display:flex;flex-direction:column;height:var(--reader-viewport-height,100dvh);min-height:0;overflow:hidden}.sidebar,.sidebar.open{display:none!important}
 .main{flex:1 1 0;height:var(--reader-viewport-height,100dvh);max-height:var(--reader-viewport-height,100dvh);min-height:0;overflow:hidden}.native-viewer{flex:1 1 0;height:0;min-height:0;padding:0}.native-pdf-shell{height:100%;min-height:0}
 .toolbar{display:flex;z-index:30;min-height:42px;padding:5px 10px;flex-wrap:nowrap;background:#fff}.desktop-toc-toggle{display:none!important}
 .mobile-header{display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;gap:12px}.mobile-home{display:flex;align-items:center;width:76px;height:32px;border-radius:8px;transition:opacity .16s ease,box-shadow .16s ease}.mobile-home:active{opacity:.62}.mobile-home:focus-visible{outline:2px solid #75ade6;outline-offset:2px}.mobile-logo{display:block;width:76px;max-height:24px;object-fit:contain;object-position:left center}
 .mobile-toc{position:relative;display:block!important;min-width:142px;height:34px}
 .toolbar .mobile-toc-trigger{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:34px;min-height:34px;padding:0 8px!important;border:1px solid #1e5788;border-radius:10px;background:#245f94;color:#fff;font-size:12px;font-weight:700;box-shadow:0 2px 7px #18334f2e}
 .mobile-toc-trigger svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mobile-toc-list-icon{width:17px!important;height:17px!important}.mobile-toc-chevron{transition:transform .18s ease}.mobile-toc-badge{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ffffff2b;color:#fff;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}.mobile-toc.open .mobile-toc-trigger{border-color:#174b77;background:#174f7e;box-shadow:0 0 0 3px #9cc7ee70}.mobile-toc.open .mobile-toc-chevron{transform:rotate(180deg)}
 .mobile-toc.attention::before{content:'';position:absolute;z-index:42;top:calc(100% + 6px);right:19px;border-right:7px solid transparent;border-bottom:8px solid #174f7e;border-left:7px solid transparent}.mobile-toc.attention::after{content:'읽을 글을 골라보세요';position:absolute;z-index:41;top:calc(100% + 14px);right:0;width:max-content;padding:8px 11px;border-radius:9px;background:#174f7e;color:#fff;font-size:11px;font-weight:700;line-height:1.35;box-shadow:0 8px 22px #10283f4d;animation:toc-hint-in .22s ease-out}.mobile-toc.attention .mobile-toc-trigger{animation:toc-attention 1.05s ease-in-out 2}.mobile-toc.open::before,.mobile-toc.open::after{display:none}
 .mobile-toc-menu[hidden]{display:none!important}.mobile-toc-menu{position:absolute;top:calc(100% + 7px);right:0;z-index:40;width:min(280px,calc(100vw - 20px));max-height:min(55dvh,410px);padding:7px;border:1px solid #dce5ef;border-radius:14px;background:#fffffff7;box-shadow:0 16px 40px #172b4252,0 2px 8px #172b4218;backdrop-filter:blur(16px);overflow:hidden;animation:mobile-toc-in .15s ease-out}
 .mobile-toc-menu-head{display:flex;align-items:center;justify-content:space-between;padding:7px 8px 9px;border-bottom:1px solid #edf1f5;color:#263f59}.mobile-toc-menu-head strong{font-size:12px}.mobile-toc-menu-head span{font-size:10px;font-weight:600;color:#8a9aad}
 .mobile-toc-list{display:grid;gap:2px;max-height:calc(min(55dvh,410px) - 43px);padding-top:5px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cbd8e6 transparent}.mobile-toc-list::-webkit-scrollbar{width:5px}.mobile-toc-list::-webkit-scrollbar-thumb{border-radius:5px;background:#cbd8e6}
 .toolbar .mobile-toc-option{position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:8px;width:100%;min-height:36px;padding:7px 30px 7px 8px!important;border:0;border-radius:9px;background:transparent;color:#4b5f74;text-align:left;font-size:12px;font-weight:500;line-height:1.45;white-space:normal}.toolbar .mobile-toc-option:hover,.toolbar .mobile-toc-option:focus-visible{background:#f0f5fa;color:#244d75}.toolbar .mobile-toc-option.active{background:#e8f2fd;color:#15568e;font-weight:700}.toolbar .mobile-toc-option.active::after{content:'✓';position:absolute;right:11px;color:#2879bd;font-size:12px}.mobile-toc-title{min-width:0;overflow-wrap:anywhere}
 @keyframes mobile-toc-in{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}@keyframes toc-hint-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}@keyframes toc-attention{0%,100%{transform:none;box-shadow:0 2px 7px #18334f2e}50%{transform:translateY(-1px);box-shadow:0 0 0 5px #7ab5e75c,0 4px 12px #18334f38}}
 .layout.focus-reading .main{height:var(--reader-viewport-height,100dvh);max-height:var(--reader-viewport-height,100dvh)}
 .reader-pagebar{justify-content:center;gap:7px;height:48px;padding:0 8px;overflow:visible}.reader-tool-group{padding:3px}.reader-pagebar button{width:32px;height:32px}.reader-page-controls{padding:0;border:0;background:transparent;box-shadow:none}.reader-page-controls #firstPage,.reader-page-controls #prevPage,.reader-page-controls #nextPage,.reader-page-controls #lastPage{display:none}.reader-page-status{min-width:68px;height:32px;margin:0;padding:0 7px}.reader-zoom-status{min-width:46px;height:32px}
 .reader-secondary-tools{display:none;position:absolute;z-index:8;top:calc(100% + 6px);right:8px;max-width:calc(100vw - 16px);padding:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;border:1px solid #ffffff24;border-radius:13px;background:#252a31f5;box-shadow:0 12px 28px #0008;backdrop-filter:blur(12px)}.reader-pagebar.more-open .reader-secondary-tools{display:flex}
 .reader-secondary-tools .mobile-page-jumps{display:flex}
 .mobile-more{display:grid!important;place-items:center;width:34px!important;height:34px!important;border:1px solid #ffffff1c!important;border-radius:10px!important;background:#1118274d!important;color:#d6dce5!important}.mobile-more[aria-expanded="true"]{background:#e9f3ff!important;color:#173c63!important}
 .reader-secondary-tools .focus-tool span{display:block}.focus-tool{grid-template-rows:17px 10px;min-width:48px;padding:2px 7px 1px!important}
 .reader-secondary-tools .bookmark-controls{display:flex;flex-basis:100%;justify-content:center}
 .reader-secondary-tools .bookmark-tool span{display:block}
 .mobile-primary-tools{display:flex;align-items:center;gap:5px}
 .mobile-primary-tools .reader-tool-group{height:32px;padding:2px;border-radius:10px}
 .mobile-primary-tools button{width:28px;height:28px}
 .mobile-primary-tools .reader-zoom-status{min-width:35px;height:28px;font-size:10px}
 .native-pages.pdfjs-pages{touch-action:pan-x pan-y}.native-pages.page-fitted,.native-pages.swipe-enabled{touch-action:pan-y}
 .spread-stage{gap:2px}
 .native-edge{display:none!important}
}
@media(orientation:portrait) and (max-width:760px),(orientation:portrait) and (max-width:1000px) and (pointer:coarse){
 .mobile-primary-tools .mobile-primary-view-controls{display:none}
 .reader-secondary-tools .zoom-controls,.reader-secondary-tools .fit-controls,.reader-secondary-tools .view-controls{display:none!important}
}
@media (orientation:landscape) and (max-width:760px),(orientation:landscape) and (max-width:1000px) and (pointer:coarse){
 .toolbar{height:42px;min-height:42px;padding:4px 10px}
 .mobile-logo{width:66px;max-height:21px}
 .mobile-toc{min-width:132px;height:32px}.toolbar .mobile-toc-trigger{height:32px;min-height:32px;padding:0 7px!important}.mobile-toc-menu{top:calc(100% + 11px);max-height:min(68dvh,360px)}.mobile-toc-list{max-height:calc(min(68dvh,360px) - 43px)}
 .reader-pagebar{position:fixed;top:0;left:50%;z-index:40;width:auto;height:42px;padding:0;gap:5px;transform:translateX(-50%);border:0;background:transparent;box-shadow:none}
 .reader-page-controls{height:32px;padding:2px;gap:1px;border:1px solid #ffffff1c;border-radius:10px;background:#1118274d;box-shadow:inset 0 1px #ffffff0d,0 4px 12px #0003}
 .reader-page-controls #firstPage,.reader-page-controls #prevPage,.reader-page-controls #nextPage,.reader-page-controls #lastPage{display:grid;width:27px;height:28px}
 .reader-page-controls button svg{width:18px;height:18px}
 .reader-page-status{min-width:62px;height:30px;padding:0 6px;background:#1b2028e8}
 .mobile-more{width:32px!important;height:32px!important}
 .reader-secondary-tools{top:calc(100% + 5px);right:0}
 .reader-secondary-tools .zoom-controls,.reader-secondary-tools .fit-controls,.reader-secondary-tools .view-controls{display:none}
}
@media (orientation:landscape) and (max-width:700px){
 .mobile-primary-tools .mobile-primary-zoom-controls{display:none}
 .reader-secondary-tools .zoom-controls{display:flex}
}
@media (prefers-reduced-motion:reduce){.mobile-toc.attention .mobile-toc-trigger,.mobile-toc.attention::after{animation:none}}

/* Welcome is visible immediately, before the catalogue or PDF renderer loads. */
.welcome[hidden]{display:none}
.is-welcome .native-pdf-shell{display:none}
.welcome{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:clamp(28px,6vw,88px) clamp(20px,5vw,72px);background:radial-gradient(ellipse at 90% 0,#e8eff7 0,transparent 55%),#f5f7fa}
.welcome-card{max-width:960px;margin:0 auto;padding:clamp(28px,4vw,56px);border:1px solid #e3e9f0;border-radius:24px;background:#fff;box-shadow:0 16px 56px #233d5810;container-type:inline-size}
.welcome-eyebrow{display:block;margin-bottom:22px;color:#59748f;font-size:10px;font-weight:700;letter-spacing:.16em;line-height:1.6}
.welcome h2{margin:0 0 28px;color:#203b55;font-size:26px;font-size:clamp(20px,3.1cqi,26px);font-weight:700;line-height:1.55;letter-spacing:-.045em;word-break:keep-all;overflow-wrap:anywhere}
.welcome-body{color:#47596b;font-size:16px;line-height:1.95;word-break:keep-all;overflow-wrap:anywhere}
.welcome-body p{margin:0 0 18px}
.welcome-body .welcome-closing{margin:28px 0 0;color:#2e4e6b}
.welcome-closing strong{font-weight:600}
.welcome-copyright{margin-top:36px;padding-top:26px;border-top:1px solid #e8ecf0;color:#737b85;font-size:12px;line-height:1.9;word-break:keep-all;overflow-wrap:anywhere}
.welcome-copyright h3{margin:0 0 12px;color:#626c77;font-size:13px;font-weight:600}
.welcome-copyright p{margin:0 0 10px}
.welcome-copyright p:last-child{margin-bottom:0}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 .welcome{padding:24px 16px 32px}
 .welcome-card{padding:28px 23px;border-radius:18px}
 .welcome-eyebrow{font-size:9px;margin-bottom:18px}
 .welcome h2{font-size:25px;margin-bottom:24px}
 .welcome-body{font-size:15px;line-height:1.9}
 .welcome-copyright{margin-top:28px;padding-top:22px}
}

/* Keep the desktop welcome; give mobile readers a direct route to resources. */
.welcome-mobile,.welcome-mobile-title,.welcome-cover,.welcome-intro{display:none}
@media(max-width:760px),(max-width:1000px) and (pointer:coarse){
 .welcome{padding:32px 24px 40px;background:#fff}
 .welcome-card{max-width:560px;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}
 .welcome-desktop-title,.welcome-desktop,.welcome-card>.welcome-copyright{display:none}
 .welcome-mobile,.welcome-mobile-title{display:block}
 .main.is-home .mobile-toc{display:none!important}
 .welcome-eyebrow{display:none}
 .welcome-heading{display:grid;grid-template-columns:clamp(68px,21cqi,88px) minmax(0,1fr);align-items:center;gap:20px}
 .welcome-cover{display:block;width:100%;height:auto;border-radius:2px;box-shadow:0 4px 12px #203b551a}
 .welcome-heading-copy{min-width:0}
 .welcome h2{margin:0 0 10px;font-size:clamp(19px,5.8cqi,24px);line-height:1.4;letter-spacing:-.035em}
 .welcome-mobile-title>span{display:block}
 .welcome-book-title{margin-bottom:4px;font-size:13px;font-weight:500;letter-spacing:0;color:#647180}
 .welcome-intro{display:block;margin:0;color:#647180;font-size:12px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
 .welcome-resources{margin:32px 0 28px}
 .welcome-resources h3{margin:0 0 10px;color:#203b55;font-size:14px;font-weight:700}
 .welcome-resource-list{border-top:1px solid #e3e8ee}
 .welcome-resource{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:56px;padding:15px 0;border:0;border-bottom:1px solid #e3e8ee;border-radius:0;background:transparent;color:#2e4e6b;text-align:left;font-size:15px;line-height:1.6}
 .welcome-resource span:first-child{min-width:0;overflow-wrap:anywhere;word-break:keep-all}
 .welcome-resource span:last-child{flex:none;color:#7b8fa2}
 .welcome-resource:hover{background:#f5f8fb}
 .welcome-details{border-bottom:1px solid #e8ecf0;color:#737b85;font-size:12px;line-height:1.9;word-break:keep-all;overflow-wrap:anywhere}
 .welcome-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px 0;list-style:none;cursor:pointer;color:#626c77;font-size:13px;font-weight:500}
 .welcome-details summary::-webkit-details-marker{display:none}
 .welcome-details summary::after{content:'+';font-size:18px;font-weight:400}
 .welcome-details[open] summary::after{content:'\2212'}
 .welcome-details summary:focus-visible{outline:3px solid #a5c8fb;outline-offset:2px}
 .welcome-details p{margin:0 0 12px}
}
