/* Fictionary's table: the score strip, the desk and its catalog cards, the
   dock, on the room's structure (games/room/room.css), from the tokens in
   fictionary.css.

   Steadiness first: the bar, the strip and the dock are fixed in size; the
   desk between them takes the rest and scrolls inside itself when a dozen
   cards need it, so the page never scrolls and nothing you're about to tap
   moves. Everything that comes and goes in a reveal (arrows, points, the
   stamp) is drawn over what's there. */

/* ── the frame ───────────────────────────────────────────────────────── */
.felt.fict { position: relative; height: calc(100dvh - 2 * var(--frame)); min-height: 0; gap: 8px; overflow: hidden; }
.fict .bar .tools .stop.unseen { visibility: hidden; }
.fict .dock > .watchbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-note); }
.fict .menu { display: flex; flex-direction: column; gap: var(--s2); }

/* ── the score strip ─────────────────────────────────────────────────── */
.fict .ledger {
  flex: none; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 240px)); justify-content: center;
}
.fict .lcell {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "mark score";
  align-items: center; column-gap: 6px; min-height: 44px; padding: 4px 8px 4px 6px; border-radius: 12px;
  background: var(--chip); border: 1.5px solid transparent; cursor: default; min-width: 0;
  transition: border-color var(--m-quick), background-color var(--m-quick);
}
.fict .ledger.named .lcell { grid-template-areas: "mark score" "name name"; row-gap: 0; padding-bottom: 3px; }
.fict .lmark { grid-area: mark; width: 26px; height: 26px; }
.fict .lmark > .seatmark { display: block; width: 100%; height: 100%; }
.fict .lscore { grid-area: score; justify-self: end; font: 800 20px/1 var(--ui-font); font-variant-numeric: tabular-nums; }
.fict .lname { grid-area: name; display: none; min-width: 0; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft); }
.fict .ledger.named .lname { display: block; }
/* where each player is, in one reserved spot: ★ the Judge, ✓ in, ⋯ still going (the midline dots, so they sit in the middle of the spot) */
.fict .lstat {
  position: absolute; top: -5px; left: 22px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font: 800 12px/1 var(--ui-font); background: var(--sheet); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.fict .lstat:empty { visibility: hidden; }
.fict .lcell[data-stat="in"] .lstat { background: var(--good); color: var(--room); border-color: transparent; }
.fict .lcell[data-stat="judge"] .lstat { background: var(--gold); color: var(--room); border-color: transparent; }
.fict .lcell.judge { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--chip)); }
.fict .lcell.won { border-color: var(--turn); background: color-mix(in srgb, var(--turn) 16%, var(--chip)); }
.fict .lcell[data-away] .lmark { opacity: .5; }
.fict .lcell:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fict .lpop {
  position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap;
  padding: 3px 8px; border-radius: 99px; background: var(--sheet); color: var(--ink); border: var(--chip-edge); font-size: 13px; pointer-events: none;
}

