/* Map controls float over the map; no separate title strip. */
/* Desktop chrome uses the same restrained proportions as mobile. */
html body.game-compact header,html body.game-compact #game-toolbar,html body.game-compact.touch-playing #game-toolbar{min-height:38px;height:38px;gap:6px;padding:4px 8px 4px 12px;border-radius:12px}
html body.game-compact header>h1,html body.game-compact header>strong,html body.game-compact #game-toolbar>strong{font-size:14px;line-height:28px;min-height:0}
html body.game-compact header .harbor-count{font-size:11px}
html body.game-compact .harbor-top-actions,html body.game-compact #harbor-primary{gap:4px}
html body.game-compact header .harbor-top-actions>button,
html body.game-compact #game-toolbar>#game-fullscreen,
html body.game-compact #harbor-primary .nb-select-trigger,
html body.game-compact #harbor-menu>summary{height:28px!important;min-height:28px!important;min-width:32px;padding:3px 8px!important;font-size:12px;border-radius:7px}
html body.game-compact #harbor-primary #player-mode+.nb-select{width:88px;max-width:88px;flex:0 0 88px;min-width:0}
html body.game-compact #harbor-map{top:calc(58px + env(safe-area-inset-top))}
html body.game-compact #harbor-map{opacity:.55;transition:opacity .15s}
html body.game-compact #harbor-map.expanded{opacity:1;background:#123541}
html body.game-compact #harbor-map .harbor-map-heading{position:absolute;z-index:4;top:0;right:0;left:auto;display:flex;align-items:center;justify-content:flex-end;height:32px;padding:0;gap:0;background:transparent;pointer-events:none}
html body.game-compact #harbor-map .harbor-map-heading>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body.game-compact #harbor-map .harbor-map-heading>button{display:inline-flex;align-items:center;justify-content:center;pointer-events:auto;flex:none;width:32px;min-width:32px;height:32px;min-height:32px;padding:0;margin:0;border:0;border-radius:8px;background:#102e3c66;color:inherit;font:20px/1 system-ui;cursor:pointer;box-shadow:none}
html body.game-compact #harbor-map .harbor-map-heading>button:focus-visible{outline:2px solid #efb579;outline-offset:-2px}
html body.game-compact #harbor-map #harbor-exploration{border-radius:inherit}
html body.game-compact #harbor-map.expanded #harbor-exploration{height:100%;min-height:0}
html body.game-compact #harbor-map.map-minimized{width:34px;height:34px;bottom:auto;transform:none;opacity:.65;border-radius:10px}
html body.game-compact #harbor-map.map-minimized #harbor-exploration,
html body.game-compact #harbor-map.map-minimized .harbor-map-heading>button:not(#compact-map-toggle){display:none}
html body.game-compact #harbor-map.map-minimized .harbor-map-heading{position:static;height:32px}
/* Expanded map's own toolbar shares the same top edge as minimize/close. */
html body.game-compact #harbor-map.expanded .harbor-map-heading{right:4px;top:4px}
html body.game-compact #harbor-map.expanded #harbor-exploration::part(toolbar){top:4px;right:76px;max-width:calc(100% - 80px)}
@media(max-width:760px),(orientation:landscape) and (max-height:500px){
 html body.game-compact header,html body.game-compact #game-toolbar,html body.game-compact.touch-playing #game-toolbar{top:calc(6px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left));right:calc(6px + env(safe-area-inset-right));display:flex;align-items:center;flex-wrap:nowrap;min-height:34px;height:34px;gap:4px;padding:1px 4px 1px 8px;border-radius:11px;background:var(--compact-toolbar-background,rgba(15,43,54,.38));backdrop-filter:blur(18px) saturate(130%);-webkit-backdrop-filter:blur(18px) saturate(130%)}
 html body.game-compact header>h1,html body.game-compact header>strong,html body.game-compact #game-toolbar>strong,html body.game-compact.touch-playing #game-toolbar>strong{font-size:12px;line-height:24px;min-height:0;margin:0;white-space:nowrap}
 html body.game-compact header .harbor-count{display:none}
 html body.game-compact .harbor-top-actions{gap:4px}
 html body.game-compact header .harbor-top-actions>button,
 html body.game-compact #game-toolbar>#game-fullscreen,
 html body.game-compact.touch-playing #game-toolbar>#game-fullscreen,
 html body.game-compact #harbor-primary .nb-select-trigger,
 html body.game-compact #harbor-menu>summary{height:24px!important;min-height:24px!important;min-width:30px;padding:2px 5px!important;font-size:11px;line-height:18px;border-radius:6px}
 html body.game-compact #game-fullscreen{flex:none;width:auto;min-width:34px}
 html body.game-compact #harbor-primary #player-mode+.nb-select,
 html body.game-compact.portrait-split #harbor-primary #player-mode+.nb-select{width:88px;max-width:88px;flex:0 0 88px;min-width:0}
 html body.game-compact #harbor-map{top:calc(48px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left));width:104px;border-radius:11px}
 html body.game-compact #harbor-map #harbor-exploration{height:94px;min-height:0}
 html body.game-compact #harbor-map.expanded{top:calc(48px + env(safe-area-inset-top));left:50%;bottom:calc(16px + env(safe-area-inset-bottom));width:calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right));height:auto;transform:translateX(-50%)}
 html body.game-compact #harbor-map.expanded #harbor-exploration{height:100%;flex:1;min-height:0}
 html body.game-compact #harbor-map.map-minimized{left:calc(6px + env(safe-area-inset-left));width:34px;height:34px;bottom:auto;transform:none}
}
@media(prefers-reduced-motion:reduce){html body.game-compact #harbor-map{transition:none}}
@media(max-width:760px),(orientation:landscape) and (max-height:500px){html body.game-compact .harbor-top-actions{margin-left:auto}}
