/* Owner dashboard */
.dash-body {
  cursor: auto !important;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(var(--candy-blue-rgb), 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(var(--candy-blue-rgb), 0.07), transparent 45%),
    var(--onyx);
  color: var(--text-primary);
  font-family: var(--font-body);
  padding: 0;
}

/* —— Shell: sidebar + workspace (shorter scroll) —— */
.dash-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100dvh;
  max-width: 1400px;
  margin: 0 auto;
}

.dash-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 0.9rem 1.25rem 1.1rem;
  border-right: 1px solid var(--glass-border);
  background: rgba(8, 12, 14, 0.92);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.dash-sidebar-top {
  padding: 0.25rem 0.4rem 0.5rem;
}

.dash-sidebar-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.dash-nav-btn {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dash-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(var(--candy-blue-rgb), 0.08);
}

.dash-nav-btn.is-active {
  color: var(--onyx);
  background: linear-gradient(135deg, var(--candy-blue), var(--neon-hot));
  border-color: transparent;
  font-weight: 600;
}

.dash-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--glass-border);
}

.dash-workspace {
  min-width: 0;
  padding: 1.25rem clamp(1rem, 2.5vw, 2rem) 2rem;
}

.dash-header-compact {
  margin-bottom: 1rem;
  max-width: none;
}

.dash-header-compact h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
}

.dash-sec[hidden] {
  display: none !important;
}

.dash-sec.is-active {
  display: block;
}

@media (max-width: 900px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: sticky;
    top: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }

  .dash-nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  .dash-sidebar-foot {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dash-workspace {
    padding: 1rem 0.9rem 2rem;
  }
}

/* —— Lock gate (password required before any dashboard UI) —— */
.dash-gate {
  min-height: calc(100dvh - 3rem);
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}

.dash-gate-card {
  width: min(100%, 400px);
  background: rgba(8, 12, 14, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem 1.4rem 1.35rem;
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-gate-card h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.dash-gate-sub {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dash-gate-pw {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}

.dash-gate-pw input {
  padding-left: 0.9rem !important;
  padding-right: 0.9rem !important;
}

.dash-gate-status {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.35;
  min-height: 1.2em;
}

.dash-gate-status.ok {
  color: var(--candy-blue, #7ec8e3);
}

.dash-gate-status.err {
  color: #ff8a8a;
}

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

/* Session already unlocked in this tab: paint app immediately (no lock flash on F5) */
html.dash-session #dashGate {
  display: none !important;
}
html.dash-session #dashApp {
  display: block !important;
}

/* Manual unlock path only — hide app until ready */
body.dash-booting:not(.dash-ready) .dash-app {
  display: none !important;
}

html.dash-session body.dash-booting .dash-app {
  display: block !important;
}

.dash-gate.is-booting .dash-gate-actions,
.dash-gate.is-booting .dash-gate-pw,
.dash-gate.is-booting .dash-pw-label {
  opacity: 0.35;
  pointer-events: none;
}

.dash-app[hidden],
.dash-gate[hidden] {
  display: none !important;
}

html.dash-session #dashApp[hidden] {
  display: block !important;
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  max-width: 1100px;
  margin-inline: auto;
}

.dash-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-hot);
  margin-bottom: 0.35rem;
}

.dash-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
}

.dash-sub {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 36rem;
  line-height: 1.45;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-card {
  background: rgba(8, 12, 14, 0.88);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.15rem 1.25rem 1.25rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.dash-card.sticky {
  position: sticky;
  top: 1rem;
}

.dash-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--candy-blue-rgb), 0.14);
  border: 1px solid rgba(var(--candy-blue-rgb), 0.35);
  color: var(--candy-blue);
}

