:root {
  color-scheme: dark;
  --bg: #141414;
  --bg-panel: #0a0a0a;
  --bg-soft: #111111;
  --border: #1a1a1a;
  --border-strong: #2d2d2d;
  --text: #f7f7f7;
  --muted: #a3a3a3;
  --accent: #ffffff;
  --accent-text: #000000;
  --danger: #ff5a5a;
  --success: #8bf0ae;
  --font-ui: Bahnschrift, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-readable: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-content: var(--font-readable);
  --font-banner: var(--font-ui);
  --media-visual-filter: saturate(0) contrast(1.04);
  --playlist-sticky-top: 57px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-content);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 14rem),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.player-media,
.audio-stage-poster,
.upload-thumb img,
.queue-thumb img,
.media-thumb img,
.media-library-thumb img,
.media-editor-poster img,
.site-live-preview-media,
.site-live-preview-thumb {
  filter: var(--media-visual-filter);
  transition: filter 180ms ease;
}

input[type="range"] {
  accent-color: #ffffff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ui-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  fill: currentColor;
}

.shell-page,
.playlist-page,
.admin-page,
.share-page {
  min-height: 100vh;
}

.panel,
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--site-brand-color, #000000);
  color: var(--site-brand-font-color, #ffffff);
  backdrop-filter: blur(16px);
  font-family: var(--font-ui);
}

