/* The map is the first screen (Ryan's standard, CLAUDE-TOOLS-HUB.md A4 Feel: "The first screen is the thing people came for";
   every serious rival map starts 0 to 80 px down). The shape that does it, the best rival's (DayZed: its panel down the left,
   the map filling the rest of the window under the site's bar), in our own colors. Shared on purpose: the DayZ, Valheim and
   Minecraft map pages all have one <aside> beside one .map-section, so a page moves onto this by adding the classes below.

   A page needs:
     body.mapfirst-page
     section.mapfirst-wrap     no container, no padding
     .mapfirst                 the tool's root
       > aside
         .mapfirst-head        the page's H1, inside the panel (the band and the intro go below the map)
         .mapfirst-find        the one thing that floats over the map on a phone: the search
         .mapfirst-sheet       everything else; on a phone it slides up from the bar
           [data-tab="a b"]    which of the bar's tabs show this section
       > .map-section
         .mapfirst-stage       the map's own box; the renderer fits it, nothing here knows the renderer
         .map-footer           the line of actions, floating over the map's corner
       > .mapfirst-bar         the thumb bar on a phone: button[data-tab] opens a sheet, button[data-press="#id"] presses a panel button
   and js/map-first.js, which reads where the site's header ends into --mapfirst-top and runs the bar.

   Under 900 px wide there is no room for a panel beside a map, so the panel becomes the sheet. The title line and the bar are
   not map: a thumb that swipes on them scrolls the page, so the guide below stays reachable. */
:root { --mapfirst-top: 97px; --mapfirst-panel: 290px; --mapfirst-bar: 58px; }
body.mapfirst-page section.mapfirst-wrap { margin: 0; padding: 0; border: 0; }
.mapfirst { position: relative; display: grid; grid-template-columns: var(--mapfirst-panel) minmax(0, 1fr); height: calc(100vh - var(--mapfirst-top)); min-height: 500px; }
@supports (height: 100svh) { .mapfirst { height: calc(100svh - var(--mapfirst-top)); } }
.mapfirst > aside { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.mapfirst-sheet { display: contents; }
.mapfirst > .map-section { position: relative; min-width: 0; min-height: 0; }
.mapfirst .mapfirst-stage { position: absolute; inset: 0; }
.mapfirst .map-footer { position: absolute; left: 12px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 8px; }
.mapfirst-bar { display: none; }
@media (max-width: 1100px) { :root { --mapfirst-panel: 270px; } }
@media (max-width: 900px) {
	.mapfirst { display: flex; flex-direction: column; min-height: 460px; }
	.mapfirst > aside { display: contents; }
	.mapfirst-head { flex: none; }
	.mapfirst > .map-section { flex: 1 1 auto; }
	.mapfirst-find { position: absolute; left: 8px; right: 8px; top: 46px; z-index: 6; }
	.mapfirst-sheet { display: none; position: absolute; left: 0; right: 0; bottom: var(--mapfirst-bar); z-index: 7; max-height: min(66%, 460px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
	.mapfirst[data-tab] .mapfirst-sheet { display: block; }
	.mapfirst[data-tab="more"] .mapfirst-sheet { display: none; }
	.mapfirst .map-footer { left: 8px; right: 8px; bottom: 8px; flex-wrap: wrap; pointer-events: none; }
	.mapfirst .map-footer > * { pointer-events: auto; }
	.mapfirst-bar { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: var(--mapfirst-bar); }
}
@media (min-width: 560px) and (max-width: 900px) { .mapfirst-sheet { right: auto; width: 440px; } .mapfirst-find { right: auto; width: 424px; } }
html.mapfirst-noscroll, html.mapfirst-noscroll body { overflow: hidden; }
/* Two things every page has would sit on the controls here: the seasonal bats roosting under the menu (over the H1 and +, and
   they take clicks), and the fixed "View classic website" dot in the corner (over the thumb bar's first button). The dot moves
   to just below the first screen. */
body.mapfirst-page .hw-roost { display: none; }
body.mapfirst-page .ssv2tgl { position: absolute; top: calc(100vh + 14px); bottom: auto; }
@supports (height: 100svh) { body.mapfirst-page .ssv2tgl { top: calc(100svh + 14px); } }
