/* wide.css: the layout for wide screens (a computer, a tablet on its side), with wide.js. The space
   splits in two: the STAGE on the left shows only the map or artwork; the PANEL on the right holds
   everything you read and press. Everything here is under html.wide: phones are left as they are. */
.wide #app { max-width: none; } /* (the whole window: the user, 2026-11-24) */
/* a thin ink frame round the whole window, over everything (the tabs, cards, pop-ups, the main menu): the user,
   2026-11-25, "it should encapsulate the entire window". (Before, a stray one came from the wide-button style
   landing on html.wide, and its bottom edge sat under the tabs.) */
.wide body::after { content: ''; position: fixed; inset: 0; border: 1px solid var(--edge); pointer-events: none; z-index: 90; }

/* ---- the Here tab: the stage on the left (map or artwork only), the panel on the right ---- */
.wide .screen.split { padding: 0; overflow: hidden; }
.wide .screen.split > .stage { position: absolute; left: 0; top: 0; bottom: 0; right: var(--pn-w); display: grid; place-items: center; background: var(--bg); overflow: hidden; }
.wide .screen.split > .panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: var(--pn-w); box-sizing: border-box; overflow-y: auto;
  padding: 16px 16px 32px; border-left: 1px solid var(--line); background: var(--bg);
}
.wide .stage.backdrop { pointer-events: none; }
.wide .stage.backdrop > * { opacity: .55; }
/* a picture fills the stage as far as it can, keeping its shape */
.wide .stage > .picture { width: min(100%, calc(var(--st-h) * 16 / 9)); margin: 0; border-radius: 0; }

/* the map: the whole stage, with every map button in one column on its right edge (marks, then the rest) */
.wide .stage > .map-wrap { position: absolute; inset: 0; height: auto; }
.wide .stage > .map-buttons {
  position: absolute; right: 12px; top: 12px; bottom: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; pointer-events: none;
}
.wide .map-buttons > * { pointer-events: auto; }
.wide .map-buttons .map-tools, .wide .map-buttons .map-zoom { position: static; display: flex; flex-direction: column; flex-wrap: nowrap; max-width: none; gap: 6px; }
.wide .map-buttons .map-tools { padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.wide .map-wrap.below ~ .map-buttons .map-tools { display: none; }
@media (max-height: 720px) { .wide .map-buttons button { width: 34px; height: 34px; font-size: 17px; } .wide .map-buttons { gap: 4px; } }

/* what floated over the map sits in the panel, one under the other */
.wide .panel .map-hint {
  position: static; transform: none; width: auto; max-width: none; white-space: normal; flex-wrap: wrap;
  box-shadow: none; background: var(--panel); padding: 10px 12px; margin-bottom: 10px;
}
.wide .panel .road-bar { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.wide .panel .road-bar > :not(.road-more):not(.road-close) { grid-column: 1 / -1; }
.wide .panel .road-where b { max-width: none; white-space: normal; font-size: 17px; }
.wide .panel .way-chips { display: grid; gap: 6px; }
.wide .panel .way-chip { width: 100%; }
.wide .panel .road-trips { display: grid; gap: 6px; }
.wide .panel .road-trips .trip { justify-content: space-between; width: 100%; }
.wide .panel .road-more::after { content: ' More about it'; }
.wide .panel .road-close::after { content: ' Close'; }
.wide .panel .road-more, .wide .panel .road-close { font-size: 14px; padding: 8px 10px; }
.wide .panel-empty { color: var(--soft); font-size: 14px; margin: 4px; line-height: 1.5; }

/* ---- the other tabs (bag, body, journal): the whole width, one column in the middle ---- */
.wide .screen.full { padding: 24px max(24px, calc((100% - 920px) / 2)) 40px; }

/* ---- every card and pop-up: in the middle, over the game, as on a phone (the user, 2026-11-24), only
   bigger; a card's picture on top. The map's ways stay docked in the panel, beside the map. ---- */
.wide .sheet:not(.docked) { width: min(600px, calc(100% - 48px)); max-height: calc(100dvh - 48px); }
.wide .sheet.card:not(.docked) { width: min(760px, calc(100% - 48px), calc((100dvh - 260px) * 16 / 9)); min-width: min(480px, calc(100% - 48px)); }
.wide .sheet.docked {
  left: var(--pn-l); top: var(--st-t); bottom: auto; width: var(--pn-w); height: var(--st-h); max-height: none;
  border-radius: 0; border-width: 0 0 0 1px; box-shadow: none; transform: none; transition: opacity .18s;
}
.wide #sheet-layer.open .sheet.docked { transform: none; }
.wide .scrim.clear { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.wide .sheet.docked > .picture, .wide .sheet.docked .card-stage {
  position: fixed; left: var(--st-l); top: var(--st-t); width: var(--st-w); height: var(--st-h); box-sizing: border-box; margin: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--bg); border-radius: 0; padding: 0 24px;
}
.wide .sheet.docked > .picture { padding: 0; }
.wide .sheet.docked > .picture > .art { position: absolute; inset: 0; }
.wide .sheet.docked > .picture img { object-fit: contain; }
.wide .sheet.docked .card-stage > .picture { width: min(100%, calc((var(--st-h) - 120px) * 16 / 9)); border-radius: 0; }

/* ---- an encounter, the opening story, a new stage, a death: a pop-up in the middle over the game, as on a
   phone (the user, 2026-11-24), only bigger; its picture on top ---- */
.wide .overlay:is(.encounter, .story, .stage, .death, .wake) .overlay-body { width: min(760px, calc(100% - 48px), calc((100dvh - 300px) * 16 / 9)); min-width: min(480px, calc(100% - 48px)); }

/* ---- the main menu: its picture fills the left, its buttons the panel on the right ---- */
.wide .overlay.home { display: block; padding: 0; }
.wide .overlay.home .overlay-body {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--pn-w); box-sizing: border-box; overflow-y: auto; z-index: 1;
  padding: 32px 24px; display: flex; flex-direction: column; justify-content: center; background: var(--bg); border-left: 1px solid var(--line);
}
.wide .overlay.home .home-bg { position: fixed; inset: 0 var(--pn-w) 0 0; }
.wide .overlay.home .home-bg::after { background: linear-gradient(90deg, transparent 60%, #05080799); }
.wide .overlay.home .overlay-body { min-height: 0; }
.wide .home-menu { margin-top: 8px; }
.wide .overlay.home .game-title { font-size: clamp(64px, calc(var(--pn-w) * .21), 104px) !important; }

/* ---- a moment on its own (sleeping, fishing...): on the stage, over whatever was there ---- */
.wide .moment { inset: auto; left: var(--st-l); top: var(--st-t); width: var(--st-w); height: var(--st-h); box-sizing: border-box; padding: 24px; background: rgba(5, 8, 7, .85); }
.wide .moment-box { width: min(100%, calc((var(--st-h) - 140px) * 16 / 9)); }