.brand {
  color: var(--site-brand-font-color, #ffffff);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-banner);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.topbar-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--site-brand-font-color, #ffffff);
}

.topbar-nav a:hover {
  color: var(--site-brand-font-color, #ffffff);
}

.topbar-nav .topbar-public-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  min-height: 2.3rem;
  border-radius: 0.35rem;
  color: var(--site-brand-font-color, #ffffff);
  opacity: 0.72;
  text-decoration: none;
  transition:
    background-color 120ms ease,
    color 120ms ease;
}

.topbar-nav .topbar-public-admin-link .ui-icon {
  width: 0.96rem;
  height: 0.96rem;
}

.topbar-nav .topbar-public-admin-link:hover {
  color: var(--site-brand-font-color, #ffffff);
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.topbar-nav .topbar-public-admin-link:focus-visible {
  color: #d0d0d0;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.topbar-icon-link,
.topbar-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #d7d7d7;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.topbar-icon-link {
  width: 2.3rem;
}

.topbar-admin-link {
  gap: 0.45rem;
  padding: 0.46rem 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topbar-icon-link svg {
  width: 1rem;
  height: 1rem;
}

.topbar-admin-link svg {
  width: 0.95rem;
  height: 0.95rem;
}

.topbar-icon-link:hover,
.topbar-admin-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.topbar-icon-link.is-active,
.topbar-icon-link.is-active:hover,
.topbar-admin-link.is-active,
.topbar-admin-link.is-active:hover {
  color: #000000;
  border-color: #ffffff;
  background: #ffffff;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.card {
  width: min(92vw, 540px);
  border-radius: 12px;
  padding: 2rem;
}

.card h1 {
  margin: 0 0 0.75rem 0;
}

.card p {
  margin: 0 0 1.5rem 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-form label,
.field span {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-form input,
.field input,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #000000;
  color: var(--text);
  outline: none;
}

.auth-form input:focus,
.field input:focus,
.field textarea:focus {
  border-color: #666666;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.auth-form button,
.primary-link,
.ghost-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.auth-form button,
.primary-link,
.action-button.is-primary {
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
}

.auth-form button:hover,
.primary-link:hover,
.action-button.is-primary:hover {
  background: #e7e7e7;
}

.ghost-link,
.action-button {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
}

.ghost-link:hover,
.action-button:hover {
  border-color: #474747;
  background: rgba(255, 255, 255, 0.05);
}

.action-button.is-danger {
  color: #ffd4d4;
  border-color: rgba(255, 90, 90, 0.35);
}

.action-button.is-danger:hover {
  border-color: rgba(255, 90, 90, 0.6);
  background: rgba(255, 90, 90, 0.08);
}

.action-button.is-upload-outline {
  border-color: #4f896b;
  background: #050806;
  color: #eafff1;
}

.action-button.is-upload-outline:hover,
.action-button.is-upload-outline:focus-visible {
  border-color: #6ca487;
  background: rgba(79, 137, 107, 0.09);
}

.jump-action {
  border-color: var(--jump-border);
}

.jump-action:hover {
  border-color: var(--jump-border-hover);
  background: var(--jump-background-hover);
}

.jump-action--site {
  --jump-border: #4f8790;
  --jump-border-hover: #6da6af;
  --jump-background-hover: rgba(79, 135, 144, 0.09);
}

.jump-action--upload {
  --jump-border: #4f896b;
  --jump-border-hover: #6ca487;
  --jump-background-hover: rgba(79, 137, 107, 0.09);
}

.jump-action--library {
  --jump-border: #79699a;
  --jump-border-hover: #9584b8;
  --jump-background-hover: rgba(121, 105, 154, 0.09);
}

.jump-action--design {
  --jump-border: #92754f;
  --jump-border-hover: #ae9068;
  --jump-background-hover: rgba(146, 117, 79, 0.09);
}

.jump-action--analytics {
  --jump-border: #5a789c;
  --jump-border-hover: #7896b8;
  --jump-background-hover: rgba(90, 120, 156, 0.09);
}

.jump-action--logout {
  --jump-border: rgba(255, 104, 104, 0.58);
  --jump-border-hover: rgba(255, 125, 125, 0.82);
  --jump-background-hover: rgba(255, 90, 90, 0.08);
}

.border-accent {
  border-color: var(--accent-border);
}

.border-accent:hover {
  border-color: var(--accent-border-hover);
  background: var(--accent-background-hover);
}

.border-accent--domain {
  --accent-border: #4f8790;
  --accent-border-hover: #6da6af;
  --accent-background-hover: rgba(79, 135, 144, 0.09);
}

.border-accent--attach {
  --accent-border: #4f896b;
  --accent-border-hover: #6ca487;
  --accent-background-hover: rgba(79, 137, 107, 0.09);
}

.border-accent--scan {
  --accent-border: #5a789c;
  --accent-border-hover: #7896b8;
  --accent-background-hover: rgba(90, 120, 156, 0.09);
}

.border-accent--delete {
  --accent-border: rgba(255, 104, 104, 0.58);
  --accent-border-hover: rgba(255, 125, 125, 0.82);
  --accent-background-hover: rgba(255, 90, 90, 0.08);
}

.border-accent--back {
  --accent-border: #79699a;
  --accent-border-hover: #9584b8;
  --accent-background-hover: rgba(121, 105, 154, 0.09);
}

.action-button:disabled,
.ghost-link:disabled,
.primary-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-button.is-loading::before {
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.55rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: action-button-spin 750ms linear infinite;
}

@keyframes action-button-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .action-button.is-loading::before {
    animation-duration: 1.5s;
  }
}

#login-error {
  color: var(--danger);
  min-height: 1.35rem;
}

#login-error:empty {
  display: none;
}

.logout {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  color: #f0f0f0;
}

.logout:hover {
  color: #ffffff;
}

.dashboard-main,
.admin-main {
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: 1rem;
}

.dashboard-main {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  border-radius: 22px;
  padding: 1.15rem;
}

.welcome-panel {
  display: grid;
  gap: 1rem;
}

.welcome-panel--minimal {
  align-items: center;
  min-height: clamp(140px, 28vh, 220px);
  padding-block: clamp(1.8rem, 7vw, 3.4rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-panel h1,
.section-heading h2,
.section-header h2,
.queue-header h2 {
  margin: 0;
}

.hero-panel h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 0.98;
}

.welcome-title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy,
.section-note,
.player-description,
.empty-note,
.queue-header p,
.status-line,
.mini-status {
  color: var(--muted);
}

.hero-copy {
  margin: 0.7rem 0 1rem;
  max-width: 52rem;
  font-size: 1rem;
}

.hero-meta,
.welcome-summary,
.panel-intro,
.upload-copy p,
.upload-meta {
  margin: 0;
  color: var(--muted);
}

.hero-meta {
  max-width: 46rem;
  font-size: 0.94rem;
}

.dashboard-actions,
.action-row,
.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-grid.dashboard-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  border-radius: 18px;
  padding: 1rem;
}

.section-heading,
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.section-header h2 {
  font-size: 1.15rem;
}

.section-heading--compact {
  align-items: center;
}

.section-heading > div {
  min-width: 0;
}

.section-note {
  margin: 0;
  text-align: right;
  font-size: 0.92rem;
}

.welcome-cta {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-cta h2,
.playlist-panel h2 {
  margin: 0;
}

.welcome-summary {
  font-size: 0.95rem;
  line-height: 1.5;
}

.panel-intro {
  margin-bottom: 0.25rem;
  max-width: 62rem;
  font-size: 0.94rem;
  line-height: 1.5;
}

.upload-list {
  display: grid;
}

.dashboard-playlist-tabs {
  display: flex;
  gap: 0.5rem;
  margin: -0.2rem 0 0.75rem;
  padding: 0.1rem 0 0.2rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dashboard-playlist-tabs::-webkit-scrollbar {
  display: none;
}

.dashboard-playlist-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.48rem;
  max-width: min(72vw, 18rem);
  min-height: 2.35rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1;
  scroll-snap-align: start;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.dashboard-playlist-tab:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.dashboard-playlist-tab.is-active {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.dashboard-playlist-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-playlist-tab small {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-playlist-tab.is-active small {
  background: rgba(0, 0, 0, 0.12);
  color: #000000;
}

.upload-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.upload-row-link {
  text-decoration: none;
  border-radius: 16px;
  transition:
    background-color 120ms ease,
    transform 120ms ease;
}

.upload-row-link:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.upload-row-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: 2px;
}

.upload-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.upload-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 60%),
    #080808;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.upload-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.upload-copy strong {
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-copy p {
  font-size: 0.88rem;
  line-height: 1.45;
}

.upload-meta {
  font-size: 0.83rem;
}

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

.stat-card {
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.7rem;
  line-height: 1;
}

.mini-list {
  display: grid;
  gap: 0.65rem;
}

.analytics-panel {
  display: grid;
  gap: 1rem;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.analytics-summary > div {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.analytics-summary span,
.analytics-empty {
  color: var(--muted);
}

.analytics-summary strong {
  font-size: 1.45rem;
}

.analytics-items {
  display: grid;
  gap: 0.5rem;
}

.analytics-items h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.analytics-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-empty {
  margin: 0;
}

@media (max-width: 540px) {
  .analytics-summary {
    grid-template-columns: 1fr;
  }
}

.mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.82rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.mini-index {
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-copy,
.queue-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.mini-copy strong,
.queue-copy strong,
.media-title {
  font-size: 0.96rem;
  line-height: 1.25;
}

.mini-copy strong,
.queue-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-copy span,
.queue-copy span,
.meta-strip {
  font-size: 0.85rem;
  color: var(--muted);
}

.playlist-layout {
  display: grid;
  align-content: start;
  min-height: calc(100vh - var(--playlist-sticky-top));
  min-height: calc(100dvh - var(--playlist-sticky-top));
}

.site-credit-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-credit-footer a,
.site-qr-share-trigger {
  color: inherit;
  opacity: 0.76;
  text-decoration: none;
}

.site-credit-separator {
  color: inherit;
  opacity: 0.42;
}

.site-qr-share-trigger {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.site-credit-footer a:hover,
.site-qr-share-trigger:hover,
.site-qr-share-trigger:focus-visible {
  opacity: 1;
}

.site-qr-share-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  pointer-events: none;
}

.site-qr-share-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0);
  cursor: default;
  touch-action: none;
  transition: background 180ms ease;
}

.site-qr-share-sheet {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 0.7rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(16, 16, 18, 0.98);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.34);
  color: var(--text);
  transform: translateY(105%);
  transition: transform 220ms ease;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}

.site-qr-share-drawer.is-open {
  pointer-events: auto;
}

.site-qr-share-drawer.is-open .site-qr-share-backdrop {
  background: rgba(0, 0, 0, 0.32);
}

.site-qr-share-drawer.is-open .site-qr-share-sheet {
  transform: translateY(0);
}

.site-qr-share-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.site-qr-share-sheet h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.site-qr-share-code {
  display: grid;
  place-items: center;
  width: 240px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.site-qr-share-code img {
  display: block;
  width: 100%;
  height: 100%;
}

.site-qr-share-url {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.player-column {
  position: sticky;
  top: var(--playlist-sticky-top);
  z-index: 12;
  align-self: start;
  min-width: 0;
  width: 100%;
  max-width: 1080px;
  justify-self: center;
  background: var(--bg);
}

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
  cursor: default;
  touch-action: manipulation;
}

body.player-stage-fullscreen {
  overflow: hidden;
  overscroll-behavior: none;
}

body.player-stage-fullscreen .player-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  box-shadow: none;
  overscroll-behavior: none;
  touch-action: none;
}

body.player-stage-fullscreen .audio-stage {
  background: #000000;
}

body.player-stage-fullscreen .audio-stage-poster {
  object-fit: contain;
  object-position: center;
  opacity: 1;
}

.player-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.audio-stage {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 45%),
    #050505;
}

.audio-stage-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.player-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: #ffffff;
  font-family: var(--font-ui);
  opacity: 1;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.player-stage.is-controls-hidden .player-overlay {
  opacity: 0;
}

.player-stage.is-controls-hidden .player-overlay-button,
.player-stage.is-controls-hidden .player-round-control,
.player-stage.is-controls-hidden .player-play-overlay,
.player-stage.is-controls-hidden .player-mode-controls,
.player-stage.is-controls-hidden .player-mode-toggle,
.player-stage.is-controls-hidden .player-time-pill,
.player-stage.is-controls-hidden .player-seek-overlay {
  pointer-events: none;
}

.player-stage.is-controls-hidden:focus-within .player-overlay {
  opacity: 1;
}

.player-stage.is-controls-hidden:focus-within .player-overlay-button,
.player-stage.is-controls-hidden:focus-within .player-round-control,
.player-stage.is-controls-hidden:focus-within .player-play-overlay,
.player-stage.is-controls-hidden:focus-within .player-mode-controls,
.player-stage.is-controls-hidden:focus-within .player-mode-toggle,
.player-stage.is-controls-hidden:focus-within .player-time-pill,
.player-stage.is-controls-hidden:focus-within .player-seek-overlay {
  pointer-events: auto;
}

.player-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  min-height: 4.5rem;
  padding: clamp(0.45rem, 1.5vw, 0.85rem);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent);
  pointer-events: none;
}

.player-overlay-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  pointer-events: auto;
}

.player-overlay-button,
.player-round-control,
.player-play-overlay {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  pointer-events: auto;
  transition:
    background-color 120ms ease,
    opacity 120ms ease,
    transform 120ms ease;
}

.player-overlay-button {
  width: 2.35rem;
  height: 2.35rem;
  text-decoration: none;
}

.player-round-control {
  width: clamp(3rem, 7vw, 3.9rem);
  height: clamp(3rem, 7vw, 3.9rem);
  background: rgba(0, 0, 0, 0.36);
}

.player-play-overlay {
  width: clamp(4.1rem, 9vw, 5.15rem);
  height: clamp(4.1rem, 9vw, 5.15rem);
  background: rgba(0, 0, 0, 0.42);
}

.player-play-overlay .ui-icon {
  width: 2.15rem;
  height: 2.15rem;
}

.player-round-control .ui-icon {
  width: 1.65rem;
  height: 1.65rem;
}

.player-overlay-button:hover,
.player-round-control:hover,
.player-play-overlay:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.player-overlay-button:disabled,
.player-round-control:disabled,
.player-play-overlay:disabled,
.player-settings-button.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.player-settings-button.is-disabled {
  pointer-events: none;
}

.player-icon-pause,
.player-play-overlay.is-playing .player-icon-play {
  display: none;
}

.player-play-overlay.is-playing .player-icon-pause {
  display: block;
}

.player-center-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.35rem, 5vw, 3rem);
  pointer-events: none;
}

