/*
 * THE LOBBY SKY (owner 11.11.2026)
 *
 * The earth from orbit behind the three screens a class sees before the game:
 *   #screen-login       entry, Teacher access, licence key, Set up the lesson, Enter Game PIN, name
 *   #screen-host-lobby  the PIN and the waiting room, projected to the class
 *   #screen-waiting     the pupil's "You're in"
 * The content stays on white panels in front of it.
 *
 * WHERE IT MAY SHOW. index.html sets html.tbs-sky only on a page of its own (not in the Teacher
 * Demo's frame, not on a ?preview= step), and every rule here is under html.tbs-sky AND one of the
 * three screen ids. The picture is the background of a layer inside each of those screens, never of
 * html or body, so it cannot show behind the game, the teacher's view, the questions, the end
 * screen or a setup overlay: a screen that is not shown has no layer. The one rule outside the
 * three screens is the page's loading cover (#loading), kept dark so the page does not flash light
 * between the dark start of the boot and the sky.
 *
 * NOTHING MOVES. Every login panel and the pupil's card are centred on one point (owner 12.11.2026
 * night: "move that box to the middle ... remember symmetry"): the middle of the window sideways,
 * the middle of the room under the header (--sky-head) up and down. The header is taken out of the
 * flow, so a taller or shorter panel moves neither the header nor that point. The lobby panel has
 * one size for a given window, whatever the number of pupils: every block in it has a height of its
 * own, the waiting room is a grid of fixed slots, and a line that comes and goes keeps its place.
 *
 * NOTHING LAGS. One still JPEG (1920x1080, images/lobby-sky/SOURCES.md) on a layer that stays put:
 * no video, no canvas, no animation, no transition, no backdrop-filter, no background-attachment,
 * no filter. Nothing here runs per frame or per poll.
 *
 * OLD CHROMEBOOKS (Chrome 90). No :has(), :is() or :where(), no nth-child, no container queries,
 * no nesting, no color-mix, no dvh. A state the sheet needs is a class the game sets (app.js
 * _sfShow: .sf-setup-open; launchCountdown: html.tbs-launch). test/lobby-sky-css.test.js keeps
 * this list.
 */

/* ── The sky: the three screens, and nothing else ─────────────────────────── */
html.tbs-sky #screen-login,
html.tbs-sky #screen-host-lobby,
html.tbs-sky #screen-waiting {
  position: relative;
  /* The dark fallback, on the same elements: text on the sky has its contrast before the picture arrives. */
  background: #01030a !important;
  /* Where the login's header ends, from the top of the window. Every login panel and the pupil's
     card are centred in the room from this line to the bottom of the window; the tallest panel
     (the pupil's name, 548px) fits in it in a 720px window. */
  --sky-head: 76px;
  /* The room above and below the lobby panel, and above and below Set up the lesson. */
  --sky-gap: clamp(12px, 3vh, 36px);
  --sky-setup-gap: clamp(8px, calc(4.4vh - 24px), 32px);
  /* The panels are the light page whatever the mode the page is in. */
  --void: #fafafa;
  --deep: #ffffff;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --gold: #00838f;
  --gold2: #005f69;
  --teal: #00838f;
  --green: #00838f;
  --text: #1a1a2e;
  --muted: #6c757d;
  --muted2: #6c757d;
}
html.tbs-sky #screen-login::before,
html.tbs-sky #screen-host-lobby::before,
html.tbs-sky #screen-waiting::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #01030a;
  pointer-events: none;
}
/* The picture is asked for only when the page's own files are in and the game is running (the
   guard in index.html adds .tbs-sky-img at DOMContentLoaded): on a slow school line it never
   takes room from the game's script, and until it has arrived the layer is the plain dark sky. */
html.tbs-sky.tbs-sky-img #screen-login::before,
html.tbs-sky.tbs-sky-img #screen-host-lobby::before,
html.tbs-sky.tbs-sky-img #screen-waiting::before {
  background: #01030a url("../images/lobby-sky/earth-bg.jpg?v=sky-20261112") center bottom / cover no-repeat;
}
/* The content is drawn after the layer, in the page's own order: no z-index, so the screens'
   own overlays (Set up the lesson, the teacher guide) keep their place among the page's layers. */
html.tbs-sky #screen-login .sf-wrap,
html.tbs-sky #screen-host-lobby .lobby-panel,
html.tbs-sky #screen-waiting .sw-card {
  position: relative;
}
/* The start countdown fades out over the screen under it just before the game opens: for as long
   as it runs that screen is the light page, so no dark sky shows through the fade. */
