/* ============================================================================
 * 8 Ball Classic — Billiard Hall Walnut, Brushed Brass & Tournament Baize UI
 * Handcrafted classic game presentation (no generic SaaS / neon gradients)
 * ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --wood-dark: #16110d;
  --wood-mid: #221913;
  --wood-panel: #1b1410;
  --wood-elevated: #281e17;
  --brass: #c59f61;
  --brass-bright: #dfc089;
  --brass-muted: rgba(197, 159, 97, 0.34);
  --brass-hairline: rgba(197, 159, 97, 0.22);
  --ivory: #f3eee3;
  --ivory-soft: #cfc7b8;
  --ivory-dim: #9a9182;
  --baize-btn: #286e34;
  --baize-btn-top: #378c46;
  --baize-btn-border: #5bc26d;
  --crimson: #b83b3b;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #3d5434;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ivory);
  user-select: none;
  -webkit-user-select: none;
}

.stage-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #58784b 0%, #3a5031 100%);
}

#pool-canvas {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  display: block;
  touch-action: none;
  outline: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.52);
}

.hidden {
  display: none !important;
}

/* ============================================================================
 * MAIN MENU SCREEN — Classic Billiard Room Timber & Brass Ledger
 * ========================================================================== */

.menu-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(16, 20, 14, 0.42) 0%, rgba(10, 13, 9, 0.78) 100%);
}

.hall-cabinet {
  width: 100%;
  max-width: 890px;
  background: linear-gradient(180deg, #231a14 0%, #17110d 100%);
  border: 1px solid var(--brass-muted);
  border-radius: 8px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.76),
    inset 0 1px 0 rgba(255, 238, 205, 0.10),
    inset 0 0 0 4px rgba(15, 10, 7, 0.55);
  overflow: hidden;
}

.cabinet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 15px 24px;
  background: linear-gradient(180deg, rgba(44, 32, 23, 0.88) 0%, rgba(24, 18, 13, 0.96) 100%);
  border-bottom: 1px solid var(--brass-hairline);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.crest-svg {
  width: 48px;
  height: 35px;
  flex-shrink: 0;
}

.eyebrow-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2px;
}

.eyebrow-label.center {
  text-align: center;
}

.hall-title {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", Times, serif;
  font-size: 1.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ivory);
  line-height: 1.08;
}

/* Header Account, Stats & Cues Toolbar */
.header-account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-chip {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #140f0b;
  border: 1px solid var(--brass-muted);
  border-radius: 6px;
  padding: 4px 11px 4px 5px;
  color: var(--ivory);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.profile-chip:hover {
  border-color: var(--brass-bright);
  background: #1d1510;
}

.profile-chip-canvas {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: block;
}

.profile-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.profile-chip-text strong {
  font-size: 0.82rem;
  color: var(--ivory);
}

.profile-chip-text small {
  font-size: 0.68rem;
  color: var(--brass-bright);
}

.nav-brass-btn {
  appearance: none;
  background: #271d16;
  border: 1px solid var(--brass-muted);
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--ivory);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.nav-brass-btn:hover {
  background: #33261d;
  border-color: var(--brass-bright);
}

.nav-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--brass-bright);
  background: rgba(0, 0, 0, 0.38);
  padding: 1px 6px;
  border-radius: 3px;
}

.cabinet-body {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
}

.menu-col {
  padding: 20px 24px 22px;
}

.menu-col-modes {
  border-right: 1px solid var(--brass-hairline);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.menu-col-setup {
  display: flex;
  flex-direction: column;
  gap: 13px;
  background: rgba(12, 9, 7, 0.26);
}

.section-heading {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 2px;
}

/* Match Mode Radio Plaques */
.mode-plaque {
  appearance: none;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #261d17 0%, #1b1410 100%);
  border: 1px solid rgba(215, 185, 130, 0.18);
  border-radius: 6px;
  color: var(--ivory);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.mode-plaque:hover {
  background: linear-gradient(180deg, #30241c 0%, #221913 100%);
  border-color: rgba(197, 159, 97, 0.45);
}

.mode-plaque.selected {
  background: linear-gradient(180deg, #223b26 0%, #172919 100%);
  border-color: #6bc977;
  box-shadow: inset 0 0 0 1px rgba(107, 201, 119, 0.32);
}

.plaque-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--ivory-dim);
  flex-shrink: 0;
  position: relative;
}

.mode-plaque.selected .plaque-radio {
  border-color: #6fe37e;
}

.mode-plaque.selected .plaque-radio::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: #6fe37e;
}

.plaque-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.plaque-title {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ivory);
}

