/* The compact world toolbar follows the provided mockup. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;padding:0!important;margin:-1px!important;border:0!important}
#world .world-header{padding:9px 13px 8px;background:#faf0dd;border-bottom:1px solid #dfd1b5;box-shadow:0 2px 6px #413d2010;z-index:7}
#world .brand-row{display:flex;align-items:center;gap:10px;height:39px;margin:0;min-width:0}
#world .brand{display:flex;align-items:center;gap:5px;flex:none;min-width:0}
#world .brand img{width:32px;height:35px;object-fit:contain}
#world .brand strong{font:700 22px/28px Interface,sans-serif;letter-spacing:0;text-transform:none;color:#174f54}
#world .header-actions{display:flex;align-items:center;gap:6px;flex:none}
#world .header-actions>.icon-button{display:grid;place-items:center;width:35px;height:35px;min-height:35px;border:1px solid #d9caab;border-radius:9px;background:#fff9eb;color:#2f665f;box-shadow:0 2px 3px #6f654012,inset 0 0 0 2px #fffdf43d;padding:7px}
#world .header-actions>.icon-button>.icon{font-size:19px;line-height:20px}
#world .header-actions>.icon-button>svg{display:block;width:20px;height:20px}
#world .header-actions>#party-open.connected{background:#eaf0de;border-color:#bdceac}
#world .header-actions>.header-legacy{display:none!important}
#world .shore-online-line{display:flex;align-items:center;justify-content:center;flex:1 1 50px;min-width:26px;height:36px;padding:0;border:0;background:none;box-shadow:none;position:relative;opacity:1}
.shore-online-track{display:block;width:100%;height:1px;background:linear-gradient(90deg,#b8ac7a,#a8b352,#b8ac7a);position:relative}
.shore-online-track>i{display:block;position:absolute;left:50%;top:-3px;width:7px;height:7px;border:1px solid #929f30;background:#c7df5a;box-shadow:0 0 6px #c2da4c4d;transform:translateX(-50%) rotate(45deg);animation:shore-online-walk 5.6s ease-in-out infinite,shore-online-pulse 1.7s ease-in-out infinite;will-change:transform}
.shore-online-line:disabled .shore-online-track{opacity:.45}
.shore-online-line:disabled .shore-online-track>i{animation:none;background:#ada681;box-shadow:none}
@keyframes shore-online-walk{0%,100%{transform:translateX(calc(-50% - clamp(7px,2.3vw,17px))) rotate(45deg)}50%{transform:translateX(calc(-50% + clamp(7px,2.3vw,17px))) rotate(45deg)}}
@keyframes shore-online-pulse{0%,100%{opacity:.55}50%{opacity:1}}
/* Retain the old inventory and dossier structure; polish only spacing and legibility. */
#bag .item-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch;grid-auto-rows:auto}
.item-card.inventory-card{grid-template-rows:17px 89px minmax(36px,auto) 1fr 23px;gap:7px;min-height:244px}
.item-card.inventory-card>h3{font-size:16px!important;line-height:19px!important;text-wrap:balance;overflow-wrap:break-word}
.inventory-topline{gap:5px;min-width:0;align-items:center}
.inventory-rarity{min-width:0;white-space:nowrap}
.inventory-stock{flex:none;white-space:nowrap}
.inventory-properties:empty{min-height:0}
.inventory-footer{gap:5px;min-width:0}
.inventory-footer>small{min-width:0}
.inventory-footer>span{flex:none;white-space:nowrap}
.modal.item-dossier-modal{width:min(390px,calc(100vw - 26px))}
.item-dossier-copy>h2{font-size:21px;line-height:24px;text-align:left;overflow-wrap:break-word;text-wrap:pretty}
.item-dossier-copy>p{line-height:16px}
.item-dossier-actions .primary,.item-dossier-actions .secondary{clip-path:none}
.item-dossier-actions .item-action-art{width:20px;height:23px;object-fit:contain;flex:none}
.item-dossier-actions .primary>.item-action-art{filter:brightness(0) invert(.92) sepia(.25)}
.victory-loot .item-card.inventory-card.compact,.slot-choice .item-card.inventory-card{grid-template-columns:minmax(0,1fr);grid-template-rows:15px 72px minmax(32px,auto) 1fr 21px;min-height:205px!important;height:auto;aspect-ratio:auto}
/* The moving paper is the only opaque console background. */
#battle-root .spell-panel-battle>.battle-console.drawer-layered #battle-actions.combat-action-view{background:transparent!important;box-shadow:none!important}
/* A full-width party sheet sits above the persistent chat rail. */
#app.party-sheet-open .modal-shade{padding:0;background:#193f3520;align-items:flex-end;justify-content:stretch;animation:shade-in .2s ease}
#app .modal.party-modal{position:absolute;left:0;right:0;bottom:34px;width:100%;max-width:none;height:calc(var(--card,300px) + var(--nav,64px));min-height:342px;max-height:calc(100% - 82px);margin:0;padding:11px 12px 10px;display:flex;flex-direction:column;gap:7px;border:1px solid #d2c5a8;border-radius:22px;background:#faf5e6;box-shadow:0 -4px 18px #17382b20,inset 0 0 0 3px #fffaf2;overflow:visible;animation:party-sheet-rise .34s cubic-bezier(.2,.72,.25,1)}
#app .modal-shade.closing .party-modal{animation:party-sheet-lower .22s cubic-bezier(.4,0,.75,.3) both}
@keyframes party-sheet-rise{from{transform:translate3d(0,105%,0)}to{transform:translate3d(0,0,0)}}
@keyframes party-sheet-lower{to{transform:translate3d(0,105%,0)}}
.party-sheet-head{display:grid;grid-template-columns:31px minmax(0,1fr) 31px;gap:8px;align-items:center;flex:none}
.party-sheet-title{display:flex;align-items:center;justify-content:center;gap:10px;position:relative;min-width:0}
.party-sheet-title:before,.party-sheet-title:after{content:'';height:1px;flex:1;background:#cfb994}
.party-sheet-title h2{margin:0;font:700 24px/28px Interface,sans-serif;color:#23585a;white-space:nowrap}
.party-sheet-title h2:before,.party-sheet-title h2:after{content:'◇';font:12px/24px Interface,sans-serif;color:#b89a58;vertical-align:2px;margin:0 9px}
.party-sheet-head .icon-button{width:31px;height:31px;min-height:31px;padding:5px;border:1px solid #d9cbb0;border-radius:8px;background:#fff9eb;color:#3e756a;font-size:17px;box-shadow:0 1px 3px #6550310d}
.party-sheet-head .icon-button svg{width:20px;height:20px;display:block}
.party-sheet-subtitle{display:block;text-align:center;letter-spacing:2px;font-size:7px;line-height:10px;color:#9d8966;flex:none;margin-top:-3px}
.party-sheet-invite{position:relative;z-index:2;flex:none}
.party-sheet-code{position:absolute;top:7px;left:0;width:192px;padding:10px 11px;border:1px solid #d8c8a6;border-radius:10px;background:#fff9eb;box-shadow:0 4px 13px #3e493d29;text-align:center}
.party-sheet-code:before{content:'';position:absolute;top:-6px;left:16px;width:10px;height:10px;transform:rotate(45deg);background:#fff9eb;border-top:1px solid #d8c8a6;border-left:1px solid #d8c8a6}
.party-sheet-code>small{display:block;font-size:8px;line-height:12px;color:#698a7e}
.party-sheet-code>strong{display:block;font:700 23px/28px Interface,sans-serif;letter-spacing:1px;color:#357566}
.party-sheet-code>.secondary{min-height:24px;width:100%;padding:3px;font-size:9px;border-radius:5px;background:#edf3e5;border-color:#c7d6b7}
#party-online-content{min-height:0;flex:1;display:flex;flex-direction:column;gap:6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
#party-online-content::-webkit-scrollbar{display:none}
.party-modal .party-same-place{flex:none;min-height:21px;margin:0;padding:4px 8px;border:1px solid #dfd2b5;border-radius:6px;background:#f7f0de;font-size:8px;line-height:12px;color:#8d8666;text-align:center}
.party-modal .party-same-place.ready{color:#728869;background:#eff2e2;border-color:#d7dfc2}
.party-modal .party-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(100px,1fr));gap:7px;flex:1;min-height:207px;margin:0}
.party-modal .party-card{position:relative;min-height:100px;padding:8px;border:1px solid #d5c9aa;border-radius:9px;box-shadow:inset 0 0 0 3px #fffaf0;background:linear-gradient(140deg,#fdf9ec,#f4eedc);overflow:hidden}
.party-modal .party-card-member{display:grid;grid-template-columns:51px minmax(0,1fr);grid-template-rows:16px 24px 31px 15px;gap:3px 7px;align-content:center;border-color:#cbb97d}
.party-modal .party-card-art{grid-column:1;grid-row:1/4;width:51px;height:77px;position:relative;padding:0;align-self:center}
.party-modal .party-card-portrait{display:block;width:51px;height:77px;object-fit:cover;object-position:center top;border-radius:7px;box-shadow:0 0 0 2px #fff9e8,0 0 0 3px #d3c7a1}
.party-modal .party-card-topline{grid-column:2;grid-row:1;display:flex;gap:2px;align-items:center;margin:0;min-height:0;padding:0}
.party-modal .party-card-badges{display:flex;gap:3px}
.party-modal .party-card-badge{font-size:6px;line-height:10px;border-radius:3px;padding:0 3px;min-height:0;white-space:nowrap}
.party-modal .party-card-badge.leader{background:#fcf0c7;border:1px solid #e5d290;color:#b09335}
.party-modal .party-card-badge.self{background:#edf2df;border:1px solid #cddbb8;color:#74906e}
.party-modal .party-card-copy{grid-column:2;grid-row:2;min-width:0;padding:0;gap:1px;display:flex;flex-direction:column;align-items:flex-start}
.party-modal .party-card-name{font:700 13px/15px Interface,sans-serif;color:#285f58;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.party-modal .party-card-class{font-size:7px;line-height:9px;color:#a3906e}
.party-modal .party-card-vitals{grid-column:2;grid-row:3;display:flex;flex-direction:column;gap:3px;min-width:0;width:100%;padding:0}
.party-modal .party-card-vital{display:flex;align-items:center;gap:3px;height:12px;min-width:0}
.party-modal .party-card-health-icon,.party-modal .party-card-vital-icon{width:11px;height:11px;object-fit:contain;flex:none;font-size:12px;line-height:11px;color:#d57e63}
.party-modal .party-card-meter{position:relative;min-width:0;flex:1;height:11px;overflow:hidden;border-radius:3px;background:#dedfc6;box-shadow:none}
.party-modal .party-card-meter-fill{position:absolute;inset:0 auto 0 0;background:#a6c27d}
.party-modal .mana .party-card-meter-fill{background:#8ec5d7}
.party-modal .might .party-card-meter-fill{background:#c6b377}
.party-modal .party-card-meter-value{position:absolute;inset:0;text-align:center;font-size:6px;font-weight:700;line-height:11px;color:#3b6659}
.party-modal .party-card-foot{grid-column:1/-1;grid-row:4;display:flex;align-items:center;justify-content:space-between;gap:4px;margin:0;padding:0;border:0;font-size:6px;line-height:10px;color:#85946e}
.party-modal .party-card-status:before{width:5px;height:5px;margin-right:3px}
.party-modal .party-card-place{font-size:6px;line-height:10px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}
.party-modal .party-card-kick{position:absolute;right:3px;top:3px;width:16px;height:16px;min-height:0;padding:0;font-size:13px;line-height:14px;border:0;opacity:.7;background:#f4edda}
.party-modal .party-card-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-style:dashed}
.party-modal .party-card-empty-art{width:41px;height:39px;margin:0;opacity:.2}
.party-modal .party-card-empty-art img{width:100%;height:100%;object-fit:contain}
.party-modal .party-card-empty>strong{font:700 14px/17px Interface,sans-serif;color:#918975}
.party-modal .party-card-empty>small{font-size:8px;line-height:11px;color:#a1987d}
.party-modal .party-slot-add{display:grid;place-items:center;width:25px;height:25px;min-height:25px;border:1px solid #c6d1b5;border-radius:50%;background:#eef3e1;color:#6b987d;font:24px/24px Interface,sans-serif;padding:0;margin-top:2px}
.party-modal .party-leave{flex:none;min-height:30px;padding:5px;border-radius:8px;border:1px solid #ad6854;background:linear-gradient(145deg,#ad5547,#963f36);box-shadow:inset 0 0 0 2px #e2b16942;color:#fff1d9;font:700 12px/17px Interface,sans-serif;margin:0}
.party-modal #party-online-footer{display:flex;align-items:center;justify-content:center;gap:5px;flex:none;margin:0;padding:4px 0 0;border-top:1px solid #dfd3b7}
.party-modal #party-online-footer>button{min-height:24px;padding:3px 7px;font-size:8px;border-radius:5px;margin:0;width:auto;flex:1;white-space:nowrap}
.party-modal .test-bot-panel{flex:none;margin:3px 0}
.party-modal .party-tools{font-size:8px;line-height:14px;color:#8d9477;flex:none}
.party-modal .party-tools>summary{padding:3px 7px;cursor:pointer}
.party-empty-intro{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;flex:1;padding:12px 5px;text-align:center}
.party-empty-intro>img{width:54px;height:54px;object-fit:contain}
.party-empty-intro>strong{font:700 23px/27px Interface,sans-serif;color:#386456}
.party-empty-intro>p{font-size:10px;line-height:16px;margin:0;color:#978c70}
.party-empty-intro>.primary{min-height:37px;width:100%;margin-top:5px;padding:8px}
.party-sheet-join{padding:10px;border:1px solid #ddd0b3;border-radius:9px;background:#f6f0df}
.party-sheet-join>label{display:block;font-size:9px;margin-bottom:6px;color:#8b826b}
.party-sheet-join .join-row{display:flex;gap:7px}
.party-sheet-join input{width:100%;min-width:0;min-height:32px;padding:5px 8px;font-size:13px;letter-spacing:2px}
.party-sheet-join button{min-height:32px;padding:5px 11px;font-size:10px}
/* Chapter pass is an actual map destination with a dedicated crossing panel. */
#destination[data-gate="true"] .destination-thumb{object-fit:contain;padding:4px;background:#f2eddb;border:1px solid #d1c3a1}
#destination[data-gate="true"] .destination-top{flex:none}
#destination[data-gate="true"] .destination-divider{margin-top:0}
.world-chapter-pass{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:0;height:100%;width:100%;padding:8px 12px;border:1px solid #cbbb90;border-radius:13px;background:radial-gradient(ellipse at 50% 5%,#e4e7cd77,transparent 70%),#f9f3e4;box-shadow:inset 0 0 0 3px #fffaf1;overflow:hidden;text-align:center}
.world-chapter-pass>img{display:block;width:180px;max-width:80%;height:70px;min-height:35px;flex:1 1 70px;object-fit:contain;opacity:.88}
.world-chapter-pass>strong{font:700 19px/22px Interface,sans-serif;color:#315f55}
.world-chapter-pass>p{font-size:10px;line-height:15px;color:#a08e71;margin:0;max-width:290px}
.world-chapter-pass>small{font-size:9px;line-height:13px;color:#958665;padding:3px 10px;border:1px solid #dfcfaf;border-radius:20px;background:#fbf5e5;max-width:100%}
.world-map-pin.chapter-gate .world-map-medallion{border-color:#b79c58;background:#fff8dc;box-shadow:0 0 0 2px #f8edcc88,0 2px 6px #33371726}
.world-map-pin.chapter-gate.selected .world-map-medallion{box-shadow:0 0 0 2px #e0bf7188,0 0 12px #d0ae5b44}
#destination[data-gate="true"] #primary-action{background:linear-gradient(#276f67,#19574f);border-color:#a99455;box-shadow:inset 0 0 0 2px #e4c57530}
@media(max-width:350px){#world .world-header{padding-inline:10px}#world .brand-row{gap:6px}#world .brand img{width:28px;height:32px}#world .brand strong{font-size:19px}#world .header-actions{gap:4px}#world .header-actions>.icon-button{width:31px;height:33px;min-height:33px;padding:6px}.item-card.inventory-card>h3{font-size:14px!important;line-height:17px!important}.inventory-topline{font-size:7px}.inventory-footer{font-size:7px}.item-dossier-copy>h2{font-size:18px;line-height:21px}.party-modal .party-card-member{grid-template-columns:42px minmax(0,1fr);gap:3px 5px;padding:7px}.party-modal .party-card-art,.party-modal .party-card-portrait{width:42px;height:71px}.party-modal .party-card-name{font-size:12px}.party-modal .party-card-class{font-size:6px}.party-sheet-title h2{font-size:22px}.world-chapter-pass>strong{font-size:17px;line-height:20px}.world-chapter-pass>img{height:55px}.world-chapter-pass>p{font-size:9px;line-height:13px}}
@media(prefers-reduced-motion:reduce){.shore-online-track>i,.party-modal,.modal-shade.closing .party-modal{animation:none!important}}
#app.reduced-motion .shore-online-track>i,#app.reduced-motion .party-modal,#app.reduced-motion .modal-shade.closing .party-modal{animation:none!important}

#world #map{overflow:clip}
#world #map-art>.scene{width:100%;height:100%;object-fit:fill;inset:0}
.modal.world-journal-modal{width:min(410px,calc(100vw - 24px));padding:17px;border-radius:19px;background:#fbf6e8;max-height:calc(100% - 42px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.world-journal-modal::-webkit-scrollbar{display:none}
.world-journal-modal>.modal-header{border:0;margin-bottom:13px;padding:0;align-items:center}
.world-journal-modal>.modal-header>h2{font:700 24px/28px Interface,sans-serif;color:#356152}
.world-journal-tabs{display:grid;grid-template-columns:1fr 1.4fr;gap:6px;padding:4px;background:#edf0e0;border:1px solid #d6ddc5;border-radius:9px;margin-bottom:13px}
.world-journal-tabs>button{min-height:34px;padding:5px;border:0;border-radius:6px;background:none;color:#74876b;font-size:10px}
.world-journal-tabs>button[aria-selected="true"]{background:#fffdf5;color:#315e52;box-shadow:0 1px 4px #344c2714;font-weight:700}
.world-journal-entries{display:flex;flex-direction:column;gap:10px}
.world-journal-entry{padding:13px 12px;border:1px solid #d8caab;border-radius:11px;background:linear-gradient(135deg,#fffdf4,#f5edda);box-shadow:inset 0 0 0 2px #fffaf0}
.world-journal-entry>header{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:9px;color:#8a9874}
.world-journal-entry>header>small{font-size:8px;color:#a89a7e}
.world-journal-entry>h3{font:700 20px/24px Interface,sans-serif;color:#386655;margin:8px 0}
.world-journal-entry>ul{padding-left:14px;margin:0;color:#8a826b;font-size:10px;line-height:16px}
.world-journal-entry li+li{margin-top:5px}
.world-journal-entry>p{white-space:pre-line;color:#8a826b;font-size:12px;line-height:19px;margin:0}
.world-journal-empty{display:flex;min-height:220px;flex-direction:column;align-items:center;justify-content:center;gap:13px;padding:22px 10px;border:1px solid #ddd1b7;border-radius:12px;text-align:center;background:#f8f2e3}
.world-journal-empty>img{width:56px;height:58px;object-fit:contain;opacity:.75}
.world-journal-empty>strong{font:700 20px/25px Interface,sans-serif;color:#4c7360}
.world-journal-empty>p{font-size:11px;line-height:18px;color:#a08f72;margin:0}
