body.reference-home-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-rows: 62px minmax(0, 1fr);
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(86, 28, 149, 0.3) 0%, rgba(28, 11, 48, 0.34) 100%),
    url("img/game-jpg/standard4_old.jpg") center center / cover no-repeat,
    linear-gradient(180deg, rgba(58, 22, 98, 0.22) 0%, rgba(20, 9, 35, 0.28) 100%),
    url("img/game-jpg/dusk-dark-purp.jpg") center center / cover no-repeat,
    linear-gradient(180deg, #3a245f 0%, #241038 100%);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

body.reference-home-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(104, 34, 180, 0.24) 0%, rgba(28, 11, 48, 0.3) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%) 0 0 / 38px 38px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%) 0 0 / 38px 38px;
  opacity: 0.62;
}

.ref-topbar-host {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 4;
  min-width: 0;
}

body.reference-home-mode .content-container {
  grid-column: 1;
  grid-row: 2;
  width: auto !important;
  min-width: 0;
  min-height: 0;
  float: none;
  display: flex;
  flex-direction: column;
}

body.reference-home-mode .sidebar-container {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 380px !important;
  min-height: 0;
  height: 100vh;
  padding: 0 10px 0 0;
  box-sizing: border-box;
  float: none;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.62) !important;
  background-color: rgba(0, 0, 0, 0.62) !important;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.42) !important;
  border-left: 1px solid rgba(57, 14, 108, 0.42) !important;
  overflow: hidden;
}

body.reference-home-mode .content-container .header {
  display: none !important;
}

body.reference-home-mode .content-container .content {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 12px 12px 12px;
  box-sizing: border-box;
}

body.reference-home-mode .content-container .footer {
  display: none !important;
}

.ref-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 14px;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(86, 51, 139, 0.97) 0%, rgba(58, 30, 97, 0.97) 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.ref-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ref-brand-logo {
  width: clamp(148px, 16vw, 196px);
  height: auto;
  max-height: 56px;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 12px rgba(63, 26, 110, 0.42));
}

.ref-payline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.94);
}

.ref-toplinks {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ref-toplinks a {
  color: #ffffff;
  text-decoration: none;
}

.ref-toplinks a.pay {
  color: #ffd56c;
}

.ref-theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  cursor: pointer;
  text-transform: uppercase;
}

.ref-contact-medal {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
}

.ref-home-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.ref-left-rail {
  display: grid;
  grid-auto-rows: 80px;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 112, 219, 0.8) rgba(18, 8, 31, 0.55);
}

.ref-left-rail::-webkit-scrollbar {
  width: 10px;
}

.ref-left-rail::-webkit-scrollbar-track {
  background: rgba(18, 8, 31, 0.55);
}

.ref-left-rail::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(118, 83, 188, 0.95) 0%, rgba(72, 41, 131, 0.95) 100%);
  border: 2px solid rgba(18, 8, 31, 0.55);
  border-radius: 999px;
}

.ref-game-card {
  position: relative;
  border-radius: 2px;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #201034;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.ref-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.03);
}

.ref-game-fallback-art {
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.1) 0 10px, transparent 11px),
    radial-gradient(circle at 84% 76%, rgba(122, 87, 196, 0.34) 0 18px, transparent 19px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(180deg, #412066 0%, #221136 100%);
}

.ref-game-card.is-selected {
  box-shadow: inset 0 0 0 3px #4fc5ff, 0 0 0 1px rgba(79, 197, 255, 0.35);
}

.ref-game-card.no-art .ref-game-overlay {
  background: linear-gradient(90deg, rgba(7, 3, 14, 0.48) 0%, rgba(7, 3, 14, 0.2) 100%);
}

.ref-game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 8px 7px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.08) 72%, transparent 100%);
}

.ref-game-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ref-game-title {
  max-width: 140px;
  color: #ffffff;
  font-family: "Bebas Neue", "Trebuchet MS", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 12px rgba(0, 0, 0, 0.28);
}

