.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.header {
  position: sticky; top: 12px; z-index: 50;
  margin: 12px auto 0;
  width: calc(100% - 24px); max-width: var(--max-w);
  padding: 0;
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--nav-h);
  padding: 0 10px 0 16px;
  border-radius: 100px;
  background: rgba(12, 12, 14, 0.62);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 40px rgba(0,0,0,0.4);
}
.brand {
  display: inline-flex; align-items: center;
  font-family: var(--sf);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.015em;
  flex-shrink: 0;
  padding-right: 4px;
}
.nav-cats {
  display: flex; gap: 2px; flex: 1;
  overflow-x: auto; scrollbar-width: none;
  min-width: 0;
}
.nav-cats::-webkit-scrollbar { display: none; }
.nav-cat {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  border: none;
  background: none;
}
.nav-cat:hover { color: var(--text); background: var(--surface); }
.nav-cat.active { color: var(--text); background: var(--surface-3); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.notif-menu { position: relative; }
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  padding: 0;
}
.notif-bell:hover { background: var(--surface); color: var(--text); }
.notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: rgba(22, 22, 24, 0.94);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: fade-up 0.18s var(--spring);
  z-index: 60;
  overflow: hidden;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}
.notif-dropdown[hidden] { display: none; }
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.notif-head-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.notif-head-action {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.notif-head-action:hover { color: var(--accent-2); }
.notif-empty { padding: 32px 14px; text-align: center; font-size: 13px; color: var(--text-3); }
.notif-list { overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  transition: background 0.12s var(--ease);
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item.is-unread { background: rgba(80,140,255,0.06); }
.notif-item.is-unread::before {
  content: '';
  position: absolute;
  left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.notif-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--surface-3);
}
.notif-icon-default {
  display: grid; place-items: center;
  font-size: 14px;
  background: var(--surface-3);
  color: var(--text-2);
}
.notif-meta { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-body { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.notif-dismiss {
  background: transparent;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
  align-self: flex-start;
}
.notif-dismiss:hover { color: var(--text); background: var(--surface-2); }

body.is-managing .header-inner {
  border-color: rgba(80,140,255,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 0 1px rgba(80,140,255,0.35),
    0 0 24px rgba(80,140,255,0.22),
    0 12px 40px rgba(0,0,0,0.4);
}
body.is-admin-override .header-inner {
  border-color: rgba(255,69,58,0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 0 1px rgba(255,69,58,0.45),
    0 0 28px rgba(255,69,58,0.28),
    0 12px 40px rgba(0,0,0,0.4) !important;
}

.dd-search-wrap {
  padding: 4px 4px 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 6px;
}
.dd-search {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.dd-search:focus { border-color: var(--accent); }
.dd-label-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--hairline);
  color: var(--red) !important;
}
.dd-label-count {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255,69,58,0.14);
  color: var(--red);
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,69,58,0.3);
}
.dd-label-hint { padding: 6px 10px; font-size: 11px; color: var(--text-3); font-style: italic; }
.dd-label-loading { animation: dd-pulse 1.2s ease-in-out infinite; }
@keyframes dd-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.dd-empty-search { padding: 12px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.dd-channel.is-admin .dd-channel-role { color: var(--red); }
.dd-channel.is-admin:hover { background: rgba(255,69,58,0.06); }

.log-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  transition: all 0.15s var(--ease);
}
.log-admin-toggle:has(input:checked) {
  background: rgba(255,69,58,0.10);
  border-color: rgba(255,69,58,0.4);
  color: var(--red);
}
.log-admin-toggle input { display: none; }
.log-admin-toggle-pip {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.log-admin-toggle:has(input:checked) .log-admin-toggle-pip {
  background: var(--red);
  border-color: var(--red);
}
.log-admin-toggle:has(input:checked) .log-admin-toggle-pip::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}
.log-admin-toggle-label { font-weight: 500; }

.log-channel {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(80,140,255,0.10);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.user-menu { position: relative; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.user-chip:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip-caret { color: var(--text-3); flex-shrink: 0; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: rgba(22, 22, 24, 0.94);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: fade-up 0.18s var(--spring);
  z-index: 60;
}
.dd-group { display: grid; gap: 2px; }
.dd-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px 4px;
}
.dd-channel {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
  color: var(--text);
}
.dd-channel:hover { background: var(--surface-2); }
.dd-channel.active { background: var(--accent-tint); }
.dd-channel img { width: 32px; height: 32px; border-radius: 50%; }
.dd-channel-fallback { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); }
.dd-channel-text { display: grid; gap: 1px; }
.dd-channel-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.dd-channel-role { font-size: 11px; color: var(--text-3); }
.dd-channel-check { color: var(--accent-2); display: flex; }
.dd-divider { height: 1px; background: var(--hairline); margin: 4px 6px; }
.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 13.5px;
  color: var(--text);
  transition: background 0.12s;
}
.dd-item:hover { background: var(--surface-2); }
.dd-item-icon { color: var(--text-3); display: flex; }
.dd-item:hover .dd-item-icon { color: var(--text); }
.dd-item-danger:hover { background: rgba(255,69,58,0.1); color: var(--red); }
.dd-item-danger:hover .dd-item-icon { color: var(--red); }

.invite-banner-wrap {
  margin: 12px auto 0;
  width: calc(100% - 24px); max-width: var(--max-w);
  display: grid; gap: 8px;
}
.invite-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--accent-tint);
  border: 1px solid rgba(10,132,255,0.3);
  border-radius: var(--r);
}
.invite-banner img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.invite-banner-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}
.invite-banner-text strong { color: var(--accent-2); font-weight: 600; }

.invite-form {
  display: flex; gap: 8px;
}
.invite-form input { flex: 1; }

.manager-list {
  display: grid; gap: 6px;
}
.manager-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.manager-row img { width: 36px; height: 36px; border-radius: 50%; }
.manager-avatar-fallback { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); }
.manager-info { display: grid; gap: 2px; }
.manager-name { font-size: 14px; font-weight: 500; color: var(--text); }
.manager-meta { font-family: var(--sf-mono); font-size: 12px; color: var(--text-3); }

.log-row {
  display: grid;
  grid-template-columns: 80px 90px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 6px 16px;
  font-family: var(--sf-mono);
  font-size: 12px;
  border-bottom: 1px solid var(--hairline);
}
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: var(--surface); }
.log-time { color: var(--text-3); font-size: 11px; }
.log-scope {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.log-msg { color: var(--text); word-break: break-word; }
.log-warn .log-msg { color: var(--orange); }
.log-error .log-msg { color: var(--red); }

.invite-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  align-items: center;
}
.invite-code-main { display: grid; gap: 4px; min-width: 0; }
.invite-code-value {
  font-size: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: var(--accent-2);
}
.invite-code-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
  align-items: center;
}
.invite-code-note { color: var(--text-2); font-weight: 500; }