.player-bottom-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "time modes"
    "seek seek";
  align-items: end;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 5rem;
  padding: 1.65rem 1rem 0.3rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  pointer-events: none;
}

.player-time-pill {
  grid-area: time;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2.05rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.54);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: auto;
}

.player-time-divider {
  color: rgba(255, 255, 255, 0.58);
}

.player-mode-controls {
  grid-area: modes;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-width: 0;
  pointer-events: auto;
}

.player-mode-toggle {
  min-height: 1.58rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 0 0.46rem;
  background: rgba(0, 0, 0, 0.58);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    opacity 120ms ease,
    transform 120ms ease;
}

.player-mode-toggle.is-on {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
}

.player-mode-toggle:hover {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  transform: translateY(-1px);
}

.player-mode-toggle.is-on:hover {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.player-fullscreen-button {
  flex: 0 0 auto;
}

.player-seek-overlay {
  grid-area: seek;
  width: 100%;
  height: 0.72rem;
  margin: 0;
  accent-color: #e11845;
  cursor: pointer;
  pointer-events: auto;
}

.player-chrome {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 0.95rem 1rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.player-meta {
  display: grid;
  gap: 0.3rem;
}

.player-meta h1,
.player-meta p {
  margin: 0;
}

.player-meta h1 {
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  line-height: 1.04;
}

.player-description {
  margin: 0;
  max-width: 68ch;
  font-size: 0.93rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.player-description.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

.player-description a {
  color: var(--accent);
  font: inherit;
  font-weight: inherit;
  overflow-wrap: anywhere;
  text-decoration: underline;
}

.player-description a:hover,
.player-description a:focus-visible {
  color: var(--text);
}

.description-toggle {
  justify-self: start;
  width: fit-content;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
}

.description-toggle:hover,
.description-toggle:focus-visible {
  color: var(--text);
}

.share-main {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.share-panel {
  display: grid;
  gap: 1rem;
  border-radius: 20px;
}

.share-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-stage .player-media,
.share-stage .audio-stage {
  width: 100%;
  height: 100%;
}

.share-audio {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 1rem;
  z-index: 2;
  width: 90%;
}

.share-copy {
  display: grid;
  gap: 0.45rem;
}

.share-copy h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.queue-column {
  position: relative;
  z-index: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-header h2 {
  font-size: 1rem;
}

.queue-header p {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.88rem;
}

.queue-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.playlist-order-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.playlist-order-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.playlist-order-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.74);
  outline-offset: 2px;
}

.order-arrow {
  display: block;
  width: 0;
  height: 0;
  opacity: 0.34;
  transition: opacity 120ms ease, border-color 120ms ease;
}

.order-arrow-up {
  border-right: 0.28rem solid transparent;
  border-bottom: 0.44rem solid currentColor;
  border-left: 0.28rem solid transparent;
}

.order-arrow-down {
  border-top: 0.44rem solid currentColor;
  border-right: 0.28rem solid transparent;
  border-left: 0.28rem solid transparent;
}

.playlist-order-toggle.is-newest-first .order-arrow-up,
.playlist-order-toggle.is-oldest-first .order-arrow-down {
  opacity: 1;
}

.playlist-tab-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
}

.playlist-tabs {
  display: flex;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.05rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.playlist-tabs::-webkit-scrollbar {
  display: none;
}

.playlist-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  max-width: min(62vw, 12rem);
  min-height: 1.9rem;
  padding: 0.34rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  scroll-snap-align: start;
}

.playlist-tab:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.playlist-tab.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
}

.playlist-scroll-button {
  display: none;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
}

.playlist-scroll-button:disabled {
  opacity: 0.32;
  cursor: default;
}

.queue-list {
  display: grid;
}

.queue-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text);
}

