/* ==================================================================
   Royal, old-world look for everything around the board:
   parchment and gold leaf on dark leather, crimson velvet buttons,
   engraved capitals, blackletter titles, wax seals.
   ================================================================== */
:root {
  --parch: #efe0bd;
  --parch-2: #e2cc9c;
  --parch-edge: #b48a4f;
  --ink: #2a1a0c;
  --ink-soft: #5b3d20;
  --gold: #c9a13b;
  --gold-hi: #f3d98a;
  --gold-lo: #8a6a22;
  --crimson: #8c1426;
  --crimson-lo: #4e0812;
  --wood: #3a2414;
  --wood-lo: #1f1209;
  --cream: #f4e6c3;
  --muted: #cdb88f;
  --text: var(--cream);
  --accent: var(--gold);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .18 0 0 0 0 .06 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --stain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .28 0 0 0 0 .1 0 0 0 .35 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(0 22 22)'%3E%3Cg fill='none' stroke='%23c9a13b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 41V10q0-7 7-7h31'/%3E%3Cpath d='M8 36V14q0-6 6-6h22'/%3E%3Cpath d='M14 14q7-1 8 6t-6 7q-5-1-3-6'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.4' fill='%23c9a13b'/%3E%3C/g%3E%3C/svg%3E");
  --corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(90 22 22)'%3E%3Cg fill='none' stroke='%23c9a13b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 41V10q0-7 7-7h31'/%3E%3Cpath d='M8 36V14q0-6 6-6h22'/%3E%3Cpath d='M14 14q7-1 8 6t-6 7q-5-1-3-6'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.4' fill='%23c9a13b'/%3E%3C/g%3E%3C/svg%3E");
  --corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(180 22 22)'%3E%3Cg fill='none' stroke='%23c9a13b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 41V10q0-7 7-7h31'/%3E%3Cpath d='M8 36V14q0-6 6-6h22'/%3E%3Cpath d='M14 14q7-1 8 6t-6 7q-5-1-3-6'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.4' fill='%23c9a13b'/%3E%3C/g%3E%3C/svg%3E");
  --corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(270 22 22)'%3E%3Cg fill='none' stroke='%23c9a13b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 41V10q0-7 7-7h31'/%3E%3Cpath d='M8 36V14q0-6 6-6h22'/%3E%3Cpath d='M14 14q7-1 8 6t-6 7q-5-1-3-6'/%3E%3C/g%3E%3Ccircle cx='9.5' cy='9.5' r='2.4' fill='%23c9a13b'/%3E%3C/g%3E%3C/svg%3E");
  font-family: 'IM Fell English', Georgia, 'Times New Roman', serif;
}

/* ---------- Page: dark tooled leather with a warm glow ---------- */
body {
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(150, 40, 30, 0.35), transparent 60%),
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.8) 100%),
    var(--noise),
    repeating-linear-gradient(45deg, rgba(255, 220, 150, 0.018) 0 2px, transparent 2px 22px),
    #1b0f09;
  background-attachment: fixed;
}
h1, h2, h3, .btn, .status, .pname, .rubble-title, .log .who, .clock, label, select, .level-name, #moveCount {
  font-family: 'Cinzel', Georgia, serif;
}