.overlay-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.overlay-row-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.overlay-row-hint { font-size: 11.5px; margin-top: 2px; }
.overlay-row-url {
  font-size: 11.5px;
  color: var(--accent-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.overlay-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 200px;
}
.pos-cell {
  height: 56px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.15s var(--ease);
}
.pos-cell:hover { background: var(--surface-3); color: var(--text-2); }
.pos-cell.active {
  background: var(--accent-tint);
  color: var(--accent-2);
  border-color: var(--accent);
}
.pos-cell-empty {
  background: transparent;
  border: none;
}

.pos-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pos-pill {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-transform: capitalize;
}
.pos-pill:hover { background: var(--surface-3); color: var(--text); }
.pos-pill.active {
  background: var(--accent-tint);
  color: var(--accent-2);
  border-color: var(--accent);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.15s var(--ease);
}
.slider-row:hover { border-color: var(--border-2); }
.slider-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--slider-fill, 50%), var(--surface-3) var(--slider-fill, 50%), var(--surface-3) 100%);
  border-radius: 100px;
  outline: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.12s var(--ease);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-webkit-slider-thumb:active { transform: scale(1.25); }
.slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.4);
}
.slider::-moz-range-progress { background: var(--accent); border-radius: 100px; height: 6px; }
.slider-value {
  min-width: 48px;
  text-align: right;
  font-size: 12.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sound-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sound-field input { flex: 1; }
.sound-field .btn { flex-shrink: 0; }

.accent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.accent-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.accent-field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}
.color-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 4px;
}
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 6px; }
.accent-hex {
  font-size: 12.5px !important;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay-preview {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(10,132,255,0.15), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(191,90,242,0.12), transparent 50%),
    linear-gradient(135deg, #1a1a22, #0f0f15);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}
.overlay-preview-frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: transparent;
}
.overlay-preview-label {
  position: absolute;
  bottom: 8px; right: 12px;
  font-size: 10px;
  font-family: var(--sf-mono);
  color: var(--text-4);
  letter-spacing: 0.04em;
  pointer-events: none;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .overlay-row { grid-template-columns: 1fr; }
  .overlay-row-url { white-space: normal; word-break: break-all; }
}

.sr-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
}
.sr-control-label { display: grid; gap: 2px; }
.sr-add { display: flex; gap: 8px; }
.sr-add input { min-width: 360px; }

.player-shell {
  margin: 12px auto 0;
  max-width: var(--max-w);
  padding: 0 clamp(20px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 12px auto 0;
  width: calc(100% - 24px);
  max-width: var(--max-w);
}
.player-shell[hidden] { display: none; }
.player-iframe-host {
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.player-iframe-host:empty { display: none; }
.player-shell iframe { display: block; border-radius: var(--r); }
.player-now-playing {
  padding: 4px 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.player-now-playing:empty { display: none; }
.player-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

body:not(.view-songrequests) .player-shell {
  position: fixed;
  bottom: 16px;
  right: 16px;
  margin: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 40;
  padding: 14px;
  background: rgba(15, 15, 18, 0.96);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--border-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
}
body:not(.view-songrequests) .player-iframe-host {
  height: 80px;
  margin-bottom: 8px;
}
body:not(.view-songrequests) .player-shell iframe {
  width: 100%;
  height: 80px !important;
}
body:not(.view-songrequests) .sr-spotify-note { display: none; }

.sr-spotify-host { min-height: 44px; }
body:not(.view-songrequests) .sr-spotify-host { min-height: 44px; }

.sr-spotify-sdk {
  display: flex;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(29,185,84,0.08), rgba(29,185,84,0.02));
  border: 1px solid rgba(29,185,84,0.2);
  border-radius: var(--r-lg);
  align-items: center;
}
.sr-spotify-art {
  width: 84px; height: 84px;
  border-radius: var(--r);
  object-fit: cover;
  flex-shrink: 0;
}
.sr-spotify-art-fallback { background: var(--surface-3); }
.sr-spotify-meta { display: grid; gap: 4px; min-width: 0; flex: 1; }
.sr-spotify-status {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1DB954;
}
.sr-spotify-track {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-spotify-author {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-status {
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 13.5px;
  border: 1px solid;
}
.spotify-status-ok {
  background: rgba(29,185,84,0.08);
  border-color: rgba(29,185,84,0.3);
  color: var(--text);
}
.spotify-status-warn {
  background: rgba(255,159,10,0.08);
  border-color: rgba(255,159,10,0.3);
  color: var(--text);
}
.spotify-setup {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.spotify-setup summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  user-select: none;
}
.spotify-setup summary:hover { color: var(--text); }
.spotify-steps {
  margin: 12px 0 4px 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.spotify-creds-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.spotify-creds-form input { width: 100%; }
.sr-iframe { border: 0; }
.sr-empty {
  padding: 60px 20px;
  text-align: center;
  background: var(--surface-2);
  border-radius: var(--r);
  border: 1px dashed var(--border);
}
.sr-now-playing {
  padding: 8px 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sr-now-thumb {
  width: 64px; height: 64px;
  border-radius: var(--r);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
}
.sr-now-thumb-fallback {
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.sr-now-meta { display: grid; gap: 3px; min-width: 0; flex: 1; }
.sr-now-meta > .source-tag { justify-self: start; margin-bottom: 2px; }
.sr-now-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-now-author {
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-now-by { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.sr-spotify-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 7px;
  background: rgba(29,185,84,0.07);
  border: 1px solid rgba(29,185,84,0.18);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-2);
  width: fit-content;
}
.sr-spotify-mini-logo {
  display: inline-flex;
  width: 14px; height: 14px;
  color: #1DB954;
  flex-shrink: 0;
}
.sr-spotify-mini-logo svg { width: 100%; height: 100%; }
.sr-spotify-mini-status {
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.sr-spotify-mini-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  margin-left: 2px;
}
.sr-spotify-bar {
  width: 2px;
  background: #1DB954;
  border-radius: 1px;
  animation: sr-spotify-pulse 1.1s ease-in-out infinite;
}
.sr-spotify-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.sr-spotify-bar:nth-child(2) { height: 90%; animation-delay: 0.18s; }
.sr-spotify-bar:nth-child(3) { height: 60%; animation-delay: 0.36s; }
.sr-spotify-bar:nth-child(4) { height: 80%; animation-delay: 0.54s; }
@keyframes sr-spotify-pulse {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}
.sr-player-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.sr-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 180px;
  min-width: 0;
  padding: 7px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  height: 36px;
  box-sizing: border-box;
}
.sr-volume-icon {
  display: inline-flex;
  color: var(--text-2);
  flex-shrink: 0;
}
.sr-volume-value {
  font-size: 11.5px;
  color: var(--text-3);
  width: 42px;
  text-align: right;
  flex-shrink: 0;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.sr-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 60px;
  height: 4px;
  background: linear-gradient(to right,
    var(--accent) 0%,
    var(--accent) calc(var(--vol, 70%)),
    var(--surface-3) calc(var(--vol, 70%)),
    var(--surface-3) 100%);
  border-radius: 100px;
  outline: none;
  padding: 0;
  margin: 0;
}
.sr-volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 100px;
  background: transparent;
}
.sr-volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 100px;
  background: transparent;
}
.sr-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid var(--accent);
  margin-top: -5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.sr-volume-slider::-webkit-slider-thumb:hover {
  background: var(--accent);
}
.sr-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid var(--accent);
}

.sr-source-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hairline);
  flex-shrink: 0;
}

.sr-queue-list { display: grid; gap: 0; }
.sr-queue-row {
  display: grid;
  grid-template-columns: 32px 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hairline);
}
.sr-queue-row:last-child { border-bottom: none; }
.sr-queue-row:hover { background: var(--surface); }
.sr-queue-pos {
  font-family: var(--sf-mono);
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.sr-queue-thumb {
  width: 56px; height: 42px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
}
.sr-queue-thumb-fallback {
  background: var(--surface-3);
}
.sr-queue-meta { display: grid; gap: 4px; min-width: 0; }
.sr-queue-title {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-queue-sub {
  display: flex; gap: 10px;
  font-size: 11.5px;
  align-items: center;
}
.sr-queue-actions { display: flex; gap: 6px; }
.sr-spotify-iframe { background: var(--surface-2); }
.sr-spotify-note {
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--text-3);
  background: rgba(48,209,88,0.06);
  border-radius: var(--r-sm);
  margin-top: 8px;
}

.sr-settings-card { margin-top: 14px; }
.sr-settings-grid { display: grid; gap: 0; padding: 0 !important; }
.sr-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
}
.sr-setting-row:last-child { border-bottom: none; }
.sr-setting-title {
  font-size: 14px; font-weight: 500; color: var(--text);
  letter-spacing: -0.005em;
}
.sr-setting-hint { font-size: 12px; margin-top: 2px; line-height: 1.4; max-width: 480px; }
.sr-setting-num { width: 100px; text-align: right; font-family: var(--sf-mono); }