/* ── the desk ────────────────────────────────────────────────────────── */
.fict .stagewrap {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  margin-inline: -4px; padding-inline: 4px; scroll-padding: 12px;
}
.fict .stagewrap:focus { outline: none; }
.fict .stage { max-width: 720px; margin: 0 auto; padding: 6px 0 18px; display: flex; flex-direction: column; gap: 12px; }
.fict .stage:has(.cards.many) { max-width: 980px; }
.fict .deskhead { margin: 0; color: var(--soft); font-size: var(--t-note); line-height: var(--lh-note); max-width: 46em; }
.fict .deskhead b { color: var(--ink); }
.fict .cards { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) and (min-height: 600px) {
  .fict .cards.many { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
}

/* ── a catalog card: cream stock, a red rule, pale blue lines, a hole
      punched at the foot; every definition typed on one typewriter ──── */
.ccard {
  --lh: 25px; --top: 34px;
  /* (a column from the top: a card that's a button doesn't center what it holds) */
  position: relative; display: flex; flex-direction: column; justify-content: flex-start; width: 100%; min-width: 0; box-sizing: border-box; margin: 0;
  padding: var(--top) 16px 28px; text-align: left; font: inherit; color: var(--cat-ink);
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), var(--cat-line) calc(var(--lh) - 1px) var(--lh)) 0 calc(var(--top) + 3px) / 100% calc(100% - var(--top) - 22px) no-repeat,
    linear-gradient(170deg, var(--cat-paper), var(--cat-paper-lo));
  border: 1px solid var(--cat-edge); border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 18px rgba(0, 0, 0, .32);
}
.ccard::before { content: ''; position: absolute; left: 12px; right: 12px; top: 27px; height: 1.5px; background: var(--cat-rule); }
.ccard::after {
  content: ''; position: absolute; left: 50%; bottom: 8px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: var(--leather-lo); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.ccard .cno { position: absolute; top: 6px; left: 14px; font: 700 14px/18px var(--type); color: var(--cat-soft); letter-spacing: .04em; }
.ccard .typed { display: block; font: 400 17px/var(--lh) var(--type); overflow-wrap: anywhere; }
.ccard .typed.blank { color: var(--cat-soft); font-style: italic; }
.ccard .tag {
  position: absolute; top: 5px; right: 10px; font: 700 11px/1 var(--ui-font); letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 99px; background: var(--cat-ink); color: var(--cat-paper);
}
.ccard .tag.real { background: var(--stamp); color: #fff; }
.ccard .tag.voted { background: var(--turn); color: var(--turn-ink); }
.ccard .tag + .tag { right: auto; left: 54px; }
button.ccard { cursor: pointer; appearance: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform var(--m-quick), box-shadow var(--m-quick); }
@media (hover: hover) { button.ccard:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 22px rgba(0, 0, 0, .38); } }
button.ccard:active { transform: translateY(1px); }
button.ccard:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ccard.picked { outline: 4px solid var(--turn); outline-offset: 2px; }
.ccard.picked:focus-visible { outline-color: var(--turn); box-shadow: 0 0 0 9px color-mix(in srgb, var(--focus) 55%, transparent); }
.ccard.mine { opacity: .78; }
.ccard.voted:not(.picked) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--turn) 70%, transparent), 0 8px 18px rgba(0, 0, 0, .32); }
/* the Judge's five words: the headword over its real definition */
.ccard .whw { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; margin: 0 0 4px; }
.wcard .typed { font-size: 16px; }

/* the word, as a dictionary heads it */
.headcard {
  position: relative; padding: 14px 18px 16px; border-radius: 10px; color: var(--ink);
  background: color-mix(in srgb, black 20%, transparent); border: 1.5px solid color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, black 10%, transparent), inset 0 0 0 5px color-mix(in srgb, var(--gold) 28%, transparent);
}
.hwline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.hw { font: 700 clamp(30px, 7.5vw, 46px)/1.08 var(--headword); letter-spacing: -.005em; overflow-wrap: anywhere; }
.pos { font: italic 400 18px/1.2 var(--headword); color: var(--soft); }
.ccard .hw { font-size: 24px; color: var(--cat-ink); }
.ccard .pos { color: var(--cat-soft); font-size: 16px; }
.headcard.compact { padding: 8px 14px 10px; }
.headcard.compact .hw { font-size: clamp(24px, 5vw, 32px); }
.realdef { margin: 10px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--cat-paper); color: var(--cat-ink); }
.realdef .realtag { display: block; font: 700 12px/1.3 var(--ui-font); letter-spacing: .1em; text-transform: uppercase; color: var(--stamp); margin-bottom: 2px; }
.realdef .typed { font: 400 17px/1.45 var(--type); }

/* waiting for the Judge: the drawer's cards, face down */
.waitcard { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 12px; text-align: center; }
.waitcard p { margin: 0; max-width: 28em; }
.drawer { position: relative; width: 210px; height: 120px; }
.dcard {
  position: absolute; left: 50%; bottom: 0; width: 120px; height: 82px; margin-left: -60px; border-radius: 4px;
  background: linear-gradient(170deg, var(--cat-paper), var(--cat-paper-lo)); border: 1px solid var(--cat-edge);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35); transform-origin: 50% 120%;
  transform: rotate(calc((var(--i) - 2) * 9deg)) translateY(calc(var(--i) * -1px));
}
.dcard::before { content: ''; position: absolute; left: 8px; right: 8px; top: 16px; height: 1.5px; background: var(--cat-rule); }