html.tbs-sky.tbs-launch #screen-login,
html.tbs-sky.tbs-launch #screen-host-lobby,
html.tbs-sky.tbs-launch #screen-waiting {
  background: #fafafa !important;
}
html.tbs-sky.tbs-launch #screen-login::before,
html.tbs-sky.tbs-launch #screen-host-lobby::before,
html.tbs-sky.tbs-launch #screen-waiting::before {
  display: none;
}

/* The lesson's own type from the first frame. A lesson's theme reaches the page a moment after
   the lobby opens, and three seconds after a pupil's card does (body.motor-theme: styles.css sets
   every font to Inter then). Without this the PIN, the headings and the card change font and
   width in front of the class. The same declaration as the theme's, so its arrival changes
   nothing here. */
html.tbs-sky #screen-host-lobby,
html.tbs-sky #screen-host-lobby *,
html.tbs-sky #screen-waiting,
html.tbs-sky #screen-waiting * {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif !important;
}
html.tbs-sky #screen-host-lobby,
html.tbs-sky #screen-waiting {
  font-variant-numeric: tabular-nums;
}

/* ── The loading cover: dark from the first paint to the login ────────────── */
html.tbs-sky #loading { background: #01030a; }
html.tbs-sky #loading .load-title { color: #eef3f9; }
html.tbs-sky #loading .load-bld { background: #131a2e; border-color: #243060; }
html.tbs-sky #loading .load-bar { background: #1a2340; }
html.tbs-sky #loading .load-progress { background: #2aa9b3; }
html.tbs-sky #loading .load-checking span { color: #8fecdd; }
html.tbs-sky #loading .load-spinner { border-color: #1a2340; border-top-color: #8fecdd; }

/* ══ LOGIN ═════════════════════════════════════════════════════════════════ */
/* The header leaves the flow and every panel is centred on one point: a panel of another height
   moves neither the header nor the next panel's middle. */
html.tbs-sky #screen-login .login-header {
  position: absolute;
  top: 0;
  left: 0;
}
/* The screen's own padding is 24px above and below, so the room the panels are centred in runs
   from 24px under the header to 24px above the bottom of the window: its middle is the middle of
   the room under the header. The panel's own auto margins centre it there; a panel taller than
   the room starts at the top of it and the page scrolls (auto margins never go below nothing). */
html.tbs-sky #screen-login .login-main {
  justify-content: flex-start;
  overflow: visible;
  padding-top: var(--sky-head);
}
html.tbs-sky #screen-login .login-main > div {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: auto;
}
html.tbs-sky #screen-login.active { padding-bottom: 24px; }
/* A phone: the header's badges go under the brand, so the header ends lower. */
@media (max-width: 640px) {
  html.tbs-sky #screen-login,
  html.tbs-sky #screen-waiting { --sky-head: 116px; }
}

/* Words that sit straight on the sky. */
html.tbs-sky #screen-login .login-wordmark__text,
html.tbs-sky #screen-login .login-hero__title { color: #eef3f9; }
html.tbs-sky #screen-login .login-header__tagline,
html.tbs-sky #screen-login .login-hero__sub { color: #d5deea; }
html.tbs-sky #screen-login .login-hero__eyebrow { color: #8fecdd; }
html.tbs-sky #screen-login .login-wordmark__dot { background: #8fecdd; }
html.tbs-sky #screen-login .login-pill {
  color: #d5deea;
  background: #10141f;
  border-color: #33415a;
}
html.tbs-sky #screen-login .login-pill--live { color: #8fecdd; border-color: #2f7f80; }
html.tbs-sky #screen-login .login-pill__dot { background: #8fecdd; box-shadow: none; }
/* The lines under the entry cards can lie over the earth's bright edge: each sits on a dark label
   of its own, so it reads on any part of the picture. */
html.tbs-sky #screen-login .login-footer { border-top-color: rgba(160, 200, 235, 0.18); }
html.tbs-sky #screen-login .login-footer__line,
html.tbs-sky #screen-login .sf-cafe-fallback {
  display: table;
  margin-left: auto;
  margin-right: auto;
  padding: 3px 12px;
  border-radius: 12px;
  background: rgba(1, 3, 10, 0.9);
  color: #e3eaf3;
}
html.tbs-sky #screen-login #sf-teacher-err {
  background: #2a0d12 !important;
  border-color: #7d3038 !important;
  color: #ffa3a3 !important;
}

