/* The Table's shared look. Every game uses these colors, buttons, sheets,
   the console frame and the drawn pieces. A game's own file (games/<id>/game.css)
   styles only what sits inside its stage and tray, scoped under .g-<id>. */
:root {
  --navy: #1B2A4A;
  --deep: #14203A;
  --copper: #C87533;
  --copper-hi: #DC9A68;
  --ivory: #F7F2E8;
  --stone: #E9E4DA;
  --dim: rgba(233, 228, 218, .8);
  --line: rgba(233, 228, 218, .14);
  --lane: rgba(255, 255, 255, .035);
  --lane-hi: rgba(255, 255, 255, .08);
  --ink: #23262B;
  --red: #C8413B;
  --gut: clamp(8px, 1.6vw, 28px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--deep); color: var(--stone);
  font-family: "DM Sans", system-ui, sans-serif; overscroll-behavior: none; }
/* The iPhone colors the bar behind its clock from a full-width fixed box at the top of the page: this one carries
   the table's color (kit.js sets it) but paints nothing, so the page under it shows as it is. Without it the
   home-screen app blurs the page under the clock. Topmost and solid to a touch, so nothing covers the spot the iPhone looks at. */
.clock-strip { position: fixed; left: 0; right: 0; top: 0; height: max(12px, env(safe-area-inset-top)); z-index: 2147483000;
  background-color: #281E18; -webkit-background-clip: text; background-clip: text; color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; text-decoration: none; }
#app { height: 100dvh; }
h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; margin: 0; }

/* ---------- buttons ---------- */
.pill { background: var(--copper); color: #fff; font-weight: 700; border-radius: 999px;
  padding: 10px 24px; min-height: 44px; font-size: 17px; letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(200, 117, 51, .38), 0 1px 0 rgba(255, 255, 255, .25) inset;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease; }
.pill:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.pill:active:not(:disabled) { transform: translateY(1px) scale(.98); }
/* Copper says "act here", so a button that cannot be pressed is not copper: a faint outline, not a dim copper
   (which reads brown on the felt and the wood). */
.pill:disabled { box-shadow: none; background: rgba(255, 255, 255, .04); border: 1px solid rgba(233, 228, 218, .22);
  color: var(--stone); opacity: .5; }
.pill.quiet { background: rgba(255, 255, 255, .05); border: 1px solid rgba(233, 228, 218, .3); color: var(--stone);
  font-weight: 600; box-shadow: none; }
.pill.quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .11); }
/* New beside Continue: the other real choice, so it stands up too. Ivory, not copper: copper stays the one way on. */
.pill.alt { background: var(--ivory); color: var(--navy); border: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .7) inset; }
.pill.alt:hover:not(:disabled) { filter: brightness(1.04); }
.link { color: var(--stone); opacity: .88; font-size: clamp(16px, 1.3vmax, 18px); font-weight: 500; padding: 10px 8px; min-height: 40px; }
.link:hover { opacity: 1; }
.link.snd { display: grid; place-items: center; width: 40px; padding: 0; }
.link.snd .mute { display: none; }
.link.snd.off { opacity: .5; }
.link.snd.off .waves { display: none; }
.link.snd.off .mute { display: inline; }
.link:hover { color: var(--stone); }
button.back { width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--dim);
  display: grid; place-items: center; padding-bottom: 3px; flex: none; }
button.back:hover { color: var(--stone); background: var(--lane-hi); }
.seg { display: inline-flex; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 12px; padding: 3px; }
.seg button { padding: 0 12px; height: 40px; border-radius: 9px; font-size: 15.5px; color: var(--dim); white-space: nowrap; }
.seg button.on { background: var(--ivory); color: var(--navy); font-weight: 700; }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; }

