:root {
  --theme-grid-size: 120px;
}

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: 22px;
  --ui-radius-control: 14px;
  --ui-radius-pill: 999px;
  --ui-panel-border: 2px solid var(--panel-outline, #171717);
  --ui-panel-shadow: 4px 4px 0 var(--panel-shadow, rgba(0, 0, 0, 0.12));
  --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: #7c3aed;
  border-color: #c4a7ff;
}

.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 rgba(124, 58, 237, 0.5);
  box-shadow: 4px 4px 0 rgba(36, 20, 57, 0.75);
}

.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: rgba(196, 167, 255, 0.52);
}

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: rgba(125, 94, 194, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.seventv-bar-card__bar {
  width: 100%;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, #9f7aea 0%, #7c3aed 48%, #5b21b6 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 rgba(124, 58, 237, 0.18);
  background: rgba(125, 94, 194, 0.06);
}

.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: #ede9fe;
  color: #281245;
}

.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__total {
  font-weight: 900;
  font-size: 1rem;
}

.seventv-history-row.is-current {
  border-color: rgba(124, 58, 237, 0.38);
}

body.dark .seventv-bar-card__canvas,
body.dark .seventv-leader-row,
body.dark .seventv-history-row {
  background: rgba(61, 34, 95, 0.45);
  border-color: rgba(196, 167, 255, 0.2);
}

body.dark .seventv-leader-row__rank {
  background: #e9d5ff;
  color: #1d102d;
}

@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, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0.06));
  color: #6d3df2;
  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, #9f7aea, #6d3df2); }`r`n.reminder-item__icon--music { background: linear-gradient(180deg, #8b5cf6, #4c1d95); }

.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(27, 14, 44, 0.94);
  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, #8b5cf6 0%, #5b21b6 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 rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.08);
  font-weight: 700;
  line-height: 1.5;
}

body.dark .music-settings-limit {
  border-color: rgba(196, 167, 255, 0.24);
  background: rgba(91, 33, 182, 0.22);
}

@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: #8139f9;
  --paper-purple-end: #5a24b8;
  --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: #7a34f5;
  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, #7a34f5 0%, #5a22b2 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: #642ad4;
  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: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin-left: clamp(0.1rem, 0.45vw, 0.45rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--paper-ink);
}

body.paper-page .theme-toggle--mobile {
  display: none;
}

body.paper-page .nav-links .theme-toggle {
  position: relative;
  top: -0.38rem;
}

body.paper-page .theme-toggle:hover,
body.paper-page .theme-toggle:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
}

body.paper-page .theme-toggle i {
  display: none;
}

body.paper-page .theme-toggle__state {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}

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: grid;
}

body.paper-page .theme-toggle__base,
body.paper-page .theme-toggle__hover {
  grid-area: 1 / 1;
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
}

body.dark.paper-page .theme-toggle__base,
body.dark.paper-page .theme-toggle__hover,
html[data-theme="dark"] body.paper-page .theme-toggle__base,
html[data-theme="dark"] body.paper-page .theme-toggle__hover {
  filter: brightness(0) invert(1);
}

body.paper-page .theme-toggle__hover {
  opacity: 0;
  transition: opacity 0.18s ease;
}

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,
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: var(--paper-page-bg) !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: 100% auto !important;
  background-color: var(--page-bg-tail) !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(--page-bg-tail) !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-color: var(--page-bg-tail) !important;
  background-image: var(--paper-page-bg) !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: 100% auto !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(27, 20, 39, 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 {
    display: none;
  }

  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.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;
  }
}

  @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"] {
    --paper-page-bg: url("/bg/mobile-light.webp");
  }

  html[data-theme="dark"] {
    --paper-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 rgba(122, 52, 245, 0.45);
  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(24, 18, 35, 0.96) !important;
  border: 1px solid rgba(214, 194, 255, 0.14) !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;
  }
}