/* The TBS Education logo in place of the green tile, on this screen only. */
html.tbs-sky #screen-login .login-header__icon {
  width: 62px;
  height: 48px;
  background: none;
}
html.tbs-sky.tbs-sky-img #screen-login .login-header__icon {
  background: url("../images/tbs-logo.png?v=logo-20261113") center / contain no-repeat;
}
html.tbs-sky #screen-login .login-header__icon .login-brand-chart { display: none; }

/* The panels are the light page (see the palette above), so the main button's words are white on
   teal whatever the mode. */
html.tbs-sky #screen-login .sf-btn-gold { color: #ffffff; }

/* The white panels. */
html.tbs-sky #screen-login .sf-tile,
html.tbs-sky #screen-login .sf-card { box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.8); }
html.tbs-sky #screen-login .sf-tile--highlight {
  box-shadow: 0 0 0 1px rgba(0, 131, 143, 0.14) inset, 0 34px 70px -34px rgba(0, 0, 0, 0.8);
}

/* An error line keeps its one-line slot. A longer message runs on into the empty room above the
   button under it, so the button stays where it is. */
html.tbs-sky #screen-login .sf-card .sf-err {
  height: 18px;
  min-height: 0;
  line-height: 15px;
  overflow: visible;
}
/* On the name panel words follow the error line, so there it has two lines of its own, and the
   badge above gives the room back: the panel is as tall as before. */
html.tbs-sky #screen-login #sf-ps2 #js-name-err { height: 31px; }
html.tbs-sky #screen-login #sf-ps2 .sf-pin-badge { margin-bottom: 11px; }

/* ── Set up the lesson: one white sheet that follows its content ──────────── */
/* A full page of its own: the header rests (it keeps its box, so it has not moved when the
   teacher goes back), so the sheet is centred in the whole window; when the form is taller than
   the window the sheet starts at the top and the page scrolls. The login's own frame (.sf-wrap,
   the screen's padding) is left as it is; the sheet is wider than that frame and is centred over
   it. The frame itself keeps its box (the browser would count a move of it as a layout shift):
   the sheet is centred in it, and a frame never shorter than its content has nothing to cut. */
html.tbs-sky #screen-login.sf-setup-open .login-header { visibility: hidden; }
html.tbs-sky #screen-login.sf-setup-open .login-main {
  padding-top: 0;
  justify-content: center;
}
html.tbs-sky #screen-login #sf-pt-session-settings.sf-setup {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: min(1290px, calc(100vw - 48px));
  max-width: none;
  /* One size in the usual states: the window's height less the room around it, or what the form
     needs when that is more. */
  min-height: min(calc(100vh - 2 * var(--sky-setup-gap)), 800px);
  /* The same room above and below the sheet at the least (the screen's own padding is 24px above
     and below). */
  margin: calc(var(--sky-setup-gap) - 24px) 0;
  /* The form keeps the width it has without the sky (1180px in a wide window), so its two columns
     and every row in them are laid out as before. */
  padding: 20px max(24px, calc((min(1290px, 100vw - 48px) - 1180px) / 2));
  overflow: visible;
  align-content: start;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}
/* A laptop's height (768 and less): the sheet takes the room the page had to itself without the
   sky, so the form's rows are set a little tighter, as styles.css sets them at 1280x720. Then
   "Return to your lesson" (it arrives a moment after the page, under Create) has its place inside
   the sheet at 1366x768, 1280x720 and 1024x768, and the sheet does not grow when it comes. */
@media (max-height: 800px) {
  html.tbs-sky #screen-login #sf-pt-session-settings.sf-setup { padding-top: 12px; padding-bottom: 12px; }
  html.tbs-sky #screen-login .sf-setup .sf-setup__main,
  html.tbs-sky #screen-login .sf-setup .sf-session-settings-pair { gap: 18px; }
  html.tbs-sky #screen-login .sf-setup .sf-setup__step > .sf-label:not(.sf-visually-hidden) { margin-bottom: 8px; }
  html.tbs-sky #screen-login .sf-setup .sf-name-input { min-height: 58px; }
  html.tbs-sky #screen-login .sf-setup .sf-pick { min-height: 62px; }
  html.tbs-sky #screen-login .sf-setup #sf-session-settings-confirm-btn,
  html.tbs-sky #screen-login .sf-setup #sf-return-lesson-btn { min-height: 60px; }
  html.tbs-sky #screen-login .sf-setup #sf-return-lesson-btn { margin-top: -8px; }
  html.tbs-sky #screen-login .sf-setup .sf-setup__side { padding: 18px; gap: 12px; }
}
/* A narrow window (one column): the sheet runs from edge to edge (the screen's padding is 20px a
   side), so the form is exactly as wide as it is without the sky and every button still shows
   its words whole. */
