﻿:root {
  --theme-grid-size: 120px;
}

html {
  background: var(--design-bg, #f7f8fb);
}

body {
  position: relative;
  z-index: 0;
  background-color: var(--bs-body-bg);
  background-image: none;
  background-attachment: fixed;
}

body::before {
  content: none;
}

body.dark {
  background-color: var(--bs-body-bg);
  background-image: none;
}

body.dark::before {
  content: none;
}

.header {
  background: var(--bs-header-bg);
  border-bottom-color: var(--bs-border-color);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease !important;
}

/* Glassmorphism scroll effects for all page types */
body.index-page .header.scrolled,
body.rules-page .header.scrolled,
body.paper-page .header.scrolled {
  background: rgba(250, 247, 241, 0.88) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

body.dark.index-page .header.scrolled,
body.dark.rules-page .header.scrolled,
body.dark.paper-page .header.scrolled,
html[data-theme="dark"] body.index-page .header.scrolled,
html[data-theme="dark"] body.rules-page .header.scrolled,
html[data-theme="dark"] body.paper-page .header.scrolled {
  background: rgba(19, 13, 26, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(7, 4, 14, 0.38) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.nav-links a {
  color: var(--bs-body-color);
  background: transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--bs-primary);
  background: rgba(92, 75, 139, 0.12);
}

body.dark .nav-links a {
  color: rgba(255, 255, 255, 0.82);
}

body.dark .nav-links a:hover,
body.dark .nav-links a:focus-visible,
body.dark .nav-links a.active {
  background: rgba(158, 138, 240, 0.28);
  color: #ffffff;
}

.theme-toggle,
.menu-toggle {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.32);
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 30px rgba(82, 61, 132, 0.22);
}

body.dark .theme-toggle,
body.dark .menu-toggle {
  border-color: rgba(158, 138, 240, 0.35);
  background: rgba(65, 51, 104, 0.6);
}

body.dark .theme-toggle:hover,
body.dark .theme-toggle:focus-visible,
body.dark .menu-toggle:hover,
body.dark .menu-toggle:focus-visible {
  background: rgba(114, 93, 176, 0.75);
  box-shadow: 0 18px 36px rgba(7, 5, 18, 0.6);
}

/* Unified site rhythm */
:root {
  --ui-radius-card: 8px;
  --ui-radius-control: 8px;
  --ui-radius-pill: 8px;
  --ui-panel-border: 1px solid rgba(18, 18, 18, 0.1);
  --ui-panel-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
  --ui-content-width: 980px;
  --ui-content-padding: clamp(1.1rem, 2vw, 1.5rem);
  --ui-stack-gap: clamp(1rem, 2vw, 1.35rem);
}

.page-hero-title {
  margin: 0;
  text-align: center;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(2.8rem, 4.2vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.page-hero-desc {
  margin: 0 auto;
  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(1.02rem, 0.35vw + 0.98rem, 1.2rem);
  font-weight: 800;
  line-height: 1.34;
  text-align: center;
  max-width: 690px;
}

body.dark.paper-page .page-hero-desc,
html[data-theme="dark"] body.paper-page .page-hero-desc {
  color: rgba(242, 234, 255, 0.84) !important;
}

.container,
.rules-container,
.extensions-shell,
.music-requests-layout,
.admin-content-inner,
.hero-content {
  width: min(100%, var(--ui-content-width));
}

.rules-container,
.extensions-shell,
.music-requests-layout {
  padding-inline: var(--ui-content-padding);
}

.rules-container > * + *,
.extensions-shell > * + *,
.music-requests-layout > * + *,
.admin-content-inner > * + * {
  margin-top: var(--ui-stack-gap);
}

.rules-container p,
.rules-container li,
.extensions-intro,
.extension-card p,
.music-desc,
.music-policy-list li,
.news-body,
.news-item p,
.command-card p,
.widget-settings-card__hint,
.admin-section-note,
.admin-kpi-meta,
.admin-topbar-title p {
  font-size: 1rem;
  line-height: 1.65;
}

.rules-container h2,
.extensions-shell h2,
.music-requests-layout h2,
.admin-section-header h2,
.queue-title,
.extensions-group-title {
  margin-bottom: 0;
}

.content-card,
.feature-card,
.extension-card,
.command-card,
.commercial-card,
.news-item,
.widget-settings-card,
.admin-card,
.news-editor,
.rules-desc,
.track-card,
.control-block,
.admin-empty-state,
.admin-today-stat,
.blacklist-row,
.widget-link__input,
.queue-add-row input,
.blacklist-add input,
.blacklist-import textarea,
.news-editor input[type="text"],
.news-editor textarea,
.news-editor input[type="number"],
.news-editor input[type="url"],
.news-editor input[type="file"],
.news-editor select {
  border-radius: var(--ui-radius-card);
}

.content-card,
.feature-card,
.extension-card,
.command-card,
.commercial-card,
.news-item,
.widget-settings-card,
.admin-card,
.news-editor,
.rules-desc,
.track-card,
.control-block,
.admin-empty-state,
.admin-today-stat,
.blacklist-row {
  border: var(--ui-panel-border);
  box-shadow: var(--ui-panel-shadow);
}

.extension-card,
.widget-settings-card,
.admin-card,
.news-editor,
.commercial-card,
.rules-desc,
.news-item,
.command-card,
.track-card,
.content-card,
.feature-card {
  padding: clamp(1rem, 2vw, 1.35rem);
}

.content-grid,
.extensions-grid,
.news-grid,
.command-cards,
.widget-settings-grid,
.admin-grid,
.admin-kpi-grid,
.track-grid {
  gap: clamp(1rem, 2vw, 1.35rem);
}

.extensions-group,
.queue-title,
.rules-nav,
.news-grid,
.track-grid {
  margin-top: clamp(1.25rem, 2.4vw, 1.8rem);
}

.nav-links a,
.theme-toggle,
.menu-toggle,
.browser-buttons a,
.browser-buttons button,
.login-button,
.admin-action-button,
.overlay-button,
.segmented-button,
.commercial-btn,
.rules-btn,
.admin-btn,
.admin-quick-action,
.command-card__actions button,
.widget-link__copy,
.queue-add-btn,
.sidebar-toggle-btn {
  border-radius: var(--ui-radius-pill);
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.theme-toggle,
.menu-toggle,
.queue-add-btn,
.sidebar-toggle-btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.browser-buttons a,
.browser-buttons button,
.commercial-btn,
.rules-btn,
.admin-quick-action,
.command-card__actions button,
.widget-link__copy {
  justify-content: center;
}

.command-card__actions,
.commercial-actions,
.browser-buttons,
.widget-settings-card__actions,
.admin-actions-grid,
.quick-actions-stack {
  gap: 0.8rem;
}

.content-card .card-icon,
.feature-card .icon,
.extension-logo,
.admin-avatar,
.commercial-icon {
  border-radius: 16px;
}

.track-card__body,
.command-card-large pre,
.admin-section--quick-actions,
.admin-section--today-stats {
  padding: clamp(0.9rem, 1.8vw, 1.1rem);
}

.rules-btn,
.segmented-button,
.admin-status-pill,
.track-card__position,
.track-card__duration {
  font-size: 0.9rem;
}

.news-editor,
.widget-settings-card,
.admin-card,
.rules-desc,
.commercial-card {
  gap: 1rem;
}

.news-editor input[type="text"],
.news-editor textarea,
.news-editor input[type="number"],
.news-editor input[type="url"],
.news-editor select,
.queue-add-row input,
.widget-link__input,
.blacklist-add input,
.blacklist-import textarea {
  border-radius: var(--ui-radius-control);
  padding: 0.72rem 0.95rem;
}

.rules-nav,
.music-status-row,
.admin-topbar-actions,
.segmented {
  gap: 0.75rem;
}

body.dark .content-card,
body.dark .feature-card,
body.dark .extension-card,
body.dark .command-card,
body.dark .commercial-card,
body.dark .news-item,
body.dark .widget-settings-card,
body.dark .admin-card,
body.dark .news-editor,
body.dark .rules-desc,
body.dark .track-card,
body.dark .control-block,
body.dark .admin-empty-state,
body.dark .admin-today-stat,
body.dark .blacklist-row {
  background-image: none;
  background-color: var(--bs-card-bg);
}

@media (max-width: 768px) {
  .rules-container,
  .extensions-shell,
  .music-requests-layout {
    padding-inline: clamp(0.8rem, 4vw, 1rem);
  }

  .nav-links a,
  .browser-buttons a,
  .browser-buttons button,
  .login-button,
  .admin-action-button,
  .overlay-button,
  .segmented-button,
  .commercial-btn,
  .rules-btn,
  .admin-btn,
  .admin-quick-action,
  .command-card__actions button,
  .widget-link__copy {
    min-height: 42px;
    padding: 0.65rem 0.95rem;
  }
}

/* Music queue scale restore */
.music-requests-layout {
  width: min(100%, 1280px);
}

.music-requests-layout .track-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
  .music-requests-layout {
    width: min(100%, 1100px);
  }
}

@media (max-width: 767.98px) {
  .music-requests-layout .track-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1199.98px) {
  .music-requests-layout .track-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .music-requests-layout .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Current track highlight */
.music-requests-layout .track-card.is-current-track {
  border-color: rgba(167, 139, 250, 0.95);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.3), 4px 4px 0 rgba(66, 37, 110, 0.95);
}

.music-requests-layout .track-card__current {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #121212;
  background: #f3e8ff;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

body.dark .music-requests-layout .track-card__current {
  color: #1b1028;
  background: #d8b4fe;
  border-color: rgba(12, 8, 18, 0.8);
}

/* Header alignment tune */
.header-inner {
  max-width: 1360px;
  padding-left: clamp(1rem, 2.2vw, 1.75rem);
  padding-right: clamp(1rem, 2.4vw, 2rem);
}

@media (max-width: 768px) {
  .header-inner {
    padding-left: clamp(0.75rem, 4vw, 1rem);
    padding-right: clamp(0.75rem, 4vw, 1rem);
  }
}

/* Rules and aliases contrast fix */
.rules-btn {
  color: var(--bs-body-color);
  background: var(--bs-card-bg);
}

.rules-btn.active {
  color: #ffffff;
  background: #6d3df2;
}

body.dark .rules-btn {
  color: #f8f4ff;
  background: #2a1d3b;
  border-color: rgba(196, 167, 255, 0.42);
}

body.dark .rules-btn.active {
  color: #ffffff;
  background: var(--design-accent);
  border-color: var(--design-accent-hover);
}

.alias-chip .chip,
body.dark .alias-chip .chip {
  color: #f8f4ff;
  background: #3a2554;
  border: 1px solid rgba(196, 167, 255, 0.42);
}

.alias-chip .alias-popup {
  min-width: 96px;
  color: var(--bs-body-color);
  background: var(--bs-card-bg);
  border: 2px solid color-mix(in srgb, var(--design-accent) 45%, var(--design-border));
  box-shadow: none;
}

.alias-chip .alias-popup strong,
.alias-chip .alias-popup code,
.command-card__aliases {
  color: var(--bs-body-color);
}

body.dark .alias-chip .alias-popup {
  color: #f8f4ff;
  background: #23172f;
  border-color: color-mix(in srgb, var(--design-accent) 45%, var(--design-border));
}

body.dark .alias-chip .alias-popup strong,
body.dark .alias-chip .alias-popup code,
body.dark .command-card__aliases {
  color: #f3e8ff;
}

/* Commands page alignment */
.commands-shell > h1,
.commands-shell > p:first-of-type {
  text-align: center;
}

.commands-shell > p:first-of-type {
  max-width: 640px;
  margin-inline: auto;
}

.commands-shell .single-column {
  width: 100%;
}

/* 7TV admin layout */
.seventv-admin-shell {
  width: min(100%, 1260px);
  gap: 0.95rem;
}

.seventv-admin-shell > * + * {
  margin-top: 0.85rem;
}

.seventv-toolbar-card {
  padding: 1rem 1.15rem;
}

.seventv-toolbar-row {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 108px repeat(3, auto);
  gap: 0.75rem;
  align-items: end;
}

.seventv-toolbar-field {
  display: grid;
  gap: 0.35rem;
}

.seventv-toolbar-field .admin-input {
  width: 100%;
}

.seventv-export-btn {
  text-decoration: none;
}

.seventv-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(260px, 320px);
  gap: 1rem;
  align-items: start;
}

.seventv-chart-card,
.seventv-leaders-card,
.seventv-history-card {
  min-width: 0;
  max-width: 760px;
}

.seventv-activity-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 0.85rem;
  align-items: end;
  min-height: 360px;
}

.seventv-bar-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.seventv-bar-card__meta,
.seventv-bar-card__label,
.seventv-bar-card__sub {
  text-align: center;
}

.seventv-bar-card__meta {
  font-weight: 800;
  font-size: 0.95rem;
}

.seventv-bar-card__canvas {
  height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  border-radius: 20px;
  background: color-mix(in srgb, var(--design-accent) 7%, var(--design-surface));
  border: 1px solid color-mix(in srgb, var(--design-accent) 16%, var(--design-border));
}

.seventv-bar-card__bar {
  width: 100%;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, var(--design-accent-hover) 0%, var(--design-accent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.seventv-bar-card__label {
  font-weight: 700;
}

.seventv-bar-card__sub {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
}

.seventv-leaders-list,
.seventv-history-list {
  display: grid;
  gap: 0.55rem;
}

.seventv-leader-row,
.seventv-history-row {
  display: grid;
  gap: 0.6rem;
  align-items: center;
  border-radius: 16px;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--design-accent) 18%, var(--design-border));
  background: color-mix(in srgb, var(--design-accent) 6%, var(--design-surface));
}

.seventv-leader-row {
  grid-template-columns: 40px minmax(0, 1fr);
}

.seventv-leader-row__rank {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-weight: 900;
  background: color-mix(in srgb, var(--design-accent) 12%, var(--design-surface));
  color: var(--design-accent);
}

.seventv-leader-row__name,
.seventv-history-row__title {
  font-weight: 800;
  font-size: 0.95rem;
}

.seventv-leader-row__meta,
.seventv-history-row__meta {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  line-height: 1.3;
}

.seventv-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
}


.seventv-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.seventv-history-row__total {
  font-weight: 900;
  font-size: 1rem;
}

.seventv-history-row.is-current {
  border-color: color-mix(in srgb, var(--design-accent) 38%, transparent);
}

body.dark .seventv-bar-card__canvas,
body.dark .seventv-leader-row,
body.dark .seventv-history-row {
  background: rgba(30, 36, 42, 0.45);
  border-color: var(--design-border);
}

body.dark .seventv-leader-row__rank {
  background: color-mix(in srgb, var(--design-accent) 15%, var(--design-surface));
  color: var(--design-accent);
}

@media (max-width: 1200px) {
  .seventv-toolbar-row {
    grid-template-columns: minmax(220px, 1fr) 108px auto auto;
  }

  .seventv-toolbar-row .admin-action-button:first-of-type {
    grid-column: 1 / -1;
  }

  .seventv-overview-grid {
    grid-template-columns: 1fr;
  }

  .seventv-history-card {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .seventv-toolbar-row,
  .seventv-activity-chart {
    grid-template-columns: 1fr;
  }

  .seventv-bar-card__canvas {
    height: 180px;
  }
}

/* Overlay hub */
.overlay-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.overlay-admin-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.overlay-admin-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: var(--ui-panel-border);
  box-shadow: var(--ui-panel-shadow);
  background: linear-gradient(180deg, color-mix(in srgb, var(--design-accent) 18%, transparent), color-mix(in srgb, var(--design-accent) 6%, transparent));
  color: var(--design-accent);
  font-size: 1.35rem;
}

.overlay-admin-card__body {
  min-width: 0;
}

.overlay-admin-card__body h3 {
  margin: 0 0 0.35rem;
}

.overlay-admin-card__body p {
  margin: 0;
}

.overlay-admin-card__actions {
  display: flex;
  gap: 0.7rem;
  grid-column: 2;
  margin-top: 0.95rem;
}

.overlay-admin-card .widget-link__input {
  grid-column: 1 / -1;
  display: none;
}

.overlay-admin-card--chat {
  grid-column: 1 / -1;
}

.overlay-admin-card__config {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-top: 0.95rem;
}

.overlay-admin-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.overlay-admin-field--full {
  grid-column: 1 / -1;
}

.overlay-admin-field .admin-input {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
}

.overlay-admin-field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper-muted);
}

.overlay-admin-checkbox {
  align-self: end;
  min-height: 52px;
  margin: 0;
  padding: 0.9rem 1rem;
}

/* Overlay redesign */
.overlay-root {
  gap: 1rem;
}

.overlay-widget {
  border-radius: 28px;
  background: rgba(17, 11, 28, 0.9);
  border: 2px solid rgba(151, 117, 241, 0.42);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28), 6px 6px 0 rgba(71, 36, 124, 0.7);
}

.widget-label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(233, 225, 255, 0.72);
}

.reminder-widget {
  min-width: min(920px, 92vw);
  padding: 1.2rem 1.35rem;
}

.overlay-root--compact .reminder-widget,
.reminder-widget--showcase {
  min-width: min(980px, 94vw);
}

.reminder-items {
  position: relative;
  min-height: 170px;
}

.reminder-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 170px;
  padding: 1.25rem 1.35rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(33, 17, 53, 0.96), rgba(18, 11, 28, 0.98));
  border: 1px solid rgba(175, 145, 255, 0.2);
}

.reminder-item--social {
  grid-template-columns: 124px minmax(0, 1fr);
}

