/* 6.4: no card art, card geometry, sign, map topology or renderer restyling. */
html.map64-scrollable{height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;scroll-behavior:auto;overflow-anchor:none;}
body.map64-enabled{overflow:visible!important;overflow-anchor:none;}
body.map64-enabled #board,body.map64-enabled #game-world{position:fixed;inset:0;}
/* 6.81: on a touch device the DOM map is hosted in the DOCUMENT, not in the fixed
   viewport layer, so the browser's own scroller moves it exactly as it already moves
   the pyramid, the player cards and the sidebar, none of which vibrate. body is
   position:relative and map-page.mjs sets its height, so inset:0 above already spans
   the whole scrollable page and #game-world's existing overflow:hidden still clips to
   it. z-index 5 and its stacking context are unchanged, so the map stays above the
   canvas and below the panels and the foreground clouds. #board deliberately keeps its
   fixed host: at settle the canvas holds only sea, ripples and sky. maphost681 is
   written by the same frame that writes the host offset the map transform uses. */
body.maphost681.map64-enabled #game-world{position:absolute;}
body.map64-active #board{touch-action:pan-y;}
body.map64-enabled #game-hud{top:var(--map64-headroom,0px);bottom:auto;height:var(--map64-view-height,100vh);overflow:visible;}
body.map64-enabled .developer-tray{position:absolute;top:calc(var(--map64-headroom,0px) + 83px);}
/* Blocking dialogs remain viewport-sized even while the page is scrolled. */
body.map64-enabled #game-overlay{position:fixed;inset:0;}
/* The original lesson still explains these controls; never break its recordings.
   Outside the tutorial, the controls are absent from layout and keyboard focus. */
body:not(.touring) #game-hud [data-ui="fold"],
body:not(.touring) #game-hud [data-ui="hide-all"],
body:not(.touring) #game-show-ui,
body:not(.touring) #game-view-toggle{display:none!important;}
body.map64-enabled #game-hud .draft-corner{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 28px);pointer-events:none;transition:none;}
body.map64-enabled #game-hud .draft-corner .draft-heading{height:52px;justify-content:center;text-align:center;}
body.map64-enabled #game-hud .draft-corner .pyramid-help{max-width:none;text-align:center;margin:5px 0 0;}
body.map64-enabled #game-hud .draft-corner[aria-hidden="true"]{visibility:hidden;pointer-events:none;}
body.map64-enabled #game-hud .draft-corner[aria-hidden="true"] .pcard{pointer-events:none;}
body.map64-enabled #game-hud .draft-corner #pyramid-scale-box,
body.map64-enabled #game-hud .draft-corner .pyramid-help{display:block;}
.map64-input-region{position:fixed;z-index:4;pointer-events:auto;touch-action:none;cursor:grab;background:transparent;}
.map64-input-region:active{cursor:grabbing;}
/* 6.79: on a coarse pointer the settled map belongs to the browser's own vertical
   scroller, so one finger scrolls the page on the compositor with a real fling
   instead of the per-move scrollBy emulation. The map cards sit above the region,
   so a finger landing on a card must scroll exactly like a finger landing beside it
   (this overrides map-view.css's default without editing the map's own stylesheet).
   A fine pointer never gets coarse679 and keeps touch-action:none above. */
body.coarse679 .map64-input-region,
body.coarse679.map64-enabled #game-world .map62-layer button{touch-action:pan-y;}
@media(max-width:760px){body.map64-enabled .developer-tray{top:calc(var(--map64-headroom,0px) + 8px);}}


/* 6.8: viewport header, scrollable player panels. The existing recorded tutorial
   opts out via map64-enabled; original artwork, cards and markup are retained. */
body.map64-enabled #game-hud .game-top{position:fixed;}
body.map64-enabled #game-hud #game-turn,
body.map64-enabled #game-hud [data-ui="hide-hands"]{display:none!important;}
/* 6.84: a landscape touch tablet keeps this desktop header, and since its 6.83 width fit the top row
   of map cards scrolls under the fixed title text on the left and the Help and Menu plates on the
   right (the top-right card's heading hit-tested as Help). It gets the two 6.82 phone behaviours
   (responsive676.css), scoped to body.tabletfit683, which responsive676.mjs publishes beside
   model.tabletFit683 and which no phone, portrait tablet, PC or ?tabletfit=0 page ever carries.
   1. The title text is hidden while a game is on screen, visibility not display so the box keeps its
   slot and grows into it as the home of the help-mode note, which stays visible on an opaque slate
   plate at the strip's top, with the phone note's own declarations. Unlike the phone rule the box
   keeps the desktop max-width (calc(50vw - 190px), the column left of the centred plaque): at scroll
   0 the pyramid heading sits centred in the strip's band, and a note the width of the whole slot ran
   over it (measured at 1024x768: 14 to 614 against a centred heading). map64-enabled (world and map
   view) like the phone rule: in world view the title lies over nothing but the canvas (measured), so
   hiding it there costs nothing, and the title cannot blink on and off as the map fades in or out
   mid-pinch. A room code in the hidden subtitle is still on the Room button beside Help.
   2. The plates and the note stand aside on hud-away682, which map-page.mjs publishes through the same
   hudAway682 decision (gate hudGate684). The distance is the element's own height, the strip's 12px
   top (18px at 2100px and wider), the 20px glass header shift and room to spare, so each ends at
   least 10px above the viewport and the tutorial mask drops its Menu hole. No env() term: the
   desktop strip's top does not read the safe area. visibility follows the fade out, so a hidden
   plate is neither tappable nor focusable, and it returns at once on the way back in.
   6.88: a tablet is shown as a PC (tablet-pc688.mjs) and never publishes body.tabletfit683 again, so this
   block is now reached only through ?tabletpc=0 (today's tablet presentation, for comparison). Even there
   the title is VISIBLE (the owner wants it on every device): it travels with the toolbar on hud-away682,
   the help-mode note keeps its opaque plate inside the title box, and the title's own glyphs are
   transparent while help mode is on. The title box moves 64 px past its own height (48 for the plates):
   the two-line note inside it stands up to 14 px below the box's bottom on the desktop face, and must
   still end above the viewport. tests/stage6-88-cards-title-tablet.test.mjs pins that no sheet hides
   .game-brand outside that slide. */
