/* the game hall (li 2026-11-06: 桌游大厅 A; platform/hall-page.html), as li picked it from the three drafts (双联画,
   docs/PLATFORM-IA-2026-11-06.md section 7). the first screen is two leaves, each a game's whole lobby picture under a vignette with its
   name set large on it; above them, the tables as rows. no cards, outlines or shadows; the colours are the site's tokens */
#app[data-game="hall"] { min-height: 100svh; background: var(--ink); }
.hall-main {
  --ease: cubic-bezier(.22, .75, .25, 1);
  --hair: color-mix(in srgb, var(--text) 9%, transparent);
  --hair-strong: color-mix(in srgb, var(--text) 20%, transparent);
  --art-birmingham: url("/assets/lobby/night-wide-v3.webp?v=3a7601f5197e71b5");
  --art-pittsburgh: url("/pittsburgh/assets/lobby/pitt-lobby-night-wide.webp?v=7305b13d6c1ea54a");
}
/* the original keeps its brass: the rules in a faded brass instead of grey */
html[data-table-theme="original"] .hall-main {
  --hair: color-mix(in srgb, var(--gold-lo) 22%, transparent);
  --hair-strong: color-mix(in srgb, var(--gold-lo) 46%, transparent);
}
/* the night pictures for 原版 and 深色, the paper ones for 浅色, as the lobbies have them */
html[data-table-theme="light"] .hall-main {
  --art-birmingham: url("/assets/lobby/paper-wide-v3.webp?v=acaf95380f151dce");
  --art-pittsburgh: url("/pittsburgh/assets/lobby/pitt-lobby-paper-wide.webp?v=7e180d8df390111d");
}
.hall-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the two leaves: the screen under the bar, less a strip ---- */
.diptych { display: flex; gap: 2px; height: clamp(440px, calc(100dvh - 236px), 820px); background: var(--ink); }
.leaf { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; isolation: isolate; transition: flex-grow .7s var(--ease); }
.leaf-art {
  position: absolute; inset: 0; z-index: -2; background: var(--art) var(--pos) / var(--size, cover) no-repeat;
  filter: var(--lobby-bg-filter, none); transform-origin: var(--pos); transition: transform 1.2s var(--ease);
}
.leaf[data-game="birmingham"] { --art: var(--art-birmingham); --pos: 74% 62%; }
/* the river survey's quiet left half is for its lobby's form: the leaf shows the three rivers' meeting */
.leaf[data-game="pittsburgh"] { --art: var(--art-pittsburgh); --pos: 86% 64%; --size: auto 128%; }
/* the vignette: the picture's edges sink into the page, and the foot darkens (or, on paper, pales) under the type */
.leaf::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--ink) 94%, transparent) 0%, color-mix(in srgb, var(--ink) 62%, transparent) 26%, transparent 56%),
    radial-gradient(ellipse 115% 100% at 62% 38%, transparent 42%, color-mix(in srgb, var(--ink) 78%, transparent) 100%);
}
/* the other leaf's veil while one is pointed at: the page's own ink */
.leaf::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--ink); opacity: 0; transition: opacity .5s var(--ease); }
/* the whole leaf is the way into its lobby; the 入门 link sits above it */
.leaf-hit { position: absolute; inset: 0; z-index: 2; }
.leaf-hit:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }
/* held, or its page on the way (hall-page.mjs .pressed; li 2026-11-21): the leaf dims a little under the page's own ink and 进入大厅 lights,
   so a tap shows it was taken; quick in, as a button's press. 动画 off or less motion: the same, without the fade */