.reminder-item__icon {
  width: 124px;
  height: 124px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reminder-item__icon svg {
  width: 68px;
  height: 68px;
}

.reminder-item__icon--telegram { background: linear-gradient(180deg, #40b3ff, #1277db); }
.reminder-item__icon--youtube { background: linear-gradient(180deg, #ff5252, #cc1f1f); }
.reminder-item__icon--discord { background: linear-gradient(180deg, #7289da, #4659a8); }
.reminder-item__icon--boosty { background: linear-gradient(180deg, #ff9a3d, #ff6b00); }
.reminder-item__icon--video { background: linear-gradient(180deg, var(--design-accent-hover), var(--design-accent)); }
.reminder-item__icon--music { background: linear-gradient(180deg, #4fb3d8, #0f6f7d); }

.reminder-item__content {
  min-width: 0;
  display: grid;
  gap: 0.8rem;
}

.reminder-item__command {
  display: block;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
}

.reminder-item__body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease, max-height 260ms ease;
}

.reminder-item.is-revealed .reminder-item__body {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
}

.reminder-item__description {
  display: block;
  font-size: clamp(1rem, 1.75vw, 1.28rem);
  line-height: 1.45;
  font-weight: 600;
  color: rgba(239, 232, 255, 0.78);
}

.reminder-item__separator {
  display: none;
}

.reminder-items.is-animated .reminder-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
  transition: opacity 260ms ease, transform 260ms ease;
}

.reminder-items.is-animated .reminder-item.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@media (max-width: 991.98px) {
  .overlay-admin-grid {
    grid-template-columns: 1fr;
  }

  .reminder-widget,
  .overlay-root--compact .reminder-widget,
  .reminder-widget--showcase {
    min-width: min(100%, 94vw);
  }

  .reminder-item--social {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .reminder-item__icon {
    width: 92px;
    height: 92px;
  }

  .reminder-item__icon svg {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 767.98px) {
  .reminder-item,
  .reminder-item--social {
    grid-template-columns: 1fr;
  }

  .reminder-item__icon {
    width: 84px;
    height: 84px;
  }

  .overlay-admin-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .overlay-admin-card__icon {
    width: 56px;
    height: 56px;
  }

  .overlay-admin-card__actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .overlay-admin-card__config {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .overlay-admin-checkbox {
    grid-column: 1;
  }

  .overlay-admin-card--chat .widget-link__input {
    grid-column: 1 / -1;
  }
}
/* Overlay refinement */
.reminder-item__content {
  align-content: center;
}

.reminder-item__command {
  transform-origin: left center;
  transition: font-size 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.reminder-item:not(.is-revealed) .reminder-item__command {
  font-size: clamp(2.35rem, 4.8vw, 3.8rem);
}

.reminder-item.is-revealed .reminder-item__command {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  opacity: 0.98;
}

.reminder-item__body {
  max-width: 40rem;
}

.reminder-item--social .reminder-item__content,
.reminder-item--social .reminder-item__body,
.reminder-item--social .reminder-item__description {
  justify-items: start;
  text-align: left;
}

.reminder-item--social .reminder-item__command {
  text-align: left;
}

/* Overlay polish */
.overlay-widget {
  padding: 0.5rem 0.65rem;
  border-radius: 22px;
  background: rgba(20, 20, 25, 0.95);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
  overflow: visible;
}

.overlay-widget::before,
.overlay-widget::after {
  content: none;
  display: none;
}

.reminder-widget,
.overlay-root--compact .reminder-widget,
.reminder-widget--showcase {
  min-width: min(680px, 82vw);
  max-width: min(760px, 86vw);
  padding: 0.5rem;
}

.reminder-items {
  min-height: 124px;
}

.reminder-item {
  min-height: 124px;
  padding: 0.85rem 1rem;
  border-radius: 18px;
}

.reminder-item--social {
  grid-template-columns: 84px minmax(0, 1fr);
}

.reminder-item__icon {
  width: 84px;
  height: 84px;
  border-radius: 18px;
}

.reminder-item__icon svg,
.reminder-item__icon i {
  width: auto;
  height: auto;
  font-size: 2.7rem;
  line-height: 1;
}

.reminder-item__content {
  gap: 0.45rem;
}

.reminder-item:not(.is-revealed) .reminder-item__command {
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
}

.reminder-item.is-revealed .reminder-item__command {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.reminder-item__description {
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  line-height: 1.35;
}

.reminder-item__body {
  max-width: 30rem;
}

/* OBS transparent canvas */
body.overlay-body,
body.donation-overlay-body,
body.seventv-overlay-body,
body.code-overlay-body,
body.overlay-compact-body {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.overlay-body::before,
body.donation-overlay-body::before,
body.seventv-overlay-body::before,
body.code-overlay-body::before,
body.overlay-compact-body::before {
  content: none !important;
  display: none !important;
}

html:has(body.overlay-body),
html:has(body.donation-overlay-body),
html:has(body.seventv-overlay-body),
html:has(body.code-overlay-body),
html:has(body.overlay-compact-body) {
  background: transparent !important;
}

/* Comic commands overlay */
body.donation-overlay-body.overlay-compact-body .overlay-root--compact {
  gap: 0;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-widget {
  min-width: min(520px, 72vw);
  max-width: min(560px, 76vw);
  padding: 0;
  border: 3px solid #111;
  border-radius: 26px;
  background: #f4ecff;
  box-shadow: 8px 8px 0 #111;
  overflow: visible;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .widget-label {
  padding: 0.7rem 1rem 0;
  color: #111;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-items {
  min-height: 110px;
  padding: 0.75rem;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item {
  min-height: 110px;
  padding: 0.7rem 0.85rem;
  border: 3px solid #111;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 5px 5px 0 #111;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item--social {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.85rem;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__icon {
  width: 72px;
  height: 72px;
  border: 3px solid #111;
  border-radius: 18px;
  box-shadow: none;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__icon i,
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__icon svg {
  font-size: 2rem;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__content {
  gap: 0.28rem;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__command {
  color: #111;
  line-height: 0.95;
  letter-spacing: 0;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item:not(.is-revealed) .reminder-item__command {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item.is-revealed .reminder-item__command {
  font-size: clamp(1rem, 1.45vw, 1.2rem);
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__description {
  color: #4b5563;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Commands overlay polish */
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-widget {
  overflow: hidden;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-items {
  overflow: hidden;
  border-radius: 22px;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

/* Commands overlay final polish */
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-widget {
  border-radius: 28px;
  overflow: hidden;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-items {
  border-radius: 24px;
  overflow: hidden;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item {
  box-shadow: none;
  border-radius: 20px;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item:not(.is-revealed) .reminder-item__command {
  font-size: clamp(2.25rem, 3.8vw, 3.15rem);
  line-height: 0.9;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item.is-revealed .reminder-item__command {
  font-size: clamp(1.05rem, 1.65vw, 1.35rem);
}
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-widget {
  box-shadow: none;
  filter: drop-shadow(6px 6px 0 #111);
}

/* Commands overlay hard fix */
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-widget {
  border-radius: 30px !important;
  overflow: hidden !important;
  box-shadow: none !important;
  filter: none !important;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-items {
  border-radius: 26px !important;
  overflow: hidden !important;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item {
  border-radius: 22px !important;
  box-shadow: none !important;
}

body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item:not(.is-revealed) .reminder-item__command {
  font-size: clamp(2.6rem, 4.3vw, 3.5rem) !important;
  line-height: 0.88 !important;
}

/* Commands overlay text shadow fix */
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__command,
body.donation-overlay-body.overlay-compact-body .overlay-root--compact .reminder-item__description {
  text-shadow: none !important;
}

/* Music track overlay */
body.overlay-body .overlay-track {
  min-width: 0;
  color: #111;
}

body.overlay-body .music-overlay-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  min-width: min(460px, 68vw);
  max-width: min(560px, 74vw);
  padding: 0.7rem 0.85rem;
  border: 3px solid #111;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  overflow: hidden;
}

body.overlay-body .music-overlay-card__thumb-wrap {
  width: 84px;
  height: 84px;
  border: 3px solid #111;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #4fb3d8 0%, #0f6f7d 100%);
}

body.overlay-body .music-overlay-card__thumb,
body.overlay-body .music-overlay-card__thumb--fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.overlay-body .music-overlay-card__body {
  display: flex;
  min-width: 0;
  min-height: 84px;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}

body.overlay-body .music-overlay-card__title {
  display: -webkit-box;
  overflow: hidden;
  color: #111;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.overlay-body .music-overlay-card__elapsed {
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: none;
}

/* Extensions logos keep their brand colors in dark theme. */
body.dark .extension-logo.logo-7tv {
  background: #02abd1 !important;
}

body.dark .extension-logo.logo-bttv {
  background: #ef4444 !important;
}

body.dark .extension-logo.logo-ffz {
  background: #b45309 !important;
}

body.dark .extension-logo.logo-frosty {
  background: linear-gradient(180deg, #9146ff 0%, #0f0f14 100%) !important;
}

/* Buttons: halftone fades from right (100%) to left (0%). */
.nav-links a,
.theme-toggle,
.menu-toggle,
.browser-buttons a,
.browser-buttons button,
.login-button,
.admin-action-button,
.overlay-button,
.segmented-button,
.commercial-btn,
.rules-btn,
.admin-btn,
.admin-quick-action,
.command-card__actions button,
.widget-link__copy,
.queue-add-btn,
.sidebar-toggle-btn,
.footer-social-link {
  background-image: none !important;
  isolation: isolate;
}

.nav-links a::before,
.theme-toggle::before,
.menu-toggle::before,
.browser-buttons a::before,
.browser-buttons button::before,
.login-button::before,
.admin-action-button::before,
.overlay-button::before,
.segmented-button::before,
.commercial-btn::before,
.rules-btn::before,
.admin-btn::before,
.admin-quick-action::before,
.command-card__actions button::before,
.widget-link__copy::before,
.queue-add-btn::before,
.sidebar-toggle-btn::before,
.footer-social-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(circle at 1px 1px, var(--button-halftone, rgba(18,18,18,0.12)) 1px, transparent 0);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.82) 38%, rgba(0, 0, 0, 0.32) 72%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.82) 38%, rgba(0, 0, 0, 0.32) 72%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Admin hard reset: no halftone on layout blocks or sidebar items. */
.admin-layout .admin-card,
.admin-layout .admin-panel,
.admin-layout .admin-empty-state,
.admin-layout .admin-today-stat,
.admin-layout .admin-sidebar,
.admin-layout .admin-nav a,
.admin-layout .admin-quick-action,
.admin-layout .admin-action-button,
.admin-layout .admin-btn,
.admin-layout .sidebar-toggle-btn {
  background-image: none !important;
}

.admin-layout .admin-nav a::before,
.admin-layout .admin-quick-action::before,
.admin-layout .admin-action-button::before,
.admin-layout .admin-btn::before,
.admin-layout .sidebar-toggle-btn::before {
  content: none !important;
  display: none !important;
}

/* Overlay hub spacing polish. */
.overlay-admin-grid {
  gap: 1.5rem;
}

.overlay-admin-card {
  padding: 1.35rem;
  gap: 1.15rem;
}

.overlay-admin-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.overlay-admin-card__actions {
  gap: 0.9rem;
  margin-top: 1.15rem;
}

.overlay-admin-card .widget-link__input {
  grid-column: 1 / -1;
  display: none;
}

.overlay-admin-card .widget-link__input.is-visible {
  display: block;
}

.overlay-admin-card--chat .widget-link__input {
  grid-column: 2;
}

/* Admin music layout polish */
.admin-section-header__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

#music-settings.is-collapsed {
  display: none;
}

.music-settings-limit {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--design-accent) 22%, transparent);
  background: color-mix(in srgb, var(--design-accent) 8%, transparent);
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 991.98px) {
  .admin-section-header__actions {
    align-items: flex-start;
  }
}

.music-settings-limit-field {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.music-settings-limit-field input {
  width: min(180px, 100%);
}

.footer-social-link--twitch {
  background: #7300b8 !important;
}

.footer-social-link--youtube {
  background: #ff2216 !important;
}

.footer-social-link--telegram {
  background: #38a2d9 !important;
}

.footer-social-link--discord {
  background: #6169ef !important;
}

.footer-social-link--boosty {
  background: #fc781f !important;
}

/* Paper layout refresh for landing and rules pages */
body.index-page,
body.rules-page {
  --paper-surface: #f6f1e9;
  --paper-ink: #161515;
  --paper-muted: rgba(22, 21, 21, 0.7);
  --paper-card: rgba(255, 255, 255, 0.94);
  --paper-shadow-soft: 0 18px 36px rgba(39, 29, 24, 0.08);
  --paper-shadow-strong: 0 28px 54px rgba(32, 22, 16, 0.12);
  --paper-purple-start: var(--design-accent);
  --paper-purple-end: var(--design-accent-hover);
  --paper-scribble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 18' fill='none'%3E%3Cpath d='M2 13.8C23.8 12.1 47.1 12.2 69.6 11.8C92.1 11.3 115.5 10.2 138 8.8' stroke='%23ff1d1d' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M64.3 2.9l2.4 3.7l3-5.1' stroke='%23ff1d1d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.96), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(224, 219, 211, 0.82), transparent 20%),
    linear-gradient(135deg, #f0ece6 0%, #faf7f1 42%, #ebe6de 100%);
  color: var(--paper-ink);
  position: relative;
  isolation: isolate;
}

body.index-page::before,
body.rules-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 25%, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 77% 14%, rgba(217, 211, 203, 0.78), transparent 20%),
    radial-gradient(circle at 42% 74%, rgba(255, 255, 255, 0.58), transparent 18%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0 10px, rgba(221, 214, 205, 0.18) 10px 20px);
  mix-blend-mode: soft-light;
  opacity: 0.9;
  pointer-events: none;
  z-index: -2;
}

body.index-page .page-wrapper,
body.rules-page .page-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body.index-page .page-main,
body.rules-page .page-main {
  width: min(1480px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) 0 0;
}

body.index-page .header,
body.rules-page .header {
  background: rgba(249, 245, 238, 0.76);
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.index-page .header-inner,
body.rules-page .header-inner {
  max-width: 1680px;
  align-items: center;
  gap: clamp(0.9rem, 1.9vw, 2.4rem);
  padding: clamp(1rem, 1.7vw, 1.45rem) clamp(1.4rem, 3vw, 2.1rem);
}

body.index-page .logo-image,
body.rules-page .logo-image {
  height: clamp(40px, 3.8vw, 58px);
  filter: drop-shadow(0 5px 0 rgba(145, 55, 223, 0.18));
}

body.index-page .nav-links,
body.rules-page .nav-links {
  gap: clamp(0.9rem, 1.4vw, 1.9rem);
}

body.index-page .nav-links a,
body.rules-page .nav-links a,
body.index-page .rules-btn,
body.rules-page .rules-btn {
  --paper-underline-image: var(--paper-scribble);
  position: relative;
  padding: 0.15rem 0.2rem 0.8rem;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(1.15rem, 0.72vw + 0.9rem, 1.65rem);
  font-weight: 400;
  color: var(--paper-ink);
  line-height: 1;
}

body.index-page .nav-link--home,
body.rules-page .nav-link--home {
  --paper-underline-image: url("/nav-hover-home.svg?v=20260319-1148");
}

body.index-page .nav-link--rules,
body.rules-page .nav-link--rules {
  --paper-underline-image: url("/nav-hover-rules.svg?v=20260319-1148");
}

body.index-page .nav-link--emotes,
body.rules-page .nav-link--emotes {
  --paper-underline-image: url("/nav-hover-emotes.svg?v=20260319-1148");
}

body.index-page .nav-link--extensions,
body.rules-page .nav-link--extensions {
  --paper-underline-image: url("/nav-hover-extensions.svg?v=20260319-1148");
}

body.index-page .nav-link--commands,
body.rules-page .nav-link--commands {
  --paper-underline-image: url("/nav-hover-commands.svg?v=20260319-1148");
}

body.index-page .nav-link--music,
body.rules-page .nav-link--music {
  --paper-underline-image: url("/nav-hover-music.svg?v=20260319-1148");
}

body.index-page .nav-link--commercial,
body.rules-page .nav-link--commercial {
  --paper-underline-image: url("/nav-hover-commercial.svg?v=20260319-1148");
}

body.index-page .nav-links a::before,
body.rules-page .nav-links a::before,
body.index-page .rules-btn::before,
body.rules-page .rules-btn::before,
body.index-page .theme-toggle::before,
body.rules-page .theme-toggle::before,
body.index-page .menu-toggle::before,
body.rules-page .menu-toggle::before,
body.index-page .footer-social-link::before,
body.rules-page .footer-social-link::before {
  content: none !important;
  display: none !important;
}

body.index-page .nav-links a::after,
body.rules-page .nav-links a::after {
  content: "";
  position: absolute;
  left: -0.15rem;
  right: -0.15rem;
  bottom: 0;
  height: 0.95rem;
  background: var(--paper-underline-image) center / 100% 100% no-repeat;
  opacity: 0;
  transform: translateY(0.25rem) scaleX(0.94) rotate(-1deg);
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}

body.index-page .rules-btn::after,
body.rules-page .rules-btn::after {
  content: "";
  position: absolute;
  left: -0.15rem;
  right: -0.15rem;
  bottom: 0;
  height: 0.95rem;
  background: var(--paper-scribble) center / 100% 100% no-repeat;
  opacity: 0;
  transform: translateY(0.25rem) scaleX(0.94) rotate(-1deg);
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}

body.index-page .nav-links a:hover,
body.index-page .nav-links a:focus-visible,
body.index-page .nav-links a.active,
body.index-page .nav-links a[aria-current="page"],
body.rules-page .nav-links a:hover,
body.rules-page .nav-links a:focus-visible,
body.rules-page .nav-links a.active,
body.rules-page .nav-links a[aria-current="page"],
body.index-page .rules-btn:hover,
body.index-page .rules-btn:focus-visible,
body.index-page .rules-btn.active,
body.rules-page .rules-btn:hover,
body.rules-page .rules-btn:focus-visible,
body.rules-page .rules-btn.active {
  color: var(--paper-ink);
  background: transparent !important;
}

body.index-page .nav-links a:hover::after,
body.index-page .nav-links a:focus-visible::after,
body.index-page .nav-links a.active::after,
body.index-page .nav-links a[aria-current="page"]::after,
body.rules-page .nav-links a:hover::after,
body.rules-page .nav-links a:focus-visible::after,
body.rules-page .nav-links a.active::after,
body.rules-page .nav-links a[aria-current="page"]::after,
body.index-page .rules-btn:hover::after,
body.index-page .rules-btn:focus-visible::after,
body.index-page .rules-btn.active::after,
body.rules-page .rules-btn:hover::after,
body.rules-page .rules-btn:focus-visible::after,
body.rules-page .rules-btn.active::after {
  opacity: 1;
  transform: translateY(0) scaleX(1) rotate(-1.5deg);
}

body.index-page .theme-toggle,
body.rules-page .theme-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  background: transparent !important;
  color: var(--paper-ink);
}

body.index-page .theme-toggle:hover,
body.index-page .theme-toggle:focus-visible,
body.rules-page .theme-toggle:hover,
body.rules-page .theme-toggle:focus-visible {
  background: rgba(20, 20, 20, 0.06) !important;
  box-shadow: none;
}

body.index-page .theme-toggle i,
body.rules-page .theme-toggle i {
  font-size: 1.65rem;
}

body.index-page .menu-toggle,
body.rules-page .menu-toggle {
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid rgba(29, 22, 18, 0.12);
  box-shadow: 0 10px 24px rgba(29, 22, 18, 0.08);
  color: var(--paper-ink);
}

body.index-page .home-stage,
body.rules-page .rules-page-shell {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

body.index-page .home-links {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.5rem);
  margin-top: clamp(1rem, 2.5vw, 2rem);
}

body.index-page .color-card {
  min-height: clamp(130px, 14vw, 162px);
  border: 0;
  border-radius: 28px;
  box-shadow: var(--paper-shadow-soft);
  overflow: hidden;
}

body.index-page .color-card:hover,
body.index-page .color-card:focus-visible {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--paper-shadow-strong);
}

body.index-page .color-card .card-icon,
body.index-page .color-card .card-label,
body.index-page .color-card .boosty-icon {
  display: none;
}

body.index-page .color-card--twitch {
  background: linear-gradient(180deg, #7b00cb, #6a08b8) !important;
}

body.index-page .color-card--youtube {
  background: linear-gradient(180deg, #ff1b10, #f0150d) !important;
}

body.index-page .color-card--telegram {
  background: linear-gradient(180deg, #38a2d9, #2e98ce) !important;
}

body.index-page .color-card--discord {
  background: linear-gradient(180deg, #6169ef, #5562e4) !important;
}

body.index-page .color-card--boosty {
  background: linear-gradient(180deg, #fc781f, #f26e16) !important;
}

body.index-page .home-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.7rem);
}

body.index-page .content-card {
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.35rem);
  min-height: clamp(168px, 16vw, 210px);
  padding: clamp(1.5rem, 2.5vw, 2.1rem);
  border: 0;
  border-radius: 30px;
  background: var(--paper-card) !important;
  box-shadow: var(--paper-shadow-soft);
}

body.index-page .content-card:hover,
body.index-page .content-card:focus-visible {
  transform: translateY(-8px);
  background: #ffffff !important;
  box-shadow: var(--paper-shadow-strong);
}

body.index-page .content-card .card-icon {
  width: clamp(68px, 6vw, 92px);
  height: clamp(68px, 6vw, 92px);
  border: 0;
  border-radius: 24px;
  box-shadow: none;
  background: var(--design-accent);
  color: #ffffff;
  font-size: clamp(1.55rem, 1.7vw, 2.1rem);
}

body.index-page .card-kicker {
  display: none;
}

body.index-page .card-text {
  gap: 0.4rem;
}

body.index-page .card-title {
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(1.6rem, 1vw + 1.1rem, 2.25rem);
  line-height: 1.05;
}

body.index-page .card-note {
  font-size: 1rem;
  color: var(--paper-muted);
}

body.rules-page .rules-hero {
  justify-items: center;
  gap: 1.15rem;
  margin-top: clamp(0.75rem, 2vw, 1.4rem);
}

body.rules-page .rules-hero h1 {
  margin: 0;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(2.8rem, 4vw, 4.65rem);
  line-height: 0.94;
  text-align: center;
  letter-spacing: -0.035em;
}

body.rules-page .rules-nav {
  justify-content: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
}

body.rules-page .rules-content {
  display: none;
  gap: clamp(1.65rem, 2.6vw, 2.35rem);
  justify-items: center;
}

body.rules-page .rules-content.active {
  display: grid;
}

body.rules-page .rules-copy {
  width: min(100%, 690px);
  justify-self: center;
  display: grid;
  gap: clamp(0.95rem, 1.8vw, 1.35rem);
}

body.rules-page .rules-copy p {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(1.02rem, 0.35vw + 0.98rem, 1.2rem);
  font-weight: 800;
  line-height: 1.34;
  color: var(--paper-ink);
}

body.rules-page .rules-panel {
  position: relative;
  overflow: visible;
  width: min(100%, 820px);
  justify-self: center;
  margin-top: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0;
}

body.rules-page .rules-panel::before,
body.index-page .footer::before,
body.rules-page .footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--paper-surface);
  clip-path: polygon(0 68%, 5% 61%, 10% 69%, 16% 57%, 23% 70%, 31% 54%, 39% 66%, 47% 56%, 55% 67%, 63% 52%, 71% 69%, 78% 55%, 86% 67%, 92% 58%, 100% 65%, 100% 100%, 0 100%);
  pointer-events: none;
}

body.rules-page .rules-panel::before {
  content: none;
}

body.rules-page .rules-list {
  margin: 0;
  padding-left: clamp(1.3rem, 1.8vw, 1.65rem);
  display: grid;
  gap: clamp(1rem, 1.6vw, 1.35rem);
}

body.rules-page .rules-list li {
  margin: 0;
  color: #ffffff;
  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(1rem, 0.35vw + 0.98rem, 1.18rem);
  font-weight: 700;
  line-height: 1.42;
}

body.index-page .footer,
body.rules-page .footer {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  padding: clamp(4.8rem, 7vw, 6.3rem) 0 clamp(1.25rem, 2vw, 1.6rem);
  background: linear-gradient(180deg, var(--design-accent-hover) 0%, var(--design-accent) 100%);
  border-top: 0;
}

body.index-page .footer::before,
body.rules-page .footer::before {
  top: 0;
  transform: translateY(-100%);
}

body.index-page .footer-inner,
body.rules-page .footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

body.index-page .footer-year,
body.rules-page .footer-year {
  margin: 0;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  color: #ffffff;
}

body.index-page .footer-socials,
body.rules-page .footer-socials {
  display: flex;
  gap: clamp(0.7rem, 1vw, 1rem);
  align-items: center;
}

body.index-page .footer-social-link,
body.rules-page .footer-social-link {
  width: clamp(48px, 3.6vw, 64px);
  height: clamp(48px, 3.6vw, 64px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 16px;
  background: #ffffff !important;
  box-shadow: 0 14px 28px rgba(42, 11, 88, 0.2);
}

body.index-page .footer-social-link:hover,
body.index-page .footer-social-link:focus-visible,
body.rules-page .footer-social-link:hover,
body.rules-page .footer-social-link:focus-visible {
  transform: translateY(-6px) scale(1.02);
}

body.index-page .footer-icon,
body.rules-page .footer-icon {
  display: none;
}

body.index-page .footer-social-link--twitch,
body.rules-page .footer-social-link--twitch {
  background: #7300b8 !important;
}

body.index-page .footer-social-link--youtube,
body.rules-page .footer-social-link--youtube {
  background: #ff2216 !important;
}

body.index-page .footer-social-link--telegram,
body.rules-page .footer-social-link--telegram {
  background: #38a2d9 !important;
}

body.index-page .footer-social-link--discord,
body.rules-page .footer-social-link--discord {
  background: #6169ef !important;
}

body.index-page .footer-social-link--boosty,
body.rules-page .footer-social-link--boosty {
  background: #fc781f !important;
}

body.dark.index-page,
body.dark.rules-page {
  --paper-surface: #17131e;
  --paper-ink: #f8f4ff;
  --paper-muted: rgba(248, 244, 255, 0.72);
  --paper-card: rgba(28, 22, 38, 0.94);
  --paper-shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.3);
  --paper-shadow-strong: 0 28px 54px rgba(0, 0, 0, 0.42);
  background:
    radial-gradient(circle at 14% 8%, rgba(109, 61, 242, 0.18), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(161, 116, 255, 0.16), transparent 18%),
    linear-gradient(135deg, #141018 0%, #1a1422 48%, #120f17 100%);
}

body.dark.index-page::before,
body.dark.rules-page::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(104, 76, 158, 0.26), transparent 18%),
    radial-gradient(circle at 76% 20%, rgba(72, 46, 119, 0.24), transparent 16%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 10px, rgba(255, 255, 255, 0.01) 10px 20px);
  mix-blend-mode: normal;
  opacity: 1;
}

body.dark.index-page .header,
body.dark.rules-page .header {
  background: rgba(20, 16, 27, 0.8);
}

body.dark.index-page .nav-links a,
body.dark.rules-page .nav-links a,
body.dark.index-page .rules-btn,
body.dark.rules-page .rules-btn,
body.dark.index-page .theme-toggle,
body.dark.rules-page .theme-toggle,
body.dark.index-page .menu-toggle,
body.dark.rules-page .menu-toggle {
  color: var(--paper-ink);
}

body.dark.index-page .menu-toggle,
body.dark.rules-page .menu-toggle {
  background: rgba(43, 30, 59, 0.85) !important;
  border-color: rgba(205, 183, 255, 0.18);
}

body.dark.index-page .content-card,
body.dark.rules-page .content-card {
  background: var(--paper-card) !important;
}

body.dark.index-page .content-card:hover,
body.dark.index-page .content-card:focus-visible {
  background: rgba(36, 28, 48, 0.98) !important;
}

body.dark.index-page .card-note,
body.dark.rules-page .rules-copy p {
  color: var(--paper-muted);
}

body.dark.rules-page .rules-copy p {
  color: rgba(247, 240, 255, 0.96);
}

body.dark.index-page .footer,
body.dark.rules-page .footer {
  background: linear-gradient(180deg, #7f46ff 0%, #3f166f 100%);
}

@media (max-width: 1180px) {
  body.index-page .home-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.index-page .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.index-page .page-main,
  body.rules-page .page-main {
    width: min(100%, calc(100% - 1.5rem));
    padding-top: 1.1rem;
  }

  body.index-page .header-inner,
  body.rules-page .header-inner {
    padding-inline: 0.85rem;
  }

  body.index-page .nav-links,
  body.rules-page .nav-links {
    background: #f9f4ec;
    border-left: 1px solid rgba(26, 21, 18, 0.08);
  }

  body.dark.index-page .nav-links,
  body.dark.rules-page .nav-links {
    background: rgba(20, 16, 27, 0.98);
    border-left-color: rgba(205, 183, 255, 0.12);
  }

  body.index-page .nav-links a,
  body.rules-page .nav-links a {
    width: 100%;
    justify-content: flex-start;
    font-size: 1.5rem;
  }

  body.index-page .home-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page .home-card-grid {
    grid-template-columns: 1fr;
  }

  body.rules-page .rules-hero h1 {
    font-size: clamp(2.25rem, 8vw, 3.3rem);
  }

  body.rules-page .rules-nav {
    gap: 0.75rem 1.15rem;
  }

  body.rules-page .rules-copy {
    width: 100%;
    gap: 0.95rem;
  }

  body.rules-page .rules-copy p,
  body.rules-page .rules-list li {
    font-size: clamp(0.98rem, 1.4vw + 0.82rem, 1.08rem);
  }

  body.rules-page .rules-content {
    gap: 1.4rem;
  }

  body.rules-page .rules-panel {
    width: 100%;
  }

  body.index-page .footer-inner,
  body.rules-page .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body.index-page .home-links {
    grid-template-columns: 1fr;
  }

  body.index-page .color-card {
    min-height: 112px;
  }

  body.index-page .content-card .card-icon {
    width: 72px;
    height: 72px;
  }

  body.index-page .footer-socials,
  body.rules-page .footer-socials {
    width: 100%;
    justify-content: space-between;
  }
}

@font-face {
  font-family: "Itim Cyrillic";
  src: url("/itimcyrillic.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Shared paper backgrounds driven by exported design assets */
body.paper-page {
  --paper-surface: #f6f1e9;
  --paper-ink: #161515;
  --paper-muted: rgba(22, 21, 21, 0.7);
  --paper-card: rgba(255, 255, 255, 0.94);
  --paper-shadow-soft: 0 18px 36px rgba(39, 29, 24, 0.08);
  --paper-shadow-strong: 0 28px 54px rgba(32, 22, 16, 0.12);
  background-color: var(--design-bg);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  color: var(--paper-ink);
  position: relative;
  isolation: isolate;
}

body.paper-page::before {
  content: none;
}

body.paper-page .page-wrapper {
  min-height: 100vh;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.paper-page .page-main {
  width: min(1480px, calc(100% - 3rem));
  margin-inline: auto;
  padding-top: clamp(1.35rem, 3vw, 2.6rem);
  padding-bottom: clamp(1rem, 2vw, 1.7rem);
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.paper-page .header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 100px;
  background: rgba(250, 247, 241, 0.54);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(34, 25, 18, 0.06);
}

body.paper-page .header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 1.4vw, 1.5rem);
  max-width: 1920px;
  min-height: 100px;
  margin: 0 auto;
  padding-inline: clamp(1.5rem, 6vw, 150px);
  padding-block: 0;
}

body.paper-page .logo {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

body.paper-page .logo-image {
  width: min(252.69px, 100%);
  height: auto;
  max-height: 101.13px;
  object-fit: contain;
}

body.paper-page .nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  width: min(100%, 1396px);
  min-height: 36px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 80px);
  gap: clamp(1rem, 1.6vw, 30px);
}

body.paper-page .nav-links a {
  --paper-underline-image: var(--paper-scribble);
  --paper-overlay-height: 36px;
  --paper-overlay-width: 118px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0.15rem 0.2rem 0.95rem;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-family: "Itim Cyrillic", "Itim", "Inter", sans-serif;
  font-size: clamp(1.15rem, 0.72vw + 0.9rem, 1.65rem);
  font-weight: 400;
  color: var(--paper-ink);
  line-height: 1;
}

body.paper-page .nav-link__label {
  position: relative;
  display: inline-block;
  z-index: 1;
}

body.paper-page .nav-link__overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s ease;
  pointer-events: none;
  z-index: 2;
}

body.paper-page .theme-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  margin-left: clamp(0.1rem, 0.45vw, 0.45rem);
  padding: 0;
  border: 1px solid var(--design-border) !important;
  border-radius: 999px;
  background: var(--design-surface-soft) !important;
  box-shadow: none !important;
  color: var(--design-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease !important;
  cursor: pointer;
}

body.paper-page .theme-toggle--mobile {
  display: none;
}

body.paper-page .nav-links .theme-toggle {
  position: relative;
  top: -0.18rem;
}

body.paper-page .theme-toggle:hover,
body.paper-page .theme-toggle:focus-visible {
  border-color: var(--design-accent) !important;
  background: var(--design-surface) !important;
  box-shadow: 0 0 12px var(--design-shadow-glow) !important;
  color: var(--design-accent) !important;
}

body.paper-page .theme-toggle:hover .theme-toggle__state--moon::before,
body.paper-page .theme-toggle:focus-visible .theme-toggle__state--moon::before {
  color: var(--design-accent) !important;
}

html[data-theme="dark"] body.paper-page .theme-toggle:hover,
html[data-theme="dark"] body.paper-page .theme-toggle:focus-visible,
body.dark.paper-page .theme-toggle:hover,
body.dark.paper-page .theme-toggle:focus-visible {
  border-color: var(--design-accent) !important;
  background: var(--design-surface) !important;
  box-shadow: 0 0 12px var(--design-shadow-glow) !important;
  color: var(--design-accent) !important;
}

body.paper-page .theme-toggle img {
  display: none !important;
}

body.paper-page .theme-toggle__state {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

body.paper-page .theme-toggle__state--moon::before {
  content: "\f186";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--design-text);
  transition: transform 0.25s ease;
}

body.paper-page .theme-toggle__state--sun::before {
  content: "\f185";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.1rem;
  color: #eab308;
  transition: transform 0.25s ease;
}

body.paper-page .theme-toggle:hover .theme-toggle__state::before {
  transform: rotate(15deg);
}

body.paper-page .theme-toggle__state--sun {
  display: none;
}

body.dark.paper-page .theme-toggle__state--moon,
html[data-theme="dark"] body.paper-page .theme-toggle__state--moon,
body.paper-page .theme-toggle.is-dark .theme-toggle__state--moon {
  display: none;
}

body.dark.paper-page .theme-toggle__state--sun,
html[data-theme="dark"] body.paper-page .theme-toggle__state--sun,
body.paper-page .theme-toggle.is-dark .theme-toggle__state--sun {
  display: flex;
}

/* Language Switcher Dropdown Styling */
body.paper-page .lang-switcher {
  position: relative;
  display: inline-flex;
  z-index: 50;
}

body.paper-page .nav-links .lang-switcher {
  position: relative;
  top: -0.18rem;
}

body.paper-page .lang-btn {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--design-border) !important;
  border-radius: var(--design-radius-button);
  background: var(--design-surface-soft) !important;
  color: var(--design-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Itim Cyrillic", "Itim", "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

body.paper-page .lang-btn::before {
  content: none !important;
  display: none !important;
}

body.paper-page .lang-btn:hover,
body.paper-page .lang-btn:focus-visible {
  border-color: var(--design-accent) !important;
  background: var(--design-surface) !important;
  box-shadow: 0 0 12px var(--design-shadow-glow) !important;
  color: var(--design-accent) !important;
}

body.paper-page .lang-btn i.fa-globe {
  font-size: 1.05rem;
  opacity: 0.88;
}

body.paper-page .lang-btn__current {
  letter-spacing: 0.02em;
}

body.paper-page .lang-btn__arrow {
  font-size: 0.75rem;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

body.paper-page .lang-switcher.is-open .lang-btn__arrow {
  transform: rotate(180deg);
}

/* Glassmorphic Dropdown Menu */
body.paper-page .lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  flex-direction: column;
  min-width: 144px;
  padding: 5px;
  gap: 2px;
  background: var(--design-surface) !important;
  border: 1px solid var(--design-border) !important;
  border-radius: var(--design-radius-button) !important;
  box-shadow: var(--design-shadow-soft) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 120;
}

body.paper-page .lang-switcher.is-open .lang-dropdown-menu {
  display: flex;
}

body.paper-page .lang-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent !important;
  color: var(--design-text) !important;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

body.paper-page .lang-option::before {
  content: none !important;
  display: none !important;
}

body.paper-page .lang-option:hover:not(.active) {
  background: var(--design-surface-soft) !important;
  color: var(--design-accent) !important;
}

body.paper-page .lang-option.active {
  background: color-mix(in srgb, var(--design-accent) 10%, var(--design-surface)) !important;
  color: var(--design-accent) !important;
}

/* Default state: Hide mobile lang-switcher */
body.paper-page .lang-switcher--mobile {
  display: none;
}

body.paper-page .rules-btn {
  --paper-underline-image: var(--paper-scribble);
  position: relative;
  padding: 0.15rem 0.2rem 0.8rem;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(1.15rem, 0.72vw + 0.9rem, 1.65rem);
  font-weight: 400;
  color: var(--paper-ink);
  line-height: 1;
}

body.paper-page .nav-link--home {
  --paper-underline-image: url("/nav-hover-home.svg?v=20260319-1148");
  --paper-overlay-height: 37px;
  --paper-overlay-width: 118px;
}

body.paper-page .nav-link--rules {
  --paper-underline-image: url("/nav-hover-rules.svg?v=20260319-1148");
  --paper-overlay-height: 36px;
  --paper-overlay-width: 127px;
}

body.paper-page .nav-link--emotes {
  --paper-underline-image: url("/nav-hover-emotes.svg?v=20260319-1148");
  --paper-overlay-height: 36px;
  --paper-overlay-width: 104px;
}

body.paper-page .nav-link--extensions {
  --paper-underline-image: url("/nav-hover-extensions.svg?v=20260319-1148");
  --paper-overlay-height: 36px;
  --paper-overlay-width: 175px;
}

body.paper-page .nav-link--commands {
  --paper-underline-image: url("/nav-hover-commands.svg?v=20260319-1148");
  --paper-overlay-height: 30px;
  --paper-overlay-width: 121px;
}

body.paper-page .nav-link--music {
  --paper-underline-image: url("/nav-hover-music.svg?v=20260319-1148");
  --paper-overlay-height: 30px;
  --paper-overlay-width: 183px;
}

body.paper-page .nav-link--commercial {
  --paper-underline-image: url("/nav-hover-commercial.svg?v=20260319-1148");
  --paper-overlay-height: 25px;
  --paper-overlay-width: 211px;
}

body.paper-page .nav-links a::before,
body.paper-page .rules-btn::before,
body.paper-page .theme-toggle::before,
body.paper-page .menu-toggle::before,
body.paper-page .footer-social-link::before {
  content: none !important;
  display: none !important;
}

body.paper-page .nav-links a::after {
  content: none !important;
  display: none !important;
}

body.paper-page .rules-btn::after {
  content: "";
  position: absolute;
  left: -0.15rem;
  right: -0.15rem;
  bottom: 0;
  height: 0.95rem;
  background: var(--paper-scribble) center / 100% 100% no-repeat;
  opacity: 0;
  transform: translateY(0.25rem) scaleX(0.94) rotate(-1deg);
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}

body.paper-page .nav-links a:hover,
body.paper-page .nav-links a:focus-visible,
body.paper-page .nav-links a.active,
body.paper-page .nav-links a[aria-current="page"],
body.paper-page .rules-btn:hover,
body.paper-page .rules-btn:focus-visible,
body.paper-page .rules-btn.active {
  color: var(--paper-ink);
  background: transparent !important;
}

body.paper-page .nav-links a:hover .nav-link__overlay,
body.paper-page .nav-links a:focus-visible .nav-link__overlay {
  opacity: 1;
}

body.paper-page .theme-toggle:hover .theme-toggle__hover,
body.paper-page .theme-toggle:focus-visible .theme-toggle__hover {
  opacity: 1;
}

body.paper-page .rules-btn:hover::after,
body.paper-page .rules-btn:focus-visible::after,
body.paper-page .rules-btn.active::after {
  opacity: 1;
  transform: translateY(0) scaleX(1) rotate(-1.5deg);
}

body.paper-page .menu-toggle {
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid rgba(29, 22, 18, 0.12);
  box-shadow: 0 10px 24px rgba(29, 22, 18, 0.08);
  color: var(--paper-ink);
}

body.paper-page .menu-toggle span {
  background: currentColor;
}

body.paper-page .header-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: auto;
}

body.paper-page .footer {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  padding: clamp(0.8rem, 1.8vw, 1.3rem) 0 clamp(0.55rem, 1vw, 0.9rem);
  background: transparent;
  border-top: 0;
  z-index: 2;
}

body.paper-page .footer::before {
  content: none;
}

body.paper-page .footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

body.paper-page .footer-year {
  margin: 0;
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(1.2rem, 1.5vw, 1.65rem);
  color: #ffffff;
}

body.paper-page .footer-socials {
  display: flex;
  gap: clamp(0.45rem, 0.75vw, 0.7rem);
  align-items: center;
}

body.paper-page .footer-social-link {
  width: clamp(36px, 2.7vw, 48px);
  height: clamp(36px, 2.7vw, 48px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 12px;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(42, 11, 88, 0.16);
}

body.paper-page .footer-social-link:hover,
body.paper-page .footer-social-link:focus-visible {
  transform: translateY(-3px) scale(1.01);
}

body.paper-page .footer-icon {
  display: none;
}

body.paper-page .footer-social-link--twitch {
  background: #7300b8 !important;
}

body.paper-page .footer-social-link--youtube {
  background: #ff2216 !important;
}

body.paper-page .footer-social-link--telegram {
  background: #38a2d9 !important;
}

body.paper-page .footer-social-link--discord {
  background: #6169ef !important;
}

body.paper-page .footer-social-link--boosty {
  background: #fc781f !important;
}

body.dark.paper-page {
  --paper-surface: #130d1a;
  --paper-ink: #f8f4ff;
  --paper-muted: rgba(248, 244, 255, 0.72);
  --paper-card: rgba(28, 22, 38, 0.94);
  --paper-shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.3);
  --paper-shadow-strong: 0 28px 54px rgba(0, 0, 0, 0.42);
  background-color: #120c1e;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

body.dark.paper-page .header {
  background: rgba(250, 247, 241, 0.54);
}

body.dark.paper-page .nav-links a,
body.dark.paper-page .rules-btn,
body.dark.paper-page .theme-toggle,
body.dark.paper-page .menu-toggle {
  color: var(--paper-ink);
}

body.dark.paper-page .menu-toggle {
  background: rgba(255, 255, 255, 0.74) !important;
  border-color: rgba(29, 22, 18, 0.12);
}

body.dark.index-page .content-card {
  background: rgba(255, 255, 255, 0.94) !important;
}

body.dark.index-page .content-card:hover,
body.dark.index-page .content-card:focus-visible {
  background: #ffffff !important;
}

body.dark.index-page .card-note {
  color: rgba(22, 21, 21, 0.7);
}

@media (min-width: 1600px) {
  body.paper-page .header-inner {
    padding-inline: 150px;
  }

  body.paper-page .logo-image {
    width: 252.69px;
    height: 101.13px;
  }

  body.paper-page .nav-links {
    max-width: 1396px;
    min-height: 36px;
    padding-inline: 80px;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  body.paper-page .page-main {
    width: min(100%, calc(100% - 1.5rem));
    padding-top: 1.1rem;
    padding-bottom: 1rem;
  }

  body.paper-page .header-inner {
    min-height: 72px;
    padding-inline: 0.85rem;
    padding-block: 0.75rem;
  }

  body.paper-page .nav-links {
    background: rgba(249, 244, 236, 0.98);
    border-left: 1px solid rgba(26, 21, 18, 0.08);
  }

  body.dark.paper-page .nav-links {
    background: rgba(20, 16, 27, 0.98);
    border-left-color: rgba(205, 183, 255, 0.12);
  }

  body.paper-page .nav-links a {
    width: 100%;
    justify-content: flex-start;
    font-size: 1.5rem;
  }

  body.paper-page .nav-links .theme-toggle {
    margin-left: 0;
    margin-top: 0.2rem;
  }

  body.paper-page .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body.paper-page .footer-socials {
    width: 100%;
    justify-content: space-between;
  }
}

/* Final paper-page overrides: backgrounds follow content, icons visible, layout stays adaptive */
html,
body {
  min-height: 100%;
}

html[data-theme="light"][data-bg-length="short"] {
  --paper-page-bg: url("/bg/desktop-light-short.webp");
  --page-bg-tail: #7a35f5;
}

html[data-theme="light"][data-bg-length="medium"] {
  --paper-page-bg: url("/bg/desktop-light-medium.webp");
  --page-bg-tail: #7a35f5;
}

html[data-theme="light"][data-bg-length="long"] {
  --paper-page-bg: url("/bg/desktop-light-long.webp");
  --page-bg-tail: #7a35f5;
}

html[data-theme="light"][data-bg-length="very-long"] {
  --paper-page-bg: url("/bg/desktop-light-very-long.webp");
  --page-bg-tail: #7a35f5;
}

html[data-theme="dark"][data-bg-length="short"] {
  --paper-page-bg: url("/bg/desktop-dark-short.webp");
  --page-bg-tail: #3d2468;
}

html[data-theme="dark"][data-bg-length="medium"] {
  --paper-page-bg: url("/bg/desktop-dark-medium.webp");
  --page-bg-tail: #3d2468;
}

html[data-theme="dark"][data-bg-length="long"] {
  --paper-page-bg: url("/bg/desktop-dark-long.webp");
  --page-bg-tail: #3d2468;
}

html[data-theme="dark"][data-bg-length="very-long"] {
  --paper-page-bg: url("/bg/desktop-dark-very-long.webp");
  --page-bg-tail: #3d2468;
}

body.paper-page.paper-page--home,
body.paper-page.paper-page--medium,
body.paper-page.paper-page--long,
body.paper-page.paper-page--very-long,
body.dark.paper-page.paper-page--home,
body.dark.paper-page.paper-page--medium,
body.dark.paper-page.paper-page--long,
body.dark.paper-page.paper-page--very-long {
  background-color: transparent !important;
}

html[data-theme="light"] body.paper-page.paper-page--home,
html[data-theme="light"] body.paper-page.paper-page--medium,
html[data-theme="light"] body.paper-page.paper-page--long,
html[data-theme="light"] body.paper-page.paper-page--very-long {
  background-image: radial-gradient(circle at 50% 0%, rgba(11, 122, 136, 0.04), transparent 50%) !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: 100% 600px !important;
  background-color: var(--design-bg) !important;
}

html[data-theme="dark"] body.dark.paper-page.paper-page--home,
html[data-theme="dark"] body.dark.paper-page.paper-page--medium,
html[data-theme="dark"] body.dark.paper-page.paper-page--long,
html[data-theme="dark"] body.dark.paper-page.paper-page--very-long,
html[data-theme="dark"] body.paper-page.paper-page--home,
html[data-theme="dark"] body.paper-page.paper-page--medium,
html[data-theme="dark"] body.paper-page.paper-page--long,
html[data-theme="dark"] body.paper-page.paper-page--very-long {
  background-image: radial-gradient(circle at 50% 0%, rgba(34, 199, 216, 0.08), transparent 60%) !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: 100% 800px !important;
  background-color: var(--design-bg) !important;
}

body.paper-page {
  min-height: 100%;
  position: relative;
  isolation: isolate;
  background-attachment: scroll !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: auto !important;
  background-color: var(--design-bg) !important;
}

body.paper-page::before {
  content: none !important;
}

body.paper-page .page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: transparent !important;
  box-shadow: none !important;
}

body.paper-page main,
body.paper-page .page-main {
  min-height: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.paper-page .content,
body.paper-page .rules-page-shell,
body.paper-page .rules-container,
body.paper-page .emotes-container,
body.paper-page .emote-section,
body.paper-page .extensions-shell,
body.paper-page .music-requests-layout {
  background: transparent !important;
  background-image: none !important;
}

body.index-page.paper-page .page-main,
body.rules-page.paper-page .page-main,
body.paper-page .page-main {
  width: min(1480px, calc(100% - clamp(1rem, 4vw, 3rem)));
  flex: 1 0 auto;
}

body.music-requests-page.paper-page .page-main {
  width: min(1610px, calc(100% - clamp(1rem, 4vw, 3rem)));
}

body.index-page.paper-page .home-stage,
body.rules-page.paper-page .rules-page-shell {
  width: 100%;
  gap: clamp(1.75rem, 3vw, 3.1rem);
}

body.index-page.paper-page .home-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.6vw, 1.45rem);
}

body.index-page.paper-page .color-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(118px, 12vw, 162px);
  position: relative;
}

body.index-page.paper-page .color-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(58px, 5vw, 82px);
  height: clamp(58px, 5vw, 82px);
  color: #ffffff;
  font-size: clamp(2rem, 1.8vw + 1.2rem, 3rem);
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.index-page.paper-page .color-card__icon img {
  display: block;
  width: 82%;
  height: 82%;
  object-fit: contain;
}

/* Slide-reveal animations for the social cards on hover/focus */
body.index-page.paper-page .color-card__label {
  display: none;
}

@media (min-width: 769px) {
  body.index-page.paper-page .color-card__label {
    display: block;
    position: absolute;
    bottom: clamp(14px, 1.3vw, 24px);
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 700;
    font-size: clamp(0.95rem, 0.9vw + 0.15rem, 1.15rem);
    color: rgba(255, 255, 255, 0.88);
    opacity: 0;
    transform: translateY(15px) scale(0.92);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
    letter-spacing: 0.5px;
  }
  
  body.index-page.paper-page .color-card:hover .color-card__icon,
  body.index-page.paper-page .color-card:focus-visible .color-card__icon {
    transform: translateY(-14px);
  }
  
  body.index-page.paper-page .color-card:hover .color-card__label,
  body.index-page.paper-page .color-card:focus-visible .color-card__label {
    opacity: 1;
    transform: translateY(0) scale(1);
    color: #ffffff;
  }
}

body.index-page.paper-page .home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.7rem);
}

body.index-page.paper-page .content-card,
body.index-page.paper-page .card-text {
  min-width: 0;
}

body.rules-page.paper-page .rules-page-shell {
  max-width: 1120px;
  margin-inline: auto;
}

body.rules-page.paper-page .rules-copy {
  width: min(100%, 690px);
}

body.paper-page .footer,
body.dark.paper-page .footer,
body.dark.index-page.paper-page .footer,
body.dark.rules-page.paper-page .footer {
  background: transparent !important;
}

body.paper-page .footer::before,
body.dark.paper-page .footer::before {
  content: none !important;
}

body.dark.paper-page .header,
html[data-theme="dark"] body.paper-page .header {
  background: rgba(23, 18, 35, 0.72);
  box-shadow: 0 10px 28px rgba(7, 4, 14, 0.34);
}

body.dark.paper-page .nav-links a,
body.dark.paper-page .rules-btn,
body.dark.paper-page .theme-toggle,
body.dark.paper-page .menu-toggle,
html[data-theme="dark"] body.paper-page .nav-links a,
html[data-theme="dark"] body.paper-page .rules-btn,
html[data-theme="dark"] body.paper-page .theme-toggle,
html[data-theme="dark"] body.paper-page .menu-toggle {
  color: #f6efff;
}

body.dark.paper-page .menu-toggle,
html[data-theme="dark"] body.paper-page .menu-toggle {
  background: rgba(31, 24, 48, 0.82) !important;
  border-color: rgba(137, 111, 201, 0.48);
}

body.dark.paper-page .nav-links,
html[data-theme="dark"] body.paper-page .nav-links {
  background: transparent;
}

body.dark.paper-page .content-card,
body.dark.paper-page .feature-card,
body.dark.paper-page .extension-card,
body.dark.paper-page .command-card,
body.dark.paper-page .commercial-card,
body.dark.paper-page .news-item,
body.dark.paper-page .rules-desc,
body.dark.paper-page .emote-card,
body.dark.paper-page .music-command-box,
body.dark.paper-page .browser-buttons a,
body.dark.paper-page .browser-buttons button,
html[data-theme="dark"] body.paper-page .content-card,
html[data-theme="dark"] body.paper-page .feature-card,
html[data-theme="dark"] body.paper-page .extension-card,
html[data-theme="dark"] body.paper-page .command-card,
html[data-theme="dark"] body.paper-page .commercial-card,
html[data-theme="dark"] body.paper-page .news-item,
html[data-theme="dark"] body.paper-page .rules-desc,
html[data-theme="dark"] body.paper-page .emote-card,
html[data-theme="dark"] body.paper-page .music-command-box,
html[data-theme="dark"] body.paper-page .browser-buttons a,
html[data-theme="dark"] body.paper-page .browser-buttons button {
  background: rgba(17, 13, 24, 0.94) !important;
  border-color: rgba(88, 67, 129, 0.88) !important;
  box-shadow: 0 14px 30px rgba(10, 7, 18, 0.42) !important;
  color: #f8f4ff;
}

body.dark.paper-page .content-card:hover,
body.dark.paper-page .feature-card:hover,
body.dark.paper-page .extension-card:hover,
body.dark.paper-page .command-card:hover,
body.dark.paper-page .commercial-card:hover,
body.dark.paper-page .news-item:hover,
body.dark.paper-page .emote-card:hover,
body.dark.paper-page .browser-buttons a:hover,
body.dark.paper-page .browser-buttons button:hover,
html[data-theme="dark"] body.paper-page .content-card:hover,
html[data-theme="dark"] body.paper-page .feature-card:hover,
html[data-theme="dark"] body.paper-page .extension-card:hover,
html[data-theme="dark"] body.paper-page .command-card:hover,
html[data-theme="dark"] body.paper-page .commercial-card:hover,
html[data-theme="dark"] body.paper-page .news-item:hover,
html[data-theme="dark"] body.paper-page .emote-card:hover,
html[data-theme="dark"] body.paper-page .browser-buttons a:hover,
html[data-theme="dark"] body.paper-page .browser-buttons button:hover {
  background: rgba(26, 26, 32, 0.98) !important;
}

body.dark.paper-page .card-title,
body.dark.paper-page .emote-name,
body.dark.paper-page .extension-card h3,
body.dark.paper-page .command-card h3,
body.dark.paper-page .news-item h3,
html[data-theme="dark"] body.paper-page .card-title,
html[data-theme="dark"] body.paper-page .emote-name,
html[data-theme="dark"] body.paper-page .extension-card h3,
html[data-theme="dark"] body.paper-page .command-card h3,
html[data-theme="dark"] body.paper-page .news-item h3 {
  color: #ffffff;
}

body.dark.paper-page .card-note,
body.dark.paper-page .emote-description,
body.dark.paper-page .emotes-intro,
body.dark.paper-page .emote-status,
body.dark.paper-page .extensions-intro,
body.dark.paper-page .extension-card p,
body.dark.paper-page .music-command-label,
body.dark.paper-page .music-requests-text,
body.dark.paper-page .rules-copy p,
body.dark.paper-page .rules-desc,
html[data-theme="dark"] body.paper-page .card-note,
html[data-theme="dark"] body.paper-page .emote-description,
html[data-theme="dark"] body.paper-page .emotes-intro,
html[data-theme="dark"] body.paper-page .emote-status,
html[data-theme="dark"] body.paper-page .extensions-intro,
html[data-theme="dark"] body.paper-page .extension-card p,
html[data-theme="dark"] body.paper-page .music-command-label,
html[data-theme="dark"] body.paper-page .music-requests-text,
html[data-theme="dark"] body.paper-page .rules-copy p,
html[data-theme="dark"] body.paper-page .rules-desc {
  color: rgba(242, 234, 255, 0.84) !important;
}

body.dark.paper-page .music-command-box code,
html[data-theme="dark"] body.paper-page .music-command-box code {
  background: rgba(35, 27, 53, 0.98) !important;
  border-color: rgba(106, 83, 160, 0.92) !important;
  color: #ffffff !important;
}

body.paper-page .footer-social-link {
  display: grid;
  place-items: center;
}

body.paper-page .footer-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: clamp(1.35rem, 1.2vw + 0.85rem, 1.9rem);
  line-height: 1;
}

body.paper-page .footer-icon img {
  display: block;
  width: 58%;
  height: 58%;
  object-fit: contain;
}

body.paper-page .footer-social-link--boosty .footer-icon img {
  width: 78%;
  height: 78%;
}

@media (max-width: 1800px) {
  body.paper-page .header-inner {
    padding-inline: clamp(1rem, 3vw, 2.25rem);
  }

  body.paper-page .logo-image {
    width: min(252.69px, 100%);
    max-height: 101.13px;
  }

  body.paper-page .nav-links {
    padding-inline: clamp(0.35rem, 1vw, 0.85rem);
    gap: clamp(0.55rem, 1.1vw, 1.05rem);
  }

  body.paper-page .nav-links a {
    font-size: clamp(1.05rem, 0.24vw + 0.98rem, 1.42rem);
  }
}

@media (max-width: 1480px) {
  body.paper-page .header-inner {
    padding-inline: clamp(1rem, 2.1vw, 1.7rem);
  }

  body.paper-page .nav-links {
    padding-inline: 0;
    gap: clamp(0.35rem, 0.8vw, 0.75rem);
  }

  body.paper-page .nav-links a {
    font-size: clamp(0.96rem, 0.2vw + 0.92rem, 1.16rem);
  }
}

@media (max-width: 1600px) {
  body.index-page.paper-page .home-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  body.index-page.paper-page .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page.paper-page .home-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.paper-page .header-inner {
    min-height: 96px;
    padding-inline: clamp(0.95rem, 2vw, 1.35rem);
  }

  body.paper-page .menu-toggle {
    display: flex;
  }

  body.paper-page .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    width: min(360px, 88vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    margin: 0;
    padding: clamp(5.4rem, 7vw, 6.2rem) 1.35rem 1.35rem;
    background: rgba(249, 244, 236, 0.98);
    border-left: 1px solid rgba(26, 21, 18, 0.08);
    box-shadow: -20px 0 42px rgba(22, 18, 15, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  body.paper-page .nav-links.open {
    transform: translateX(0);
  }

  body.paper-page .nav-links a {
    width: 100%;
    justify-content: flex-start;
    font-size: clamp(1.2rem, 1vw + 0.8rem, 1.5rem);
    padding: 0.2rem 0 1rem;
  }

  body.paper-page .nav-links .theme-toggle,
  body.paper-page .nav-links .lang-switcher {
    display: none !important;
  }

  body.paper-page .nav-links a::after {
    left: 0;
    bottom: -0.2rem;
    transform: translate(0, 0.55rem) scale(0.98);
    transform-origin: left center;
  }

  body.paper-page .nav-links a:hover::after,
  body.paper-page .nav-links a:focus-visible::after,
  body.paper-page .nav-links a.active::after,
  body.paper-page .nav-links a[aria-current="page"]::after {
    transform: translate(0, 0) scale(1);
  }

  body.paper-page .header-actions {
    min-width: auto;
    gap: 0.45rem;
  }

  body.paper-page .theme-toggle--mobile {
    display: grid;
    place-items: center;
  }

  body.paper-page .header-actions .lang-switcher--mobile {
    display: inline-flex !important;
  }

  body.dark.paper-page .nav-links {
    background: #1f1830;
    border-left-color: rgba(205, 183, 255, 0.18);
  }

  body.paper-page.mobile-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(16, 12, 24, 0.36);
  }
}

@media (max-width: 980px) {
  body.index-page.paper-page .home-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page.paper-page .home-card-grid {
    grid-template-columns: 1fr;
  }

  body.paper-page .header-actions .lang-switcher--mobile .lang-btn {
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 0.8rem !important;
    gap: 4px !important;
  }

  body.paper-page .header-actions .lang-switcher--mobile .lang-btn i.fa-globe {
    font-size: 0.9rem !important;
  }
}

  @media (max-width: 768px) {
  body.index-page.paper-page .content-card {
    min-height: 152px;
  }

  body.rules-page.paper-page .rules-copy p {
    font-size: clamp(1rem, 1.4vw + 0.85rem, 1.35rem);
  }
}

@media (max-width: 620px) {
  body.index-page.paper-page .home-links {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 980px) {
  body.paper-page .page-main {
    padding-top: 0.85rem;
    padding-bottom: 0.55rem;
  }

  body.index-page.paper-page .home-stage {
    gap: 1rem;
  }

  body.index-page.paper-page .home-links,
  body.index-page.paper-page .home-card-grid {
    gap: 1rem;
  }

  body.index-page.paper-page .content-card {
    min-height: 176px;
  }

  body.paper-page .footer {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}

@media (max-height: 1100px) and (min-width: 769px) {
  body.paper-page .header,
  body.paper-page .header-inner {
    min-height: 84px;
  }

  body.paper-page .logo-image {
    width: min(220px, 100%);
    max-height: 76px;
  }

  body.paper-page .page-main {
    padding-top: 0.7rem;
    padding-bottom: 0.35rem;
  }

  body.index-page.paper-page .home-stage {
    gap: 0.8rem;
  }

  body.index-page.paper-page .home-links,
  body.index-page.paper-page .home-card-grid {
    gap: 0.85rem;
  }

  body.index-page.paper-page .color-card {
    min-height: clamp(94px, 10vw, 128px);
  }

  body.index-page.paper-page .content-card {
    min-height: 154px;
    padding: 1rem 1.05rem;
  }

  body.paper-page .footer {
    padding: 0.45rem 0 0.55rem;
  }

  body.paper-page .footer-inner {
    width: min(1100px, calc(100% - 1.8rem));
    gap: 0.85rem;
    padding-inline: 0.95rem;
  }

  body.paper-page .footer-year {
    font-size: 1rem;
  }

  body.paper-page .footer-socials {
    gap: 0.6rem;
  }

  body.paper-page .footer-social-link {
    width: 38px;
    height: 38px;
  }

  body.paper-page .footer-icon {
    font-size: 1.12rem;
  }
}

@media (max-height: 960px) and (min-width: 769px) {
  body.paper-page .header,
  body.paper-page .header-inner {
    min-height: 78px;
  }

  body.paper-page .logo-image {
    width: min(204px, 100%);
    max-height: 68px;
  }

  body.index-page.paper-page .color-card {
    min-height: clamp(86px, 9.2vw, 118px);
  }

  body.index-page.paper-page .content-card {
    min-height: 144px;
    padding: 0.92rem 0.98rem;
  }

  body.paper-page .footer {
    padding: 0.32rem 0 0.45rem;
  }
}

@media (max-width: 768px) {
  html[data-theme="light"] {
  --page-bg: url("/bg/mobile-light.webp");
  }

  html[data-theme="dark"] {
  --page-bg: url("/bg/mobile-dark.webp");
  }

  body.paper-page .header {
    min-height: 74px;
  }

  body.paper-page .header-inner {
    min-height: 74px;
    padding-inline: 0.85rem;
    padding-block: 0.55rem;
    gap: 0.55rem;
  }

  body.paper-page .logo-image {
    width: 164px;
    max-height: 44px;
  }

  body.paper-page .header-actions {
    gap: 0.35rem;
  }

  body.paper-page .menu-toggle,
  body.paper-page .theme-toggle--mobile {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  body.index-page.paper-page .page-main {
    width: min(100%, calc(100% - 1rem));
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  body.paper-page .page-wrapper,
  body.index-page.paper-page .page-wrapper,
  body.paper-page.paper-page--long .page-wrapper,
  body.paper-page.paper-page--very-long .page-wrapper {
    min-height: 100dvh;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
  }

  body.paper-page .commands-shell {
    width: min(100%, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    padding-inline: 0.75rem;
    overflow-x: hidden;
  }

  body.paper-page .commands-shell .grid,
  body.paper-page .commands-shell .single-column {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  body.paper-page .command-card {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.paper-page .command-card-large pre,
  body.paper-page .chat-block,
  body.paper-page .chat-block pre,
  body.paper-page .chat-block code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  body.index-page.paper-page .home-stage {
    gap: 0.9rem;
  }

  body.index-page.paper-page .home-links {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.2rem;
  }

  body.index-page.paper-page .home-links > .color-card {
    grid-column: span 2;
    min-height: 74px;
    border-radius: 14px;
  }

  body.index-page.paper-page .home-links > .color-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  body.index-page.paper-page .home-links > .color-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  body.index-page.paper-page .color-card__icon {
    width: 40px;
    height: 40px;
    font-size: 1.55rem;
  }

  body.index-page.paper-page .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  body.index-page.paper-page .content-card {
    min-height: 96px;
    padding: 0.75rem 0.7rem;
    gap: 0.65rem;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(15, 11, 26, 0.22);
  }

  body.index-page.paper-page .content-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  body.index-page.paper-page .card-title {
    font-size: 1.02rem;
    line-height: 1.05;
  }

  body.index-page.paper-page .card-note {
    font-size: 0.66rem;
    line-height: 1.3;
  }

  body.paper-page .footer {
    padding: 0.7rem 0 0.9rem;
  }

  body.paper-page .footer-inner {
    align-items: flex-end;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.9rem;
  }

  body.paper-page .footer-year {
    font-size: 1.05rem;
  }

  body.paper-page .footer-socials {
    width: auto;
    gap: 0.35rem;
    justify-content: flex-end;
  }

  body.paper-page .footer-social-link {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  body.paper-page .footer-icon {
    font-size: 1rem;
  }
}

/* Final desktop paper fit: stretch the selected paper asset across the full page height */
body.paper-page {
  min-height: 100vh !important;
  height: auto !important;
}

html[data-theme="light"][data-bg-length="short"],
html[data-theme="dark"][data-bg-length="short"] {
  --page-bg-size-y: 128%;
}

html[data-theme="light"][data-bg-length="medium"],
html[data-theme="dark"][data-bg-length="medium"] {
  --page-bg-size-y: 130%;
}

html[data-theme="light"][data-bg-length="long"],
html[data-theme="dark"][data-bg-length="long"] {
  --page-bg-size-y: 132%;
}

body.paper-page .page-wrapper {
  min-height: 100vh;
  background-size: 100% var(--page-bg-size-y, 100%) !important;
}

html[data-bg-length="very-long"] body.paper-page .page-wrapper {
  background-size: 100% auto !important;
}

@media (max-width: 768px) {
  body.paper-page .page-wrapper {
    background-size: 100% 100% !important;
  }
}

/* Music requests redesign */
body.paper-page .music-requests-layout {
  width: min(100%, 1600px);
  gap: clamp(1.4rem, 2.6vw, 2.4rem);
  padding-top: clamp(1rem, 1.8vw, 1.5rem);
}

body.paper-page .music-requests-layout > * + * {
  margin-top: 0;
}

body.paper-page .music-requests-hero {
  display: grid;
  justify-items: center;
  gap: clamp(0.7rem, 1.4vw, 1.1rem);
}

body.paper-page .music-requests-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2.9rem, 4vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

body.paper-page .music-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.25rem);
  margin: 0;
}

body.paper-page .music-queue-summary,
body.paper-page .queue-length.music-queue-summary {
  margin: 0;
  font-weight: 800;
}

body.paper-page .music-requests-copy {
  width: min(100%, 690px);
  margin: 0 auto;
  display: grid;
  gap: clamp(0.95rem, 1.8vw, 1.35rem);
  margin-bottom: 157px;
}

body.paper-page .music-desc {
  margin: 0;
  font-size: clamp(1.02rem, 0.35vw + 0.98rem, 1.2rem);
  font-weight: 800;
  line-height: 1.34;
  color: #181417;
}

body.paper-page .music-request-script {
  width: min(100%, 640px);
  display: grid;
  gap: 0.28rem;
  justify-items: start;
  font-family: "Itim Cyrillic", "Itim", cursive;
  color: #5f1aa7;
}

body.paper-page .music-request-script,
body.paper-page .music-request-script * {
  font-family: "Itim Cyrillic", "Itim", cursive !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

body.paper-page .music-request-script__command,
body.paper-page .music-request-script__line {
  margin: 0;
  font-size: clamp(1rem, 0.45vw + 0.94rem, 1.38rem);
  line-height: 1.08;
}

body.paper-page .music-request-script__command {
  margin-top: 0.18rem;
}

body.paper-page .music-request-script__line {
  position: relative;
  padding-left: 1.1rem;
}

body.paper-page .music-request-script__line::before {
  content: "\2022";
  position: absolute;
  left: 0;
  top: 0;
}

body.paper-page .music-requests-layout .queue-title {
  display: none;
}

body.paper-page .music-track-grid,
body.paper-page .music-requests-layout .track-grid {
  margin-top: 0;
  grid-template-columns: repeat(auto-fit, 370px);
  justify-content: center;
  justify-items: center;
  align-items: start;
  gap: 24px;
}

body.paper-page .music-requests-layout .track-card {
  position: relative;
  overflow: hidden;
  width: 370px;
  min-width: 370px;
  height: 300px;
  min-height: 300px;
  border: 0 !important;
  border-radius: 25px;
  background: #f1f0f2 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.paper-page .music-requests-layout .track-card__link {
  display: grid;
  grid-template-rows: 171px minmax(0, 1fr);
  height: 100%;
  padding: 18px;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

body.paper-page .music-requests-layout .track-card__link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--design-accent) 42%, transparent);
  outline-offset: 6px;
}

body.paper-page .music-requests-layout .track-card__preview {
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 171px;
  aspect-ratio: auto;
  border-radius: 15px;
  background: #050507;
}

body.paper-page .music-requests-layout .track-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.94;
}

body.paper-page .music-requests-layout .track-card__current {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  pointer-events: none;
  filter: drop-shadow(0 12px 20px rgba(129, 23, 34, 0.18));
}

body.paper-page .music-requests-layout .track-card.is-current-track {
  transform: none;
  box-shadow: none !important;
}

body.paper-page .music-requests-layout .track-card__body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.58rem;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
}

body.paper-page .music-requests-layout .track-card__title {
  display: -webkit-box;
  margin: 0;
  min-height: 2.36em;
  overflow: hidden;
  color: #151116;
  font-size: 0.99rem;
  font-weight: 900;
  line-height: 1.18;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.paper-page .music-requests-layout .track-card__link:hover .track-card__title,
body.paper-page .music-requests-layout .track-card__link:focus-visible .track-card__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

body.paper-page .music-requests-layout .track-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0;
  color: #767071;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
}

body.paper-page .music-requests-layout .track-card__requester,
body.paper-page .music-requests-layout .track-card__requested-at {
  display: block;
  min-width: 0;
}

body.paper-page .music-requests-layout .track-card__requester {
  color: #686161;
  flex: 1 1 auto;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.paper-page .music-requests-layout .track-card__requested-at {
  color: #878182;
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

body.dark.paper-page .music-desc,
html[data-theme="dark"] body.paper-page .music-desc {
  color: #f7f0ff;
}

body.dark.paper-page .music-request-script,
html[data-theme="dark"] body.paper-page .music-request-script {
  color: #dfb3ff;
}

body.dark.paper-page .music-requests-layout .track-card,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card {
  background: rgba(26, 26, 32, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  color: #fff7ff !important;
}

body.dark.paper-page .music-requests-layout .track-card__title,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card__title {
  color: #fff7ff !important;
}

body.dark.paper-page .music-requests-layout .track-card__meta,
body.dark.paper-page .music-requests-layout .track-card__requester,
body.dark.paper-page .music-requests-layout .track-card__requested-at,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card__meta,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card__requester,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card__requested-at {
  color: rgba(240, 232, 255, 0.76) !important;
}

body.dark.paper-page .music-requests-layout .track-card.is-current-track,
html[data-theme="dark"] body.paper-page .music-requests-layout .track-card.is-current-track {
  border-color: rgba(214, 194, 255, 0.24) !important;
  box-shadow: none !important;
}

@media (max-width: 1280px) {
  body.paper-page .music-track-grid,
  body.paper-page .music-requests-layout .track-grid {
    grid-template-columns: repeat(3, 370px);
  }
}

@media (max-width: 980px) {
  body.paper-page .music-requests-title {
    font-size: clamp(2.45rem, 6.4vw, 3.7rem);
  }

  body.paper-page .music-track-grid,
  body.paper-page .music-requests-layout .track-grid {
    margin-top: 0;
    grid-template-columns: repeat(2, 370px);
  }
}

@media (max-width: 640px) {
  body.paper-page .music-requests-layout {
    gap: 1.1rem;
  }

  body.paper-page .music-requests-title {
    font-size: clamp(2rem, 8vw, 2.7rem);
  }

  body.paper-page .music-status-row {
    gap: 0.65rem;
  }

  body.paper-page .music-requests-copy {
    width: 100%;
    margin-bottom: 72px;
  }

  body.paper-page .music-request-script__command,
  body.paper-page .music-request-script__line {
    font-size: clamp(0.95rem, 1.8vw + 0.72rem, 1.18rem);
  }

  body.paper-page .music-track-grid,
  body.paper-page .music-requests-layout .track-grid {
    margin-top: 0;
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
  }

  body.paper-page .music-requests-layout .track-card {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
  }

  body.paper-page .music-requests-layout .track-card__link {
    grid-template-rows: 168px auto;
    padding: 0.95rem;
    gap: 0.85rem;
  }

  body.paper-page .music-requests-layout .track-card__preview {
    height: 168px;
  }

  body.paper-page .music-requests-layout .track-card__current {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  body.paper-page .music-requests-layout .track-card__title {
    font-size: 1rem;
  }

  body.paper-page .music-requests-layout .track-card__meta {
    font-size: 0.86rem;
  }
}

/* Admin shell refresh */
body.admin-page {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body.admin-page .page-wrapper {
  --admin-header-height: 96px;
  min-height: 100vh;
  height: auto;
  display: block;
  overflow: visible;
}

body.admin-page .page-main {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: var(--admin-header-height) clamp(1rem, 2vw, 1.75rem) clamp(1rem, 2vw, 1.75rem);
  overflow: visible;
}

body.admin-page .admin-shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(22, 21, 21, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.admin-page .admin-shell-header__inner {
  justify-content: flex-start;
  min-height: var(--admin-header-height);
  padding-inline: clamp(1.5rem, 2.4vw, 2rem);
}

body.admin-page .admin-shell-logo {
  display: inline-flex;
}

body.admin-page .admin-shell-header .logo-image {
  width: min(232px, 42vw);
  max-height: none;
}

body.dark.admin-page .admin-shell-header {
  background: rgba(20, 16, 27, 0.94);
  border-bottom-color: rgba(205, 183, 255, 0.16);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

body.admin-page .admin-mobile-menu-toggle {
  display: none;
}

body.admin-page .admin-layout {
  --admin-sidebar-width: 260px;
  --admin-sidebar-width-collapsed: 72px;
  --admin-sidebar-gap: clamp(1rem, 1.8vw, 1.45rem);
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - var(--admin-header-height));
  height: auto;
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  gap: var(--admin-sidebar-gap);
  align-items: start;
}

body.admin-page .admin-layout.sidebar-collapsed {
  grid-template-columns: var(--admin-sidebar-width-collapsed) minmax(0, 1fr);
}

body.admin-page .admin-layout.sidebar-collapsed .admin-sidebar {
  width: var(--admin-sidebar-width-collapsed);
  padding-inline: 0.5rem;
}

body.admin-page .admin-main {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow-y: visible;
  overflow-x: hidden;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}

body.admin-page .admin-sidebar {
  position: fixed;
  left: 0;
  top: var(--admin-header-height);
  bottom: auto;
  width: var(--admin-sidebar-width);
  min-width: 0;
  min-height: 0;
  height: calc(100vh - var(--admin-header-height));
  max-height: calc(100vh - var(--admin-header-height));
  align-self: start;
  padding: 1.5rem 1.1rem;
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(33, 25, 45, 0.08);
  background: rgba(250, 247, 241, 0.88);
  box-shadow: none;
  backdrop-filter: blur(18px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease;
}

body.dark.admin-page .admin-sidebar {
  background: rgba(23, 18, 31, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.admin-page .admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: auto;
  padding-inline: 0.35rem;
  flex: 0 0 auto;
}

body.admin-page .admin-sidebar-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Itim", cursive;
  font-size: 1.02rem;
  color: var(--paper-ink);
  letter-spacing: 0;
  text-transform: none;
}

body.dark.admin-page .admin-sidebar-title {
  color: #f7efff;
}

body.admin-page .admin-theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(22, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.68);
  color: var(--paper-ink);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.admin-page .admin-theme-toggle:hover,
body.admin-page .admin-theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--design-accent) 24%, var(--design-border));
  background: color-mix(in srgb, var(--design-accent) 8%, var(--design-surface));
}

body.admin-page .admin-theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--design-accent) 18%, transparent);
  outline-offset: 2px;
}

body.admin-page .admin-theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.admin-page .admin-theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.8);
}

body.dark.admin-page .admin-theme-toggle {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(49, 36, 79, 0.82);
  color: #f7efff;
}

body.dark.admin-page .admin-theme-toggle:hover,
body.dark.admin-page .admin-theme-toggle:focus-visible {
  border-color: rgba(214, 194, 255, 0.24);
  background: rgba(67, 47, 111, 0.92);
}

body.dark.admin-page .admin-theme-toggle:focus-visible {
  outline-color: rgba(214, 194, 255, 0.24);
}

html[data-theme="dark"] body.admin-page .admin-theme-toggle__icon--moon,
body.dark.admin-page .admin-theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.8);
}

html[data-theme="dark"] body.admin-page .admin-theme-toggle__icon--sun,
body.dark.admin-page .admin-theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1);
}

html:not([data-theme="dark"]) body.admin-page .admin-theme-toggle__icon--moon,
body.admin-page .admin-theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
}

body.admin-page .sidebar-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(22, 21, 21, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.dark.admin-page .sidebar-toggle-btn {
  background: rgba(49, 36, 79, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-page .admin-sidebar.collapsed #admin-sidebar-toggle i {
  transform: rotate(180deg);
}

body.admin-page #admin-sidebar-toggle i {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.admin-page .admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1.25rem;
  flex: 1 1 auto;
}

body.admin-page .admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--paper-ink);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, padding 0.25s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.25s ease;
  position: relative;
}

body.admin-page .admin-nav a i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

body.admin-page .admin-nav a:hover {
  background: color-mix(in srgb, var(--design-accent) 8%, var(--design-surface)) !important;
  color: var(--design-accent);
}

body.admin-page .admin-nav a.active {
  background: color-mix(in srgb, var(--design-accent) 10%, var(--design-surface));
  color: var(--design-accent);
}

body.admin-page .admin-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--design-accent);
  border-radius: 0 4px 4px 0;
  transition: opacity 0.15s ease;
}

body.dark.admin-page .admin-nav a {
  color: #f3ecfb;
}

body.dark.admin-page .admin-nav a:hover,
body.dark.admin-page .admin-nav a.active {
  background: color-mix(in srgb, var(--design-accent) 14%, var(--design-surface)) !important;
  color: #ffffff;
}

body.dark.admin-page .admin-nav a.active::before {
  background: #a884ff;
}

body.admin-page .admin-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(33, 25, 45, 0.06);
  margin-top: auto;
  flex: 0 0 auto;
  transition: padding-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark.admin-page .admin-sidebar-footer {
  border-top-color: rgba(214, 194, 255, 0.08);
}

body.admin-page .admin-sidebar.collapsed .admin-sidebar-header {
  justify-content: center;
  display: flex;
  padding-inline: 0;
}

body.admin-page .admin-sidebar.collapsed .admin-sidebar-title,
body.admin-page .admin-sidebar.collapsed .admin-nav a span {
  display: none;
}

body.admin-page .admin-sidebar.collapsed .sidebar-toggle-btn {
  margin: 0 auto;
}

body.admin-page .admin-sidebar.collapsed .admin-nav a {
  justify-content: center;
  padding: 0.8rem 0;
}

body.admin-page .admin-sidebar.collapsed .admin-nav a.active::before {
  left: 4px;
}

body.admin-page .admin-sidebar.collapsed .admin-sidebar-footer {
  padding-top: 1.25rem;
}

body.admin-page .admin-content {
  min-height: 0;
  display: block;
  padding: clamp(1.2rem, 2.4vw, 2.1rem) clamp(0.45rem, 1.15vw, 0.85rem) clamp(2.6rem, 4vw, 3rem) 0;
}

body.admin-page .admin-content-inner {
  width: min(100%, 1360px);
  max-width: 1360px;
  min-height: 0;
  gap: 1.65rem;
}

body.admin-page .admin-page-intro {
  display: grid;
  gap: 0.7rem;
  max-width: 760px;
  margin-top: 0.35rem;
}

body.admin-page .admin-kicker-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

body.admin-page .admin-page-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--design-accent) 10%, var(--design-surface));
  color: var(--design-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.dark.admin-page .admin-page-kicker {
  background: color-mix(in srgb, var(--design-accent) 14%, var(--design-surface));
  color: var(--design-accent);
}

body.admin-page .admin-page-title {
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 4.45rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-align: left;
  color: var(--paper-ink);
}

body.dark.admin-page .admin-page-title {
  color: #fff7ff;
}

body.admin-page .admin-page-description {
  margin: 0;
  max-width: 720px;
  color: var(--paper-muted);
  font-size: clamp(0.98rem, 0.35vw + 0.94rem, 1.08rem);
  line-height: 1.5;
}

body.dark.admin-page .admin-page-description {
  color: rgba(240, 232, 255, 0.78);
}

body.admin-page .admin-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

body.admin-page .admin-status-pill {
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: none;
  background: rgba(255, 255, 255, 0.82);
}

body.admin-page .admin-status-pill.is-online {
  color: #216f4b;
  border-color: rgba(59, 207, 142, 0.26);
  background: rgba(59, 207, 142, 0.14);
}

body.admin-page .admin-status-pill.is-offline {
  color: #a43c4a;
  border-color: rgba(240, 98, 114, 0.28);
  background: rgba(240, 98, 114, 0.12);
}

body.dark.admin-page .admin-status-pill {
  background: rgba(38, 38, 45, 0.86);
  color: #f7efff;
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-page .admin-card,
body.admin-page .admin-panel,
body.admin-page .overlay-admin-card,
body.admin-page .widget-settings-card {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(22, 21, 21, 0.08);
  border-radius: 8px;
  box-shadow: none;
}

body.dark.admin-page .admin-card,
body.dark.admin-page .admin-panel,
body.dark.admin-page .overlay-admin-card,
body.dark.admin-page .widget-settings-card {
  background: rgba(26, 26, 30, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.admin-page .admin-section-header {
  gap: 1rem 1.5rem;
}

body.admin-page .admin-section-header h2 {
  margin: 0;
}

body.admin-page .admin-section-note {
  text-align: left;
  color: var(--paper-muted);
}

body.dark.admin-page .admin-section-note {
  color: rgba(240, 232, 255, 0.74);
}

body.admin-page .admin-input,
body.admin-page .widget-link__input,
body.admin-page .music-settings-limit-field input,
body.admin-page .music-settings-text-field input[type='number'],
body.admin-page .music-settings-text-field input[type='text'],
body.admin-page .music-settings-text-field textarea,
body.admin-page .queue-add-row input,
body.admin-page .blacklist-add input,
body.admin-page #blacklist-import-text,
body.admin-page #command-form input,
body.admin-page #command-form textarea,
body.admin-page #news-form input,
body.admin-page #news-form textarea {
  border-radius: 16px;
  border: 1px solid rgba(22, 21, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.dark.admin-page .admin-input,
body.dark.admin-page .widget-link__input,
body.dark.admin-page .music-settings-limit-field input,
body.dark.admin-page .music-settings-text-field input[type='number'],
body.dark.admin-page .music-settings-text-field input[type='text'],
body.dark.admin-page .music-settings-text-field textarea,
body.dark.admin-page .queue-add-row input,
body.dark.admin-page .blacklist-add input,
body.dark.admin-page #blacklist-import-text,
body.dark.admin-page #command-form input,
body.dark.admin-page #command-form textarea,
body.dark.admin-page #news-form input,
body.dark.admin-page #news-form textarea {
  background: rgba(20, 20, 25, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff7ff;
  box-shadow: none;
}

body.admin-page .music-player-card {
  gap: 1.25rem;
}

body.admin-page .control-block {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 21, 21, 0.06);
  border-radius: 8px;
  padding: 1rem;
}

body.dark.admin-page .control-block {
  background: rgba(20, 20, 25, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-page .admin-kpi-grid--compact .admin-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.dark.admin-page .admin-kpi-grid--compact .admin-card {
  background: rgba(26, 26, 32, 0.94) !important;
}

body.admin-page .command-surface,
body.admin-page .command-item,
body.admin-page .command-variable-helper {
  border-radius: 8px;
}

body.admin-page .commands-shell {
  padding: 1.15rem;
}

body.admin-page .command-surface {
  padding: 0;
  border: 0;
  background: transparent;
}

body.admin-page .command-surface__header {
  padding: 0.25rem 0 1rem;
}

body.admin-page .command-item {
  background: rgba(255, 255, 255, 0.58);
}

body.dark.admin-page .command-item {
  background: rgba(18, 13, 28, 0.72);
}

body.admin-page .commands-admin input,
body.admin-page .commands-admin select,
body.admin-page .commands-admin textarea {
  min-height: 42px;
  padding: 0.62rem 0.78rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

body.admin-page .command-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.admin-page .command-shell-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

body.admin-page .command-arguments-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

body.admin-page .command-arguments-link:hover,
body.admin-page .command-arguments-link:focus-visible {
  color: var(--design-accent);
}

body.admin-page .command-arguments-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--design-accent) 28%, transparent);
  outline-offset: 4px;
}

body.admin-page .command-arguments-modal[hidden] {
  display: none;
}

body.admin-page .command-arguments-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

body.admin-page .command-arguments-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 10, 22, 0.52);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

body.admin-page .command-arguments-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.45rem);
  overflow: hidden;
}

body.admin-page .command-arguments-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body.admin-page .command-arguments-dialog__header h2,
body.admin-page .command-arguments-dialog__header p {
  margin: 0;
}

body.admin-page .command-arguments-dialog__header p {
  margin-top: 0.35rem;
  color: var(--paper-muted);
}

body.dark.admin-page .command-arguments-dialog__header p {
  color: rgba(240, 232, 255, 0.72);
}

body.admin-page .command-arguments-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(22, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
}

body.dark.admin-page .command-arguments-close {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 25, 0.9);
}

body.admin-page .command-arguments-list {
  min-height: 0;
  display: grid;
  gap: 0.62rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
}

body.admin-page .command-argument-row {
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.78rem;
  border: 1px solid rgba(22, 21, 21, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

body.dark.admin-page .command-argument-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 25, 0.62);
}

body.admin-page .command-argument-row code {
  display: inline-flex;
  width: fit-content;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--design-accent) 18%, var(--design-border));
  background: color-mix(in srgb, var(--design-accent) 8%, var(--design-surface));
  color: var(--design-accent);
  font-weight: 800;
}

body.dark.admin-page .command-argument-row code {
  background: color-mix(in srgb, var(--design-accent) 14%, var(--design-surface));
  color: var(--design-accent);
}

body.admin-page .command-argument-row span {
  min-width: 0;
  line-height: 1.45;
}

body.command-arguments-open {
  overflow: hidden;
}

body.admin-page .giveaway-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

body.admin-page .track-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1rem;
  align-items: end;
}

body.admin-page .track-volume-row {
  display: grid;
  gap: 0.45rem;
}

body.admin-page .control-block--flat,
body.admin-page .music-controls-right .control-block {
  background: transparent !important;
  border-color: rgba(22, 21, 21, 0.1);
  box-shadow: none;
}

body.admin-page .controls-row--music-main {
  align-items: center;
}

body.admin-page .controls-row--music-main .admin-btn {
  min-height: 44px;
  justify-content: center;
}

body.admin-page .queue-section-actions {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  gap: 0.75rem;
  align-items: center;
}

body.admin-page .music-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2vw, 2rem);
}

body.admin-page .music-settings-modal[hidden] {
  display: none;
}

body.admin-page .music-settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(13, 9, 19, 0.58);
}

body.admin-page .music-settings-dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(82vh, 900px);
  overflow: auto;
}

body.music-settings-open {
  overflow: hidden;
}

body.admin-page .overlay-admin-card--chat {
  grid-column: 1 / -1;
  cursor: pointer;
}

body.admin-page .overlay-admin-card--chat.is-collapsed .overlay-admin-card__config,
body.admin-page .overlay-admin-card--chat.is-collapsed .overlay-admin-card__actions,
body.admin-page .overlay-admin-card--chat.is-collapsed .widget-link__input {
  display: none;
}

body.admin-page .subscription-admin .subscription-panel {
  display: grid;
  gap: 18px;
}

body.admin-page .subscription-toolbar,
body.admin-page .subscription-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body.admin-page .subscription-toolbar h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

body.admin-page .subscription-toolbar p,
body.admin-page .subscription-status-row {
  margin: 0;
  color: var(--design-muted);
  font-size: 0.9rem;
}

body.admin-page .subscription-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.admin-page .subscription-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 520px;
  padding: 22px;
  border: 1px solid var(--design-border);
  border-radius: 8px;
  background: var(--design-surface);
  box-shadow: var(--ui-shadow-soft);
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.admin-page .subscription-features {
  flex-grow: 1;
  margin-bottom: 8px;
}

body.admin-page .subscription-card__bottom {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

body.admin-page .subscription-card.is-featured {
  border-color: var(--design-accent, #22c7d8) !important;
  border-width: 2px !important;
}

body.dark.admin-page .subscription-card.is-featured,
html[data-theme="dark"] body.admin-page .subscription-card.is-featured {
  box-shadow: 0 0 25px rgba(34, 199, 216, 0.22), var(--ui-shadow-soft) !important;
}

html[data-theme="light"] body.admin-page .subscription-card.is-featured {
  box-shadow: 0 8px 30px rgba(11, 122, 136, 0.12), var(--ui-shadow-soft) !important;
}

body.admin-page .subscription-card.is-current {
  background: color-mix(in srgb, var(--design-surface) 94%, var(--design-accent));
}

body.admin-page .subscription-card__top {
  position: relative;
  display: grid;
  gap: 8px;
}

body.admin-page .subscription-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

body.admin-page .subscription-card p,
body.admin-page .subscription-price-meta,
body.admin-page .subscription-note {
  margin: 0;
  color: var(--design-muted);
  font-size: 0.82rem;
}

body.admin-page .subscription-badge {
  justify-self: end;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, #f6b73c 70%, transparent);
  border-radius: 999px;
  color: #f6b73c;
  font-size: 0.72rem;
  font-weight: 700;
}

body.admin-page .subscription-price {
  margin-top: 8px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--design-text);
}

body.admin-page .subscription-action {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
}

body.admin-page .subscription-action:disabled {
  cursor: default;
  opacity: 0.65;
}

body.admin-page .subscription-included {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--design-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.admin-page .subscription-included::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--design-border);
}

body.admin-page .subscription-features {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.admin-page .subscription-features li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.9rem;
}

body.admin-page .subscription-features i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--design-border);
  border-radius: 50%;
  color: var(--design-accent);
  font-size: 0.7rem;
}

@media (max-width: 1100px) {
  body.admin-page .subscription-grid {
    grid-template-columns: 1fr;
  }

  body.admin-page .subscription-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  body.admin-page .subscription-toolbar,
  body.admin-page .subscription-status-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .subscription-interval {
    width: 100%;
  }
}

body.owner-page {
  min-height: 100vh;
}

body.owner-page .owner-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

body.owner-page .owner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

body.owner-page .owner-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

body.owner-page .owner-header p {
  margin: 0;
  color: var(--design-muted);
}

body.owner-page .owner-section {
  margin-top: 16px;
}

body.owner-page .owner-table-wrap {
  overflow-x: auto;
}

body.owner-page .owner-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

body.owner-page .owner-table th,
body.owner-page .owner-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--design-border);
  text-align: left;
  vertical-align: middle;
}

body.owner-page .owner-table th {
  color: var(--design-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.owner-page .owner-table td span {
  display: block;
  margin-top: 3px;
  color: var(--design-muted);
  font-size: 0.82rem;
}

body.owner-page .owner-table select {
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--design-border);
  border-radius: 8px;
  background: var(--design-surface);
  color: var(--design-text);
}

body.owner-page .owner-plan {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--design-border);
  border-radius: 999px;
  font-weight: 800;
  text-transform: capitalize;
}

body.owner-page .owner-plan--premium {
  color: #c43a83;
  border-color: color-mix(in srgb, #c43a83 60%, var(--design-border));
}

body.owner-page .owner-plan--pro {
  color: #1f7a68;
  border-color: color-mix(in srgb, #1f7a68 60%, var(--design-border));
}

body.owner-page .owner-audit-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.owner-page .owner-audit-list li {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--design-border);
  border-radius: 8px;
}

body.owner-page .owner-audit-list span,
body.owner-page .owner-audit-list time,
body.owner-page .owner-status {
  color: var(--design-muted);
}

body.owner-page .owner-status {
  min-height: 24px;
  margin: 16px 0 0;
}

@media (max-width: 760px) {
  body.owner-page .owner-header,
  body.owner-page .owner-audit-list li {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

body.admin-page .overlay-card-toggle {
  justify-self: end;
  grid-column: 2;
  margin-top: 0.5rem;
  width: fit-content;
}

body.admin-page .giveaway-settings-form {
  display: grid;
  gap: 1rem;
}

body.admin-page .giveaway-settings-form textarea {
  resize: vertical;
  min-height: 180px;
}

body.admin-page .settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

body.admin-page .admin-shell-header__inner {
  justify-content: flex-start;
  align-items: center;
  display: flex;
  min-height: var(--admin-header-height);
  padding-inline: clamp(1.5rem, 2.4vw, 2rem);
}

@media (max-width: 900px) {
  body.admin-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  body.admin-page .page-wrapper {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body.admin-page .admin-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 1.35rem;
    color: var(--paper-ink);
    cursor: pointer;
    border-radius: 8px;
    margin-right: 0.5rem;
    transition: background-color 0.15s ease;
  }

  body.dark.admin-page .admin-mobile-menu-toggle {
    color: #fff7ff;
  }

  body.admin-page .admin-mobile-menu-toggle:hover {
    background: rgba(22, 21, 21, 0.05);
  }

  body.dark.admin-page .admin-mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  body.admin-page .page-main {
    display: block;
    width: min(100%, calc(100% - 1rem));
    padding-top: calc(var(--admin-header-height) + 0.8rem);
    overflow: visible;
  }

  body.admin-page .admin-layout {
    width: auto;
    min-height: 0;
    display: block;
  }

  body.admin-page .admin-main,
  body.admin-page .admin-layout.sidebar-collapsed .admin-main {
    min-height: 0;
    overflow: visible;
  }

  body.admin-page .admin-sidebar,
  body.admin-page .admin-sidebar.collapsed {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(250, 247, 241, 0.98);
    box-shadow: 4px 0 24px rgba(15, 10, 22, 0.15);
    padding: 1.5rem 1.25rem;
    border: 0;
    border-right: 1px solid rgba(22, 21, 21, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0;
    border-radius: 0;
    backdrop-filter: blur(20px);
    align-self: stretch;
  }

  body.dark.admin-page .admin-sidebar,
  body.dark.admin-page .admin-sidebar.collapsed {
    background: rgba(23, 18, 31, 0.98);
    border-right-color: rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  body.admin-page .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  body.admin-mobile-nav-open {
    overflow: hidden;
  }

  body.admin-mobile-nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 22, 0.48);
    backdrop-filter: blur(4px);
    z-index: 290;
    animation: adminFadeIn 0.25s ease forwards;
  }

  @keyframes adminFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  body.admin-page .admin-sidebar-title,
  body.admin-page .admin-sidebar.collapsed .admin-sidebar-title,
  body.admin-page .admin-sidebar.collapsed .admin-nav a span {
    display: initial;
  }

  body.admin-page .admin-nav a,
  body.admin-page .admin-sidebar.collapsed .admin-nav a {
    justify-content: flex-start;
    padding: 0.8rem 1rem;
  }

  body.admin-page .admin-sidebar.collapsed .admin-sidebar-footer {
    padding-top: 1.25rem;
  }

  body.admin-page #admin-sidebar-toggle .fa-angles-left::before {
    content: "\f00d"; /* font-awesome xmark */
  }

  body.admin-page .admin-sidebar.collapsed #admin-sidebar-toggle i {
    transform: none;
  }

  body.admin-page .admin-content {
    padding: 0;
  }

  body.admin-page .admin-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.admin-page .command-arguments-dialog {
    max-height: min(86vh, 760px);
  }

  body.admin-page .command-argument-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 640px) {
  body.admin-page .page-main {
    width: calc(100% - 1rem);
  }

  body.admin-page .admin-page-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

/* design.md unified style pass */
:root {
  --design-bg: #f7f8fb;
  --design-surface: #ffffff;
  --design-surface-soft: #f0f2f6;
  --design-text: #14161a;
  --design-muted: rgba(20, 22, 26, 0.66);
  --design-border: rgba(20, 22, 26, 0.12);
  --design-border-strong: rgba(20, 22, 26, 0.2);
  --design-accent: #0b7a88;
  --design-accent-hover: #075f6a;
  --design-on-accent: #ffffff;
  --design-danger: #c93345;
  --design-success: #167a55;
  --design-warning: #aa6a00;
  --design-radius-button: 8px;
  --design-radius-card: 8px;
  --design-radius-input: 8px;
  --design-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.07);
  --design-shadow-focus: 0 0 0 3px rgba(11, 122, 136, 0.18);
  --design-shadow-glow: 0 0 12px rgba(11, 122, 136, 0.25);

  --bs-body-bg: var(--design-bg);
  --bs-body-color: var(--design-text);
  --bs-primary: var(--design-accent);
  --bs-primary-hover: var(--design-accent-hover);
  --bs-card-bg: var(--design-surface);
  --bs-header-bg: rgba(247, 248, 251, 0.9);
  --bs-border-color: var(--design-border);
  --bs-text-muted: var(--design-muted);
  --paper-bg: var(--design-surface);
  --page-bg: var(--design-bg);
  --ui-radius-card: var(--design-radius-card);
  --ui-radius-control: var(--design-radius-input);
  --ui-radius-pill: var(--design-radius-button);
  --ui-panel-border: 1px solid var(--design-border);
  --ui-panel-shadow: var(--design-shadow-soft);
  --radius: var(--design-radius-card);
  --radius-sm: var(--design-radius-input);
}

body.dark,
html[data-theme="dark"] {
  --design-bg: #111318;
  --design-surface: #191c23;
  --design-surface-soft: #222630;
  --design-text: #f4f6fb;
  --design-muted: rgba(244, 246, 251, 0.68);
  --design-border: rgba(244, 246, 251, 0.12);
  --design-border-strong: rgba(244, 246, 251, 0.2);
  --design-accent: #22c7d8;
  --design-accent-hover: #63ddeb;
  --design-on-accent: #101217;
  --design-danger: #ff7583;
  --design-success: #58d39d;
  --design-warning: #f4b04f;
  --design-shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.34);
  --design-shadow-glow: 0 0 16px rgba(34, 199, 216, 0.4);

  --bs-body-bg: var(--design-bg);
  --bs-body-color: var(--design-text);
  --bs-primary: var(--design-accent);
  --bs-primary-hover: var(--design-accent-hover);
  --bs-card-bg: var(--design-surface);
  --bs-header-bg: rgba(17, 19, 24, 0.9);
  --bs-border-color: var(--design-border);
  --bs-text-muted: var(--design-muted);
  --paper-bg: var(--design-surface);
  --page-bg: var(--design-bg);
}

body,
body.paper-page,
body.index-page,
body.admin-page,
body.owner-page {
  background: var(--design-bg) !important;
  color: var(--design-text);
}

.page-main {
  background: transparent !important;
}

.header,
body.index-page .header.scrolled,
body.rules-page .header.scrolled,
body.paper-page .header.scrolled,
body.dark.index-page .header.scrolled,
body.dark.rules-page .header.scrolled,
body.dark.paper-page .header.scrolled,
html[data-theme="dark"] body.index-page .header.scrolled,
html[data-theme="dark"] body.rules-page .header.scrolled,
html[data-theme="dark"] body.paper-page .header.scrolled {
  background: var(--bs-header-bg) !important;
  border-bottom: 1px solid var(--design-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.content-card,
.feature-card,
.extension-card,
.command-card,
.commercial-card,
.news-item,
.widget-settings-card,
.admin-card,
.overlay-admin-card,
.rules-desc,
.track-card,
.admin-empty-state,
.music-settings-dialog,
.owner-section,
.subscription-card {
  border: 1px solid var(--design-border) !important;
  border-radius: var(--design-radius-card) !important;
  background: var(--design-surface) !important;
  box-shadow: none !important;
}

body.dark .content-card,
body.dark .feature-card,
body.dark .extension-card,
body.dark .command-card,
body.dark .commercial-card,
body.dark .news-item,
body.dark .widget-settings-card,
body.dark .admin-card,
body.dark .overlay-admin-card,
body.dark .rules-desc,
body.dark .track-card,
body.dark .admin-empty-state,
body.dark .music-settings-dialog,
body.dark .owner-section,
body.dark .subscription-card {
  background: var(--design-surface) !important;
  border-color: var(--design-border) !important;
}

.content-card:hover,
.feature-card:hover,
.extension-card:hover,
.command-card:hover,
.news-item:hover,
.track-card:hover,
.subscription-card:hover,
.overlay-admin-card:hover {
  border-color: var(--design-border-strong) !important;
}

.login-button,
.admin-btn,
.admin-action-button,
.overlay-button,
.commercial-btn,
.rules-btn,
.browser-buttons a,
.browser-buttons button,
.admin-quick-action,
.queue-add-btn,
.widget-link__copy,
.command-card__actions button,
.command-variable-helper__button,
.danger-button,
button[type="submit"],
button[type="button"],
input[type="button"],
input[type="submit"] {
  border-radius: var(--design-radius-button) !important;
  min-height: 42px;
  border: 1px solid var(--design-border) !important;
  background: var(--design-surface-soft) !important;
  color: var(--design-text) !important;
  box-shadow: none !important;
  font-weight: 750;
  letter-spacing: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.login-button:not(.login-button--ghost),
.admin-btn:not(.admin-btn-ghost),
.admin-action-button:not(.admin-action-button--ghost),
.overlay-button:not(.overlay-button--ghost),
button[type="submit"] {
  background: var(--design-accent) !important;
  border-color: var(--design-accent) !important;
  color: var(--design-on-accent) !important;
}

.login-button:hover,
.admin-btn:hover,
.admin-action-button:hover,
.overlay-button:hover,
.commercial-btn:hover,
.rules-btn:hover,
.browser-buttons a:hover,
.browser-buttons button:hover,
.admin-quick-action:hover,
.queue-add-btn:hover,
.widget-link__copy:hover,
.command-card__actions button:hover,
button[type="submit"]:hover,
button[type="button"]:hover {
  border-color: var(--design-border-strong) !important;
  transform: translateY(-1px);
}

.login-button:not(.login-button--ghost):hover,
.admin-btn:not(.admin-btn-ghost):hover,
.admin-action-button:not(.admin-action-button--ghost):hover,
.overlay-button:not(.overlay-button--ghost):hover,
button[type="submit"]:hover {
  background: var(--design-accent-hover) !important;
  border-color: var(--design-accent-hover) !important;
}

.login-button:focus-visible,
.admin-btn:focus-visible,
.admin-action-button:focus-visible,
.overlay-button:focus-visible,
.commercial-btn:focus-visible,
.rules-btn:focus-visible,
.browser-buttons a:focus-visible,
.browser-buttons button:focus-visible,
.admin-quick-action:focus-visible,
.queue-add-btn:focus-visible,
.widget-link__copy:focus-visible,
.command-card__actions button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none !important;
  box-shadow: var(--design-shadow-focus) !important;
}

.login-button:disabled,
.admin-btn:disabled,
.admin-action-button:disabled,
.overlay-button:disabled,
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed !important;
  opacity: 0.55 !important;
  transform: none !important;
}

.danger-button,
.owner-refund-btn:not(:disabled) {
  border-color: color-mix(in srgb, var(--design-danger) 44%, var(--design-border)) !important;
  color: var(--design-danger) !important;
}

input,
select,
textarea,
.admin-input,
.widget-link__input,
.queue-add-row input,
.blacklist-add input,
.blacklist-import textarea,
.news-editor input,
.news-editor textarea,
.news-editor select,
body.admin-page #command-form input,
body.admin-page #command-form textarea,
body.admin-page #news-form input,
body.admin-page #news-form textarea,
body.owner-page .owner-table select {
  border-radius: var(--design-radius-input) !important;
  border: 1px solid var(--design-border) !important;
  background: var(--design-surface) !important;
  color: var(--design-text) !important;
  box-shadow: none !important;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--design-border-strong) !important;
}

.segmented {
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-button) !important;
  background: var(--design-surface-soft);
  padding: 3px;
}

.segmented-button {
  border-radius: calc(var(--design-radius-button) - 2px) !important;
  min-height: 36px;
  background: transparent !important;
  border-color: transparent !important;
}

.segmented-button.is-active,
.segmented-button[aria-pressed="true"] {
  background: var(--design-surface) !important;
  border-color: var(--design-border) !important;
  color: var(--design-text) !important;
}

.admin-status-pill,
.subscription-badge,
.owner-plan,
.track-card__position,
.track-card__duration {
  border-radius: var(--design-radius-button) !important;
}

body.admin-page .admin-layout {
  background: transparent !important;
}

body.admin-page .admin-sidebar {
  background: var(--design-surface) !important;
  border-right: 1px solid var(--design-border) !important;
  box-shadow: none !important;
}

body.admin-page .admin-sidebar-title,
body.admin-page .admin-page-title,
body.owner-page .owner-header h1 {
  color: var(--design-text) !important;
  letter-spacing: 0;
}

body.admin-page .admin-nav a {
  border-radius: var(--design-radius-button) !important;
  color: var(--design-muted) !important;
  background: transparent !important;
}

body.admin-page .admin-nav a:hover,
body.admin-page .admin-nav a.active,
body.dark.admin-page .admin-nav a:hover,
body.dark.admin-page .admin-nav a.active {
  background: var(--design-surface-soft) !important;
  color: var(--design-text) !important;
}

body.admin-page .admin-nav a.active::before {
  background: var(--design-accent) !important;
  border-radius: 2px;
}

body.admin-page .admin-content-inner,
body.owner-page .owner-shell {
  width: min(100%, 1360px);
}

body.admin-page .admin-page-intro,
body.owner-page .owner-header {
  max-width: none;
}

body.admin-page .admin-page-title,
body.owner-page .owner-header h1 {
  font-size: clamp(1.9rem, 2.8vw, 3.2rem);
  line-height: 1.05;
}

body.admin-page .admin-page-kicker {
  border-radius: var(--design-radius-button);
  background: var(--design-surface-soft);
  color: var(--design-accent);
}

body.admin-page .admin-page-description,
body.owner-page .owner-header p,
.admin-section-note,
.admin-kpi-meta,
.subscription-price-meta,
.subscription-note,
.owner-table td span {
  color: var(--design-muted) !important;
}

body.owner-page .owner-table th,
body.owner-page .owner-table td {
  border-bottom-color: var(--design-border);
}

.page-hero-title,
.page-hero-desc {
  letter-spacing: 0;
}

.theme-toggle,
.menu-toggle,
.sidebar-toggle-btn,
.admin-mobile-menu-toggle,
.admin-theme-toggle {
  border-radius: var(--design-radius-button) !important;
  background: var(--design-surface-soft) !important;
  border: 1px solid var(--design-border) !important;
}

.theme-toggle:hover,
.menu-toggle:hover,
.sidebar-toggle-btn:hover,
.admin-mobile-menu-toggle:hover,
.admin-theme-toggle:hover {
  background: var(--design-surface) !important;
  box-shadow: var(--design-shadow-focus) !important;
}

@media (max-width: 900px) {
  body.admin-page .admin-sidebar,
  body.admin-page .admin-sidebar.collapsed {
    background: var(--design-surface) !important;
    border-right: 1px solid var(--design-border) !important;
    border-radius: 0 !important;
  }
}

/* Product landing */
body.index-page {
  --design-bg: #f8fafc;
  --design-surface: #ffffff;
  --design-surface-soft: #f1f5f9;
  --design-border: #e2e8f0;
  --design-text: #0f172a;
  --design-muted: #64748b;
  --design-accent: #0b7a88;
  --design-accent-hover: #09636e;
  --design-on-accent: #ffffff;
  --design-radius-card: 12px;
  --design-radius-button: 8px;
  --design-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  --design-shadow-glow: 0 0 30px rgba(11, 122, 136, 0.06);

  background: radial-gradient(circle at 50% 0%, rgba(11, 122, 136, 0.04), transparent 50%), var(--design-bg) !important;
  color: var(--design-text) !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

html[data-theme="dark"] body.index-page,
body.dark.index-page {
  --design-bg: #070a13;
  --design-surface: rgba(15, 23, 42, 0.65);
  --design-surface-soft: rgba(255, 255, 255, 0.03);
  --design-border: rgba(255, 255, 255, 0.08);
  --design-text: #f8fafc;
  --design-muted: #94a3b8;
  --design-accent: #22c7d8;
  --design-accent-hover: #3ed2e0;
  --design-on-accent: #0f172a;
  --design-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --design-shadow-glow: 0 0 40px rgba(34, 199, 216, 0.12);

  background: radial-gradient(circle at 50% 0%, rgba(34, 199, 216, 0.09), transparent 60%), var(--design-bg) !important;
}

body.index-page *,
body.index-page *::before,
body.index-page *::after {
  --paper-page-bg: none;
  --paper-underline-image: none;
}

body.index-page::before,
body.index-page::after,
body.index-page .page-wrapper::before,
body.index-page .page-wrapper::after,
body.index-page .page-main::before,
body.index-page .page-main::after,
body.index-page .footer::before,
body.index-page .footer::after,
body.index-page .nav-links a::after,
body.index-page .nav-links a::before,
body.index-page .footer-social-link::before,
body.index-page .footer-social-link::after {
  content: none !important;
  display: none !important;
}

/* Base structural layout overrides */
body.index-page .page-wrapper,
body.index-page .page-main {
  width: 100% !important;
  max-width: none !important;
  min-height: auto !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.index-page .page-main {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem) !important;
}

body.index-page .product-home {
  width: min(1200px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  gap: clamp(3rem, 8vw, 7rem) !important;
}

/* Navigation overrides */
body.index-page .header-inner {
  justify-content: flex-end;
}

body.index-page .nav-links {
  margin-left: 0;
}

body.index-page .nav-links a {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  color: var(--design-muted) !important;
  background: transparent !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--design-radius-button) !important;
  transition: all 0.25s ease !important;
}

body.index-page .nav-links a:hover {
  color: var(--design-text) !important;
  background: var(--design-surface-soft) !important;
}

/* Gradients and Text */
body.index-page .gradient-text {
  background: linear-gradient(135deg, var(--design-accent) 0%, #f472b6 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* Hero Section */
body.index-page .product-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: clamp(3rem, 6vw, 5rem);
  padding: clamp(5rem, 9vw, 7.5rem) 0 clamp(2rem, 4vw, 3.5rem);
}

body.index-page .product-hero__copy {
  display: grid;
  gap: 1.5rem;
}

body.index-page .product-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  vertical-align: middle;
  width: fit-content;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--design-accent) 20%, var(--design-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--design-accent) 8%, var(--design-surface));
  color: var(--design-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.index-page .product-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: left;
}

body.index-page .product-footnote {
  margin: -0.8rem 0 0;
  color: var(--design-muted);
  font-size: 0.85rem;
}

body.index-page .product-lead {
  margin: 0;
  color: var(--design-muted);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.6;
}

/* Buttons */
body.index-page .product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

body.index-page .login-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--design-radius-button);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

body.index-page .login-button--primary {
  background: #9146ff;
  color: #ffffff;
}

body.index-page .login-button--primary:hover {
  background: #772ce8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(145, 70, 255, 0.25);
}

body.index-page .login-button--ghost {
  background: var(--design-surface);
  border-color: var(--design-border);
  color: var(--design-text);
  box-shadow: var(--design-shadow);
}

body.index-page .login-button--ghost:hover {
  background: var(--design-surface-soft);
  border-color: color-mix(in srgb, var(--design-accent) 30%, var(--design-border));
  color: var(--design-accent);
  transform: translateY(-2px);
}

/* Flow Demo Box */
body.index-page .flow-demo {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow), var(--design-shadow-glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

body.index-page .flow-demo__steps {
  display: grid;
  gap: 0.5rem;
}

body.index-page .flow-demo__step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.75rem;
  align-items: center;
  min-height: 38px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  color: var(--design-muted);
  animation: flowStepState 12s infinite;
}

body.index-page .flow-demo__step span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--design-surface-soft);
  color: var(--design-muted);
  font-size: 0.75rem;
  font-weight: 700;
  animation: flowStepDotState 12s infinite;
}

body.index-page .flow-demo__step strong {
  font-size: 0.9rem;
}

body.index-page .flow-demo__step--two,
body.index-page .flow-demo__step--two span {
  animation-delay: -8s;
}

body.index-page .flow-demo__step--three,
body.index-page .flow-demo__step--three span {
  animation-delay: -4s;
}

body.index-page .flow-demo__progress {
  height: 3px;
  background: var(--design-surface-soft);
  border-radius: 2px;
  overflow: hidden;
}

body.index-page .flow-demo__progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: var(--design-accent);
  animation: flowProgress 12s linear infinite;
}