@media (max-width: 900px) {
  html.tbs-sky #screen-login #sf-pt-session-settings.sf-setup { width: calc(100% + 40px); padding: 20px 16px; border-radius: 0; }
}
/* The form's own error line ("Choose the qualification for this class.") takes no room of its
   own: it is written in the gap the form already has above Create (22px, 18px on a short window:
   styles.css .sf-setup__main), so Create stays where it is. */
html.tbs-sky #screen-login #sf-pt-session-settings.sf-setup #sf-session-settings-err {
  display: block;
  height: 0;
  margin: -22px 0 0;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  overflow: visible;
}
@media (max-height: 800px) {
  html.tbs-sky #screen-login #sf-pt-session-settings.sf-setup #sf-session-settings-err { margin-top: -18px; line-height: 17px; }
}

/* ══ TEACHER LOBBY ═════════════════════════════════════════════════════════ */
/* One white panel of one size for a given window. Its measures follow the window (vw, vh), never
   what is in it: 0 pupils or 40, every box below is where it was. */
html.tbs-sky #screen-host-lobby {
  box-sizing: border-box;
  align-items: center !important;
  justify-content: flex-start;
  padding: var(--sky-gap) 0;
  --lob-w: min(1180px, calc(100vw - 48px));
  --lob-pad: clamp(20px, 3.4vw, 48px);
  --lob-cols: 7;
  --lob-rows: 6;
  --lob-row: clamp(30px, 5vh, 46px);
  --lob-row-gap: clamp(5px, 0.9vh, 8px);
  --lob-name: clamp(13px, 2.05vh, 19px);
  --lob-pin: clamp(3.2rem, 4.6vw, 5.5rem);
  --lob-line: clamp(24px, 3.8vh, 34px);
}
/* A wide window (1280 and up): five wide slots in eight rows, so a first name and a surname
   ("Mohammed Rahman", "Isabella Fitzgerald") show in full. The region keeps the height of six rows
   of the old seven-slot grid, so the panel, the PIN and Start are where they were; the rows are
   cut from that same height. */
@media (min-width: 1200px) {
  html.tbs-sky #screen-host-lobby {
    --lob-cols: 5;
    --lob-rows: 8;
    --lob-row-gap: 4px;
    --lob-row: calc((6 * clamp(30px, 5vh, 46px) + 5 * clamp(5px, 0.9vh, 8px) - 7 * 4px) / 8);
    --lob-name: clamp(14px, 1.9vh, 16px);
  }
}
/* A wide room (a projector at 1920): the panel takes more of it. */
@media (min-width: 1600px) {
  html.tbs-sky #screen-host-lobby { --lob-w: min(1320px, 68vw); }
}
/* Narrower windows: fewer, wider slots in more rows; 40 names still have a slot each. */
@media (max-width: 1199px) {
  html.tbs-sky #screen-host-lobby { --lob-cols: 6; --lob-rows: 7; }
}
@media (max-width: 899px) {
  html.tbs-sky #screen-host-lobby { --lob-cols: 4; --lob-rows: 10; }
}
@media (max-width: 599px) {
  html.tbs-sky #screen-host-lobby { --lob-cols: 2; --lob-rows: 20; --lob-pad: 14px; }
}
html.tbs-sky #screen-host-lobby .lobby-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: var(--lob-w);
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}

/* The PIN, as large as the room allows and never smaller than before the sky. */
html.tbs-sky #screen-host-lobby .lobby-pin-bar {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: calc(var(--lob-pin) + 21px + 2 * clamp(12px, 2.2vh, 22px));
  padding: 0 40px !important;
  flex-wrap: nowrap !important;
  background: #d9ebeb !important;
  border-bottom: 2px solid #8fc5c9 !important;
}
html.tbs-sky #screen-host-lobby .lobby-pin__label {
  height: 13px;
  margin-bottom: 6px !important;
  font-size: 11px !important;
  line-height: 13px;
  color: #45555c !important;
}
/* The logo and the name in the bar's free left side (owner 12.11.2026), as Logout sits in its
   right side: out of the flow, so the PIN and everything under it are where they were. A narrow
   window has no room beside the PIN, and there it is not shown. */