.leaf.pressed::before { opacity: .16; transition-duration: .08s; }
.leaf.pressed .leaf-enter { opacity: 1; }
html:is([data-motion="off"], [data-motion-still]) .leaf.pressed::before { transition: none; }
html.leaf-snap .leaf::before, html.leaf-snap .leaf-enter { transition: none; }
.leaf-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none; transition: opacity .5s var(--ease);
  padding: 0 clamp(24px, 4vw, 64px) clamp(28px, 5vh, 56px);
}
.leaf-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.leaf-title h2 { margin: 0; font: 600 clamp(46px, 5.2vw, 78px)/1.08 var(--serif); letter-spacing: .14em; color: var(--text); }
/* the latin names and tags take less tracking than the han ones */
html[lang="en"] .leaf-title h2 { letter-spacing: .02em; }
/* the latin names run long (Birmingham), so the name gives way and How to play stays on its right (li 2026-11-06) */
html[lang="en"] .leaf-title { flex-wrap: nowrap; }
html[lang="en"] .leaf-title h2 { font-size: clamp(32px, 4.6vw, 72px); }
html[lang="en"] .row-game { letter-spacing: .04em; }
#app .leaf-guide {
  flex: none; pointer-events: auto; padding: 6px 2px; font-size: 14px; letter-spacing: .14em; color: var(--text-2); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--text-2) 40%, transparent); transition: color .16s, border-color .16s;
}
#app .leaf-guide:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) { #app .leaf-guide:hover { color: var(--gold-hi); border-color: var(--gold-hi); } }
.leaf-era { margin: 14px 0 0; font-size: 13px; letter-spacing: .3em; color: var(--text-2); font-variant-numeric: tabular-nums; }
.leaf-era i { margin: 0 .5em; font-style: normal; color: var(--gold); }
.leaf-status { min-height: 1.5em; margin: 18px 0 0; font-size: 16px; letter-spacing: .08em; color: var(--text); }
.leaf-enter {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; font-weight: 600; letter-spacing: .18em;
  color: var(--gold-hi); opacity: .78; transition: opacity .4s var(--ease);
}
.leaf-enter b { font-weight: 400; transition: transform .4s var(--ease); }

/* pointed at or focused: that leaf opens to about 1 : 1.25 and its picture comes a little closer; the other is veiled. none of it
   while 动画 is off or the system asks for less motion; 进入大厅 still brightens */
@media (hover: hover) and (min-width: 761px) { .leaf:hover .leaf-enter { opacity: 1; } }
@media (min-width: 761px) { .leaf:has(.leaf-hit:focus-visible) .leaf-enter { opacity: 1; } }
@media (hover: hover) and (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .diptych:has(.leaf:hover) .leaf:hover { flex-grow: 1.25; }
  html:not([data-motion="off"]) .diptych:has(.leaf:hover) .leaf:not(:hover)::before { opacity: .42; }
  html:not([data-motion="off"]) .diptych:has(.leaf:hover) .leaf:not(:hover) .leaf-text { opacity: .6; }
  html:not([data-motion="off"]) .leaf:hover .leaf-art { transform: scale(1.025); }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .diptych:has(.leaf-hit:focus-visible) .leaf:has(.leaf-hit:focus-visible) { flex-grow: 1.25; }
  html:not([data-motion="off"]) .diptych:has(.leaf-hit:focus-visible) .leaf:not(:has(.leaf-hit:focus-visible))::before { opacity: .42; }
  html:not([data-motion="off"]) .diptych:has(.leaf-hit:focus-visible) .leaf:not(:has(.leaf-hit:focus-visible)) .leaf-text { opacity: .6; }
  html:not([data-motion="off"]) .leaf:has(.leaf-hit:focus-visible) .leaf-art { transform: scale(1.025); }
}

