:root {
  --bg: #050714;
  --bg-2: #070b1f;
  --surface: rgba(7, 12, 30, 0.88);
  --card: rgba(10, 16, 36, 0.92);
  --border: rgba(110, 150, 255, 0.2);
  --border-strong: rgba(70, 240, 255, 0.35);
  --accent: #46f0ff;
  --accent-2: #7bffcf;
  --accent-soft: rgba(70, 240, 255, 0.18);
  --text-main: #f5f7ff;
  --text-muted: #9aa3c4;
  --success: #35ffb0;
  --danger: #ff6b81;
  --shadow-lg: 0 30px 80px rgba(2, 6, 20, 0.75);
  --shadow-md: 0 20px 50px rgba(2, 6, 20, 0.55);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-max: clamp(1100px, 88vw, 1680px);
  --page-pad: clamp(18px, 3vw, 56px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 15%, rgba(70, 240, 255, 0.14), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(123, 255, 207, 0.12), transparent 40%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(70, 240, 255, 0.6);
  outline-offset: 2px;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  opacity: 0.65;
  z-index: 0;
  pointer-events: none;
}

.bg-orb-one {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(70, 240, 255, 0.45), transparent 65%);
}

.bg-orb-two {
  width: 620px;
  height: 620px;
  right: -200px;
  top: 20vh;
  background: radial-gradient(circle at 40% 40%, rgba(123, 255, 207, 0.35), transparent 68%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(120, 140, 200, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 200, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridMove 40s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
  z-index: 0;
}

@keyframes gridMove {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 56px, 56px 0;
  }
}

.container {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding-inline: var(--page-pad);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 9, 24, 0.78);
  border-bottom: 1px solid rgba(110, 150, 255, 0.15);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 18px;
}

.logo {
  display: flex;
  align-items: center;
  min-width: max-content;
}

.logo-image {
  width: clamp(150px, 16vw, 220px);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  font-size: 13px;
  color: var(--text-muted);
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  border-color: rgba(70, 240, 255, 0.3);
  background: rgba(7, 13, 34, 0.5);
  color: var(--text-main);
}

.auth-shell,
.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  margin: clamp(1.8rem, 4vw, 3rem) auto;
}

.auth-card,
.panel {
  background:
    radial-gradient(circle at top right, rgba(70, 240, 255, 0.14), transparent 55%),
    linear-gradient(145deg, rgba(6, 10, 30, 0.96), rgba(6, 12, 34, 0.96));
  border: 1px solid rgba(119, 155, 255, 0.4);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 2.2vw, 1.8rem);
  box-shadow: var(--shadow-md);
}

.auth-card {
  width: min(560px, 100%);
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

h1,
h2 {
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.65rem, 3vw, 2rem);
}

h2 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

p,
ul {
  margin: 0;
}

ul {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.35rem;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stack {
  display: grid;
  gap: 0.72rem;
}

.grid-form {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: 1fr;
}

.grid-form button {
  width: fit-content;
}

label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(110, 150, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.68rem 0.78rem;
  background: rgba(7, 13, 34, 0.68);
  color: var(--text-main);
}

textarea {
  resize: vertical;
}

input::placeholder {
  color: #7f89ab;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(70, 240, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(70, 240, 255, 0.13);
}

button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, #8ff8ff, #46f0ff);
  color: #020712;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 0.72rem 1.05rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 28px rgba(23, 196, 233, 0.42);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(3, 12, 34, 0.8);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.inline-form {
  display: inline-flex;
}

.inline-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.88rem;
  border: 1px solid rgba(110, 150, 255, 0.35);
  border-radius: 999px;
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(5, 12, 30, 0.44);
}

.inline-link:hover {
  border-color: rgba(70, 240, 255, 0.45);
  background: rgba(7, 13, 34, 0.8);
}