.ref-game-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.ref-game-pill {
  min-width: 42px;
  padding: 1px 6px 1px;
  background: rgba(255, 255, 255, 0.82);
  color: #191919;
  font-size: 10px;
  font-weight: 700;
}

.ref-game-pill.create {
  background: #f2d4ff;
}

.ref-main-rail {
  min-width: 0;
  min-height: 0;
}

.ref-center-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(33, 80, 148, 0.75);
  background:
    linear-gradient(180deg, rgba(14, 8, 23, 0.08) 0%, rgba(14, 8, 23, 0.03) 100%);
  box-shadow: inset 0 0 0 2px rgba(40, 77, 132, 0.1);
}

.ref-stage-watermark {
  position: absolute;
  right: 34px;
  bottom: 22px;
  width: 180px;
  height: 180px;
  object-fit: contain;
  opacity: 0.1;
  pointer-events: none;
  filter: saturate(1.05);
}

.ref-center-stage::before,
.ref-center-stage::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0 8px, transparent 9px),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.42) 0 20px, rgba(0, 0, 0, 0.18) 20px 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0.32;
}

.ref-center-stage::before {
  top: 18px;
  right: 18px;
}

.ref-center-stage::after {
  right: 18px;
  bottom: 18px;
}

.ref-stage-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
}

.ref-stage-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d6cfff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ref-stage-title-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.ref-stage-subtitle {
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

.ref-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: calc(100% - 28px);
  min-height: 0;
}

.ref-room-tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(97, 121, 225, 0.42);
  background: rgba(18, 8, 31, 0.03);
  backdrop-filter: blur(0.35px);
}

.ref-room-decor {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 110px;
  height: 110px;
  object-fit: contain;
  opacity: 0.12;
  pointer-events: none;
  filter: saturate(1.05);
}

.ref-room-noise {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.025), transparent 34%);
}

.ref-room-thumbs {
  position: absolute;
  inset: 14px 14px auto 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.ref-room-thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.ref-room-thumb.secondary {
  width: 114px;
  height: 114px;
}

.ref-room-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.ref-room-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.ref-room-footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.ref-room-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 2px 3px;
  background: #56b7ff;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.ref-room-badge-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ref-room-corner-art {
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  opacity: 0.78;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.ref-login-panel,
.ref-chat-panel {
  background: transparent;
  backdrop-filter: none;
}

.ref-login-panel {
  flex: 0 0 auto;
  padding: 14px 14px 16px;
  border-left: 0;
  border-right: 0;
}

.ref-login-title {
  margin-bottom: 4px;
  font-size: 21px;
  font-weight: 700;
}

.ref-login-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 14px;
}

.ref-login-input {
  width: 100%;
  height: 30px;
  border: 0;
  padding: 0 8px;
  box-sizing: border-box;
  background: #ffffff;
  color: #141414;
  font-size: 14px;
}

.ref-login-button {
  display: block;
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 3px 8px 2px;
  border: 0;
  background: #7fd4ff;
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ref-login-links,
.ref-login-help {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  line-height: 1.4;
}

.ref-login-help {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.25;
}

.ref-login-links a {
  color: #ffffff;
}

.ref-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding-top: 12px;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 0;
  border-right: 0;
}

.ref-chat-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 14px;
}

.ref-chat-tab {
  padding: 10px 0 8px;
  border: 0;
  border-bottom: 3px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  cursor: pointer;
}

.ref-chat-tab.is-active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.ref-chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ref-chat-status-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ref-chat-status strong {
  font-size: 15px;
}

.ref-chat-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 12px 8px;
  font-size: 14px;
  line-height: 1.45;
  background: transparent;
}

.ref-chat-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  color: rgba(255, 255, 255, 0.92);
}

.ref-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px;
  padding: 8px 8px 10px;
  align-items: center;
}

.ref-chat-input {
  min-width: 0;
  width: 100%;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 12px;
}

