:root{--ink:#18312f;--muted:#61736f;--brand:#164d46;--brand2:#267b6d;--bg:#f5f8f7;--surface:#fff;--soft:#e8f0ed;--line:#dce5e1;--accent:#bd7243;--font:18px;--shadow:0 12px 35px #153b3210;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;line-height:1.65}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{border:0;background:transparent;color:inherit}button:disabled{opacity:.5;cursor:wait}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--brand2);outline-offset:4px}button:focus:not(:focus-visible){outline:0}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.45;font-weight:650;letter-spacing:.025em}h1{font-size:2rem}h2{font-size:1.4rem}h3{font-size:1.08rem}p{margin-bottom:1rem}small,.muted{color:var(--muted)}.topbar{height:80px;border-bottom:1px solid var(--line);background:var(--surface);display:flex;justify-content:space-between;align-items:center;padding:0 max(28px,calc((100vw - 1240px)/2));position:sticky;top:0;z-index:20;gap:16px}.brand{display:flex;align-items:center;gap:12px;font-size:1.17rem;font-weight:700;letter-spacing:.1em;flex-shrink:0}.brand small{display:block;font-size:.75rem;letter-spacing:.09em;font-weight:400}.top-actions{display:flex;align-items:center;gap:20px}.top-actions button{min-height:44px;padding:6px 8px;font-size:.9rem}.icon-label{display:flex;align-items:center;gap:9px}.search-symbol{width:15px;height:15px;border:1.8px solid currentColor;border-radius:50%;display:inline-block;position:relative}.search-symbol:after{content:"";position:absolute;width:7px;height:2px;background:currentColor;transform:rotate(45deg);right:-5px;bottom:-3px}.wrap{max-width:1184px;margin:0 auto;padding:48px 28px 64px}.eyebrow{font-size:.8rem;font-weight:700;letter-spacing:.15em;color:var(--brand2);margin-bottom:16px}.hero{display:grid;grid-template-columns:1.5fr .8fr;gap:60px;align-items:center;padding:24px 0 46px}.hero h1{font-size:clamp(2rem,4vw,3rem);line-height:1.4;margin-bottom:20px}.hero p{color:var(--muted);max-width:570px}.hero-art{position:relative;height:255px;display:grid;place-items:center;background:var(--brand);border-radius:50% 50% 42% 58%/48% 38% 62% 52%;color:#d7eee4;overflow:hidden}.hero-art svg{width:200px;height:200px}.hero-art:before,.hero-art:after{content:"";position:absolute;border:1px solid #ffffff25;width:350px;height:350px;border-radius:50%;top:-130px;left:-80px}.hero-art:after{top:100px;left:130px}.hero-terms{position:absolute;bottom:27px;font-size:.78rem;letter-spacing:.18em;color:#e3f0e9}.search-entry{display:flex;gap:14px;align-items:center;padding:17px 20px;background:var(--surface);border:1px solid var(--line);border-radius:12px;width:100%;max-width:565px;text-align:left;color:var(--muted);box-shadow:0 4px 10px #12362a04}.search-entry kbd{margin-left:auto;border:1px solid var(--line);border-radius:5px;font-size:.8rem;padding:0 6px;color:var(--muted)}.section-head{display:flex;justify-content:space-between;align-items:baseline;margin:12px 0 20px;gap:20px}.section-head h2{margin:0;font-size:1.25rem}.text-link{color:var(--brand2);font-size:.9rem;font-weight:600}.feature-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:20px;margin-bottom:44px}.feature{border-radius:14px;border:1px solid var(--line);background:var(--surface);padding:28px;position:relative;overflow:hidden;transition:transform .2s,border-color .2s}.feature:hover,.volume-card:hover{transform:translateY(-3px);border-color:var(--brand2)}.feature.primary-feature{background:var(--brand);color:white;border-color:var(--brand)}.feature .tag{color:var(--brand2);font-size:.8rem;letter-spacing:.1em}.primary-feature .tag{color:#bdddd3}.feature h2{font-size:1.6rem;margin:10px 0}.feature p{max-width:400px;font-size:.95rem;color:var(--muted);margin-bottom:24px}.primary-feature p{color:#d6e7e1}.chip-row{display:flex;flex-wrap:wrap;gap:8px}.chip{font-size:.8rem;background:var(--soft);color:var(--brand);padding:5px 10px;border-radius:5px}.primary-feature .chip{background:#ffffff19;color:#e8f5f0}.book-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.volume-card{border:1px solid var(--line);background:var(--surface);padding:22px;border-radius:12px;transition:transform .2s,border-color .2s;min-height:185px}.volume-card .volume-num{font-size:.76rem;letter-spacing:.12em;font-weight:650;color:var(--brand2)}.volume-card h3{font-size:1.1rem;margin:12px 0 9px}.volume-card p{font-size:.85rem;color:var(--muted);margin-bottom:20px}.volume-card small{font-size:.76rem}.continue{display:flex;align-items:center;justify-content:space-between;background:var(--soft);border-left:3px solid var(--brand2);padding:18px 22px;border-radius:0 10px 10px 0;margin:0 0 30px;gap:20px}.continue p{margin:0;font-weight:600}.continue small{display:block;margin-bottom:5px}.continue span{flex-shrink:0;font-size:.88rem;color:var(--brand2)}.pathway{margin-top:42px;padding-top:30px;border-top:1px solid var(--line)}.pathway p{font-size:.92rem;color:var(--muted);max-width:800px}.pathway-links{display:flex;flex-wrap:wrap;gap:10px}.pathway-links a,.pill{border:1px solid var(--line);border-radius:999px;background:var(--surface);padding:9px 15px;font-size:.88rem}.page-heading{max-width:760px;margin-bottom:32px}.page-heading p{color:var(--muted)}.back-link{display:inline-flex;font-size:.85rem;color:var(--muted);margin-bottom:25px;min-height:35px;align-items:center}.pill.active{background:var(--brand);border-color:var(--brand);color:#fff}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:26px}.catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.chapter-list{list-style:none;padding:0;margin:0;display:grid;gap:9px}.chapter-item{display:block;position:relative;padding:20px 22px;border:1px solid var(--line);border-radius:9px;background:var(--surface);height:100%}.chapter-item:hover{border-color:var(--brand2);background:var(--soft)}.chapter-item strong{display:block;font-weight:600;font-size:1rem}.chapter-item small{display:block;font-size:.8rem;margin-bottom:5px}.chapter-item .section-code{font-variant-numeric:tabular-nums;color:var(--brand2)}.chapter-item p{font-size:.88rem;color:var(--muted);margin:7px 0 0}.empty{padding:55px 20px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:12px}.reader-layout{max-width:1440px;margin:auto;display:grid;grid-template-columns:270px minmax(0,1fr);min-height:calc(100vh - 80px)}.reader-sidebar{border-right:1px solid var(--line);background:var(--surface);position:sticky;top:80px;height:calc(100vh - 80px);overflow-y:auto;padding:24px 18px}.reader-sidebar .back-link{margin-bottom:10px}.reader-sidebar h2{font-size:1.05rem;margin-bottom:20px}.reader-sidebar a.section-nav{display:block;font-size:.82rem;color:var(--muted);padding:10px 12px;border-radius:6px;margin-bottom:3px;line-height:1.55}.reader-sidebar a.section-nav span{font-size:.72rem;display:block;color:var(--brand2)}.reader-sidebar a.current{color:var(--brand);font-weight:600;background:var(--soft)}.reader-shell{padding:32px 52px 70px;min-width:0}.reader-toolbar{display:flex;justify-content:space-between;align-items:center;max-width:860px;margin:0 auto 30px;gap:14px}.reader-toolbar>div{display:flex;gap:6px}.small-button{font-size:.83rem;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:var(--surface);min-height:40px}.small-button[aria-pressed=true]{background:var(--soft);color:var(--brand)}.mobile-toc{display:none}.reader{max-width:860px;margin:0 auto;font-size:var(--font);line-height:1.95;overflow-wrap:anywhere}.reader .reader-title{font-size:1.9rem;line-height:1.5;margin-bottom:25px;letter-spacing:.02em}.reader-meta{font-size:.8rem;color:var(--brand2);letter-spacing:.04em;margin-bottom:12px}.reader h2{font-size:1.34em;margin-top:2.2em;margin-bottom:.85em;padding-top:12px;border-top:1px solid var(--line)}.reader h3,.reader h4{font-size:1.13em;margin-top:1.8em;margin-bottom:.75em}.reader p{margin-bottom:1.1em;white-space:normal}.reader a{color:var(--brand2);text-decoration:underline;text-underline-offset:3px;word-break:break-word}.reader img{display:block;max-width:100%;height:auto;margin:25px auto;background:white;cursor:zoom-in;border-radius:6px}.reader p:has(>img:only-child){margin:0}.reader .caption,.reader .source-note{font-size:.82em;color:var(--muted);line-height:1.8}.table-wrap{max-width:100%;overflow-x:auto;margin:20px 0 28px;border:1px solid var(--line);border-radius:8px;-webkit-overflow-scrolling:touch}.table-wrap table{border-collapse:collapse;min-width:100%;font-size:.86em;line-height:1.8}.table-wrap th,.table-wrap td{border:1px solid var(--line);padding:13px 16px;text-align:left;vertical-align:top;min-width:120px;max-width:600px}.table-wrap th{background:var(--soft);color:var(--brand);font-weight:600}.table-wrap td{background:var(--surface)}.table-wrap p{margin:0}.table-wrap td p+p{margin-top:10px}.table-wrap th:only-child,.table-wrap td:only-child{min-width:0}.table-wrap table:has(tr:first-child:nth-last-child(1)){font-size:.85em}.related{max-width:860px;margin:44px auto 0;padding-top:26px;border-top:1px solid var(--line)}.related h2{font-size:1.12rem}.related-links{display:grid;gap:9px}.related-links a{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:13px 16px;font-size:.88rem}.related-links small{display:block;color:var(--brand2);font-size:.75rem}.reader-next{max-width:860px;margin:32px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:14px}.reader-next a{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:16px;font-size:.88rem}.reader-next small{display:block;margin-bottom:6px}.reader-next a:last-child{text-align:right}.reader-footer{max-width:860px;margin:28px auto 0;text-align:center}.progress-top{height:3px;background:var(--brand2);position:fixed;top:80px;left:0;z-index:25;width:0}.search-box{display:flex;align-items:center;background:var(--surface);border:1px solid var(--brand2);border-radius:10px;padding:4px 15px;margin-bottom:18px;gap:12px}.search-box input{background:transparent;color:var(--ink);width:100%;border:0;outline:0;padding:14px 8px;min-width:0}.search-box button{font-size:.82rem;padding:10px;min-height:44px;white-space:nowrap}.search-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px}.search-results{display:grid;gap:10px}.search-results .chapter-item strong mark{background:#ffe7ac;color:#47350b}.search-results mark{background:#ffe7ac;color:#47350b;padding:0 2px}.search-results .chapter-item p{line-height:1.8}.search-count{font-size:.85rem;color:var(--muted);margin-bottom:15px}.primary,.secondary{border-radius:8px;padding:12px 18px;font-weight:600;font-size:.92rem;min-height:46px}.primary{background:var(--brand);color:#fff}.secondary{border:1px solid var(--line);background:var(--surface);color:var(--brand)}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}dialog{border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);padding:28px;max-width:480px;width:calc(100vw - 32px);box-shadow:var(--shadow);max-height:85vh;overflow:auto}dialog::backdrop{background:#10252185;backdrop-filter:blur(4px)}.dialog-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px;gap:20px}.dialog-title h2{margin:0;font-size:1.2rem}.close{font-size:1.8rem;line-height:1;min-width:40px;min-height:40px}.dialog-title .close{margin-right:-10px}dialog label{display:block;font-size:.9rem;font-weight:600;margin:18px 0 10px}dialog output{float:right;color:var(--muted);font-weight:400}dialog input[type=range]{width:100%;accent-color:var(--brand2)}dialog select{width:100%;padding:10px 12px;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:7px}dialog h3{margin-top:22px}dialog p{font-size:.87rem;color:var(--muted)}dialog hr{border:0;border-top:1px solid var(--line);margin:27px 0}#offlineStatus{margin-top:12px}#imageDialog{max-width:1200px;width:95vw;padding:22px;background:white;color:#18312f}#imageDialog .close{position:sticky;float:right;top:0;background:#fff;border:1px solid #dce5e1;border-radius:50%}#imageDialog .image-scroll{overflow:auto;width:100%;clear:both}#zoomImage{width:auto;max-width:none;max-height:none;display:block}#imageDialog p{text-align:center;margin:15px 0 0}.loading{min-height:70vh;display:grid;place-content:center;text-align:center;gap:20px;color:var(--muted)}.loading-mark{height:34px;width:34px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--brand);margin:auto;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:fixed;bottom:95px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--surface);border-radius:8px;padding:12px 20px;font-size:.9rem;z-index:100;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90vw}#toast.show{opacity:1}.bottom-nav{display:none}.skip-link{position:fixed;left:15px;top:-70px;background:var(--brand);color:#fff;padding:12px;z-index:200}.skip-link:focus{top:12px}.intro-note{padding:20px 0;border-top:1px solid var(--line);font-size:.87rem;color:var(--muted);margin-top:35px}.toc-dialog-list{display:grid;gap:8px}.toc-dialog-list a{padding:12px 8px;border-bottom:1px solid var(--line);font-size:.9rem}.notice{padding:20px;border:1px solid var(--line);border-radius:10px;margin-top:24px}.notice p{margin:0;color:var(--muted);font-size:.9rem}[hidden]{display:none!important}
[data-theme=dark]{--ink:#e1ece7;--muted:#a6bcb2;--brand:#b2dcc7;--brand2:#93cbb4;--bg:#14221f;--surface:#1d2e29;--soft:#283f36;--line:#375046;--shadow:0 12px 35px #0002;color-scheme:dark}[data-theme=dark] .primary-feature,[data-theme=dark] .hero-art{background:#285a4b;color:#fff}[data-theme=dark] .primary{background:#b2dcc7;color:#153d30}[data-theme=dark] .feature.primary-feature{border-color:#285a4b}[data-theme=dark] .pill.active{color:#153d30}
@media(min-width:1500px){.reader-shell{padding-left:80px;padding-right:80px}}
@media(max-width:1050px){.book-grid{grid-template-columns:repeat(3,1fr)}.reader-layout{grid-template-columns:235px minmax(0,1fr)}.reader-shell{padding:30px 30px 65px}.reader-sidebar{padding:22px 12px}.hero{gap:30px}.hero-art{height:220px}}
@media(max-width:760px){.topbar{height:68px;padding:0 19px}.brand{font-size:1rem;gap:9px}.brand small{font-size:.66rem}.brand img{width:31px;height:31px}.top-actions{gap:4px}.top-actions button{padding:8px;font-size:.88rem}.top-actions .icon-label span:last-child{display:none}.top-actions .icon-label{width:40px;justify-content:center}.wrap{padding:28px 20px 110px}.hero{display:block;padding:12px 0 28px}.hero h1{font-size:clamp(1.6rem,7.2vw,2rem);line-height:1.45;margin-bottom:15px}.hero p{font-size:.92rem;margin-bottom:22px}.hero-art{display:none}.eyebrow{font-size:.72rem;margin-bottom:12px}.search-entry{padding:15px 18px;font-size:.9rem}.search-entry kbd{display:none}.feature-grid{grid-template-columns:1fr;gap:13px;margin-bottom:32px}.feature{padding:24px}.feature h2{font-size:1.4rem}.feature p{font-size:.9rem;margin-bottom:18px}.feature:not(.primary-feature){padding:22px 24px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.volume-card{padding:18px 16px;min-height:180px}.volume-card h3{font-size:1.02rem}.volume-card p{font-size:.8rem;margin-bottom:14px}.volume-card .volume-num{font-size:.72rem}.section-head h2{font-size:1.15rem}.section-head .text-link{font-size:.8rem}.continue{padding:16px;margin-bottom:22px}.continue p{font-size:.9rem}.continue span{font-size:.8rem}.continue small{font-size:.73rem}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:7px 12px max(8px,env(safe-area-inset-bottom));justify-content:space-around}.bottom-nav a{min-width:64px;display:flex;align-items:center;flex-direction:column;font-size:.65rem;color:var(--muted);gap:1px;min-height:47px;justify-content:center}.bottom-nav a span{font-size:1.4rem;line-height:1.2}.bottom-nav a.active{color:var(--brand2);font-weight:700}.pathway{margin-top:30px}.catalog{grid-template-columns:1fr}.page-heading h1{font-size:1.7rem}.page-heading p{font-size:.92rem}.reader-layout{display:block}.reader-sidebar{display:none}.reader-shell{padding:20px 20px 115px}.reader-toolbar{margin-bottom:22px;gap:6px}.reader-toolbar .small-button{padding:7px 10px;font-size:.78rem}.reader-toolbar .back-link{margin:0;font-size:.8rem}.mobile-toc{display:block}.reader .reader-title{font-size:1.55rem;line-height:1.55;margin-bottom:25px}.reader{line-height:1.95}.reader-meta{font-size:.72rem}.reader h2{font-size:1.22em}.reader h3{font-size:1.06em}.table-wrap{margin-left:0;margin-right:0}.table-wrap th,.table-wrap td{padding:11px 12px;min-width:160px}.reader-next{gap:10px}.reader-next a{font-size:.82rem;padding:12px}.related-links a{font-size:.85rem}.progress-top{top:68px}.chapter-item{padding:17px}.chapter-item strong{font-size:.95rem}.tabs{gap:6px}.pill{font-size:.8rem;padding:8px 12px}dialog{padding:23px}.search-box{padding-left:12px}.search-box input{font-size:1rem}.search-filters .pill{font-size:.76rem}.pathway-links a{font-size:.8rem}.table-wrap table:has(tr:first-child:nth-last-child(1)) th{min-width:110px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media print{.topbar,.bottom-nav,.reader-sidebar,.reader-toolbar,.related,.reader-next,.reader-footer,.progress-top{display:none!important}.reader-layout{display:block}.reader-shell{padding:0}.reader{max-width:none;font-size:11pt}body{background:white;color:black}.table-wrap{overflow:visible}.reader img{max-height:22cm;object-fit:contain}h2,h3{break-after:avoid}tr,img{break-inside:avoid}}