/* ---------- Shared pieces: parchment, frames, corners ---------- */
.mode-card, .side-panel, .modal-card, .toast, .overlay-scroll {
  background: var(--noise), var(--stain), radial-gradient(ellipse at center, var(--parch) 55%, var(--parch-2) 100%);
  color: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow:
    0 0 0 4px var(--wood-lo),
    0 0 0 5px var(--gold-lo),
    inset 0 0 40px rgba(120, 72, 24, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}
.mode-card::before, .side-panel::before, .modal-card::before, .rubble::before, .overlay-scroll::before {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  background:
    var(--corner-tl) top left / 34px no-repeat,
    var(--corner-tr) top right / 34px no-repeat,
    var(--corner-bl) bottom left / 34px no-repeat,
    var(--corner-br) bottom right / 34px no-repeat;
  height: auto;
  border: 1px solid rgba(138, 106, 34, 0.45);
  border-radius: 3px;
  z-index: 0;
}
/* ---------- Buttons: dark oak with gold, crimson velvet for the main action ---------- */
.btn {
  background: linear-gradient(180deg, #57351d, var(--wood) 55%, var(--wood-lo));
  color: var(--gold-hi);
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.25), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.btn:hover { background: linear-gradient(180deg, #6b4425, #47291a 55%, #26150b); color: #fff0c0; }
.btn.primary {
  background: radial-gradient(ellipse at 50% 20%, #c0283d, var(--crimson) 55%, var(--crimson-lo));
  color: #ffeab0;
  border: 1px solid var(--gold-hi);
  font-size: 15px;
  padding: 11px 16px;
  box-shadow: 0 0 0 3px var(--wood-lo), 0 0 0 4px var(--gold), inset 0 1px 0 rgba(255, 200, 200, 0.3), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { border-color: #d2485b; color: #ffcfc7; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn:disabled { opacity: 0.45; }

/* ---------- Form fields ---------- */
input, select {
  background: linear-gradient(#f8eed6, #ecdcb6);
  color: var(--ink);
  border: 1px solid var(--parch-edge);
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(90, 55, 20, 0.35);
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 15px;
}
select { font-family: 'Cinzel', Georgia, serif; font-size: 13px; font-weight: 600; }
select option { background: #f4e7c8; color: var(--ink); }
input::placeholder { color: #9a7d55; font-style: italic; }
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
input[type='range'] { accent-color: var(--crimson); background: none; box-shadow: none; border: none; }
label { color: var(--ink-soft); font-weight: 600; letter-spacing: 0.04em; font-size: 12px; text-transform: uppercase; }
label.check { text-transform: none; font-family: 'IM Fell English', Georgia, serif; font-size: 15px; letter-spacing: 0; }
label.check input { accent-color: var(--crimson); }

/* ---------- Lobby ---------- */
.brand h1 {
  font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 6.6vw, 72px);
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #fff2c4 0%, var(--gold-hi) 35%, var(--gold) 60%, #7d5a1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(201, 161, 59, 0.25));
  margin: 4px 0 2px;
}
.brand p { color: var(--muted); font-style: italic; font-size: 19px; }
.crest { width: 92px; height: 104px; margin: 0 auto 2px; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.flourish { display: block; width: min(420px, 80%); height: 22px; margin: 10px auto 0; }
.brand-pieces { margin: 6px auto 0; padding: 6px 18px 0; border-bottom: 3px solid var(--gold-lo); box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.8); width: fit-content; }
.mode-card { padding: 26px 24px 22px; gap: 12px; }
.mode-card > * { position: relative; z-index: 1; }
.mode-card h2 { font-size: 21px; font-weight: 700; color: var(--crimson); text-align: center; letter-spacing: 0.05em; }
.mode-card h2::after { content: ''; display: block; width: 70%; height: 8px; margin: 6px auto 0; background: radial-gradient(circle, var(--gold) 0 2.5px, transparent 3px) center / 12px 8px repeat-x; opacity: 0.8; }
.mode-card p { color: var(--ink-soft); text-align: center; font-style: italic; font-size: 16px; }
.mode-card .seal {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d4384c, var(--crimson) 55%, #3e0610);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 0 0 3px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  color: #ffd9a0;
  font-family: 'UnifrakturMaguntia', serif;
  font-size: 22px;
  z-index: 2;
}
.level-name { color: var(--crimson); text-transform: none; }
.modes { gap: 30px; margin-top: 24px; }

/* ---------- Game screen ---------- */
.topbar {
  background: linear-gradient(180deg, #4a2c17, var(--wood-lo));
  border: 1px solid var(--gold-lo);
  border-bottom: 2px solid var(--gold);
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 220, 150, 0.15);
}
.topbar select { background: linear-gradient(#4b2d18, #2a170c); color: var(--gold-hi); border-color: var(--gold-lo); box-shadow: none; }
.topbar select option { background: #2a170c; color: var(--gold-hi); }
.status {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffe9b0;
  background: linear-gradient(180deg, #a3192d, var(--crimson) 50%, var(--crimson-lo));
  border: none;
  border-radius: 0;
  padding: 8px 34px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 2px 0 rgba(255, 200, 150, 0.25);
}
.status.check { background: linear-gradient(180deg, #e0a11c, #a0640d); color: #1d1004; text-shadow: none; }
.status.over { background: linear-gradient(180deg, #2c1a0c, #120a04); color: var(--gold-hi); }

/* Player plaques with brass clocks */
.player-strip {
  background: var(--noise), linear-gradient(180deg, #4a2c17, #26150b);
  border: 1px solid var(--gold-lo);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.15), 0 4px 10px rgba(0, 0, 0, 0.5);
}
.player-strip.turn { border-color: var(--gold-hi); box-shadow: 0 0 0 2px rgba(243, 217, 138, 0.35), 0 0 18px rgba(243, 217, 138, 0.25), inset 0 1px 0 rgba(255, 220, 150, 0.2); }
.player-strip .pname { color: var(--gold-hi); letter-spacing: 0.05em; font-size: 16px; }
.player-strip .ptag { color: var(--muted); font-style: italic; font-size: 14px; }
.player-strip .dot { width: 18px; height: 21px; border-radius: 0; border: none; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); box-shadow: none; }
.player-strip .clock {
  background: linear-gradient(180deg, #f0d685, #b48a2e 60%, #7d5a1a);
  color: var(--ink);
  border: 1px solid #5e4214;
  border-radius: 3px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
}
.player-strip .clock.run { background: linear-gradient(180deg, #fff1b8, #e3b847 60%, #a07422); box-shadow: 0 0 12px rgba(243, 217, 138, 0.6); color: var(--ink); }
.player-strip .clock.low { background: linear-gradient(180deg, #d4384c, var(--crimson)); color: #fff; }

/* Fallen-pieces vaults: dark stone with gold trim */
.rubble {
  background: var(--noise), linear-gradient(180deg, #2d241e, #140e0a);
  border: 2px solid var(--gold-lo);
  border-radius: 6px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7), 0 10px 24px rgba(0, 0, 0, 0.5);
}
.rubble::after { display: none; }
.rubble-head { position: relative; z-index: 1; border-bottom: 1px solid rgba(201, 161, 59, 0.35); padding-bottom: 6px; }
.rubble-title { color: var(--gold-hi); letter-spacing: 0.06em; font-size: 13px; }
.rubble .adv { color: #ff8a7a; font-family: 'Cinzel', serif; }
.rubble-empty { color: var(--muted); font-style: italic; font-size: 15px; }
.rubble-pile { position: relative; z-index: 1; }

/* Battle chronicle (move log) on parchment */
.side-panel { padding: 18px 16px 14px; }
.side-panel > * { position: relative; z-index: 1; }
.log-head { border-bottom: 1px solid rgba(138, 106, 34, 0.5); padding-bottom: 6px; }
.log-head h3 { color: var(--crimson); font-size: 19px; letter-spacing: 0.06em; }
#moveCount { color: var(--ink-soft); font-size: 12px; }
.log li {
  background: rgba(255, 250, 235, 0.35);
  border-radius: 2px;
  border-left: 4px solid transparent;
  border-bottom: 1px dashed rgba(120, 85, 40, 0.35);
  color: var(--ink);
  font-size: 15px;
}
.log li.cap { background: rgba(140, 20, 38, 0.09); }
.log .num { color: var(--ink-soft); font-family: 'Cinzel', serif; }
.log .who { color: var(--ink); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.log .what { color: var(--ink-soft); }
.log .what b { color: var(--ink); }
.log .tag { font-family: 'Cinzel', serif; letter-spacing: 0.06em; border-radius: 999px; padding: 1px 7px; }
.log .tag.kill { background: radial-gradient(circle at 35% 30%, #d4384c, var(--crimson) 60%, #4e0812); color: #ffe3c0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.log .tag.chk { background: linear-gradient(#f0d685, #b48a2e); color: var(--ink); }
.log .tag.mate { background: var(--ink); color: var(--gold-hi); }
.log .tag.special { background: #3d2a5e; color: #f0e2ff; }
.log-empty { color: var(--ink-soft); font-style: italic; font-size: 16px; }
.log::-webkit-scrollbar { width: 8px; }
.log::-webkit-scrollbar-thumb { background: var(--parch-edge); border-radius: 4px; }
.share { background: linear-gradient(180deg, #a3192d, var(--crimson-lo)); color: #ffe9b0; border: 1px solid var(--gold); border-radius: 4px; }
.share b { color: #fff3c8; font-family: 'Cinzel', serif; }
.chat { border-top: 1px solid rgba(138, 106, 34, 0.5); }
.chat-msgs { color: var(--ink); font-size: 15px; }
.chat-msgs .sys { color: var(--ink-soft); }

/* Game over: a royal proclamation */
.overlay { background: radial-gradient(ellipse at center, rgba(20, 10, 4, 0.55), rgba(8, 4, 2, 0.85)); backdrop-filter: blur(2px); border-radius: 4px; }
.overlay-scroll { padding: 30px 34px 30px; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.overlay-scroll > * { position: relative; z-index: 1; }
.overlay h2, .overlay-scroll h2 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 700;
  font-size: 36px;
  color: var(--crimson);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.6);
}
.overlay p { color: var(--ink-soft); font-size: 17px; font-style: italic; }
.overlay-scroll .seal-big {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin-top: 4px;
  background: radial-gradient(circle at 35% 30%, #d4384c, var(--crimson) 55%, #3e0610);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 4px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  color: #ffd9a0;
  font-family: 'UnifrakturMaguntia', serif;
  font-size: 28px;
}
.overlay .link-box input { font-size: 13px; }

/* Promotion / confirm dialogs and toasts */
.modal { background: rgba(10, 5, 2, 0.7); }
.modal-card { padding: 24px 26px; }
.modal-card > * { position: relative; z-index: 1; }
.modal-card h3 { color: var(--crimson); font-size: 20px; letter-spacing: 0.05em; }
.promo-choices button { background: linear-gradient(#f8eed6, #e8d4a8); border: 1px solid var(--parch-edge); color: var(--ink); font-family: 'Cinzel', serif; border-radius: 4px; }
.toast { color: var(--ink); font-size: 16px; padding: 12px 20px; }

/* Small screens */
@media (max-width: 760px) {
  .brand h1 { font-size: 58px; }
  .crest { width: 70px; height: 80px; }
  .status { padding: 6px 24px; font-size: 14px; }
  .overlay h2, .overlay-scroll h2 { font-size: 34px; }
  .overlay-scroll { padding: 22px 18px; }
}

.mode-card { overflow: visible; margin-top: 14px; }
.rubble { padding: 14px 20px; }
.rubble-head { padding-left: 4px; padding-right: 4px; }

/* ==================================================================
   One-screen home page: header, mode tabs, one card, footer.
   The page never scrolls; on tiny screens only the card area does.
   ================================================================== */
#lobby {
  height: 100vh;
  height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(8px, 2vh, 22px) 16px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#lobby .brand { margin-bottom: clamp(2px, 1vh, 10px); flex: none; }
.brand-row { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 16px); }
#lobby .crest { width: clamp(38px, 7vh, 62px); height: auto; margin: 0; }
#lobby .brand h1 { font-size: min(clamp(34px, 7.5vh, 66px), 8.4vw); margin: 0; line-height: 1.05; white-space: nowrap; }
#lobby .brand p { font-size: clamp(13px, 2.2vh, 17px); margin: 2px 0 0; }
#lobby .flourish { height: 12px; margin: 4px auto 0; }
#lobby .brand-pieces { margin-top: 2px; padding: 0 12px; gap: 2px; }
#lobby .brand-pieces .piece.figp.real { width: clamp(26px, 4.4vh, 42px); height: clamp(39px, 6.6vh, 63px); }
.mode-tabs { display: flex; gap: 6px; justify-content: center; flex: none; margin: clamp(4px, 1vh, 10px) 0 0; }
.mode-tab {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 13px;
  color: var(--gold-hi);
  background: linear-gradient(#4a2c17, #26150b);
  border: 1px solid var(--gold-lo);
  border-bottom: 3px solid transparent;
  border-radius: 4px 4px 0 0;
  padding: 8px 14px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: filter 0.15s;
}
.mode-tab:hover { filter: brightness(1.15); }
.mode-tab .tab-seal {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #d4384c, var(--crimson) 55%, #3e0610);
  color: #ffd9a0;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.mode-tab[aria-selected='true'] {
  background: var(--noise), linear-gradient(#f2e4c2, #e2cc9c);
  color: var(--crimson);
  border-color: var(--gold);
  border-bottom-color: var(--crimson);
}
#lobby .modes {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 470px);
  justify-content: center;
  align-content: start;
  overflow-y: auto;
  padding: 26px 8px 8px;
  gap: 24px;
}
#lobby .mode-card { display: none; margin-top: 0; padding: 22px 22px 18px; gap: 9px; }
#lobby .mode-card.active { display: flex; }
#lobby .mode-card h2 { font-size: 19px; }
#lobby .mode-card h2::after { margin-top: 4px; }
#lobby .mode-card p { font-size: 15px; line-height: 1.35; }
#lobby .mode-card .row { grid-template-columns: 1fr 1fr; gap: 10px; }
#lobby .mode-card label.check { margin-top: 20px; }
#lobby .mode-card input, #lobby .mode-card select { padding: 7px 9px; }
#lobby .mode-card .btn.primary { margin-top: 4px; padding: 10px 16px; }
#lobby .site-foot { flex: none; padding: 6px 16px 10px; font-size: 13px; }
/* Big screens: all three cards side by side, tabs not needed. */
@media (min-width: 1100px) and (min-height: 720px) {
  .mode-tabs { display: none; }
  #lobby .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 30px; }
  #lobby .mode-card { display: flex; }
}
/* Short screens: drop the decorations first. */
@media (max-height: 660px) { #lobby .brand-pieces, #lobby .flourish { display: none; } }
@media (max-width: 760px) {
  .mode-tabs { gap: 4px; }
  .mode-tab { font-size: 11px; padding: 7px 7px 7px; gap: 5px; letter-spacing: 0.02em; }
  .mode-tab .tab-seal { width: 20px; height: 20px; font-size: 12px; }
  #lobby .brand p { font-size: 13px; }
  #lobby .modes { padding-top: 24px; }
}

/* Toasts float centred at the bottom (the shared parchment rule above must not change their positioning). */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: auto; max-width: min(560px, calc(100vw - 32px)); z-index: 300; }