/* Music console: standalone ergonomics in the existing Geekfreak theme. */
body.admin-page:has(.music-transport-bar) .admin-content {
  padding-bottom: 7.5rem;
}

body.admin-page .music-now-playing {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(22, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(75, 45, 116, 0.1);
}

body.dark.admin-page .music-now-playing {
  border-color: rgba(214, 194, 255, 0.14);
  background: rgba(27, 20, 39, 0.92);
  box-shadow: none;
}

body.admin-page .music-now-playing__media {
  min-width: 0;
  padding: clamp(0.8rem, 1.5vw, 1.15rem);
}

body.admin-page .music-now-playing__media .player-16x9 {
  height: 100%;
  min-height: 260px;
}

body.admin-page .music-now-playing__info {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-left: 1px solid rgba(22, 21, 21, 0.08);
}

body.admin-page .music-now-playing__settings {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

body.dark.admin-page .music-now-playing__info {
  border-left-color: rgba(214, 194, 255, 0.12);
}

body.admin-page .music-now-playing__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
}

body.admin-page .music-settings-integration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(22, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

body.dark.admin-page .music-settings-integration {
  border-color: rgba(214, 194, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

body.admin-page .music-settings-integration .control-hint {
  margin-top: 0.3rem;
}

body.admin-page .music-settings-integration #spotify-connect-btn {
  flex: 0 0 auto;
}

body.admin-page .music-settings-dialog {
  width: min(920px, 100%);
  max-height: min(88vh, 940px);
  padding: 0 !important;
  overflow: hidden;
}

body.admin-page .music-settings-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid rgba(22, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

body.dark.admin-page .music-settings-header {
  border-bottom-color: rgba(214, 194, 255, 0.14);
  background: rgba(27, 20, 39, 0.98);
}

body.admin-page .music-settings-header h2,
body.admin-page .music-settings-header p {
  margin: 0;
}

body.admin-page .music-settings-header h2 {
  font-size: 1.35rem;
}

body.admin-page .music-settings-header p {
  margin-top: 0.35rem;
  color: var(--paper-muted);
  font-size: 0.9rem;
}

body.dark.admin-page .music-settings-header p {
  color: rgba(240, 232, 255, 0.7);
}

body.admin-page .music-settings-close {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

body.admin-page .music-settings-sections {
  max-height: calc(min(88vh, 940px) - 154px);
  padding: 0 1.5rem;
  overflow-y: auto;
}

body.admin-page .music-settings-group {
  padding: 1.35rem 0 0.25rem;
}

body.admin-page .music-settings-group + .music-settings-group {
  border-top: 1px solid rgba(22, 21, 21, 0.09);
}

body.dark.admin-page .music-settings-group + .music-settings-group {
  border-top-color: rgba(214, 194, 255, 0.12);
}

body.admin-page .music-settings-section-title {
  margin: 0 0 0.55rem;
  color: var(--paper-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.dark.admin-page .music-settings-section-title {
  color: rgba(220, 203, 255, 0.74);
}

body.admin-page .music-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 1.5rem;
  align-items: center;
  min-height: 82px;
  padding: 0.9rem 0;
}

body.admin-page .music-settings-row + .music-settings-row {
  border-top: 1px solid rgba(22, 21, 21, 0.065);
}

body.dark.admin-page .music-settings-row + .music-settings-row {
  border-top-color: rgba(214, 194, 255, 0.08);
}

body.admin-page .music-settings-row--textarea,
body.admin-page .music-settings-row--blacklist {
  align-items: start;
}

body.admin-page .music-settings-row__info,
body.admin-page .music-settings-row__control {
  min-width: 0;
}

body.admin-page .music-settings-row__info .control-hint {
  margin-top: 0.3rem;
  line-height: 1.45;
}

body.admin-page .music-settings-row__control {
  display: flex;
  justify-content: flex-end;
}

body.admin-page .music-settings-number,
body.admin-page .music-settings-text,
body.admin-page .music-settings-textarea,
body.admin-page .music-settings-import textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.68rem 0.8rem;
  border: 1px solid rgba(22, 21, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  font: inherit;
}

body.admin-page .music-settings-number {
  width: 130px;
}

body.admin-page .music-settings-textarea,
body.admin-page .music-settings-import textarea {
  resize: vertical;
}

body.dark.admin-page .music-settings-number,
body.dark.admin-page .music-settings-text,
body.dark.admin-page .music-settings-textarea,
body.dark.admin-page .music-settings-import textarea {
  border-color: rgba(214, 194, 255, 0.16);
  background: rgba(20, 14, 27, 0.92);
  color: #fff7ff;
}

body.admin-page .music-settings-unit-control {
  align-items: center;
  gap: 0.65rem;
}

body.admin-page .music-settings-unit-control > span {
  min-width: 48px;
  color: var(--paper-muted);
  font-size: 0.85rem;
}

body.admin-page .music-settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

body.admin-page .music-settings-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.admin-page .music-settings-switch > span {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(22, 21, 21, 0.22);
  transition: background 0.18s ease;
}

body.admin-page .music-settings-switch > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}

body.admin-page .music-settings-switch input:checked + span {
  background: var(--bs-primary);
}

body.admin-page .music-settings-switch input:checked + span::after {
  transform: translateX(20px);
}

body.admin-page .music-settings-switch input:focus-visible + span {
  outline: 3px solid rgba(122, 52, 245, 0.25);
  outline-offset: 2px;
}

body.admin-page .music-settings-switch b {
  font-size: 0.86rem;
}

body.admin-page .music-settings-row .segmented {
  width: fit-content;
  max-width: 100%;
}

body.admin-page .music-settings-row .segmented-button {
  white-space: nowrap;
}

body.admin-page .music-settings-row .blacklist-add {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

body.admin-page .music-settings-blacklist {
  margin-bottom: 0.8rem;
  border: 1px solid rgba(22, 21, 21, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

body.dark.admin-page .music-settings-blacklist {
  border-color: rgba(214, 194, 255, 0.12);
}

body.admin-page .music-settings-import {
  margin-bottom: 1rem;
}

body.admin-page .music-settings-import summary {
  width: fit-content;
  cursor: pointer;
  color: var(--bs-primary);
  font-weight: 800;
}

body.admin-page .music-settings-import__content {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

body.admin-page .music-settings-import__content .admin-btn {
  width: fit-content;
}

body.admin-page .music-settings-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(22, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

body.dark.admin-page .music-settings-actions {
  border-top-color: rgba(214, 194, 255, 0.14);
  background: rgba(27, 20, 39, 0.98);
}

body.admin-page .music-status-badge {
  width: fit-content;
  padding: 0.32rem 0.58rem;
  border-radius: 6px;
  background: rgba(122, 52, 245, 0.12);
  color: #6728db;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

body.dark.admin-page .music-status-badge {
  background: rgba(168, 132, 255, 0.16);
  color: #eee5ff;
}

body.admin-page .music-requester,
body.admin-page .music-current-sub {
  color: var(--paper-muted);
  font-size: 0.9rem;
}

body.dark.admin-page .music-requester,
body.dark.admin-page .music-current-sub {
  color: rgba(240, 232, 255, 0.72);
}

body.admin-page .music-current-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 2.25vw, 2rem);
  line-height: 1.12;
  text-align: left;
}

body.admin-page .music-current-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

body.admin-page .music-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

body.admin-page .music-action-bar__inputs {
  min-width: 0;
  flex: 1 1 680px;
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(220px, 0.75fr);
  gap: 0.75rem;
}

body.admin-page .music-action-bar__commands {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}

body.admin-page .music-action-bar .admin-btn {
  min-height: 44px;
  border-radius: 8px;
  white-space: nowrap;
}

body.admin-page .music-action-bar #refresh-playlist-btn {
  width: 44px;
  padding: 0;
  justify-content: center;
}

body.admin-page .music-queue-search {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}

body.admin-page .music-queue-search > i {
  position: absolute;
  left: 0.85rem;
  color: var(--paper-muted);
  pointer-events: none;
}

body.admin-page .music-queue-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1px solid rgba(22, 21, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  font: inherit;
}

body.dark.admin-page .music-queue-search input {
  border-color: rgba(214, 194, 255, 0.16);
  background: rgba(20, 14, 27, 0.92);
  color: #fff7ff;
}

body.admin-page .music-queue-section {
  padding: 0;
  overflow: hidden;
}

body.admin-page .music-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(22, 21, 21, 0.08);
}

body.dark.admin-page .music-queue-header {
  border-bottom-color: rgba(214, 194, 255, 0.1);
}

body.admin-page .music-queue-header > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

body.admin-page .music-queue-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

body.admin-page .music-queue-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.admin-page .music-queue-panel #admin-track-list {
  max-height: min(46vh, 520px);
  gap: 0;
}

body.admin-page .music-queue-panel #admin-track-list li {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

body.admin-page .music-queue-panel #admin-track-list li:last-child {
  border-bottom: 0;
}

body.admin-page .music-transport-bar {
  position: fixed;
  left: var(--admin-sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 70;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 2.4vw, 2rem);
  border-top: 1px solid rgba(22, 21, 21, 0.1);
  background: rgba(250, 247, 241, 0.94);
  box-shadow: 0 -12px 36px rgba(52, 34, 75, 0.1);
  backdrop-filter: blur(18px);
}

body.dark.admin-page .music-transport-bar {
  border-top-color: rgba(214, 194, 255, 0.14);
  background: rgba(23, 18, 31, 0.95);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.28);
}

body.admin-page .admin-layout.sidebar-collapsed .music-transport-bar {
  left: var(--admin-sidebar-width-collapsed);
}

body.admin-page .music-transport-bar__volume,
body.admin-page .music-transport-bar__controls,
body.admin-page .music-transport-bar__source {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.admin-page .music-transport-bar__volume input {
  width: min(220px, 22vw);
}

body.admin-page .music-transport-bar__controls {
  justify-content: center;
}

body.admin-page .music-transport-bar__controls .admin-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

body.admin-page .music-transport-bar__controls .music-play-button {
  width: 54px;
  height: 54px;
  border-color: transparent;
  background: var(--bs-primary);
  color: var(--bs-on-primary);
  font-size: 1.05rem;
}

body.admin-page .music-transport-bar__source {
  justify-content: flex-end;
  color: var(--paper-muted);
  font-weight: 700;
}

body.admin-page .music-transport-bar__source i {
  color: #ff0033;
  font-size: 1.2rem;
}

@media (max-width: 1040px) {
  body.admin-page .music-now-playing {
    grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
  }

  body.admin-page .music-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .music-action-bar__inputs {
    width: 100%;
    flex: 1 1 auto;
  }

  body.admin-page .music-action-bar__commands {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  body.admin-page .music-transport-bar,
  body.admin-page .admin-layout.sidebar-collapsed .music-transport-bar {
    left: 0;
  }
}

@media (max-width: 760px) {
  body.admin-page .music-now-playing {
    grid-template-columns: 1fr;
  }

  body.admin-page .music-now-playing__media .player-16x9 {
    min-height: 0;
  }

  body.admin-page .music-now-playing__info {
    border-top: 1px solid rgba(22, 21, 21, 0.08);
    border-left: 0;
  }

  body.admin-page .music-now-playing__settings {
    top: 0.75rem;
    right: 0.75rem;
  }

  body.admin-page .music-now-playing__meta {
    padding-right: 3rem;
  }

  body.admin-page .music-settings-integration {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .music-settings-integration #spotify-connect-btn {
    justify-content: center;
  }

  body.admin-page .music-settings-header {
    padding: 1rem;
  }

  body.admin-page .music-settings-header p {
    display: none;
  }

  body.admin-page .music-settings-sections {
    max-height: calc(88vh - 140px);
    padding: 0 1rem;
  }

  body.admin-page .music-settings-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: stretch;
    padding: 1rem 0;
  }

  body.admin-page .music-settings-row__control {
    justify-content: flex-start;
  }

  body.admin-page .music-settings-text,
  body.admin-page .music-settings-textarea,
  body.admin-page .music-settings-row .blacklist-add {
    width: 100%;
  }

  body.admin-page .music-settings-actions {
    padding: 0.85rem 1rem;
  }

  body.admin-page .music-action-bar__inputs {
    grid-template-columns: 1fr;
  }

  body.admin-page .music-action-bar__commands {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.admin-page .music-queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-page .music-queue-header .admin-btn-danger {
    justify-content: center;
  }

  body.admin-page .music-transport-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 70px;
    padding: 0.55rem 0.75rem;
  }

  body.admin-page .music-transport-bar__source {
    display: none;
  }

  body.admin-page .music-transport-bar__volume input {
    width: min(150px, 30vw);
  }
}

/* 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;
  margin-left: 0;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow-y: visible;
  overflow-x: hidden;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}

body.admin-page .admin-layout.sidebar-collapsed .admin-main {
  margin-left: 0;
}

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(214, 194, 255, 0.12);
  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: rgba(122, 52, 245, 0.22);
  background: rgba(122, 52, 245, 0.08);
}

body.admin-page .admin-theme-toggle:focus-visible {
  outline: 2px solid rgba(122, 52, 245, 0.16);
  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(214, 194, 255, 0.14);
  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(214, 194, 255, 0.14);
}

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: rgba(122, 52, 245, 0.09) !important;
  color: #5f20d3;
}

body.admin-page .admin-nav a.active {
  background: rgba(122, 52, 245, 0.11);
  color: #5f20d3;
}

body.admin-page .admin-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: #7a34f5;
  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: rgba(168, 132, 255, 0.16) !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: rgba(122, 52, 245, 0.1);
  color: #6728db;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.dark.admin-page .admin-page-kicker {
  background: rgba(172, 139, 255, 0.16);
  color: #f0e2ff;
}

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(45, 32, 63, 0.86);
  color: #f7efff;
  border-color: rgba(214, 194, 255, 0.14);
}

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(27, 20, 39, 0.92) !important;
  border-color: rgba(214, 194, 255, 0.14);
  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, 14, 27, 0.92);
  border-color: rgba(214, 194, 255, 0.16);
  color: #fff7ff;
  box-shadow: none;
}

body.admin-page .music-player-card {
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.65fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: stretch;
  min-width: 0;
}

body.admin-page .admin-section--music-player {
  overflow: hidden;
}

body.admin-page .admin-section--music-player .admin-section-header {
  align-items: center;
}

body.admin-page .music-section-heading {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

body.admin-page .music-section-heading .admin-section-note {
  font-size: 0.9rem;
}

body.admin-page .admin-section--music-player .admin-section-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

body.admin-page .admin-section--music-player .admin-btn {
  min-height: 40px;
  border-radius: 8px;
  white-space: nowrap;
}

body.admin-page #spotify-connect-btn i {
  color: #1ed760;
  font-size: 1.05rem;
}

body.admin-page .music-player-left {
  min-width: 0;
}

body.admin-page .player-16x9 {
  overflow: hidden;
  border: 1px solid rgba(22, 21, 21, 0.12);
  border-radius: 8px;
  background: #050507;
}

body.dark.admin-page .player-16x9 {
  border-color: rgba(214, 194, 255, 0.16);
}

body.admin-page .music-controls-right {
  min-width: 0;
  height: 100%;
}

body.admin-page .music-controls-right .control-block {
  height: 100%;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

body.admin-page .music-controls-right .control-label {
  text-align: center;
}

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, 14, 27, 0.72);
  border-color: rgba(214, 194, 255, 0.12);
}

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(27, 20, 39, 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: #6728db;
}

body.admin-page .command-arguments-link:focus-visible {
  outline: 2px solid rgba(122, 52, 245, 0.28);
  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(214, 194, 255, 0.16);
  background: rgba(20, 14, 27, 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(214, 194, 255, 0.12);
  background: rgba(20, 14, 27, 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 rgba(122, 52, 245, 0.16);
  background: rgba(122, 52, 245, 0.08);
  color: #5f20d3;
  font-weight: 800;
}

body.dark.admin-page .command-argument-row code {
  background: rgba(168, 132, 255, 0.14);
  color: #f2eaff;
}

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(180px, 260px);
  grid-template-areas:
    "title volume"
    "meta volume";
  gap: 0.3rem 1.25rem;
  align-items: center;
  padding: 0.15rem 0;
}

body.admin-page .track-title {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
}

body.admin-page .track-sub {
  grid-area: meta;
  min-width: 0;
}

body.admin-page .track-volume-row {
  grid-area: volume;
  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 {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  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, 460px) auto;
  gap: 0.75rem;
  align-items: center;
}

body.admin-page #admin-track-list li {
  grid-template-columns: auto minmax(0, 1fr) 40px;
  border-radius: 8px;
}

body.admin-page #admin-track-list li.empty {
  grid-template-columns: 1fr;
  padding: 1.4rem;
}

body.admin-page #admin-track-list li > .admin-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

@media (max-width: 1100px) {
  body.admin-page .music-player-card {
    grid-template-columns: 1fr;
  }

  body.admin-page .music-controls-right .control-block {
    height: auto;
  }

  body.admin-page .music-controls-right .control-label {
    text-align: left;
  }
}

@media (max-width: 720px) {
  body.admin-page .admin-section--music-player .admin-section-header,
  body.admin-page .admin-section--music-player .admin-section-header__actions,
  body.admin-page .admin-section-header:has(.queue-section-actions) {
    align-items: stretch;
  }

  body.admin-page .admin-section--music-player .admin-section-header__actions {
    justify-content: flex-start;
  }

  body.admin-page .track-meta {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "meta"
      "volume";
    gap: 0.45rem;
  }

  body.admin-page .track-title {
    white-space: normal;
  }

  body.admin-page .queue-section-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  body.admin-page .queue-section-actions .admin-btn-danger {
    justify-content: 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(920px, 100%);
  max-height: min(88vh, 940px);
  padding: 0 !important;
  overflow: hidden;
}

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 .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(214, 194, 255, 0.12);
    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);
  }
}

/* About-style SEO landing page */
html[data-theme="light"] body.about-page {
  --paper-page-bg: url("/bg/desktop-light-medium.webp");
}

html[data-theme="dark"] body.about-page {
  --paper-page-bg: url("/bg/desktop-dark-medium.webp");
}

body.index-page.paper-page .home-stage {
  max-width: 1320px;
  margin-inline: auto;
}

body.index-page.paper-page .home-about {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: stretch;
}

body.index-page.paper-page .home-about__copy,
body.index-page.paper-page .home-about__card {
  border: 1px solid rgba(65, 37, 87, 0.12);
  border-radius: clamp(24px, 2vw, 34px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 54px rgba(48, 27, 70, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.index-page.paper-page .home-about__copy {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

body.index-page.paper-page .home-about__eyebrow {
  margin: 0 0 0.65rem;
  color: #6d27c9;
  font-size: clamp(0.78rem, 0.4vw + 0.7rem, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.index-page.paper-page .home-about h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Itim Cyrillic", "Itim", "Inter", sans-serif;
  font-size: clamp(3rem, 6.7vw, 7rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: #19131f;
  text-wrap: balance;
}

body.index-page.paper-page .home-about__lead {
  max-width: 780px;
  margin: clamp(1.1rem, 2vw, 1.75rem) 0 0;
  font-size: clamp(1.15rem, 0.75vw + 0.95rem, 1.55rem);
  line-height: 1.48;
  color: #2b2132;
}

body.index-page.paper-page .home-about__text {
  max-width: 780px;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 0.45vw + 0.9rem, 1.17rem);
  line-height: 1.65;
  color: rgba(36, 27, 43, 0.76);
}

body.index-page.paper-page .home-about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(1.35rem, 2.5vw, 2rem);
}

body.index-page.paper-page .home-about__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.8rem 1.25rem;
  border: 2px solid #19131f;
  border-radius: 15px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 7px 0 #19131f;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.index-page.paper-page .home-about__button:hover,
body.index-page.paper-page .home-about__button:focus-visible {
  transform: translateY(3px);
  box-shadow: 0 4px 0 #19131f;
}

body.index-page.paper-page .home-about__button--twitch {
  background: #7c3aed;
}

body.index-page.paper-page .home-about__button--youtube {
  background: #e21b16;
}

body.index-page.paper-page .home-about__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  overflow: hidden;
  position: relative;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.23), transparent 24%),
    linear-gradient(145deg, #8c42f5 0%, #5220a7 100%);
}

body.index-page.paper-page .home-about__mark {
  position: absolute;
  top: -0.2em;
  right: -0.05em;
  color: rgba(255, 255, 255, 0.08);
  font-family: "Itim", "Inter", sans-serif;
  font-size: clamp(8rem, 14vw, 13rem);
  line-height: 1;
  pointer-events: none;
}

body.index-page.paper-page .home-about__card-title {
  position: relative;
  margin: 0;
  font-family: "Itim Cyrillic", "Itim", "Inter", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  line-height: 1;
}

body.index-page.paper-page .home-about__handle {
  position: relative;
  margin: 0.45rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  font-weight: 700;
}

body.index-page.paper-page .home-about__facts {
  display: grid;
  gap: 0.85rem;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.index-page.paper-page .home-about__facts li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
}

body.index-page.paper-page .home-about__facts i {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

body.index-page.paper-page .home-socials,
body.index-page.paper-page .home-sections {
  display: grid;
  gap: 1rem;
}

body.index-page.paper-page .home-section-title {
  margin: 0;
  font-family: "Itim Cyrillic", "Itim", "Inter", sans-serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
  color: #19131f;
}

body.dark.index-page.paper-page .home-about__copy {
  border-color: rgba(195, 167, 255, 0.15);
  background: rgba(22, 17, 31, 0.92);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

body.dark.index-page.paper-page .home-about h1,
body.dark.index-page.paper-page .home-section-title {
  color: #ffffff;
}

body.dark.index-page.paper-page .home-about__eyebrow {
  color: #c39bff;
}

body.dark.index-page.paper-page .home-about__lead {
  color: #f3edff;
}

body.dark.index-page.paper-page .home-about__text {
  color: rgba(239, 230, 255, 0.76);
}

@media (max-width: 980px) {
  body.index-page.paper-page .home-about {
    grid-template-columns: 1fr;
  }

  body.index-page.paper-page .home-about__card {
    min-height: 300px;
  }
}

@media (max-width: 620px) {
  body.index-page.paper-page .home-about__copy,
  body.index-page.paper-page .home-about__card {
    border-radius: 22px;
  }

  body.index-page.paper-page .home-about h1 {
    font-size: clamp(2.65rem, 14vw, 4.3rem);
  }

  body.index-page.paper-page .home-about__actions {
    display: grid;
  }

  body.index-page.paper-page .home-about__button {
    width: 100%;
  }

  body.index-page.paper-page .home-about__card {
    min-height: 270px;
  }
}

@media (max-width: 768px) {
  html[data-theme="light"] body.about-page {
    --paper-page-bg: url("/bg/mobile-light.webp");
  }

  html[data-theme="dark"] body.about-page {
    --paper-page-bg: url("/bg/mobile-dark.webp");
  }
}