body.index-page .flow-demo__stage {
  position: relative;
  min-height: 210px;
}

body.index-page .flow-demo__panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  animation: flowPanelState 12s infinite;
}

body.index-page .flow-demo__panel--two {
  animation-delay: 4s;
}

body.index-page .flow-demo__panel--three {
  animation-delay: 8s;
}

body.index-page .flow-demo__panel h3 {
  margin: 0;
  color: var(--design-text);
  font-size: 1.25rem;
  font-weight: 700;
}

body.index-page .flow-demo__panel p {
  margin: 0;
  color: var(--design-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

body.index-page .flow-demo__chat,
body.index-page .flow-demo__generate,
body.index-page .flow-demo__wave {
  border: 1px solid var(--design-border);
  border-radius: 8px;
  background: var(--design-surface-soft);
  padding: 0.75rem 1rem;
}

body.index-page .flow-demo__chat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: monospace;
  font-size: 0.85rem;
}

body.index-page .flow-demo__chat strong {
  color: var(--design-accent);
}

body.index-page .flow-demo__chat code {
  color: var(--design-text);
}

body.index-page .flow-demo__generate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

body.index-page .flow-demo__voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--design-muted);
}

body.index-page .flow-demo__voice span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--design-accent);
  color: var(--design-on-accent);
  font-weight: 700;
}