.sr-inline-warn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, #ff9f0a 12%, transparent);
  border: 1px solid color-mix(in srgb, #ff9f0a 35%, transparent);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}
.sr-inline-warn-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-family: var(--sf);
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  background: #ff9f0a;
  color: #1a1a1a;
}
.sr-inline-warn-text { flex: 1; min-width: 0; }
.sr-inline-warn-text strong { color: var(--text); font-weight: 600; }
.sr-inline-warn-link {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1a1a1a;
  background: #ff9f0a;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.sr-inline-warn-link:hover { background: #ffb441; }
@media (max-width: 640px) {
  .sr-inline-warn { flex-wrap: wrap; }
  .sr-inline-warn-link { margin-left: 34px; }
}

@media (max-width: 720px) {
  .sr-controls { grid-template-columns: 1fr; }
  .sr-add input { min-width: 0; flex: 1; }
  .sr-setting-row { flex-direction: column; align-items: flex-start; }
}

.main { padding: 28px 0 80px; }

.view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.view-head h1, .view-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--text);
}
.view-head .sub {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-2);
  max-width: 640px;
  line-height: 1.5;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 100px;
  font-family: var(--sf);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
}
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }
.btn-icon { display: inline-flex; align-items: center; }
.btn-icon-only { padding: 6px 8px; }
.btn-icon-only .btn-icon { width: 14px; height: 14px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 5px 11px; font-size: 12px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-tint { background: var(--accent-tint); color: var(--accent-2); }
.btn-tint:hover { background: rgba(10,132,255,0.22); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--border-3); }
.btn-ghost { color: var(--text-2); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-danger { color: var(--red); background: rgba(255,69,58,0.1); }
.btn-danger:hover { background: rgba(255,69,58,0.16); }

.field { margin-bottom: 14px; }
.field label, label.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
  text-transform: none;
}
.input,
input:not([type=range]):not([type=color]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]):not([type=hidden]),
textarea, select {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--sf);
  font-size: 14px;
  letter-spacing: -0.005em;
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.input:hover,
input:not([type=range]):not([type=color]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]):not([type=hidden]):hover,
textarea:hover, select:hover {
  background: var(--surface-3);
  border-color: var(--border-2);
}
.input:focus,
input:not([type=range]):not([type=color]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]):not([type=hidden]):focus,
textarea:focus, select:focus {
  border-color: var(--accent);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 0.4; }
input[type=number]:focus::-webkit-inner-spin-button,
input[type=number]:focus::-webkit-outer-spin-button { opacity: 1; }
input::placeholder, textarea::placeholder {
  color: var(--text-3);
  font-weight: 400;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea {
  font-family: var(--sf-mono);
  font-size: 13.5px;
  min-height: 76px;
  resize: vertical;
  line-height: 1.5;
}
.input-mono { font-family: var(--sf-mono); font-size: 13.5px; letter-spacing: 0; }
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='rgba(235,235,245,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.msg-field {
  display: grid;
  gap: 8px;
}
.msg-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0;
}
.msg-field .msg-input {
  font-family: var(--sf-mono);
  font-size: 14px;
  padding: 14px 16px;
}