/* the writing card */
.ccard.writer { --top: 40px; padding-bottom: 30px; }
.writer .wlabel { position: absolute; top: 6px; left: 14px; right: 14px; font: 600 14px/18px var(--ui-font); color: var(--cat-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.writer .wlabel b { color: var(--cat-ink); font-family: var(--headword); }
.typer {
  display: block; width: 100%; min-height: calc(4 * var(--lh)); margin: 0; padding: 0; border: 0; resize: none; background: transparent;
  color: var(--cat-ink); font: 400 18px/var(--lh) var(--type); caret-color: var(--stamp); field-sizing: content; max-height: calc(7 * var(--lh));
}
.typer::placeholder { color: var(--cat-soft); opacity: 1; }
.typer:focus { outline: none; }
.ccard.writer:focus-within { box-shadow: 0 0 0 3px var(--focus), 0 8px 18px rgba(0, 0, 0, .32); }
.wfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; min-height: 20px; font: 600 13px/20px var(--ui-font); color: var(--cat-soft); padding-inline: 2px; }
.wfoot .count { font-variant-numeric: tabular-nums; margin-left: auto; }
.wfoot .count.low { color: var(--stamp); }
.wfoot .sentnote { color: #1f6b2a; }
.wfoot .sentnote.changed { color: var(--stamp); }

/* a word that looks misspelled: asked once, on the card, with a tap to mend it */
.typo { margin: 6px 0 2px; padding: 8px 10px 10px; border-radius: 6px; border: 1.5px solid var(--cat-rule); background: color-mix(in srgb, var(--cat-rule) 9%, var(--cat-paper)); color: var(--cat-ink); font: 600 14px/1.4 var(--ui-font); }
.typo[hidden] { display: none; }
.typo p { margin: 0; }
.typo i { font: italic 700 15px/1.3 var(--type); color: var(--stamp); }
.typofix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.typowas { color: var(--cat-soft); }
.typochip {
  min-height: 36px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--cat-ink); background: var(--cat-paper); color: var(--cat-ink); font: 700 15px/1.2 var(--type);
}
.typochip:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.typochip:active { transform: translateY(1px); }
.typofixit { margin-top: 8px; border-color: var(--cat-soft); color: var(--cat-soft); font: 600 14px/1.2 var(--ui-font); }
@media (pointer: coarse) { .typochip { min-height: 44px; } }

/* saying the word aloud, and how it's said */
.speak {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -8px -4px -8px -4px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--gold); cursor: pointer; align-self: center;
}
.speak svg { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.speak[hidden] { display: none; }
.speak:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.speak:active { transform: translateY(1px); }
@media (hover: hover) { .speak:hover { background: color-mix(in srgb, var(--gold) 20%, transparent); } }
.speak.on { color: var(--turn); }
.speak.on .wave { animation: speak-wave .7s ease-in-out infinite alternate; }
.speak.on .wave + .wave { animation-delay: .15s; }
@keyframes speak-wave { from { opacity: .35; } to { opacity: 1; } }
.dic { font: 400 16px/1.2 var(--headword); letter-spacing: .01em; color: var(--soft); white-space: nowrap; }
button.dic { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; box-sizing: border-box; margin: -12px -6px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; }
/* (the respelling wraps under the word when the line is full: its press runs down from its words and the speaker's up from its, so the two never share a pixel) */
.headcard .hwline { row-gap: 10px; }
.headcard button.dic { margin-block: -2px -22px; }
button.dic:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
@media (hover: hover) { button.dic:hover { color: var(--ink); } }
.ccard .dic { color: var(--cat-soft); font-size: 14px; }
.headcard.compact .dic { font-size: 15px; }
.reader .rword .rline { display: flex; align-items: center; justify-content: center; gap: 4px; }
.reader .rword .speak { width: 52px; height: 52px; margin: 0; }
.reader .rword .speak svg { width: 34px; height: 34px; }
.reader .rword .dic { font-size: 22px; }

/* ── the reveal ──────────────────────────────────────────────────────── */
.rcard { padding-bottom: 30px; }
.rcard .cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; min-height: 26px; position: relative; }
.rcard .pins { display: flex; flex-wrap: wrap; gap: 3px; min-height: 22px; }
.rcard .pin { display: block; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--cat-paper), 0 1px 3px rgba(0, 0, 0, .4); }
.rcard .pin > .seatmark { display: block; width: 100%; height: 100%; }
.byline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: auto; font: 700 14px/1.2 var(--ui-font); color: var(--cat-ink); }
.byline .by { display: inline-flex; align-items: center; gap: 4px; }
.byline .by .seatmark { display: block; width: 18px; height: 18px; }
.byline .gain { font: 800 14px/1 var(--ui-font); padding: 4px 7px; border-radius: 99px; background: var(--cat-ink); color: var(--cat-paper); }
.rcard.flat .byline .gain, .byline .quietgain { background: transparent; color: var(--cat-soft); padding-inline: 0; font-weight: 600; }
.rcard.flat { opacity: .82; }
.rcard.isreal { box-shadow: 0 0 0 3px var(--stamp), 0 8px 18px rgba(0, 0, 0, .32); }
.realby { color: var(--stamp); }
.realby .gain { background: var(--stamp); color: #fff; }
/* the librarian's rubber stamp, askew, over the card's top corner */
.stamp {
  position: absolute; top: -9px; right: 10px; z-index: 2; padding: 3px 9px; border: 3px double var(--stamp); border-radius: 5px;
  font: 700 14px/1.1 var(--type); letter-spacing: .08em; text-transform: uppercase; color: var(--stamp);
  background: color-mix(in srgb, var(--cat-paper) 85%, transparent); transform: rotate(-6deg); pointer-events: none;
}
.judgeline { margin: 0; font-size: var(--t-note); color: var(--soft); text-align: center; min-height: 1.4em; }
.judgeline b { color: var(--ink); }
/* points on their way to someone's place in the strip */
.ptsfly {
  font: 800 16px/1 var(--ui-font); padding: 5px 9px; border-radius: 99px; background: var(--turn); color: var(--turn-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45); white-space: nowrap; z-index: 41;
}
.fx-arrows { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 39; pointer-events: none; overflow: visible; }
.fx-arrows path { fill: none; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .6)); }