.plaque-desc {
  font-size: 0.77rem;
  color: var(--ivory-soft);
  line-height: 1.28;
}

.plaque-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--brass-bright);
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(197, 159, 97, 0.24);
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Prominent PLAY MATCH CTA Button */
.play-cta-btn {
  appearance: none;
  margin-top: 4px;
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(180deg, #3da14e 0%, #257332 100%);
  border: 1.5px solid #74de85;
  border-radius: 6px;
  color: #f7fcf7;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: filter 0.12s ease, transform 0.08s ease;
}

.play-cta-btn:hover {
  filter: brightness(1.08);
}

.play-cta-btn:active {
  transform: translateY(1px);
}

.play-cta-main {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.play-cta-sub {
  font-size: 0.75rem;
  color: rgba(240, 252, 242, 0.88);
  font-weight: 600;
}

.mode-footer-links {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-link-btn {
  appearance: none;
  background: none;
  border: none;
  color: var(--ivory-soft);
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(197, 159, 97, 0.45);
}

.text-link-btn:hover {
  color: var(--brass-bright);
}

.dot-sep {
  color: var(--ivory-dim);
}

/* Right-side Form Controls */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group.compact-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.field-group label,
.field-label-row > span:first-child,
.field-label-row > label {
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ivory);
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.field-hint {
  font-size: 0.73rem;
  color: var(--brass-bright);
}

.field-micro-note {
  font-size: 0.74rem;
  color: var(--ivory-dim);
  line-height: 1.35;
}

.hall-input,
.hall-select {
  width: 100%;
  background: #120e0b;
  color: var(--ivory);
  border: 1px solid rgba(197, 159, 97, 0.28);
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.hall-input:focus,
.hall-select:focus {
  border-color: var(--brass-bright);
}

.compact-select {
  width: auto;
  min-width: 168px;
  padding: 6px 10px;
}

.compact-input {
  width: 180px;
}

/* Segmented Game Speed Bar */
.segmented-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #110d0a;
  border: 1px solid rgba(197, 159, 97, 0.25);
  border-radius: 5px;
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ivory-soft);
  font-size: 0.79rem;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.seg-btn.active {
  background: linear-gradient(180deg, #3b2d21 0%, #2b2017 100%);
  color: var(--brass-bright);
  box-shadow: inset 0 0 0 1px rgba(197, 159, 97, 0.48);
}

/* Official Competition Cloth Swatches */
.cloth-swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

.cloth-swatch {
  appearance: none;
  width: 36px;
  height: 26px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, var(--swatch-top) 0%, var(--swatch-bot) 100%);
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 2px 5px rgba(0, 0, 0, 0.45);
  transition: transform 0.1s ease, border-color 0.12s ease;
}

.cloth-swatch:hover {
  transform: translateY(-1px);
  border-color: var(--ivory);
}

.cloth-swatch.active {
  border: 2px solid var(--brass-bright);
  box-shadow: 0 0 0 2px #140f0c, 0 0 0 3.5px var(--brass);
}

/* ============================================================================
 * MODAL DIALOGS (Account / Career Stats / Cues / Online / Friends / Pause)
 * ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 10, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #231a14 0%, #17110d 100%);
  border: 1px solid var(--brass-muted);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 238, 205, 0.08);
}

.modal-card.wide {
  max-width: 590px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card.extra-wide {
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.46rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: var(--ivory);
}

.modal-title.win-text {
  color: #7ee88c;
}

.modal-title.loss-text {
  color: #f08585;
}

.modal-subtitle {
  font-size: 0.86rem;
  color: var(--ivory-soft);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.42;
}

/* Tabs */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #110d0a;
  border: 1px solid var(--brass-hairline);
  border-radius: 5px;
  padding: 3px;
  margin-bottom: 14px;
}

.tab-bar.two-col {
  grid-template-columns: 1fr 1fr;
}

.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ivory-soft);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.tab-btn.active {
  background: #2c2119;
  color: var(--brass-bright);
  box-shadow: inset 0 0 0 1px rgba(197, 159, 97, 0.42);
}

/* Account & Avatar Grid */
.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  padding: 4px 0;
}