.var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.var-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font-family: var(--sf);
}
.var-chip:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
}
.var-chip-name {
  font-family: var(--sf-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.var-chip-sample {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  padding-left: 8px;
  border-left: 1px solid var(--border-2);
  letter-spacing: 0;
}
.var-chip:hover .var-chip-sample { color: var(--text-2); }

.msg-preview {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(10, 132, 255, 0.04);
  border: 1px solid var(--accent-tint);
  border-radius: var(--r);
  font-size: 14px;
  margin-top: 4px;
}
.msg-preview-bot {
  font-weight: 600;
  color: var(--accent-2);
  font-size: 13.5px;
  margin-right: 6px;
}
.msg-preview-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.status-grid {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.status-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.status-row-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.status-row-hint {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.45;
}
.status-icon {
  width: 22px; height: 22px;
  border-radius: 100px;
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.status-icon-ok { background: rgba(48,209,88,0.18); color: var(--green); }
.status-icon-warn { background: rgba(255,159,10,0.18); color: var(--orange); }
.status-row.status-bad { border-color: rgba(255,159,10,0.25); background: rgba(255,159,10,0.04); }

.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.toggle input { display: none; }
.toggle .pip {
  width: 40px; height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  position: relative;
  transition: all 0.18s var(--ease);
}
.toggle .pip::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  transition: all 0.22s var(--spring);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.toggle input:checked + .pip {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle input:checked + .pip::after { left: 18px; background: #fff; }

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  transition: all 0.15s var(--ease);
}
.radio-pill:hover { border-color: var(--border); }
.radio-pill input {
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
  margin: 0;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.radio-pill input:checked { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 4px, transparent 5px); }
.radio-pill:has(input:checked) {
  background: rgba(80,140,255,0.08);
  border-color: var(--accent);
  color: var(--text);
}
.radio-pill.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--text-3);
}
.radio-pill.is-disabled input { cursor: not-allowed; }

.designer-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 880px) {
  .designer-wrap { grid-template-columns: 1fr; }
}
.designer-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.designer-stage-checker {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.04) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}
.designer-iframe {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}
.designer-stage-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
}
.designer-controls { display: grid; gap: 18px; }
.designer-block { display: grid; gap: 8px; }
.designer-block-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.designer-block-desc { font-size: 12px; line-height: 1.4; }
.designer-pills {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  gap: 2px;
  width: fit-content;
}
.designer-pill {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.designer-pill:hover { color: var(--text); }
.designer-pill.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 1px var(--border);
}
.designer-pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 4px;
}
.designer-pos {
  width: 36px; height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s var(--ease);
}
.designer-pos:hover { border-color: var(--border-2); color: var(--text); }
.designer-pos.active {
  background: rgba(80,140,255,0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.designer-pos-empty { width: 36px; height: 36px; }
.designer-triggers { display: flex; gap: 6px; flex-wrap: wrap; }
.designer-accents { display: flex; gap: 8px; flex-wrap: wrap; }
.designer-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.designer-labels { display: grid; gap: 6px; }
.designer-label-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 10px;
}
.designer-label-name {
  font-size: 12.5px;
  color: var(--text-3);
}
.designer-label-input {
  padding: 7px 10px !important;
  font-size: 13px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
}
.designer-label-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-tint) !important;
}

.designer-accent input[type=color] {
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.theme-picker-wrap { display: grid; gap: 18px; }
.theme-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: center;
}
.theme-row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.theme-row-controls { display: grid; gap: 6px; min-width: 0; }
.theme-pills {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  gap: 2px;
  width: fit-content;
}
.theme-pill {
  background: transparent;
  border: 0;
  padding: 7px 18px;
  border-radius: 6px;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.theme-pill:hover { color: var(--text); }
.theme-pill.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 1px var(--border);
}
.theme-current-desc { font-size: 12.5px; }

@media (max-width: 580px) {
  .theme-row { grid-template-columns: 1fr; gap: 8px; }
  .theme-pills { width: 100%; }
  .theme-pill { flex: 1; padding: 7px 12px; }
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.theme-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s var(--ease);
  font: inherit;
  color: inherit;
}
.theme-tile:hover { border-color: var(--border-2); transform: translateY(-2px); }
.theme-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 28px rgba(80,140,255,0.18);
}
.theme-preview {
  height: 88px;
  background: #0a0a0a;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.theme-meta { padding: 10px 12px; }
.theme-name { font-size: 13px; font-weight: 600; color: var(--text); }
.theme-hint { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.theme-mini {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 0.06em;
  min-width: 120px;
}
.theme-mini .tm-icon { width: 20px; height: 20px; border-radius: 4px; background: rgba(80,140,255,0.4); margin-bottom: 4px; }
.theme-mini .tm-label { font-weight: 600; opacity: 0.6; font-size: 8px; letter-spacing: 0.16em; }
.theme-mini .tm-title { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.theme-mini .tm-q-label { font-size: 7px; opacity: 0.6; letter-spacing: 0.18em; font-weight: 600; }
.theme-mini .tm-q-title { font-size: 11px; font-weight: 600; color: #fff; }
.theme-mini .tm-q-row { display: flex; gap: 6px; font-size: 9px; opacity: 0.7; }

.theme-mini-glass {
  background: linear-gradient(135deg, rgba(20,20,24,0.92), rgba(28,28,32,0.88));
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}
.theme-mini-glass .tm-icon { background: rgba(80,140,255,0.25); }
.theme-mini-burst {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,111,141,0.3) 0%, transparent 60%),
    linear-gradient(180deg, rgba(18,18,22,0.96), rgba(12,12,15,0.98));
  border: 1px solid rgba(255,111,141,0.35);
  box-shadow: 0 0 16px rgba(255,111,141,0.25);
  color: #fff;
}
.theme-mini-burst .tm-icon { background: #ff6f8d; box-shadow: 0 0 12px rgba(255,111,141,0.6); border-radius: 6px; }
.theme-mini-burst .tm-title { background: linear-gradient(180deg, #fff, #ffb3c0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-mini-wave {
  background: linear-gradient(90deg, rgba(0,0,0,0.94), rgba(0,0,0,0.4) 80%, transparent);
  border: none;
  border-left: 3px solid #4ca8ff;
  border-radius: 0;
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  padding: 8px 14px 8px 10px;
  position: relative;
  overflow: hidden;
}
.theme-mini-wave::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100px 30px at 0% 100%, rgba(76,168,255,0.4), transparent 70%);
  pointer-events: none;
}
.theme-mini-wave .tm-icon { width: 14px; height: 14px; background: transparent; border: 1px solid #4ca8ff; border-radius: 4px; }
.theme-mini-wave .tm-label { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 7px; letter-spacing: 0.22em; color: #4ca8ff; }
.theme-mini-wave .tm-title { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 18px; letter-spacing: 0.02em; line-height: 1; }
.theme-mini-wave .tm-q-label { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.22em; font-size: 7px; }
.theme-mini-wave .tm-q-title { font-family: 'Bebas Neue', sans-serif; font-size: 14px; }

.team-wrap { display: grid; gap: 28px; }
.team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.team-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.team-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.team-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.team-stat-label { font-size: 12px; color: var(--text-3); }
.team-stat-green .team-stat-num { color: var(--green); }
.team-stat-orange .team-stat-num { color: var(--orange); }

.team-section { display: grid; gap: 14px; }
.team-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-section-head h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.team-section-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  color: var(--text-3);
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.team-empty {
  padding: 24px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--text-3);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  display: grid;
  gap: 14px;
  position: relative;
  transition: all 0.15s var(--ease);
}
.team-card:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.team-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.team-action-btn span { display: inline-flex; }
.team-action-edit { flex: 1; }
.team-action-edit:hover {
  border-color: var(--accent);
  background: rgba(80,140,255,0.08);
  color: var(--accent);
}
.team-action-remove {
  flex: 0 0 36px;
  width: 36px;
  padding: 0;
  color: var(--red);
  border-color: rgba(255,69,58,0.25);
  background: rgba(255,69,58,0.06);
}
.team-action-remove:hover {
  background: rgba(255,69,58,0.18);
  border-color: rgba(255,69,58,0.5);
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}
.team-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-2);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.team-card-meta { flex: 1; min-width: 0; }
.team-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-card-login { font-size: 12.5px; color: var(--text-3); }

.team-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.team-status-active { background: var(--green); box-shadow: 0 0 0 3px rgba(48,209,88,0.18); }
.team-status-pending { background: var(--orange); box-shadow: 0 0 0 3px rgba(255,159,10,0.18); }
.team-status-declined { background: var(--text-3); }

.team-perms { display: grid; gap: 6px; }
.team-perms-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.team-perms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.team-perm-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.team-perm-pill.team-perm-full {
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  border-color: rgba(80,140,255,0.3);
  font-weight: 600;
}

.team-card-foot {
  display: flex;
  gap: 6px;
  align-items: stretch;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  margin-top: 2px;
}

.debug-results {
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 6px;
}
.debug-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: all 0.12s var(--ease);
}
.debug-user-row:hover { background: var(--surface-3); border-color: var(--border-2); }
.debug-user-row img,
.debug-user-row .team-avatar-sm { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.debug-user-row.is-blocked { background: rgba(255,69,58,0.06); border-color: rgba(255,69,58,0.2); }
.debug-user-meta { flex: 1; min-width: 0; }
.debug-user-name { font-size: 13.5px; font-weight: 500; }
.debug-user-login { font-size: 11.5px; }

.debug-detail {
  display: grid;
  gap: 18px;
}
.debug-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.debug-detail-avatar { width: 56px; height: 56px; border-radius: 50%; }
.debug-detail-name { font-size: 16px; font-weight: 600; }
.debug-detail-login { font-size: 12.5px; margin-top: 2px; }
.debug-blocked-banner {
  margin-top: 6px;
  font-size: 12px;
  color: var(--red);
  background: rgba(255,69,58,0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,69,58,0.25);
  display: inline-block;
}
.debug-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.debug-detail-list { }
.debug-table {
  width: 100%;
  font-size: 12.5px;
}
.debug-table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--hairline);
}
.debug-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
}