html.tbs-sky #screen-host-lobby .lobby-brand {
  display: flex !important;
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 12px;
  text-align: left;
}
html.tbs-sky #screen-host-lobby .lobby-brand__mark {
  flex: 0 0 auto;
  width: 66px;
  height: 52px;
}
html.tbs-sky.tbs-sky-img #screen-host-lobby .lobby-brand__mark {
  background: url("../images/tbs-logo.png?v=logo-20261113") center / contain no-repeat;
}
html.tbs-sky #screen-host-lobby .lobby-brand__words { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
html.tbs-sky #screen-host-lobby .lobby-brand__name { font-size: 18px; line-height: 22px; font-weight: 800; color: #1a1a2e; }
html.tbs-sky #screen-host-lobby .lobby-brand__site { font-size: 13px; line-height: 16px; color: #45555c; }
@media (max-width: 999px) {
  html.tbs-sky #screen-host-lobby .lobby-brand { display: none !important; }
}
html.tbs-sky #screen-host-lobby .lobby-pin-logout .teacher-bar-back {
  color: #2f4248;
  border-color: #8fb3b7;
}
html.tbs-sky #screen-host-lobby #game-pin-display {
  font-size: var(--lob-pin) !important;
  line-height: 1 !important;
  white-space: nowrap;
}

/* The waiting room: a heading, the region of fixed slots, one line under it. */
html.tbs-sky #screen-host-lobby .lobby-room {
  flex: 0 0 auto !important;
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(12px, 2.2vh, 24px) var(--lob-pad) 0 !important;
}
html.tbs-sky #screen-host-lobby .lobby-room__head {
  align-items: center !important;
  height: 26px;
  margin-bottom: clamp(8px, 1.3vh, 14px) !important;
  white-space: nowrap;
}
html.tbs-sky #screen-host-lobby .lobby-room__head h2 {
  font-size: clamp(0.9rem, 2.2vh, 1.25rem) !important;
  line-height: 26px;
}
html.tbs-sky #screen-host-lobby .lobby-room__count {
  font-size: 13px !important;
  line-height: 26px;
}
/* The number has room for two figures from the start, so "students joined" beside it does not
   step to the right when the tenth pupil joins. */