body.index-page .flow-demo__equalizer,
body.index-page .flow-demo__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 38px;
}

body.index-page .flow-demo__equalizer i,
body.index-page .flow-demo__wave i {
  flex: 1;
  min-width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--design-accent);
}

body.index-page .flow-demo__equalizer i {
  animation: flowEqualizer 0.8s ease-in-out infinite;
}

body.index-page .flow-demo__wave i {
  background: linear-gradient(to top, var(--design-accent), #ec4899);
  animation: flowEqualizer 1.2s ease-in-out infinite;
}

body.index-page .flow-demo__equalizer i:nth-child(2n),
body.index-page .flow-demo__wave i:nth-child(2n) { animation-delay: -0.2s; }
body.index-page .flow-demo__equalizer i:nth-child(3n),
body.index-page .flow-demo__wave i:nth-child(3n) { animation-delay: -0.4s; }
body.index-page .flow-demo__equalizer i:nth-child(4n),
body.index-page .flow-demo__wave i:nth-child(4n) { animation-delay: -0.6s; }

/* Metrics Strip */
body.index-page .product-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

body.index-page .metric-card {
  padding: 1.25rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  text-align: center;
  transition: transform 0.25s ease;
}

body.index-page .metric-card:hover {
  transform: translateY(-2px);
}

body.index-page .metric-card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

body.index-page .metric-card span {
  font-size: 0.9rem;
  color: var(--design-muted);
}

/* Sections Base */
body.index-page .product-section {
  display: grid;
  gap: 2rem;
  scroll-margin-top: 100px;
}

body.index-page .product-section__intro {
  display: grid;
  gap: 0.5rem;
}

body.index-page .product-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Voices Library showcase */
body.index-page .voice-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

body.index-page .voice-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

body.index-page .voice-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--design-accent) 40%, var(--design-border));
  box-shadow: var(--design-shadow), 0 10px 30px color-mix(in srgb, var(--design-accent) 8%, transparent);
}