.session-games { display: grid; gap: 6px; }
.session-game-row {
  position: relative;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.session-game-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(80,140,255,0.18), rgba(80,140,255,0.04));
  border-right: 1px solid rgba(80,140,255,0.4);
}
.session-game-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.session-game-name { font-weight: 500; color: var(--text); }
.session-game-time { font-size: 11.5px; }
.session-game-extra {
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(80,140,255,0.14);
  color: var(--accent);
  border: 1px solid rgba(80,140,255,0.3);
  vertical-align: 1px;
}

.counters-grid { display: grid; gap: 8px; }
.counter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.counter-row input[type=color] {
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}
.counter-row .counter-row-name {
  flex: 1;
  min-width: 120px;
}
.counter-row-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.counter-row-controls button {
  width: 32px;
  padding: 4px 0;
  font-size: 18px;
  font-weight: 700;
}
.counter-row-value {
  width: 70px !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.card-head-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.card-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.card-head-text { flex: 1; min-width: 0; }
.card-head-text h3 { margin: 0; }

.settings-nav-item.is-danger.active {
  border-color: rgba(255,69,58,0.45);
  box-shadow: 0 2px 8px rgba(255,69,58,0.18);
}
.settings-nav-item.is-danger.active .settings-nav-icon {
  background: rgba(255,69,58,0.14);
  color: var(--red);
}
.settings-nav-item.is-danger .settings-nav-label { color: var(--red); }

.overlay-empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 64px 28px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  text-align: center;
}
.overlay-empty-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.overlay-empty-icon svg { width: 28px; height: 28px; }
.overlay-empty-state h3 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.overlay-empty-state p { margin: 0; font-size: 13.5px; color: var(--text-2); max-width: 420px; line-height: 1.5; }

.overlay-section-head {
  margin: 32px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.overlay-section-head:first-child { margin-top: 0; }
.overlay-section-head h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}
.overlay-section-head .sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
}
.overlay-section-head.is-danger h3 { color: var(--red); }

.token-card { border-color: rgba(255,69,58,0.25); }
.token-card .card-head { border-bottom: 1px solid var(--hairline); padding-bottom: 12px; }
.token-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
}
.token-display {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
}
.token-danger {
  background: rgba(255,69,58,0.06);
  border: 1px solid rgba(255,69,58,0.25);
  border-radius: var(--r);
  padding: 14px 16px;
}
.token-danger-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.token-danger-icon { display: inline-flex; color: var(--red); }
.token-danger-head strong { font-size: 14px; color: var(--red); }
.token-danger-body { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.token-danger-body ul { margin: 4px 0 12px 20px; padding: 0; }
.token-danger-body li { margin: 2px 0; }
.token-danger-warn {
  padding: 10px 12px;
  background: rgba(255,69,58,0.1);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  margin: 8px 0;
  color: var(--text);
}

.reauth-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,159,10,0.14);
  border: 1px solid rgba(255,159,10,0.4);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  z-index: 60;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.reauth-toast-icon { display: inline-flex; color: var(--orange); }
.reauth-toast a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.reauth-toast-close {
  background: transparent;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  margin-left: 4px;
}
.reauth-toast-close:hover { color: var(--text); }

.reauth-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255,159,10,0.1);
  border: 1px solid rgba(255,159,10,0.3);
  border-radius: var(--r);
}
.reauth-banner strong { color: var(--orange); }

.sounds-list, .widgets-list { display: grid; gap: 8px; }
.sound-row, .widget-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.sound-row:hover, .widget-row:hover { border-color: var(--border-2); }
.sound-row-meta, .widget-row > div:first-child { flex: 1; min-width: 0; }
.sound-row-name, .widget-row-name { font-size: 14px; font-weight: 500; }
.sound-row-url, .widget-row-slug {
  font-size: 11.5px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.sound-row-info { font-size: 11px; margin-top: 2px; }
.sound-row-actions, .widget-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.timer-edit-display {
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.streamer-totals-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(80,140,255,0.10), rgba(80,140,255,0.02));
  border: 1px solid rgba(80,140,255,0.25);
  border-radius: var(--r-lg);
}
.streamer-totals-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(80,140,255,0.18);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.streamer-totals-meta { flex: 1; min-width: 0; }
.streamer-totals-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.streamer-totals-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
}
.streamer-totals-sub {
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  gap: 12px;
  align-items: center;
}
.streamer-totals-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--red);
}
.streamer-totals-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255,69,58,0.18);
  animation: streamer-live-pulse 1.6s ease-in-out infinite;
}
@keyframes streamer-live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.webhook-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.15s var(--ease);
}
.webhook-row:hover { border-color: var(--border-2); }
.webhook-row.is-disabled { opacity: 0.55; }
.webhook-row-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(88,101,242,0.18);
  color: #5865F2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.webhook-row-meta { flex: 1; min-width: 0; }
