:root{color-scheme:light;--ink:#302a22;--muted:#6b6052;--paper:#faf5e8;--edge:#cfc2a9;--accent:#725031;--surface:#eee7d8;--sans:"Yu Gothic","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;--serif:"Yu Mincho","Hiragino Mincho ProN",Georgia,serif}
*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--ink);font-family:var(--sans);font-size:16px;background-image:radial-gradient(ellipse at 30% 0,rgba(255,255,255,.55),transparent 65%)}button,a{touch-action:manipulation}button{font:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.48}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:5px}button{color:var(--ink);background:transparent;border:1px solid var(--edge);border-radius:3px;padding:10px 15px;min-height:44px}button:hover:not(:disabled){background:#e9dfcd}.masthead{max-width:1160px;margin:0 auto;padding:26px 28px 21px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--edge)}.eyebrow{font-size:12px;letter-spacing:.15em;color:var(--muted)}h1{font-family:var(--serif);font-size:26px;font-weight:600;letter-spacing:.08em;margin:5px 0 0}.masthead nav{display:flex;gap:7px;flex-wrap:wrap}.masthead nav button{font-size:14px;border-color:transparent}.masthead nav button[aria-current="page"]{border-color:var(--ink)}.book-layout{max-width:1160px;margin:30px auto 0;padding:0 28px;display:grid;grid-template-columns:minmax(0,1fr) 256px;gap:28px;align-items:start}.paper{background:var(--paper);padding:32px 44px 36px;box-shadow:0 3px 20px #3b2f1812;border:1px solid #e3d8c3;min-height:680px;position:relative}.paper:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.13;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.22' filter='url(%23n)'/%3E%3C/svg%3E")}.paper>*{position:relative}.page-heading{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px solid var(--edge);padding-bottom:14px;margin-bottom:24px;gap:18px}.page-heading h2{font-family:var(--serif);font-size:22px;letter-spacing:.08em;font-weight:600;margin:0}.folio{font-family:Georgia,serif;font-size:28px;color:var(--accent);flex-shrink:0}.folio small{font:12px var(--sans);letter-spacing:.05em;margin-left:6px}.illustration{margin:0 0 28px}.illustration img{width:100%;max-height:340px;object-fit:contain;display:block;mix-blend-mode:multiply}.prose{font-family:var(--serif);font-size:18px;line-height:2.05;overflow-wrap:anywhere}.prose p{margin:0 0 1.1em}.prose p:first-child.lead{font-size:21px;font-weight:600;line-height:1.8}.choices{border-top:1px solid var(--edge);padding-top:24px;margin-top:30px;display:grid;gap:12px}.page-link{text-decoration:none;display:flex;align-items:center;justify-content:space-between;gap:18px;color:var(--ink);padding:15px 17px;border:1px solid var(--edge);font-family:var(--serif);font-size:17px;background:#fff9ec;min-height:52px}.page-link:hover{border-color:var(--ink);background:#efe4cf}.page-link span:last-child{color:var(--accent);white-space:nowrap}.record{position:sticky;top:24px;padding:23px 21px;background:#e8decb;border-top:3px solid var(--accent)}.record h2{font:600 18px var(--serif);margin:0 0 23px}.record .label{font-size:13px;color:var(--muted);display:block;margin-bottom:8px}.hp-number{font-family:Georgia,serif;font-size:34px}.hp-number small{font-size:18px;color:var(--muted)}.bar{height:6px;background:#d4c5ab;margin:9px 0 21px}.bar div{height:100%;background:var(--accent);transition:width .2s}.mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding-bottom:19px;border-bottom:1px solid var(--edge);margin-bottom:20px}.mini-stats strong{font-family:Georgia,serif;font-size:21px;font-weight:400}.record ul{list-style:none;padding:0;margin:8px 0 22px}.record li{font-size:15px;line-height:1.7}.record button{width:100%;font-size:14px;border-color:#ac9776;background:#f5ecdd}.companion-note{font-size:14px;line-height:1.7}.record .bookmark{margin-bottom:16px;font-size:13px;color:var(--muted)}.combat{background:#f0e7d6;border:1px solid var(--edge);padding:22px;margin:25px 0}.combat h3{font-size:18px;margin:0}.combat-top{display:flex;justify-content:space-between;align-items:center;gap:15px}.enemy-hp{font-size:16px;white-space:nowrap}.combat .bar{margin:13px 0 18px}.combat-intro{font-size:15px;line-height:1.9}.ink-button{background:var(--ink);color:var(--paper);border-color:var(--ink)}.ink-button:hover:not(:disabled){background:#514434;color:var(--paper)}.combat-action{width:100%;margin-top:13px;display:flex;justify-content:center;align-items:center;gap:10px}.roll-area{display:flex;align-items:center;justify-content:center;gap:13px;margin:20px 0 12px}.die{background:#fbf7ee;border:1px solid #9d8768;border-radius:5px;width:54px;height:54px;display:flex;align-items:center;justify-content:center;font:28px Georgia,serif;box-shadow:2px 2px 0 #d5c5aa}.roll-equation{font-size:16px;text-align:center;line-height:1.8}.combat-message{font-size:16px;line-height:1.8;margin-top:17px;font-weight:600}.roll-log{margin-top:18px;font-size:14px;line-height:1.9}.roll-log summary{cursor:pointer}.roll-log ol{padding-left:23px;margin-bottom:0}.notice{border-left:3px solid var(--accent);padding:12px 15px;background:#efe5d2;font-size:15px;line-height:1.8;margin:22px 0}.status-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin:28px 0}.status-section{border-bottom:1px solid var(--edge);padding-bottom:24px}.status-section h3{font:600 18px var(--serif);margin:0 0 18px}.status-value{font-family:Georgia,serif;font-size:38px}.status-value small{font-size:20px}.status-section dl{display:grid;grid-template-columns:1fr auto;gap:12px;margin:0;font-size:15px}.status-section dt{color:var(--muted)}.status-section dd{margin:0}.inventory{list-style:none;padding:0;margin:0}.inventory li{padding:14px 0;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--edge);gap:20px;font-size:17px}.inventory small{display:block;font-size:14px;color:var(--muted);margin-top:6px}.rules{font-size:16px;line-height:1.9}.rules h3{font:600 19px var(--serif);margin-top:28px}.rules ol{padding-left:25px}.rules li{margin:8px 0}.end-mark{font:28px var(--serif);text-align:center;margin:36px 0 20px;color:var(--accent)}.site-footer{max-width:1160px;padding:25px 28px 35px;margin:0 auto;font-size:13px;color:var(--muted);display:flex;justify-content:space-between;gap:15px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{background:var(--paper);color:var(--ink);border:1px solid var(--edge);padding:28px;max-width:calc(100% - 32px);box-shadow:0 20px 60px #0003}dialog::backdrop{background:#241c13aa}dialog h2{font:600 22px var(--serif);margin:0 0 20px}dialog p{line-height:1.8}.dialog-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
@media(max-width:850px){.masthead{padding:20px;align-items:flex-start}.masthead nav{justify-content:flex-end;max-width:280px}.book-layout{grid-template-columns:minmax(0,1fr) 215px;padding:0 20px;gap:20px}.paper{padding:28px}.record{padding:20px 16px}.page-heading h2{font-size:20px}}
@media(max-width:650px){.masthead{display:block;padding:19px 16px 14px}.masthead h1{font-size:23px}.masthead nav{justify-content:flex-start;max-width:none;margin-top:15px;gap:6px}.masthead nav button{padding:8px 11px;font-size:14px}.book-layout{display:flex;flex-direction:column;margin-top:15px;padding:0 12px;gap:15px}.record{position:static;order:-1;width:100%;padding:14px 17px;display:grid;grid-template-columns:1fr 1fr;gap:0 18px;border-top-width:2px}.record h2,.record .mini-stats,.record .record-more,.record .companion-note{display:none}.record .bookmark{grid-column:1/-1;margin:0 0 11px}.record .label{margin:0 0 4px;font-size:12px}.record .hp-number{font-size:25px}.record .hp-number small{font-size:15px}.record .bar{margin:6px 0 2px}.record ul{margin:0}.record li{font-size:14px}.record .inventory-mini{grid-column:2;grid-row:2}.paper{padding:24px 22px 30px;width:100%;min-height:500px}.prose{font-size:17px;line-height:2}.prose p:first-child.lead{font-size:19px}.page-heading{margin-bottom:19px}.page-heading h2{font-size:20px}.folio{font-size:25px}.illustration{margin-bottom:22px}.illustration img{max-height:260px}.combat{padding:17px}.combat-top{display:block}.enemy-hp{display:block;margin-top:8px}.status-grid{grid-template-columns:1fr;gap:20px}.page-link{font-size:16px;padding:13px 14px;gap:12px}.site-footer{padding:22px 16px 30px;display:block;line-height:1.8}.site-footer span{display:block}.roll-area{gap:10px}.die{width:48px;height:48px}}
.dice-trays{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;margin:24px 0}.dice-tray{min-width:0;padding:13px 8px 10px;background:#e7dac3;border:1px solid #cbbc9f;border-radius:4px}.dice-tray h4{margin:0;text-align:center;font-size:14px;font-weight:500}.dice-stage{--die-size:52px;position:relative;display:flex;align-items:center;justify-content:center;gap:30px;height:140px;perspective:520px;overflow:hidden}.die-slot{position:relative;width:var(--die-size);height:var(--die-size);perspective:300px}.die-slot:before{content:"";position:absolute;left:-8px;right:-8px;top:calc(100% - 1px);height:15px;border-radius:50%;background:radial-gradient(ellipse,#38241155,transparent 70%)}.dice-cube{position:relative;width:100%;height:100%;transform-style:preserve-3d}.dice-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);place-items:center;padding:17%;background:#fcf7e9;border:1px solid #927d5e;border-radius:5px;backface-visibility:hidden;box-shadow:inset 0 0 7px #b79b7029}.dice-face span{width:8px;height:8px}.dice-face .pip{background:#302a22;border-radius:50%;box-shadow:inset 0 1px 1px #0008}.face-1{transform:translateZ(calc(var(--die-size)/2))}.face-2{transform:rotateX(90deg) translateZ(calc(var(--die-size)/2));background:#f5ebd6}.face-3{transform:rotateY(90deg) translateZ(calc(var(--die-size)/2));background:#e5d5b9}.face-4{transform:rotateY(-90deg) translateZ(calc(var(--die-size)/2));background:#f1e6d2}.face-5{transform:rotateX(-90deg) translateZ(calc(var(--die-size)/2));background:#e2d0b0}.face-6{transform:rotateY(180deg) translateZ(calc(var(--die-size)/2));background:#fbf1df}.dice-caption{margin:0;font-size:14px;text-align:center;line-height:1.7;min-height:24px}.dice-stage[data-phase="rolling"]+.dice-caption{color:var(--accent)}
@media(max-width:850px){.dice-stage{--die-size:42px;gap:22px;height:128px}.dice-face span{width:6px;height:6px}}
@media(max-width:650px){.dice-trays{grid-template-columns:minmax(0,1fr);gap:12px}.dice-stage{--die-size:48px;gap:40px;height:130px}.dice-face span{width:7px;height:7px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.quest-record{border-bottom:1px solid var(--edge);padding:0 0 17px;margin:0 0 20px;font-size:14px;line-height:1.8}.quest-record p{margin:5px 0 12px}.time-number strong{font:26px Georgia,serif;color:var(--accent)}.time-number small{color:var(--muted)}.quest-record .bar{margin-bottom:0}.fine-note{font-size:13px;line-height:1.8;color:var(--muted)}.item-action{width:100%;margin-top:12px;font-size:14px;line-height:1.8}.status-section ul:not(.inventory){padding-left:22px;line-height:1.9}.paper .quest-record{padding:20px;background:#f0e7d6}.record .quest-record .label{margin-bottom:5px}
.item-lesson,.item-use-panel{border:1px solid var(--edge);padding:20px;background:#f0e7d6;margin:24px 0;font-size:15px;line-height:1.9}.item-lesson h3,.item-use-panel h3{font:600 18px var(--serif);margin:0 0 16px}.item-steps{padding-left:24px}.inventory button{flex-shrink:0;font-size:14px;min-width:70px}.inventory button[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}.item-feedback{margin-bottom:0}.inventory li>div{min-width:0;overflow-wrap:anywhere}
[hidden]{display:none!important}.masthead h1{font-size:23px;line-height:1.5}.masthead h1 span{display:block}.book-layout.cover-view{grid-template-columns:minmax(0,1fr);margin-top:36px}.cover-paper{padding:0;border:0;background:transparent;box-shadow:none;min-height:0}.cover-paper:before{display:none}.cover-layout{display:grid;grid-template-columns:minmax(0,430px) minmax(0,1fr);gap:64px;align-items:center;max-width:1000px;margin:0 auto}.front-cover{margin:0;box-shadow:0 15px 35px #3b2f1830,3px 3px 0 #c5b394;border:1px solid #b5a080}.front-cover img{display:block;width:100%;height:auto}.cover-intro{padding:20px 0;font-family:var(--serif)}.cover-kicker{font:13px var(--sans);letter-spacing:.1em;color:var(--muted);margin:0 0 28px}.cover-opening{font-size:25px;font-weight:600;line-height:1.9;margin:0 0 28px;overflow-wrap:anywhere}.cover-blurb{font-size:17px;line-height:2;margin:0 0 22px}.cover-actions{display:grid;gap:12px;margin-top:32px}.cover-actions .page-link{background:var(--ink);color:var(--paper);font-size:17px}.cover-actions .page-link span:last-child{color:var(--paper)}.cover-actions .page-link:hover{background:#514434}.cover-note{font:13px/1.9 var(--sans);color:var(--muted);margin:24px 0 0}
@media(max-width:850px){.cover-layout{gap:30px;grid-template-columns:minmax(0,360px) minmax(0,1fr)}.cover-opening{font-size:22px}.cover-blurb{font-size:16px}.masthead h1{font-size:21px}}
@media(max-width:650px){.book-layout.cover-view{display:block;margin-top:24px;padding:0 22px}.cover-layout{display:block;max-width:400px}.front-cover{max-width:340px;margin:0 auto}.cover-intro{padding:32px 2px 0}.cover-kicker{margin-bottom:20px}.cover-opening{font-size:21px}.cover-blurb{font-size:16px}.cover-actions{margin-top:24px}.masthead h1{font-size:21px}}
@media(max-width:650px){.record .inventory-mini li:not(:first-child){display:none}.record .quest-record{grid-column:1/-1;grid-row:3;margin:12px 0 0;padding:10px 0 0;border-bottom:0;border-top:1px solid var(--edge)}.record .quest-record p{margin:0 0 5px}.record .quest-record .label{display:none}.record .time-number{font-size:13px}.record .time-number strong{font-size:22px}.end-mark{font-size:22px;line-height:1.7}}
.item-picks{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.item-picks button{font-size:14px;padding:9px 12px;line-height:1.5}.item-picks button[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}.scene-items .selected-item{margin:16px 0 12px}.scene-items #use-item-and-next{width:100%;line-height:1.6;white-space:normal}.item-use-panel>.page-link{margin:16px 0}
.equipment-panel,.magic-panel{margin:24px 0;padding:20px;border:1px solid var(--edge);background:#eee5d4}.equipment-panel h3,.magic-panel h3{font-family:var(--serif);font-size:18px;margin:0 0 14px}.equipment-choice .item-picks{margin:8px 0 16px}.magic-panel p{line-height:1.8}.magic-panel button{width:100%;line-height:1.6}.magic-mini{font-size:14px;border-top:1px solid var(--edge);padding-top:10px;margin-top:10px}.magic-mini strong{margin:0 4px}@media(max-width:650px){.record .magic-mini{grid-column:1/-1;grid-row:4}.equipment-panel,.magic-panel{padding:16px}.equipment-choice .item-picks{gap:6px}}

/* Readings stay outside the base text used by buttons and screen readers. */
ruby{ruby-position:over;ruby-align:center}
rt{font-family:var(--sans);font-size:.52em;line-height:1.1;font-weight:400;color:inherit;user-select:none}
rt::before{content:attr(data-reading)}
body[data-furigana="off"] rt{display:none}
body[data-furigana="on"] .prose,body[data-furigana="on"] .rules{line-height:2.35}
body[data-furigana="on"] .page-link{line-height:2}
body[data-furigana="on"] .masthead h1,body[data-furigana="on"] .page-heading h2{line-height:1.9}
body[data-furigana="on"] .masthead nav{row-gap:10px}
body[data-furigana="on"] .masthead nav button,body[data-furigana="on"] .masthead nav a{line-height:1.8}
.legend-view{max-width:1000px;margin:0 auto}
.legend-subtitle{font:20px/2 var(--serif);color:var(--accent);margin:0 0 24px}
.legend-intro{font:18px/2.2 var(--serif)}
.legend-note{font-size:14px;line-height:2;color:var(--muted);margin:25px 0}
.legend-toc{padding:20px;background:#eee5d4;border:1px solid var(--edge);margin:30px 0}
.legend-toc h3,.legend-glossary h3{font:600 20px/1.8 var(--serif);margin:0 0 16px}
.legend-toc>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.legend-toc button{text-align:left;line-height:1.9;font-size:15px}
.legend-section{margin:48px 0;scroll-margin-top:24px}
.legend-section>h3{font:600 23px/2 var(--serif);color:var(--accent);padding-bottom:12px;border-bottom:1px solid var(--edge);margin:0 0 24px}
.legend-section .illustration{margin:25px 0 35px}
.legend-glossary{padding:24px;border:1px solid var(--edge);background:#f0e7d6;margin:35px 0}
.legend-glossary dl{margin:0}
.legend-glossary dt{font-weight:600;line-height:2;margin-top:17px}
.legend-glossary dd{margin:6px 0 0;line-height:2}
.legend-sources{font-size:14px;line-height:2;margin:30px 0}
.legend-sources li{margin:10px 0;overflow-wrap:anywhere}
.legend-sources a{color:var(--accent)}
@media(max-width:650px){.legend-subtitle{font-size:18px}.legend-toc{padding:16px}.legend-toc>div{grid-template-columns:1fr}.legend-section{margin:35px 0}.legend-section>h3{font-size:20px}.legend-glossary{padding:18px}.legend-intro{font-size:17px}.legend-section .illustration img{max-height:none}}

.legend-section .illustration img{height:auto;max-height:none}

/* Page links keep their text in one wrapping flex child before ruby is added. */
.choices{min-width:0}.page-link{min-width:0;max-width:100%}.page-link>span:first-child{min-width:0;white-space:normal;overflow-wrap:anywhere}