.queue-item.has-drag-handle {
  grid-template-columns: 2.4rem minmax(0, 1fr);
}

.queue-select {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 4.9rem;
  padding: 0.45rem 1rem 0.45rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.queue-item:hover .queue-select {
  background: rgba(255, 255, 255, 0.04);
}

.queue-item.is-active .queue-select {
  background: rgba(255, 255, 255, 0.08);
}

.queue-item.is-hidden-item .queue-select {
  background: rgba(96, 20, 24, 0.28);
}

.queue-item.is-hidden-item:hover .queue-select {
  background: rgba(116, 27, 32, 0.36);
}

.queue-item.is-dragging .queue-select {
  opacity: 0.54;
}

.queue-item.is-drop-target::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  top: 0;
  z-index: 2;
  height: 2px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.queue-drag-handle {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 4.9rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.58);
  cursor: grab;
  touch-action: none;
}

.queue-drag-handle::before {
  content: "";
  width: 1.05rem;
  height: 1.15rem;
  background:
    repeating-linear-gradient(
      to bottom,
      currentColor 0,
      currentColor 2px,
      transparent 2px,
      transparent 6px
    );
}

.queue-drag-handle:hover,
.queue-drag-handle:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.queue-drag-handle:active {
  cursor: grabbing;
}

.queue-drag-handle:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.queue-index {
  display: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.queue-index::before {
  content: "00";
  visibility: hidden;
}

.queue-thumb,
.media-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 60%),
    #080808;
}

.queue-thumb img,
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.queue-playing-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0.5;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.queue-playing-indicator::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
  border-left: 0.68rem solid #ffffff;
}

.queue-item.is-active.is-playing .queue-playing-indicator {
  display: grid;
  animation: queue-playing-pulse 2.4s ease-in-out infinite;
}

@keyframes queue-playing-pulse {
  0%,
  100% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(0.94);
  }
  50% {
    opacity: 0.68;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .queue-item.is-active.is-playing .queue-playing-indicator {
    animation: none;
  }
}