.muted {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.tiny {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.flash {
  margin: 0.95rem 0;
  padding: 0.72rem 0.88rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.flash-ok {
  background: rgba(53, 255, 176, 0.12);
  border-color: rgba(53, 255, 176, 0.32);
  color: #88ffd2;
}

.flash-error {
  background: rgba(255, 107, 129, 0.12);
  border-color: rgba(255, 107, 129, 0.32);
  color: #ff9aab;
}

.subtle-panel {
  margin-top: 1rem;
  border-top: 1px solid rgba(110, 150, 255, 0.2);
  padding-top: 1rem;
}

summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 500;
}

.subtle-panel[open] summary {
  margin-bottom: 0.7rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(110, 150, 255, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(7, 12, 30, 0.35);
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(110, 150, 255, 0.2);
  padding: 0.62rem;
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

tbody tr:hover td {
  background: rgba(70, 240, 255, 0.05);
}

td form {
  margin-right: 0.4rem;
  margin-bottom: 0.3rem;
}

.panel + .panel {
  margin-top: 1rem;
}

.user-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.user-card {
  border: 1px solid rgba(110, 150, 255, 0.22);
  border-radius: var(--radius-md);
  background: rgba(7, 13, 34, 0.45);
  padding: 1rem;
}

.user-card h3,
.user-card h4 {
  margin: 0;
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.user-card-email {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.user-card-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(70, 240, 255, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.user-card-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.user-card-meta dt {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.user-card-meta dd {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.user-card-actions {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(110, 150, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.user-edit-details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(110, 150, 255, 0.2);
}

.user-edit-details summary {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.user-edit-form {
  margin-top: 0.7rem;
  gap: 0.45rem;
}

.user-remove-form {
  margin-top: 0.65rem;
}

.user-remove-btn {
  border-color: rgba(255, 107, 129, 0.45);
  background: rgba(255, 107, 129, 0.18);
  color: #ffd4dc;
  box-shadow: none;
}

.user-remove-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 107, 129, 0.28);
}

.user-notes {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(110, 150, 255, 0.2);
}

.user-notes h4 {
  margin-bottom: 0.7rem;
}

.user-note-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.user-note-item {
  border: 1px solid rgba(110, 150, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  background: rgba(5, 10, 24, 0.48);
}

.user-note-item p {
  margin-top: 0.45rem;
  color: #d9e3ff;
  font-size: 0.9rem;
}

.user-note-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.user-note-author {
  margin-right: auto;
}

.user-note-delete-form {
  margin: 0;
}

.user-note-delete-btn {
  padding: 0.34rem 0.58rem;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 129, 0.5);
  background: rgba(255, 107, 129, 0.18);
  color: #ffd4dc;
  box-shadow: none;
}

.user-note-delete-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 107, 129, 0.28);
}

.user-note-form {
  gap: 0.5rem;
}

.thread-status-pill,
.thread-unread-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(110, 150, 255, 0.3);
  background: rgba(7, 13, 34, 0.56);
  color: var(--text-muted);
}

.thread-status-pill[data-status="open"] {
  color: #9dffd8;
  border-color: rgba(53, 255, 176, 0.38);
}

.thread-status-pill[data-status="closed"] {
  color: #ffd7df;
  border-color: rgba(255, 107, 129, 0.45);
}

.thread-unread-pill {
  color: #d5deff;
}

.thread-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lobby-thread-list,
.user-thread-list {
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.2rem;
  display: grid;
  gap: 0.5rem;
}

.lobby-thread-form,
.user-thread-form {
  margin-top: 0.7rem;
}

.thread-form-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.thread-inline-status[data-state="ok"] {
  color: #88ffd2;
}

.thread-inline-status[data-state="error"] {
  color: #ff9aab;
}

.thread-inline-status[data-state="pending"] {
  color: #ffd894;
}

.thread-message {
  border: 1px solid rgba(110, 150, 255, 0.22);
  border-radius: 12px;
  padding: 0.56rem 0.62rem;
  background: rgba(7, 13, 34, 0.48);
}

.thread-message.thread-message-mine {
  border-color: rgba(70, 240, 255, 0.42);
  background: rgba(70, 240, 255, 0.12);
}

.thread-message.thread-message-member {
  border-color: rgba(123, 255, 207, 0.34);
  background: rgba(123, 255, 207, 0.09);
}

.thread-message.thread-message-admin {
  border-color: rgba(110, 150, 255, 0.34);
}

.thread-message.thread-message-system {
  border-style: dashed;
  border-color: rgba(110, 150, 255, 0.34);
}

.thread-message.thread-message-deleted {
  opacity: 0.7;
}

.thread-message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.thread-message-head strong {
  font-size: 0.85rem;
}

.thread-message-body {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #d9e4ff;
  white-space: pre-line;
}

.thread-message-deleted {
  color: var(--text-muted);
}

.thread-message-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.thread-msg-btn {
  border-radius: 999px;
  border: 1px solid rgba(110, 150, 255, 0.35);
  background: rgba(7, 13, 34, 0.62);
  color: var(--text-main);
  box-shadow: none;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 0.34rem 0.58rem;
}

.thread-msg-btn:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(70, 240, 255, 0.45);
}

.thread-msg-btn.danger {
  border-color: rgba(255, 107, 129, 0.45);
  color: #ffd4dc;
}

.thread-msg-btn.danger:hover {
  border-color: rgba(255, 107, 129, 0.65);
}

.user-thread-section {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(110, 150, 255, 0.2);
}

.thread-summary-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.user-thread-preview {
  margin-top: 0.55rem;
  color: #d3ddff;
  font-size: 0.9rem;
}

.user-thread-meta {
  margin-top: 0.25rem;
}

.user-thread-details {
  margin-top: 0.65rem;
}

.user-thread-details summary {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.thread-admin-controls {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.thread-control-btn {
  border-radius: 999px;
  padding: 0.44rem 0.75rem;
  font-size: 10px;
}

.lobby-shell {
  position: relative;
  z-index: 1;
}

.lobby-shell .panel {
  border-radius: 22px;
  border: 1px solid rgba(115, 162, 255, 0.32);
  background:
    radial-gradient(circle at 100% -20%, rgba(70, 240, 255, 0.14), transparent 48%),
    linear-gradient(140deg, rgba(5, 9, 30, 0.95), rgba(8, 17, 42, 0.9));
  box-shadow: 0 20px 48px rgba(2, 7, 24, 0.52);
  backdrop-filter: blur(10px);
}

.lobby-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1rem;
  align-items: start;
}

.lobby-hero-main .muted {
  max-width: 58ch;
}

.lobby-hero-actions {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.lobby-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(115, 162, 255, 0.35);
  background: rgba(7, 13, 34, 0.56);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lobby-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8ca3d8;
  box-shadow: 0 0 10px rgba(140, 163, 216, 0.45);
}

.lobby-badge-ok {
  border-color: rgba(53, 255, 176, 0.4);
  color: #9dffd8;
}

.lobby-badge-ok::before {
  background: #35ffb0;
  box-shadow: 0 0 10px rgba(53, 255, 176, 0.65);
}

.lobby-badge-warn {
  border-color: rgba(255, 154, 171, 0.42);
  color: #ff9aab;
}

.lobby-badge-warn::before {
  background: #ff9aab;
  box-shadow: 0 0 10px rgba(255, 154, 171, 0.6);
}

.lobby-main-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
  height: 44px;
  text-align: center;
}

.lobby-secondary-cta,
.lobby-save-cta {
  height: 44px;
}

.lobby-secondary-cta {
  min-width: 132px;
}

.lobby-chip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.lobby-chip-list li,
.lobby-chip-list li + li {
  margin: 0;
}

.lobby-chip {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0.4rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 150, 255, 0.35);
  background: rgba(7, 13, 34, 0.62);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  overflow: hidden;
}

.lobby-chip-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lobby-chip-value {
  color: var(--text-main);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-chip-wide {
  grid-column: 1 / -1;
}

.lobby-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.lobby-grid > .panel,
.lobby-grid > .panel + .panel {
  margin-top: 0;
}

.lobby-panel {
  min-height: 220px;
}

.lobby-updates-panel {
  height: 400px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.lobby-updates-panel .lobby-panel-head,
.lobby-updates-panel .lobby-source {
  flex: 0 0 auto;
}

.lobby-updates-panel [data-updates-list] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.lobby-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.lobby-panel-head .inline-link {
  height: 40px;
}

.lobby-source {
  margin-top: -0.1rem;
  margin-bottom: 0.68rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lobby-system-row {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.lobby-system-item {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  min-height: 38px;
  padding: 0.45rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 150, 255, 0.3);
  background: rgba(7, 13, 34, 0.5);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-system-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8ca3d8;
  box-shadow: 0 0 8px rgba(140, 163, 216, 0.45);
  flex: 0 0 auto;
}

.lobby-system-item.is-ok::before {
  background: #35ffb0;
  box-shadow: 0 0 8px rgba(53, 255, 176, 0.65);
}

.lobby-system-item.is-warn::before {
  background: #ff9aab;
  box-shadow: 0 0 8px rgba(255, 154, 171, 0.65);
}

.lobby-list {
  display: grid;
  gap: 0.62rem;
}

.lobby-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(110, 150, 255, 0.24);
  background: rgba(7, 13, 34, 0.5);
}

.lobby-row-kind {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lobby-row-change {
  font-weight: 600;
  font-size: 0.86rem;
}

.lobby-row.up .lobby-row-change {
  color: var(--success);
}

.lobby-row.down .lobby-row-change {
  color: var(--danger);
}

.lobby-news-item {
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(110, 150, 255, 0.22);
  background: rgba(7, 13, 34, 0.52);
}

.lobby-news-title {
  font-weight: 600;
  margin-bottom: 0.34rem;
}

.lobby-news-body {
  color: var(--text-muted);
  white-space: pre-line;
  font-size: 0.94rem;
}

.lobby-news-meta {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby-message-item {
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(110, 150, 255, 0.22);
  background: rgba(7, 13, 34, 0.52);
}

.lobby-message-body {
  margin: 0;
  color: #dbe6ff;
  white-space: pre-line;
  font-size: 0.95rem;
}

.lobby-message-meta {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby-market-lower {
  grid-column: span 2;
}

.lobby-setup {
  grid-column: span 2;
}

.check-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(110, 150, 255, 0.22);
  border-radius: 12px;
  padding: 0.55rem 0.62rem;
  background: rgba(7, 13, 34, 0.44);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  color: var(--text-main);
}

.check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #46f0ff;
}

.lobby-links {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lobby-link-chip {
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 150, 255, 0.34);
  background: rgba(5, 12, 30, 0.44);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby-link-chip:hover {
  border-color: rgba(70, 240, 255, 0.5);
}

[data-prefs-status][data-state="ok"] {
  color: #88ffd2;
}

[data-prefs-status][data-state="error"] {
  color: #ff9aab;
}

[data-prefs-status][data-state="warn"] {
  color: #ffd894;
}

.lobby-stat-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.lobby-stat {
  border: 1px solid rgba(110, 150, 255, 0.24);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: rgba(7, 13, 34, 0.52);
  display: grid;
  gap: 0.18rem;
}

.lobby-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lobby-stat strong {
  font-size: 1.08rem;
}

@media (max-width: 880px) {
  .nav-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
  }

  .nav-actions {
    display: none;
  }

  .app-head {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-links {
    justify-content: flex-start;
  }

  .user-card-meta {
    grid-template-columns: 1fr;
  }

  .lobby-market-lower,
  .lobby-setup {
    grid-column: span 1;
  }

  .lobby-updates-panel {
    height: 360px;
    min-height: 360px;
  }

  .lobby-thread-list,
  .user-thread-list {
    max-height: 220px;
  }

  .lobby-hero {
    grid-template-columns: 1fr;
  }

  .lobby-hero-actions {
    justify-items: stretch;
  }

  .lobby-badge {
    justify-content: center;
  }

  .lobby-main-cta,
  .lobby-secondary-cta,
  .lobby-save-cta {
    height: 42px;
    width: 100%;
    max-width: none;
  }

  .lobby-chip {
    height: 38px;
    min-height: 38px;
  }

  .lobby-chip-label {
    font-size: 0.68rem;
  }

  .lobby-chip-value {
    font-size: 0.88rem;
  }

  .lobby-grid {
    grid-template-columns: 1fr;
  }

  .lobby-system-row {
    grid-template-columns: 1fr;
  }

  .lobby-setup {
    grid-column: span 1;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }
}