.avatar-option-btn {
  appearance: none;
  background: #120e0b;
  border: 1.5px solid rgba(197, 159, 97, 0.22);
  border-radius: 6px;
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, border-color 0.12s ease;
}

.avatar-option-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ivory);
}

.avatar-option-btn.selected {
  border-color: #6fe37e;
  box-shadow: 0 0 0 2px rgba(111, 227, 126, 0.30);
}

.avatar-option-btn canvas {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 4px;
}

.server-mail-note {
  background: rgba(197, 159, 97, 0.10);
  border: 1px solid var(--brass-muted);
  border-radius: 5px;
  padding: 8px 11px;
  font-size: 0.75rem;
  color: var(--ivory-soft);
  line-height: 1.38;
}

.server-mail-note strong {
  color: var(--brass-bright);
}

.server-mail-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ivory);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 4px;
  border-radius: 3px;
}

.auth-feedback {
  min-height: 16px;
  font-size: 0.80rem;
  color: #82e68f;
}

.auth-feedback.error-msg {
  color: #f28888;
}

/* Play as Guest Entry Option & Notice Banners */
.guest-entry-box {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory-dim);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--brass-hairline);
}

.guest-play-btn {
  border-color: rgba(197, 159, 97, 0.45);
  color: var(--brass-bright);
}

.guest-micro-note {
  font-size: 0.73rem;
  color: var(--ivory-dim);
  text-align: center;
  line-height: 1.38;
}

.guest-notice-banner {
  background: rgba(197, 159, 97, 0.10);
  border: 1px solid var(--brass-muted);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.80rem;
  color: var(--ivory-soft);
  line-height: 1.38;
}

.guest-notice-banner strong {
  color: var(--brass-bright);
}

.guest-gameover-note {
  font-size: 0.76rem;
  color: var(--ivory-dim);
  text-align: center;
  margin: -6px 0 12px;
}

.profile-summary-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #120e0b;
  border: 1px solid var(--brass-hairline);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.acct-summary-canvas {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  flex-shrink: 0;
}

.profile-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.acct-name-lg {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--ivory);
}

.acct-email-sm {
  font-size: 0.80rem;
  color: var(--ivory-soft);
}

.verified-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-top: 2px;
}

.verified-pill.verified {
  background: rgba(65, 185, 85, 0.18);
  border: 1px solid rgba(95, 220, 115, 0.48);
  color: #84eb93;
}

.verified-pill.unverified {
  background: rgba(215, 165, 65, 0.16);
  border: 1px solid rgba(215, 165, 65, 0.42);
  color: var(--brass-bright);
}

.verify-box {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--brass-muted);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mail-catcher-card {
  background: #141d15;
  border: 1px solid rgba(111, 227, 126, 0.42);
  border-radius: 5px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-catcher-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mail-catcher-hdr span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: #84eb93;
}

.mail-oneclick-btn {
  appearance: none;
  background: #2e7d3b;
  border: 1px solid #6bd97c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.mail-catcher-text {
  font-size: 0.79rem;
  color: var(--ivory-soft);
  line-height: 1.4;
}

/* Career Stats Modal */
.career-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.career-kpi-card {
  background: #120e0b;
  border: 1px solid var(--brass-hairline);
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.career-kpi-card span {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ivory-dim);
}

.career-kpi-card strong {
  font-family: Georgia, serif;
  font-size: 1.42rem;
  color: var(--brass-bright);
}

.career-kpi-card small {
  font-size: 0.72rem;
  color: var(--ivory-soft);
}

.career-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ledger-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 12px 14px;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.81rem;
}

.ledger-row:last-child {
  border-bottom: none;
}

.ledger-row span {
  color: var(--ivory-soft);
}

.ledger-row strong {
  color: var(--ivory);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Cue Armory Rack */
.cues-rack-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}

.cue-card {
  background: #130f0b;
  border: 1px solid rgba(197, 159, 97, 0.22);
  border-radius: 6px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1.15fr 1.35fr auto;
  align-items: center;
  gap: 12px;
}

