/* Scoped to expedition; platform navigation and other games retain their layout. */
#worldAdventureView{overflow-x:hidden}
#worldAdventureView.book-enabled .world-adventure-shell{position:relative;margin:0;padding:0;border:0;background:#171a17;box-shadow:none;overflow:hidden;border-radius:12px}
#worldAdventureView.book-enabled .world-adventure-heading,#worldAdventureView.book-enabled #worldAdventureHelp,#worldAdventureView.book-enabled #worldAdventureLobby,#worldAdventureView.book-enabled #worldAdventureRoguePanel{display:none!important}
.expedition-book{position:relative;width:100%;height:clamp(550px,calc(100dvh - 175px),900px);min-height:520px;isolation:isolate;overflow:hidden;background:#171a17;--ink:#3e382b;--faded-ink:#73654e;--seal:#773d2e}
.expedition-book>canvas{display:block;width:100%;height:100%}
.expedition-book::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 100px 25px #070b0b70;pointer-events:none;z-index:2}
.book-hit{position:absolute;z-index:3;border:0;background:transparent!important;box-shadow:none!important;padding:0;cursor:pointer;color:transparent;transform:rotate(-5deg);border-radius:20px;touch-action:manipulation}
.book-hit:focus-visible{outline:2px solid #d6b676;outline-offset:8px}
.book-sheet{position:absolute;z-index:4;box-sizing:border-box;padding:22px 24px 18px;display:flex;flex-direction:column;color:var(--ink);font-family:"Noto Serif SC","Songti SC","SimSun",Georgia,serif;opacity:0;pointer-events:none;transition:opacity .16s ease;overflow:hidden}
.expedition-book[data-open="true"] .book-sheet{opacity:1;pointer-events:auto}
.expedition-book[data-turning="true"] .book-sheet{opacity:0;pointer-events:none}
.book-sheet h2,.book-sheet h3,.book-sheet h4,.book-sheet p{margin:0;color:inherit}
.book-sheet h2{font-size:clamp(22px,2.25vw,33px);font-weight:600;letter-spacing:.23em;text-align:center}
.book-sheet button{font:inherit;color:var(--ink);touch-action:manipulation}
.book-page-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;border-bottom:1px solid #7563404d;padding-bottom:13px;margin-bottom:14px}
.book-page-top h2{font-size:22px;letter-spacing:.16em;text-align:left}
.book-back,.book-link{border:0;background:transparent;box-shadow:none;padding:7px 0;font-size:13px;display:inline-flex;align-items:center;gap:5px;cursor:pointer;border-bottom:1px solid transparent}
.book-back:hover,.book-link:hover{color:var(--seal);border-bottom-color:var(--seal)}
.book-back svg,.book-link svg{width:15px;height:15px}
.book-sheet button:focus-visible{outline:2px solid #805530;outline-offset:3px}
.book-sheet button:disabled{cursor:default;opacity:.48}
.book-folio{font-family:Georgia,serif;letter-spacing:.2em;text-align:center;font-size:12px;color:#7a6a52;flex-shrink:0;margin-top:auto;padding-top:10px}
.book-directory{padding-top:10px;display:flex;flex-direction:column;height:100%}
.book-directory-symbol{text-align:center;line-height:1;color:#927447;font-size:25px;margin:0 0 14px}
.book-directory h2{margin-bottom:26px}
.book-menu{display:flex;flex-direction:column;gap:7px}
.book-menu button{display:flex;align-items:baseline;gap:10px;background:transparent;border:0;box-shadow:none;padding:9px 2px;font-size:clamp(16px,1.65vw,22px);text-align:left;cursor:pointer;transition:color .2s,transform .2s}
.book-menu button:hover{color:#8c442d;transform:translateX(3px)}
.book-menu .book-menu-dots{flex:1;border-bottom:1px dotted #796c52;opacity:.7}
.book-menu small{font-family:Georgia,serif;font-size:13px;letter-spacing:.04em}
.book-titleplate{height:100%;display:flex;flex-direction:column;text-align:center;justify-content:center;padding:0 4px}
.book-titleplate .book-kicker{font-size:10px;letter-spacing:.29em;line-height:1.8;color:#786b55}
.book-titleplate h2{font-size:27px;line-height:1.7;margin:10px 0 12px}
.book-titleplate p{font-size:13px;line-height:2.1;color:#6a5b44;margin:13px 0}
.book-engraving{width:80%;max-width:225px;aspect-ratio:1;margin:0 auto;color:#806a47;opacity:.8}
#worldAdventureView .book-engraving{width:80%;height:auto;max-height:210px;flex:0 0 auto}
#worldAdventureView .book-map-node svg{width:25px;height:25px}
.book-pet{line-height:1.4;grid-row:auto}
.book-pet b,.book-pet small{flex-shrink:0;line-height:1.4}
.book-title-rule{width:48px;border-top:1px solid #8d7955;margin:9px auto}
.book-note{font-size:12px;line-height:1.8;color:var(--faded-ink);margin-bottom:12px!important}
.book-selection{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.book-selection span{border-bottom:1px solid #856b47;padding-bottom:4px;font-size:12px}
.book-pets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-content:start;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px}
.book-pet{position:relative;min-height:98px;border:1px solid #876b3438;background:#f7eac414;border-radius:2px;padding:8px 5px;display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer}
.book-pet.selected{border:1px solid #875333;background:#a07a2621;box-shadow:inset 0 0 0 2px #a2844833}
.book-pet img{width:53px;height:53px;object-fit:contain;filter:drop-shadow(1px 2px 1px #57462f24)}
.book-pet b{font-size:13px;font-weight:600;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.book-pet small{font-family:system-ui,sans-serif;font-size:10px;color:#72604a}
.book-pet em{position:absolute;right:4px;top:4px;display:grid;place-items:center;min-width:15px;height:15px;font-style:normal;font-size:10px;color:#795d3a}
.book-pet.selected em{background:#754b31;color:#f2deb2;border-radius:50%}
.book-pagination{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-shrink:0;margin-top:8px;font-size:12px}
.book-pagination button{border:0;background:transparent;padding:5px;cursor:pointer}
.book-map-header{font-size:11px;letter-spacing:.14em;text-align:center;color:#77684f;margin-bottom:7px}
.book-map{position:relative;flex:1;min-height:255px;max-height:650px;margin:0 -6px}
.book-map>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.book-map path{fill:none;stroke:#625d4a;stroke-width:1.4;stroke-dasharray:4 6;opacity:.4}
.book-map path.traveled{stroke:#713c2b;opacity:.8;stroke-dasharray:2 4}
.book-map path.upcoming{stroke:#5e5035;opacity:.85;stroke-width:1.8}
.book-map-node{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border:0;border-radius:50%;background:transparent;box-shadow:none;padding:9px;cursor:pointer;display:grid;place-items:center;isolation:isolate}
.book-map-node svg{width:25px;height:25px;stroke-width:1.6;filter:url(#book-ink-roughness)}
.book-map-node:disabled{opacity:.42!important}
.book-map-node.available{color:#4a3d29}
.book-map-node.available::before{content:"";position:absolute;inset:2px;border:1px solid #6f59349c;border-radius:49% 51% 47% 53%;transform:rotate(-13deg);background:#b99d6430;z-index:-1}
.book-map-node.available:hover::before{background:#b98d4650;border-color:#76432b;box-shadow:0 0 0 4px #b9985424}
.book-map-node.resolved{color:#84432f;opacity:.8!important}
.book-map-node.resolved::after{content:"";position:absolute;inset:2px;border:1.5px solid #84432f;border-radius:50%;transform:scaleX(.96) rotate(-20deg)}
.book-map-node.current::before{content:"";position:absolute;bottom:-8px;left:20px;width:4px;height:4px;background:#84432f;border-radius:50%}
.book-map-legend{display:flex;justify-content:center;gap:12px;font-size:10px;color:#7a694d;line-height:1.8;margin-top:8px}
.book-map-legend i{display:inline-block;width:7px;height:7px;border:1px solid #776244;border-radius:50%;margin-right:3px}
.book-map-legend .visited{background:#87422e}
.book-map-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;border-top:1px solid #8c714337;margin-top:9px;padding-top:4px}
.book-map-footer .book-link{font-size:11px}
.book-map-art{width:100%;height:140px;object-fit:cover;filter:sepia(.8) saturate(.3) contrast(.85);mix-blend-mode:multiply;opacity:.65;border-radius:50% 50% 5% 5%;margin:14px 0 4px;mask-image:linear-gradient(transparent,#000 13%,#000 85%,transparent)}
.book-party-mini{display:flex;justify-content:center;gap:10px;margin-top:14px}
.book-party-mini img{width:42px;height:42px;object-fit:contain}
.book-collection{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.book-gallery{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:15px}
.book-gallery button{padding:0;border:1px solid #836d4944;background:transparent;cursor:pointer;text-align:left}
.book-gallery img{display:block;width:100%;height:85px;object-fit:cover;filter:sepia(.22);border:3px solid #d6c49f}
.book-gallery span{font-size:11px;display:block;padding:5px}
.book-entry{border-top:1px solid #8a704540;padding:11px 0}
.book-entry h3{font-size:15px;letter-spacing:.04em;margin-bottom:7px}
.book-entry p{font-size:12px;line-height:1.95;color:#6a5c46}
.book-entry.locked{opacity:.55}
.book-art-view{display:flex;flex-direction:column;justify-content:center;flex:1;min-height:0}
.book-art-view img{width:100%;max-height:80%;object-fit:contain;border:4px solid #eee0bb;box-shadow:0 3px 12px #49311d26}
.book-art-view p{font-size:13px;text-align:center;margin-top:12px}
.book-outcome{position:fixed;z-index:35;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;place-items:center;background:#171a188c;backdrop-filter:blur(4px);padding:18px;box-sizing:border-box}
.book-outcome[open]{display:grid}
.book-outcome::backdrop{background:#1117}
.book-outcome-card{max-width:410px;width:100%;background:var(--book-paper,#ddcba6);background-size:cover;color:#483824;border:1px solid #94784b;padding:32px 30px;box-shadow:0 18px 70px #0008,inset 0 0 35px #906a2440;text-align:center;font-family:"Noto Serif SC","SimSun",serif;max-height:calc(100dvh - 100px);overflow:auto}
.book-outcome-card>svg{width:35px;height:35px;color:#8a5732;margin-bottom:18px}
.book-outcome-card h2{color:#473821;font-size:25px;margin:0 0 14px;letter-spacing:.14em}
.book-outcome-card p{font-size:14px;line-height:1.9;color:#776043;margin:0 0 20px}
.book-outcome-card small{display:block;font-size:11px;line-height:1.8;color:#75634b;margin:15px 0}
.book-outcome-card button{border:1px solid #7d6440;background:#704c30;color:#f1e3bf;font:inherit;padding:11px 24px;cursor:pointer;min-width:140px}
.book-outcome-card button:disabled{opacity:.5}
.book-flight{position:absolute;inset:0;z-index:40;pointer-events:auto;overflow:hidden;opacity:0;background:radial-gradient(ellipse at 50% 48%,#d7c59b 0,#9d7f54 36%,#30271f 82%,#111715 100%)}
.book-flight::before{content:"";position:absolute;inset:0;background:var(--book-paper,#d8c59f);background-size:cover;opacity:.42;mix-blend-mode:multiply}
.book-flight-vignette{position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 30%,#1a1713a8 82%,#0a0d0ce8);box-shadow:inset 0 0 120px #17130f;transform:scale(1.04)}
#worldAdventureView.book-enabled #worldAdventureBattle{position:relative;padding:14px;background:#1e2827;transition:filter .6s}
#worldAdventureView.book-enabled .book-defeated{filter:grayscale(1) brightness(.72)}
#worldAdventureView.book-enabled .book-battle-back{color:#c3bea7;font-size:12px;border:1px solid #b5a26a40;background:#171f1c;padding:7px 10px;border-radius:4px;cursor:pointer}
#worldAdventureView.book-enabled .book-battle-back:disabled{opacity:.5}
.book-fallback{background:radial-gradient(ellipse at 40% 40%,#796448,#262820 65%,#111914)}
.book-fallback::before{content:"";position:absolute;width:44%;height:60%;left:28%;top:20%;background:linear-gradient(100deg,#2a1a13,#62472e 12%,#39251b 90%);border:6px double #967642;box-shadow:10px 13px 0 #ab926e,17px 22px 30px #0008;transform:perspective(700px) rotateX(20deg) rotateZ(-7deg);border-radius:8px}
.book-fallback[data-open=true]::before{width:90%;left:5%;height:90%;top:5%;background:var(--book-paper,#d8c59f);transform:none;border:7px solid #473021;box-shadow:0 10px 30px #0008}
.book-node-panel{margin:12px 0;padding:14px;background:#eadbb9d9;border:1px solid #9c7d4c;color:#4f3b26;box-shadow:inset 0 0 20px #9a713322}.book-node-panel>header{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid #b5986d66;padding-bottom:9px;margin-bottom:10px;font-size:13px}.book-node-panel>header span{display:flex;align-items:center;gap:6px;font-weight:700}.book-node-panel>header svg{width:16px;height:16px}.book-node-columns{display:grid;grid-template-columns:1.25fr 1fr;gap:14px}.book-node-columns h3{font-size:12px;margin:8px 0;color:#684b2c}.book-shop-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 0;border-bottom:1px dashed #9c7d4c66}.book-shop-item div{display:grid;gap:3px}.book-shop-item small{font-size:10px;color:#806b50}.book-shop-item button,.book-node-choice,.book-node-primary,.book-shop-tools button{border:1px solid #94734a;background:#f3e7c8;color:#563d25;padding:6px 8px;font:inherit;font-size:11px;cursor:pointer}.book-shop-item button:disabled,.book-node-choice:disabled,.book-node-primary:disabled,.book-shop-tools button:disabled{opacity:.45;cursor:not-allowed}.book-shop-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.book-shop-tools input{width:74px;border:1px solid #b29465;background:#f8edcf;color:#543d28;padding:5px}.book-node-choice-list{display:grid;gap:6px}.book-node-choice{width:100%;text-align:left}.book-node-primary{margin-top:10px;width:100%;background:#704c30;color:#f5e5bd}.book-node-panel>.book-link{display:block;margin-top:12px;color:#755235;text-decoration:underline;font-size:11px;cursor:pointer}.book-map-node.node-inn{background:#81633a}.book-map-node.node-event{background:#6b5b7b}.book-map-node.node-unknown{background:#2f6973}.book-map-node.node-money{background:#8c7133}.book-map-node.node-boss{background:#7e3b35}
@media(max-width:700px){
  #worldAdventureView.book-enabled .world-adventure-shell{border-radius:7px}
  .expedition-book{height:calc(100dvh - 155px);min-height:550px;max-height:950px}
  .book-sheet{padding:19px 16px 13px}
  .book-sheet-left{visibility:hidden;pointer-events:none!important}
  .book-directory{padding-top:15px}.book-directory h2{font-size:27px;margin-bottom:24px}.book-menu button{font-size:19px;padding:11px 0}
  .book-page-top{padding-bottom:9px;margin-bottom:10px}.book-page-top h2{font-size:20px}
  .book-pets{gap:6px}.book-pet{min-height:90px;padding:6px 3px}.book-pet img{width:48px;height:48px}
  .book-map{min-height:240px}.book-map-node{width:44px;height:44px}
  .book-gallery img{height:76px}.book-outcome-card{padding:26px 20px}
  .book-node-columns{grid-template-columns:1fr}.book-node-panel{font-size:11px}
  #worldAdventureView.book-enabled #worldAdventureBattle{padding:6px}
  #worldAdventureView.book-enabled .book-battle-back{font-size:10px;padding:5px}
}
@media(prefers-reduced-motion:reduce){.book-sheet,.book-menu button,#worldAdventureView.book-enabled #worldAdventureBattle{transition:none}}