/* ── the dock ────────────────────────────────────────────────────────── */
.fict .dock {
  flex: none; display: flex; align-items: center; gap: 8px 14px; padding: 8px 10px; container-type: inline-size;
  border-radius: 14px; background: var(--panel); border: 2px solid transparent; transition: border-color .2s, background-color .2s;
}
/* (the room's seat bar, first in it, has a line of its own) */
.fict .dock.yours { border-color: var(--turn); background: color-mix(in srgb, var(--turn) 9%, var(--panel)); }
.fict .status { flex: 1 1 auto; min-width: 0; }
.fict .sayline { min-height: 2.9em; display: flex; align-items: center; gap: 10px; }
.fict .say { margin: 0; font-size: var(--t-body); line-height: 1.45; min-width: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fict .say b { color: var(--turn); }
.fict .clock { flex: none; }
.fict .actions { flex: none; display: flex; gap: 8px; justify-content: flex-end; min-height: var(--btn-h); }
.fict .act { min-width: 0; padding-inline: 14px; }
.fict .act .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fict .actions .btn.slot.hide { display: none; }
.fict .btn.slot.act.confirm { background: var(--btn2); color: var(--btn2-ink); border: 2.5px solid var(--confirm, var(--bad)); }
@container (max-width: 560px) {
  .fict .dock { flex-direction: column; align-items: stretch; }
  .fict .actions { display: flex; }
  .fict .actions .btn.slot { flex: 1 1 0; padding-inline: 8px; }
}

/* ── the Judge reads them out ────────────────────────────────────────── */
.house-sheet.readaloud { --house-sheet-width: 880px; }
.reader { min-height: min(52vh, 440px); display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 14px; cursor: pointer; user-select: none; }
.reader .rkicker { margin: 0; font: 700 var(--t-kicker)/1.3 var(--ui-font); letter-spacing: var(--kicker-spacing); text-transform: uppercase; color: var(--soft); text-align: center; }
.reader .rword { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.reader .rword .hw { font-size: clamp(40px, 10vw, 76px); }
.reader .rword .pos { font-size: 22px; }
.reader .rdef { --lh: clamp(34px, 6.4vw, 48px); --top: 40px; padding: var(--top) clamp(16px, 4vw, 34px) 34px; }
.reader .rdef .cno { font-size: 20px; top: 8px; }
.reader .rdef::before { top: 34px; }
.reader .rdef .typed { font-size: clamp(22px, 4.6vw, 34px); }

/* ── the scores, and the result sheet ────────────────────────────────── */
.fxsheet { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; text-align: left; align-self: stretch; }
.fxsheet .target { margin: 0; font-size: var(--t-note); }
.standings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.standings li { display: grid; grid-template-columns: 1.6em 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--panel); }
.standings li.won { box-shadow: inset 0 0 0 2px var(--turn); }
.standings .place { color: var(--soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.standings .smark .seatmark { display: block; width: 22px; height: 22px; }
.standings .sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .stotal { font-size: 18px; font-variant-numeric: tabular-nums; }
.fxsheet .rounds h3 { margin: 0 0 var(--s2); }
.wordlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.wordlist li { padding-bottom: var(--s3); border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.wordlist .rwhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.wordlist .rwhead .hw { font-size: 22px; }
.wordlist .rwhead .pos { font-size: 15px; }
.wordlist .rjudge { font-size: var(--t-note); margin-left: auto; }
.wordlist p { margin: 4px 0 0; font-size: var(--t-note); }
.wordlist .typed { font-family: var(--type); }
.house-scrim-result .house-sheet.fx-result { --house-sheet-width: 560px; }
.house-result .house-post:empty { display: none; }
.emblemcard { --top: 32px; width: min(360px, calc(100% - 12px)); margin: 0 auto; transform: rotate(-2deg); text-align: left; }
.emblemcard .cno { font-family: var(--ui-font); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.emblemcard .embby { display: block; margin-top: 6px; font: 600 13px/1.3 var(--ui-font); color: var(--cat-soft); }

/* ── How to play ─────────────────────────────────────────────────────── */
.rulesheet ol, .rulesheet ul { padding-left: 1.2em; }

/* ── phones ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .felt.fict { height: 100dvh; gap: 6px; }
  .felt.fict .bar .tools { display: none; }
  .felt.fict .bar .more { display: inline-flex; min-width: 44px; min-height: 44px; }
  .fict .say { font-size: 14px; }
  .fict .sayline { min-height: calc(2 * 1.45 * 14px); }
  .fict .dock { padding: 6px 8px 8px; gap: 6px; }
  .fict .stage { gap: 10px; }
  .ccard { --lh: 24px; padding-inline: 12px; }
  .ccard .typed { font-size: 16px; }
  .typer { font-size: 17px; }
  .fict .lscore { font-size: 16px; }
  .fict .lmark { width: 22px; height: 22px; }
  .fict .lstat { left: 15px; }
  .fict .lcell { grid-template-columns: 22px minmax(0, 1fr); padding: 3px 5px 3px 3px; column-gap: 3px; }
}
/* a phone upright: a timed table's clock sits over the line it goes with, not beside it (beside it,
   it took what the line needed), and someone watching has Watching and Sit in on a row of their own */
@media (max-width: 640px) and (min-height: 521px) {
  .fict .sayline { flex-direction: column; align-items: stretch; justify-content: center; gap: 3px; }
  .fict .clock { order: -1; }
  .fict .dock:has(> .watchbar) { flex-wrap: wrap; }
  .fict .dock > .status { flex-basis: 100%; }
  .fict .dock > .watchbar { order: 3; flex: 1 1 100%; justify-content: space-between; }
}
/* phones on their side: the strip one line, the dock beside the desk's foot */
@media (max-height: 520px) {
  #app { padding: 0; }
  .felt.fict { height: 100dvh; padding-block: 4px; border: 0; border-radius: 0; gap: 4px; }
  .felt.fict .bar { min-height: 30px; }
  .felt.fict .bar .tools { display: none; }
  .felt.fict .bar .more { display: inline-flex; min-height: 30px; }
  .fict .bar .title { font-size: 14px; }
  .fict .ledger { grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); }
  .fict .lcell { min-height: 32px; padding: 2px 5px; }
  .fict .ledger.named .lcell { grid-template-areas: "mark score"; }
  .fict .ledger .lname { display: none !important; }
  .fict .lmark { width: 20px; height: 20px; }
  .fict .lcell { grid-template-columns: 20px minmax(0, 1fr); }
  .fict .lscore { font-size: 15px; }
  .fict .lstat { width: 16px; height: 16px; left: 13px; top: -5px; }
  .fict .dock { flex-direction: row; align-items: center; padding: 3px 8px 4px; }
  .fict .sayline { min-height: calc(2 * 1.4 * 13px); }
  .fict .say { font-size: 13px; line-height: 1.4; }
  .fict .actions { min-height: 36px; }
  .fict .act { min-height: 36px; font-size: 14px; padding-block: 2px; }
  .headcard, .headcard.compact { padding: 4px 12px 8px; }
  .headcard .hw, .headcard.compact .hw { font-size: 24px; }
  .headcard .pos { font-size: 16px; }
  .headcard .dic { font-size: 14px; }
  .speak { margin-block: -8px; }

  .fict .stage { gap: 8px; padding-top: 2px; }
  .ccard { --top: 28px; --lh: 23px; padding-bottom: 22px; }
  .ccard::before { top: 22px; }
  .ccard .cno { top: 3px; }
  .ccard::after { bottom: 5px; width: 9px; height: 9px; margin-left: -4.5px; }
  .ccard .typed { font-size: 15px; }
  .ccard.writer { --top: 30px; }
  .writer .wlabel { top: 3px; }
  .typer { font-size: 16px; min-height: calc(2 * var(--lh)); }
  .reader { min-height: 0; }
  .reader .rword .hw { font-size: 44px; }
}
@media (pointer: coarse) {
  .felt.fict .bar .btn { min-height: 44px; }
}
@media (pointer: coarse) and (max-height: 520px) {
  .felt.fict .bar .btn { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .speak.on .wave { animation: none; }
  button.ccard, .fict .lcell, .fict .dock { transition: none; }
  button.ccard:hover { transform: none; }
}

/* ── the front door: four table settings, two to a row ───────────────── */
@media (min-width: 900px) {
  .lobby:has(.choices) .choices { grid-template-columns: 3fr 2fr; }
}

/* the pronunciation key */
.pkeysheet .pkey section + section { margin-top: var(--s3); }
.pkeysheet .pkey h3 { margin: 0 0 var(--s2); font: 700 var(--t-kicker)/1.3 var(--ui-font); letter-spacing: var(--kicker-spacing); text-transform: uppercase; color: var(--soft); }
.pkeysheet .pkey dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.pkeysheet .pkey dt { font: 700 20px/1.3 var(--headword); min-width: 2.2em; }
.pkeysheet .pkey dd { margin: 0; font: 400 15px/1.4 var(--ui-font); align-self: center; }
.pkeysheet .pnote { margin: var(--s3) 0 0; font: 400 14px/1.5 var(--ui-font); color: var(--soft); }

/* ── a moment over the desk (the house's banner): your payoff, time, the desk moving on ── */
.fbanner { display: grid; justify-items: center; gap: 6px; text-align: center; }
.fbanner .splashtitle { font: var(--display-weight) clamp(26px, 6vw, 40px)/1.05 var(--display); white-space: normal; max-width: 18ch; text-wrap: balance; }
.fbanner .splashsub { display: block; white-space: normal; font: 600 var(--t-note)/1.3 var(--ui-font); color: var(--soft); }

/* A timed table's clock is read across the room: its seconds a figure, not
   fine print, and the warning color when it's low (ADR 0054). */
.fict .clocktext { min-width: 3.4ch; font-size: var(--t-figure); font-weight: var(--w-figure); line-height: 1; color: var(--ink); }
.fict .clock.low .clocktext { color: var(--bad); }
