/* Browser game panels share the same raised frames and luminous controls. */
.world-browser-preview {
 --game-ink: #f2efff;
 --game-bevel: #ae9af3;
 --game-surface: #1a1e40;
 --game-button: linear-gradient(165deg,#6859ac,#352b71 65%,#271e53);
 --game-gold: linear-gradient(170deg,#fff3af,#ffd669 44%,#f3a442);
 --game-focus: #8af7ff;
 --map-edge: 20px;
 --map-bottom: 20px;
 --map-saved-size: clamp(132px,20vw,190px);
 --map-size: min(var(--map-saved-size),var(--map-size-limit,100dvh));
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.pause-box,.world-sheet[data-panel],.coop-dialog) {
 color: var(--game-ink);
 border: 1px solid var(--game-bevel);
 background: radial-gradient(ellipse at 10% 0,#63418f80,transparent 55%),
  radial-gradient(ellipse at 100% 4%,#245ea568,transparent 55%),var(--game-surface);
 box-shadow: inset 0 1px 0 #fbdbff90,inset 0 0 0 4px #a291f51b,0 13px 0 -6px #11112dcc,0 24px 60px #080b23a6;
}
:root[data-platform=win32] .world-browser-preview #world-app .world-sheet[data-panel] .sheet-header {
 color: var(--game-ink);
 background: linear-gradient(112deg,#6450a3,#423c83 46%,#243f71);
 border-bottom: 1px solid #aaa2ff73;
 box-shadow: inset 0 1px #e7d8ff66,0 4px 8px #090d2a45;
}
:root[data-platform=win32] .world-browser-preview #world-app .sheet-header h2 {color:#fbf2ff;text-shadow:0 2px 2px #231449}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-tool-card,.inventory-empty,.world-sheet[data-panel] .settings-row) {
 color: #f8f3ff;
 background: linear-gradient(148deg,#6557a666,#242755bb);
 border: 1px solid #b3a4ff52;
 box-shadow: inset 0 1px #eee4ff22,0 3px 5px #0c10244c;
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-tool-card,.settings-row,.inventory-empty) :is(h3,p,strong,label) {color:inherit}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-tool-card,.sheet-body,.pause-box) p {color:#ded8f6}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-header .icon-btn,.world-header .back-btn,.world-header .world-pill,
 .pause-box button,.world-sheet button,.world-tool-hotbar button) {
 color: var(--game-ink);
 border-color: #b4a5ff9c;
 background: var(--game-button);
 box-shadow: inset 0 1px #f0ddff75,inset 0 -2px #24174b66,0 3px 0 #171437;
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-header,.pause-box,.world-sheet,.world-tool-hotbar) button:hover:not(:disabled) {
 border-color: var(--game-focus);
 filter: brightness(1.17);
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-header,.pause-box,.world-sheet,.world-tool-hotbar) button:active:not(:disabled) {
 translate: 0 2px;
 box-shadow: inset 0 1px #ffffff55,0 1px 0 #171437;
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.world-header,.pause-box,.world-sheet,.world-tool-hotbar) button:focus-visible,
.world-browser-preview .minimap-size-controls button:focus-visible {
 outline: 2px solid var(--game-focus);
 outline-offset: 2px;
}
:root[data-platform=win32] .world-browser-preview #world-app :is(.pause-box .primary,[data-settings-resume],.world-tool-hotbar button[aria-pressed=true],
 .world-sheet [aria-selected=true],.world-sheet [data-active=true]) {
 background: var(--game-gold);
 border-color: #fff0a0;
 color: #38214c;
 box-shadow: inset 0 1px #ffffdb,0 3px 0 #733a45,0 5px 9px #110d2966;
}
:root[data-platform=win32] .world-browser-preview #world-app .world-sheet #sheet-close {
 color: #fff7fb;
 background: linear-gradient(#b95999,#79335f);
 border-color: #ffbbdb;
 box-shadow: inset 0 1px #ffdded99,0 2px #431b49;
}
:root[data-platform=win32] .world-browser-preview #world-app .world-tool-hotbar {
 padding: 5px 6px 7px;
 background: linear-gradient(145deg,#382953ed,#1a2549eb);
 border-color: #aca2e7a1;
 box-shadow: inset 0 1px #eee0ff52,0 5px 16px #1213278c;
}
:root[data-platform=win32] .world-browser-preview:not(:has([data-touch-input])) #world-app .world-tool-hotbar {
 max-width: calc(100vw - 132px);
}

:root[data-platform=win32] .world-browser-preview .world-minimap[data-square] {
 right: var(--map-edge);
 bottom: var(--map-bottom);
 width: var(--map-size);
 height: var(--map-size);
 border: 2px solid #a2e6f3;
 border-radius: 11px;
 background: #18384a;
 box-shadow: 0 0 0 3px #2f345a,0 6px 0 2px #14162e,0 9px 23px #081523a0,inset 0 0 14px #0f203c99;
}
.world-browser-preview:has(.world-minimap[data-size="0"]) {--map-saved-size:clamp(104px,15vw,145px)}
.world-browser-preview:has(.world-minimap[data-size="2"]) {--map-saved-size:clamp(160px,25vw,239px)}
.world-browser-preview:has(.world-minimap[data-size="3"]) {--map-saved-size:clamp(184px,30vw,294px)}
@media (max-width:900px) {
 .world-browser-preview {--map-edge:12px;--map-bottom:12px}
}
.world-browser-preview:has(#landscape[data-touch-input]) {--map-bottom:164px}
@media (orientation:landscape) and (max-height:500px) {
 .world-browser-preview:has(#landscape[data-touch-input]) {--map-bottom:114px}
}
.world-browser-preview .world-minimap[data-square] canvas {width:100%;height:100%;display:block}
.world-browser-preview .world-minimap[data-square] .minimap-north {
 top: 6px;
 left: auto;
 right: 5px;
 transform: none;
 padding: 1px 4px;
 background: #152540e8;
 color: #d7faff;
 border: 1px solid #a3eaff80;
 border-radius: 4px;
 text-shadow: none;
}
.world-browser-preview .world-minimap[data-square] .world-route-toggle {
 inset: 5px auto auto 5px;
 padding: 4px 6px;
 background: linear-gradient(#41628c,#1f315b);
 border-color: #a1e5ff;
 box-shadow: inset 0 1px #d5f3ff65,0 2px #0c2138;
}
.world-browser-preview .world-minimap[data-square] .world-route-distance {
 inset: auto 5px 41px auto;
 max-width: calc(100% - 10px);
 text-align: right;
}
.minimap-size-controls {
 position: absolute;
 display: flex;
 justify-content: end;
 gap: 5px;
 right: 5px;
 bottom: 5px;
 pointer-events: auto;
}
.minimap-size-controls button {
 display: grid;
 place-items: center;
 width: 30px;
 height: 30px;
 padding: 0;
 border: 1px solid #a1e5ff;
 border-radius: 6px;
 background: linear-gradient(#41628c,#1f315b);
 box-shadow: inset 0 1px #d5f3ff65,0 2px #0c2138;
 color: #f2fbff;
 cursor: pointer;
 font: 750 19px/1 system-ui,sans-serif;
 touch-action: manipulation;
}
.minimap-size-controls button:hover:not(:disabled) {background:#4b6fa5}
.minimap-size-controls button:disabled {opacity:.5;cursor:default}

:root[data-platform=win32] .world-browser-preview .world-health[data-portrait-health]:not([hidden]) {
 top: 53px;
 left: 15px;
 width: auto;
 padding: 0;
 gap: 5px;
 grid-template-columns: auto auto;
 background: none;
 border: 0;
 box-shadow: none;
 backdrop-filter: none;
}
.world-browser-preview .world-health .health-portrait {
 --health-color: #63ead5;
 --health-fill: 100%;
 position: relative;
 display: grid;
 place-items: center;
 box-sizing: border-box;
 width: 74px;
 aspect-ratio: 1;
 padding: 6px;
 border: 1px solid #c6e6ed;
 border-radius: 50%;
 background: conic-gradient(var(--health-color) var(--health-fill),#292846 var(--health-fill));
 box-shadow: 0 0 0 2px #282349,0 4px 12px #0b12296e;
}
.world-browser-preview .world-health[data-low=true] .health-portrait {--health-color:#ff6b87}
.health-portrait img {width:100%;border-radius:50%;background:radial-gradient(circle at 35% 25%,#655996,#231c47)}
.health-portrait b {
 position: absolute;
 bottom: 4px;
 left: 50%;
 transform: translateX(-50%);
 min-width: 26px;
 padding: 1px 2px;
 text-align: center;
 color: #f9ffff;
 border: 1px solid #beeaff96;
 border-radius: 8px;
 background: #1b2347;
 font: 800 11px/1.15 system-ui,sans-serif;
 font-variant-numeric: tabular-nums;
}
.world-browser-preview [data-health-note]:empty {display:none}
:root[data-platform=win32] .world-browser-preview:has([data-portrait-health]:not([hidden])) {
 --story-objective-top: 140px;
}
.world-shuttle-condition {
 position: absolute;
 z-index: 3;
 top: 62px;
 right: max(16px,env(safe-area-inset-right));
 width: min(190px,43vw);
 padding: 9px 11px;
 border: 1px solid #a4c4ecaa;
 border-radius: 11px;
 background: linear-gradient(135deg,#2e335aeb,#141f3ced);
 box-shadow: inset 0 1px #e9eeff44,0 4px 12px #1117299c;
 color: #f1f6ff;
 pointer-events: none;
}
.world-shuttle-condition[hidden],.shuttle-meter[hidden] {display:none}
.shuttle-meter {
 --meter-fill: 100%;
 --meter-color: #74e2ff;
 display: grid;
 grid-template-columns: minmax(0,1fr) auto;
 align-items: center;
 gap: 3px 8px;
 color: var(--meter-color);
 font: 750 11px/1.15 system-ui,sans-serif;
 font-variant-numeric: tabular-nums;
}
.shuttle-meter + .shuttle-meter {margin-top:8px}
.shuttle-meter-hull {--meter-color:#ffc58e}
.world-shuttle-condition.critical .shuttle-meter-hull {--meter-color:#ff7598}
.shuttle-meter i {
 grid-column: 1 / -1;
 height: 6px;
 border-radius: 3px;
 background: linear-gradient(90deg,var(--meter-color) var(--meter-fill),#0a1428 var(--meter-fill));
 box-shadow: inset 0 1px 1px #ffffff35;
}
.shuttle-recovered {font-size:11px;font-weight:700}
@media (pointer:coarse) {
 .minimap-size-controls button {width:40px;height:40px}
 .world-browser-preview .world-minimap[data-square] .world-route-distance {bottom:51px}
}
@media (max-height:480px) {
 .world-browser-preview {--map-size-limit:max(40px,calc(100dvh - 205px))}
 .world-browser-preview .world-health .health-portrait {width:60px}
 :root[data-platform=win32] .world-browser-preview:has([data-portrait-health]:not([hidden])) {--story-objective-top:122px}
}