.queue-meta {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-main {
  display: grid;
  gap: 1rem;
}

.admin-main--single {
  grid-template-columns: minmax(0, 1fr);
}

.admin-main--library {
  width: min(100%, 1120px);
}

.admin-main--upload {
  width: min(100%, 860px);
}

.upload-panel,
.library-panel {
  border-radius: 20px;
}

.upload-form,
.editor-grid {
  display: grid;
  gap: 0.8rem;
}

.upload-result {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(139, 240, 174, 0.22);
  background: rgba(139, 240, 174, 0.07);
}

.upload-result strong {
  color: #dfffe8;
}

.upload-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.field-row {
  display: grid;
  gap: 0.8rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field textarea {
  min-height: 6.8rem;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #000000;
  color: #d7d7d7;
}

.checkbox-field input {
  width: auto;
  margin: 0;
}

.playlist-field-group {
  display: grid;
  gap: 0.8rem;
}

.playlist-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field-label {
  color: #c6b8ac;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-playlist-row,
.upload-playlist-add-controls {
  display: grid;
  gap: 0.8rem;
}

.upload-playlist-add-controls {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.upload-playlist-add-controls .action-button {
  min-height: 3.25rem;
  padding-inline: 1rem;
  white-space: nowrap;
}

.playlist-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #000000;
}

.playlist-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e7e7e7;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.playlist-add-new-button {
  font: inherit;
  cursor: pointer;
}

.playlist-add-new-button:hover,
.playlist-add-new-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.playlist-option input {
  width: auto;
  margin: 0;
}

.playlist-new-control {
  position: relative;
}

.playlist-new-control input {
  padding-right: 4.6rem;
}

.playlist-new-save-button {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  min-width: 3.6rem;
  height: 2.15rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.playlist-new-save-button:hover,
.playlist-new-save-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.playlist-new-save-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.local-save-notice {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.24rem 0.52rem;
  border: 1px solid rgba(139, 240, 174, 0.28);
  border-radius: 7px;
  background: rgba(18, 48, 31, 0.88);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.local-save-notice.is-danger {
  border-color: rgba(255, 114, 114, 0.34);
  background: rgba(70, 20, 24, 0.92);
  color: #ff9a9a;
}

.status-line,
.mini-status {
  min-height: 1.3rem;
  margin: 0;
  font-size: 0.87rem;
}

.status-line[data-tone="success"],
.mini-status[data-tone="success"] {
  color: var(--success);
}

.status-line[data-tone="error"],
.mini-status[data-tone="error"] {
  color: var(--danger);
}

.library-list {
  display: grid;
  gap: 0.7rem;
}

.library-panel .admin-section-actions {
  margin-bottom: 0.85rem;
}

.library-panel .status-line {
  margin-top: 0.25rem;
}

.site-design-control-shell,
.site-font-control-shell {
  margin-bottom: 1rem;
}

.admin-sections-panel {
  border-radius: 20px;
}

.site-admin-heading {
  align-items: center;
  flex-wrap: wrap;
}

.site-account-link {
  margin-left: auto;
  color: #8bbde8;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
  text-decoration-color: rgba(139, 189, 232, 0.55);
  text-underline-offset: 0.18em;
}

.site-account-link:hover,
.site-account-link:focus-visible {
  color: #b9daf5;
  text-decoration-color: currentColor;
}

.admin-sections-grid {
  display: grid;
  gap: 0.9rem;
}

.admin-section-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.admin-section-card--primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.admin-section-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-section-card p {
  margin: 0;
}

.admin-section-card > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.admin-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.launch-readiness {
  display: grid;
  gap: 0.75rem;
}

.launch-check-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.launch-check-item {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  color: var(--muted);
}

.launch-check-item.is-ready {
  color: var(--text);
}

.launch-check-item > span {
  color: var(--muted);
}

.launch-check-item.is-ready > span {
  color: var(--success);
}

.launch-check-item strong,
.launch-check-item small {
  display: block;
}

.launch-check-item small {
  margin-top: 0.12rem;
  color: var(--muted);
}

.admin-domain-form {
  display: grid;
  gap: 0.7rem;
}

.admin-domain-list {
  display: grid;
  gap: 0.45rem;
}

.admin-domain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-domain-host {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.admin-domain-pill {
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-domain-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 800;
}

.toggle-control input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #ffffff;
}

.public-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 800;
  cursor: pointer;
}

.public-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.public-toggle-track {
  position: relative;
  width: 2.6rem;
  height: 1.45rem;
  border: 1px solid rgba(230, 95, 112, 0.45);
  border-radius: 999px;
  background: rgba(125, 35, 48, 0.38);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.public-toggle-track::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #c8c8c8;
  transform: translateX(1.18rem);
  transition: transform 140ms ease, background-color 140ms ease;
}

.public-toggle input:checked + .public-toggle-track {
  border-color: rgba(112, 239, 185, 0.7);
  background: rgba(57, 173, 124, 0.55);
}

.public-toggle input:checked + .public-toggle-track::after {
  transform: translateX(0);
  background: #ffffff;
}

.public-toggle input:focus-visible + .public-toggle-track {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.public-toggle input:disabled + .public-toggle-track {
  opacity: 0.45;
  cursor: not-allowed;
}

.editor-visibility-toggle {
  min-height: 2.35rem;
  padding: 0 0.05rem;
}

.site-design-control,
.site-font-control {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-design-control-header,
.site-font-control-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-design-control-header h3,
.site-font-control-header h3 {
  margin: 0;
  font-size: 1rem;
}

.site-design-current,
.site-font-current {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: right;
}

.site-design-current strong,
.site-font-current strong {
  color: var(--text);
}

.site-design-options,
.site-font-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-design-option.is-active,
.site-font-option.is-active {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.site-design-option.is-active:hover,
.site-font-option.is-active:hover {
  border-color: #ffffff;
  background: #ffffff;
}

.brand-color-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0;
}

.brand-color-picker {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  gap: 0.35rem;
  grid-template-columns: auto auto;
  margin: 0;
}

.brand-color-picker > span {
  grid-column: 1 / -1;
}

.brand-color-picker input[type="color"] {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  cursor: pointer;
  height: 2.55rem;
  padding: 0.2rem;
  width: 3.2rem;
}

.brand-font-picker {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  gap: 0.35rem;
}

.brand-font-picker select {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  color: var(--text);
  min-height: 2.55rem;
  padding: 0.45rem 2rem 0.45rem 0.7rem;
}

.brand-favicon-preview {
  align-items: center;
  background: var(--preview-brand-color, #000000);
  border: 1px solid color-mix(in srgb, var(--preview-font-color, #ffffff) 28%, transparent);
  border-radius: 8px;
  color: var(--preview-font-color, #ffffff);
  display: inline-flex;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  height: 2.55rem;
  justify-content: center;
  line-height: 1;
  width: 2.55rem;
}

#brand-color-value,
#brand-font-color-value,
#site-background-color-value,
#site-panel-color-value,
#site-text-color-value,
#site-muted-color-value {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  min-width: 4.7rem;
}

.brand-color-form .action-button {
  min-height: 2.55rem;
}

.site-live-preview {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.site-live-preview-topbar {
  align-items: center;
  background: var(--site-brand-color, #000000);
  color: var(--site-brand-font-color, #ffffff);
  display: flex;
  font-family: var(--font-ui);
  justify-content: space-between;
  min-height: 3.4rem;
  padding: 0.8rem 1rem;
}

.site-live-preview-topbar strong {
  font-family: var(--font-banner);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-live-preview-gear {
  font-size: 1rem;
  opacity: 0.72;
}

.site-live-preview-body {
  background: var(--bg);
  display: grid;
  font-family: var(--font-content);
  gap: 0;
}

.site-live-preview-media {
  background: linear-gradient(145deg, #25375f 0%, #d24b3f 58%, #f2b94b 100%);
  border-radius: 0;
  min-height: 150px;
  overflow: hidden;
  position: relative;
}

.site-live-preview-sun {
  background: #ffd867;
  border-radius: 50%;
  height: 54px;
  position: absolute;
  right: 18%;
  top: 17%;
  width: 54px;
}

.site-live-preview-horizon {
  background: linear-gradient(150deg, transparent 0 27%, #18233c 28% 49%, #0d1424 50%);
  bottom: 0;
  height: 68%;
  left: 0;
  opacity: 0.88;
  position: absolute;
  right: 0;
}

.site-live-preview-play {
  align-items: center;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  height: 2.8rem;
  justify-content: center;
  left: 50%;
  padding-left: 0.16rem;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.8rem;
}

.site-live-preview-copy span,
.site-live-preview-index {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-live-preview-copy h3 {
  color: var(--text);
  font-family: inherit;
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  margin: 0.25rem 0 0.35rem;
}

.site-live-preview-copy p {
  color: var(--text);
  margin: 0;
}

.site-live-preview-copy {
  background: var(--bg-panel);
  padding: 1rem;
}

.site-live-preview-copy small {
  color: var(--muted);
  display: block;
  line-height: 1.45;
  margin-top: 0.55rem;
}

.site-live-preview-library-head {
  align-items: center;
  background: var(--bg-panel);
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.site-live-preview-library-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-live-preview-row {
  align-items: center;
  background: var(--bg-panel);
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto 52px minmax(0, 1fr);
  padding: 0.85rem 1rem;
}

.site-live-preview-thumb {
  background: linear-gradient(145deg, #25375f, #d24b3f 64%, #f2b94b);
  border-radius: 6px;
  height: 42px;
  width: 52px;
}

.site-live-preview-row strong,
.site-live-preview-row small {
  display: block;
}

.site-live-preview-row small {
  color: var(--muted);
  margin-top: 0.15rem;
}

.media-library-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(240px, auto);
  gap: 0.85rem;
  align-items: start;
  padding: 0.72rem 0.72rem 0.72rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    transform 120ms ease;
}

.media-library-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.media-library-card.is-dragging {
  opacity: 0.48;
}

.media-library-card.is-drop-target {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.media-library-card.is-hidden-item {
  border-color: rgba(156, 48, 55, 0.42);
  background: rgba(96, 20, 24, 0.22);
}

.media-library-card.is-hidden-item:hover {
  border-color: rgba(178, 64, 72, 0.52);
  background: rgba(116, 27, 32, 0.3);
}

.media-library-thumb-link,
.media-library-title-link {
  color: inherit;
  text-decoration: none;
}

.media-library-thumb-link {
  display: block;
  border-radius: 12px;
}

.media-library-thumb-link:focus-visible,
.media-library-title-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.media-library-title-link:hover {
  color: #ffffff;
}

.media-library-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 60%),
    #080808;
}

.media-library-main {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.media-library-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.media-library-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-library-thumb-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
    #050505;
}

.media-library-title-link {
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.3;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-library-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 240, 174, 0.25);
  background: rgba(139, 240, 174, 0.08);
  color: #cff6dc;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-library-badge.is-hidden-badge {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.74);
}

.media-library-meta,
.media-library-creator {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.media-library-meta {
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-library-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 430px;
}

.media-library-drag-handle {
  position: absolute;
  top: 50%;
  left: 0.3rem;
  z-index: 2;
  width: 1.15rem;
  height: 2.75rem;
  border: 0;
  border-radius: 7px;
  color: var(--media-action-border);
  cursor: grab;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 120ms ease, background-color 120ms ease;
  user-select: none;
}

.media-library-drag-handle::before {
  position: absolute;
  top: calc(50% - 4px);
  left: 50%;
  width: 0.82rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.media-library-card:hover .media-library-drag-handle,
.media-library-card:focus-within .media-library-drag-handle,
.media-library-card.is-dragging .media-library-drag-handle {
  opacity: 0.9;
}

.media-library-drag-handle:hover {
  background: rgba(115, 137, 165, 0.12);
}

.media-library-action-button {
  border-color: var(--media-action-border);
  color: var(--media-action-color, var(--text));
}

.media-outline-action-button {
  border-color: var(--media-action-border);
  color: var(--media-action-color, var(--text));
}

.media-library-action-button:hover,
.media-outline-action-button:hover,
.media-outline-action-button:focus-visible {
  border-color: var(--media-action-border-hover);
  background: var(--media-action-background-hover);
}

.media-action--drag {
  --media-action-border: #7389a5;
}

.media-action--settings {
  --media-action-border: #5daeba;
  --media-action-border-hover: #7bc7d1;
  --media-action-background-hover: rgba(79, 135, 144, 0.09);
  --media-action-color: #8dd4dc;
}

.media-action--open-share {
  --media-action-border: #5ca87b;
  --media-action-border-hover: #78c497;
  --media-action-background-hover: rgba(79, 137, 107, 0.09);
  --media-action-color: #8bd0a5;
}

.media-action--copy-share {
  --media-action-border: #9278c1;
  --media-action-border-hover: #ab92d5;
  --media-action-background-hover: rgba(121, 105, 154, 0.09);
  --media-action-color: #b8a2df;
}

.media-action--social-link {
  --media-action-border: #c9b15a;
  --media-action-border-hover: #e0ca73;
  --media-action-background-hover: rgba(180, 152, 62, 0.1);
  --media-action-color: #f1dd8c;
}

.media-action--download {
  --media-action-border: #bd8f4f;
  --media-action-border-hover: #d2a866;
  --media-action-background-hover: rgba(146, 117, 79, 0.09);
  --media-action-color: #d9b274;
}

.media-action--move-up {
  --media-action-border: #668fc4;
  --media-action-border-hover: #82a9d8;
  --media-action-background-hover: rgba(90, 120, 156, 0.09);
  --media-action-color: #91b5e0;
}

.media-action--move-down {
  --media-action-border: #b57d5a;
  --media-action-border-hover: #ca9878;
  --media-action-background-hover: rgba(141, 105, 81, 0.09);
  --media-action-color: #d4a083;
}

.media-library-card:active .media-library-drag-handle {
  cursor: grabbing;
}

.media-library-action-button {
  width: 2.35rem;
  min-width: 2.35rem;
  min-height: 2.25rem;
  padding: 0;
}

.media-action-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (hover: none), (pointer: coarse) {
  .media-library-drag-handle {
    opacity: 0.62;
  }
}

.media-cleanup-panel {
  display: grid;
  gap: 0.9rem;
}

.cleanup-summary {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cleanup-summary:empty {
  display: none;
}

.cleanup-summary-line,
.cleanup-warning {
  margin: 0;
}

.cleanup-warning {
  color: #ffd6d6;
}

.cleanup-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cleanup-list li {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cleanup-path {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.cleanup-meta {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-main--editor {
  max-width: 1120px;
}

.section-header--stack {
  align-items: flex-start;
}

.section-note--left {
  text-align: left;
}

.media-editor-panel {
  display: grid;
  gap: 1rem;
}

.media-editor-layout {
  display: grid;
  gap: 1rem;
}

.media-editor-preview,
.media-editor-form-wrap {
  display: grid;
  gap: 0.85rem;
}

.editor-publish-tools {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-link-control {
  position: relative;
}

.share-link-control input {
  padding-right: 3.05rem;
}

.share-link-copy-notice {
  position: absolute;
  right: 0.1rem;
  bottom: calc(100% + 0.4rem);
  z-index: 2;
  max-width: min(13rem, 80vw);
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(139, 240, 174, 0.32);
  border-radius: 7px;
  background: rgba(18, 48, 31, 0.96);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.share-link-copy-button {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.share-link-copy-button::before,
.share-link-copy-button::after {
  position: absolute;
  width: 0.62rem;
  height: 0.74rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  content: "";
}

.share-link-copy-button::before {
  top: 0.58rem;
  left: 0.58rem;
  opacity: 0.58;
}

.share-link-copy-button::after {
  top: 0.78rem;
  left: 0.82rem;
  background: #000000;
}

.share-link-copy-button:hover,
.share-link-copy-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.share-link-copy-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.share-link-copy-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.editor-video-render-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.editor-video-render-panel h3 {
  margin: 0;
  font-size: 1.05rem;
}

.editor-video-render-preview {
  width: 100%;
  max-height: 320px;
  border-radius: 10px;
  background: #05070a;
}

.editor-social-link-tools {
  display: grid;
  gap: 0.65rem;
}

.editor-social-link-tools .action-button {
  justify-self: start;
}

.editor-visual-tools {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-visual-tools h3 {
  margin: 0;
  font-size: 1.05rem;
}

.visual-asset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.visual-asset-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.42rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.visual-asset-card.is-selected {
  border-color: rgba(154, 255, 217, 0.62);
  background: rgba(31, 170, 123, 0.12);
}

.visual-asset-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #000000;
}

.visual-asset-text {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.visual-asset-text span,
.visual-empty-note {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.visual-asset-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-waveform {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #050505;
  touch-action: none;
  user-select: none;
}

.visual-waveform canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.visual-segment-layer {
  position: absolute;
  inset: 0;
}

.visual-segment {
  position: absolute;
  top: 48%;
  bottom: 0.55rem;
  min-width: 2rem;
  overflow: hidden;
  padding: 0 0.5rem 0 0.72rem;
  border: 1px solid rgba(154, 255, 217, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 170, 123, 0.42), rgba(31, 111, 235, 0.36));
  color: #ffffff;
  cursor: grab;
  font: inherit;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.visual-segment:active {
  cursor: grabbing;
}

.visual-segment-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0.42rem;
  background: rgba(154, 255, 217, 0.78);
}

.visual-segment-label {
  position: absolute;
  left: 0.74rem;
  right: 0.42rem;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
}

.visual-segment-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.visual-now-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.visual-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.visual-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.visual-cue-add-row {
  display: none;
}

.visual-cue-row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.visual-cue-list {
  display: grid;
  gap: 0.55rem;
}

.visual-cue-row {
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.visual-cue-time {
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 900;
}

.visual-cue-info {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.visual-cue-info strong,
.visual-cue-info small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-cue-info strong {
  color: var(--text);
  font-size: 0.86rem;
}

.visual-cue-info small {
  color: var(--muted);
  font-size: 0.75rem;
}

.tiny-action {
  min-height: 2.15rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 800;
}

.tiny-action.is-danger {
  border-color: rgba(255, 107, 107, 0.38);
  color: #ffc9c9;
}

.media-editor-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 60%),
    #050505;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-editor-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-editor-player {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000000;
}

body:not(.player-stage-fullscreen) .media-editor-player-stage {
  position: relative;
  top: auto;
  z-index: auto;
  box-shadow: none;
}

body.player-stage-fullscreen .media-editor-player {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

body.player-stage-fullscreen .media-editor-player-stage {
  border-radius: 0;
}

.media-editor-preview-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.media-editor-poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.media-editor-file-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.empty-panel {
  padding: 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.hidden {
  display: none !important;
}

@media (min-width: 760px) {
  .upload-playlist-row {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    align-items: end;
  }

  .visual-cue-add-row {
    grid-template-columns: minmax(160px, 1fr) 130px minmax(180px, 1fr) auto;
  }

  .visual-cue-row {
    grid-template-columns: 110px minmax(160px, 1fr) minmax(180px, 1fr) auto;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }

  .welcome-panel {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    align-items: end;
  }

  .welcome-panel.welcome-panel--minimal {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-library-card {
    grid-template-columns: 108px minmax(0, 1fr) minmax(280px, auto);
  }

  .admin-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-editor-layout {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
  }
}

@media (min-width: 980px) {
  .playlist-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.92fr);
  }

  .queue-column {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100vh - var(--playlist-sticky-top));
    max-height: calc(100dvh - var(--playlist-sticky-top));
    overflow: auto;
  }

  .playlist-tab-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.35rem;
  }

  .playlist-tab-shell .playlist-scroll-button:not([hidden]) {
    display: grid;
  }

  .admin-main {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    align-items: start;
  }

  .admin-main--single,
  .admin-main--editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 979px) {
  .player-column {
    display: contents;
    position: static;
  }

  .player-stage {
    position: sticky;
    top: var(--playlist-sticky-top);
    z-index: 12;
    box-shadow:
      0 14px 32px rgba(0, 0, 0, 0.48),
      0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .player-chrome {
    position: relative;
    z-index: 2;
    gap: 0.56rem;
    padding-bottom: 0.82rem;
    background: var(--bg);
  }

  .queue-header {
    padding-top: 0.68rem;
  }

  .queue-select {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .queue-meta {
    display: none;
  }
}

@media (max-width: 639px) {
  .topbar {
    padding: 0.75rem 0.85rem;
  }

  .topbar-nav {
    gap: 0.7rem;
  }

  .dashboard-main,
  .admin-main {
    padding: 0.85rem;
  }

  .panel,
  .hero-panel {
    border-radius: 18px;
    padding: 0.9rem;
  }

  .queue-header,
  .player-chrome {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .player-overlay-button {
    width: 2.15rem;
    height: 2.15rem;
  }

  .player-mode-controls {
    gap: 0.22rem;
  }

  .player-mode-toggle {
    min-height: 1.45rem;
    padding: 0 0.36rem;
    font-size: 0.56rem;
  }

  .player-bottom-overlay {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .queue-item.has-drag-handle {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .queue-select {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.6rem;
    padding-left: 0.45rem;
    padding-right: 0.85rem;
  }

  .queue-drag-handle {
    min-height: 4.65rem;
  }

  .upload-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .media-library-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.65rem 0.65rem 0.65rem 1.65rem;
  }

  .media-library-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  .site-design-control-header,
  .site-font-control-header {
    flex-direction: column;
  }

  .site-design-current,
  .site-font-current {
    text-align: left;
  }

  .site-live-preview-media {
    min-height: 132px;
  }
}