.dash-help {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.dash-help.tight {
  margin: 0.85rem 0 0;
}

.dash-help a {
  color: var(--neon-primary);
}

.dash-avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.dash-avatar-preview {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a1014, #020202);
  border: 2px solid rgba(var(--candy-blue-rgb), 0.45);
  box-shadow: 0 0 20px rgba(var(--candy-blue-rgb), 0.2);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-avatar-preview img[hidden] {
  display: none !important;
}

.dash-avatar-actions {
  flex: 1;
  min-width: 180px;
}

.dash-avatar-actions .dash-upload {
  margin-bottom: 0.45rem;
}

.dash-avatar-actions .dash-upload-ui {
  padding: 0.75rem 0.9rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dash-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  margin-bottom: 0.85rem;
}

.dash-field span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}

.dash-field span em {
  font-style: normal;
  color: var(--neon-primary);
  margin-left: 0.35rem;
}

.dash-field input[type="text"],
.dash-field select,
.dash-field input[type="range"] {
  width: 100%;
}

.dash-field input[type="text"],
.dash-field select {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-field input[type="text"]:focus,
.dash-field select:focus {
  border-color: rgba(var(--candy-blue-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-field select option {
  background: var(--onyx);
}

.dash-field input[type="range"] {
  accent-color: var(--neon-primary);
}

.dash-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.dash-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--neon-primary);
}

.dash-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: 0.85rem;
}

.dash-check-row .dash-check {
  margin-bottom: 0.35rem;
}

.dash-field.tight {
  margin-bottom: 0;
}

.dash-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.dash-radio input {
  accent-color: var(--candy-blue);
}

/* —— Music UI —— */
.music-now {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--candy-blue-rgb), 0.28);
  background: linear-gradient(
    135deg,
    rgba(var(--candy-blue-rgb), 0.14),
    rgba(var(--onyx-rgb), 0.5)
  );
  box-shadow: 0 0 24px rgba(var(--candy-blue-rgb), 0.08);
}

.music-now.is-off {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.music-now-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--candy-blue), #8fc4d8);
  color: var(--onyx);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(var(--candy-blue-rgb), 0.35);
}

.music-now-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  text-align: left;
}

.music-now-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.music-now-title {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-now-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-now-pill {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--candy-blue-rgb), 0.18);
  border: 1px solid rgba(var(--candy-blue-rgb), 0.35);
  color: var(--candy-blue);
}

.music-source-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.music-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.music-opt input {
  margin-top: 0.2rem;
  accent-color: var(--neon-primary);
  flex-shrink: 0;
}

.music-opt-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.music-opt-body strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.music-opt-body small {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.music-opt.is-active,
.music-opt:has(input:checked) {
  border-color: rgba(var(--candy-blue-rgb), 0.45);
  background: rgba(var(--candy-blue-rgb), 0.08);
  box-shadow: 0 0 0 1px rgba(var(--candy-blue-rgb), 0.1);
}

.music-opt:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.music-custom-panel {
  margin-bottom: 0.75rem;
}

.music-opts-row {
  margin-top: 0.25rem;
}

.music-file-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--candy-blue-rgb), 0.3);
  background: rgba(var(--candy-blue-rgb), 0.1);
}

.music-file-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(var(--candy-blue-rgb), 0.2);
  color: var(--candy-blue);
  flex-shrink: 0;
}

.music-file-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.music-file-meta strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-file-meta small {
  font-size: 0.7rem;
  color: var(--text-faint);
}

.dash-btn.compact {
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  margin: 0;
}

.music-upload-zone {
  margin-bottom: 0;
}

