* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --teal: #2dd4a7;
  --teal-dark: #1d9e75;
  --coral: #ff7a59;
  --coral-dark: #c25135;
  --gold: #ffd166;
  --bg: #0f1217;
  --panel: rgba(26, 30, 40, 0.85);
  --panel-solid: #1a1e28;
  --line: #333a47;
  --line-soft: #262c38;
  --text: #edeae2;
  --muted: #9a978d;
  --serif: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}
body {
  background: radial-gradient(1100px 500px at 50% -10%, #1c2230 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
#wrap { width: min(98vw, 1200px); margin-top: 8px; }
#stage { position: relative; width: fit-content; margin: 0 auto; }
#cv {
  width: min(96vw, 1200px, calc((100vh - 90px) * 1.7143));
  height: auto;
  display: block;
  border-radius: 12px;
  background: #2b303b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.hidden { display: none !important; }

button {
  background: #333a47;
  border: 1px solid #414a5b;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.2s;
}
button:hover { background: #414a5b; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.35; cursor: default; transform: none; }
button.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
button.primary {
  background: linear-gradient(180deg, #27c290, var(--teal-dark));
  border-color: #2dd4a7;
  color: #04241a;
}
button.primary:hover { background: linear-gradient(180deg, #2dd4a7, #22b485); }
input {
  background: rgba(15, 18, 23, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--teal); }

/* ---------- in-game overlays ---------- */

#hud {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
}
#hud .a { color: var(--teal); }
#hud .b { color: var(--coral); }
#hud .sd { color: var(--gold); }
#hud { display: flex; align-items: center; gap: 10px; }
#hud .mid { white-space: nowrap; }
.hbar {
  position: relative;
  width: 172px;
  height: 17px;
  background: rgba(10, 12, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  overflow: hidden;
}
.hbar .fill {
  position: absolute;
  inset: 0;
  width: 0%;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.hbar.hA .fill { background: linear-gradient(180deg, rgba(45, 212, 167, 0.85), rgba(29, 143, 112, 0.85)); }
.hbar.hB .fill { background: linear-gradient(180deg, rgba(255, 122, 89, 0.85), rgba(194, 81, 53, 0.85)); }
.hbar .lbl {
  position: relative;
  display: block;
  text-align: center;
  font-size: 11.5px;
  line-height: 16px;
  color: #f2f0e9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
}
.hbar.pop { animation: barPop 0.45s ease-out; }
@keyframes barPop {
  30% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

#feed {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  max-width: 44%;
  z-index: 4;
}
#feed div {
  background: rgba(10, 12, 16, 0.72);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  animation: feedIn 0.2s ease-out;
  transition: opacity 0.5s, transform 0.5s;
}
#feed div.out { opacity: 0; transform: translateX(-10px); }
#feed .fi { margin-right: 6px; }
@keyframes feedIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

#gameChat {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 5;
}
#gameChatMsgs { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
#gameChatMsgs div {
  background: rgba(10, 12, 16, 0.75);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  max-width: 300px;
  overflow-wrap: break-word;
}
#gameChatInput {
  pointer-events: auto;
  width: 100%;
  margin-top: 5px;
  padding: 7px 12px;
  font-size: 13px;
  background: rgba(10, 12, 16, 0.9);
}
.cn { font-weight: 700; }
.cn.A { color: var(--teal); }
.cn.B { color: var(--coral); }
.cn.S { color: var(--muted); }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  font-weight: 700;
  border-radius: 12px;
}
#deadOverlay { font-size: 30px; color: #ff9c9c; text-shadow: 0 2px 8px #000; z-index: 10; }

#countOverlay {
  background: radial-gradient(ellipse at center, rgba(15, 18, 23, 0.45) 0%, rgba(15, 18, 23, 0.88) 100%);
  z-index: 30;
}
#countNum {
  font-size: clamp(120px, 30vh, 230px);
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 70px rgba(255, 209, 102, 0.5), 0 8px 30px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
}
#countNum.pop { animation: countPop 0.95s ease-out; }
@keyframes countPop {
  0% { transform: scale(1.55); opacity: 0.2; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.94); opacity: 0.95; }
}
#countLabel {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
  text-shadow: 0 2px 10px #000;
}