.ref-chat-image-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.ref-chat-image-button .chat-help {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.ref-game-card:hover,
.ref-game-card:focus-visible,
.ref-login-button:hover,
.ref-login-button:focus-visible,
.ref-chat-tab:hover,
.ref-chat-tab:focus-visible,
.ref-chat-image-button:hover,
.ref-chat-image-button:focus-visible,
.ref-theme-toggle:hover,
.ref-theme-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: -2px;
}

.ref-chat-image-button:hover .chat-help,
.ref-chat-image-button:focus-visible .chat-help {
  opacity: 1;
}

body.reference-home-mode.reference-theme-dark {
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.28) 0%, rgba(4, 5, 8, 0.42) 100%),
    url("img/game-jpg/dusk-dark-purp.jpg") center center / cover no-repeat,
    linear-gradient(180deg, rgba(10, 12, 16, 0.34) 0%, rgba(3, 4, 6, 0.48) 100%),
    linear-gradient(180deg, #0f1217 0%, #050608 100%);
}

body.reference-home-mode.reference-theme-dark::before {
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.24) 0%, rgba(2, 3, 4, 0.34) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 38px 38px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 38px 38px;
  opacity: 0.52;
}

body.reference-home-mode.reference-theme-dark .ref-topbar {
  background: linear-gradient(180deg, rgba(20, 22, 26, 0.96) 0%, rgba(8, 9, 11, 0.96) 100%);
}

body.reference-home-mode.reference-theme-dark .ref-theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

body.reference-home-mode.reference-theme-dark .ref-left-rail {
  scrollbar-color: rgba(131, 143, 159, 0.72) rgba(8, 10, 14, 0.68);
}

body.reference-home-mode.reference-theme-dark .ref-left-rail::-webkit-scrollbar-track {
  background: rgba(8, 10, 14, 0.68);
}

body.reference-home-mode.reference-theme-dark .ref-left-rail::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(111, 121, 136, 0.95) 0%, rgba(58, 66, 76, 0.95) 100%);
  border-color: rgba(8, 10, 14, 0.68);
}

body.reference-home-mode.reference-theme-dark .ref-game-card {
  background: #111418;
}

body.reference-home-mode.reference-theme-dark .ref-game-fallback-art {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.08) 0 10px, transparent 11px),
    radial-gradient(circle at 84% 76%, rgba(127, 139, 157, 0.2) 0 18px, transparent 19px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(180deg, #242a31 0%, #101317 100%);
}

body.reference-home-mode.reference-theme-dark .ref-game-pill.create {
  background: #dde3ea;
}

body.reference-home-mode.reference-theme-dark .ref-center-stage {
  border-color: rgba(111, 124, 142, 0.55);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.2) 0%, rgba(5, 6, 9, 0.08) 100%);
  box-shadow: inset 0 0 0 2px rgba(131, 143, 159, 0.1);
}

body.reference-home-mode.reference-theme-dark .ref-stage-title {
  color: #d5d8dd;
}

body.reference-home-mode.reference-theme-dark .ref-stage-subtitle {
  color: rgba(255, 255, 255, 0.38);
}

body.reference-home-mode.reference-theme-dark .ref-room-tile {
  border-color: rgba(111, 124, 142, 0.4);
  background: rgba(8, 10, 14, 0.08);
}

body.reference-home-mode.reference-theme-dark .ref-room-caption,
body.reference-home-mode.reference-theme-dark .ref-room-footer {
  color: rgba(255, 255, 255, 0.88);
}