.music-upload-zone.is-replace .dash-upload-ui {
  padding: 0.65rem 0.85rem;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.music-upload-zone.is-replace .dash-upload-ui strong {
  font-size: 0.8rem;
}

.dash-panel {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.dash-upload {
  display: block;
  cursor: pointer;
  margin-bottom: 0.65rem;
}

.dash-upload-ui {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed rgba(var(--candy-blue-rgb), 0.4);
  background: linear-gradient(135deg, rgba(var(--candy-blue-rgb), 0.1), rgba(var(--candy-blue-rgb), 0.04));
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.dash-upload:hover .dash-upload-ui {
  border-color: rgba(var(--candy-blue-rgb), 0.6);
  box-shadow: 0 0 20px rgba(var(--candy-blue-rgb), 0.15);
}

.dash-upload-ui strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-upload-ui small {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.dash-media-hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.55rem;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.dash-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--candy-blue-rgb), 0.45);
}

.dash-btn.primary {
  background: linear-gradient(135deg, var(--candy-blue), var(--neon-hot));
  border-color: transparent;
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 0 24px var(--neon-glow);
}

.dash-btn.ghost {
  background: transparent;
}

.dash-btn.danger {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.35);
  margin-bottom: 0.5rem;
}

.dash-upload.is-busy {
  pointer-events: none;
  opacity: 0.55;
}

.dash-upload-progress {
  margin: 0.75rem 0 0.5rem;
}

.dash-upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.dash-upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--candy-blue), var(--neon-hot));
  box-shadow: 0 0 12px rgba(var(--candy-blue-rgb), 0.35);
  transition: width 0.15s ease-out;
}

.dash-upload-progress-label {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* —— Video library (up to 5 saved BGs) —— */
.dash-video-lib {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.dash-video-lib:empty {
  display: none;
}

.dash-video-slot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.dash-video-slot.is-active {
  border-color: rgba(var(--candy-blue-rgb), 0.5);
  background: rgba(var(--candy-blue-rgb), 0.08);
  box-shadow: 0 0 0 1px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-video-slot-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-video-slot-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-video-slot-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dash-video-slot-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--candy-blue);
  background: rgba(var(--candy-blue-rgb), 0.14);
  border: 1px solid rgba(var(--candy-blue-rgb), 0.28);
  vertical-align: middle;
}

.dash-video-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.dash-video-slot-actions .dash-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.dash-external-active {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px dashed rgba(var(--candy-blue-rgb), 0.45);
  background: rgba(var(--candy-blue-rgb), 0.08);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-external-active strong {
  display: block;
  color: var(--candy-blue);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.dash-video-link-box {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.22);
}

.dash-video-link-box .dash-field span {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-video-link-box input[type="url"] {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.dash-video-link-box input[type="url"]:focus {
  outline: none;
  border-color: rgba(var(--candy-blue-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-video-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* —— Link visibility toggles —— */
.dash-link-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-link-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  /* prevent double-click from selecting the label text (blue highlight) */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.dash-link-toggle:hover {
  border-color: rgba(var(--candy-blue-rgb), 0.4);
  background: rgba(var(--candy-blue-rgb), 0.06);
}

.dash-link-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--candy-blue);
  flex-shrink: 0;
}

/* —— Theme color mix (A + B + slider) —— */
.dash-mix-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.dash-mix-card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
}

.dash-mix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.dash-mix-head strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-mix-preview {
  width: 36px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(90deg, #c6ff34, #9fd920);
  box-shadow: 0 0 12px rgba(var(--candy-blue-rgb), 0.25);
  flex-shrink: 0;
}

.dash-mix-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.dash-mix-swatch {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-mix-swatch > span {
  opacity: 0.85;
}

.dash-mix-swatch input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.dash-mix-swatch input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 3px;
}

.dash-mix-swatch input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 7px;
}

.dash-color-hex {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dash-color-hex:focus {
  outline: none;
  border-color: rgba(var(--candy-blue-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-mix-slider {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-mix-slider em {
  font-style: normal;
  color: var(--candy-blue);
  font-variant-numeric: tabular-nums;
  margin-left: 0.25rem;
}

.dash-mix-slider input[type="range"] {
  width: 100%;
  accent-color: var(--candy-blue);
}

.dash-color-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* —— Live publish / owner password —— */
.dash-publish-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--candy-blue-rgb), 0.28);
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, rgba(var(--candy-blue-rgb), 0.12), transparent 55%),
    rgba(8, 12, 14, 0.92);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-publish-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--candy-blue-rgb), 0.55),
    transparent
  );
  pointer-events: none;
}

.dash-publish-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.dash-publish-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--candy-blue);
  background: rgba(var(--candy-blue-rgb), 0.12);
  border: 1px solid rgba(var(--candy-blue-rgb), 0.28);
  box-shadow: 0 0 24px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-publish-titles {
  flex: 1;
  min-width: 0;
}

.dash-publish-card h2 {
  margin-bottom: 0.25rem;
}

.dash-publish-sub {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 36rem;
}

.dash-publish-badge {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fda4af;
  background: rgba(251, 113, 133, 0.1);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.dash-publish-badge.is-ready {
  border-color: rgba(74, 222, 128, 0.4);
  color: #86efac;
  background: rgba(74, 222, 128, 0.1);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.12);
}

.dash-publish-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.dash-pw-wrap {
  flex: 1 1 240px;
  min-width: min(100%, 220px);
  max-width: 380px;
}

.dash-pw-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.dash-pw-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-pw-input-shell:focus-within {
  border-color: rgba(var(--candy-blue-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--candy-blue-rgb), 0.12);
}

.dash-pw-leading {
  position: absolute;
  left: 0.85rem;
  display: grid;
  place-items: center;
  color: rgba(var(--candy-blue-rgb), 0.55);
  pointer-events: none;
}

.dash-pw-input-shell input {
  width: 100%;
  padding: 0.78rem 2.75rem 0.78rem 2.55rem;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text-primary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  outline: none;
}

.dash-pw-input-shell input::placeholder {
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.2em;
}

.dash-pw-toggle {
  position: absolute;
  right: 0.35rem;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.dash-pw-toggle:hover {
  color: var(--candy-blue);
  background: rgba(var(--candy-blue-rgb), 0.1);
}

.dash-publish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.dash-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 46px;
  padding-inline: 1.15rem;
  font-weight: 600;
}

.dash-publish-btn-icon {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
}

.dash-publish-card .dash-status {
  margin: 0.9rem 0 0;
  min-height: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  transition: color 0.15s;
}

/* Always-visible status (under header) — links/music/publish feedback */
.dash-status-global {
  margin: 0 0 0.65rem;
  min-height: 1.2rem;
  padding: 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-faint);
  transition: color 0.15s;
}