html.tbs-sky #screen-host-lobby #lobby-player-count {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
}
/* The region: a quiet box of its own, the same size with no pupils and with forty. */
html.tbs-sky #screen-host-lobby .lobby-roster {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  /* the slots, 10px above them, the hint's 32px and the two hairlines */
  height: calc(var(--lob-rows) * var(--lob-row) + (var(--lob-rows) - 1) * var(--lob-row-gap) + 44px);
  padding: 10px 12px 0;
  overflow: hidden;
  background: #f4f6f9;
  border: 1px solid #e1e6ed;
  border-radius: 12px;
}
html.tbs-sky #screen-host-lobby #lobby-list {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: repeat(var(--lob-cols), minmax(0, 1fr));
  grid-auto-rows: var(--lob-row);
  gap: var(--lob-row-gap) 8px !important;
  align-content: start !important;
  height: calc(var(--lob-rows) * var(--lob-row) + (var(--lob-rows) - 1) * var(--lob-row-gap));
  min-height: 0 !important;
  /* The server takes 40 pupils and no more; a list longer than the slots would scroll here,
     inside the region, and the panel would stay as it is. */
  overflow-x: hidden;
  overflow-y: auto;
}
/* One name, one slot: a long name is cut with an ellipsis and moves nothing. */
html.tbs-sky #screen-host-lobby #lobby-list > div {
  box-sizing: border-box;
  min-width: 0;
  height: var(--lob-row);
  padding: 0 6px 0 12px !important;
  gap: 6px !important;
  font-size: var(--lob-name) !important;
  line-height: 1.2;
}
html.tbs-sky #screen-host-lobby #lobby-list > div > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Waiting for students to join…", the empty region's own line. */
html.tbs-sky #screen-host-lobby #lobby-list > span {
  grid-column: 1 / -1;
  align-self: center;
  padding-left: 2px;
  font-size: var(--lob-name) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #5b6673 !important;
}
html.tbs-sky #screen-host-lobby .lobby-roster__hint {
  flex: 0 0 auto;
  height: 32px;
  margin: 0 !important;
  padding-left: 2px;
  font-size: 13px !important;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #5b6673 !important;
}
html.tbs-sky #screen-host-lobby .lobby-device-note {
  height: var(--lob-line);
  margin: 0;
  font-size: clamp(12px, 1.9vh, 15px);
  line-height: var(--lob-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The long game's later lessons draw their firms in the region in place of the list
   (long-game.js sets .lg-host-room): the board scrolls inside the region. */
html.tbs-sky #screen-host-lobby .lobby-roster.lg-host-room { overflow-y: auto; }
html.tbs-sky #screen-host-lobby .lobby-roster.lg-host-room #lobby-list { display: none !important; }

/* Start: the line that says what the class will get, the button, the line under it. Each keeps
   its box whether it has words or not. */
html.tbs-sky #screen-host-lobby .lobby-start {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 var(--lob-pad) clamp(34px, 5vh, 46px) !important;
}
html.tbs-sky #screen-host-lobby #lobby-class-mode {
  display: block !important;
  height: var(--lob-line);
  margin: 0 !important;
  font-size: clamp(14px, 2.1vh, 18px) !important;
  line-height: var(--lob-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.tbs-sky #screen-host-lobby .lobby-start-btn {
  box-sizing: border-box;
  height: clamp(58px, 8.2vh, 76px);
  padding: 0 19px !important;
  font-size: clamp(1rem, 2.3vh, 1.3rem) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.tbs-sky #screen-host-lobby .lobby-start__note,
html.tbs-sky #screen-host-lobby #lobby-class-mode-notice {
  position: absolute;
  left: var(--lob-pad);
  right: var(--lob-pad);
  bottom: clamp(7px, 1.4vh, 13px);
  height: 20px;
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The game hides this line with display: none for a small class; here it keeps its box and only
   its words rest. */
html.tbs-sky #screen-host-lobby .lobby-start__note { display: block !important; }
html.tbs-sky #screen-host-lobby .lobby-start__note[style*="display: none"] { visibility: hidden; }
/* The server's answer to a Start it refused takes that line's place, over it. */
html.tbs-sky #screen-host-lobby #lobby-class-mode-notice { z-index: 1; background: #ffffff; }

/* ══ PUPIL WAITING ═════════════════════════════════════════════════════════ */
/* Centred on the same point as the name panel the pupil has just left (the room under the login's
   header, less 24px above and below, as on the login); one card of one size. */
html.tbs-sky #screen-waiting {
  box-sizing: border-box;
  justify-content: flex-start !important;
  padding: calc(var(--sky-head) + 24px) 16px 24px;
}
html.tbs-sky #screen-waiting .sw-card {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: auto;
  box-sizing: border-box;
  width: 440px;
  max-width: 100% !important;
  height: 540px;
  padding: 22px 28px 28px !important;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
}
/* The logo and the name first on the card, so a pupil remembers whose game this is (owner
   12.11.2026); the address is one quiet line at its foot. The card is the size it was: the
   spinner and the room between the rows give the logo its place. */
html.tbs-sky #screen-waiting .sw-brand {
  margin-bottom: 16px !important;
  gap: 12px !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  color: #1a1a2e !important;
  white-space: nowrap;
}
html.tbs-sky #screen-waiting .sw-brand::before {
  content: "";
  flex: 0 0 auto;
  width: 71px;
  height: 56px;
}
html.tbs-sky.tbs-sky-img #screen-waiting .sw-brand::before {
  background: url("../images/tbs-logo.png?v=logo-20261113") center / contain no-repeat;
}
html.tbs-sky #screen-waiting .sw-brand__dot { display: none !important; }
html.tbs-sky #screen-waiting .sw-spinner { width: 36px !important; height: 36px !important; margin-bottom: 14px !important; }
html.tbs-sky #screen-waiting .sw-title { margin-bottom: 8px !important; }
html.tbs-sky #screen-waiting .sw-text { margin-bottom: 16px !important; }
html.tbs-sky #screen-waiting .sw-site {
  display: block !important;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  font-size: 13px;
  line-height: 16px;
  color: #5f6b78;
  letter-spacing: 0.02em;
}
html.tbs-sky #screen-waiting .sw-seat {
  box-sizing: border-box;
  height: 132px;
  overflow: hidden;
}
/* The pupil's own name on one line: a long one is cut with an ellipsis. */
html.tbs-sky #screen-waiting #sw-player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.tbs-sky #screen-waiting .sw-back {
  position: absolute;
  left: 50%;
  bottom: 40px;
  margin: 0 0 0 -60px !important;
  width: 120px;
}
