/* The hall: the top of the main menu. Rooms are stars on the Sky painting (B, "The Night Map");
   ?hall=doors shows them as arched doors under the same sky (A+B). The original Sky 2 page continues below.
   Decision record: docs/adr/2026-09-24-main-menu-hall.md. Board and audits: bench/room-entry-work/. */
.hall { --h-ink:#dcd6c9; --h-muted:#9c9790; --h-gold:#cbb486; --h-serif:'Cormorant Garamond',Georgia,serif; --h-sans:'Inter',Arial,sans-serif; --h-mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
  position:relative; isolation:isolate; height:calc(100svh - 68px); min-height:620px; overflow:clip; color:var(--h-ink); font-family:var(--h-sans); }
.hall *, .hall *::before, .hall *::after { box-sizing:border-box; }
.hall__art { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:50% 100%; }
.hall__veil { position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, #05060a8c 0%, #05060a40 16%, #05060a1a 36%, #0e122640 55%, #0e122699 72%, #0e1226d0 90%, var(--hall-end, #000105) 100%); }
.hall__stars { position:absolute; inset:0; pointer-events:none; }
.hall__stars i { position:absolute; border-radius:50%; background:#fff6e0; }
.hall__stars i.tw { animation:hall-tw 5s ease-in-out infinite; }
@keyframes hall-tw { 50% { opacity:.12; } }
.hall__kick { font:400 11px/1.4 var(--h-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--h-gold); margin:0; }
.hall__title { font:600 clamp(42px, 4.4vw, 62px)/1.02 var(--h-serif); margin:12px 0 10px; text-wrap:balance; color:var(--h-ink); }
.hall__lead { color:#d6d0c3; margin:0; font-size:15px; line-height:1.6; }
.hall__down { position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:3; display:flex; flex-direction:column; align-items:center; gap:8px;
  text-decoration:none; font:400 10.5px/1.4 var(--h-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--h-muted); }
.hall__down i { width:1px; height:34px; background:linear-gradient(#cbb48699, transparent); }
.hall a:focus-visible, .hall button:focus-visible { outline:2px solid var(--h-gold); outline-offset:3px; box-shadow:0 0 0 7px #05060acc; border-radius:2px; }
/* one painting from the stars down to the sea: it runs on behind Sky 2's opening, so the date is read on the
   water (the builder's choice on the board, board-room-entry-r3.html). hall.js sets --world-h to reach just
   past the opening; the rest of Sky 2 continues on the page below, unchanged. */
.hall { overflow-x:clip; overflow-y:visible; }
.hall__art, .hall__veil { bottom:auto; height:var(--world-h, 100%); }
body:has(#hall) .stage { margin:0; border-radius:0; background:transparent; }
body:has(#hall) .stage > .sky { display:none; }
/* the opening's own coloured glows (editorial.css) were clipped to a hard edge at the top of the stage; the painting lights it now */
body:has(#hall) .hero::before { display:none; }
/* Sky 2's opening on the water, in the look the builder approved on the board (board-room-entry-r3.html ?v=b / ?v=c,
   bench/room-entry-work/sky-reveal.css): cream serif title, mono kickers, a quieter date box. Values copied from the
   board's computed styles; only the look changes, the form and menu.js are Sky 2's own. The box edge (#ffffff08) and the
   white button text are the board as the builder sees it in Edge (automatic dark mode repaints the board, which declares
   no color-scheme): measured from Edge with force-dark on, 2026-09-24. */
body:has(#hall) .hero .eyebrow { margin:0 0 18px; font:400 11px/1.4 var(--h-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace); letter-spacing:.14em; color:#d8d2ea; }
body:has(#hall) .hero h1 { margin:0 0 16px; font:600 clamp(44px, 6vw, 76px)/1.02 'Cormorant Garamond', Georgia, serif; letter-spacing:normal; color:#dcd6c9; text-shadow:none; }
body:has(#hall) .hero h1 em { color:#dcd6c9; }
body:has(#hall) .hero .deck { max-width:470px; margin:0 auto; font-size:17px; line-height:1.6; color:#dcd8ec; }
body:has(#hall) .hero .intake { max-width:520px; margin:34px auto 0; padding:22px 22px 18px; gap:10px; font-size:16px; color:#dcd6c9;
  background:#12152acc; border:1px solid #ffffff08; border-radius:14px; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
body:has(#hall) .hero .intake-label { margin-bottom:4px; font:400 11px/1.4 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing:.14em; color:#d6b77a; }
body:has(#hall) .hero .fld { gap:6px; font-weight:500; color:#b9b6cc; }
body:has(#hall) .hero .fld input { width:64px; height:46px; padding:0; background:#07080f; border:1px solid transparent; border-radius:6px; color:#f1ecdf; }
body:has(#hall) .hero .fld.year input { width:92px; }
body:has(#hall) .hero .fld input::placeholder { color:#9b98b3; }
body:has(#hall) .hero .fld input:focus { outline:none; border-color:#d8bf86; box-shadow:0 0 0 3px #d8bf8633; }
body:has(#hall) .hero .intake .cta { height:46px; padding:0 18px; border:0; border-radius:6px; background:#d8bf86; color:#fff; font:600 13px/1 'Inter', Arial, sans-serif; }
body:has(#hall) .hero .intake .cta:hover { background:#e6cf9b; }
body:has(#hall) .hero .intake-note { margin-top:4px; font-size:12px; line-height:1.5; color:#a9a6bd; }
/* after a date the box stays and becomes the reading line (board: sky-reveal .sr-readline) */
body:has(#hall) .hero .read-line { flex-direction:column; gap:10px; max-width:520px; margin:34px auto 26px; padding:22px 22px 18px;
  background:#12152acc; border:1px solid #ffffff08; border-radius:14px; }
body:has(#hall) .hero .read-line::before { content:"Your reading"; font:400 11px/1.4 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing:.14em; text-transform:uppercase; color:#d6b77a; }
body:has(#hall) .hero .read-date { order:1; font:600 26px/1.1 'Cormorant Garamond', Georgia, serif; color:#f1ecdf; }
body:has(#hall) .hero .read-line .chips { order:2; justify-content:center; gap:8px; }
body:has(#hall) .hero .read-line .chip { padding:6px 11px; border:1px solid #d8bf8655; border-radius:99px; background:#0a0c1a99; font:500 12px/1 'Inter', Arial, sans-serif; color:#ecdcb4; }
body:has(#hall) .hero .read-line .chip svg { display:none; }
body:has(#hall) .hero .read-line .linkish { order:3; margin-top:4px; padding:4px 2px; border:0; color:#c9c5dc; font:400 11px/1.4 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing:.14em;
  text-decoration:underline; text-underline-offset:4px; text-decoration-color:#c9c5dc66; }
body:has(#hall) .hero .read-line .linkish:hover { color:#fff; }
/* the board's opening has no "See the paintings" link: the page itself carries on below */
body:has(#hall) .hero .ghost { display:none; }
body:has(#hall)[data-state="newcomer"] .hero .actions { display:none; }
/* the rest of Sky 2 stays closed until a date is read (as on the board's short Sky). A link from another page to a
   section inside it (e.g. Birth Reading's "About your account" -> #faq-account) opens it: hall.js sets .hall-deep */
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) #fire-sequence,
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) #main > :not(.page-foot),
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) .chapter-guide,
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) .page-foot,
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) #totop { display:none !important; }
/* and the page ends on the water under the date box, as the board's does (155px below the box) */
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) .stage { min-height:0; }
/* the painting fades into exactly the page colour below it, so there is no seam (board: --bg #0a0b0d) */
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) { --hall-end:#0a0b0d; background:#0a0b0d; }
body:has(#hall)[data-state="newcomer"]:not(.hall-deep) .hero { padding-bottom:155px; }
@media (max-width:700px) { body:has(#hall)[data-state="newcomer"]:not(.hall-deep) .hero { padding-bottom:160px; } }
/* spacing from the scroll hint to the opening, and the side margins, as on the board (.sky + .card padding) */
body:has(#hall) .hero { padding-top:114px; }
body:has(#hall) .hero .fld input { font-size:18px; }
@media (max-width:700px) { body:has(#hall) .hero { padding:96px 40px 20px; } body:has(#hall) .hero .fld input { width:64px; } body:has(#hall) .hero .fld.year input { width:92px; } }

/* no-script fallback: the rooms as plain links */
.hall__plain { position:relative; z-index:3; display:flex; gap:26px; flex-wrap:wrap; padding:0 56px 90px; }
.hall__plain a { color:var(--h-ink); font:600 26px/1 var(--h-serif); }
.hall.is-live .hall__plain { display:none; }
/* The authored map scaffold reserves the same head and 118vw phone map before hall.js arrives.
   Keep the fallback links accessible inside that reserved space without adding a second flow row. */
.hall--map:not(.is-live) .hall__plain { position:absolute; top:200px; left:0; right:0; }

/* ---- B: the night map ---- */
.hall--map .hall__head { position:absolute; left:56px; top:46px; z-index:3; max-width:470px; }
.hall__map { position:absolute; left:50%; top:54%; width:min(1100px, 86vw); height:min(560px, 62vh); transform:translate(-50%,-50%); z-index:2; }
.hall__lines { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.hall__lines path { fill:none; stroke:#f0e4c6; stroke-opacity:.36; stroke-width:1; stroke-dasharray:3 7; }
.hall__lines path.mine { stroke:#f3d99a; stroke-opacity:.65; }
.hall__lines .fade { opacity:0; animation:hall-fade 1.4s .3s ease forwards; }
@keyframes hall-fade { to { opacity:1; } }
/* the dot is the anchor: it sits on its point and never moves; the words open to one side */
.hall-star { --d:12px; position:absolute; transform:translate(calc(var(--d) / -2), calc(var(--d) / -2)); display:flex; align-items:flex-start; gap:14px; min-height:44px;
  white-space:nowrap; text-align:left; text-decoration:none; color:inherit; background:none; border:0; padding:0; font:inherit; cursor:pointer; }
.hall-star.flip { flex-direction:row-reverse; transform:translate(calc(-100% + var(--d) / 2), calc(var(--d) / -2)); }
.hall-star.flip .hall-star__t { text-align:right; }
.hall-star__t.is-wrapped, .hall-star__t.is-wrapped > span { white-space:normal; }
.hall-star__t.is-wrapped > span { display:block; line-height:1.5; margin-top:3px; }
.hall-star__t.is-wrapped .hall-star__rif { display:block; }
.hall-star__t.is-wrapped .hall-star__rif i { display:none; }
.hall-star__rif i { font-style:normal; }
.hall-star__dot { position:relative; flex:none; width:var(--d); height:var(--d); border-radius:50%; background:#fff8e6; box-shadow:0 0 12px 3px #fff3cf, 0 0 40px 10px #e9c98a66; animation:hall-twinkle 3.4s ease-in-out infinite; }
.hall-star__dot::before { content:""; position:absolute; inset:-14px; border:1px solid #fff3cf66; border-radius:50%; transform:scale(.6); opacity:0; transition:transform .4s ease, opacity .4s ease; }
.hall-star__t { margin-top:calc(var(--d) / 2 - 13px); }
.hall-star__t b { display:block; font:600 clamp(24px, 1.7vw, 30px)/1.05 var(--h-serif); color:var(--h-ink); text-shadow:0 2px 14px #000; }
.hall-star__t > span { font:400 10px/1.8 var(--h-mono); letter-spacing:.14em; text-transform:uppercase; color:#cfc8b8; text-shadow:0 1px 8px #000; }
.hall-star__t em { display:block; max-width:240px; white-space:normal; font:400 13px/1.5 var(--h-sans); font-style:normal; color:#d6d0c3; text-shadow:0 1px 8px #000;
  max-height:0; opacity:0; overflow:hidden; transition:max-height .35s ease, opacity .35s ease, margin .35s ease; }
.hall-star.flip .hall-star__t em { margin-left:auto; }
@media (hover:hover) { .hall-star:hover .hall-star__dot::before { transform:scale(1); opacity:1; } .hall-star:hover .hall-star__t em { max-height:80px; opacity:1; margin-top:6px; } }
.hall-star:focus-visible .hall-star__dot::before { transform:scale(1); opacity:1; }
.hall-star:focus-visible .hall-star__t em { max-height:80px; opacity:1; margin-top:6px; }
.hall-star.is-brightest { --d:16px; }
.hall-star.is-brightest .hall-star__dot { box-shadow:0 0 16px 5px #fff3cf, 0 0 60px 16px #e9c98a88; }
.hall-star.is-brightest .hall-star__t b { font-size:clamp(28px, 2vw, 34px); }
.hall-star.is-locked .hall-star__dot { background:#9c9790; box-shadow:0 0 8px 2px #9c979055; animation:none; }
.hall-star.is-locked .hall-star__t b { color:var(--h-muted); }
.hall-star.is-mine { animation:hall-in .9s ease both; }
.hall-star.is-mine .hall-star__dot { background:#f6dca0; box-shadow:0 0 14px 4px #f3d99a, 0 0 50px 14px #e9c98a77; }
.hall-star.is-mine .hall-star__t b { color:#f3e3bd; }
@keyframes hall-in { from { opacity:0; } to { opacity:1; } }
@keyframes hall-twinkle { 50% { box-shadow:0 0 8px 2px #fff3cf, 0 0 26px 6px #e9c98a44; } }

/* ---- A+B: doors under the sky (?hall=doors) ---- */
.hall--doors { display:flex; flex-direction:column; }
.hall--doors .hall__head { position:relative; z-index:2; text-align:center; padding:32px 24px 0; }
.hall__yard { position:relative; z-index:2; flex:1; display:flex; align-items:flex-end; justify-content:center; gap:clamp(30px, 3.6vw, 64px); padding:20px 24px 109px; }
/* the board's door title (board-room-entry-r3.html .c-title h1) */
.hall--doors .hall__title { margin:12px 0 8px; line-height:1.04; }
.hall--doors .hall__lead { line-height:normal; }
.hall-door { --w:clamp(140px, min(12.5vw, 24vh), 220px); --drop:30px; width:var(--w); position:relative; display:flex; flex-direction:column; align-items:center; gap:12px;
  text-decoration:none; color:inherit; background:none; border:0; padding:0; font:inherit; cursor:pointer; }
.hall-door:nth-child(2) { --drop:70px; } .hall-door:nth-child(3) { --drop:46px; } .hall-door:nth-child(4) { --drop:84px; }
.hall-door__star { position:relative; width:9px; height:9px; border-radius:50%; background:#fff8e6; box-shadow:0 0 10px 2px #fff3cf, 0 0 30px 8px #e9c98a55; margin-bottom:var(--drop);
  animation:hall-twinkle 3.6s ease-in-out infinite; transition:transform .35s ease; }
.hall-door__star::after { content:""; position:absolute; left:4px; top:12px; width:1px; height:calc(var(--drop) - 10px); background:linear-gradient(#fff3cf66, transparent); }
.hall-door__win { position:relative; display:block; width:var(--w); height:calc(var(--w) * 1.62); border-radius:calc(var(--w) / 2) calc(var(--w) / 2) 2px 2px; overflow:hidden;
  border:1px solid #f0e2c088; box-shadow:0 0 0 6px #0a0b0d55, 0 30px 60px -20px #000, 0 0 60px -10px #e9c98a33; }
.hall-door__win img { display:block; width:100%; height:100%; object-fit:cover; filter:brightness(.74); transition:filter .5s ease, transform .9s ease; }
.hall-door__win img[src*="crown-art"] { object-view-box:inset(0 0 16% 0); }
@media (hover:hover) { .hall-door:hover .hall-door__win img { filter:brightness(1.05); transform:scale(1.05); } .hall-door:hover .hall-door__star { transform:scale(1.6); } .hall-door:hover .hall-door__blurb { max-height:60px; opacity:1; } }
.hall-door:focus-visible .hall-door__win img { filter:brightness(1.05); }
.hall-door:focus-visible .hall-door__blurb { max-height:60px; opacity:1; }
.hall-door__lbl { font:400 11px/1 var(--h-mono); letter-spacing:.16em; text-transform:uppercase; color:var(--h-ink); margin-top:6px; text-shadow:0 1px 8px #000; }
.hall-door__hint { font:italic 500 18px/1.15 var(--h-serif); color:#d2cbbb; text-shadow:0 1px 8px #000; text-align:center; max-width:calc(var(--w) + 40px); }
.hall-door__blurb { display:block; max-width:calc(var(--w) + 50px); font:400 13px/1.45 var(--h-sans); color:#d6d0c3; text-align:center; text-shadow:0 1px 8px #000;
  max-height:0; opacity:0; overflow:hidden; transition:max-height .35s ease, opacity .35s ease; }
.hall-door.is-brightest .hall-door__star { width:12px; height:12px; box-shadow:0 0 14px 4px #fff3cf, 0 0 50px 14px #e9c98a88; }
.hall-door.is-brightest .hall-door__win { border-color:#f3dca5; box-shadow:0 0 0 6px #0a0b0d55, 0 30px 60px -20px #000, 0 0 80px -4px #e9c98a70; }
.hall-door.is-brightest .hall-door__lbl { color:#f0dcae; }
.hall-door.is-locked .hall-door__star { background:#9c9790; box-shadow:0 0 6px 1px #9c979055; animation:none; }
.hall-door.is-locked .hall-door__win img { filter:brightness(.32) grayscale(.8); transform:none; }
.hall-door__lock { position:absolute; inset:0; display:grid; place-items:center; color:var(--h-muted); }
.hall-door__lock span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; border:1px solid #cbb48655; background:#0a0b0dcc; }
.hall__lock-icon { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.5; }

/* ---- the lock explains itself at the bottom of the screen ---- */
.hall-lockbar { position:fixed; z-index:60; left:50%; bottom:22px; transform:translateX(-50%); width:min(520px, calc(100vw - 32px)); display:flex; align-items:center; gap:16px;
  padding:14px 16px; border:1px solid #cbb48655; background:#0a0b0df5; box-shadow:0 20px 50px -20px #000; color:#dcd6c9; font:500 14px/1.45 'Inter',Arial,sans-serif; }
.hall-lockbar p { margin:0; flex:1; }
.hall-lockbar a { flex:none; display:inline-flex; align-items:center; min-height:44px; padding:0 18px; background:#e9dfc9; color:#111923; text-decoration:none;
  font:700 11px/1 'Inter',Arial,sans-serif; letter-spacing:.11em; text-transform:uppercase; }

@media (max-width:700px) {
  .hall { height:auto; min-height:0; }
  .hall--map .hall__head { position:relative; left:auto; top:auto; padding:30px 22px 0; max-width:none; }
  .hall__map { position:relative; left:auto; top:auto; transform:none; width:auto; height:118vw; margin:8px 22px 0; }
  .hall-star__t em { display:none; }
  .hall__down { position:relative; left:auto; bottom:auto; transform:none; padding:10px 0 26px; }
  .hall--doors .hall__head { padding-top:22px; }
  .hall--doors .hall__title { margin:8px 0 6px; }
  .hall__yard { display:grid; grid-template-columns:1fr 1fr; justify-items:center; align-items:end; gap:10px 12px; padding:12px 16px 10px; }
  .hall-door { --w:min(29vw, 20svh); gap:8px; }
  .hall-door:nth-child(n) { --drop:8px; }
  .hall-door[data-room="birth"] { order:-2; } .hall-door[data-room="explore"] { order:-1; }
  .hall-door__lbl { margin-top:2px; }
  .hall-door__hint { font-size:15px; }
  .hall-door__blurb { display:none; }
  .hall-lockbar { flex-direction:column; align-items:stretch; }
}
/* landscape phones: the map needs the height (board: sonnet-devices #3) */
@media (max-height:500px) and (orientation:landscape) { .hall--map { min-height:520px; } }
@media (max-width:380px) { .hall-door { --w:min(28vw, 17.5svh); } .hall-door__hint { font-size:14px; } }
@media (prefers-reduced-motion: reduce) {
  .hall__stars i.tw, .hall-star__dot, .hall-door__star, .hall__lines .fade, .hall-star.is-mine { animation:none; opacity:1; }
}