body.index-page .voice-card__tag {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--design-surface-soft);
  color: var(--design-accent);
}

body.index-page .voice-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

body.index-page .voice-card__quote {
  margin: 0;
  font-size: 0.88rem;
  color: var(--design-muted);
  line-height: 1.48;
  font-style: italic;
  flex-grow: 1;
}

body.index-page .voice-card__wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  opacity: 0.15;
  transition: opacity 0.3s;
}

body.index-page .voice-card.playing .voice-card__wave {
  opacity: 1;
}

body.index-page .voice-card__wave span {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--design-accent);
  transition: height 0.1s ease;
}

body.index-page .voice-card.playing .voice-card__wave span {
  animation: voiceWave 1s ease-in-out infinite;
}

body.index-page .voice-card.playing .voice-card__wave span:nth-child(1) { animation-delay: 0.1s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(2) { animation-delay: 0.3s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(3) { animation-delay: 0.05s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(4) { animation-delay: 0.4s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(5) { animation-delay: 0.2s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(6) { animation-delay: 0.15s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(7) { animation-delay: 0.35s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(8) { animation-delay: 0.08s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(9) { animation-delay: 0.25s; }
body.index-page .voice-card.playing .voice-card__wave span:nth-child(10) { animation-delay: 0.12s; }

body.index-page .voice-card .login-button {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1rem;
}

/* Features Grid */
body.index-page .feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

body.index-page .feature-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  transition: transform 0.25s ease;
}

body.index-page .feature-card:hover {
  transform: translateY(-2px);
}

body.index-page .feature-card i {
  font-size: 1.75rem;
  color: var(--design-accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

body.index-page .feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

body.index-page .feature-card span {
  font-size: 0.9rem;
  color: var(--design-muted);
  line-height: 1.5;
}

/* Pricing Section */
body.index-page .pricing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

body.index-page .pricing-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.25rem 2rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  position: relative;
  transition: all 0.25s ease;
}

body.index-page .pricing-card:hover {
  transform: translateY(-4px);
}

body.index-page .pricing-card.is-featured {
  border-color: var(--design-accent);
  box-shadow: var(--design-shadow), var(--design-shadow-glow);
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--design-accent) 6%, transparent), transparent 40%), var(--design-surface);
}

body.index-page .pricing-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.6rem;
  background: var(--design-accent);
  color: var(--design-on-accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
}

body.index-page .pricing-card__header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 750;
}

body.index-page .pricing-card__header .price {
  margin: 0.5rem 0;
}

body.index-page .pricing-card__header strong {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--design-text);
}

body.index-page .pricing-card__header span {
  font-size: 1rem;
  color: var(--design-muted);
  margin-left: 0.25rem;
}

body.index-page .pricing-card__header p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--design-muted);
}

body.index-page .pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  flex-grow: 1;
}