.cue-card.equipped {
  border-color: #6bc977;
  background: linear-gradient(90deg, #172619 0%, #130f0b 100%);
}

.cue-card.locked {
  opacity: 0.76;
}

.cue-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cue-meta-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cue-name {
  font-family: Georgia, serif;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ivory);
}

.cue-tier-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-bright);
  background: rgba(197, 159, 97, 0.12);
  border: 1px solid var(--brass-hairline);
  padding: 1px 6px;
  border-radius: 3px;
}

.cue-unlock-req {
  font-size: 0.75rem;
  color: var(--ivory-dim);
}

.cue-prog-track {
  width: 100%;
  max-width: 180px;
  height: 5px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}

.cue-prog-fill {
  height: 100%;
  background: var(--brass);
}

.cue-card.unlocked .cue-prog-fill {
  background: #55c464;
}

.cue-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cue-preview-canvas {
  width: 100%;
  max-width: 300px;
  height: 32px;
  display: block;
}

/* Unlock Celebration Box on Game Over */
.unlock-celebration-box {
  background: linear-gradient(180deg, #2b2114 0%, #1c150c 100%);
  border: 1px solid var(--brass-bright);
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.unlock-cue-title {
  font-family: Georgia, serif;
  font-size: 1.08rem;
  color: var(--ivory);
}

.compact-btn {
  padding: 6px 14px;
  font-size: 0.80rem;
}

/* Online & Friends Lobby Shared Styles */
.lobby-status-box {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid var(--brass-hairline);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.brass-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2.5px solid rgba(197, 159, 97, 0.22);
  border-top-color: var(--brass-bright);
  animation: spinRing 0.9s linear infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.lobby-status-line {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 4px;
}

.lobby-sub-line {
  font-size: 0.79rem;
  color: var(--ivory-dim);
}

.center-text {
  text-align: center;
}

.friend-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.room-code-plaque {
  background: #110d0a;
  border: 1px solid var(--brass-muted);
  border-radius: 6px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-code-caption {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ivory-dim);
}

.room-code-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--brass-bright);
  padding-left: 0.22em;
  user-select: text;
  -webkit-user-select: text;
}

.room-wait-note {
  font-size: 0.79rem;
  color: var(--ivory-soft);
}

.invite-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 8px;
}

.email-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.copy-feedback {
  min-height: 16px;
  font-size: 0.78rem;
  color: #82e68f;
  text-align: center;
}

.join-code-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ivory);
}

.join-input-row {
  display: flex;
  gap: 8px;
}

.code-entry-input {
  flex: 1;
  background: #110d0a;
  border: 1px solid var(--brass-muted);
  border-radius: 5px;
  padding: 9px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-bright);
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

/* Settings Rows & Buttons */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 0.84rem;
  font-weight: 600;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-gap {
  margin-top: 14px;
}

.top-gap-sm {
  margin-top: 10px;
}

.btn-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.08s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn.full-width {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(180deg, var(--baize-btn-top) 0%, var(--baize-btn) 100%);
  border-color: var(--baize-btn-border);
  color: #f6fbf6;
}

.btn-secondary {
  background: #292019;
  border-color: rgba(197, 159, 97, 0.30);
  color: var(--ivory);
}

.btn-quiet {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ivory-soft);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--brass-hairline);
  border-radius: 5px;
  padding: 9px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-card span {
  font-size: 0.68rem;
  color: var(--ivory-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  font-family: Georgia, serif;
  font-size: 1.18rem;
  color: var(--ivory);
}

.rules-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ivory-soft);
  margin-bottom: 16px;
}

.rules-content h3 {
  font-family: Georgia, serif;
  font-size: 0.96rem;
  color: var(--brass-bright);
  margin: 12px 0 5px;
}

.rules-content ul {
  padding-left: 18px;
}

.rules-content li {
  margin-bottom: 5px;
}

.rules-content strong {
  color: var(--ivory);
}

.kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ivory);
}

@media (max-width: 800px) {
  .cabinet-body {
    grid-template-columns: 1fr;
  }
  .menu-col-modes {
    border-right: none;
    border-bottom: 1px solid var(--brass-hairline);
  }
  .hall-cabinet {
    max-height: 92vh;
    overflow-y: auto;
  }
  .cue-card {
    grid-template-columns: 1fr;
  }
  .avatar-picker-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .career-breakdown-grid,
  .auth-two-col {
    grid-template-columns: 1fr;
  }
}
