/* the online character select (js/online/lobby.js + online/charsel.js), mockup A "campfire circle" (the user's pick
   2026-10-18) and the delete window of mockup E. Sizes in --u = one pixel of the 1536x1024 mockup. */
.cs-root {
  --u: min(calc(100vw / 1536), calc(100vh / 1024));
  position: fixed; inset: 0; z-index: 60; overflow: hidden; background: #081b2b; outline: none;
  font: 400 calc(18 * var(--u)) / 1.4 'Mitr', sans-serif; color: var(--ink); user-select: none;
}
.cs-root[hidden], .cs-root [hidden] { display: none !important; } /* (.kw-btn's inline-flex would beat [hidden]) */
.cs-root button { font-family: 'Mitr', sans-serif; }
.cs-stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.cs-logo { position: absolute; left: calc(56 * var(--u)); top: calc(22 * var(--u)); width: calc(318 * var(--u)); pointer-events: none;
  filter: drop-shadow(0 calc(6 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.45)); }

/* the account chip (top right) */
.cs-acct {
  position: absolute; right: calc(22 * var(--u)); top: calc(26 * var(--u)); display: flex; align-items: center; gap: calc(16 * var(--u));
  padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(10 * var(--u)) calc(20 * var(--u)); background: #10283b;
  border: calc(4 * var(--u)) solid #37637b; border-radius: calc(16 * var(--u)); box-shadow: 0 calc(6 * var(--u)) 0 rgba(0, 0, 0, 0.3);
}
.cs-acct-name { font-size: calc(18 * var(--u)); line-height: 1.3; }
.cs-acct-name b { font-weight: 600; }
.cs-srv { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(15 * var(--u)); font-weight: 500; opacity: 0.85; }
.cs-srv i { width: calc(14 * var(--u)); height: calc(14 * var(--u)); border-radius: 50%; background: #185776; border: calc(3 * var(--u)) solid #37637b; }
.cs-acct-btns { display: flex; gap: calc(8 * var(--u)); }
.cs-acct .kw-btn { height: calc(40 * var(--u)); font-size: calc(16 * var(--u)); padding: 0 calc(14 * var(--u)); }

/* the message line (top centre): under the account chip's row, and never wide enough to reach the hero's card (100vw less
   the card and its margin on both sides, and a gap). At the chip's height its "Sign up or log in before entering the
   game" lay over the chip's text at 1440 px (the local run of 2026-11-19, site/.plan/password-reset-acceptance.md fault 4). */
.cs-msg { position: absolute; left: 50%; top: calc(106 * var(--u)); transform: translateX(-50%);
  max-width: min(calc(620 * var(--u)), calc(100vw - 984 * var(--u))); }
.cs-msg[hidden] { display: none; }
.cs-msg.bad { background: linear-gradient(#081b2b, #081b2b); }
.cs-msg.bad .i { background: linear-gradient(#17364b, #e0525e); }

/* the name plates over the heroes (anchored by their bottom centre) */
.cs-plates { position: absolute; inset: 0; pointer-events: none; }
.cs-plate {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; text-align: center; white-space: nowrap;
  border: calc(4 * var(--u)) solid #37637b; border-radius: calc(5 * var(--u)); overflow: hidden; background: #10283b;
  box-shadow: 0 calc(5 * var(--u)) 0 rgba(0, 0, 0, 0.35); transition: transform 0.15s;
}
.cs-plate:not(.empty) { min-width: calc(150 * var(--u)); }
.cs-plate-n { position: relative; padding: calc(4 * var(--u)) calc(30 * var(--u)) calc(2 * var(--u)); font: 600 calc(24 * var(--u)) / 1.25 'Mitr', sans-serif; }
.cs-plate:not(.empty) .cs-plate-n::before, .cs-plate:not(.empty) .cs-plate-n::after {
  content: ''; position: absolute; top: 50%; width: calc(13 * var(--u)); height: calc(13 * var(--u)); margin-top: calc(-6 * var(--u));
  border-radius: calc(5 * var(--u)); background: linear-gradient(125deg,#26738e,#15465f); border: calc(3 * var(--u)) solid #37637b;
}
.cs-plate-n::before { left: calc(9 * var(--u)); }
.cs-plate-n::after { right: calc(9 * var(--u)); }
.cs-plate-s { padding: calc(3 * var(--u)) calc(16 * var(--u)) calc(5 * var(--u)); background: linear-gradient(#081b2b, #081b2b); color: #e8f7ff;
  font: 500 calc(15 * var(--u)) / 1.3 'Mitr', sans-serif; border-top: calc(3 * var(--u)) solid #37637b; }
.cs-plate:not(.on):not(.empty) { transform: translate(-50%, -100%) scale(0.86); transform-origin: 50% 100%; filter: brightness(0.86); }
.cs-plate.on { box-shadow: 0 0 0 calc(3 * var(--u)) #416e87, 0 calc(5 * var(--u)) 0 rgba(0, 0, 0, 0.35), 0 0 calc(22 * var(--u)) rgba(255, 210, 110, 0.55); }
/* an empty seat (the owner's pick A of the 11-08 UI review's ค4): over its shadow's head, as a hero's plate, the slot's words and its
   button in one; the shadow on the stage is online/charsel.js shade */
.cs-plate.empty { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); border: 0; background: none; box-shadow: none; overflow: visible; transform-origin: 50% 100%; }
.cs-plate.empty:not(.on) { transform: translate(-50%, -100%) scale(0.86); }
.cs-plate.empty.down { transform: translate(-50%, 0); transform-origin: 50% 0; } /* (an upright phone: hung from the shadow's head, lobby.js place) */
.cs-plate.empty.down:not(.on) { transform: translate(-50%, 0) scale(0.86); }
.cs-plate.empty .cs-plate-n {
  padding: calc(3 * var(--u)) calc(18 * var(--u)); font-size: calc(19 * var(--u)); font-weight: 500; color: #e8f7ff; background: linear-gradient(125deg,#26738e,#15465f);
  border: calc(3 * var(--u)) solid #416e87; border-radius: calc(5 * var(--u)); box-shadow: 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, 0.35);
}
.cs-plate.empty .kw-btn { height: calc(54 * var(--u)); padding: 0 calc(24 * var(--u)); font-size: calc(20 * var(--u)); }
.cs-plate.empty.on .cs-plate-n { box-shadow: 0 0 0 calc(3 * var(--u)) rgba(127, 202, 248, 0.45), 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, 0.35); }
.cs-plus { width: 1.15em; height: 1.15em; margin-right: calc(6 * var(--u)); object-fit: contain; flex: none; vertical-align: middle; } /* (the game's plus icon, never a "＋" glyph) */

/* the picked hero's card (right) */
.cs-card { position: absolute; right: calc(22 * var(--u)); top: calc(178 * var(--u)); width: calc(460 * var(--u)); }
.cs-card[hidden] { display: none; }
.cs-card .kw-title { height: calc(52 * var(--u)); font-size: calc(30 * var(--u)); }
.cs-card .kw-title::after {
  content: ''; position: absolute; right: calc(16 * var(--u)); top: 50%; width: calc(16 * var(--u)); height: calc(16 * var(--u));
  margin-top: calc(-8 * var(--u)); border-radius: calc(5 * var(--u)); background: radial-gradient(circle at 35% 35%, #10283b, #23516b); border: calc(3 * var(--u)) solid #37637b;
}
.cs-card-body { padding: calc(14 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u)); display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.cs-card-top { display: flex; gap: calc(16 * var(--u)); align-items: stretch; }
.cs-port { flex: none; width: calc(170 * var(--u)); height: calc(200 * var(--u)); border-radius: calc(14 * var(--u)); border: calc(3 * var(--u)) solid #416e87;
  background: radial-gradient(ellipse at 50% 70%, #10283b, #17364b); display: grid; place-items: center; overflow: hidden; }
.cs-port canvas { width: 100%; height: 100%; }
.cs-facts { display: flex; flex-direction: column; gap: calc(6 * var(--u)); padding-top: calc(4 * var(--u)); min-width: 0; }
.cs-lv { font: 600 calc(22 * var(--u)) / 1.25 'Mitr', sans-serif; }
.cs-sub { font-size: calc(17 * var(--u)); opacity: 0.75; margin-bottom: calc(6 * var(--u)); }
.cs-fact { display: flex; align-items: center; gap: calc(10 * var(--u)); font-size: calc(18 * var(--u)); font-weight: 500; }
.cs-fact img { width: calc(26 * var(--u)); height: calc(26 * var(--u)); object-fit: contain; flex: none; }
.cs-gear { display: grid; grid-template-columns: repeat(6, 1fr); gap: calc(8 * var(--u)); }
.cs-gear[hidden] { display: none; }
.cs-gslot { aspect-ratio: 1; border-radius: calc(12 * var(--u)); border: calc(3 * var(--u)) solid #37637b; background: #17364b;
  box-shadow: inset 0 calc(-3 * var(--u)) 0 rgba(0, 0, 0, 0.12); display: grid; place-items: center; overflow: hidden; }
.cs-gslot canvas { width: 86%; height: 86%; }
.cs-gslot.none { background: #17364b; border-style: dashed; border-color: #3c7d98; box-shadow: none; }
/* the six boxes' names (the 11-08 UI review: an empty box said nothing of what goes there) */
.cs-glabels { display: grid; grid-template-columns: repeat(6, 1fr); gap: calc(8 * var(--u)); margin-top: calc(-6 * var(--u)); text-align: center;
  font: 500 calc(15 * var(--u)) / 1.2 'Mitr', sans-serif; color: #a7c5d9; white-space: nowrap; }
.cs-glabels[hidden] { display: none; }
/* an empty slot's card: its own สร้างตัวละคร under the shadow */
.cs-mkbtn { height: calc(56 * var(--u)); font: 700 calc(22 * var(--u)) / 1 'Mitr', sans-serif; }
.cs-mkbtn[hidden] { display: none; }
.cs-card.empty .cs-port { background: radial-gradient(ellipse at 50% 70%, #10283b, #17364b); }

/* the bar (bottom centre): ลบตัวละคร · เข้าเล่น · ตัวละคร n / 3 */
.cs-bar { position: absolute; left: 50%; bottom: calc(92 * var(--u)); transform: translateX(-50%); display: flex; align-items: center; gap: calc(28 * var(--u)); }
.cs-play { height: calc(86 * var(--u)); min-width: calc(300 * var(--u)); padding: 0 calc(30 * var(--u)); border-width: calc(5 * var(--u));
  border-radius: calc(22 * var(--u)); font: 700 calc(42 * var(--u)) / 1 'Mitr', sans-serif;
  box-shadow: inset 0 calc(-6 * var(--u)) 0 rgba(0, 0, 0, 0.16), 0 calc(6 * var(--u)) 0 rgba(0, 0, 0, 0.35), 0 0 calc(30 * var(--u)) rgba(255, 210, 100, 0.35); }
/* (delete sits in the hero's card, small and quiet, away from Play; the count is a plain line, not a button-like pill: the 11-08 UI review) */
.cs-delbtn { align-self: flex-end; height: calc(36 * var(--u)); padding: 0 calc(12 * var(--u)); border-width: calc(3 * var(--u)); border-color: #416e87; box-shadow: none;
  background: #10283b; color: #c67c88; -webkit-text-stroke: 0; font: 600 calc(16 * var(--u)) / 1 'Mitr', sans-serif; }
.cs-delbtn img { height: calc(20 * var(--u)); width: auto; margin-right: calc(4 * var(--u)); }
.cs-delbtn[hidden] { display: none; }
.cs-count { height: calc(54 * var(--u)); display: flex; align-items: center; padding: 0 calc(8 * var(--u)); white-space: nowrap; color: #e8f7ff;
  font: 600 calc(20 * var(--u)) / 1 'Mitr', sans-serif; -webkit-text-stroke: calc(5 * var(--u)) #061421; paint-order: stroke fill; }
.cs-count:empty { display: none; }
/* the pages of three seats (ร้านเพชร's ช่องตัวละคร +1: up to six slots), the page shown in gold */
.cs-page { display: flex; gap: calc(10 * var(--u)); }
.cs-page[hidden] { display: none; }
.cs-page .kw-btn { height: calc(48 * var(--u)); padding: 0 calc(16 * var(--u)); border-width: calc(3 * var(--u)); font: 600 calc(18 * var(--u)) / 1 'Mitr', sans-serif; }
.cs-hint { position: absolute; left: 50%; bottom: calc(44 * var(--u)); transform: translateX(-50%); white-space: nowrap; color: #e8f7ff;
  font: 500 calc(18 * var(--u)) / 1 'Mitr', sans-serif; -webkit-text-stroke: calc(5 * var(--u)) #061421; paint-order: stroke fill; }
/* the copyright line, bottom right (an upright phone: centred under the account chip) */
.cs-copy { position: absolute; right: calc(22 * var(--u)); bottom: calc(18 * var(--u)); pointer-events: none; white-space: nowrap;
  font: 400 max(10px, calc(14 * var(--u))) / 1 'Mitr', sans-serif; color: rgba(236, 228, 255, 0.75);
  -webkit-text-stroke: 3px #061421; paint-order: stroke fill; }

/* the K windows over it: logging in, deleting */
.cs-modal { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(10, 8, 24, 0.62); }
.cs-modal[hidden] { display: none; }
.cs-form { width: calc(540 * var(--u)); }
.cs-form-body { display: flex; flex-direction: column; gap: calc(12 * var(--u)); padding: calc(18 * var(--u)) calc(22 * var(--u)) calc(20 * var(--u)); }
.cs-form-sub { font-size: calc(17 * var(--u)); opacity: 0.8; }
.cs-form input, .cs-del-in {
  box-sizing: border-box; width: 100%; height: calc(54 * var(--u)); padding: 0 calc(16 * var(--u)); border: calc(4 * var(--u)) solid #37637b;
  border-radius: calc(14 * var(--u)); background: #10283b; color: var(--ink); font: 500 calc(20 * var(--u)) / 1 'Mitr', sans-serif; outline: none;
}
.cs-form input:focus, .cs-del-in:focus { box-shadow: 0 0 0 calc(3 * var(--u)) #416e87; }
.cs-form input[hidden] { display: none; }
.cs-form-btns { display: flex; gap: calc(10 * var(--u)); }
.cs-form-btns .kw-btn { flex: 1; height: calc(50 * var(--u)); font-size: calc(19 * var(--u)); }
/* the new-password box's one way out, a small text link under its button (js/online/lobby.js ใช้บัญชีอื่น). Its text is
   the size of the line under the title; its touch target is at least 24 px high at every width (28.4 units on its own:
   17 x 1.2 of text and 8 of padding), and a negative margin of half the difference gives that height back to the empty
   gap above and the padding below, so the window keeps its size (the real pass of 2026-11-19: 54 x 18 px at 390 wide) */
.cs-np-other { align-self: center; box-sizing: border-box; min-height: 24px; margin-block: min(0px, calc((28.4 * var(--u) - 24px) / 2));
  padding: calc(4 * var(--u)) calc(8 * var(--u)); border: 0; background: none; color: #8ee7f7; cursor: pointer;
  font: 500 calc(17 * var(--u)) / 1.2 'Mitr', sans-serif; text-decoration: underline; text-underline-offset: calc(3 * var(--u)); }
.cs-np-other:focus-visible { outline: calc(3 * var(--u)) solid #416e87; border-radius: calc(8 * var(--u)); }
.cs-np-temp[readonly] { background: #10283b; cursor: default; } /* (filled in from the sign-in: the player types only the new one) */
.cs-err { min-height: calc(20 * var(--u)); color: #de8d95; font-size: calc(16 * var(--u)); font-weight: 500; }
.cs-err:empty { min-height: 0; }
.cs-info { color: #a7c5d9; font-size: calc(16 * var(--u)); font-weight: 500; }
.cs-info:empty { display: none; }
.cs-invite-note { font-size: calc(15 * var(--u)); }
/* the invite box filled in from the link the player came through (js/online/lobby.js keptInvite): read-only, greyed, and
   a cursor that says it cannot be changed */
.cs-form input.cs-invite.cs-locked { background: #10283b; color: #a7c5d9; cursor: not-allowed; }
/* the closed pop-up (lobby.js closedShow: a control that would make a new account, pressed while sign-up is closed or not
   known): the door's K window as wide as the sign-in form, its title on one line clear of the rivet, the server's note or the
   default words in ink on the cream body, one button. The words keep 14 px and the button 40 px at every width */
.cs-closedwin { width: calc(540 * var(--u)); max-width: calc(100vw - 24px); }
.cs-closedwin .kw-title { padding: 0 calc(46 * var(--u)); font-size: calc(28 * var(--u)); white-space: nowrap; }
.cs-closed-body { display: flex; flex-direction: column; gap: calc(18 * var(--u)); padding: calc(22 * var(--u)) calc(26 * var(--u)); }
.cs-closed-say { margin: 0; font-size: max(14px, calc(20 * var(--u))); font-weight: 500; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.cs-closed-ok { align-self: center; min-width: calc(200 * var(--u)); height: max(40px, calc(52 * var(--u))); font-size: max(15px, calc(20 * var(--u))); }
.cs-closed-ok:focus-visible { outline: calc(3 * var(--u)) solid #7fcaf8; outline-offset: calc(3 * var(--u)); }
/* the forgot-password link under the password field (lobby.js form: login only, once nc_account view says resetOn): the
   online pages' link blue (online.css .ol-foot a, 4.49:1 here, just under 4.5) made a step darker so it reads 5.3:1 on the
   cream body */
.cs-forgot { align-self: flex-end; margin-top: calc(-6 * var(--u)); padding: 2px 0; border: 0; background: none; cursor: pointer;
  color: #8ee7f7; font: 500 max(12px, calc(15 * var(--u))) / 1.3 'Mitr', sans-serif; }
.cs-forgot:hover { color: #8ee7f7; text-decoration: underline; text-underline-offset: 0.15em; }
.cs-forgot:focus-visible { outline: 2px solid #3c7d98; outline-offset: 2px; border-radius: 4px; }

.cs-delwin { width: calc(1030 * var(--u)); }
.cs-redtitle { background: linear-gradient(#ff9f73, #e2503f); height: calc(56 * var(--u)); }
.cs-del-body { display: grid; grid-template-columns: calc(390 * var(--u)) 1fr; gap: calc(24 * var(--u)); padding: calc(20 * var(--u)) calc(22 * var(--u)) calc(24 * var(--u)); }
.cs-del-port { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-radius: calc(18 * var(--u));
  border: calc(3 * var(--u)) solid #416e87; background: radial-gradient(ellipse at 50% 72%, #10283b, #17364b); padding-bottom: calc(14 * var(--u)); }
.cs-del-port canvas { width: calc(300 * var(--u)); height: calc(400 * var(--u)); }
.cs-del-cap { font-size: calc(17 * var(--u)); font-weight: 500; text-align: center; padding: 0 calc(10 * var(--u)); }
.cs-del-r { display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.cs-del-q { font: 600 calc(24 * var(--u)) / 1.3 'Mitr', sans-serif; }
.cs-del-q b { color: #de8d95; }
.cs-del-lost { padding: calc(12 * var(--u)) calc(22 * var(--u)) calc(14 * var(--u)); display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.cs-del-h { font-weight: 600; font-size: calc(20 * var(--u)); }
.cs-del-row { display: flex; align-items: center; gap: calc(18 * var(--u)); font-size: calc(19 * var(--u)); padding-left: calc(12 * var(--u)); }
.cs-del-row img { width: calc(44 * var(--u)); height: calc(44 * var(--u)); object-fit: contain; flex: none; }
.cs-del-kept { margin-top: calc(4 * var(--u)); padding-top: calc(10 * var(--u)); border-top: calc(2 * var(--u)) solid #3c7d98; color: #c8e1ee; font-weight: 500; font-size: calc(18 * var(--u)); }
.cs-del-kept.warn { color: #ffb36b; }
.cs-del-l { font-weight: 600; font-size: calc(19 * var(--u)); margin-top: calc(4 * var(--u)); }
.cs-del-field { position: relative; }
.cs-del-field.ok .cs-del-in { border-color: #c63a48; box-shadow: 0 0 0 calc(3 * var(--u)) #416e87; }
.cs-del-ghost { position: absolute; right: calc(18 * var(--u)); top: 50%; transform: translateY(-50%); color: #a7c5d9; font-size: calc(19 * var(--u)); pointer-events: none; }
.cs-del-ghost[hidden] { display: none; }
.cs-del-btns { display: flex; gap: calc(14 * var(--u)); justify-content: flex-end; }
.cs-del-btns .kw-btn { width: calc(250 * var(--u)); height: calc(56 * var(--u)); font-size: calc(21 * var(--u)); }

/* a short landscape screen (a phone on its side): one unit per 1/720 of the height, the hint and logo smaller */
@media (orientation: landscape) and (max-height: 560px) {
  .cs-root { --u: min(calc(100vh / 720), calc(100vw / 1300)); }
  .cs-hint { display: none; }
  .cs-bar { bottom: calc(26 * var(--u)); }
  .cs-card { top: calc(122 * var(--u)); }
  .cs-logo { width: calc(240 * var(--u)); top: calc(12 * var(--u)); }
  .cs-copy-x { display: none; }
}
/* an upright phone: the camp is a band on top (online/charsel.js fits the heroes into it), the card and the bar below */
@media (max-aspect-ratio: 9/10) {
  .cs-root { --u: calc(100vw / 600); }
  .cs-logo { left: 50%; transform: translateX(-50%); width: calc(250 * var(--u)); top: calc(14 * var(--u)); }
  .cs-acct { right: auto; left: 50%; transform: translateX(-50%); top: auto; bottom: calc(30 * var(--u)); padding: calc(6 * var(--u)) calc(10 * var(--u)) calc(6 * var(--u)) calc(14 * var(--u)); }
  .cs-card { right: auto; left: 50%; transform: translateX(-50%); top: auto; bottom: calc(268 * var(--u)); width: calc(560 * var(--u)); }
  .cs-bar { bottom: calc(168 * var(--u)); gap: calc(14 * var(--u)); } /* (card, bar and account chip 20 higher: the copyright line under them) */
  .cs-play { min-width: calc(220 * var(--u)); height: calc(76 * var(--u)); font-size: calc(36 * var(--u)); }
  .cs-delbtn { min-width: 0; padding: 0 calc(14 * var(--u)); }
  .cs-count { padding: 0 calc(16 * var(--u)); }
  .cs-hint, .cs-acct-x { display: none; }
  .cs-copy { right: 50%; transform: translateX(50%); bottom: calc(6 * var(--u)); font-size: 10px; }
  .cs-msg { top: auto; bottom: calc(118 * var(--u)); max-width: calc(620 * var(--u)); } /* (no card beside it here) */
  .cs-delwin { width: calc(580 * var(--u)); }
  .cs-del-body { grid-template-columns: 1fr; }
  .cs-del-port { flex-direction: row; justify-content: center; gap: calc(10 * var(--u)); padding: 0 calc(10 * var(--u)) 0 0; }
  .cs-del-port canvas { width: calc(120 * var(--u)); height: calc(160 * var(--u)); }
  .cs-del-btns .kw-btn { flex: 1; width: auto; }
}
/* the Discord pill (css/discord.css .dc-door) and the language bar (tools/proto/proto_s2_lang.js #nc-langbar) over the
   lobby of an upright screen: the account chip holds the foot of the screen there, so both go to the top corners beside
   the logo, the Discord mark alone as on an upright phone's server page and the two language buttons one above the other
   without the bar's label, as narrow as the corner (the local run of 2026-11-19, site/.plan/password-reset-acceptance.md
   fault 3: at 390 x 844 both lay over the chip's เข้าสู่ระบบ and ออกจากระบบ). Not while the server page is up over the
   lobby: its own corners are taken. */
@media (max-aspect-ratio: 9/10) {
  html.pg-cs:not(.pg-ss) body > .dc-door {
    top: max(8px, env(safe-area-inset-top)); bottom: auto; width: 40px; height: 40px; padding: 0; justify-content: center;
  }
  html.pg-cs:not(.pg-ss) body > .dc-door .dc-mk { width: 26px; height: 26px; }
  html.pg-cs:not(.pg-ss) body > .dc-door > span:not(.dc-mk) { display: none; }
  html.pg-cs:not(.pg-ss) body > #nc-langbar {
    top: max(6px, env(safe-area-inset-top)); bottom: auto; right: 6px; flex-direction: column; align-items: stretch; padding: 5px; border-radius: 18px;
  }
  html.pg-cs:not(.pg-ss) body > #nc-langbar span { display: none; }
  html.pg-cs:not(.pg-ss) body > #nc-langbar button { height: 30px; min-width: 0; padding: 0 10px; font-size: 14px; }
}

/* the key window (a key door, as the server's /nc/load says: lobby.js doorRead, keyScreen): over the empty camp */
.cs-root.keyed .cs-bar, .cs-root.keyed .cs-hint, .cs-root.keyed .cs-card, .cs-root.keyed .cs-plates { display: none; }
.cs-keybox { background: rgba(10, 8, 24, 0.38); }
.cs-keywin { width: calc(640 * var(--u)); }
.cs-key-body { display: flex; flex-direction: column; gap: calc(10 * var(--u)); padding: calc(20 * var(--u)) calc(26 * var(--u)) calc(22 * var(--u)); }
.cs-key-sub { font-size: calc(18 * var(--u)); opacity: 0.8; text-align: center; }
.cs-key-l { font-weight: 600; font-size: calc(19 * var(--u)); margin-top: calc(6 * var(--u)); }
.cs-key-in {
  box-sizing: border-box; width: 100%; height: calc(66 * var(--u)); padding: 0 calc(14 * var(--u)); text-align: center;
  border: calc(4 * var(--u)) solid #37637b; border-radius: calc(16 * var(--u)); background: #10283b; color: var(--ink); outline: none;
  font: 600 calc(28 * var(--u)) / 1 'Baloo 2', 'Mitr', monospace; letter-spacing: 0.08em; text-transform: uppercase;
}
.cs-key-in::placeholder { color: #c8e1ee; letter-spacing: 0.08em; }
.cs-key-in:focus { box-shadow: 0 0 0 calc(3 * var(--u)) #416e87; }
.cs-key-meta { display: flex; justify-content: space-between; gap: calc(12 * var(--u)); font-size: calc(14 * var(--u)); opacity: 0.75; }
.cs-key-n { font-weight: 600; white-space: nowrap; }
.cs-key-n.ok { color: #b0daba; opacity: 1; }
.cs-key-go { height: calc(64 * var(--u)); font-size: calc(26 * var(--u)); margin-top: calc(4 * var(--u)); }
.cs-key-foot { font-size: calc(14 * var(--u)); opacity: 0.65; text-align: center; }
@media (max-aspect-ratio: 9/10) { .cs-keywin { width: calc(570 * var(--u)); } .cs-key-meta { flex-direction: column; gap: calc(2 * var(--u)); } }
.cs-key-srv { font-size: calc(15 * var(--u)); text-align: center; opacity: 0.75; }
.cs-key-srv b { font-weight: 600; }
.cs-key-warn { padding: calc(8 * var(--u)) calc(12 * var(--u)); border-radius: calc(12 * var(--u)); background: #10283b; border: calc(3 * var(--u)) solid #e2503f;
  color: #d4ada9; font-size: calc(15 * var(--u)); font-weight: 500; text-align: center; }

/* the legal documents at the door (lobby.js legalRows; site/.plan/legal-pages-20261118.md §5.3): the three links, and the
   tick when the site's door switch asks for one, Thai then English under it; the lobby's one-time prompt has the same row */
.cs-terms { display: flex; flex-direction: column; font-size: calc(15 * var(--u)); line-height: 1.45; }
.cs-terms a { color: #8ee7f7; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.cs-terms-docs { text-align: center; }
.cs-terms-docs a { white-space: nowrap; } /* (a name stays whole: the line breaks between the three) */
.cs-terms-en { display: block; margin-top: calc(2 * var(--u)); font-size: calc(14 * var(--u)); opacity: 0.75; }
.cs-terms-row { display: flex; align-items: flex-start; gap: calc(10 * var(--u)); cursor: pointer; }
.cs-root input.cs-terms-ok { /* (over .cs-form input, which draws a text field) */
  flex: none; box-sizing: border-box; width: calc(24 * var(--u)); height: calc(24 * var(--u)); margin: calc(2 * var(--u)) 0 0; padding: 0;
  border: 0; border-radius: 0; background: none; accent-color: #3b8fdc; cursor: pointer; }
.cs-termswin { width: calc(640 * var(--u)); }
/* (the prompt's title: one line on its bar, clear of the rivet on each side) */
.cs-termswin .kw-title { padding: 0 calc(46 * var(--u)); font-size: calc(26 * var(--u)); white-space: nowrap; }
.cs-terms-body { display: flex; flex-direction: column; gap: calc(12 * var(--u)); padding: calc(20 * var(--u)) calc(26 * var(--u)) calc(22 * var(--u)); }
.cs-terms-body .cs-err:empty { display: none; }
.cs-terms-sub { font-size: calc(17 * var(--u)); text-align: center; }
.cs-terms-sub .cs-terms-en { font-size: calc(15 * var(--u)); }
.cs-terms-go { height: calc(56 * var(--u)); font-size: calc(22 * var(--u)); }
@media (max-aspect-ratio: 9/10) {
  .cs-termswin { width: calc(570 * var(--u)); }
  .cs-termswin .kw-title { font-size: calc(22 * var(--u)); letter-spacing: 0; } /* (an upright phone: at 26u the real run of 19 Nov measured the title 332 px wide, its first letter 5 px under the rivet; 22u is 280 px) */
  .cs-terms { font-size: calc(19 * var(--u)); } /* (a legal sentence stays readable on an upright phone) */
  .cs-terms-en { font-size: calc(17 * var(--u)); }
}
/* (the closed pop-up on an upright phone: as wide as the legal prompt, its title smaller so it stays on its bar, its words a
   step larger: 370 x 14.3 px at 390 wide) */
@media (max-aspect-ratio: 9/10) {
  .cs-closedwin { width: calc(570 * var(--u)); }
  .cs-closedwin .kw-title { font-size: calc(24 * var(--u)); letter-spacing: 0; }
  .cs-closed-say { font-size: max(14px, calc(22 * var(--u))); }
}

/* ---------- the chosen server's lobby notices ----------
   js/online/lobby.js .cs-anncs (lines drawn by js/online/servers.js noticeFill, text only; docs/team/
   ingame-announcements-20261123.md section 2.7): top centre between the logo and the account chip, over the dim of the key
   and sign-in windows (.cs-modal is z 2), never taking a press, and gone while the delete window or the terms are open
   (no board of the square screens covers those). The staff look and the level colours are css/srvsel.css's .cs-annc
   rules. On an upright phone they sit under the logo, where nothing else is. */
.cs-root:has(.cs-del:not([hidden]), .cs-termsbox:not([hidden])) .cs-anncs { display: none !important; }
.cs-anncs {
  position: absolute; left: 50%; top: calc(26 * var(--u)); transform: translateX(-50%); z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; gap: calc(6 * var(--u)); width: min(calc(560 * var(--u)), calc(100vw - 940 * var(--u)));
}
.cs-annc {
  display: flex; align-items: stretch; box-sizing: border-box; background: #10283b; color: #e8f7ff; border: 2px solid var(--ann-badge);
  box-shadow: 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(0, 0, 0, 0.35); font: 500 max(12px, calc(17 * var(--u))) / 1.3 'Mitr', sans-serif; text-align: left;
}
.cs-annc-b {
  display: flex; flex: none; align-items: center; gap: 4px; padding: 0 max(6px, calc(8 * var(--u))); background: var(--ann-badge); color: #e8f7ff;
  font-weight: 600; font-size: max(11px, calc(15 * var(--u))); white-space: nowrap;
}
.cs-annc-b svg { width: max(12px, calc(16 * var(--u))); height: max(12px, calc(16 * var(--u))); flex: none; }
.cs-annc-t {
  flex: 1; min-width: 0; padding: 0 max(8px, calc(10 * var(--u))); margin: max(3px, calc(5 * var(--u))) 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-aspect-ratio: 9/10) {
  .cs-anncs { top: calc(168 * var(--u)); width: calc(560 * var(--u)); }
}
/* a phone on its side: the key and sign-in windows fill the height, so one line a notice in the strip above them */
@media (orientation: landscape) and (max-height: 560px) {
  .cs-anncs { top: max(4px, env(safe-area-inset-top)); gap: 3px; }
  .cs-annc-t { -webkit-line-clamp: 1; margin-top: 2px; margin-bottom: 2px; }
}
