/* CRUMB: ??? */
/* FOYER — /play's front menu (docs/FOYER-SPEC.md). FASCIA's own tokens (public/world/ui/fascia.css) with fallbacks, since this
   stands on the page before FASCIA's stylesheet is loaded; nothing new. Layout: the lid at the bottom centre, the title / Enter /
   Help / loading line stacked above it and clear of it. */
html.foyer-off #foyer-still { display: none; }

#foyer-still { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 40; pointer-events: none; background: #1d1a17; }

.foyer-lidbox { position: fixed; inset: 0; z-index: 45; pointer-events: none; transition: opacity 350ms ease; }   /* the lid module (lid.js, .foyer-lid) fills and places itself in this full-viewport box */

.foyer {
  --foyer-lid-h: 240px;
  position: fixed; inset: 0; z-index: 66; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 0 16px calc(var(--foyer-lid-h) + 6vh);
  pointer-events: none; color: var(--fa-text, #f1e8d6);
  transition: opacity 350ms ease;
}
.foyer > * { pointer-events: auto; }
.foyer__title { margin: 0; font: 700 clamp(30px, 6vw, 56px)/1.05 var(--fa-face, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; text-shadow: 0 2px 12px rgba(18, 15, 14, 0.7); }
.foyer__title[hidden] { display: none; }
.foyer__row { display: flex; gap: 12px; }
.foyer__btn {
  min-width: 128px; padding: 8px 22px; font: 700 18px/24px var(--fa-face, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fa-card-ink, #231d1a); background: var(--fa-card, #dccdaa); border: 1px solid var(--fa-card-edge, #a8946b); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); cursor: pointer;
}
.foyer__btn:hover, .foyer__btn:focus-visible { background: var(--fa-card-sunk, #cfbe97); outline: none; box-shadow: inset 3px 0 0 var(--fa-rule, #6b2430), 0 6px 24px rgba(0, 0, 0, 0.45); }
.foyer__btn--enter { color: #f6ecd6; background: var(--fa-rule, #6b2430); border-color: var(--fa-rule, #6b2430); }
.foyer__btn--enter:hover, .foyer__btn--enter:focus-visible { background: #54161f; }
.foyer__btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.foyer__line { margin: 0; padding: 3px 12px; font: 500 14px/20px var(--fa-sans, system-ui, sans-serif); color: var(--fa-text, #f1e8d6); background: var(--fa-backing, rgba(18, 15, 14, 0.72)); border-left: 3px solid var(--fa-accent, #c9a45c); }

.foyer.is-leaving, .foyer-lidbox.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .foyer, .foyer-lidbox { transition: none; } }

/* the Inland view (pause menu item, FOYER F9) and the owner's Pose pane (F10, F11): a transparent overlay on FASCIA's L5, only the hint and the pane take the pointer. Words are FPO. */
.foyer-inland { position: fixed; inset: 0; pointer-events: none; color: var(--fa-text, #f1e8d6); }
.foyer-inland > * { pointer-events: auto; }
.foyer-inland__hint { position: absolute; left: 16px; top: 14px; margin: 0; padding: 3px 12px; font: 500 14px/20px var(--fa-sans, system-ui, sans-serif); background: var(--fa-backing, rgba(18, 15, 14, 0.72)); border-left: 3px solid var(--fa-accent, #c9a45c); }
.foyer-pane { position: absolute; right: 16px; top: 14px; width: min(330px, 86vw); max-height: calc(100vh - 28px); overflow: auto; box-sizing: border-box; padding: 10px 12px 12px; font: 500 13px/18px var(--fa-sans, system-ui, sans-serif); color: var(--fa-text, #f1e8d6); background: var(--fa-backing, rgba(18, 15, 14, 0.78)); border-left: 3px solid var(--fa-accent, #c9a45c); }
.foyer-pane[hidden] { display: none; }
.foyer-pane__head { margin: 0 0 6px; font: 700 15px/20px var(--fa-face, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: 0.12em; text-transform: uppercase; }
.foyer-pane__row { display: grid; grid-template-columns: 1fr 52px; gap: 0 8px; align-items: center; margin: 5px 0; }
.foyer-pane__name { grid-column: 1 / 2; }
.foyer-pane__out { grid-column: 2 / 3; text-align: right; font-variant-numeric: tabular-nums; }
.foyer-pane__range { grid-column: 1 / 3; width: 100%; margin: 0; accent-color: var(--fa-accent, #c9a45c); }
.foyer-pane__bar { display: flex; gap: 8px; margin-top: 8px; }
.foyer-pane__btn { flex: 1; padding: 5px 8px; font: 700 13px/18px var(--fa-face, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fa-card-ink, #231d1a); background: var(--fa-card, #dccdaa); border: 1px solid var(--fa-card-edge, #a8946b); cursor: pointer; }
.foyer-pane__btn:hover, .foyer-pane__btn:focus-visible { background: var(--fa-card-sunk, #cfbe97); outline: none; }
.foyer-pane__status { min-height: 18px; margin: 8px 0 0; }

/* Tuned against docs/townsite/between/after/inland-1300.png (1920x989: lid 581 px wide, apex y 708): the dashboard's picture shows the lid about 12 % wider
   and the foot cropped slightly lower than lid.css's constants compute (lid.css keeps the values it copies from block.js / presets.js, pinned by
   test/play-lid.test.js). Scale 0.614 = 581 / (1525.8 units x 620 x 0.001); --lid-below puts the apex at 71.6 % of the frame's height at any
   size (the picture is 1.4202 x a x scale tall; the foot hangs below the frame by what is left), where the town's dark band sits in the reference. */
.foyer-lidbox .foyer-lid { --lid-scale: 0.614; --lid-below: calc(var(--lid-a) * var(--lid-scale) * 1.4202 - 28.4%); }
