/* The codex rests on a reading table. Section ribbons emerge from the leaves. */
#knowledge-root{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:5px;padding:10px 5px 9px;background:radial-gradient(ellipse at 50% 45%,#e2cba421,#2e221860),url('art/book/reading-desk-v01723.webp') center/cover;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:auto}
.knowledge-header{position:relative;inset:auto;flex:0 0 48px;margin:0 7px;padding:5px 8px;min-width:0;gap:8px;border:1px solid #d7c2948a;border-radius:10px;background:linear-gradient(120deg,#fcf3dcf0,#efe0c5de);box-shadow:0 2px 10px #291d1820}
.knowledge-header>span{gap:1px}.knowledge-header small{font-size:7px;line-height:10px;letter-spacing:1.3px}.knowledge-header strong{font-size:21px;line-height:25px}
.knowledge-header-actions{display:flex;align-items:center;gap:7px;flex:none}
.knowledge-header-actions>button{display:grid;place-items:center;width:33px;height:33px;min-height:33px;padding:0;border:1px solid #cbbb96;border-radius:8px;background:#fff7e4b8;color:#5d755b;box-shadow:inset 0 0 0 2px #fff9e880;font:25px/1 Interface,sans-serif}
.knowledge-header-actions>.knowledge-wide-toggle{width:auto;display:flex;gap:5px;padding:5px 7px;font:10px/14px Interface,sans-serif}
.knowledge-wide-toggle>svg{width:18px;height:18px}.knowledge-wide-toggle[aria-pressed=true]{background:#dbe4c9;border-color:#96aa7d}
.knowledge-dialog{width:100%;max-width:none;max-height:none;flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.knowledge-workspace{width:100%;min-height:0;flex:0 0 auto;display:grid;place-items:center;position:relative}
.knowledge-stage{position:relative;flex:none;max-height:none;min-height:0;aspect-ratio:auto;isolation:isolate}
.knowledge-stage>canvas{width:100%;height:100%;object-fit:fill;outline-offset:-5px}
.knowledge-section-tabs{position:absolute;top:.8%;left:3.5%;right:3.5%;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));align-items:start;gap:3px;padding:0;min-height:0;overflow:visible;transition:opacity .25s;z-index:2;touch-action:manipulation}
.knowledge-section-tabs>button{flex:none;min-width:0;min-height:27px;padding:4px 1px 7px;border:1px solid #b99b62;border-top:2px solid #bca271;border-radius:2px 2px 3px 3px;background:linear-gradient(90deg,#be9e65,#d8bd89 18%,#d8bd89 82%,#b79962);color:#614e32;box-shadow:0 2px 3px #432b2433,inset 0 1px 0 #f5dfad70;font:9px/14px Interface,sans-serif;clip-path:polygon(0 0,100% 0,100% 100%,50% 84%,0 100%);white-space:nowrap}
.knowledge-section-tabs>button[aria-selected=true]{padding-bottom:10px;min-height:31px;border-color:#738058;border-top-color:#a7ad7a;color:#fff1ce;background:linear-gradient(90deg,#476147,#678061 18%,#678061 82%,#476147)}
#knowledge-root[data-phase=opening] .knowledge-section-tabs,#knowledge-root[data-phase=closing] .knowledge-section-tabs{opacity:0;pointer-events:none}
.knowledge-footer{display:flex;flex-direction:column;align-items:center;width:calc(100% - 14px);max-width:740px;flex:none;padding:6px 7px 4px;border:1px solid #d0b58688;border-radius:10px;background:linear-gradient(120deg,#fcf2dce8,#ead9b9e3);box-shadow:0 3px 12px #2c201729}
.knowledge-page-tools{display:grid;grid-template-columns:29px auto minmax(70px,1fr) auto 29px;align-items:center;gap:5px;width:100%;padding:0;flex:none}
.knowledge-page-tools>button{min-height:30px;padding:4px 8px;border:1px solid #bfa77a90;border-radius:6px;background:#fff7e9a8;color:#596e50;font:11px/17px Interface,sans-serif}
.knowledge-page-tools>[data-book-prev],.knowledge-page-tools>[data-book-next]{width:29px;padding:2px;font-size:21px}
.knowledge-page-tools>span{text-align:center;font:italic 12px/18px Interface,sans-serif;color:#7d603c}
.knowledge-context{height:45px;width:100%;min-height:45px;display:grid;align-items:center}
.knowledge-context-copy{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 3px;color:#7d6846}.knowledge-context-copy>strong{font:italic 12px/17px Interface,sans-serif;min-width:0}.knowledge-context-copy>small{font:9px/14px Interface,sans-serif;white-space:nowrap;color:#96815c}
#knowledge-root .knowledge-loadout{width:100%;min-height:0;height:43px;padding:4px 2px;gap:8px;border:0}
#knowledge-root .knowledge-loadout[hidden]{display:none!important}
[data-book-equipped]>button{width:32px;height:32px;min-height:32px}
[data-book-equipped]>button>img{width:25px;height:25px}
.knowledge-loadout>[data-book-equip]{max-width:145px;min-height:31px;font-size:11px;line-height:17px;padding:4px 7px}
.knowledge-caption{width:100%;max-width:100%;height:15px;min-height:15px;font-size:8px;line-height:15px;color:#94794d;overflow:hidden;text-overflow:ellipsis}
.knowledge-index,.knowledge-reader{inset:67px 13px 13px;z-index:5}
.knowledge-reader>p{font-size:17px;line-height:1.6}
/* A small inset pull tab continues the notice's lower edge. */
#app #toast.top-notice{overflow:visible;padding-top:6px;padding-bottom:9px;border-radius:0 0 13px 13px;touch-action:none;box-shadow:0 4px 14px #394b3328,inset 0 -2px 0 #fffcf1a0}
.notice-dismiss{bottom:-11px;width:60px;height:26px;min-height:26px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#879769;overflow:visible}
.notice-dismiss>svg{display:block;width:60px;height:26px;filter:drop-shadow(0 3px 2px #3c513213)}
.notice-copy{gap:0}.notice-copy>small{font-size:9px;line-height:12px}
.notice-progress{height:4px;width:min(250px,100%);margin-top:3px;box-shadow:inset 0 1px 1px #7f8b6420;background:#dddcc6}
.notice-progress>i{position:relative;background:linear-gradient(90deg,#668e79,#abc480);box-shadow:0 0 4px #a8bc6850}
.notice-progress>i:after{content:'';position:absolute;right:0;top:0;height:4px;width:7px;border-radius:50%;background:#f0e4ac;box-shadow:0 0 4px #cbd88a}
.notice-journey .notice-emblem{width:29px;height:31px;top:49%}.notice-journey .notice-text{font-size:12px;line-height:15px}
.notice-journey .notice-copy>small{color:#8b8f6c}
/* Compact location roster, anchored to the upper map edge. */
#presence-panel{bottom:auto;min-height:0;max-height:calc(100% - 125px);background:none;overflow:hidden}
.presence-drawer{height:100%;width:calc(100% - 20px);max-width:350px;gap:8px;padding:11px 12px 10px;border-bottom:1px solid #cdbd98;border-radius:16px 0 0 16px;box-shadow:-4px 4px 14px #29443120}
.presence-drawer>header{min-height:29px;gap:6px}.presence-drawer h2{font-size:20px;line-height:24px;margin:0}.presence-drawer header small{display:none}.presence-drawer header button{width:29px;height:29px;min-height:29px;font-size:22px}
.presence-location{padding-bottom:7px;gap:7px}.presence-location strong{font-size:11px;line-height:14px}.presence-location span{font-size:9px;line-height:12px}
.presence-roster{display:flex;flex-direction:column;gap:6px}
.presence-person{grid-template-columns:35px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:58px;padding:6px 7px;margin:0;flex:none;border-radius:9px;background:linear-gradient(120deg,#fffcef,#f0f2e3)}
.presence-person>img{width:35px;height:44px;border-radius:6px}.presence-person>div{gap:1px}.presence-person strong{font-size:13px;line-height:16px}.presence-person span{font-size:9px;line-height:12px}.presence-person>div>small{font-size:8px;line-height:11px}.presence-person>button{font-size:9px;min-height:28px;padding:5px;max-width:76px}
.presence-scope{padding:5px 7px;flex:none}.presence-scope>span{font-size:9px}
.presence-empty{padding:15px 8px}
/* Keep the party's leave action outside the four-slot scrolling body. */
#app .modal.party-modal{height:min(444px,calc(100% - 58px));min-height:0;max-height:calc(100% - 58px)}
.party-modal #party-online-content{flex:1;min-height:0;gap:7px}
.party-modal .party-grid{grid-template-rows:repeat(2,minmax(110px,1fr));min-height:228px;flex:1 1 228px}
.party-modal .party-card{min-height:110px}
.party-modal .party-card-empty{min-height:110px;gap:2px}
.party-modal #party-online-footer{display:flex;flex-direction:column;gap:5px;padding:4px 0 0;flex:none}
.party-modal #party-online-footer>.party-leave{width:100%;min-height:33px;flex:none;font-size:12px;line-height:18px;padding:6px;background:linear-gradient(145deg,#986a76,#805460);border-color:#8b616e;color:#fff5e8}
.party-modal #party-online-footer>.secondary{width:100%;min-height:26px;flex:none}
.party-modal .party-card-member{grid-template-rows:30px 33px 17px;gap:4px 8px;align-content:center}
.party-modal .party-card-art,.party-modal .party-card-portrait{height:66px}.party-modal .party-card-name{font-size:15px;line-height:18px}
.party-modal .party-card-vitals{gap:3px}.party-modal .party-card-meter-value{font-size:10px}
/* Center the entire amount-and-unit group and its explanation in every potion. */
#battle-root .spell-panel-battle .battle-potion-card .potion-card-effect{display:flex;flex-flow:row wrap;align-items:baseline;align-content:center;justify-content:center;column-gap:6px;row-gap:1px;width:100%;min-width:0;text-align:center;margin:0;padding:4px 0 0}
#battle-root .spell-panel-battle .battle-potion-card .potion-card-effect>b{flex:0 0 auto;margin:0;text-align:center;font-size:21px;line-height:24px}
#battle-root .spell-panel-battle .battle-potion-card .potion-card-effect>span{flex:0 0 auto;width:auto;margin:0;text-align:center;font-size:11px;line-height:16px}
#battle-root .spell-panel-battle .battle-potion-card .potion-card-effect>small{flex:0 0 100%;width:100%;margin:0;text-align:center;font-size:8px;line-height:11px}
@media(max-width:350px){.knowledge-header{margin-inline:4px;gap:5px}.knowledge-header strong{font-size:20px}.knowledge-wide-toggle>span{display:none}.knowledge-header-actions>.knowledge-wide-toggle{width:31px;padding:5px}.knowledge-page-tools{grid-template-columns:25px auto minmax(65px,1fr) auto 25px;gap:3px}.knowledge-page-tools>button{padding-inline:5px;font-size:10px}.knowledge-page-tools>[data-book-prev],.knowledge-page-tools>[data-book-next]{width:25px}.knowledge-page-tools>span{font-size:11px}.knowledge-section-tabs>button{font-size:8px}.knowledge-context-copy>small{font-size:8px}.knowledge-caption{font-size:7px}}
@media(max-height:600px){#app .modal.party-modal{height:calc(100% - 48px);max-height:calc(100% - 48px)}.party-modal .party-grid{min-height:214px;flex-basis:214px;grid-template-rows:repeat(2,minmax(103px,1fr))}.party-modal .party-card{min-height:103px;padding:8px}.party-modal .party-card-empty{min-height:103px}}
@media(prefers-reduced-motion:reduce){.knowledge-section-tabs{transition:none}}