body.index-page .pricing-card__features li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--design-text);
}

body.index-page .pricing-card__features li i {
  color: var(--design-accent);
  font-size: 0.85rem;
}

body.index-page .pricing-card .login-button {
  width: 100%;
  justify-content: center;
}

body.index-page .pricing-note {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--design-muted);
}

/* FAQ Accordions */
body.index-page .faq-list {
  display: grid;
  gap: 0.75rem;
}

body.index-page .faq-card {
  border: 1px solid var(--design-border);
  border-radius: 10px;
  background: var(--design-surface);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--design-shadow);
  transition: all 0.25s ease;
}

body.index-page .faq-card[open] {
  border-color: color-mix(in srgb, var(--design-accent) 30%, var(--design-border));
}

body.index-page .faq-card summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}

body.index-page .faq-card summary::-webkit-details-marker {
  display: none;
}

body.index-page .faq-card summary i {
  color: var(--design-muted);
  font-size: 0.9rem;
  transition: transform 0.25s ease;
}

body.index-page .faq-card[open] summary i {
  transform: rotate(180deg);
  color: var(--design-accent);
}

body.index-page .faq-card p {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--design-muted);
  line-height: 1.55;
}

/* Footer Section */
.footer {
  margin-top: clamp(4rem, 8vw, 8rem) !important;
  padding: clamp(3.5rem, 6vw, 6rem) 0 2.5rem !important;
  border-top: 1px solid var(--design-border, rgba(255, 255, 255, 0.08)) !important;
  background: #090d16 !important;
  color: #edf3ff !important;
  box-shadow: none !important;
}