/* ---------- menu ---------- */
.menu { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: clamp(20px, 4.5vw, 72px);
  padding-bottom: calc(clamp(20px, 4.5vw, 72px) + env(safe-area-inset-bottom));
  /* The home page is the table itself: dark wood, with each game set into it as an inlay. */
  background: repeating-linear-gradient(91deg, rgba(255, 255, 255, .016) 0 1px, rgba(0, 0, 0, 0) 1px 5px, rgba(0, 0, 0, .05) 5px 6px, rgba(0, 0, 0, 0) 6px 13px),
    radial-gradient(120% 85% at 50% 0%, #2E221B, #1A130F 70%, #130E0B); }
.menu-in { width: min(100%, 1320px); display: grid; gap: clamp(22px, 4vh, 44px); }
.menu h1 { font-size: clamp(38px, 6vw, 68px); text-align: center; letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: center; gap: .32em; }
.menu h1 .logo { flex: none; width: 1.34em; height: 1.34em; }
/* The time, and today's day and date, in the empty corner at the right of the name, over the tiles' right edge:
   a computer and an iPad only. */
.menu h1 { position: relative; }
.menu h1 .today { position: absolute; right: 0; top: 50%; transform: translateY(-50%); max-width: 22vw; display: grid; justify-items: end; gap: 2px;
  text-align: right; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.menu h1 .today .t-time { display: flex; align-items: baseline; gap: .12em; font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: clamp(24px, 2.4vw, 36px); line-height: 1.1; color: var(--ivory); text-shadow: 0 0 18px rgba(247, 242, 232, .18);
  font-variant-numeric: lining-nums tabular-nums; }
/* the colon breathes; the seconds sit a little smaller and roll up into place as each one turns */
.menu h1 .today .t-colon { font-style: normal; display: inline-block; margin: 0 .03em; animation: t-breathe 2s ease-in-out infinite; }
@keyframes t-breathe { 50% { opacity: .35; } }
.menu h1 .today .t-colon.s { margin: 0 -.02em 0 0; font-size: .62em; color: var(--stone); }
.menu h1 .today .t-sec { display: inline-block; width: 1.25em; height: 1.1em; overflow: hidden; font-size: .62em; color: var(--stone); text-align: left; }
.menu h1 .today .t-sec i { display: block; font-style: normal; animation: t-roll .38s cubic-bezier(.2, .8, .3, 1.15) both; }
@keyframes t-roll { from { transform: translateY(85%); opacity: 0; } }
.menu h1 .today .t-ap { font-family: 'DM Sans', system-ui, sans-serif; font-size: .46em; font-weight: 600; letter-spacing: .06em; color: var(--stone); }
@media (prefers-reduced-motion: reduce) { .menu h1 .today .t-colon, .menu h1 .today .t-sec i { animation: none; } }
.menu h1 .today .t-day { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 500; font-size: clamp(14px, 1.15vw, 17px); line-height: 1.3; color: var(--stone); }
@media (max-width: 699px), (max-height: 599px) { .menu h1 .today { display: none; } }
/* Fifteen places: five across (three rows) on a laptop and a tablet, three across (five rows) on a phone and a big upright iPad. */
.games { --gap: clamp(8px, 1.4vw, 18px); --per: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.game { flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); min-width: 0;
  display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center;
  padding: clamp(16px, 2.2vw, 28px) 12px; border-radius: 18px; background: var(--lane);
  border: 1px solid var(--line); min-height: clamp(150px, 22vh, 210px); transition: background .15s, border-color .15s, transform .15s; }
.game:hover { background: var(--lane-hi); border-color: rgba(200, 117, 51, .6); transform: translateY(-2px); }
.emblem { --s: 26px; --c: 36px; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 58px; font-size: 46px; line-height: 1; color: var(--ivory); }
@media (min-width: 901px) and (min-height: 700px) { .game .emblem { --s: 31px; --c: 44px; height: 72px; font-size: 56px; margin-bottom: 4px; } }
.g-name { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(18px, 1.7vw, 23px); }
.g-tag { color: var(--dim); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copper); display: inline-block; }
@media (max-width: 900px) {
  .game { padding: 14px 6px; min-height: clamp(128px, 17vh, 190px); gap: 6px; }
  .g-tag { font-size: 12.5px; }
}
@media (max-width: 560px) {
  .games { --per: 3; }
  .game { padding: 9px 5px; min-height: clamp(104px, 13.6vh, 150px); gap: 4px; border-radius: 14px; }
  .emblem { --s: 20px; --c: 28px; height: 40px; font-size: 34px; zoom: .82; }
  .g-name { font-size: 15.5px; line-height: 1.15; }
  .g-tag { font-size: 11.5px; }
}

/* ---------- setup ---------- */
.setup { min-height: 100dvh; display: grid; place-items: center; position: relative;
  padding: clamp(16px, 4.5vw, 64px); padding-bottom: calc(clamp(16px, 4.5vw, 64px) + env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, var(--navy), var(--deep)); }
button.back.corner { position: absolute; left: var(--gut); top: calc(8px + env(safe-area-inset-top)); }
/* A welcome page's way home is The Table's own mark, full strength under a pointer. */
button.back.home { width: 46px; height: 46px; padding: 0; margin: -3px 0 0 -3px; }
button.back.home .logo { width: 36px; height: 36px; opacity: .85; transition: opacity .15s, transform .15s; }
button.back.home:hover { background: none; }
button.back.home:hover .logo, button.back.home:focus-visible .logo { opacity: 1; transform: scale(1.06); }
.setup-in { width: min(100%, 560px); display: grid; gap: clamp(16px, 2.6vh, 28px); }
.setup h1 { font-size: clamp(34px, 6vw, 56px); text-align: center; letter-spacing: -.01em; }
.hero { display: flex; justify-content: center; align-items: center; gap: 4px; --s: clamp(26px, 5vw, 38px);
  --c: clamp(40px, 7vw, 56px); font-size: clamp(50px, 9vw, 72px); line-height: 1; color: var(--ivory); min-height: 60px; }
.seats { display: grid; gap: 10px; }
.seat { display: grid; grid-template-columns: 1fr auto 40px; gap: 8px; align-items: center; }
.seats.fixed .seat { grid-template-columns: 1fr auto; }
.seat input { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; height: 46px; min-width: 0; width: 100%; font-size: 16px; }
.seat input:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.x { width: 40px; height: 46px; color: var(--dim); font-size: 22px; line-height: 1; }
.x[hidden] { display: block; visibility: hidden; }
.opt-label { color: var(--dim); font-size: 14.5px; text-align: center; margin-bottom: -8px; }
.setup-row { display: flex; justify-content: center; }
.setup-go { display: grid; gap: 10px; justify-items: center; }
.setup-go .pill { min-width: 200px; }

/* ---------- console: the frame every game plays in ---------- */
.console { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); position: relative;
  background: radial-gradient(120% 80% at 50% 0%, var(--navy), var(--deep)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(4px + env(safe-area-inset-top)) var(--gut) 4px; }
.bar-l { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: -8px; }
.bar-r { display: flex; align-items: center; gap: clamp(2px, 1vw, 12px); flex: none; }
/* The game's own icon beside its name (not on a phone, where the bar is full). */
.bar-em { --s: 12px; --c: 17px; flex: none; display: flex; align-items: center; gap: 2px; height: 28px; font-size: 24px; line-height: 1;
  color: var(--ivory); margin: 0 8px 0 2px; pointer-events: none; }
@media (max-width: 700px) { .bar-em { display: none; } }
.bar-t { display: flex; align-items: baseline; gap: 4px 14px; min-width: 0; flex-wrap: wrap; }
.bar .title { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(20px, 2.1vmax, 27px); white-space: nowrap; }
.bar .info { color: var(--stone); opacity: .92; font-weight: 500; font-size: clamp(15px, 1.5vmax, 21px); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.stage { min-height: 0; min-width: 0; overflow: hidden; padding: 4px var(--gut); position: relative; }
.status { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px var(--gut); min-height: 56px; }
.status .say { font-size: clamp(16px, 1.6vmax, 21px); color: var(--dim); min-width: 0; }
.status .say b { color: #fff; font-weight: 700; }
.status .say.fresh { animation: step-in .28s ease-out; }
.status .acts { display: flex; gap: 8px; flex: none; }
/* On a wide screen the line and its buttons sit together in the middle, over the hand, not at the two edges. */
@media (min-width: 901px) { .console:not(.railed) > .status { justify-content: center; gap: 28px; } }
.tray { padding: 6px var(--gut) calc(10px + env(safe-area-inset-bottom)); max-height: 44dvh; overflow-y: auto; }
.tray:empty { padding: 0 0 env(safe-area-inset-bottom); }
/* A hand the player can slide into any order (kit.js dragSort). */
.slide, .slide * { touch-action: none !important; }
.slide, .slide-hold { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.slide .drag, .slide-hold .drag { transition: none !important; animation: none !important; z-index: 9; pointer-events: none; opacity: 1 !important;
  box-shadow: 0 0 0 2px var(--copper), 0 14px 26px rgba(0, 0, 0, .55) !important; }

/* ---------- rails: a square board on a wide screen ---------- */
/* kit.js puts .railed on the console of a game with `rails: true` when a square as tall as the window leaves
   240px or more on each side, and sets --rail (each rail's width), --rail-out (what is left outside the rails
   on a very wide screen) and --rail-y (where the board's top and bottom edges are). The top bar stacks in the
   left rail and the status line in the right one, both over the stage, which has the whole height. The game
   keeps its own side pieces in the right rail, at the top and the bottom; the status line has the middle (a
   game moves it with --rail-say on its console). */
/* overflow: the stage now ends at the window's edge, and its entrance must not scroll the page. */
.console.railed { --rail-in: 10px; overflow: hidden;
  grid-template-columns: var(--rail-out) var(--rail) minmax(0, 1fr) var(--rail) var(--rail-out);
  grid-template-rows: minmax(0, 1fr) auto; }
.console.railed > .stage { grid-area: 1 / 1 / 2 / -1; padding: calc(12px + env(safe-area-inset-top)) var(--rail-out) 12px; }
.console.railed > .tray { grid-area: 2 / 1 / 3 / -1; }
.console.railed > .over-sheet, .console.railed > .over-curtain { grid-area: 3 / 1 / 4 / -1; }
/* Above any stage a game raises, under the sheets (5) and the curtain (6). Only their buttons take a tap. */
.console.railed > .bar, .console.railed > .status { z-index: 4; min-width: 0; min-height: 0; pointer-events: none; }
/* The left rail: back, the game's icon, its name and the info line. Rules, New and sound (and a room's code)
   stand at the top right of the screen, as in every other game: over the right rail, which keeps
   --rail-links clear at its top for them (a game pads its right-rail pieces down by it). */
.console.railed > .bar { grid-area: 1 / 2; display: grid; grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; justify-items: start; align-items: center; gap: 0 8px;
  padding: calc(var(--rail-y) + env(safe-area-inset-top)) var(--rail-in) var(--rail-y) var(--gut); }
.console.railed .bar-l, .console.railed .bar-r { display: contents; }
.console.railed .bar button { pointer-events: auto; }
.console.railed .bar .back { grid-area: 1 / 1 / 2 / -1; margin-left: -10px; }
.console.railed .bar-em { grid-area: 2 / 1 / 3 / -1; --s: 22px; --c: 32px; height: auto; min-height: 48px; font-size: 44px; margin: 16px 0 0; }
.console.railed .bar-t { grid-area: 3 / 1 / 4 / -1; display: block; margin-top: 12px; }
.console.railed .bar .title { display: block; font-size: clamp(26px, calc(var(--rail) * .115), 38px); line-height: 1.12; white-space: normal; }
.console.railed .bar .info { display: block; margin-top: 8px; font-size: clamp(17px, 1.5vmax, 21px); line-height: 1.3; white-space: normal; }
.console.railed .bar .info:empty { display: none; }
.console.railed { --rail-links: 52px; }
.console.railed .bar-r { display: flex; align-items: center; gap: clamp(2px, 1vw, 12px); position: fixed; z-index: 4;
  top: calc(var(--rail-y) + env(safe-area-inset-top) - 4px); right: calc(var(--rail-out) + var(--gut) - 8px); }
.console.railed .bar .link { font-size: clamp(17px, 1.3vmax, 18px); }
/* The right rail: what just happened, then what to do now on a line of its own, then the buttons. */
.console.railed > .status { grid-area: 1 / 4; flex-direction: column; align-items: flex-start; justify-content: var(--rail-say, center); gap: 14px;
  padding: calc(var(--rail-y) + env(safe-area-inset-top)) var(--gut) var(--rail-y) var(--rail-in); }
.console.railed .status .say { max-width: 100%; font-size: clamp(17px, 1.6vmax, 21px); line-height: 1.35; }
.console.railed .status .say b { display: block; font-size: 1.15em; line-height: 1.25; }
.console.railed .status .say:empty, .console.railed .status .acts:empty { display: none; }
.console.railed .status .acts { flex-wrap: wrap; max-width: 100%; pointer-events: auto; }

/* ---------- sheets + pass-the-phone curtain ---------- */
.veil { position: fixed; inset: 0; background: rgba(12, 19, 36, .78); display: grid; place-items: center;
  padding: 16px; z-index: 5; backdrop-filter: blur(3px); }
.sheet { width: min(100%, 460px); background: var(--navy); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(20px, 4vw, 32px); display: grid; gap: 18px; max-height: 92dvh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.sheet h2 { font-size: clamp(26px, 4vw, 34px); text-align: center; }
.sheet .act { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sheet p { margin: 0; text-align: center; color: var(--dim); line-height: 1.45; }
.scores { width: 100%; border-collapse: collapse; font-size: 16px; }
.scores td { padding: 9px 4px; border-top: 1px solid var(--line); }
.scores tr:first-child td { border-top: 0; }
.scores td.n { text-align: right; font-variant-numeric: tabular-nums; }
.scores td.add { color: var(--dim); }
.scores tr.lead td { font-weight: 700; }
.scores tr.lead td:first-child { color: var(--copper-hi); }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 16.5px; line-height: 1.45; }
.rules b { color: var(--copper-hi); font-weight: 700; }
.curtain { position: fixed; inset: 0; background: var(--deep); display: grid; place-items: center; z-index: 6; }
.curtain-in { display: grid; gap: 22px; justify-items: center; text-align: center; padding: 24px; }
.curtain h2 { font-size: clamp(30px, 6vw, 48px); }

/* View: from a result sheet (Next, Again), a look at the finished table. The sheet and its veil step aside,
   a clear layer keeps every tap off the table, and a Back pill stands at the bottom, clear of the tray
   (kit.js setView sets --view-b, the tray's height). Railed, the pill stands at the foot of the left rail,
   off the board. */
.veil[hidden] { display: none; }
.view-shield { position: fixed; inset: 0; z-index: 5; pointer-events: none; }   /* the table scrolls under it; kit.js catches its taps */
.view-back { position: fixed; left: 0; right: 0; bottom: calc(var(--view-b, 0px) + 8px); z-index: 6; display: flex; justify-content: center;
  pointer-events: none; animation: rise .25s ease-out both; }
.view-back .pill { pointer-events: auto; min-height: 40px; padding: 6px 26px; font-size: 16px; color: var(--stone);
  background: rgba(12, 19, 36, .92); border: 1px solid var(--copper); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.console.railed .view-back { left: var(--rail-out); right: auto; width: var(--rail); bottom: calc(var(--rail-y) + env(safe-area-inset-bottom)); }
.console.railed.viewing .bar .link { visibility: hidden; }   /* Rules, New and sound make room for it (they take no tap just now) */
@media (prefers-reduced-motion: reduce) { .view-back { animation: none; } }

/* ---------- dominoes (size: --s = one half's side) ---------- */
.tile { flex: none; display: flex; position: relative; background: linear-gradient(160deg, #FFFDF7, var(--ivory) 60%, #E9E1D0);
  border-radius: calc(var(--s) * .16); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 2px 5px rgba(0, 0, 0, .35); }
.tile.v { flex-direction: column; }
.tile.flip { flex-direction: row-reverse; }
.tile.v.flip { flex-direction: column-reverse; }
.tile::after { content: ""; position: absolute; background: #CFC6B4; left: 50%; top: 14%; bottom: 14%; width: 1px; }
.tile.v::after { top: 50%; left: 14%; right: 14%; bottom: auto; width: auto; height: 1px; }
.half { width: var(--s); height: var(--s); display: block; }
.half svg { width: 100%; height: 100%; display: block; }
.tile.back { background: linear-gradient(160deg, #2A3C63, #1B2A4A); box-shadow: 0 0 0 1px var(--line) inset; }
.tile.back::after { display: none; }
.slot { flex: none; width: var(--s); height: var(--s); border-radius: 16%;
  border: 1.5px dashed rgba(233, 228, 218, .3); display: grid; place-items: center; }
.slot svg { width: 100%; height: 100%; opacity: .55; }

/* ---------- playing cards (size: --c = the card's width) ---------- */
.card { flex: none; position: relative; width: var(--c); height: calc(var(--c) * 1.4); border-radius: calc(var(--c) * .1);
  background: linear-gradient(160deg, #FFFDF7, var(--ivory) 60%, #EDE6D6); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 2px 5px rgba(0, 0, 0, .35);
  font-size: calc(var(--c) * .3); line-height: 1; display: block; font-family: "DM Sans", system-ui, sans-serif; }
.card.red { color: var(--red); }
.card .c-corner { position: absolute; left: 8%; top: 6%; display: grid; justify-items: center; gap: 1px; }
.card .c-corner b { font-weight: 700; letter-spacing: -.04em; }
.card .c-corner i { font-style: normal; font-size: .82em; }
.card .c-face { position: absolute; right: 9%; bottom: 7%; font-size: 1.75em; }
.card.joker { color: var(--copper); }
.card.back { background: repeating-linear-gradient(45deg, #24365E 0 5px, #1B2A4A 5px 10px);
  box-shadow: 0 0 0 1px rgba(233, 228, 218, .28) inset, 0 2px 5px rgba(0, 0, 0, .35); }

/* ---------- shared motion ---------- */
.new { animation: land 1.4s ease-out; }
@keyframes land { 0%, 55% { box-shadow: 0 0 0 3px var(--copper), 0 2px 5px rgba(0, 0, 0, .35); } }
.shake { animation: shake .28s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes breathe { 50% { background: rgba(200, 117, 51, .28); } }
@media (prefers-reduced-motion: reduce) {
  .new, .shake { animation: none; }
  * { transition: none !important; }
}

/* ---------- table surfaces: navy (boards), felt (cards), wood (dominoes), night (party games) ---------- */
.console, .game { --felt-a: #2A6A4C; --felt-b: #123524; --night-a: #3A2B3F; --night-b: #15121C; --wood-a: #74523A; --wood-b: #35241A; }
.console.t-felt { background: radial-gradient(120% 80% at 50% 0%, var(--felt-a), var(--felt-b)); }
/* Dominoes are played on the bare table: a warm walnut with a quiet grain. */
.console.t-wood { background: repeating-linear-gradient(91deg, rgba(255, 255, 255, .02) 0 1px, rgba(0, 0, 0, 0) 1px 6px, rgba(0, 0, 0, .06) 6px 7px, rgba(0, 0, 0, 0) 7px 15px),
  radial-gradient(120% 80% at 50% 0%, var(--wood-a), var(--wood-b)); }
.console.t-night { background: radial-gradient(90% 70% at 50% 8%, #5A3A2E 0%, var(--night-a) 38%, var(--night-b) 100%); }
/* a soft grain so the felt reads as cloth, and a lamp over every table */
.console::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background: radial-gradient(60% 45% at 50% 0%, rgba(255, 236, 200, .13), transparent 70%); }
.console.t-felt::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }
.console > * { position: relative; z-index: 1; }
.console > .over-sheet, .console > .over-curtain { position: static; }
/* The console is a grid, so these two still stack by z-index: keep them above any stage a game raises. */
.console > .over-sheet { z-index: 5; }
.console > .over-curtain { z-index: 6; }
.t-felt .curtain { background: var(--felt-b); }
.t-night .curtain { background: var(--night-b); }
.t-wood .curtain { background: var(--wood-b); }
.t-felt .sheet { background: #1D4A36; }
.t-night .sheet { background: #2B2231; }
.t-wood .sheet { background: #4A3324; }

/* the menu: each game's tile wears its table */
.game.t-felt { background: radial-gradient(130% 100% at 50% 0%, #2A6A4C, #17422E 62%, #103122); }
.game.t-wood { background: repeating-linear-gradient(91deg, rgba(255, 255, 255, .025) 0 1px, rgba(0, 0, 0, 0) 1px 6px, rgba(0, 0, 0, .07) 6px 7px, rgba(0, 0, 0, 0) 7px 15px),
  radial-gradient(130% 100% at 50% 0%, #86603F, #664630 62%, #4D3423); }
.game.t-night { background: radial-gradient(130% 100% at 50% 0%, #58363C, #3A2733 62%, #2A1D28); }
.game.t-navy { background: radial-gradient(130% 100% at 50% 0%, #34508C, #1F3059 62%, #17233F); }
/* Set into the wood: a thin copper edge, a shadow falling in from the rim, a quiet inner line, a light along the top. */
.game { position: relative; border-color: rgba(200, 117, 51, .9);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .28), 0 1px 0 4px rgba(255, 255, 255, .035), inset 0 3px 12px rgba(0, 0, 0, .45), inset 0 -1px 0 rgba(255, 255, 255, .05); }
.game::before { content: ""; position: absolute; inset: 7px; border-radius: 12px; border: 1px solid rgba(247, 242, 232, .08); pointer-events: none; }
.game::after { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(200, 117, 51, 0), var(--copper), rgba(200, 117, 51, 0)); opacity: .75; }
.game > * { position: relative; }
.game:hover { transform: translateY(-3px); border-color: rgba(200, 117, 51, .85);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .28), 0 12px 26px rgba(0, 0, 0, .5), inset 0 3px 12px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(255, 255, 255, .05); }
.game:hover::after { opacity: 1; left: 12%; right: 12%; }
.game::after { transition: left .18s, right .18s, opacity .18s; }
.game .g-tag { color: rgba(233, 228, 218, .72); }
/* A place with no game yet: no surface, a dashed edge, and it does not answer a tap. */
.game.soon { background: rgba(0, 0, 0, .2); border-style: dashed; border-color: rgba(200, 117, 51, .5); box-shadow: inset 0 3px 12px rgba(0, 0, 0, .35); cursor: default; }
.game.soon::after { display: none; }
.game.soon:hover { transform: none; border-color: rgba(200, 117, 51, .5); box-shadow: inset 0 3px 12px rgba(0, 0, 0, .35); }
.game.soon:hover .emblem { transform: none; }
.game.soon .g-name { color: var(--stone); }
.game:hover .emblem { transform: scale(1.08) rotate(-2deg); }
/* A shared place (main.js): the whole place is the link; the switch sits in its top corner, a pip for each game below. */
.game.grp { cursor: pointer; }
.game.grp > .g-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.game.grp > .g-swap { position: absolute; z-index: 2; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: none; padding: 0; color: var(--stone); cursor: pointer; border-radius: 50%; }
.game.grp > .g-swap svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .16);
  transition: background .15s, color .15s, transform .25s; }
.game.grp > .g-swap:hover { color: var(--ivory); }
.game.grp > .g-swap:hover svg { background: rgba(0, 0, 0, .34); transform: rotate(180deg); }
.game.grp > .g-swap:focus-visible { outline: none; }
.game.grp > .g-swap:focus-visible svg { box-shadow: inset 0 0 0 2px var(--copper-hi); }
.game.grp > .g-pips { position: absolute; z-index: 2; top: 23px; right: 46px; display: flex; gap: 5px; pointer-events: none; }
.game.grp > .g-pips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(233, 228, 218, .42);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .32); }
.game.grp > .g-pips i.on { background: var(--ivory); box-shadow: 0 0 0 1px rgba(0, 0, 0, .32), 0 0 6px rgba(247, 242, 232, .45); }
.games .game.swapped { animation: none; }
.game.swapped > .emblem, .game.swapped > .g-name, .game.swapped > .g-tag { animation: swapin .26s ease-out both; }
@keyframes swapin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .game.grp > .g-swap { top: 0; right: 0; }
  .game.grp > .g-swap svg { width: 24px; height: 24px; padding: 4px; }
  .game.grp > .g-pips { top: auto; right: 0; left: 0; bottom: 4px; justify-content: center; gap: 4px; }
  .game.grp > .g-pips i { width: 6px; height: 6px; }
}
@media (prefers-reduced-motion: reduce) { .game.swapped > * { animation: none !important; } .game.grp > .g-swap:hover svg { transform: none; } }
.emblem { transition: transform .18s ease; }

/* ---------- motion ---------- */
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes paper { from { transform: translate3d(0, -12vh, 0) rotate(0); opacity: 1; }
  to { transform: translate3d(var(--x), 108vh, 0) rotate(calc(var(--r) + 540deg)); opacity: .9; } }
.menu h1 { animation: rise .45s ease-out both; }
.games .game { animation: rise .42s ease-out both; }
.games .game:nth-child(1) { animation-delay: .04s; } .games .game:nth-child(2) { animation-delay: .08s; }
.games .game:nth-child(3) { animation-delay: .12s; } .games .game:nth-child(4) { animation-delay: .16s; }
.games .game:nth-child(5) { animation-delay: .20s; } .games .game:nth-child(6) { animation-delay: .24s; }
.games .game:nth-child(7) { animation-delay: .28s; } .games .game:nth-child(8) { animation-delay: .32s; }
.games .game:nth-child(9) { animation-delay: .36s; } .games .game:nth-child(n+10) { animation-delay: .40s; }
.setup-in { animation: rise .35s ease-out both; }
.console .bar, .console .status { animation: fade .35s ease-out both; }
.console .stage { animation: rise .4s ease-out both; }
.console .tray { animation: fade .4s ease-out both; }   /* the bottom strip must not push past the screen */
.veil { animation: fade .18s ease-out both; }
.sheet { animation: pop .24s cubic-bezier(.2, .9, .3, 1.2) both; }
.curtain { animation: fade .2s ease-out both; }
.curtain h2 { animation: rise .35s ease-out both; }
.curtain .pill { animation: rise .35s .08s ease-out both; }
.cheer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
.cheer i { position: absolute; top: 0; border-radius: 1px; animation: paper linear both; }
@media (prefers-reduced-motion: reduce) {
  .menu h1, .games .game, .setup-in, .console .bar, .console .status, .console .stage, .console .tray,
  .veil, .sheet, .curtain, .curtain h2, .curtain .pill, .status .say.fresh { animation: none; }
  .cheer { display: none; }
}

/* ---------- rooms, join, scores ---------- */
.pill[hidden] { display: none; }
a.link { display: inline-flex; align-items: center; gap: 8px; }
.menu-links { display: flex; justify-content: center; align-items: center; gap: clamp(6px, 2vw, 22px); margin-top: -8px;
  animation: fade .5s .3s ease-out both; }
.menu-links .link.on { color: var(--copper-hi); opacity: 1; font-weight: 700; }
.go-row { display: flex; justify-content: center; gap: 10px; }
.setup-go .go-row .pill.quiet { min-width: 0; }
/* The room's code in the top bar: copper while the wire is up. */
.code { flex: none; font-weight: 700; letter-spacing: .14em; font-size: clamp(14px, 1.3vmax, 17px); color: var(--copper-hi);
  border: 1px solid rgba(200, 117, 51, .5); border-radius: 8px; padding: 4px 6px 4px 9px; font-variant-numeric: tabular-nums; }
.code.off { color: var(--dim); border-color: var(--line); }
/* The host's bar in a room holds the code and New both. On a phone its pieces sit closer, and the name and
   the info line end in … before they would run under the code. */
@media (max-width: 560px) {
  .bar.full .bar-r { gap: 0; }
  .bar.full .link:not(.snd) { padding-left: 4px; padding-right: 4px; }
  .bar.full .link.snd { width: 36px; }
  .bar.full .code { padding: 3px 4px 3px 7px; letter-spacing: .1em; }
  .bar.full .info { font-size: 13.5px; }
  .bar.full .title, .bar.full .info { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
/* Someone else's move re-draws the table without the entrance. */
.console.quiet .bar, .console.quiet .status, .console.quiet .stage, .console.quiet .tray { animation: none; }
.lob-top { display: grid; justify-items: center; }
.lob-code { font-family: "Playfair Display", Georgia, serif; font-weight: 700; line-height: 1.05; color: var(--ivory);
  font-size: clamp(54px, 13vw, 96px); letter-spacing: .16em; margin-right: -.16em; transition: opacity .2s; }
.lob-code.off { opacity: .45; }
.lob-at { display: flex; align-items: center; gap: 4px; color: var(--dim); font-size: clamp(15px, 1.3vmax, 18px); }
.lob-at .link { color: var(--copper-hi); opacity: 1; font-weight: 700; }
.seats.fixed .seat.lob-seat { grid-template-columns: 22px minmax(0, 1fr) 22px; min-height: 46px; }
.seats.fixed.host .seat.lob-seat { grid-template-columns: 22px minmax(0, 1fr) 40px 40px; }
.lob-n { color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.lob-name { height: 46px; padding: 0 14px; display: flex; align-items: center; min-width: 0; border-radius: 12px; font-size: 17px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lob-name.open { color: var(--dim); background: none; border-style: dashed; }
.lob-say { color: var(--dim); font-size: clamp(15px, 1.4vmax, 18px); text-align: center; }
.lob-say:empty { display: none; }
.seat input.code-in { text-transform: uppercase; text-align: center; font-weight: 700; font-size: 22px; letter-spacing: .3em; height: 54px; }
.seat input.code-in::placeholder { letter-spacing: .02em; font-weight: 400; font-size: 16px; text-transform: none; }
.join .hero .logo { width: 64px; height: 64px; }
.lobby .hero .logo { width: 56px; height: 56px; }
/* On the home screen the page runs under the status bar. */
.menu { padding-top: calc(clamp(20px, 4.5vw, 72px) + env(safe-area-inset-top)); }
.setup { padding-top: calc(clamp(16px, 4.5vw, 64px) + env(safe-area-inset-top)); }

/* ---------- the home page on a laptop: three rows of five fit one screen ---------- */
@media (min-width: 901px) {
  .menu { padding-top: calc(clamp(16px, 3.2vh, 56px) + env(safe-area-inset-top)); padding-bottom: calc(clamp(16px, 3.2vh, 56px) + env(safe-area-inset-bottom)); }
  .menu-in { gap: clamp(14px, 2.8vh, 40px); }
  .menu h1 { font-size: clamp(38px, 7.4vh, 68px); }
  .game { min-height: clamp(128px, 19.5vh, 220px); padding: clamp(10px, 1.7vh, 26px) 12px; gap: clamp(4px, .9vh, 8px); }
  .game .emblem { height: clamp(56px, 8vh, 72px); margin-bottom: 0; }
}
/* A big iPad held upright (12.9-inch, 1024x1366): three across, five rows of bigger places fill the screen. */
@media (min-width: 960px) and (min-height: 1200px) and (orientation: portrait) {
  .games { --per: 3; }
  .game { min-height: clamp(150px, 14vh, 240px); }
  .game .emblem { --s: 36px; --c: 52px; height: 76px; font-size: 60px; }
  .g-name { font-size: 27px; }
  .g-tag { font-size: 16px; }
}

/* ----- welcome ----- */
/* The screen before a game: setup, and a room's lobby (kit.js welShell). It wears the game's surface and holds
   the scene (.wel-scene: the game's emblem and name in .wel-title, and .wel-host, where games/<id>/welcome.js
   draws) and a panel (.wel-panel: the controls in .setup-in). The rules are never open here: at every size
   they are behind the Rules button, in a sheet. Its shapes:
     a phone              the scene is a band on top, the controls under it
     an upright tablet    the same, with a taller scene
     a wide screen        two columns: the scene, and the controls beside it
     a phone on its side  the scene beside the controls (they scroll)
   The page never scrolls: when the controls are too tall, the seats scroll inside their box. */
.wel { --felt-a: #2A6A4C; --felt-b: #123524; --night-a: #3A2B3F; --night-b: #15121C; --wood-a: #74523A; --wood-b: #35241A; }
.setup.wel { height: 100dvh; min-height: 0; padding: 0; overflow: hidden; display: grid; place-items: stretch;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 1fr) minmax(0, auto); }
.wel.t-felt { background: radial-gradient(120% 80% at 50% 0%, var(--felt-a), var(--felt-b)); }
.wel.t-wood { background: repeating-linear-gradient(91deg, rgba(255, 255, 255, .02) 0 1px, rgba(0, 0, 0, 0) 1px 6px, rgba(0, 0, 0, .06) 6px 7px, rgba(0, 0, 0, 0) 7px 15px),
  radial-gradient(120% 80% at 50% 0%, var(--wood-a), var(--wood-b)); }
.wel.t-night { background: radial-gradient(90% 70% at 50% 8%, #5A3A2E 0%, var(--night-a) 38%, var(--night-b) 100%); }
/* the same lamp and cloth as the console */
.wel::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background: radial-gradient(60% 45% at 50% 0%, rgba(255, 236, 200, .13), transparent 70%); }
.wel.t-felt::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }
.wel > * { position: relative; z-index: 1; }
.wel > .back { z-index: 3; }
.wel > .wel-over { position: absolute; left: 0; top: 0; z-index: 5; }

/* the scene: the game's name over the box its welcome draws in */
/* --wt is the title's size; the emblem beside it is sized from it. */
.wel-scene { --wt: clamp(28px, 7.6vw, 40px); min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) var(--gut) 4px; }
/* The name with the game's emblem at its left: the same art as its tile on the home page, sized to the title
   (--h is its height; dominoes take --s, cards --c and everything else the font size). It sits in the title's
   own row, above the box the scene draws in. */
.wel-title { min-width: 0; min-height: 40px; padding: 0 44px; display: flex; align-items: center; justify-content: center; gap: calc(var(--wt) * .3);
  animation: rise .45s ease-out both; }
.wel-scene h1 { min-width: 0; text-align: center; text-wrap: balance; font-size: var(--wt); line-height: 1.1; letter-spacing: -.01em; }
.wel-em { --h: calc(var(--wt) * .8); --s: calc(var(--h) * .44); --c: calc(var(--h) * .6); flex: none; height: var(--h);
  display: flex; align-items: center; gap: 3px; font-size: calc(var(--h) * .82); line-height: 1; color: var(--ivory); pointer-events: none; }
/* no emblem, or no scene (the emblem is then shown large, below): the name stands alone */
.wel-em:empty, .wel-scene:has(.wel-emblem) .wel-em { display: none; }
.wel-host { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
/* no scene (or one that failed): the game's emblem, large */
.wel-host .wel-emblem { position: absolute; inset: 0; min-height: 0; gap: .06em; --s: clamp(40px, 11vmin, 104px); --c: clamp(58px, 16vmin, 150px);
  font-size: clamp(84px, 24vmin, 220px); animation: fade .4s ease-out both; }
.wel-host .wel-emblem .logo { width: 1em; height: 1em; }
/* What a scene is made of (kit.js welcome): a stage measured in units (--u, set in px so the scene's own
   uw by uh units always fit the host) and pieces that sit at its middle until put() moves them, then glide. */
.wel-stage { position: absolute; inset: 0; --u: 10px; }
.wel-p { position: absolute; left: 50%; top: 50%;
  transition: transform var(--ms, .6s) var(--ease, cubic-bezier(.2, .8, .2, 1)), opacity var(--fade, .35s) ease; }
/* a piece with two faces, the back first: .up turns it over */
.wel-flip { display: grid; }
.wel-flip > * { grid-area: 1 / 1; transition: transform .2s ease-in; }
.wel-flip > :last-child { transform: scaleX(0); }
.wel-flip.up > :first-child { transform: scaleX(0); }
.wel-flip.up > :last-child { transform: scaleX(1); transition: transform .2s ease-out .2s; }
.wel-flip:not(.up) > :first-child { transition: transform .2s ease-out .2s; }
.wel-host.paused * { animation-play-state: paused !important; }

/* the panel: the controls */
.wel-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px;
  padding: 8px max(16px, var(--gut)) calc(14px + env(safe-area-inset-bottom)); }
.wel .setup-in { flex: 0 1 auto; min-height: 0; width: min(100%, 560px); margin: 0 auto;
  display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 16px); }
.wel .setup-in > * { flex: none; }
.wel .setup-in > .seats { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px; margin: -3px; }
/* a full table: closer rows */
.wel .seats.many { gap: 6px; }
.wel .seats.many .seat input, .wel .seats.many .lob-name, .wel .seats.many .x { height: 42px; }
.wel .seats.many .seg button { height: 36px; }
.wel .seats.many .seat.lob-seat { min-height: 42px; }
.wel .setup-go { gap: 6px; }
.wel .setup-go .pill { min-width: 0; }
.wel .go-row { width: 100%; gap: 8px; }
.wel .go-row .pill { flex: 0 1 auto; padding-left: 20px; padding-right: 20px; }
/* a game is waiting: Continue, New, Invite, Rules share the row on a phone */
@media (max-width: 520px) { .wel .go-row.four { gap: 6px; } .wel .go-row.four .pill { padding-left: 14px; padding-right: 14px; } }
.wel .go-row .pill:not(.quiet) { flex: 1 1 0; max-width: 260px; }
.wel .go-row .pill[hidden] { display: none; }
.wel .lob-code { font-size: clamp(40px, 11vw, 60px); }

/* an upright tablet: the scene has what the controls leave, and never less than two fifths of the screen */
@media (min-width: 700px) and (orientation: portrait) {
  .setup.wel { grid-template-rows: minmax(40%, 1fr) minmax(0, auto); }
  .wel-scene { --wt: clamp(40px, 6vw, 56px); }
  .wel-title { min-height: 56px; }
  .wel-em { --h: calc(var(--wt) * .92); gap: 4px; }
  .wel-panel { padding: 14px clamp(20px, 4vw, 36px) calc(20px + env(safe-area-inset-bottom)); }
  .wel .setup-in { width: min(100%, 520px); }
}
/* a wide screen: the scene, and the controls beside it */
@media (min-width: 900px) and (min-height: 560px) and (orientation: landscape) {
  .setup.wel { grid-template-columns: minmax(0, 1fr) clamp(420px, 34vw, 480px); grid-template-rows: minmax(0, 1fr); }
  .wel-scene { --wt: clamp(44px, 4.4vw, 72px); gap: 10px; padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 2vw, 32px) calc(16px + env(safe-area-inset-bottom)); }
  .wel-title { min-height: 64px; padding: 0 56px; }
  .wel-em { --h: calc(var(--wt) * .92); gap: 4px; }
  .wel-panel { justify-content: center; gap: 16px;
    padding: calc(22px + env(safe-area-inset-top)) clamp(18px, 1.8vw, 28px) calc(22px + env(safe-area-inset-bottom)) 8px; }
  .wel .setup-in { width: 100%; }
  .wel .lob-code { font-size: clamp(48px, 4.4vw, 64px); }
}
/* a phone on its side */
@media (max-height: 559.98px) and (orientation: landscape) {
  .setup.wel { grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); grid-template-rows: minmax(0, 1fr); }
  .wel-panel { overflow-y: auto; padding-top: calc(10px + env(safe-area-inset-top)); }
  .wel .setup-in { flex: none; }
  .wel .setup-in > .seats { flex: none; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .wel-title, .wel-host .wel-emblem { animation: none; }
  .wel-host * { animation: none !important; }
}

/* ----- the table (sign-in) ----- */
/* kit/table.js. #/signin wears the Join screen. #/table and #/tables are one frame (.tb): the name, the boxes
   and the foot. The page never scrolls: each box scrolls in itself. Its shapes:
     a phone              one box at a time, picked on the bar under the name
     an upright tablet    the porch down the left, People, Top scores and Requests on the right
     a wide screen        the porch, People, then Top scores over Requests */
/* the home page's link: a long Table name gives way before the row does */
/* Who is signed in: their initial, top right of the home page and of each game's opening screen. A 44px
   place to tap, a 34px circle to see. */
a.tb-me { position: absolute; right: var(--gut); top: calc(8px + env(safe-area-inset-top)); z-index: 6; width: 44px; height: 44px;
  display: grid; place-items: center; text-decoration: none; }
a.tb-me span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; line-height: 1;
  color: var(--ivory); background: rgba(255, 255, 255, .08); border: 1px solid rgba(233, 228, 218, .34); transition: background .15s ease; }
a.tb-me:hover span, a.tb-me:focus-visible span { background: rgba(255, 255, 255, .18); }
.menu-links a.tb-link { display: block; flex: 0 1 auto; min-width: 0; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sent { text-align: center; color: var(--dim); font-size: clamp(16px, 1.4vmax, 18px); line-height: 1.5; }
.tb-sent b { display: block; color: var(--stone); font-weight: 700; overflow-wrap: anywhere; }

.setup.tb { display: block; height: 100dvh; min-height: 0; overflow: hidden;
  padding: calc(10px + env(safe-area-inset-top)) max(14px, var(--gut)) calc(6px + env(safe-area-inset-bottom)); }
.tb-in { width: min(100%, 1240px); height: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 14px);
  animation: rise .35s ease-out both; }
.tb-in > * { flex: none; min-width: 0; }
.setup.tb h1 { font-size: clamp(26px, min(5vh, 7vw), 44px); line-height: 1.2; padding: 0 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-in > .tb-grid { flex: 1 1 0; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.tb-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  background: rgba(0, 0, 0, .18); border: 1px solid var(--line); border-radius: 16px; }
.tb-card > * { flex: none; min-width: 0; }
.tb-card > h2 { font-size: 22px; }
.tb-card > .tb-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding-right: 10px; margin-right: -4px; }   /* the numbers stay clear of the scroll bar */
.tb-list > .lob-say { padding: 18px 0; }
/* Tables: one narrow box that is only as tall as its list */
.tb-tables .tb-in { width: min(100%, 560px); }
.tb-in > .tb-card { flex: 0 1 auto; }
.tb-in > .tb-card > .tb-list { flex: 0 1 auto; }

/* a person, or a Table: the name (and the email under it), then what can be done */
.tb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 4px; min-height: 42px;
  border-top: 1px solid var(--line); }
.tb-row:first-child { border-top: 0; }
.tb-who { min-width: 0; display: grid; }
.tb-who b, .tb-who span, .tb-open b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-who b, .tb-open b { font-size: 16.5px; font-weight: 600; line-height: 1.25; }
.tb-who span { font-size: 13px; line-height: 1.25; color: var(--dim); }
.tb-row.off .tb-who { opacity: .5; }
.tb-role { color: var(--dim); font-size: 14.5px; padding: 0 6px; }
.tb-row .link { min-height: 40px; padding: 0 6px; font-size: 15px; }
.tb-row button.tb-role { color: var(--copper-hi); opacity: 1; font-weight: 700; }
.tb-open { min-width: 0; min-height: 42px; display: flex; align-items: center; gap: 8px; text-align: left; }
.tb-open .dot { flex: none; }
/* on and off */
.tb-sw { width: 46px; height: 40px; display: grid; place-items: center; }
.tb-sw i { display: block; position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(233, 228, 218, .3); transition: background .15s, border-color .15s; }
.tb-sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--stone);
  transition: transform .15s; }
.tb-sw.on i { background: var(--copper); border-color: var(--copper); }
.tb-sw.on i::after { transform: translateX(16px); background: #fff; }
.tb-sw:focus-visible i { outline: 2px solid var(--copper-hi); outline-offset: 2px; }
/* adding a person, making a Table */
.tb input { height: 44px; min-width: 0; width: 100%; padding: 0 12px; font-size: 16px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); border-radius: 12px; }
.tb input:focus, .tb-req textarea:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.tb-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; gap: 6px; }
.tb-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tb-new .pill { justify-self: end; }
.pill.sm { min-height: 40px; padding: 6px 16px; font-size: 15.5px; box-shadow: none; }
.tb-add .pill, .tb-new .pill { min-height: 44px; }
.tb-note { font-size: 15px; }
/* top scores */
.tb-sc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tb-sc li { display: flex; justify-content: space-between; gap: 10px; font-size: 16.5px; }
.tb-sc li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sc li b { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-list h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 14px 0 4px;
  font-size: 15px; font-weight: 700; color: var(--copper-hi); }
.tb-list h3 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-list h3 i { flex: none; font-style: normal; font-weight: 400; color: var(--dim); }
.tb-dim { color: var(--dim); font-size: 14.5px; margin-top: 8px; }
/* rule requests */
.tb-rq { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.tb-rq:first-child { border-top: 0; padding-top: 2px; }
.tb-rq-t { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--dim); }
.tb-rq-t b { color: var(--copper-hi); font-weight: 700; }
.tb-rq p { margin: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.tb-rq-a { display: flex; gap: 8px; }
.tb-st { font-size: 14.5px; color: var(--dim); }
.tb-st.accepted, .tb-st.done { color: var(--copper-hi); font-weight: 700; }
.tb-foot { display: flex; justify-content: center; align-items: center; gap: clamp(6px, 2vw, 22px); }
/* The porch (the Table's meeting place): the game night on top, who is here now, then the notes, which scroll. */
.pc-night { display: grid; gap: 8px; justify-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pc-k { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-hi); }
.pc-host { display: flex; gap: 2px; letter-spacing: 0; text-transform: none; }
.pc-host .link { min-height: 36px; padding: 0 8px; font-size: 15px; }
.pc-when { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: clamp(22px, 2.6vmax, 30px); line-height: 1.2; }
.pc-game { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: inherit; text-decoration: none; font-size: 18px; }
.pc-game b { font-weight: 700; }
.pc-em { display: grid; place-items: center; height: 36px; --s: 11px; --c: 22px; font-size: 26px; line-height: 1; }
.pc-text { margin: 0; font-size: 16.5px; line-height: 1.4; color: var(--stone); overflow-wrap: anywhere; }
.pc-ans { margin-top: 2px; }
.pc-ans button { min-width: 108px; }
.pc-who { font-size: 16px; line-height: 1.4; }
.pc-who b { color: var(--copper-hi); margin-right: 4px; }
.pc-who.dim { color: var(--dim); }
.pc-who.dim b { color: var(--dim); }
.pc-none { margin-top: 0; }
.pc-form { width: 100%; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 6px; }
.pc-form select, .pc-form [data-f="ntext"] { grid-column: 1 / -1; }
.pc-form select { height: 44px; min-width: 0; width: 100%; padding: 0 10px; font: inherit; font-size: 16px; color: inherit;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; }
.pc-form select option { color: #1B2A4A; }
.pc-form input[type="date"], .pc-form input[type="time"] { color-scheme: dark; }
.pc-go { grid-column: 1 / -1; display: flex; gap: 8px; }
.pc .on-home { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 0; animation: none; }
.pc .on-home[hidden] { display: none; }
.pc .on-home:not(:has(.on-who))::before { content: "Online"; color: var(--dim); font-size: 15px; }   /* nobody else yet: the switch still says what it is */
.pc-h { margin: 2px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-hi); }
.pc-note { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.pc-note:first-child { border-top: 0; padding-top: 2px; }
.pc-nt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pc-nt b { font-size: 16px; font-weight: 700; }
.pc-nt i { font-style: normal; font-size: 13.5px; color: var(--dim); }
.pc-nt .tb-del { margin-left: auto; min-height: 30px; padding: 0 4px; font-size: 14px; }
.pc-note p { margin: 0; font-size: 16.5px; line-height: 1.4; overflow-wrap: anywhere; }
.pc-add { grid-template-columns: minmax(0, 1fr) auto; }
.pc-say:empty { display: none; }
/* the Host's part of the Table's name, over the home page's title */
.menu h1 .tt-name { position: relative; }
.menu h1 .tb-host { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: .06em; text-align: center; white-space: nowrap;
  font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 600; font-size: .4em; letter-spacing: .02em; line-height: 1; color: var(--copper-hi); }

/* a phone: one box at a time */
@media (max-width: 699.98px) {
  .tb-card > h2 { display: none; }
  .tb[data-tab="porch"] .tb-card:not([data-sec="porch"]),
  .tb[data-tab="people"] .tb-card:not([data-sec="people"]),
  .tb[data-tab="scores"] .tb-card:not([data-sec="scores"]),
  .tb[data-tab="requests"] .tb-card:not([data-sec="requests"]) { display: none; }
}
/* an upright tablet */
@media (min-width: 700px) {
  .tb .tb-tabs { display: none; }
  .tb-in > .tb-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .tb-card[data-sec="porch"] { grid-row: 1 / 4; }
}
/* a wide screen: the porch, the people, and scores over requests */
@media (min-width: 900px) and (orientation: landscape) {
  .tb-in > .tb-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .tb-card[data-sec="porch"], .tb-card[data-sec="people"] { grid-row: 1 / 3; }
}
/* Request: a button in a welcome's Rules sheet, beside Done; this is the sheet it opens */
.tb-req textarea { display: block; width: 100%; min-height: 132px; resize: none; padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.45;
  color: inherit; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; }
.tb-count { text-align: right; color: var(--dim); font-size: 14px; margin-top: -10px; }
.tb-count:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .tb-in { animation: none; } }

/* ---------- bigger text (html.big: the Aa switch, kit.js bigText) ---------- */
/* One switch, kept on the device: the kit's own words grow about a fifth. --tx is the factor; a game may size its
   own labels with calc(... * var(--tx, 1)). Table geometry is the games' own and does not change, so nothing
   here touches the stage's padding. Each rule is the plain size times --tx, with room made where a row is full. */
:root { --tx: 1; }
html.big { --tx: 1.22; }
/* the switch: one word, two states */
.aa { font-weight: 700; letter-spacing: .02em; }
.link.aa { min-width: 44px; border-radius: 10px; }
.link.aa[aria-pressed="true"], .pill.quiet.aa[aria-pressed="true"] { opacity: 1; color: var(--ivory); background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .45); }
/* a guest's result sheet: Again is the host's, so the row says who it waits for */
.sheet .act .sheet-wait { align-self: center; padding: 0 6px; color: var(--dim); font-size: calc(16px * var(--tx)); }

/* buttons */
html.big .pill { font-size: calc(17px * var(--tx)); }
html.big .pill.sm { font-size: calc(15.5px * var(--tx)); }
html.big .view-back .pill { font-size: calc(16px * var(--tx)); }
html.big .link { font-size: calc(clamp(16px, 1.3vmax, 18px) * var(--tx)); }
html.big .menu-links .link { font-size: clamp(16px, 1.3vmax, 18px); }   /* the home page's row is full on a phone */
html.big .tb-row .link { font-size: 15px; }                             /* the Table's rows keep theirs */
html.big .seg button { font-size: calc(15.5px * var(--tx)); }
/* a choice of three on a phone: a long one goes to two lines rather than past the screen */
html.big .seg.wide button { min-width: 0; white-space: normal; height: auto; min-height: 40px; padding: 4px 8px; line-height: 1.15; }

/* the home page: the tiles' names and tags */
html.big .g-name { font-size: calc(clamp(18px, 1.7vw, 23px) * var(--tx)); line-height: 1.12; }
html.big .g-tag { font-size: calc(14px * var(--tx)); line-height: 1.22; }
@media (max-width: 900px) { html.big .g-tag { font-size: calc(12.5px * var(--tx)); } }
@media (max-width: 560px) {
  /* five rows still fit 874px: the space round the tiles gives way to the words */
  html.big .menu-in { gap: 14px; }
  html.big .game { padding: 6px 5px 9px; gap: 3px; }
  html.big .emblem { zoom: .7; }
  html.big .g-name { font-size: calc(15.5px * var(--tx)); }
  html.big .g-tag { font-size: calc(11.5px * var(--tx)); }
}
@media (min-width: 901px) { html.big .game .emblem { height: clamp(48px, 6.6vh, 64px); } }

/* the welcome (setup and the lobby) */
html.big .seat input { font-size: calc(16px * var(--tx)); }
html.big .seat input.code-in { font-size: calc(22px * var(--tx)); }
html.big .opt-label { font-size: calc(14.5px * var(--tx)); }
html.big .lob-name { font-size: calc(17px * var(--tx)); }
html.big .lob-say { font-size: calc(clamp(15px, 1.4vmax, 18px) * var(--tx)); }
html.big .wel .go-row { flex-wrap: wrap; }
html.big .wel .go-row.four .pill { padding-left: 14px; padding-right: 14px; }
@media (max-width: 520px) { html.big .wel .go-row.four .pill { padding-left: 10px; padding-right: 10px; }
  html.big .wel .go-row.four .pill:not(.quiet) { flex-basis: auto; min-width: max-content; } }

/* the console: the top bar, the status line */
html.big .bar .title { font-size: calc(clamp(20px, 2.1vmax, 27px) * var(--tx)); }
html.big .bar .info { font-size: calc(clamp(15px, 1.5vmax, 21px) * var(--tx)); }
/* a long name or info line ends in … before it would run under Rules and New */
html.big .console:not(.railed) .bar .title, html.big .console:not(.railed) .bar .info { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
html.big .status .say { font-size: calc(clamp(16px, 1.6vmax, 21px) * var(--tx)); }
html.big .console.railed .status .say { font-size: calc(clamp(17px, 1.6vmax, 21px) * var(--tx)); }
@media (max-width: 560px) {
  html.big .bar .title { font-size: 23px; }
  html.big .bar .link { font-size: clamp(16px, 1.3vmax, 18px); }   /* Rules and New keep their size: the name has the room */
  html.big .status .pill { padding-left: 18px; padding-right: 18px; }
}

/* sheets (Rules, the end), the curtain */
html.big .sheet { font-size: calc(16px * var(--tx)); }
html.big .sheet h2 { font-size: calc(clamp(26px, 4vw, 34px) * var(--tx)); }
html.big .rules { font-size: calc(16.5px * var(--tx)); }
html.big .scores { font-size: calc(16px * var(--tx)); }
html.big .curtain h2 { font-size: calc(clamp(30px, 6vw, 48px) * var(--tx)); }

/* the cards' corners: a little less than the rest, since a fanned hand shows only a strip of each card */
html.big .card .c-corner { font-size: 1.12em; }

/* ---------- who is online (kit/presence.js) ----------
   Home page: one quiet line under the links, a dot and the names, then In / Out. A room's lobby: who from the
   Table in view is online, under the code; anyone already in a game or a room reads lighter. A tap on a name
   invites them; the invite arrives as a sheet (.on-ask, on the body). */
.on-home[hidden], .on-invite[hidden] { display: none; }
.on-home { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-width: 0;
  margin-top: calc(2px - min(clamp(14px, 2.8vh, 40px), clamp(22px, 4vh, 44px)));   /* sits close under the links */
  animation: fade .5s .4s ease-out both; }
.on-who { display: block; min-width: 0; max-width: 100%; color: var(--dim); font-size: clamp(15px, 1.2vmax, 17px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--stone); vertical-align: middle;
  margin: -2px 8px 0 0; box-shadow: 0 0 0 3px rgba(233, 228, 218, .12); }
.seg.on-sw { flex: none; padding: 2px; border-radius: 10px; }
.seg.on-sw button { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 14.5px; }
@media (pointer: coarse) { .seg.on-sw button { height: 40px; } }
.on-invite { text-align: center; color: var(--dim); font-size: clamp(15px, 1.3vmax, 18px); line-height: 1.45; min-width: 0;
  overflow-wrap: anywhere; animation: fade .3s ease-out both; }
.on-invite .on-n { color: var(--stone); font-weight: 600; }
.on-invite .on-n.busy { color: var(--dim); font-weight: 400; }
/* In a room each name is a tap that invites: copper, like Share beside the code. */
.on-invite button.on-n { display: inline-block; padding: 8px 2px; color: var(--copper-hi); font-weight: 700; }
.on-invite button.on-n.busy { font-weight: 500; }
.on-sent { font-style: normal; font-weight: 400; font-size: .85em; color: var(--dim); margin-left: 6px; }
/* An invite from someone at the Table: the kit's sheet, over everything on the page. */
.on-ask .veil { z-index: 8; }
.on-ask .sheet h2 { font-size: clamp(24px, 3.6vw, 30px); line-height: 1.25; }

/* ---------- show me how: a first-time walkthrough over the real table (kit/tour.js, steps in kit/tours.js) ---------- */
/* Mounted on <body>, over the console, its sheets (5) and curtain (6). The ring's wide shadow dims everything but
   the lit element; four clear shades around it take a tap (which ends the walkthrough) while the lit element
   itself still takes the game's own taps. Copper is the Next button only. */
.tour { position: fixed; inset: 0; z-index: 8; pointer-events: none; opacity: 0; transition: opacity .22s ease-out; }
.tour.on { opacity: 1; }
.tour[hidden] { display: none; }
.tour-safe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.tour-shade { position: fixed; pointer-events: auto; background: transparent; }
.tour-ring { position: fixed; pointer-events: none; border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(247, 242, 232, .88), 0 0 22px 6px rgba(247, 242, 232, .26), 0 0 0 200vmax rgba(10, 16, 30, .66); }
.tour.on .tour-ring { transition: left .26s ease, top .26s ease, width .26s ease, height .26s ease; }
.tour.on .tour-panel { transition: left .26s ease, top .26s ease; }
.tour-panel { position: fixed; pointer-events: auto; max-width: calc(100vw - 24px); display: grid; gap: 12px;
  background: var(--navy); color: var(--ivory); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 18px 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); outline: none; }
.tour-say { margin: 0; font-family: "DM Sans", system-ui, sans-serif; font-size: clamp(17px, 1.5vmax, 19px); line-height: 1.42;
  color: var(--ivory); }
.tour-act { display: flex; align-items: center; gap: 10px; }
.tour-skip { color: var(--stone); opacity: .88; font-size: 16px; font-weight: 500; padding: 10px 8px; min-height: 44px; margin-left: -8px; }
.tour-skip:hover { opacity: 1; }
.tour-dots { flex: 1; display: flex; justify-content: center; gap: 6px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(233, 228, 218, .28); }
.tour-dots i.on { background: var(--ivory); }
.tour-next { min-width: 96px; }
.tour-skip:focus-visible, .tour-next:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .tour, .tour.on .tour-ring, .tour.on .tour-panel { transition: none; }
}

/* Champions (kit/table.js, the Table's Scores box): each game played this month, its champion and their wins;
   last month's in one quiet line under it. Append to kit.css after "the table (sign-in)". */
.tb-ch { margin-bottom: 6px; }
.tb-ch > h3:first-child { margin-top: 2px; }
.tb-ch-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tb-ch-l li { display: grid; grid-template-columns: 40px minmax(0, .9fr) minmax(0, 1.1fr) 2.2ch; align-items: center; column-gap: 8px;
  min-height: 34px; font-size: 16.5px; }
.tb-ch-l li:not(:has(.tb-ch-em)) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 2.2ch; }
.tb-ch-em { --h: 24px; --s: calc(var(--h) * .44); --c: calc(var(--h) * .62); height: var(--h); display: flex; align-items: center;
  justify-content: center; gap: 2px; overflow: hidden; font-size: calc(var(--h) * .82); line-height: 1; color: var(--ivory); pointer-events: none; }
.tb-ch-g { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 15px; }
.tb-ch-l b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ivory); font-weight: 700; }
.tb-ch-l b.none { color: var(--dim); font-weight: 400; }
.tb-ch-l i { font-style: normal; text-align: right; color: var(--stone); font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-ch-last { margin-top: 6px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
@media (max-width: 699.98px) {
  .tb-ch-l li { grid-template-columns: 34px minmax(0, .85fr) minmax(0, 1.15fr) 2.2ch; column-gap: 6px; font-size: 15.5px; }
  .tb-ch-l li:not(:has(.tb-ch-em)) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) 2.2ch; }
  .tb-ch-g { font-size: 14px; }
  .tb-ch-em { --h: 22px; }
}

/* ---------- best results (ctx.finish's detail): a game's best five, on its welcome, on Scores, at the Table ----------
   A row: the place, who, what they did in the game's own words, and when. The welcome shows the best one in a quiet
   line under its buttons; a tap opens all five in a sheet. */
.best { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.best li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto auto; align-items: baseline; column-gap: 10px; font-size: calc(16px * var(--tx, 1)); }
.best li i { font-style: normal; color: var(--dim); font-variant-numeric: tabular-nums; text-align: right; }
.best li:first-child i { color: var(--copper-hi); }
.best .b-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ivory); font-weight: 700; }
.best .b-say { color: var(--stone); white-space: nowrap; font-variant-numeric: tabular-nums; }
.best .b-at { color: var(--dim); font-size: .86em; white-space: nowrap; }
.sheet .best { min-width: min(420px, 78vw); margin-bottom: 6px; }
.sheet h2 small { display: block; margin-top: 2px; font: 500 calc(14px * var(--tx, 1))/1.2 'DM Sans', sans-serif; color: var(--dim); }
.tb-say { font-style: normal; color: var(--dim); font-size: .9em; }
.wel-best { display: flex; align-items: baseline; justify-content: center; gap: 10px; max-width: 100%; margin: 10px auto 0; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .14); color: var(--stone); cursor: pointer;
  font: 500 calc(15px * var(--tx, 1))/1.25 'DM Sans', sans-serif; }
.wel-best b { font-weight: 700; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; font-size: .8em; }
.wel-best .b-say { color: var(--ivory); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wel-best .b-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .wel-best:hover { border-color: rgba(233, 228, 218, .42); } }
/* Scores on the home page: a place opens its game's scores in a sheet: its numbers in a row, then Best and Latest
   side by side (stacked on a phone), every slot drawn whether filled or not. */
.sc-sheet { min-width: 0; width: min(100%, 960px); text-align: left; max-height: calc(100dvh - 24px); overflow-y: auto; }
.sc-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.sc-head .emblem { height: 52px; }
.sc-head h2 { text-align: left; }
.sc-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.sc-stat { min-width: 96px; padding: 10px 14px 9px; border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line);
  display: grid; justify-items: center; gap: 3px; }
.sc-stat b { font: 700 calc(30px * var(--tx, 1))/1 'Playfair Display', Georgia, serif; color: var(--ivory); font-variant-numeric: tabular-nums; }
.sc-stat span { max-width: 13em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--tx, 1)); color: var(--stone); }
.sc-stat.dim b, .sc-stat.dim span { color: var(--dim); }
.sc-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px clamp(18px, 3vw, 32px); }
.sc-sheet h3 { margin: 0 0 8px; font: 700 calc(13px * var(--tx, 1))/1 'DM Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.sc-sheet .best { min-width: 0; gap: 0; margin: 0; }
.sc-sheet .best li { font-size: calc(16px * var(--tx, 1)); border-top: 1px solid var(--line); align-items: center; }
.sc-sheet .best li:first-child { border-top: 0; }
.sc-sheet .best .b-say { color: var(--ivory); font-weight: 700; }
.sc-sheet .best .b-who { color: var(--stone); font-weight: 500; }
.sc-sheet .best li.open .b-who, .sc-sheet .best li.open > i { color: var(--dim); opacity: .6; }
.sc-last li > i { display: none; }
.sc-last li { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 640px) {
  .sc-lists { grid-template-columns: minmax(0, 1fr); }
  .sc-stat { min-width: 78px; padding: 8px 10px 7px; }
  .sc-stat b { font-size: calc(24px * var(--tx, 1)); }
}
/* Each row on two lines: what was done on top, who and when under it. */
.sc-sheet .best li { grid-template-columns: 1.3em minmax(0, 1fr) auto; grid-template-areas: "n say say" "n who at"; row-gap: 1px; padding: 5px 0; min-height: 3.1em; }
.sc-sheet .best li > i { grid-area: n; }
.sc-sheet .best .b-say { grid-area: say; }
.sc-sheet .best .b-who { grid-area: who; }
.sc-sheet .best .b-at { grid-area: at; }
.sc-sheet .best li.open { grid-template-areas: "n who who"; }
.sc-sheet .sc-last li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "say say" "who at"; }
.sc-sheet .sc-last li.open { grid-template-areas: "who who"; }
/* A column wide enough (a computer, an iPad across) puts each row back on one line: place, who, what, when. */
.sc-lists section { container-type: inline-size; min-width: 0; }
@container (min-width: 390px) {
  .sc-sheet .best li, .sc-sheet .sc-lists .best li.open { grid-template-columns: 1.3em minmax(0, 1fr) auto auto; grid-template-areas: "n who say at"; min-height: 2.4em; padding: 4px 0; }
  .sc-sheet .sc-last li, .sc-sheet .sc-last li.open { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "who say at"; }
}

/* ----- Scores on the home page: each place shows its game's best; a game not played steps back ----- */
.menu.tally .g-best { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; line-height: 1.2; }
.menu.tally .g-best b { color: var(--ivory); font-weight: 700; font-size: 1.08em; font-variant-numeric: tabular-nums; }
.menu.tally .g-best i { font-style: normal; }
.menu.tally .game.none { opacity: .42; }
.menu.tally .game.none:hover { transform: none; }
.menu.tally a.game.none, .menu.tally .game.none .g-open { pointer-events: none; }

/* Five across (a computer, an iPad): Chess and Checkers move to the left of the second row, so the felt places stack
   over each other at the right and the navy ones at the left. Three across (a phone) keeps the list's own order. */
@media (min-width: 561px) {
  .games > .game { order: 2; }
  .games > .game:nth-child(-n+5) { order: 0; }
  .games > [data-id="chess"], .games > [data-id="checkers"] { order: 1; }
}
.veil.still, .veil.still .sheet { animation: none; }     /* the Table's record replacing this device's: no second entrance */
.sc-sheet .best li.open { min-height: 2.2em; padding: 2px 0; }
.sc-sheet { --pad: clamp(20px, 4vw, 32px); }
.sc-sheet .act { position: sticky; bottom: calc(-1 * var(--pad)); margin: 2px 0 calc(-1 * var(--pad)); padding: 10px 0 var(--pad); background: var(--navy); }
@media (max-width: 480px) {
  .sc-head .emblem { height: 40px; }
  /* A phone sets the counts three to a row; a long label takes two short lines. */
  .sc-stats { gap: 6px; }
  .sc-stat { flex: 0 1 calc((100% - 12px) / 3); min-width: 0; padding: 7px 4px 6px; align-content: start; }
  .sc-stat span { max-width: 100%; white-space: normal; text-align: center; line-height: 1.15; font-size: calc(12px * var(--tx, 1)); }
}

/* ----- Scores on: a red rubber stamp, TOP SCORES, thumped down at an angle beside the name (the clock keeps the right) ----- */
.menu h1 .stamp { position: absolute; left: 1.5%; top: 52%; z-index: 2; pointer-events: none;
  font-family: "Futura", "Avenir Next Condensed", "Arial Narrow", Impact, sans-serif; font-stretch: condensed; font-weight: 800;
  font-size: clamp(20px, 2.5vw, 36px); line-height: 1; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
  color: var(--red); transform: translateY(-50%) rotate(-9deg);
  animation: stamp-in .42s cubic-bezier(.3, 1.5, .5, 1) both; }
.menu h1 .stamp > span { display: block; padding: .34em .62em .28em; border: .17em solid currentColor; border-radius: .32em;
  outline: .07em solid currentColor; outline-offset: .16em;
  background: rgba(200, 65, 59, .07); text-shadow: 0 0 1px rgba(200, 65, 59, .6);
  /* ink that did not quite take: a few worn flecks */
  -webkit-mask-image: radial-gradient(circle at 18% 30%, transparent 0 1.5px, #000 2.5px), radial-gradient(circle at 63% 72%, transparent 0 1.2px, #000 2.2px),
    radial-gradient(circle at 84% 22%, transparent 0 1px, #000 2px), radial-gradient(circle at 40% 85%, transparent 0 1.4px, #000 2.4px),
    linear-gradient(105deg, #000 0 58%, rgba(0, 0, 0, .78) 66%, #000 74%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: radial-gradient(circle at 18% 30%, transparent 0 1.5px, #000 2.5px), radial-gradient(circle at 63% 72%, transparent 0 1.2px, #000 2.2px),
    radial-gradient(circle at 84% 22%, transparent 0 1px, #000 2px), radial-gradient(circle at 40% 85%, transparent 0 1.4px, #000 2.4px),
    linear-gradient(105deg, #000 0 58%, rgba(0, 0, 0, .78) 66%, #000 74%); }
@keyframes stamp-in {
  0% { opacity: 0; transform: translateY(-50%) rotate(-16deg) scale(1.9); }
  60% { opacity: 1; transform: translateY(-50%) rotate(-8deg) scale(.94); }
  100% { opacity: 1; transform: translateY(-50%) rotate(-9deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .menu h1 .stamp { animation: none; } }
/* A phone (no clock): the stamp sits over the title's right end, lower, smaller. */
@media (max-width: 699px), (max-height: 599px) {
  .menu h1 .stamp { left: auto; right: -2px; top: 100%; font-size: 15px; }
}

/* 42's name is two figures: set it large, in the name's own face, so the place has the weight of the others. */
.games > [data-id="forty-two"] .g-name { font-size: calc(clamp(18px, 1.7vw, 23px) * 2.1 * var(--tx, 1)); line-height: 1; letter-spacing: .01em; font-variant-numeric: lining-nums; margin: -15px 0 -4px; position: relative; top: -4px; }
.games > [data-id="forty-two"] .g-tag { margin-bottom: 8px; }     /* the short domino: lifts the block so its line sits level with the row's */
@media (max-width: 560px) { .games > [data-id="forty-two"] .g-name { font-size: calc(15.5px * 2 * var(--tx, 1)); margin: -4px 0 -3px; top: -2px; } }