.webhook-row-name { font-size: 14px; font-weight: 600; color: var(--text); }
.webhook-row-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.webhook-trigger-pill {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  border: 1px solid rgba(80,140,255,0.3);
  border-radius: 999px;
}
.webhook-role-pill {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(88,101,242,0.14);
  color: #9aa9f5;
  border: 1px solid rgba(88,101,242,0.3);
  border-radius: 999px;
  font-family: var(--mono);
}
.webhook-row-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.webhook-var-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.team-pending-list {
  display: grid;
  gap: 8px;
}
.team-pending-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.15s var(--ease);
}
.team-pending-row:hover { border-color: var(--border-2); }
.team-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-2);
}
.team-pending-meta { flex: 1; min-width: 0; }
.team-pending-name { font-size: 14px; font-weight: 500; color: var(--text); }
.team-pending-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.team-pending-sep { color: var(--text-3); }
.team-pending-cancel {
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.team-pending-cancel:hover { background: rgba(255,69,58,0.12); color: var(--red); }

.manager-perms-line { margin-top: 4px; }
.manager-perm-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.manager-perm-pill.manager-perm-full {
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  border-color: rgba(80,140,255,0.3);
}

.manager-permissions-intro {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.perm-full-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.perm-full-card:hover { border-color: var(--border-2); background: var(--surface-3); }
.perm-full-card:has(input:checked) {
  background: rgba(80,140,255,0.08);
  border-color: var(--accent);
}
.perm-full-card input {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}
.perm-full-meta { display: grid; gap: 2px; flex: 1; }
.perm-full-title { font-size: 14px; font-weight: 600; color: var(--text); }
.perm-full-sub { font-size: 12px; color: var(--text-3); }

.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  transition: opacity 0.15s var(--ease);
}
.perm-grid.is-locked {
  opacity: 0.45;
  pointer-events: none;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.12s var(--ease);
  font-size: 13.5px;
  user-select: none;
}
.perm-check:hover { background: var(--surface-3); border-color: var(--border-2); }
.perm-check.is-checked {
  background: rgba(80,140,255,0.08);
  border-color: var(--accent);
}
.perm-check input {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}
.perm-check-label { flex: 1; }

.cmd-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cmd-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.cmd-search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: inline-flex;
}
.cmd-search {
  width: 100%;
  padding-left: 38px !important;
}
.cmd-tabs {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.cmd-tab {
  background: transparent;
  border: 0;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.cmd-tab:hover { color: var(--text); }
.cmd-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(80,140,255,0.3); }

.cmd-section-head {
  margin: 32px 0 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.cmd-section-head:first-child { margin-top: 0; }
.cmd-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.cmd-section-sub { font-size: 12.5px; color: var(--text-3); }

.cmd-builtin-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.cmd-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cmd-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.cmd-group-icon {
  display: inline-flex;
  width: 26px; height: 26px;
  background: rgba(80,140,255,0.12);
  color: var(--accent);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}
.cmd-group-title { font-size: 14px; font-weight: 600; flex: 1; }
.cmd-group-count {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.cmd-builtin-list { display: grid; }
.cmd-builtin-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  transition: all 0.15s var(--ease);
}
.cmd-builtin-row:last-child { border-bottom: 0; }
.cmd-builtin-row:hover { background: rgba(255,255,255,0.02); }
.cmd-builtin-row.is-disabled {
  opacity: 0.45;
}
.cmd-builtin-row.is-disabled .cmd-builtin-name {
  text-decoration: line-through;
}
.cmd-builtin-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cmd-toggle-rows {
  display: grid;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.cmd-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.12s var(--ease);
  border-bottom: 1px solid var(--hairline);
}
.cmd-toggle-row:last-child { border-bottom: 0; }
.cmd-toggle-row:hover { background: var(--surface-3); }
.cmd-toggle-meta { flex: 1; min-width: 0; }
.cmd-toggle-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.cmd-toggle-hint { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }

.toggle-sm,
.cmd-builtin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.cmd-builtin-toggle { margin-left: auto; }
.toggle-sm input,
.cmd-builtin-toggle input { display: none; }
.toggle-sm .pip,
.cmd-builtin-toggle .pip {
  width: 32px; height: 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  position: relative;
  transition: all 0.18s var(--ease);
  flex-shrink: 0;
}
.toggle-sm .pip::after,
.cmd-builtin-toggle .pip::after {
  content: '';
  position: absolute;
  top: 1px; left: 1px;
  width: 14px; height: 14px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  transition: all 0.22s var(--spring);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.toggle-sm input:checked + .pip,
.cmd-builtin-toggle input:checked + .pip {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-sm input:checked + .pip::after,
.cmd-builtin-toggle input:checked + .pip::after { left: 14px; background: #fff; }
.cmd-builtin-name {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  padding: 0;
}
.cmd-builtin-args {
  color: var(--text-3);
  font-weight: 400;
  font-size: 12.5px;
}
.cmd-builtin-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.cmd-builtin-example {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: 6px;
  border: 1px solid var(--hairline);
  font-size: 11.5px;
}
.cmd-builtin-example-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-shrink: 0;
}
.cmd-builtin-example code {
  font-family: var(--mono);
  color: var(--accent-2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-copy-btn {
  background: transparent;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  transition: all 0.12s var(--ease);
}
.cmd-copy-btn:hover { background: var(--surface-3); color: var(--text); }

.cmd-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: grid;
  gap: 10px;
  transition: all 0.15s var(--ease);
  position: relative;
}
.cmd-card:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.cmd-card.is-disabled { opacity: 0.55; }
.cmd-card.is-disabled .cmd-card-name { text-decoration: line-through; }
.cmd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cmd-card-name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.cmd-card-flags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cmd-flag-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.cmd-flag-mod { background: rgba(255,159,10,0.14); color: var(--orange); border-color: rgba(255,159,10,0.3); }
.cmd-flag-dm { background: rgba(120,140,255,0.15); color: #9aaaff; border-color: rgba(120,140,255,0.3); }
.cmd-flag-noat { background: rgba(160,160,160,0.12); color: var(--text-3); }
.cmd-flag-off { background: rgba(255,69,58,0.12); color: var(--red); border-color: rgba(255,69,58,0.3); }
.cmd-card-response {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  background: var(--surface-2);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.cmd-card-meta {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-3);
}
.cmd-card-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.cmd-card-meta-icon { display: inline-flex; opacity: 0.7; }

.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: all 0.15s var(--ease);
}
.settings-nav-item:hover {
  background: var(--surface);
  color: var(--text);
}
.settings-nav-item.active {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.settings-nav-item.active .settings-nav-icon {
  background: rgba(80,140,255,0.14);
  color: var(--accent);
}
.settings-nav-icon {
  display: inline-flex;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-3);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.settings-nav-meta { flex: 1; min-width: 0; }
.settings-nav-label { font-size: 13.5px; font-weight: 500; }
.settings-nav-hint { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.settings-main { min-width: 0; }
.settings-section-head { margin-bottom: 16px; }
.settings-section-head h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.settings-section-head .sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }

@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; gap: 20px; }
  .settings-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; }
  .settings-nav-item { white-space: nowrap; }
  .settings-nav-hint { display: none; }
}

.cmd-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: all 0.15s var(--ease);
  z-index: 1;
}
.cmd-card:hover .cmd-card-close { opacity: 1; }
.cmd-card-close:hover { background: rgba(255,69,58,0.12); color: var(--red); }

.cmd-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  gap: 8px;
}
.cmd-card-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.cmd-card-edit-btn:hover {
  border-color: var(--accent);
  background: rgba(80,140,255,0.08);
  color: var(--accent);
}
.cmd-card-edit-btn span { display: inline-flex; }

.cmd-empty-onboard {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  display: grid;
  gap: 14px;
  justify-items: center;
}
.cmd-empty-icon { color: var(--text-3); }
.cmd-empty-onboard h4 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.cmd-empty-onboard p { margin: 0; font-size: 13.5px; max-width: 380px; }
.cmd-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 720px;
  margin-top: 8px;
}
.cmd-tpl-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  font: inherit;
  color: inherit;
}
.cmd-tpl-card:hover {
  border-color: var(--accent);
  background: rgba(80,140,255,0.06);
  transform: translateY(-2px);
}
.cmd-tpl-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.cmd-tpl-label { font-size: 12px; color: var(--text-3); }