.product-footer {
  width: min(1200px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 1.1fr 1.9fr !important;
  gap: clamp(2rem, 5vw, 4rem) !important;
}

.product-footer__brand {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.product-footer__brand strong {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.product-footer__brand p {
  margin: 0;
  color: rgba(241, 245, 249, 0.7);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 300px;
}

.product-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.product-footer__nav div {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.product-footer__nav h2 {
  margin: 0 0 0.25rem;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left !important;
}

.product-footer__nav a,
.product-footer__bottom a,
.product-footer__bottom span {
  color: rgba(241, 245, 249, 0.7) !important;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-footer__nav a:hover,
.product-footer__bottom a:hover {
  color: #ffffff !important;
}

.product-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Animations */
@keyframes flowStepState {
  0%, 30% { background: var(--design-surface-soft); color: var(--design-text); }
  31%, 100% { background: transparent; color: var(--design-muted); }
}

@keyframes flowStepDotState {
  0%, 30% { background: var(--design-accent); color: var(--design-on-accent); }
  31%, 100% { background: var(--design-surface-soft); color: var(--design-muted); }
}

@keyframes flowPanelState {
  0%, 30% { opacity: 1; transform: translateY(0); pointer-events: auto; }
  34%, 100% { opacity: 0; transform: translateY(8px); pointer-events: none; }
}

@keyframes flowProgress {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes flowEqualizer {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@keyframes voiceWave {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

/* Voice List Page Styling */
body.voice-list-body {
  --design-bg: #f8fafc;
  --design-surface: #ffffff;
  --design-surface-soft: #f1f5f9;
  --design-border: #e2e8f0;
  --design-text: #0f172a;
  --design-muted: #64748b;
  --design-accent: #0b7a88;
  --design-accent-hover: #09636e;
  --design-on-accent: #ffffff;
  --design-radius-card: 12px;
  --design-radius-button: 8px;
  --design-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);

  background: radial-gradient(circle at 50% 0%, rgba(11, 122, 136, 0.04), transparent 50%), var(--design-bg) !important;
  color: var(--design-text) !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

html[data-theme="dark"] body.voice-list-body,
body.dark.voice-list-body {
  --design-bg: #070a13;
  --design-surface: rgba(15, 23, 42, 0.65);
  --design-surface-soft: rgba(255, 255, 255, 0.03);
  --design-border: rgba(255, 255, 255, 0.08);
  --design-text: #f8fafc;
  --design-muted: #94a3b8;
  --design-accent: #22c7d8;
  --design-accent-hover: #3ed2e0;
  --design-on-accent: #0f172a;
  --design-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

  background: radial-gradient(circle at 50% 0%, rgba(34, 199, 216, 0.09), transparent 60%), var(--design-bg) !important;
}

body.voice-list-body::before,
body.voice-list-body::after,
body.voice-list-body .page-wrapper::before,
body.voice-list-body .page-wrapper::after,
body.voice-list-body .page-main::before,
body.voice-list-body .page-main::after {
  content: none !important;
  display: none !important;
}

body.voice-list-body .page-main {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem) !important;
}

body.voice-list-body .voice-list-page {
  width: min(1340px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

body.voice-list-body .voice-list-hero {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  padding: clamp(2rem, 5vw, 3.5rem) 0 0.5rem;
}

body.voice-list-body .voice-list-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 850;
  line-height: 1.08;
  color: var(--design-text);
  margin: 0;
}

body.voice-list-body .voice-list-hero p {
  color: var(--design-muted);
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.55;
  margin: 0;
}

body.voice-list-body .accent-text {
  color: var(--design-accent);
}

body.voice-list-body .accent-code {
  color: var(--design-accent);
  background: var(--design-surface-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

body.voice-list-body .voice-stats-strip {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--design-muted);
  flex-wrap: wrap;
}

body.voice-list-body .stats-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.voice-list-body .stats-badge i {
  color: var(--design-accent);
}

body.voice-list-body .text-highlight {
  color: var(--design-text);
  font-weight: 700;
}

/* Trending Section Styling */
body.voice-list-body .trending-section {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

body.voice-list-body .trending-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.voice-list-body .trending-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.voice-list-body .trending-icon-wrapper {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(34, 199, 216, 0.12);
}

html[data-theme="light"] body.voice-list-body .trending-icon-wrapper {
  background: rgba(11, 122, 136, 0.08);
}

body.voice-list-body .trending-icon-wrapper i {
  font-size: 0.9rem;
}

body.voice-list-body .trending-header h2 {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--design-text);
  margin: 0;
}

body.voice-list-body .trending-time-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--design-muted);
  background: var(--design-surface-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

body.voice-list-body .trending-divider-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(to right, var(--design-border), transparent);
}

body.voice-list-body .trending-carousel {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

body.voice-list-body .trending-carousel::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

body.voice-list-body .trending-card {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 80px;
  flex-shrink: 0;
  padding: 0;
  transition: all 0.2s ease;
}

body.voice-list-body .trending-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--design-surface-soft);
  border: 1px solid var(--design-border);
  transition: all 0.2s ease;
}

body.voice-list-body .trending-card:hover .trending-avatar-wrapper {
  border-color: var(--design-accent);
  box-shadow: 0 0 10px rgba(34, 199, 216, 0.25);
  transform: translateY(-2px);
}

html[data-theme="light"] body.voice-list-body .trending-card:hover .trending-avatar-wrapper {
  box-shadow: 0 0 10px rgba(11, 122, 136, 0.15);
}

body.voice-list-body .trending-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.voice-list-body .trending-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ffffff;
  font-size: 1.5rem;
}

body.voice-list-body .trending-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #ffffff;
  font-size: 1.2rem;
}

body.voice-list-body .trending-card:hover .trending-play-overlay,
body.voice-list-body .trending-card.playing .trending-play-overlay {
  opacity: 1;
}

body.voice-list-body .trending-card.playing .trending-play-overlay {
  background: rgba(239, 68, 68, 0.6);
}

body.voice-list-body .trending-rank-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

body.voice-list-body .trending-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--design-text);
  margin: 6px 0 2px;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.voice-list-body .trending-plays {
  font-size: 0.65rem;
  color: var(--design-muted);
  margin: 0;
  text-align: center;
}

/* Controls section */
body.voice-list-body .voice-controls-section {
  display: grid;
  gap: 1rem;
}

body.voice-list-body .search-filter-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

body.voice-list-body .search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

body.voice-list-body .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--design-muted);
  font-size: 0.85rem;
}

body.voice-list-body #search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.3rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-button);
  background: var(--design-surface-soft);
  color: var(--design-text);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

body.voice-list-body #search-input:focus {
  border-color: color-mix(in srgb, var(--design-accent) 40%, var(--design-border));
  box-shadow: 0 0 8px rgba(34, 199, 216, 0.15);
}

body.voice-list-body .sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--design-muted);
}

body.voice-list-body #sort-select {
  padding: 0.65rem 1.75rem 0.65rem 0.65rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-button);
  background: var(--design-surface-soft);
  color: var(--design-text);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.9rem;
}

body.voice-list-body .category-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
}

body.voice-list-body .category-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--design-muted);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.voice-list-body .category-tab:hover {
  color: var(--design-text);
  background: var(--design-surface-soft);
}

body.voice-list-body .category-tab.active {
  background: color-mix(in srgb, var(--design-accent) 12%, var(--design-surface));
  border-color: color-mix(in srgb, var(--design-accent) 24%, var(--design-border));
  color: var(--design-accent);
}

body.voice-list-body .count-divider-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

body.voice-list-body .count-text {
  font-size: 0.8rem;
  color: var(--design-muted);
  font-weight: 600;
  white-space: nowrap;
}

body.voice-list-body .count-fading-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(to right, var(--design-border), transparent);
}

/* Voices grid premium */
body.voice-list-body .voice-grid-premium {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

body.voice-list-body .voice-card-premium {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  transition: all 0.25s ease;
  position: relative;
}

body.voice-list-body .voice-card-premium:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--design-accent) 30%, var(--design-border));
  box-shadow: var(--design-shadow), 0 6px 15px rgba(34, 199, 216, 0.06);
}

html[data-theme="light"] body.voice-list-body .voice-card-premium:hover {
  box-shadow: var(--design-shadow), 0 6px 15px rgba(11, 122, 136, 0.04);
}

body.voice-list-body .voice-avatar-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--design-surface-soft);
  border: 1px solid var(--design-border);
  flex-shrink: 0;
}

body.voice-list-body .voice-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.voice-list-body .voice-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