body.reference-home-mode.reference-theme-dark .sidebar-container {
  background: rgba(0, 0, 0, 0.72) !important;
  background-color: rgba(0, 0, 0, 0.72) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

@media (max-width: 1500px) {
  body.reference-home-mode .sidebar-container {
    width: 340px !important;
  }

  body.reference-home-mode {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .ref-home-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .ref-stage-subtitle {
    display: none;
  }

  .ref-stage-watermark {
    width: 130px;
    height: 130px;
  }
}

@media (max-width: 1180px) {
  body.reference-home-mode {
    display: block;
    overflow: auto;
  }

  .ref-topbar-host {
    display: block;
  }

  body.reference-home-mode .content-container,
  body.reference-home-mode .sidebar-container {
    width: 100% !important;
    min-height: auto;
    height: auto;
    padding: 0;
  }

  body.reference-home-mode .content-container .content {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .ref-home-shell {
    min-height: 720px;
  }

  .ref-chat-panel {
    height: 480px;
  }
}

@media (max-width: 900px) {
  .ref-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
    padding: 12px 14px;
  }

  .ref-payline {
    font-size: 16px;
  }

  .ref-toplinks {
    flex-wrap: wrap;
  }

  .ref-home-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ref-left-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .ref-game-card {
    min-height: 110px;
  }

  .ref-center-stage {
    min-height: 760px;
  }

  .ref-stage-watermark {
    width: 120px;
    height: 120px;
  }

  .ref-center-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 300px);
  }
}

@media (max-width: 600px) {
  .ref-brand-logo {
    width: 104px;
    max-height: 48px;
  }

  .ref-payline {
    font-size: 14px;
  }

  .ref-left-rail {
    grid-template-columns: 1fr;
  }

  .ref-room-thumbs {
    gap: 12px;
  }

  .ref-room-thumb,
  .ref-room-thumb.secondary {
    width: 88px;
    height: 88px;
  }

  .ref-room-decor {
    width: 76px;
    height: 76px;
  }

  .ref-room-corner-art {
    width: 64px;
    height: 64px;
  }

  .ref-room-caption {
    bottom: 58px;
    font-size: 14px;
  }

  .ref-room-footer {
    font-size: 12px;
  }
}

/* ── Live rooms ─────────────────────────────────────────────────────────────── */
.ref-live-room {
  position: relative;
  min-height: 140px;
}

.ref-room-actions {
  position: absolute;
  bottom: 8px;
  right: 10px;
}

.ref-join-btn {
  cursor: pointer;
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  font-weight: bold;
  letter-spacing: .04em;
}

.room-waiting { color: #7effb2; }
.room-playing { color: #ffca7e; }

.ref-no-rooms {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 2.5rem 1rem;
  font-size: .95rem;
  line-height: 1.8;
}

.ref-no-rooms strong { color: #c9b8ff; }

/* ── Auth panel ─────────────────────────────────────────────────────────────── */
.ref-auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: .75rem;
}

.ref-auth-tab {
  flex: 1;
  padding: .35rem;
  border: 1px solid #5c4db1;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: .8rem;
  transition: background .15s;
}

.ref-auth-tab.is-active {
  background: #5c4db1;
  color: #fff;
}

.ref-auth-error {
  background: rgba(220, 60, 60, .15);
  border: 1px solid rgba(220, 60, 60, .4);
  border-radius: 6px;
  color: #ff9191;
  font-size: .82rem;
  padding: .4rem .6rem;
  margin-bottom: .6rem;
}

/* ── Logged-in user panel ───────────────────────────────────────────────────── */
.ref-user-panel {
  text-align: center;
}

.ref-user-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #c9b8ff;
  margin: .4rem 0 .1rem;
}

/* ── Topbar user indicator ──────────────────────────────────────────────────── */
.ref-topbar-user {
  color: #7effb2;
  font-size: .8rem;
  margin-right: .5rem;
}

/* ── Chat send button ───────────────────────────────────────────────────────── */
.ref-chat-image-button {
  background: #5c4db1;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  padding: 0 .6rem;
  font-size: 1rem;
  line-height: 1;
}

.ref-chat-image-button:hover { background: #7060d0; }

/* ── Chat username styling ──────────────────────────────────────────────────── */
.ref-chat-user {
  color: #c9b8ff;
  margin-right: 3px;
}

.ref-chat-empty {
  color: #555;
  font-style: italic;
}