.cmd-stats-footer {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.cmd-stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.cmd-stat-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cmd-stat-label { font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.cmd-counters-section { margin-top: 28px; }
.cmd-counter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}
.cmd-counter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  flex-wrap: wrap;
}
.cmd-counter-row:hover { background: rgba(255,255,255,0.04); }
.cmd-counter-name {
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 600;
  min-width: 120px;
  flex: 0 0 auto;
}
.cmd-counter-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}
.cmd-counter-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cmd-counter-actions .btn-sm { padding: 3px 9px; font-size: 11px; }
.cmd-counter-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}
.cmd-counter-copy:hover { color: var(--text); border-style: solid; }
.cmd-counter-copy code { background: transparent; padding: 0; font-size: 11px; }
.cmd-counter-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cmd-counter-add input {
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { color: var(--accent-warn, #ff6b6b); border-color: rgba(255,107,107,0.3); }
.btn-danger:hover { background: rgba(255,107,107,0.08); }

.pill-soon {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,159,10,0.12);
  color: var(--orange);
  border: 1px solid rgba(255,159,10,0.25);
  margin-left: 2px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
.card-head {
  padding: 16px 20px 10px;
}
.card-head h2, .card-head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.card-head .sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
}
.card-body { padding: 14px 20px 18px; }
.card-body + .card-head { padding-top: 8px; border-top: 1px solid var(--hairline); }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-blue { background: var(--accent-tint); color: var(--accent-2); }
.badge-red { background: rgba(255,69,58,0.14); color: var(--red); }
.badge-orange { background: rgba(255,159,10,0.14); color: var(--orange); }
.badge-green { background: rgba(48,209,88,0.14); color: var(--green); }
.badge-purple { background: rgba(191,90,242,0.14); color: var(--purple); }
.badge-pink { background: rgba(255,55,95,0.14); color: var(--pink); }

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
.stat .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.stat .value {
  font-family: var(--sf);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.05;
}
.stat .hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 4px;
}

.section { margin-bottom: 36px; }
.section-head {
  display: flex; align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2, .section-head h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
}
th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: none; }

.list { display: grid; gap: 10px; }

.row { display: flex; gap: 12px; align-items: center; }
.grid { display: grid; gap: 14px; }