body.voice-list-body .avatar-standard {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

body.voice-list-body .avatar-games {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

body.voice-list-body .avatar-anime {
  background: linear-gradient(135deg, #db2777, #f43f5e);
}

body.voice-list-body .avatar-celebrities {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

body.voice-list-body .avatar-meme {
  background: linear-gradient(135deg, #059669, #10b981);
}

body.voice-list-body .voice-details {
  flex-grow: 1;
  min-width: 0;
}

body.voice-list-body .voice-details h3 {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--design-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

body.voice-list-body .voice-command {
  font-size: 0.72rem;
  color: var(--design-muted);
  margin-bottom: 0.15rem;
  text-align: left;
}

body.voice-list-body .voice-command code {
  background: var(--design-surface-soft);
  padding: 0.05rem 0.2rem;
  border-radius: 3px;
  font-family: monospace;
}

body.voice-list-body .voice-meta-stats {
  font-size: 0.68rem;
  color: var(--design-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
}

body.voice-list-body .meta-stat-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

body.voice-list-body .meta-stat-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--design-muted);
  opacity: 0.5;
}

body.voice-list-body .voice-card-play {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--design-border);
  background: var(--design-surface-soft);
  color: var(--design-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

body.voice-list-body .voice-card-play:hover {
  background: var(--design-accent);
  border-color: var(--design-accent);
  color: var(--design-on-accent);
}

body.voice-list-body .voice-card-premium.playing .voice-card-play {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Mini Sound Equalizer inside Playing Card */
body.voice-list-body .mini-equalizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  margin-top: 0.2rem;
}

body.voice-list-body .voice-card-premium.playing .mini-equalizer {
  display: flex;
}

body.voice-list-body .mini-equalizer span {
  width: 2px;
  background: var(--design-accent);
  border-radius: 1px;
  animation: miniEqua 0.8s ease-in-out infinite alternate;
}

body.voice-list-body .mini-equalizer span:nth-child(1) { height: 3px; animation-delay: 0.1s; }
body.voice-list-body .mini-equalizer span:nth-child(2) { height: 7px; animation-delay: 0.3s; }
body.voice-list-body .mini-equalizer span:nth-child(3) { height: 9px; animation-delay: 0.0s; }
body.voice-list-body .mini-equalizer span:nth-child(4) { height: 5px; animation-delay: 0.4s; }
body.voice-list-body .mini-equalizer span:nth-child(5) { height: 3px; animation-delay: 0.2s; }

@keyframes miniEqua {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Custom section panel styling */
body.voice-list-body .custom-info-section {
  margin-top: 0.5rem;
  border-top: 1px solid var(--design-border);
  padding-top: 2rem;
}

body.voice-list-body .voice-custom-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

body.voice-list-body .custom-info-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--design-border);
  border-radius: var(--design-radius-card);
  background: var(--design-surface);
  box-shadow: var(--design-shadow);
  transition: transform 0.2s ease;
}

body.voice-list-body .custom-info-card:hover {
  transform: translateY(-2px);
}

body.voice-list-body .info-icon {
  font-size: 1.5rem;
  color: var(--design-accent);
}

body.voice-list-body .custom-info-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--design-muted);
  line-height: 1.45;
  margin: 0;
  flex-grow: 1;
}

body.voice-list-body .voice-list-grid code {
  font-family: monospace;
  font-size: 0.82rem;
  padding: 0.15rem 0.35rem;
  background: var(--design-surface-soft);
  border-radius: 4px;
}

body.voice-list-body .voice-list-grid .login-button {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1rem;
}

body.voice-list-body .voice-custom-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Responsiveness Media Queries */
@media (max-width: 980px) {
  body.index-page .product-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem) 0;
  }

  body.index-page .product-hero__copy {
    justify-items: center;
  }

  body.index-page .product-hero h1,
  body.index-page .product-section h2 {
    text-align: center;
  }

  body.index-page .product-lead {
    margin: 0 auto;
  }

  body.index-page .product-actions {
    justify-content: center;
  }

  body.index-page .flow-demo {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  body.index-page .product-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page .voice-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.index-page .pricing-strip {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

  body.voice-list-body .voice-grid-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.voice-list-body .voice-custom-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.index-page .product-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  body.index-page .product-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  body.index-page .product-actions .login-button {
    width: 100%;
    justify-content: center;
  }

  body.index-page .product-metrics {
    grid-template-columns: 1fr;
  }

  body.index-page .voice-showcase {
    grid-template-columns: 1fr;
  }

  body.index-page .feature-strip {
    grid-template-columns: 1fr;
  }

  .product-footer {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .product-footer__nav {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  body.voice-list-body .voice-grid-premium {
    grid-template-columns: 1fr;
  }

  body.voice-list-body .voice-custom-panel {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.index-page .flow-demo__step,
  body.index-page .flow-demo__step span,
  body.index-page .flow-demo__panel,
  body.index-page .flow-demo__progress span,
  body.index-page .flow-demo__equalizer i,
  body.index-page .flow-demo__wave i,
  body.index-page .voice-card.playing .voice-card__wave span {
    animation: none !important;
  }

  body.index-page .flow-demo__step--one,
  body.index-page .flow-demo__panel--one {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body.index-page .flow-demo__step--one {
    background: var(--design-surface-soft) !important;
    color: var(--design-text) !important;
  }

  body.index-page .flow-demo__step--one span {
    background: var(--design-accent) !important;
    color: var(--design-on-accent) !important;
  }

  body.index-page .flow-demo__panel--two,
  body.index-page .flow-demo__panel--three {
    display: none !important;
  }

  body.index-page .flow-demo__progress span {
    transform: scaleX(1) !important;
  }
}

/* Anti-purple landing polish per design.md */
body.index-page,
body.voice-list-body {
  --design-accent: #0b7a88;
  --design-accent-hover: #075f6a;
  --design-on-accent: #ffffff;
  --design-shadow-focus: 0 0 0 3px rgba(11, 122, 136, 0.18);
}

html[data-theme="dark"] body.index-page,
html[data-theme="dark"] body.voice-list-body,
body.dark.index-page,
body.dark.voice-list-body {
  --design-accent: #22c7d8;
  --design-accent-hover: #63ddeb;
  --design-on-accent: #081018;
}

body.index-page .product-eyebrow,
body.voice-list-body .product-eyebrow,
body.index-page .flow-steps article > span,
body.index-page .voice-showcase article > span,
body.voice-list-body .voice-category__head span,
body.admin-page .admin-page-kicker {
  background: color-mix(in srgb, var(--design-accent) 10%, var(--design-surface)) !important;
  border-color: color-mix(in srgb, var(--design-accent) 24%, var(--design-border)) !important;
  color: var(--design-accent) !important;
}

body.index-page .product-metrics div,
body.index-page .flow-steps article,
body.index-page .voice-showcase article,
body.index-page .feature-strip div,
body.index-page .pricing-strip article,
body.index-page .faq-list details,
body.voice-list-body .voice-list-grid article,
body.voice-list-body .voice-custom-panel > div {
  border-color: var(--design-border) !important;
  background: var(--design-surface) !important;
}

body.index-page .pricing-strip article.is-featured {
  border-color: color-mix(in srgb, var(--design-accent) 42%, var(--design-border)) !important;
  background: color-mix(in srgb, var(--design-accent) 4%, var(--design-surface)) !important;
}

body.index-page .tts-preview__message.is-bot {
  background: color-mix(in srgb, var(--design-accent) 8%, var(--design-surface)) !important;
}

/* Final landing guard: keep legacy paper-page rules from bleeding into home. */
html[data-theme] body.index-page,
html[data-theme] body.index-page.paper-page,
html[data-theme] body.index-page.paper-page.paper-page--home,
body.index-page,
body.index-page.paper-page,
body.index-page.paper-page.paper-page--home,
body.dark.index-page,
body.dark.index-page.paper-page {
  background: var(--design-bg) !important;
  background-color: var(--design-bg) !important;
  background-image: none !important;
  color: var(--design-text) !important;
}

body.index-page .page-wrapper,
body.index-page.paper-page .page-wrapper,
body.index-page .page-main,
body.index-page.paper-page .page-main {
  width: 100% !important;
  max-width: none !important;
  min-height: auto !important;
  margin: 0 !important;
  background: var(--design-bg) !important;
  background-color: var(--design-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.index-page .page-main,
body.index-page.paper-page .page-main {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem) !important;
}

body.index-page .product-home {
  width: min(1340px, calc(100% - 48px)) !important;
  margin: 0 auto !important;
}

/* Unified Glassmorphic Header & Navigation overrides */
body.paper-page .header {
  min-height: 72px !important;
  background: rgba(247, 248, 251, 0.8) !important;
  border-bottom: 1px solid rgba(20, 22, 26, 0.06) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  backdrop-filter: blur(16px) !important;
  display: flex;
  align-items: center;
}

body.paper-page .header-inner {
  min-height: 72px !important;
  padding-block: 0 !important;
  width: min(1340px, calc(100% - 48px)) !important;
  padding-inline: 0 !important;
}

body.dark.paper-page .header,
html[data-theme="dark"] body.paper-page .header {
  background: rgba(17, 19, 24, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Align logo height for modern aesthetic */
body.paper-page .logo-image {
  width: auto !important;
  height: 32px !important;
}

/* Adjust header alignment offsets */
body.paper-page .logo {
  top: 0 !important;
}

body.paper-page .nav-links a {
  font-size: 0.95rem !important;
  padding: 0.5rem 1rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 600 !important;
}

body.paper-page .nav-links a::after,
body.paper-page .nav-links a::before {
  display: none !important;
  content: none !important;
}

/* Micro-copy registration trust indicators */
body.index-page .login-micro-copy {
  margin-top: 0.85rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--design-muted);
  display: block;
  opacity: 0.8;
}

@media (max-width: 980px) {
  body.index-page .login-micro-copy {
    text-align: center;
    margin-inline: auto;
  }
}

/* Premium pricing scale & glow styling */
@media (min-width: 981px) {
  body.index-page .pricing-card.is-featured {
    transform: scale(1.03);
    z-index: 10;
  }
}

body.index-page .pricing-card.is-featured {
  border-color: var(--design-accent) !important;
}

html[data-theme="dark"] body.index-page .pricing-card.is-featured,
body.dark.index-page .pricing-card.is-featured {
  box-shadow: 0 0 25px rgba(34, 199, 216, 0.18) !important;
}

html[data-theme="light"] body.index-page .pricing-card.is-featured {
  box-shadow: 0 10px 30px rgba(11, 122, 136, 0.08) !important;
}

/* Custom Header Height for Admin Pages */
@media (min-width: 901px) {
  body.admin-page .admin-shell-header {
    display: none !important;
  }
  body.admin-page .page-wrapper {
    --admin-header-height: 0px !important;
  }
  body.admin-page .page-main {
    padding-top: clamp(1.5rem, 2.5vw, 2.5rem) !important;
  }
}

@media (max-width: 900px) {
  body.admin-page .page-wrapper {
    --admin-header-height: 60px !important;
  }
  body.admin-page .admin-shell-header__inner {
    min-height: 60px !important;
  }
  body.admin-page .page-main {
    padding-top: calc(var(--admin-header-height) + 0.8rem) !important;
  }
}

/* Premium Switch Toggle */
.admin-bot-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.admin-bot-toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--design-text-muted, #888);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--design-surface-soft, rgba(22, 21, 21, 0.08));
  border: 1px solid var(--design-border, rgba(22, 21, 21, 0.12));
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

input:checked + .switch-slider {
  background-color: var(--design-accent, #22c7d8);
  border-color: var(--design-accent, #22c7d8);
}

input:checked + .switch-slider:before {
  transform: translateX(22px);
}

body.dark .switch-slider:before {
  background-color: #e0e0e0;
}

body.dark input:checked + .switch-slider:before {
  background-color: #fff;
}

/* Override all dark theme purple/violet colors with greyish colors */
body.dark.admin-page,
html[data-theme="dark"] body.admin-page {
  --design-bg: #121214 !important;
  --design-surface: #1e1e24 !important;
  --design-surface-soft: #272730 !important;
  --design-border: rgba(255, 255, 255, 0.08) !important;
  --design-accent: #22c7d8 !important;
  --design-text: #e2e4e9 !important;
  --design-muted: #8e929d !important;
}

/* Override purple background of cards, sections and sidebars */
body.dark.admin-page .admin-sidebar,
body.dark.admin-page .admin-sidebar.collapsed {
  background: #18181c !important;
  border-right-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark.admin-page .admin-card,
body.dark.admin-page .admin-section,
body.dark.admin-page .admin-kpi-grid--compact .admin-card,
body.dark.admin-page .control-block,
body.dark.admin-page .command-item,
body.dark.admin-page .command-arguments-close,
body.dark.admin-page .command-argument-row,
body.dark.admin-page .command-variable-helper,
body.dark.admin-page .music-player-card,
body.dark.admin-page .admin-empty-state {
  background: #1c1c22 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e4e9 !important;
}

body.dark.admin-page .admin-table tr:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark.admin-page .admin-sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark.admin-page .admin-theme-toggle {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #e2e4e9 !important;
}

body.dark.admin-page .admin-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

body.dark.admin-page .admin-premium-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark.admin-page .admin-premium-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

body.dark.admin-page .admin-kpi-label,
body.dark.admin-page .admin-kpi-meta,
body.dark.admin-page .admin-event-meta,
body.dark.admin-page .admin-sidebar-title,
body.dark.admin-page .admin-page-description,
body.dark.admin-page .admin-page-kicker {
  color: #8e929d !important;
}

body.dark.admin-page .admin-nav a {
  color: #b0b4be !important;
}

body.dark.admin-page .admin-nav a:hover,
body.dark.admin-page .admin-nav a.active {
  background: #272730 !important;
  color: #ffffff !important;
}

body.dark.admin-page .admin-nav a.active::before {
  background: #22c7d8 !important;
}

/* ==========================================================================
   Admin Panels Redesign - Layout Cleanups (No borders inside borders)
   ========================================================================== */

/* 1. Transparent wrappers instead of nested cards */
body.admin-page .command-surface,
body.admin-page .admin-card .admin-panel,
body.admin-page .admin-card .news-editor,
body.admin-page .admin-card .control-block {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.admin-page .command-surface__header {
  padding: 0.25rem 0 1.25rem !important;
  border-bottom: 1px solid var(--design-border) !important;
  margin-bottom: 1.25rem !important;
}

/* 2. Commands list & expanded form styling */
body.admin-page .command-item {
  border: 0 !important;
  border-bottom: 1px solid var(--design-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  transition: background 0.2s ease !important;
}

body.admin-page .command-item:last-child {
  border-bottom: 0 !important;
}

body.admin-page .command-item:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark.admin-page .command-item:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.admin-page .command-item__panel {
  border: 1px solid var(--design-border) !important;
  background: var(--design-surface-soft) !important;
  border-radius: 8px !important;
  margin: 0.75rem 0 1.25rem !important;
  padding: 1.25rem !important;
}

body.dark.admin-page .command-item__panel {
  background: rgba(255, 255, 255, 0.01) !important;
}

body.admin-page .command-item--draft {
  border: 1px dashed var(--design-accent) !important;
  border-radius: 8px !important;
  background: var(--design-surface-soft) !important;
  padding: 1.25rem !important;
  margin-bottom: 1.25rem !important;
}

body.dark.admin-page .command-item--draft {
  background: rgba(255, 255, 255, 0.01) !important;
}

/* 3. Music queue list & blacklist items */
body.admin-page #admin-track-list li {
  border: 0 !important;
  border-bottom: 1px solid var(--design-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  padding: 1rem 0.5rem !important;
  transition: background 0.2s ease !important;
}

body.admin-page #admin-track-list li:last-child {
  border-bottom: 0 !important;
}

body.admin-page #admin-track-list li:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark.admin-page #admin-track-list li:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.admin-page .blacklist-row {
  border: 0 !important;
  border-bottom: 1px solid var(--design-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.75rem 0.5rem !important;
  transition: background 0.2s ease !important;
}

body.admin-page .blacklist-row:last-child {
  border-bottom: 0 !important;
}

body.admin-page .blacklist-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark.admin-page .blacklist-row:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* 4. 7TV lists */
body.admin-page .seventv-leader-row,
body.admin-page .seventv-history-row {
  border: 0 !important;
  border-bottom: 1px solid var(--design-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.75rem 0.5rem !important;
  transition: background 0.2s ease !important;
}

body.admin-page .seventv-leader-row:last-child,
body.admin-page .seventv-history-row:last-child {
  border-bottom: 0 !important;
}

body.admin-page .seventv-leader-row:hover,
body.admin-page .seventv-history-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.dark.admin-page .seventv-leader-row,
body.dark.admin-page .seventv-history-row {
  background: transparent !important;
  border-color: var(--design-border) !important;
}

body.dark.admin-page .seventv-leader-row:hover,
body.dark.admin-page .seventv-history-row:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* 5. Today KPI Stat boxes on Dashboard */
body.admin-page .admin-today-stat {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0.5rem !important;
}

/* 6. News admin item list rows */
body.admin-page .news-admin-item {
  border: 0 !important;
  border-bottom: 1px solid var(--design-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 1.25rem 0.5rem !important;
  margin-bottom: 0 !important;
}

body.admin-page .news-admin-item:last-child {
  border-bottom: 0 !important;
}

/* Commands admin polish */
body.admin-page .admin-nav-command-icon {
  width: 1.25rem;
  display: inline-flex;
  justify-content: center;
  color: currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

body.admin-page .commands-admin .admin-page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
}

body.admin-page .commands-admin .admin-page-title::before {
  content: "!";
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--design-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
}

body.admin-page .commands-shell {
  border-color: color-mix(in srgb, var(--design-border) 68%, transparent) !important;
}

body.admin-page .commands-shell .command-surface__header {
  border-bottom: 0 !important;
  margin-bottom: 0.55rem !important;
  padding: 0.2rem 0 0.9rem !important;
}

body.admin-page .commands-shell .command-surface__action {
  min-height: 2.35rem;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--design-accent) !important;
  color: var(--design-on-accent, #fff) !important;
  box-shadow: none !important;
  gap: 0.45rem;
}

body.admin-page .commands-shell .command-surface__action::before {
  content: "+";
  position: static !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  opacity: 1 !important;
  transform: none !important;
}

body.admin-page .commands-shell .command-surface__action:hover,
body.admin-page .commands-shell .command-surface__action:focus-visible {
  background: var(--design-accent-hover) !important;
  box-shadow: none !important;
}

body.admin-page .commands-shell .command-item {
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}

body.admin-page .commands-shell .command-item + .command-item {
  margin-top: 0.1rem !important;
}

body.admin-page .commands-shell .command-item__row {
  padding: 0.82rem 0.65rem !important;
  border: 0 !important;
  border-radius: 8px !important;
}

body.admin-page .commands-shell .command-item:hover,
body.admin-page .commands-shell .command-item__row:hover {
  background: color-mix(in srgb, var(--design-accent) 5%, transparent) !important;
}

body.dark.admin-page .commands-shell .command-item:hover,
body.dark.admin-page .commands-shell .command-item__row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.admin-page .commands-shell .command-item__summary {
  grid-template-columns: minmax(0, 1fr) 1.25rem !important;
  gap: 0.34rem 0.85rem !important;
}

body.admin-page .commands-shell .command-item__chevron {
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--design-accent) !important;
  font-size: 1.35rem !important;
  font-weight: 800;
  transition: transform 0.18s ease, color 0.18s ease;
}

body.admin-page .commands-shell .command-item__chevron.is-open {
  transform: rotate(45deg);
}

body.admin-page .commands-shell .command-item__panel {
  border: 0 !important;
  border-radius: 8px !important;
  margin: 0.4rem 0 0.9rem 4.55rem !important;
  padding: 1rem !important;
  background: color-mix(in srgb, var(--design-surface-soft) 82%, transparent) !important;
}

body.dark.admin-page .commands-shell .command-item__panel {
  background: rgba(255, 255, 255, 0.025) !important;
}

body.admin-page .commands-shell .command-item--draft {
  border: 1px dashed color-mix(in srgb, var(--design-accent) 34%, transparent) !important;
  border-radius: 8px !important;
}

/* Auto Functions admin: compact grouped settings per design.md */
body.admin-page .autofunctions-card {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1rem, 1.7vw, 1.35rem) !important;
}

body.admin-page .autofunctions-card__header {
  align-items: flex-start;
  border-bottom: 1px solid var(--design-border);
  margin: 0;
  padding-bottom: 1rem;
}

body.admin-page .autofunctions-card__header .admin-btn {
  flex: 0 0 auto;
}

body.admin-page .autofunctions-form {
  display: grid;
  gap: 1.15rem;
}

body.admin-page .autofunctions-group {
  display: grid;
  gap: 0.7rem;
  border-bottom: 1px solid var(--design-border);
  padding: 0.2rem 0 1.1rem;
}

body.admin-page .autofunctions-group:last-of-type {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

body.admin-page .autofunctions-group__title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

body.admin-page .autofunctions-group__title > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--design-accent) 22%, var(--design-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--design-accent) 9%, var(--design-surface));
  color: var(--design-accent);
}

body.admin-page .autofunctions-group__title h3 {
  margin: 0;
  color: var(--paper-ink);
  font-size: 1.05rem;
  line-height: 1.2;
}

body.dark.admin-page .autofunctions-group__title h3 {
  color: #fff7ff;
}

body.admin-page .autofunctions-group__title p {
  margin: 0.2rem 0 0;
  color: var(--paper-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

body.admin-page .autofunction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.9rem;
  margin-left: 2.9rem;
  padding: 0.82rem 0.55rem;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

body.admin-page .autofunction-row + .autofunction-row {
  border-top: 1px solid color-mix(in srgb, var(--design-border) 72%, transparent);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

body.admin-page .autofunction-row:hover {
  background: color-mix(in srgb, var(--design-accent) 5%, transparent);
}

body.dark.admin-page .autofunction-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

body.admin-page .autofunction-row__main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

body.admin-page .autofunction-row__main strong {
  color: var(--paper-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

body.dark.admin-page .autofunction-row__main strong {
  color: #fff7ff;
}

body.admin-page .autofunction-row__main small {
  color: var(--paper-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

body.admin-page .autofunction-row__meta {
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--design-border) 86%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--design-surface-soft) 82%, transparent);
  color: var(--paper-muted);
  padding: 0.26rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

body.dark.admin-page .autofunction-row__meta {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(240, 232, 255, 0.7);
}

/* Nested switches that depend on a master switch above them. */
body.admin-page .autofunction-row--muted {
  opacity: 0.45;
}

body.admin-page .autofunction-row--muted,
body.admin-page .autofunction-row--muted .autofunction-switch input {
  cursor: not-allowed;
}

/* Inline numeric input inside a row's meta badge (e.g. gift-bomb threshold). */
body.admin-page .autofunction-row__number {
  width: 3.6rem;
  margin: 0 0.2rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid color-mix(in srgb, var(--design-border) 86%, transparent);
  border-radius: 6px;
  background: var(--design-surface);
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  text-align: center;
}

body.dark.admin-page .autofunction-row__number {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Inline access dropdown inside a row's meta badge. */
body.admin-page .autofunction-row__select {
  margin-left: 0.3rem;
  padding: 0.1rem 0.25rem;
  border: 1px solid color-mix(in srgb, var(--design-border) 86%, transparent);
  border-radius: 6px;
  background: var(--design-surface);
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

body.dark.admin-page .autofunction-row__select {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

body.admin-page .autofunction-row__select-label {
  font-weight: 700;
}

/* A note that belongs to the group it sits in, not to the whole form. */
body.admin-page .autofunctions-note--inline {
  margin-top: 0.6rem;
  font-size: 0.82rem;
}

body.admin-page .autofunction-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}

body.admin-page .autofunction-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

body.admin-page .autofunction-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--design-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--design-surface-soft) 86%, #000 4%);
  transition: background 0.18s ease, border-color 0.18s ease;
}

body.admin-page .autofunction-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(17, 24, 39, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

body.admin-page .autofunction-switch input:checked + span {
  border-color: var(--design-accent);
  background: var(--design-accent);
}

body.admin-page .autofunction-switch input:checked + span::after {
  transform: translateX(20px);
}

body.admin-page .autofunction-switch input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--design-accent) 40%, transparent);
  outline-offset: 2px;
}

body.admin-page .autofunctions-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--design-accent) 18%, var(--design-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--design-accent) 7%, var(--design-surface));
  color: var(--paper-muted);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

body.admin-page .autofunctions-note i {
  margin-top: 0.15rem;
  color: var(--design-accent);
}

body.admin-page .autofunctions-actions {
  align-items: center;
  gap: 1rem;
  margin-top: 0;
}

body.admin-page .autofunctions-actions #autofunctions-status {
  margin: 0;
}

@media (max-width: 760px) {
  body.admin-page .autofunctions-card__header {
    align-items: stretch;
  }

  body.admin-page .autofunctions-card__header .admin-btn {
    width: 100%;
    justify-content: center;
  }

  body.admin-page .autofunction-row {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-left: 0;
    padding-inline: 0.25rem;
  }

  body.admin-page .autofunction-row__meta {
    grid-column: 1 / -1;
    width: fit-content;
  }

  body.admin-page .autofunctions-actions {
    align-items: stretch;
  }
}

/* Copy button copied/success state animation */
.copied {
  background: #10B981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-1px) scale(1.02) !important;
  transition: all 0.2s ease !important;
}

/* Active docs menu active border / highlighting on mobile */
@media (max-width: 768px) {
  .docs-nav-item.active a {
    border-left: none !important;
    border-right: 4px solid var(--design-primary, #6366f1) !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
}

/* Card background on empty pages in dark mode */
body.dark .admin-empty-state,
body.dark .widget-settings-card {
  background: rgba(30, 30, 40, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px);
}

body.admin-page .admin-content-inner.activities-admin,
body.admin-page .admin-content-inner.commands-admin,
body.admin-page .admin-content-inner.integrations-admin,
body.admin-page .admin-content-inner:has(.overlay-admin-grid) {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

body.admin-page .activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 1.8vw, 1.4rem);
}

body.admin-page .activity-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 220px;
}

body.admin-page .activity-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
}

body.admin-page .activity-card__body {
  display: grid;
  gap: 0.45rem;
}

body.admin-page .activity-card__body h2 {
  margin: 0;
  font-size: 1.12rem;
}

body.admin-page .activity-card__body p {
  margin: 0;
  color: var(--paper-muted);
}

body.admin-page .activity-card .admin-btn {
  margin-top: auto;
  justify-content: center;
}

body.admin-page .overlay-link-card {
  display: grid;
  gap: 1rem;
}

body.admin-page .overlay-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
}

body.admin-page .overlay-link-row .widget-link__input {
  width: 100%;
  margin: 0;
}

body.admin-page .commands-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.admin-page .commands-shell .command-toolbar {
  margin: 0;
}

body.admin-page .commands-shell .command-panel__layout {
  gap: 1rem;
}

body.admin-page .integration-card,
body.admin-page .integration-form {
  display: grid;
  gap: 1rem;
}

body.admin-modal-open {
  overflow: hidden;
}

body.admin-page .integrations-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
}

body.admin-page .integrations-connected-panel,
body.admin-page .integrations-side-panel {
  display: grid;
  gap: 1rem;
}

body.admin-page .integration-service-list {
  display: grid;
  gap: 0.75rem;
}

body.admin-page .integration-service-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  background: var(--paper-soft);
}

body.admin-page .integration-service-card.is-connected {
  border-color: rgba(34, 197, 94, 0.34);
}

body.admin-page .integration-service-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #ff7a00;
  font-weight: 800;
}

body.admin-page .integration-service-card__body {
  display: grid;
  gap: 0.2rem;
}

body.admin-page .integration-service-card__body h3,
body.admin-page .integration-service-card__body p,
body.admin-page .integrations-side-panel h2 {
  margin: 0;
}

body.admin-page .integration-service-card__body p {
  color: var(--paper-muted);
}

body.admin-page .integration-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--paper-muted);
  background: var(--paper-soft);
  border: 1px solid var(--paper-border);
}

body.admin-page .integration-status-badge.is-connected {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.34);
}

body.admin-page .integration-status-badge.is-disconnected {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

body.admin-page .integration-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

body.admin-page .integration-summary-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  background: var(--paper-soft);
}

body.admin-page .integration-summary-item span,
body.admin-page .integration-help {
  color: var(--paper-muted);
}

body.admin-page .integration-summary-item strong {
  color: var(--paper-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

body.admin-page .integrations-side-actions {
  display: grid;
  grid-template-columns: 1fr;
}

body.admin-page .integration-advanced {
  border-top: 1px solid var(--paper-border);
  padding-top: 0.75rem;
}

body.admin-page .integration-advanced summary {
  cursor: pointer;
  color: var(--paper-muted);
  font-weight: 700;
}

body.admin-page .integration-advanced .integration-form {
  margin-top: 1rem;
}

body.admin-page .integrations-modal[hidden] {
  display: none;
}

body.admin-page .integrations-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

body.admin-page .integrations-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
}

body.admin-page .integrations-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  display: grid;
  gap: 1.2rem;
  padding: 1rem;
  border-radius: 8px;
  color: var(--paper-ink);
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

body.admin-page .integrations-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

body.admin-page .integrations-modal__header h2,
body.admin-page .integrations-modal__group h3 {
  margin: 0;
}

body.admin-page .integrations-modal__group {
  display: grid;
  gap: 0.7rem;
}

body.admin-page .integrations-modal__group h3 {
  color: var(--paper-muted);
  font-size: 0.95rem;
}

body.admin-page .integrations-modal__close {
  border: 0;
  background: transparent;
  color: var(--paper-muted);
  cursor: pointer;
  font-size: 1rem;
}

body.admin-page .integration-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

body.admin-page .integration-provider-grid--streaming {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.admin-page .integration-provider {
  min-height: 38px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.75rem;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

body.admin-page .integration-provider:disabled,
body.admin-page .integration-provider.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.admin-page .integration-provider--twitch { background: #7c3fd6; }
body.admin-page .integration-provider--kick { background: #05b51d; }
body.admin-page .integration-provider--vk { background: #1683f5; }
body.admin-page .integration-provider--ihaq { background: #2098cf; }
body.admin-page .integration-provider--helper { background: #333b83; }
body.admin-page .integration-provider--da { background: #ff7a00; }
body.admin-page .integration-provider--pay { background: #43ad55; }
body.admin-page .integration-provider--x { background: #120019; }
body.admin-page .integration-provider--tourniquet { background: #b7ba43; }

@media (max-width: 720px) {
  body.admin-page .integrations-shell {
    grid-template-columns: 1fr;
  }

  body.admin-page .integration-service-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  body.admin-page .integration-service-card .integration-status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  body.admin-page .integration-provider-grid,
  body.admin-page .integration-provider-grid--streaming {
    grid-template-columns: 1fr;
  }

  body.admin-page .overlay-link-row {
    grid-template-columns: 1fr;
  }
}

/* ================= TTS settings: tabs, filters, user lists ================= */

body.admin-page .tts-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 1.4rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--design-surface-soft) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--design-border) 80%, transparent);
  overflow-x: auto;
}

body.admin-page .tts-tab {
  flex: 1 1 auto;
  white-space: nowrap;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--paper-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.admin-page .tts-tab:hover { color: var(--design-text); }

body.admin-page .tts-tab.is-active {
  background: var(--design-surface);
  color: var(--design-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

body.dark.admin-page .tts-tab.is-active { background: rgba(255, 255, 255, .09); }

body.admin-page .tts-panel[hidden] { display: none; }
body.admin-page .tts-panel .admin-section { margin-bottom: 1.4rem; }

/* One row = one switch plus the sentence that explains it. */
body.admin-page .tts-row,
body.admin-page .tts-master {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
}

body.admin-page .tts-row + .tts-row {
  border-top: 1px solid color-mix(in srgb, var(--design-border) 55%, transparent);
}

body.admin-page .tts-row__main,
body.admin-page .tts-master > span:last-child {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.admin-page .tts-row__main strong,
body.admin-page .tts-master strong { font-weight: 700; }

body.admin-page .tts-row__main small,
body.admin-page .tts-master small {
  color: var(--paper-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

body.admin-page .tts-master strong { font-size: 1.02rem; }

body.admin-page .tts-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 1.2rem;
  margin-top: 0.4rem;
}

body.admin-page .tts-groups.is-muted { opacity: 0.45; }
body.admin-page .tts-groups.is-muted .tts-row { cursor: not-allowed; }

/* Switch, matching the one on the auto-functions page. */
body.admin-page .tts-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}

body.admin-page .tts-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

body.admin-page .tts-switch > span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--design-border) 70%, transparent);
  transition: background .16s ease;
}

body.admin-page .tts-switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s ease;
}

body.admin-page .tts-switch input:checked + span { background: var(--design-accent, #7c5cff); }
body.admin-page .tts-switch input:checked + span::after { transform: translateX(20px); }
body.admin-page .tts-switch input:disabled { cursor: not-allowed; }

/* OBS outputs */
body.admin-page .tts-output {
  padding: 0.9rem 0;
  border-top: 1px solid color-mix(in srgb, var(--design-border) 55%, transparent);
}
body.admin-page .tts-output:first-of-type { border-top: 0; }

body.admin-page .tts-output__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0.55rem; }
body.admin-page .tts-output__head span { color: var(--paper-muted); font-size: 0.82rem; }

body.admin-page .tts-output__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
body.admin-page .tts-output__row .admin-input { flex: 1 1 260px; margin-top: 0; }

body.admin-page .tts-howto { margin-top: 0.9rem; font-size: 0.86rem; }
body.admin-page .tts-howto summary { cursor: pointer; font-weight: 700; }
body.admin-page .tts-howto ol { margin: 0.6rem 0 0; padding-left: 1.2rem; color: var(--paper-muted); }
body.admin-page .tts-howto li { margin-bottom: 0.35rem; }

/* Banned words and user lists */
body.admin-page .tts-banned-add,
body.admin-page .tts-list-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.9rem;
}

body.admin-page .tts-banned-add .admin-input,
body.admin-page .tts-list-add .admin-input { flex: 1 1 220px; margin-top: 0; }

body.admin-page .tts-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.36rem 0.62rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--design-border) 80%, transparent);
  background: color-mix(in srgb, var(--design-surface-soft) 70%, transparent);
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

body.admin-page .tts-list { display: flex; flex-wrap: wrap; gap: 8px; }

body.admin-page .tts-list__empty {
  margin: 0;
  padding: 0.7rem 0;
  color: var(--paper-muted);
  font-size: 0.86rem;
}

body.admin-page .tts-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.34rem 0.4rem 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--design-border) 80%, transparent);
  background: color-mix(in srgb, var(--design-surface-soft) 70%, transparent);
  font-size: 0.84rem;
}

body.admin-page .tts-item__label { font-weight: 700; }
body.admin-page .tts-item__note { color: var(--paper-muted); font-size: 0.75rem; }

body.admin-page .tts-item__remove {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--design-border) 60%, transparent);
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

body.admin-page .tts-item__remove:hover { background: #e2596d; color: #fff; }

body.admin-page .tts-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