body.tabletfit683.map64-enabled #game-hud .game-brand{flex:1 1 auto;min-width:0;}
body.tabletfit683.map64-enabled #game-hud .game-brand .help671-mode-note{top:0;left:0;width:100%;margin:0;background:#22353a;}
body.tabletfit683.map64-enabled.help-mode671-on #game-hud .game-brand,body.tabletfit683.map64-enabled.help-mode671-on #game-hud .game-brand>span{color:transparent;text-shadow:none;}
body.tabletfit683.map64-enabled #game-hud .game-top .game-toolbar,
body.tabletfit683.map64-enabled #game-hud .game-brand{transition:transform .22s ease,opacity .22s ease,visibility 0s linear 0s;}
body.tabletfit683.map64-enabled.hud-away682 #game-hud .game-top .game-toolbar,
body.tabletfit683.map64-enabled.hud-away682 #game-hud .game-brand{transform:translateY(calc(-100% - 64px));opacity:0;visibility:hidden;pointer-events:none;transition:transform .22s ease,opacity .22s ease,visibility 0s linear .22s;}
body.map64-enabled #game-hud .game-hands{
 position:absolute;bottom:auto;right:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:auto;align-items:stretch;height:auto;max-height:none;min-height:var(--player68-min-height,240px);
 visibility:visible;pointer-events:auto;transition:none;touch-action:pan-y;
}
body.map64-enabled #game-hud .game-hands[hidden]{display:none!important;}
body.map64-enabled #game-hud .game-hands[aria-hidden="true"]{visibility:hidden;pointer-events:none;}
body.map64-enabled #game-hud .game-hands[inert],
body.map64-enabled #game-hud .game-hands[inert] *{pointer-events:none;}
body.map64-enabled #game-hud .game-hands .hand-panel{
 height:auto;max-height:none;min-height:var(--player68-min-height,240px);overflow:visible;
}
/* There is one page scroll, not a second scrollbar inside each player panel.
   Tall inventories extend the page and keep every deed/creature reachable. */
body.map64-enabled #game-hud .game-hands .hand-scroll{
 flex:1 1 auto;overflow:visible;max-height:none;height:auto;overscroll-behavior:auto;touch-action:pan-y;
}

/* Intrinsic content stays measurable independently of its stretched frame. */
body.map64-enabled .layout620-hand-flow{display:flow-root;}

/* 6.24: the moving player group cannot enlarge native document scroll bounds.
   The wrapper's origin is the original HUD origin, preserving final coordinates.
   Outside normal map play it is transparent to the legacy tutorial layout. */
.panel624-hand-clip{display:contents;}
body.map64-enabled #game-hud .panel624-hand-clip{
 display:block;position:absolute;left:0;top:0;width:100%;height:100%;
 overflow:clip;pointer-events:none;
}

/* 6.30: hide only the native PAGE scrollbar, not document scrolling.
   Remove the 6.26 stable gutter: it reserved an empty blue strip even while
   zoom locked overflow. A zero-width scrollbar keeps the viewport edge-to-edge
   in BOTH modes, so unlocking at 100% cannot change the canvas/layout width.
   Dialog/debug/tutorial scrolling and the existing input policy are unchanged. */
html.zoom626-enabled{scrollbar-gutter:auto;scrollbar-width:none;}
/* Fallback for engines using the WebKit scrollbar pseudo-element. */
html.zoom626-enabled::-webkit-scrollbar{display:none;width:0;height:0;}
html.zoom626-enabled.zoom626-locked{overflow-y:hidden!important;overscroll-behavior-y:none;}
/* 6.79: the region joins this list. It was omitted while its only value was
   touch-action:none anyway; with the coarse679 pan-y rule above it would otherwise
   stay scrollable for the whole of a zoom session. */
body.zoom626-locked .map64-input-region,
body.zoom626-locked #board,
body.zoom626-locked #game-world,
body.zoom626-locked #game-hud,
body.zoom626-locked #game-hud .game-hands,
body.zoom626-locked #game-hud .hand-scroll,
body.zoom626-locked #game-hud .sidebar-shell,
body.zoom626-locked #game-hud .sidebar-shell *{touch-action:none!important;}