.command-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) 90px 70px 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.15s;
}
.command-row:hover { background: var(--surface-2); border-color: var(--border-2); }
.command-row .name {
  font-family: var(--sf-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent-2);
}
.command-row .resp {
  font-family: var(--sf-mono);
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in 0.18s var(--ease);
}
.modal {
  width: min(620px, 100%);
  background: linear-gradient(180deg, rgba(28, 28, 32, 0.92), rgba(22, 22, 24, 0.92));
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: fade-up 0.24s var(--spring);
  padding: 28px 28px 22px;
  display: grid;
  gap: 18px;
}
.modal h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.modal .grid { display: grid; gap: 16px; }
.modal .field { margin-bottom: 0; }
.modal .field > label,
.modal .field > .label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.modal textarea {
  min-height: 90px;
  resize: vertical;
  font-family: var(--sf);
  line-height: 1.5;
}
.modal .row > .field { flex: 1; min-width: 140px; }
.modal > .row:last-of-type {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.toasts {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 400;
  display: flex; flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  min-width: 240px;
  background: rgba(28,28,30,0.9);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  animation: fade-up 0.22s var(--spring);
}
.toast::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.toast.success::before { background: var(--green); }
.toast.error::before { background: var(--red); }
.toast.info::before { background: var(--accent-2, var(--accent)); }
.toast-link {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-2, var(--accent));
  background: color-mix(in srgb, var(--accent-2, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2, var(--accent)) 40%, transparent);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.toast-link:hover {
  background: color-mix(in srgb, var(--accent-2, var(--accent)) 22%, transparent);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
  display: inline-block;
}
.live-dot-red {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.landing-v2 {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px clamp(20px, 4vw, 40px) 40px;
  min-height: calc(100dvh - 100px);
  display: grid;
  gap: 56px;
  align-content: center;
}

.landing-hero {
  text-align: center;
}
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.landing-wordmark {
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin: 0;
  background: linear-gradient(180deg, var(--text) 50%, rgba(255,255,255,0.42) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-tagline {
  margin-top: 18px;
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--text-2);
  letter-spacing: -0.005em;
  line-height: 1.5;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.tagline-accent {
  color: var(--green);
  font-weight: 600;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.landing-feature {
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.18s var(--ease);
}
.landing-feature:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}
.landing-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--accent-2);
  background: var(--accent-tint);
}
.landing-feature-icon[data-tone="orange"] {
  color: var(--orange);
  background: rgba(255,159,10,0.14);
}
.landing-feature-icon[data-tone="green"] {
  color: var(--green);
  background: rgba(48,209,88,0.14);
}
.landing-feature-icon[data-tone="purple"] {
  color: var(--purple);
  background: rgba(191,90,242,0.14);
}
.landing-feature-icon[data-tone="pink"] {
  color: var(--pink);
  background: rgba(255,55,95,0.14);
}
.landing-feature-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 5px;
}
.landing-feature-text {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px 24px;
}
.landing-card { max-width: 580px; text-align: center; }
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 28px;
}
.landing h1 {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 18px;
}
.landing .lead {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 auto 36px;
  max-width: 480px;
  line-height: 1.55;
}
.landing ul.features {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  text-align: left;
  max-width: 360px;
  display: grid; gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.landing ul.features li {
  display: flex; gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.landing ul.features li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}
.login-form {
  display: grid;
  gap: 16px;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
.login-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}
.login-pill:focus-within {
  border-color: rgba(145,70,255,0.5);
  box-shadow: 0 0 0 3px rgba(145,70,255,0.15);
  background: var(--surface-2);
}
.login-pill .login-code-input,
.login-pill .login-code-input:hover,
.login-pill .login-code-input:focus {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 50px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 14px;
  font-family: var(--sf);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  outline: none;
  box-shadow: none !important;
  transition: none;
}
.login-pill .login-code-input::placeholder {
  color: var(--text-3);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.01em;
  text-transform: none;
  opacity: 1;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  height: 50px;
  background: #9146FF;
  color: #fff;
  border-radius: 100px;
  font-family: var(--sf);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.login-btn:hover {
  background: #a162ff;
}
.login-btn:active {
  background: #7c2fe0;
  transform: translateY(1px);
}
.login-btn:focus-visible {
  outline: 2px solid rgba(145,70,255,0.55);
  outline-offset: 3px;
}
.login-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-error {
  padding: 12px 18px;
  background: rgba(255,69,58,0.1);
  border: 1px solid rgba(255,69,58,0.3);
  border-radius: 100px;
  font-size: 13.5px;
  color: var(--red);
  text-align: center;
}
.login-hint {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
  margin: 0;
  text-align: center;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.login-hint strong { color: var(--text-2); font-weight: 600; }

.maintenance-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 560px;
  margin: 24px auto 0;
  padding: 22px 26px;
  background: color-mix(in srgb, #ff9f0a 10%, transparent);
  border: 1px solid color-mix(in srgb, #ff9f0a 35%, transparent);
  border-radius: 18px;
  text-align: left;
  animation: fade-up 0.3s var(--ease, ease);
}
.maintenance-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: #ff9f0a;
  color: #1a1a1a;
}
.maintenance-meta { flex: 1; min-width: 0; }
.maintenance-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 4px;
}
.maintenance-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.maintenance-admin-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px dashed var(--text-3);
  padding-bottom: 1px;
}
.maintenance-admin-link:hover { color: var(--text); border-bottom-color: var(--text); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .login-pill { flex-direction: column; align-items: stretch; padding: 8px; gap: 8px; border-radius: var(--r-lg); }
  .login-pill .login-code-input { height: 48px; padding: 0 16px; text-align: center; }
  .login-btn { width: 100%; height: 48px; }
}

.site-footer {
  margin-top: 80px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-3);
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.4;
}

.site-footer-author {
  color: var(--text-2);
  font-size: 13px;
}
.site-footer-version-wrap {
  position: relative;
  display: inline-block;
}
.site-footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  font-family: var(--sf-mono);
  font-size: 10.5px;
  color: var(--text-3);
  background: rgba(255,255,255,0.02);
  cursor: help;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  outline: none;
}
.site-footer-chip:hover, .site-footer-chip:focus-visible {
  color: var(--text-2);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}
.site-footer-version-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(20, 22, 28, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  font-size: 11px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  z-index: 30;
}
.site-footer-version-wrap:hover .site-footer-version-pop,
.site-footer-version-wrap:focus-within .site-footer-version-pop {
  opacity: 1;
  transform: translateY(0);
}
.site-footer-pop-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}
.site-footer-pop-label {
  color: var(--text-3);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-footer-pop-value {
  font-family: var(--sf-mono);
  font-size: 11px;
  color: var(--text);
}
.site-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer-nav a {
  color: var(--text-3);
  font-size: 13px;
  transition: color 0.15s;
}
.site-footer-nav a:hover { color: var(--text); }

.crumb {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumb a { color: var(--text-3); text-decoration: none; transition: color 0.15s var(--ease); }
.crumb a:hover { color: var(--text); }
.crumb .sep { opacity: 0.5; }

.content-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 64px;
}
.content-section h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 36px 0 12px;
}
.content-section h3:first-of-type { margin-top: 24px; }
.content-section h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin: 18px 0 8px;
}
.content-section p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 14px;
}
.content-section p strong { color: var(--text); font-weight: 600; }
.content-section ul {
  list-style: none;
  margin: 4px 0 16px;
  padding: 0;
}
.content-section ul li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  border-bottom: 1px solid var(--hairline);
}
.content-section ul li:last-child { border-bottom: 0; }
.content-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2, var(--accent));
  opacity: 0.7;
}
.content-section ul li strong { color: var(--text); font-weight: 600; }
.content-section ul li code,
.content-section p code {
  font-family: var(--sf-mono);
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--text);
}
.content-section .legal-meta {
  font-size: 13px;
  color: var(--text-3);
  margin: 12px 0 28px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.legal-link {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease);
}
.legal-link:hover { border-bottom-color: var(--accent-2); }

.imprint {
  max-width: 720px;
  margin: 60px auto 80px;
  padding: 0 clamp(20px, 4vw, 40px);
}
.imprint h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.028em;
  margin-bottom: 32px;
}
.imprint h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 8px;
  color: var(--text);
}
.imprint p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 4px;
}
.imprint .back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-3);
}
.imprint .back:hover { color: var(--text); }
.imprint .small { font-size: 12.5px; color: var(--text-3); margin-top: 12px; }

@media (max-width: 720px) {
  .header-inner { padding: 0 8px 0 14px; }
  .nav-cats { gap: 0; }
  .nav-cat { padding: 6px 10px; font-size: 12.5px; }
  .user-chip span { display: none; }
  .command-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .command-row .resp { white-space: normal; }
  .view-head { flex-direction: column; align-items: flex-start; }
}