.dash-status-global:empty {
  min-height: 0;
  margin: 0;
}

.dash-status.ok,
.dash-status-global.ok {
  color: #4ade80;
}

.dash-status.err,
.dash-status-global.err {
  color: #fb7185;
}

@media (max-width: 560px) {
  .dash-publish-head {
    flex-wrap: wrap;
  }

  .dash-publish-badge {
    margin-left: auto;
  }

  .dash-pw-wrap {
    max-width: none;
  }

  .dash-publish-actions {
    width: 100%;
  }

  .dash-publish-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Preview */
.dash-preview-stage {
  position: relative;
  aspect-ratio: 9 / 14;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(var(--candy-blue-rgb), 0.2), transparent 55%),
    linear-gradient(180deg, #0a0a0a, var(--onyx));
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}

.dash-preview-stage.mode-image {
  background-color: var(--onyx);
}

.dash-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.dash-preview-stage[data-video-fit="contain"] .dash-preview-video {
  object-fit: contain;
}

.dash-preview-youtube {
  border: 0;
  pointer-events: none !important;
  object-fit: unset;
  /* Match public page: crop YT chrome in the small preview */
  transform: scale(1.45);
  transform-origin: center center;
}

.dash-preview-card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  min-width: 140px;
}

.dash-preview-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a1014;
  border: 2px solid rgba(var(--candy-blue-rgb), 0.5);
  font-family: var(--font-display);
  font-weight: 700;
}

.dash-preview-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-preview-avatar img[hidden] {
  display: none !important;
}

.dash-preview-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-preview-bio {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 0.2rem;
}