#overOverlay { background: rgba(10, 12, 16, 0.85); z-index: 20; animation: overFade 0.35s ease-out; }
@keyframes overFade { from { opacity: 0; } }
#overOverlay .overConf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#overOverlay .overBig { font-size: 38px; font-weight: 800; letter-spacing: 1px; position: relative; animation: slamIn 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes slamIn {
  from { opacity: 0; transform: scale(1.7); }
  to { opacity: 1; transform: scale(1); }
}
#overOverlay .sub, #overOverlay .overCount, #overOverlay .boardsWrap, #overOverlay > .sub { position: relative; }
#overOverlay .statsTable tr { animation: rowIn 0.32s ease-out both; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
.mvpStar { color: var(--gold); display: inline-block; animation: twinkle 1.3s ease-in-out infinite; }
@keyframes twinkle {
  50% { transform: scale(1.3) rotate(10deg); text-shadow: 0 0 8px rgba(255, 209, 102, 0.9); }
}
#overOverlay .sub { font-size: 15px; font-weight: 400; margin-top: 6px; color: #c9c5ba; letter-spacing: 1px; }
#overOverlay .overCount { font-size: 19px; font-weight: 700; margin-top: 8px; color: #ffd166; letter-spacing: 1px; }
#overOverlay .boardsWrap { display: flex; gap: 28px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
#overOverlay .boardTitle { font-size: 12.5px; color: #c9c5ba; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin: 14px 0 2px; }
#stratTimer.urgent { color: #ff5a5a !important; animation: urgPulse 0.5s infinite alternate; }
.aiChip { color: var(--gold); border-color: rgba(255, 209, 102, 0.4); }
@keyframes urgPulse {
  to { transform: scale(1.14); }
}
.statsTable {
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 400;
  background: rgba(26, 30, 40, 0.75);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.statsTable th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 7px 16px 4px;
}
.statsTable td {
  padding: 4px 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.statsTable td.stName { text-align: left; font-weight: 600; }
.statsTable tr.stMe td { background: rgba(255, 209, 102, 0.08); }

/* ---------- lobby: shared shell ---------- */

#lobby {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 340px at 50% -80px, rgba(255, 209, 102, 0.08), transparent 70%),
    radial-gradient(ellipse at 18% 115%, rgba(29, 143, 112, 0.14), transparent 55%),
    radial-gradient(ellipse at 82% 115%, rgba(194, 81, 53, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(9, 12, 18, 0.97) 0%, rgba(12, 15, 22, 0.94) 55%, rgba(9, 12, 18, 0.97) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  z-index: 15;
}
.lobbyScroll {
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 12px;
}
#lobby.joined #titleWrap { display: none; }

/* ---------- title screen ---------- */

#titleWrap {
  position: relative;
  width: 100%;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 58px;
}
.embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute;
  bottom: -8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(255, 209, 102, 0.9);
  opacity: 0;
  animation: emberUp linear infinite;
}
.embers i:nth-child(1)  { left: 6%;  animation-duration: 9.5s;  animation-delay: 0.2s; }
.embers i:nth-child(2)  { left: 15%; animation-duration: 12s;   animation-delay: 3.1s; }
.embers i:nth-child(3)  { left: 26%; animation-duration: 8.5s;  animation-delay: 1.4s; }
.embers i:nth-child(4)  { left: 37%; animation-duration: 11s;   animation-delay: 5.2s; }
.embers i:nth-child(5)  { left: 49%; animation-duration: 9s;    animation-delay: 2.6s; }
.embers i:nth-child(6)  { left: 58%; animation-duration: 13s;   animation-delay: 0.9s; }
.embers i:nth-child(7)  { left: 68%; animation-duration: 8s;    animation-delay: 4.4s; }
.embers i:nth-child(8)  { left: 79%; animation-duration: 10.5s; animation-delay: 1.9s; }
.embers i:nth-child(9)  { left: 88%; animation-duration: 9.8s;  animation-delay: 6.1s; }
.embers i:nth-child(10) { left: 95%; animation-duration: 12.5s; animation-delay: 3.7s; }
@keyframes emberUp {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  8% { opacity: 0.85; }
  60% { opacity: 0.5; }
  100% { transform: translate(42px, -560px) scale(0.25); opacity: 0; }
}
.crestBig {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  background: radial-gradient(circle at 35% 28%, #394153, #1d222d 72%);
  border: 3px solid #8a6a10;
  box-shadow:
    0 0 0 6px rgba(255, 209, 102, 0.10),
    0 0 46px rgba(255, 209, 102, 0.20),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
  animation: crestFloat 4.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes crestFloat {
  50% { transform: translateY(-7px); }
}
.gameTitle {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 15px;
  text-indent: 15px;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff3c4 8%, #ffd166 46%, #a97e17 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 30px rgba(255, 209, 102, 0.16));
  position: relative;
  z-index: 1;
}
.titleRule {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(560px, 82%);
  margin: 14px 0 8px;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.titleRule::before,
.titleRule::after {
  content: "";
  flex: 1;
  height: 1px;
}
.titleRule::before { background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.55)); }
.titleRule::after { background: linear-gradient(90deg, rgba(255, 209, 102, 0.55), transparent); }
#titleWrap .tag {
  color: var(--muted);
  font-size: 14.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
#joinRow { display: flex; gap: 12px; margin-top: 34px; position: relative; z-index: 1; }
#nameInput {
  width: 270px;
  padding: 13px 16px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 1px;
  background: rgba(10, 13, 19, 0.92);
  border: 1px solid #4a4230;
  border-radius: 10px;
}
#nameInput:focus { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 209, 102, 0.15); }
#joinBtn {
  background: linear-gradient(180deg, #ffe08a, #d9a94f);
  border: 1px solid #8a6a10;
  color: #3a2b05;
  font-size: 15px;
  letter-spacing: 3px;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 10px;
  box-shadow: 0 4px 26px rgba(255, 209, 102, 0.22);
}
#joinBtn:hover {
  background: linear-gradient(180deg, #ffe9ad, #e6b95c);
  box-shadow: 0 4px 38px rgba(255, 209, 102, 0.42);
}
.enterHint {
  margin-top: 12px;
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #57534a;
  position: relative;
  z-index: 1;
  animation: hintBreathe 2.4s ease-in-out infinite;
}
.enterHint b { color: var(--muted); }
@keyframes hintBreathe {
  50% { opacity: 0.55; }
}
.winLine {
  display: flex;
  gap: 34px;
  margin-top: 46px;
  position: relative;
  z-index: 1;
}
.winItem { display: flex; align-items: center; gap: 11px; }
.winItem .wIco {
  font-size: 26px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6));
}
.winItem b {
  display: block;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--serif);
  color: #d9d5ca;
}
.winItem i {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* ---------- war council ---------- */

#lobbyMain { width: 100%; max-width: 1150px; }
.councilHead { text-align: center; margin-bottom: 12px; }
.miniCrest { font-size: 24px; vertical-align: middle; margin-right: 10px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6)); }
.councilHead h2 {
  display: inline-block;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: 8px;
  text-indent: 8px;
  background: linear-gradient(180deg, #fff3c4 10%, #ffd166 55%, #a97e17 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
  vertical-align: middle;
}
.councilSub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.council {
  display: grid;
  grid-template-columns: 300px 236px 300px 250px;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}
.teamPanel {
  border-radius: 12px;
  padding: 0 12px 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  min-height: 340px;
}
.teamBanner {
  margin: 0 -12px 10px;
  padding: 11px 14px 9px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.tbA { background: linear-gradient(180deg, rgba(45, 212, 167, 0.26), rgba(45, 212, 167, 0.05)); box-shadow: inset 0 3px 0 var(--teal); }
.tbB { background: linear-gradient(180deg, rgba(255, 122, 89, 0.26), rgba(255, 122, 89, 0.05)); box-shadow: inset 0 3px 0 var(--coral); }
.teamBanner h2 {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 3px;
}
.teamA .teamBanner h2 { color: var(--teal); }
.teamB .teamBanner h2 { color: var(--coral); }
.cnt { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.teamJoin { width: 100%; margin-bottom: 10px; letter-spacing: 1px; font-size: 13px; }
.tjA:not(:disabled) { background: rgba(45, 212, 167, 0.14); border-color: rgba(45, 212, 167, 0.5); color: var(--teal); }
.tjA:not(:disabled):hover { background: rgba(45, 212, 167, 0.24); }
.tjB:not(:disabled) { background: rgba(255, 122, 89, 0.14); border-color: rgba(255, 122, 89, 0.5); color: var(--coral); }
.tjB:not(:disabled):hover { background: rgba(255, 122, 89, 0.24); }
.teamPanel ul { list-style: none; min-height: 96px; }
.teamPanel li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.teamPanel li:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.teamPanel li.me { background: rgba(255, 209, 102, 0.1); border-color: rgba(255, 209, 102, 0.3); }
.roleChip {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #2a3040;
  border: 1px solid var(--line);
  text-transform: capitalize;
  color: #c9c5ba;
  white-space: nowrap;
}
.ping { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rdy { font-size: 13px; width: 15px; text-align: center; color: #57534a; }
.rdy.on { color: var(--teal); }
.adminMark { color: var(--gold); font-size: 12px; }
.wantsMark { color: var(--gold); font-size: 10.5px; opacity: 0.85; }
.rowBtn {
  padding: 2px 7px;
  font-size: 10.5px;
  border-radius: 6px;
  background: #262c38;
  border: 1px solid var(--line);
  margin-left: 2px;
  white-space: nowrap;
}
.rowBtn:hover { background: #333a47; border-color: var(--gold); }

.centerCol {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 0;
}
.vsBadge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: radial-gradient(circle at 35% 28%, #394153, #1d222d 75%);
  border: 2px solid #8a6a10;
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.08), 0 0 22px rgba(255, 209, 102, 0.14);
  margin-bottom: 12px;
}
#roleRow { width: 100%; display: flex; flex-direction: column; align-items: center; }
.roleCards { display: flex; gap: 10px; }
.roleCard {
  width: 98px;
  padding: 13px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: #191d27;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.roleCard .rIco { font-size: 30px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)); }
.roleCard b { font-size: 11px; letter-spacing: 2.5px; font-family: var(--serif); color: #d9d5ca; }
.roleCard:hover { background: #212736; border-color: #4a5266; }
.roleCard.sel {
  outline: none;
  border-color: var(--gold);
  background: #232a38;
  box-shadow: 0 0 0 1px var(--gold), 0 0 20px rgba(255, 209, 102, 0.22);
  transform: translateY(-2px);
}
.roleCard.sel b { color: var(--gold); }
.knightNote {
  font-size: 10.5px;
  color: var(--muted);
  font-style: italic;
  margin: 9px 0 12px;
  text-align: center;
}
.readyBig {
  width: 100%;
  padding: 14px 10px;
  font-size: 15px;
  letter-spacing: 4px;
  font-weight: 800;
  text-transform: uppercase;
  font-family: var(--serif);
  background: linear-gradient(180deg, #27c290, var(--teal-dark));
  border: 1px solid var(--teal);
  color: #04241a;
  border-radius: 10px;
  animation: readyPulse 1.7s ease-in-out infinite;
}
.readyBig:hover { background: linear-gradient(180deg, #2dd4a7, #22b485); }
@keyframes readyPulse {
  50% { box-shadow: 0 0 24px rgba(45, 212, 167, 0.45); }
}
.readyBig.on {
  background: linear-gradient(180deg, #d3703f, #b9541f);
  border-color: var(--coral);
  color: #2b0f04;
  animation: none;
}
#reqAdminBtn { margin-top: 10px; font-size: 11px; padding: 6px 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
#roleDesc {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  background: rgba(15, 18, 23, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 12px;
  width: 100%;
}
#roleDesc:empty { display: none; }

.chatCol {
  background: rgba(13, 16, 23, 0.8);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}
.chatCol h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 700;
}
#chatBox {
  flex: 1;
  min-height: 150px;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  padding-right: 4px;
}
#chatBox div { overflow-wrap: break-word; line-height: 1.4; }
.chatSend { display: flex; gap: 6px; margin-top: 10px; }
#chatInput { flex: 1; min-width: 0; padding: 7px 10px; font-size: 13px; }
#chatBtn { padding: 7px 12px; font-size: 13px; }

#adminBar {
  margin-top: 12px;
  width: 100%;
  max-width: 1150px;
  background: rgba(255, 209, 102, 0.05);
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 12px;
  padding: 9px 14px 12px;
}
.abHead { text-align: center; margin-bottom: 8px; }
#adminBar .abLbl {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 11px;
  text-transform: uppercase;
  font-family: var(--serif);
}
.setGroups { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.setGroup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 16, 23, 0.6);
  border-radius: 10px;
  padding: 10px 12px 8px;
  margin-top: 5px;
  font-size: 12px;
}
.sgTitle {
  position: absolute;
  top: -8px;
  left: 10px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: #12151d;
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: 5px;
  padding: 0 7px;
  font-weight: 700;
}
#adminBar label { color: var(--muted); display: flex; align-items: center; gap: 5px; }
#adminBar select {
  background: #1a1e28;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  font-family: inherit;
}
#adminBar button { padding: 4px 10px; font-size: 11.5px; }

#adminReq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 16px;
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 10px;
  font-size: 13.5px;
}
#adminReq span { color: var(--gold); font-weight: 600; }
#adminReq button { padding: 6px 14px; font-size: 13px; }

#lobbyStatus {
  margin-top: 12px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--gold);
  min-height: 20px;
  text-align: center;
}
#lobbyStatus:not(:empty) {
  background: rgba(255, 209, 102, 0.07);
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: 999px;
  padding: 5px 18px;
}

/* ---------- war room ---------- */

#stratOverlay {
  pointer-events: auto;
  background: rgba(10, 12, 16, 0.82);
  z-index: 25;
}
#stratBox {
  width: min(92%, 540px);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 14px;
  padding: 18px 20px 16px;
  text-align: center;
  font-weight: 400;
}
#stratBox.teamA { border-top-color: var(--teal); }
#stratBox.teamB { border-top-color: var(--coral); }
#stratTitle { font-size: 20px; font-weight: 700; letter-spacing: 1px; font-family: var(--serif); }
#stratTimer {
  font-size: 44px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stratHint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
#stratChat {
  height: 150px;
  overflow-y: auto;
  background: rgba(15, 18, 23, 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#stratBox .chatSend { margin-top: 8px; }
#stratInput { flex: 1; }
#stratReady { width: 100%; margin-top: 10px; }
#stratReady.on { background: linear-gradient(180deg, #d3703f, #b9541f); border-color: var(--coral); color: #2b0f04; }
#stratStatus { margin-top: 8px; font-size: 12.5px; color: var(--gold); min-height: 16px; }

/* ---------- footer ---------- */

#help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12.5px;
  color: #6d6a61;
  padding: 9px 0 14px;
}
#musicBtn, #sfxBtn {
  padding: 4px 12px;
  font-size: 12px;
  background: #1a1e28;
  border: 1px solid var(--line-soft);
  color: #9a978d;
}
#musicBtn:hover, #sfxBtn:hover { color: var(--text); border-color: var(--line); }
#musicBtn.off, #sfxBtn.off { opacity: 0.55; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #333a47; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
