/* Shared presentation layer. Layout/safe-area ownership remains in app-shell. */
:root{--ui-surface:#24383f;--ui-raised:#30474d;--ui-edge:#718783;--ui-ink:#eef2e8;--ui-muted:#c0cfca;--ui-accent:#e5d5a6;color-scheme:dark}
body,input,select,button,textarea{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{color:var(--ui-ink);background:#172a32}
button,input,select,textarea{border-radius:9px;color:var(--ui-ink)}
button{border-color:#718783;background:#30484c;box-shadow:none;transition:background .12s,transform .12s}
button:hover{background:#3c5658}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #e9d6a5;outline-offset:2px}
input,select,textarea{background:#1b3038;border:1px solid #718783;padding:9px 10px}
button.primary,.primary{background:#4f746c;border-color:#a1b6a4;color:#fff7df;border-radius:9px}
.shell .topbar,.mobile-vitals{background:#23383ef5;color:var(--ui-ink);border-color:#778a81}
.card,.account-form,.account-art,.roster,.sidebar,.client-window,.mobile-sheet,#worldAtlas,#accountMenu,#hotkeyEditor,#mobileHealMenu{background:#24383ff5;color:var(--ui-ink);border:1px solid #718783;border-radius:12px;box-shadow:0 5px 20px #07171c40}
.sidebar{padding:5px;gap:6px;background:#20343a}.client-window{overflow:hidden}.client-window>summary{background:#30464b;color:#edf1df;font:600 12px/1.25 ui-sans-serif,system-ui,sans-serif;min-height:30px;padding:5px 8px;border-bottom:1px solid #617873}
.window-body{padding:9px}.window-body h2,.window-body h3,.panel-title{font-family:inherit;color:#e5e8d6;letter-spacing:.02em}.window-body p,.outfit-intro,.mobile-menu-tip{color:var(--ui-muted);line-height:1.5}
.window-dock,.window-float-close,.collapse-mark{color:#d9e3d7}.drag-handle{opacity:.55}
.mobile-sheet-header{background:#30464b;border-bottom:1px solid #617873}.mobile-sheet-header h2{font:600 15px/1.2 ui-sans-serif,system-ui,sans-serif}
.mobile-sheet-tabs button,.mobile-window-menu button,.mobile-window-menu a,#accountMenu button,#accountMenu a,#godMenu select,#godMenu button,#dialogueActions button,#spells button,.outfit-view-controls button{background:#30494e;border-color:#718783;border-radius:9px;color:#eef0df}
.mobile-sheet-tabs button.selected,.mobile-window-menu button:active,.outfit-view-controls button[aria-pressed=true]{background:#53746c;color:#fff5d8;border-color:#c4c8a1}
.inventory .bag-item,.equipment .slot{background:#20353d;border:1px solid #687f7b;border-radius:9px;color:#e9ecdf;box-shadow:none}.inventory .bag-item:hover,.equipment .slot:hover{background:#344f53}
.item-icon{image-rendering:pixelated;width:32px;height:32px;object-fit:contain}.inventory .item-icon{width:40px;height:40px}.slot .item-icon{width:36px;height:36px}
.catalog-search{display:grid;grid-template-columns:minmax(0,1fr) 115px;gap:6px;align-items:end}.catalog-search input{grid-column:1}.catalog-search select{grid-column:2;grid-row:2;max-width:100%;min-width:0;font-size:13px}.catalog-search>span{grid-column:1/-1;color:#c3d0c8;font-size:12px}#catalogCount{display:block;margin:8px 0;color:#c6d3cb;font-size:12px}
#equipmentCatalog{display:grid;gap:7px}.catalog-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #627a76;border-radius:10px;background:#2b4249;min-width:0}.catalog-item .item-icon{width:56px;height:56px;float:none;margin:0}.catalog-copy{display:flex;flex-direction:column;gap:4px;min-width:0;line-height:1.4}.catalog-copy strong{font-size:14px;color:#f5e9c6}.catalog-copy small{font-size:12px;color:#d5ded0}.catalog-copy p{margin:0;font-size:12px;color:#bbcfc9}
.quest-row,.party-member{border-color:#607b74;border-radius:8px}.chat-log{background:#1c3139;border-radius:8px;padding:6px}.chat-head,.eyebrow{color:#c0cfc8}.target-card,.hero-card{color:#edf0e5}.bar,.party-meter{border-radius:5px;overflow:hidden}.toast{border-radius:10px;background:#233d43ed;color:#fff0d2;border-color:#8c9d87}
.outfit-choices button{background:#233b42;border-color:#6f8980;border-radius:10px}.outfit-choices button[aria-pressed=true]{border-color:#e7ce8e;background:#46645c}.outfit-colors input{padding:2px;border-radius:6px}
body.mobile-layout .mobile-vitals strong{font:600 14px/1.2 ui-sans-serif,system-ui,sans-serif}body.mobile-layout .mobile-vitals>div:first-child>span{font:11px/1.2 ui-sans-serif,system-ui,sans-serif;color:#c1d0c7}
body.mobile-layout .mobile-meter{border-color:#79918a;border-radius:6px;background:#162c34}body.mobile-layout .mobile-meter>span{font:600 11px/1.2 ui-sans-serif,system-ui,sans-serif}
body.mobile-layout.in-realm #mobileNavigation{background:#23383f;border-top:1px solid #809187;border-radius:13px 13px 0 0}body.mobile-layout.in-realm #mobileNavigation button{background:transparent;border:0;color:#d6dfd0;border-radius:10px 10px 0 0}body.mobile-layout.in-realm #mobileNavigation button.selected{background:#3c5655;color:#fff0c9}body.mobile-layout #mobileNavigation small{font:500 10px/1.1 ui-sans-serif,system-ui,sans-serif;letter-spacing:0}body.mobile-layout #mobileNavigation button>span{color:#d6ddbe}
body.mobile-layout .mobile-actions button,body.mobile-layout .mobile-actions .custom-hotkey{border-radius:50%!important;border:1px solid #9d9f80!important;background:#263c43eb!important;box-shadow:0 2px 7px #08191d44;color:#e6ddbb}body.mobile-layout .mobile-actions #mobileHeal{background:#36534deb!important}body.mobile-layout .mobile-actions #editHotkeys{border:0!important;background:transparent!important;box-shadow:none}body.mobile-layout .mobile-actions #mobileAttack.attacking{border-color:#f2ba8b!important;background:#664a43eb!important}body.mobile-layout .mobile-actions button.unusable{opacity:.55}body.mobile-layout .mobile-actions .custom-hotkey img{width:28px;height:28px}body.mobile-layout .mobile-actions button>span{font-family:inherit}
body.mobile-layout .party-hud,body.mobile-layout .party-open{border:1px solid #8e9b83;background:#263e43e8;border-radius:10px;color:#e6e9cf}body.mobile-layout .mobile-sheet{border-radius:12px 12px 0 0;border-color:#7c9187}body.mobile-layout.mobile-sheet-compact .mobile-sheet{border-radius:12px}body.mobile-layout .mobile-sheet-header h2{font-size:14px}
@media(min-height:700px) and (orientation:portrait){body.mobile-layout .mobile-actions{width:64px!important;gap:7px!important;right:10px!important}body.mobile-layout #primaryHotkeys{gap:7px}body.mobile-layout .mobile-actions #primaryHotkeys button{width:50px!important;height:50px!important}body.mobile-layout .mobile-actions #primaryHotkeys #mobileAttack{width:58px!important;height:58px!important}body.mobile-layout #customHotkeys{grid-template-columns:50px}body.mobile-layout .mobile-actions .custom-hotkey{width:50px!important;height:50px!important}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Fixed logical pixel raster: no fractional CSS stretch or gameplay zoom. */
#world{image-rendering:pixelated;flex:none;max-width:none} .zoom-controls[hidden]{display:none!important}
#appScreen{background:#172a32}#appScreenFrame{background:#172a32;color-scheme:dark}
#appScreen #appScreenFrame{display:block;flex:1 1 0;height:0;min-height:0;width:100%}
#appScreenFrame[hidden],#appScreenLoading[hidden],#appScreenError[hidden]{display:none!important}#appScreenLoading,#appScreenError{margin:16px;color:#dce9df}#appScreenError a{color:#e7d4a4}
.mobile-window-menu{display:flex!important;flex-direction:column;gap:18px;padding:4px}.more-group h3{margin:3px 0 8px!important;font:600 11px/1.3 system-ui!important;text-transform:uppercase;letter-spacing:.09em;color:#b8cdc4!important}.more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mobile-window-menu .more-grid button,.mobile-window-menu .more-grid a,.mobile-window-menu>#mobileGodEntry{display:flex;align-items:center;gap:9px;min-width:0;min-height:76px;margin:0;padding:11px 9px;text-align:left;text-decoration:none;background:linear-gradient(140deg,#36535a,#283f47);border:1px solid #6f8982;border-radius:13px;box-shadow:inset 0 1px #b8d0bb15;color:#e5ecdd}.mobile-window-menu .more-grid button:active,.mobile-window-menu .more-grid a:active{background:#4d6a62;transform:translateY(1px)}.mobile-window-menu .more-icon{display:grid;place-items:center;flex:0 0 29px;width:29px;height:33px;color:#e0cf9b;font-size:23px}.more-icon svg{width:26px;height:26px}.mobile-window-menu .more-copy{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.more-copy strong{font:600 12px/1.2 system-ui;color:#eff0df}.more-copy small{font:10px/1.35 system-ui;color:#bbd0c8;white-space:normal}.mobile-window-menu .more-arrow{font:20px/1 system-ui;color:#b5cbbd;flex:none}.mobile-window-menu #mobileGodEntry[hidden]{display:none!important}
@media(max-width:360px){.more-grid{gap:6px}.mobile-window-menu .more-grid button,.mobile-window-menu .more-grid a{gap:5px;padding:9px 6px}.mobile-window-menu .more-icon{flex-basis:23px;width:23px}.more-copy strong{font-size:11px}}

.mobile-window-menu .more-grid button,.mobile-window-menu .more-grid a,.mobile-window-menu>#mobileGodEntry{flex-direction:row!important}.mobile-window-menu>button[data-mobile-panel=party]{min-height:54px;border-radius:12px;text-align:left;background:#30494e;border:1px solid #718783;color:#e5ecdd}

.world-wrap{resize:none!important}.viewport-toolbar label[hidden]{display:none!important}

/* Master polish: controls use viewport anchors, independent of hotkey count. */
body.mobile-layout.in-realm{--safe-top:env(safe-area-inset-top,0px);--head-height:64px}
body.mobile-layout.in-realm .topbar{box-sizing:border-box;height:calc(var(--head-height) + var(--safe-top));min-height:calc(var(--head-height) + var(--safe-top));padding-top:calc(var(--safe-top) + 8px)!important;padding-bottom:8px!important}
body.mobile-layout.in-realm #mobileNavigation{position:relative;bottom:0!important;box-sizing:border-box;height:calc(var(--nav-height) + var(--safe-bottom));padding:3px 4px 0!important;align-items:stretch}
body.mobile-layout.in-realm #mobileNavigation button{padding-bottom:calc(4px + var(--safe-bottom));min-height:0}
body.mobile-layout.in-realm .mobile-actions{position:absolute;top:auto!important;bottom:10px!important;right:max(10px,env(safe-area-inset-right))!important;height:calc(100% - 40px);max-height:calc(100% - 40px)!important;width:76px!important;overflow:visible!important;pointer-events:none;justify-content:flex-end}
body.mobile-layout.in-realm #primaryHotkeys{display:flex;flex-direction:column;flex:0 0 auto;gap:6px;order:2;pointer-events:auto}
body.mobile-layout.in-realm #primaryHotkeys #mobileAttack{order:10;width:72px!important;height:72px!important;min-height:72px!important;font-size:14px}
body.mobile-layout.in-realm #primaryHotkeys #mobileAttack>span{font-size:28px}
body.mobile-layout.in-realm #customHotkeys{order:1;flex:0 1 auto;max-height:calc(100% - 292px);min-height:0;overflow:auto;pointer-events:auto;display:grid;grid-template-columns:50px}
body.mobile-layout.in-realm #customHotkeys:empty{display:none}
body.mobile-layout.in-realm #primaryHotkeys button{pointer-events:auto}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout.in-realm{--head-height:46px}body.mobile-layout.in-realm .mobile-actions{width:168px!important;display:flex!important;max-height:calc(100% - 8px)!important;height:calc(100% - 8px);bottom:4px!important}body.mobile-layout.in-realm #primaryHotkeys{display:grid;grid-template-columns:44px 44px 72px;grid-template-rows:44px 72px;gap:3px}body.mobile-layout.in-realm #primaryHotkeys #mobileAttack{grid-column:3!important;grid-row:2!important}body.mobile-layout.in-realm #customHotkeys{position:absolute;right:170px;bottom:0;max-height:100%;grid-template-columns:repeat(2,44px)}}

.window-dock[hidden]{display:none!important}.libera-window-title,.mobile-sheet-header.libera-window-title{height:32px!important;min-height:32px!important;padding-top:0!important;padding-bottom:0!important}.libera-window-title h2{font-size:12px!important}.libera-window-title button{max-height:32px;min-height:30px!important;height:30px!important}

#finishControlLayout{position:absolute;top:50px;left:50%;transform:translateX(-50%);z-index:70;min-height:44px;background:#284a4f;color:#fff0ce;border:1px solid #dbc68b}#finishControlLayout[hidden]{display:none}.arranging-controls .mobile-actions button{outline:2px dashed #edce80;touch-action:none!important}.window-dock{font-size:14px!important;width:30px!important;min-width:30px!important}

body.mobile-layout .mobile-sheet-header.libera-window-title,body.mobile-layout #mobileSheet .libera-window-title,.client-window>summary.libera-window-title,#worldAtlas>header.libera-window-title,#accountMenu>strong.libera-window-title,#hotkeyEditor>strong.libera-window-title,#partyHud>header.libera-window-title{height:32px!important;min-height:32px!important;padding:0 4px!important;flex-wrap:nowrap!important}body.mobile-layout .mobile-sheet-header.libera-window-title>div{flex:1 1 auto!important;min-width:0}body.mobile-layout .mobile-sheet-header.libera-window-title h2{margin:0!important;font-size:12px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.mobile-layout .mobile-sheet-header.libera-window-title>button,#worldAtlas>header.libera-window-title button{height:30px!important;min-height:30px!important;max-height:30px!important}

/* Resizable windows and compact, in-map zoom controls. */
body.mobile-layout #mobileSheet.libera-free-window,.libera-free-window{height:var(--free-height,auto)!important;min-width:160px;min-height:110px;max-height:calc(100dvh - 8px)!important;overflow:auto!important}
.window-resize-grip{position:sticky;float:right;bottom:0;right:0;z-index:4;touch-action:none!important;cursor:nwse-resize;min-width:30px!important;min-height:30px!important;width:30px;height:30px;padding:0;opacity:.8}
.client-window:not([open])>.window-resize-grip{display:none}.map-wrap{position:relative!important}.map-wrap .mini-controls{position:absolute!important;top:4px!important;right:4px!important;bottom:auto!important;display:flex!important;align-items:center;gap:3px;background:#18373bd9;border-radius:7px;padding:2px;z-index:2}.map-wrap .mini-controls button{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;font-size:20px!important}.map-wrap .mini-controls #miniScale{font-size:10px!important;padding:0 3px}#minimap{display:block;width:100%!important;max-height:none!important;aspect-ratio:1/1;object-fit:contain}
body.mobile-layout .mobile-sheet-header.libera-window-title,body.mobile-layout #mobileSheet .libera-window-title,.client-window>summary.libera-window-title,#worldAtlas>header.libera-window-title{height:28px!important;min-height:28px!important;max-height:28px!important;padding:0 4px!important}.libera-window-title button,body.mobile-layout .mobile-sheet-header.libera-window-title>button{height:26px!important;min-height:26px!important;max-height:26px!important}body.mobile-layout #mobileSheet.libera-free-window .sidebar{height:calc(100% - 28px)!important;max-height:none!important;overflow:auto!important}body.mobile-layout #mobileSheet.libera-free-window .client-window[data-window=map] .window-body{overflow:auto!important}

.map-wrap{width:100%!important;box-sizing:border-box;height:200px;min-height:90px;padding:0!important}.map-wrap #minimap{width:100%!important;height:100%!important;aspect-ratio:auto!important;margin:0!important}.libera-free-window .map-wrap{height:calc(var(--free-height,290px) - 90px)!important}

.chase-glyph{display:inline-flex;align-items:center;justify-content:center}.chase-glyph svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}[data-chase] .running{display:none}[data-chase="true"] .standing{display:none}[data-chase="true"] .running{display:initial}[data-chase="true"] .chase-glyph{color:#a3dbb4;animation:chase-stride .55s ease-in-out infinite alternate}[data-chase="false"] .chase-glyph{color:#d2c8a5}@keyframes chase-stride{to{transform:translateY(-2px) rotate(-7deg)}}@media(prefers-reduced-motion:reduce){[data-chase] .chase-glyph{animation:none}}

body[data-mobile-panel="services"] #mobileSheet.mobile-sheet{height:auto;min-height:0;max-height:48dvh}body[data-mobile-panel="services"] #mobileSheet .window-body{padding:8px 10px}body[data-mobile-panel="services"] #dialogueText{max-height:18dvh;overflow:auto;line-height:1.45;margin:4px 0}body[data-mobile-panel="services"] #dialogueActions{max-height:20dvh;overflow:auto;display:flex;flex-wrap:wrap;gap:6px}.combat-preference{display:flex;align-items:center;gap:8px;padding:8px 0}.combat-preference input{width:20px;height:20px}@media(orientation:landscape) and (max-width:950px){body[data-mobile-panel="services"] #mobileSheet.mobile-sheet{max-height:70dvh;max-width:440px;right:8px;left:auto}}

#playerDeath{background:#192b31ed;color:#f2e5c1;border:1px solid #a79567;border-radius:14px;padding:24px;max-width:min(360px,88vw);text-align:center}#playerDeath::backdrop{background:#10172080;backdrop-filter:grayscale(.55)}#playerDeath h2{font-size:28px;margin:4px 0 12px;color:#eed4a2}#playerDeath button{display:block;width:100%;margin-top:12px;min-height:44px}#playerDeath p{font-size:14px;line-height:1.5}
.combat-preference{display:flex!important;align-items:center;gap:9px;min-height:44px;margin:8px 0;padding:0 3px;font-size:13px;cursor:pointer}
.combat-preference input[type=checkbox]{appearance:auto;width:20px!important;height:20px!important;min-height:20px!important;min-width:20px!important;flex:0 0 20px;padding:0!important;margin:0!important;accent-color:#d8c17c}

.atlas-launch{width:36px;min-width:36px;min-height:32px;padding:2px!important;line-height:1;font-size:22px;background:transparent;border:1px solid var(--ui-edge);border-radius:6px;margin-left:auto}#openWorldAtlasMobile{display:none}@media(max-width:800px){body[data-mobile-panel=map] #openWorldAtlasMobile{display:inline-block}#worldAtlas header{gap:4px;padding:6px}#worldAtlas nav{display:flex;gap:3px}#worldAtlas header button{min-width:38px;min-height:38px;padding:4px}#worldAtlas header strong{font-size:13px}}

.spawn-editor{position:fixed;top:max(72px,env(safe-area-inset-top));right:8px;width:min(300px,88vw);z-index:240;background:var(--ui-surface);border:1px solid var(--ui-edge);border-radius:8px;box-shadow:0 8px 32px #0008}.spawn-editor header{display:flex;align-items:center;justify-content:space-between;padding:4px 8px}.spawn-editor header button{min-height:32px;min-width:36px;padding:2px}.spawn-editor-body{padding:8px;max-height:52dvh;overflow:auto}.spawn-editor-body>input,.spawn-editor-body>select{width:100%;margin:3px 0}.spawn-editor-body label{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;margin:5px 0}.spawn-editor-body label input{width:75px;min-height:32px}.spawn-editor-body label input[type=checkbox]{width:20px;height:20px}.spawn-editor-actions{display:flex;flex-wrap:wrap;gap:4px}.spawn-editor-actions button{min-height:38px;font-size:12px;padding:4px 7px}.spawn-editor-body p{font-size:12px;line-height:1.4}#openSpawnEditor{min-width:40px;padding:4px;font-size:10px}

.spawn-editor.selecting{width:220px}.spawn-editor.selecting .spawn-editor-body>*:not(.spawn-editor-actions):not(p){display:none}.spawn-editor.selecting .spawn-editor-actions button:not(#spawnChoose){display:none}

.interface-preferences{display:grid;gap:7px}.interface-preferences>label{display:flex;align-items:center;gap:8px;justify-content:space-between;margin:0}.interface-preferences input[type=checkbox]{width:20px;height:20px;min-height:20px;margin:0;appearance:auto}.interface-preferences input[type=range]{width:130px;min-height:30px}.preference-actions{display:flex;flex-wrap:wrap;gap:5px}.preference-actions button{min-height:38px;padding:5px 8px;font-size:12px}.interface-preferences p{font-size:12px;line-height:1.5}.window-body{font-size:calc(13px * var(--ui-text-scale,1))}.window-body button,.window-body select{font-size:inherit}#chatLog .chat-line{font-size:var(--chat-text-size,13px);line-height:1.45}.libera-free-window.client-window:not([open]){height:28px!important;min-height:28px!important;overflow:hidden!important}.mobile-sheet-minimized #mobileSheet.libera-free-window{height:34px!important;min-height:34px!important}.high-contrast-ui{--ui-surface:#10252b;--ui-raised:#203c43;--ui-ink:#fff9e4;--ui-muted:#e4eade;--ui-edge:#c0d4c8}.high-contrast-ui button:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #ffe4a0;outline-offset:2px}.arranging-controls #mobileJoystick,.arranging-controls #mobileVitals{outline:2px dashed #edce80;touch-action:none!important;cursor:move}.arranging-controls #mobileVitals{pointer-events:auto!important}.arranging-controls #mobileJoystick{pointer-events:auto!important}body.mobile-layout #openInterfaceSettings{display:none}@media(max-width:900px){.window-body input:not([type=checkbox]):not([type=range]),.window-body select{font-size:16px}.interface-preferences>label{font-size:13px}.interface-preferences input[type=range]{max-width:115px}}
body.mobile-layout.mobile-sheet-compact #minimizeMobileSheet:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;min-width:30px;width:30px;padding:0}body.mobile-layout.mobile-sheet-minimized .mobile-sheet-header{display:flex!important}

.window-close{min-width:26px!important;width:26px;padding:0!important;font-size:17px}.client-window>summary>span:not(.drag-handle):not(.collapse-mark){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.interface-window-picker{display:grid;grid-template-columns:1fr 1fr;gap:5px}.interface-window-picker label{display:flex;gap:6px;align-items:center;font-size:12px}.interface-window-picker input[type=checkbox]{appearance:auto;min-height:20px;width:20px;height:20px}.interface-preferences summary{min-height:36px;display:flex;align-items:center}

body.mobile-layout #mobileStopAttack{width:44px;height:44px;min-height:44px;border-radius:50%;font-size:11px;}

body.mobile-layout #primaryHotkeys #mobileStopAttack{grid-column:1;grid-row:2;}

body.mobile-layout.in-realm #mobileAttack>small{display:block!important;font-size:10px!important;line-height:1.1;color:#f8e7c5;margin:0;}

/* Compact habitat tooling: bounded lists, readable iOS inputs, world-first placement. */
#spawnEditor{width:min(300px,calc(100vw - 16px));top:max(72px,calc(env(safe-area-inset-top) + 8px));max-height:calc(100dvh - 160px);overflow:hidden}#spawnEditor .spawn-editor-body{max-height:calc(100dvh - 210px);padding:6px;overflow:auto;overscroll-behavior:contain}#spawnEditor button,#spawnEditor select{min-height:40px;font-size:13px}#spawnEditor header{padding:2px 7px;font-size:14px}#spawnEditor header button{min-height:32px}#spawnEditor .spawn-toolbar{display:flex;gap:5px;margin-bottom:5px}#spawnSpecies{width:100%;text-align:left;padding:7px}#spawnEditor .spawn-picker[hidden]{display:none}#spawnEditor .spawn-picker{margin:5px 0}#spawnEditor .spawn-picker input{width:100%;font-size:16px;min-height:40px;box-sizing:border-box}#spawnEditor .spawn-picker-rows{max-height:min(210px,30dvh);overflow:auto;overscroll-behavior:contain}#spawnEditor .spawn-picker-rows button{display:block;width:100%;text-align:left;padding:7px;border-radius:4px;margin:2px 0;min-height:44px}#spawnEditor small{display:block;font-size:11px;color:var(--ui-muted)}#spawnEditor .spawn-editor-actions{margin-top:6px;display:grid;grid-template-columns:70px 1fr}#spawnSave{grid-column:1/-1}#spawnEditor details{margin-top:7px;font-size:13px}#spawnEditor summary{padding:6px;cursor:pointer}#spawnEditor p{margin:6px 0 0;font-size:12px}#spawnEditor.selecting{width:210px;max-height:150px;pointer-events:none}#spawnEditor.selecting header,#spawnEditor.selecting #spawnChoose,#spawnEditor.selecting #spawnStatus{pointer-events:auto}#spawnEditor.selecting .spawn-editor-body>*:not(.spawn-editor-actions):not(#spawnStatus){display:none}#spawnEditor.selecting #spawnSelectionMode,#spawnEditor.selecting #spawnSave{display:none}#spawnEditor.selecting .spawn-editor-actions{display:block}#spawnEditor.selecting #spawnChoose{width:100%}@media(max-height:430px){#spawnEditor.selecting{top:8px;max-height:132px}}#openSpawnEditor{font-size:19px;min-width:32px;width:32px;padding:2px}#spawnActivity{margin:0 0 4px;font-size:11px;color:var(--ui-muted)}#spawnEditor .spawn-filters{display:flex;gap:4px;flex-wrap:wrap}#spawnEditor .spawn-filters select{flex:1;min-width:0;font-size:16px}#spawnEditor .spawn-pager{display:flex;gap:4px}#spawnEditor .spawn-pager button{flex:1}#spawnNearby[aria-pressed=true]{outline:2px solid #9fe4bf}@media(max-height:600px){#spawnEditor{top:48px}#spawnEditor .spawn-editor-body{max-height:calc(100dvh - 160px)}}

#seaJourney{position:fixed;left:50%;top:max(80px,calc(env(safe-area-inset-top) + 50px));transform:translateX(-50%);z-index:280;width:min(560px,calc(100vw - 24px));box-sizing:border-box;padding:10px;background:#172f37ed;color:#f2e1b5;border:1px solid #87b7b1;border-radius:9px;pointer-events:none;font-size:13px}#seaJourney[hidden]{display:none}#seaJourney strong{display:block;font-size:14px}#seaJourney p{margin:5px 0}#seaJourney canvas{width:100%;height:auto;max-height:38dvh;image-rendering:pixelated;border-radius:5px}#seaJourney canvas[hidden]{display:none}.sea-arrival{position:fixed;z-index:280;top:24%;left:50%;transform:translateX(-50%);background:#18343bee;color:#f5dfa5;padding:12px;border:1px solid #9fbdab;border-radius:8px;pointer-events:none;width:max-content;max-width:85vw}


body:not(.mobile-layout) #rightSidebar {
  max-height: var(--desktop-sidebar-height, calc(100dvh - 86px));
  overscroll-behavior-y: contain;
}
body:not(.mobile-layout) #rightSidebar:focus-visible { outline: 2px solid #ffe4a0; outline-offset: -2px; }
body.mobile-layout.in-realm :is(#primaryHotkeys, #customHotkeys) { pointer-events: none; }
body.mobile-layout.in-realm #customHotkeys button { pointer-events: auto; }
body.mobile-layout #openQuestJournal { display: none; }
body:not(.mobile-layout) #questJournalPanel[open]:not([hidden]) {
  position: fixed;
  top: min(80px, 12vh);
  right: 12px;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  max-height: min(590px, calc(100dvh - 96px));
  z-index: 180;
}
body:not(.mobile-layout) #questJournalPanel.journal-expanded {
  width: min(510px, calc(100vw - 24px));
  max-height: calc(100dvh - 96px);
}
body:not(.mobile-layout) #questJournalPanel > summary { flex: none; }
body:not(.mobile-layout) #questJournalPanel > summary > strong { margin-right: auto; }
body:not(.mobile-layout) #questJournalPanel > .window-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