/* ---- above the leaves, close under the top bar: 我存的房间, then 正在进行, a table set in type ---- */
.hall-lists { max-width: 1120px; margin: 0 auto; padding: 22px 28px 26px; }
.hall-lists[hidden], .hall-lists > section[hidden] { display: none; }
.hall-lists > section:not([hidden]) ~ section { margin-top: 30px; }
.listing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 4px 14px; }
.listing-head h2 { margin: 0; font: 600 19px/1.3 var(--serif); letter-spacing: .16em; color: var(--text); }
.listing-head span { font-size: 13px; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair-strong); }
.row {
  display: grid; grid-template-columns: 6em minmax(0, 1fr) 7em minmax(6.5em, max-content); align-items: center; gap: 24px;
  min-height: 62px; padding: 9px 4px; border-bottom: 1px solid var(--hair);
}
.row-game { font-size: 13px; letter-spacing: .24em; color: var(--muted); white-space: nowrap; }
.row-name { min-width: 0; font-size: 15px; letter-spacing: .05em; color: var(--text); font-variant-numeric: tabular-nums; }
.row-name small { margin-left: 14px; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.row-seats { font-size: 14px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#app .row-act {
  justify-self: end; display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 38px; padding: 0 18px;
  border-radius: 19px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-decoration: none; white-space: nowrap;
  transition: background .16s, color .16s;
}
#app .row-act.join { background: color-mix(in srgb, var(--gold) 15%, transparent); color: var(--gold-hi); }
#app .row-act.watch { background: transparent; color: var(--text-2); font-weight: 500; }
@media (hover: hover) {
  #app .row-act.join:hover { background: color-mix(in srgb, var(--gold) 24%, transparent); }
  #app .row-act.watch:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
}
#app .row-act:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- under the leaves: 更新 (public/site-updates.mjs), set in type like the lists: the newest three side by side between hairlines,
   each its day, its title and one line; the rest folded under 更早的更新 as rows ---- */
.hall-news { max-width: 1120px; margin: 0 auto; padding: 46px 28px 72px; }
.hall-news[hidden] { display: none; }
.hall-news .news-list { margin: 0; padding: 0; list-style: none; }
.hall-news > div > .news-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair-strong); border-bottom: 1px solid var(--hair); }
.hall-news > div > .news-list > li { display: flex; flex-direction: column; gap: 10px; padding: 22px 26px 26px; }
.hall-news > div > .news-list > li + li { border-left: 1px solid var(--hair); }
.hall-news > div > .news-list > li:first-child { padding-left: 4px; }
.hall-news time { font: 500 13px/1 var(--serif); letter-spacing: .18em; color: var(--gold); font-variant-numeric: tabular-nums; }
.hall-news li > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hall-news li b { font: 600 17px/1.4 var(--serif); letter-spacing: .06em; color: var(--text); }
.hall-news li span { font-size: 13.5px; line-height: 1.75; letter-spacing: .02em; color: var(--text-2); }
.hall-news .news-more { margin-top: 18px; }
#app .hall-news .news-more > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; list-style: none; cursor: pointer;
  font-size: 13.5px; letter-spacing: .12em; color: var(--text-2);
}
.hall-news .news-more > summary::-webkit-details-marker { display: none; }
.hall-news .news-more > summary::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s var(--ease); }
.hall-news .news-more[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
#app .hall-news .news-more > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { #app .hall-news .news-more > summary:hover { color: var(--gold-hi); } }
.hall-news .news-more .news-list { margin-top: 8px; border-top: 1px solid var(--hair-strong); }
.hall-news .news-more li { display: grid; grid-template-columns: 6em minmax(0, 1fr); align-items: baseline; gap: 24px; padding: 14px 4px; border-bottom: 1px solid var(--hair); }
.hall-news .news-more li > div { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.hall-news .news-more li b { font-size: 15px; }

/* the pinned notice (li 2026-11-13: 「这个我感觉得置顶」): 置顶 in gold beside its date, its 查看更多 at the item's foot on the right */
.hall-news .news-head { display: flex; align-items: center; gap: 10px; margin: 0; }
.hall-news .news-pin { padding: 3px 5px 3px 7px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 2px; font: 600 11px/1 var(--sans); font-style: normal; letter-spacing: .2em; color: var(--gold); }
.hall-news .news-open { align-self: flex-end; margin-top: auto; padding-top: 4px; font-size: 13.5px; letter-spacing: .08em; color: var(--gold); text-decoration: none; }
@media (hover: hover) { .hall-news .news-open:hover { color: var(--gold-hi); } }
/* its whole text (public/peak-season-1.mjs) in a dialog: one column on the surface, the close button kept in view while it scrolls */
dialog.hall-notice { width: min(680px, calc(100% - 32px)); max-width: none; max-height: min(88dvh, 920px); padding: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface); line-height: 1.8; }
dialog.hall-notice:not([open]) { display: none; }
dialog.hall-notice.fallback[open] { position: fixed; inset: 0; margin: auto; z-index: 30; }
#app .notice-x { position: sticky; top: 10px; float: right; display: grid; place-items: center; width: 36px; height: 36px; margin: 10px 10px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 22px; line-height: 1; }
@media (hover: hover) { #app .notice-x:hover { background: var(--hair); color: var(--text); } }
.hall-notice article { padding: 34px 40px 38px; }
.notice-head small { font: 500 12px/1 var(--serif); letter-spacing: .24em; color: var(--gold); }
.notice-head h2 { margin: 12px 0 18px; font: 600 27px/1.3 var(--serif); letter-spacing: .08em; color: var(--text); }
.notice-lead p { margin: 0 0 4px; font-size: 15px; line-height: 1.85; color: var(--text); }
.hall-notice section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--hair); }
.hall-notice .notice-h { margin: 0 0 12px; font: 600 18px/1.4 var(--serif); letter-spacing: .1em; color: var(--gold); }
.hall-notice h4 { margin: 18px 0 8px; font: 600 15px/1.5 var(--serif); letter-spacing: .06em; color: var(--text); }
.hall-notice p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.85; color: var(--text-2); }
.hall-notice ul { margin: 0 0 12px; padding-left: 1.2em; }
.hall-notice li { margin: 2px 0; font-size: 14.5px; line-height: 1.85; color: var(--text-2); }
.hall-notice li b { margin-right: .7em; font-weight: 600; color: var(--text); }
.hall-notice table { width: 100%; margin: 4px 0 14px; border-collapse: collapse; font-size: 14.5px; }
.hall-notice th, .hall-notice td { padding: 8px 10px; border-bottom: 1px solid var(--hair); text-align: left; }
.hall-notice thead th { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; color: var(--muted); }
.hall-notice tbody th { font-weight: 600; white-space: nowrap; color: var(--text); }
.hall-notice td { color: var(--text-2); }
.hall-notice .notice-note { padding: 10px 14px; border-left: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.notice-reward { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; margin: 6px 0 12px; }
.notice-reward img { width: 96px; height: auto; aspect-ratio: 360 / 505; border: 1px solid var(--hair-strong); border-radius: 5px; }
.hall-notice .notice-reward p { margin: 0; }
.hall-notice .notice-close { margin: 30px 0 0; text-align: center; font: 500 16px/1.9 var(--serif); letter-spacing: .12em; color: var(--gold); }

/* phone: the leaves stack, each about 40% of the screen */
@media (max-width: 760px) {
  .diptych { flex-direction: column; height: auto; }
  /* svh, not dvh: dvh follows the browser bar as it folds on scroll, and the covers grew and stuttered with it (li 2026-11-06) */
  .leaf { flex: none; height: max(40svh, 240px); }
  .leaf[data-game="birmingham"] { --pos: 72% 64%; }
  .leaf[data-game="pittsburgh"] { --pos: 88% 66%; --size: auto 150%; }
  .leaf-text { padding: 0 20px 20px; }
  .leaf-title { column-gap: 14px; }
  .leaf-title h2 { font-size: 40px; letter-spacing: .12em; }
  html[lang="en"] .leaf-title h2 { font-size: min(40px, 9.6vw); letter-spacing: .02em; }
  html[lang="en"] #app .leaf-guide { letter-spacing: .08em; }
  .leaf-era { margin-top: 8px; font-size: 12px; letter-spacing: .22em; }
  .leaf-status { margin-top: 8px; font-size: 14px; }
  .leaf-enter { position: absolute; right: 20px; bottom: 22px; margin: 0; gap: 6px; font-size: 13px; letter-spacing: .12em; opacity: 1; }
  .hall-lists { padding: 14px 16px 16px; }
  .hall-lists > section:not([hidden]) ~ section { margin-top: 24px; }
  .listing-head h2 { font-size: 17px; }
  .row { grid-template-columns: 3.4em minmax(0, 1fr) auto auto; gap: 12px; min-height: 64px; padding: 8px 2px; }
  .row-game { font-size: 12px; letter-spacing: .08em; }
  .row-name { font-size: 14px; letter-spacing: .03em; }
  .row-name small { display: block; margin: 2px 0 0; font-size: 12px; }
  html[lang="en"] .row { grid-template-columns: 6em minmax(0, 1fr) auto auto; }
  .row-seats { font-size: 13px; }
  #app .row-act { min-width: 64px; min-height: 38px; padding: 0 14px; font-size: 13.5px; letter-spacing: .04em; }
  .hall-news { padding: 30px 16px 48px; }
  .hall-news > div > .news-list { grid-template-columns: minmax(0, 1fr); }
  .hall-news > div > .news-list > li, .hall-news > div > .news-list > li:first-child { padding: 18px 2px 20px; }
  .hall-news > div > .news-list > li + li { border-left: 0; border-top: 1px solid var(--hair); }
  .hall-news li b { font-size: 16px; }
  .hall-news .news-more li { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 2px; }
  .hall-notice article { padding: 24px 20px 30px; }
  .notice-head h2 { font-size: 22px; }
  .notice-reward { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .notice-reward img { width: 72px; }
}

/* motion follows the site's 动画 setting and the system's reduced motion */
html[data-motion="off"] .hall-main *, html[data-motion="off"] .hall-main *::before, html[data-motion="off"] .hall-main *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .hall-main *, .hall-main *::before, .hall-main *::after { transition: none !important; } }
