/* Lamplight: taller windows (16:10, 3:2, 4:3).
   fx.js keeps the stage 1920 wide and grows it to fill the window's height: --ex is the extra height in px
   (0 at 16:9) and --tall is the stage height ÷ 1080. Each screen is designed at 1920×1080, so here the scenes
   fill the extra height, characters and bottom controls keep their place on the bottom edge, and the content
   in between moves down by half. The Trial does the same in trial.css. */

/* New Run */
.lamp-newrun .keeper, .lamp-newrun .lamp, .lamp-newrun .seedbox, .lamp-newrun .acts { translate: 0 var(--ex, 0px); }
.lamp-newrun .grid-l, .lamp-newrun .grid, .lamp-newrun .det, .lamp-newrun .tiers { translate: 0 calc(var(--ex, 0px) / 2); }

/* Voyage: the chart, its route, islands and ferry scale together to cover the height (at most 12%, anchored left of centre, so the
   outer islands stay on screen); past that the chart sits centred on open sea */
.lamp-voyage .vy-map { position: absolute; left: 0; width: 1920px; height: 1080px; transform-origin: 25% 0;
  scale: min(var(--tall, 1), 1.12); top: calc((var(--ex, 0px) + 1080px - 1080px * min(var(--tall, 1), 1.12)) / 2); }

/* Tribute, Defeat, Victory */
.lamp-tribute .bg { height: calc(1104px + var(--ex, 0px)); }
.lamp-tribute.m-lose .bg { height: calc(1080px + var(--ex, 0px)); }
.lamp-tribute .hostfig, .lamp-tribute .boat, .lamp-tribute .lamps-n, .lamp-tribute .lantern, .lamp-tribute .acts,
.lamp-tribute.m-lose .zeus, .lamp-tribute .ember { translate: 0 var(--ex, 0px); }
.lamp-tribute .tally, .lamp-tribute .stats, .lamp-tribute .miss, .lamp-tribute .keep, .lamp-tribute .unl,
.lamp-tribute .sun, .lamp-tribute.m-won .acts { translate: 0 calc(var(--ex, 0px) / 2); }

/* Market */
.lamp-market .hermes, .lamp-market .bubble, .lamp-market .jar { translate: 0 var(--ex, 0px); }
.lamp-market .mk-panel, .lamp-market .acts { translate: 0 calc(var(--ex, 0px) / 2); }

/* Offering: the altar and title stay at the top, the choices move down by half, and the opened vase, its hand of
   cards, Hermes, his bubble and Skip keep their place on the bottom edge (pack.js offsets the vase flights to match) */
.lamp-pack .item, .lamp-pack.has-hand .bubble { translate: 0 calc(var(--ex, 0px) / 2); }
.lamp-pack .vase, .lamp-pack .picks-left, .lamp-pack .phand, .lamp-pack .hermes, .lamp-pack .bubble, .lamp-pack .acts,
.lamp-pack .rays, .lamp-pack .glowpool { translate: 0 var(--ex, 0px); }

/* Menus: the dialog layer covers the whole stage */
.lamp-ov.lamp-pause .ov-dlg, .lamp-ov.lamp-runinfo .ov-dlg, .lamp-ov.lamp-deck .ov-dlg, .lamp-ov.lamp-codex .ov-dlg { height: 100%; }

/* Settings and Pause: the settings sheet stretches to the bottom margin (its footer rides the bottom edge) */
.lamp-pause .pz-set { height: calc(888px + var(--ex, 0px)); }

/* Codex: the detail panel stretches, the Keeper and his bubble stand on the bottom edge, the shelves spread evenly */
.lamp-codex .cx-det { height: calc(910px + var(--ex, 0px)); }
.lamp-codex .cx-keeper, .lamp-codex .cx-bub { translate: 0 var(--ex, 0px); }
.lamp-codex .cx-ledge, .lamp-codex .cx-row { translate: 0 calc(var(--ex, 0px) * (var(--r, 0) * 2 + 1) / 6); }
.lamp-codex .cx-empty { translate: 0 calc(var(--ex, 0px) / 2); }

/* Deck: the card grid moves down by half, the stats and Back button sit on the bottom edge */
.lamp-deck .dk-suit, .lamp-deck .dk-cw { translate: 0 calc(var(--ex, 0px) / 2); }
.lamp-deck .dk-foot { translate: 0 var(--ex, 0px); }

/* Run info: the hand rows share the extra height (--n rows), the side blocks open up */
.lamp-runinfo .ri-hands .ri-row, .lamp-runinfo .ri-hands.dense .ri-row { height: calc(var(--h, 80px) + var(--ex, 0px) / var(--n, 9) * .9); }
.lamp-runinfo .ri-hands.dense { --h: 62px; }
.lamp-runinfo .ri-side { gap: calc(30px + var(--ex, 0px) / 6); }
