html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--app-font-sans);
  font-weight: 600;
  line-height: 1.32;
  color: var(--text);
  min-width: 1200px;
  background:
    radial-gradient(circle at top left, rgba(241, 66, 171, 0.16), transparent 22%),
    radial-gradient(circle at top right, rgba(88, 92, 200, 0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.1), transparent 20%),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

/* ── Global keyboard focus ring ──────────────────────────────────────────
   Baseline indicator for keyboard navigation across the whole app. Uses
   :focus-visible so it never shows on mouse clicks, only on Tab/arrow focus.
   Component-specific :focus rules elsewhere are more specific and still win,
   so this only fills the gaps (plain buttons, links, selects, tabindex els). */
:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, rgba(125, 211, 252, 0.9));
  outline-offset: var(--focus-ring-offset, 2px);
  border-radius: 4px;
}

/* Never expose the legacy/default outline on mouse interaction. */
:focus:not(:focus-visible) {
  outline: none;
}

.shell-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 32%),
    linear-gradient(315deg, rgba(241, 84, 189, 0.06), transparent 42%);
}

.app-shell,
.remote-shell {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 14px;
}

.topbar,
.remote-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.brand-block h1,
.remote-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.45rem);
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

.status-row,
.inline-actions,
.server-actions,
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #7ef0c0;
  font-weight: 700;
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.muted-text {
  color: var(--muted);
}

.card {
  backdrop-filter: blur(14px);
}

.card,
.subtle-card,
.video-stage-card,
.app-dialog {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.card {
  padding: 14px;
}

.subtle-card {
  padding: 14px;
}

.server-panel,
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.server-links {
  display: grid;
  gap: 12px;
  flex: 1;
}

.link-row,
.file-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-input-row,
.category-create-row,
.backup-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-input-row input,
.category-create-row input {
  flex: 1;
}

.category-create-row input {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
}

code {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  overflow: auto;
}

.label {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.toolbar {
  align-items: end;
}

.control-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.control-group.wide {
  flex: 1;
}

.control-group span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.control-group input,
.control-group select,
.control-group textarea,
.file-row input {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.control-group.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.control-group.inline-checkbox input {
  width: 20px;
  min-height: auto;
}

.volume-value {
  align-self: center;
  min-width: 72px;
  text-align: right;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 16px;
}

.sidebar,
.main-panel {
  min-height: 480px;
}

.sidebar-header,
.main-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.sidebar-header h2,
.main-panel-header h2 {
  margin: 0;
}

.main-panel-heading {
  display: grid;
  gap: 6px;
}

.main-panel-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.category-list,
.category-manager-list {
  display: grid;
  gap: 8px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.category-item.active {
  border-color: rgba(241, 84, 189, 0.4);
  background: var(--accent-soft);
}

.category-item[draggable="true"] {
  cursor: grab;
}

.drag-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 38px 18px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.pads-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: 12px;
}

body[data-grid-size="s"] {
  --grid-size: 96px;
  --grid-card-width: 192px;
  --pad-padding: 8px;
  --pad-gap: 8px;
  --pad-radius: 14px;
  --pad-thumb-radius: 12px;
  --pad-title-size: 12px;
  --pad-subtitle-size: 10px;
  --pad-badge-size: 10px;
  --pad-icon-size: 30px;
  --pad-thumb-height: 88px;
  --pad-extra-height: 40px;
}

body[data-grid-size="m"] {
  --grid-size: 148px;
  --grid-card-width: 218px;
  --pad-padding: 9px;
  --pad-gap: 9px;
  --pad-radius: 16px;
  --pad-thumb-radius: 14px;
  --pad-title-size: 13px;
  --pad-subtitle-size: 11px;
  --pad-badge-size: 10px;
  --pad-icon-size: 36px;
  --pad-thumb-height: 102px;
  --pad-extra-height: 46px;
}

body[data-grid-size="l"] {
  --grid-size: 186px;
  --grid-card-width: 244px;
  --pad-padding: 11px;
  --pad-gap: 10px;
  --pad-radius: 18px;
  --pad-thumb-radius: 15px;
  --pad-title-size: 14px;
  --pad-subtitle-size: 12px;
  --pad-badge-size: 11px;
  --pad-icon-size: 42px;
  --pad-thumb-height: 118px;
  --pad-extra-height: 52px;
}

body[data-grid-size="xl"] {
  --grid-size: 224px;
  --grid-card-width: 272px;
  --pad-padding: 12px;
  --pad-gap: 12px;
  --pad-radius: 20px;
  --pad-thumb-radius: 16px;
  --pad-title-size: 15px;
  --pad-subtitle-size: 13px;
  --pad-badge-size: 11px;
  --pad-icon-size: 46px;
  --pad-thumb-height: 136px;
  --pad-extra-height: 58px;
}

body[data-pad-columns="4"] {
  --grid-columns: 4;
}

body[data-pad-columns="6"] {
  --grid-columns: 6;
}

body[data-pad-columns="8"] {
  --grid-columns: 8;
}

body[data-pad-columns="16"] {
  --grid-columns: 16;
}

body[data-pad-columns="32"] {
  --grid-columns: 32;
}

.pad-card {
  position: relative;
  display: grid;
  gap: var(--pad-gap);
  border: 1px solid var(--border);
  border-radius: var(--pad-radius);
  padding: var(--pad-padding);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(241, 84, 189, 0.04), transparent 42%),
    var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  min-height: calc(var(--grid-size) + var(--pad-extra-height));
}

.pad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 28px rgba(2, 2, 10, 0.32);
}

.pad-card[draggable="true"] {
  cursor: grab;
}

.pad-thumb {
  width: 100%;
  height: var(--pad-thumb-height);
  border-radius: var(--pad-thumb-radius);
  object-fit: cover;
  background: linear-gradient(135deg, rgba(241, 84, 189, 0.22), rgba(99, 102, 241, 0.2));
}

.pad-fallback {
  display: grid;
  place-items: center;
  font-size: var(--pad-icon-size);
  width: 100%;
  min-height: var(--pad-thumb-height);
  border-radius: var(--pad-thumb-radius);
  background: linear-gradient(135deg, rgba(241, 84, 189, 0.14), rgba(99, 102, 241, 0.18));
}

.pad-meta {
  display: grid;
  gap: 3px;
}

.pad-title {
  margin: 0;
  font-size: var(--pad-title-size);
  font-weight: 800;
}

.pad-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: var(--pad-subtitle-size);
}

.pad-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pad-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: var(--pad-badge-size);
  font-weight: 700;
}

.segmented-control {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented-control .ghost-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(241, 84, 189, 0.35);
  color: var(--accent-dark);
}

.overlay-preview-frame {
  display: grid;
  gap: 10px;
}

.overlay-preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 4px;
  flex-wrap: wrap;
}

.overlay-preset-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
}

.overlay-preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(100, 120, 160, 0.22);
  background: rgba(100, 120, 160, 0.08);
  color: var(--text-secondary, #c0c8d8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.overlay-preset-btn:hover {
  background: rgba(100, 140, 220, 0.16);
  border-color: rgba(100, 160, 255, 0.32);
  color: #e0eaff;
}

.overlay-preset-btn.is-active {
  background: linear-gradient(135deg, rgba(56, 118, 220, 0.28), rgba(40, 180, 200, 0.14));
  border-color: rgba(80, 160, 255, 0.48);
  color: #ffffff;
  box-shadow:
    0 0 10px rgba(80, 160, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overlay-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overlay-range-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  align-content: start;
}

.overlay-range-head,
.overlay-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.overlay-range-head span {
  font-size: 12px;
  font-weight: 700;
}

.overlay-range-value {
  font-size: 12px;
  font-weight: 800;
}

.overlay-range-card input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.overlay-range-card input[type="number"] {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
}

.overlay-action-card {
  align-content: start;
}

.overlay-action-card .secondary-btn {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-toggle-grid .control-group.inline-checkbox {
  min-height: 34px;
}

.overlay-preview-stage {
  position: relative;
  width: min(100%, 286px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  touch-action: none;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.03)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(15, 23, 42, 0.05) calc(20% - 1px),
      rgba(15, 23, 42, 0.05) 20%
    );
  margin: 0 auto;
}

.overlay-preview-stage::before {
  content: "1080 x 1920";
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  font-size: 10px;
  letter-spacing: 0.08em;
  z-index: 2;
}

.overlay-preview-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 1px),
      rgba(15, 23, 42, 0.12) calc(50% - 1px),
      rgba(15, 23, 42, 0.12) calc(50% + 1px),
      transparent calc(50% + 1px)
    ),
    linear-gradient(
      180deg,
      transparent calc(50% - 1px),
      rgba(15, 23, 42, 0.12) calc(50% - 1px),
      rgba(15, 23, 42, 0.12) calc(50% + 1px),
      transparent calc(50% + 1px)
    );
  pointer-events: none;
}

.overlay-preview-box {
  --overlay-preview-opacity: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(234, 88, 12, 0.8);
  border-radius: 18px;
  background: rgba(234, 88, 12, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: move;
  user-select: none;
  touch-action: none;
  transition:
    left 140ms ease,
    top 140ms ease,
    width 140ms ease,
    height 140ms ease,
    inset 140ms ease,
    transform 140ms ease;
}

.overlay-preview-box.is-interacting {
  transition: none;
}

.overlay-preview-box::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.28), rgba(14, 165, 233, 0.26)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
  opacity: var(--overlay-preview-opacity, 1);
  pointer-events: none;
  transition: opacity 140ms ease;
}

.overlay-preview-box.is-fullscreen-preview {
  inset: 10px;
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto;
  transform: none;
  border-style: dashed;
}

.overlay-preview-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

.overlay-preview-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(234, 88, 12, 0.85));
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
  cursor: nwse-resize;
  z-index: 1;
}

.live-music-overlay-shell {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01)),
    rgba(14, 18, 30, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 16px 40px rgba(0, 0, 0, 0.28);
}

.live-music-overlay-shell .section-title-row {
  align-items: flex-start;
}

.live-music-overlay-shell .music-order-note {
  margin: 6px 0 0;
}

.live-music-overlay-shell .overlay-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(320px, 0.82fr);
  gap: 10px;
  align-items: start;
}

.live-music-overlay-shell .overlay-builder,
.live-music-overlay-shell .overlay-preview-panel,
.live-music-overlay-shell .overlay-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-music-overlay-shell .overlay-preview-control {
  padding: 8px;
}

.live-music-overlay-shell .overlay-group {
  border-radius: 14px;
  border: 1px solid rgba(102, 115, 165, 0.12);
  overflow: hidden;
  background: rgba(10, 13, 20, 0.78);
}

.live-music-overlay-shell .overlay-group-summary {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.live-music-overlay-shell .overlay-group-summary::-webkit-details-marker {
  display: none;
}

.live-music-overlay-shell .overlay-group-summary::after {
  content: "+";
  position: absolute;
  top: 10px;
  right: 12px;
  color: #9aa4b8;
}

.live-music-overlay-shell .overlay-group[open] .overlay-group-summary::after {
  content: "-";
}

.live-music-overlay-shell .overlay-group-title {
  margin: 4px 0 0;
  color: #eef2ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.live-music-overlay-shell .overlay-group-hint {
  color: #9aa4b8;
  font-size: 9px;
  margin-left: auto;
}

.live-music-overlay-shell .overlay-group-body {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(102, 115, 165, 0.08);
}

.live-music-overlay-shell .settings-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(102, 115, 165, 0.14);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.26), rgba(15, 23, 42, 0.3)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.live-music-overlay-shell .settings-row-block {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.live-music-overlay-shell .settings-label {
  margin: 0;
  color: #eef2ff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
}

.live-music-overlay-shell .settings-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
}

.live-music-overlay-shell input[type="text"],
.live-music-overlay-shell input[type="number"],
.live-music-overlay-shell select {
  appearance: none;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
  color: #f8fafc;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.live-music-overlay-shell input[type="number"] {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-music-overlay-shell select {
  padding-right: 30px;
  background-image:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98)),
    linear-gradient(45deg, transparent 50%, rgba(226, 232, 240, 0.88) 50%),
    linear-gradient(135deg, rgba(226, 232, 240, 0.88) 50%, transparent 50%);
  background-position:
    0 0,
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    auto,
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.live-music-overlay-shell input[type="color"] {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.live-music-overlay-shell input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.live-music-overlay-shell input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.live-music-overlay-shell .overlay-range-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.live-music-overlay-shell .overlay-range-pair input[type="range"] {
  width: 100%;
  margin: 0;
}

.live-music-overlay-shell .overlay-range-pair input[type="number"] {
  text-align: right;
  padding: 0 8px;
  font-size: 11px;
}

.live-music-overlay-shell .overlay-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}

.live-music-overlay-shell .overlay-vstyle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}

.live-music-overlay-shell .overlay-theme-card,
.live-music-overlay-shell .overlay-vstyle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(102, 115, 165, 0.14);
  background: rgba(15, 18, 28, 0.5);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  user-select: none;
  text-align: center;
}

.live-music-overlay-shell .overlay-vstyle-card {
  border-color: rgba(78, 148, 163, 0.14);
  background: rgba(12, 16, 26, 0.55);
}

.live-music-overlay-shell .overlay-theme-card input[type="radio"],
.live-music-overlay-shell .overlay-vstyle-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.live-music-overlay-shell .overlay-theme-card:hover,
.live-music-overlay-shell .overlay-vstyle-card:hover {
  transform: translateY(-1px);
}

.live-music-overlay-shell .overlay-theme-card:hover {
  border-color: rgba(102, 115, 165, 0.32);
  background: rgba(102, 115, 165, 0.08);
}

.live-music-overlay-shell .overlay-vstyle-card:hover {
  border-color: rgba(78, 148, 163, 0.38);
  background: rgba(78, 148, 163, 0.08);
}

.live-music-overlay-shell .overlay-theme-card.selected {
  border-color: rgba(102, 115, 165, 0.55);
  background: linear-gradient(145deg, rgba(102, 115, 165, 0.18), rgba(78, 148, 163, 0.1));
  box-shadow:
    0 0 0 1px rgba(102, 115, 165, 0.22),
    0 4px 16px rgba(102, 115, 165, 0.12);
}

.live-music-overlay-shell .overlay-vstyle-card.selected {
  border-color: rgba(78, 148, 163, 0.6);
  background: linear-gradient(145deg, rgba(78, 148, 163, 0.18), rgba(99, 184, 173, 0.1));
  box-shadow:
    0 0 0 1px rgba(78, 148, 163, 0.24),
    0 4px 16px rgba(78, 148, 163, 0.14);
}

.live-music-overlay-shell .overlay-theme-card.selected::after,
.live-music-overlay-shell .overlay-vstyle-card.selected::after {
  content: "OK";
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 10px;
  font-weight: 800;
  color: #eef2ff;
}

.live-music-overlay-shell .otc-icon,
.live-music-overlay-shell .ovsc-icon {
  min-width: 26px;
  min-height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #dce3f5;
  background: rgba(102, 115, 165, 0.16);
}

.live-music-overlay-shell .ovsc-icon {
  color: #d6f2ef;
  background: rgba(78, 148, 163, 0.2);
}

.live-music-overlay-shell .otc-name,
.live-music-overlay-shell .ovsc-name {
  font-size: 9px;
  font-weight: 800;
  color: #eef2ff;
}

.live-music-overlay-shell .ovsc-name {
  font-size: 8.5px;
}

.live-music-overlay-shell .otc-desc,
.live-music-overlay-shell .ovsc-desc {
  font-size: 8px;
  color: #9aa4b8;
  line-height: 1.3;
}

.live-music-overlay-shell .overlay-style-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.live-music-overlay-shell .overlay-style-group {
  border: 1px solid rgba(102, 115, 165, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
}

.live-music-overlay-shell .overlay-style-group-title {
  margin: 0 0 6px;
  color: #eef2ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-music-overlay-shell .overlay-style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.live-music-overlay-shell .overlay-style-grid .settings-row {
  min-height: 42px;
}

.live-music-overlay-shell .overlay-style-grid input[type="color"] {
  height: 28px;
}

.live-music-overlay-shell .settings-row-inline-checks {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.live-music-overlay-shell .settings-row-inline-checks .settings-check {
  min-height: 30px;
  padding: 3px 7px;
  border-radius: 10px;
  border: 1px solid rgba(102, 115, 165, 0.14);
  background: rgba(12, 16, 24, 0.52);
}

.live-music-overlay-shell .overlay-group-body-placement {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-music-overlay-shell .settings-row-anchor {
  grid-column: 1 / -1;
  justify-content: space-between;
  flex-wrap: wrap;
}

.live-music-overlay-shell .settings-row-anchor select {
  min-width: 170px;
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row {
  min-height: 0;
  align-items: stretch;
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-blue {
  border-left: 3px solid #60a5fa;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-pink {
  border-left: 3px solid #ec4899;
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-purple {
  border-left: 3px solid #8b5cf6;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-gold {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-green {
  border-left: 3px solid #22c55e;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-cyan {
  border-left: 3px solid #06b6d4;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-slate {
  border-left: 3px solid #64748b;
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.15), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-row.tone-orange {
  border-left: 3px solid #f97316;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.14), rgba(15, 23, 42, 0.22));
}

.live-music-overlay-shell .overlay-group-body-placement .settings-label {
  margin-bottom: 3px;
}

.live-music-overlay-shell .overlay-group-body-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-music-overlay-shell .overlay-group-body-content .settings-row {
  min-height: 38px;
}

.live-music-overlay-shell .overlay-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.live-music-overlay-shell .overlay-mini-badge.accent-blue {
  background: #2563eb;
}

.live-music-overlay-shell .overlay-mini-badge.accent-pink {
  background: #ec4899;
}

.live-music-overlay-shell .overlay-mini-badge.accent-purple {
  background: #8b5cf6;
}

.live-music-overlay-shell .overlay-mini-badge.accent-gold {
  background: #d97706;
}

.live-music-overlay-shell .overlay-mini-badge.accent-green {
  background: #16a34a;
}

.live-music-overlay-shell .overlay-mini-badge.accent-cyan {
  background: #0891b2;
}

.live-music-overlay-shell .overlay-mini-badge.accent-slate {
  background: #475569;
}

.live-music-overlay-shell .overlay-mini-badge.accent-orange {
  background: #ea580c;
}

.live-music-overlay-shell .overlay-preview-shell {
  position: relative;
  min-height: 620px;
  padding: 12px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(102, 115, 165, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 18px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 18px
    ),
    rgba(6, 10, 18, 0.76);
}

.live-music-overlay-shell .overlay-preview-stage {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(102, 115, 165, 0.24);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  --overlay-preview-scale: 0.4;
  --overlay-safe-guide: 34px;
  touch-action: none;
}

.live-music-overlay-shell .overlay-preview-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  opacity: 0.22;
  pointer-events: none;
}

.live-music-overlay-shell .overlay-preview-center-line {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.live-music-overlay-shell .overlay-preview-center-x {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-0.5px);
  background: rgba(122, 220, 229, 0.6);
}

.live-music-overlay-shell .overlay-preview-center-y {
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  transform: translateY(-0.5px);
  background: rgba(122, 220, 229, 0.6);
}

.live-music-overlay-shell .overlay-preview-safe-area {
  position: absolute;
  z-index: 3;
  inset: var(--overlay-safe-guide);
  border-radius: 12px;
  border: 1px dashed rgba(255, 206, 107, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 206, 107, 0.18);
  pointer-events: none;
}

.live-music-overlay-shell .overlay-preview-frame {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 1080px;
  height: 1920px;
  border: 0;
  background: transparent;
  transform-origin: top left;
  transform: scale(var(--overlay-preview-scale));
  pointer-events: none;
}

.live-music-overlay-shell .overlay-save-status {
  display: inline-flex;
  align-self: flex-start;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(102, 115, 165, 0.16);
  color: #9aa4b8;
  background: rgba(102, 115, 165, 0.08);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-music-overlay-shell .overlay-save-status[data-tone="pending"] {
  color: #f2e1c9;
  background: rgba(180, 148, 107, 0.12);
}

.live-music-overlay-shell .overlay-save-status[data-tone="ok"] {
  color: #def5f1;
  background: rgba(78, 148, 163, 0.14);
}

.live-music-overlay-shell .overlay-save-status[data-tone="error"] {
  color: #f8d6dc;
  background: rgba(167, 101, 113, 0.18);
}

.music-overlay-preview-box {
  position: absolute;
  z-index: 4;
  border: 2px dashed rgba(255, 174, 0, 0.94);
  border-radius: 14px;
  background: rgba(255, 174, 0, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  cursor: move;
  user-select: none;
  touch-action: none;
}

.music-overlay-preview-box.is-interacting {
  transition: none;
}

.music-overlay-preview-box-label {
  position: absolute;
  left: 50%;
  bottom: -32px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.music-overlay-preview-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 174, 0, 0.9));
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
}

.music-overlay-preview-empty {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #9aa4b8;
  font-size: 12px;
  text-align: center;
}

.live-music-overlay-modal-shell {
  --c-surface: #171d27;
  --c-bg: #111722;
  --c-bg-elev: #1e2531;
  --c-surface-hover: rgba(255, 255, 255, 0.06);
  --c-border: rgba(255, 255, 255, 0.1);
  --c-border-subtle: rgba(255, 255, 255, 0.06);
  --c-border-strong: rgba(255, 255, 255, 0.18);
  --c-text: #f3f6fb;
  --c-text-secondary: #dbe2ef;
  --c-text-muted: #909bad;
  --c-primary: #766dff;
  --c-primary-soft: rgba(118, 109, 255, 0.16);
  --c-primary-soft-border: rgba(118, 109, 255, 0.34);
  --c-primary-soft-fg: #d9d7ff;
  --c-danger: #e77486;
  --c-danger-bg: rgba(183, 62, 82, 0.18);
  --c-danger-border: rgba(183, 62, 82, 0.34);
  --c-chip-danger-text: #ffb6c0;
  --c-chip-danger-bg: rgba(183, 62, 82, 0.24);
  --c-chip-danger-border: rgba(183, 62, 82, 0.44);
  --c-error: #ef7f93;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --shadow-modal: 0 28px 54px rgba(0, 0, 0, 0.42);
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.config-panel-module__N2e0SG__modal {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  width: 100%;
  min-height: min(86vh, 640px);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.config-panel-module__N2e0SG__modalHeader {
  border-bottom: 1px solid var(--c-border-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
}

.config-panel-module__N2e0SG__modalHeaderLeft {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.config-panel-module__N2e0SG__modalTitle {
  margin: 0;
  font-size: 1.08rem;
  color: var(--c-text);
  font-weight: 700;
}

.config-panel-module__N2e0SG__modalClose {
  background: transparent;
  border: none;
  color: var(--c-text-muted);
  cursor: pointer;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 1rem;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.config-panel-module__N2e0SG__modalClose:hover {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.06);
}

.config-panel-module__N2e0SG__modalBody {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  overflow: hidden;
}

.config-panel-module__N2e0SG__modalConfig {
  border-right: 1px solid var(--c-border-subtle);
  overflow-y: auto;
}

.config-panel-module__N2e0SG__panel {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden auto;
}

.config-panel-module__N2e0SG__section {
  padding: 0.75rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--c-border-subtle);
}

.config-panel-module__N2e0SG__sectionTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  color: var(--c-text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.config-panel-module__N2e0SG__field {
  margin-bottom: 0.55rem;
}

.config-panel-module__N2e0SG__field:last-child {
  margin-bottom: 0;
}

.config-panel-module__N2e0SG__field label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--c-text-muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.config-panel-module__N2e0SG__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 0.75rem;
  min-width: 0;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.config-panel-module__N2e0SG__row > .config-panel-module__N2e0SG__field {
  margin-bottom: 0;
}

.config-panel-module__N2e0SG__toggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0;
  margin-bottom: 0.45rem;
  min-height: 30px;
  gap: 0.75rem;
}

.config-panel-module__N2e0SG__toggleRow span {
  color: var(--c-text-muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.config-panel-module__N2e0SG__numberInput {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.config-panel-module__N2e0SG__textInput,
.config-panel-module__N2e0SG__selectInput {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: var(--c-bg-elev);
  color: var(--c-text-secondary);
  font-size: 0.86rem;
  outline: none;
}

.config-panel-module__N2e0SG__textInput:focus,
.config-panel-module__N2e0SG__selectInput:focus {
  border-color: var(--c-border-strong);
}

.config-panel-module__N2e0SG__numberInput input {
  appearance: textfield;
  flex: 1;
  min-width: 0;
}

.config-panel-module__N2e0SG__numberInput input::-webkit-outer-spin-button,
.config-panel-module__N2e0SG__numberInput input::-webkit-inner-spin-button {
  appearance: none;
}

.config-panel-module__N2e0SG__colorRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-panel-module__N2e0SG__toggleLabel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.config-panel-module__N2e0SG__toggleLabel input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.config-panel-module__N2e0SG__toggleLabel .config-panel-module__N2e0SG__toggleTrack {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 30px;
  height: 17px;
  border-radius: 20px;
  background: var(--c-border-subtle);
  transition: background 0.2s ease;
}

.config-panel-module__N2e0SG__toggleLabel .config-panel-module__N2e0SG__toggleTrack::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-text-muted);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.config-panel-module__N2e0SG__toggleLabel input:checked + .config-panel-module__N2e0SG__toggleTrack {
  background: var(--c-primary);
}

.config-panel-module__N2e0SG__toggleLabel input:checked + .config-panel-module__N2e0SG__toggleTrack::after {
  background: var(--c-text);
  transform: translateX(13px);
}

.config-panel-module__N2e0SG__footer {
  margin-top: auto;
  padding: 1rem 1.15rem;
}

.config-panel-module__N2e0SG__restoreBtn {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--c-danger-border);
  background: var(--c-danger-bg);
  color: var(--c-chip-danger-text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.config-panel-module__N2e0SG__restoreBtn:hover {
  background: var(--c-chip-danger-bg);
  border-color: var(--c-chip-danger-border);
}

.config-panel-module__N2e0SG__modalPreviewPane {
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.config-panel-module__N2e0SG__previewLabel {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--c-border-subtle);
  color: var(--c-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.config-panel-module__N2e0SG__previewStage {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.05) 0% 25%, transparent 0% 50%) 0 0 / 14px 14px;
}

.music-overlay-preview-module__ki9GeW__previewContainer {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.music-overlay-preview-module__ki9GeW__rendererWrapper {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1rem;
  overflow: hidden auto;
}

.lightstream-music-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  background: transparent;
}

.config-panel-module__N2e0SG__modalFooter {
  border-top: 1px solid var(--c-border-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
}

.live-music-overlay-footer-meta {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.live-music-overlay-preview-note {
  color: var(--c-text-muted);
  font-size: 0.76rem;
}

.live-music-overlay-save-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-music-overlay-save-chip[data-tone="pending"] {
  color: #f3d7a0;
  background: rgba(243, 167, 65, 0.12);
  border-color: rgba(243, 167, 65, 0.24);
}

.live-music-overlay-save-chip[data-tone="ok"] {
  color: #d7f7e7;
  background: rgba(32, 223, 116, 0.12);
  border-color: rgba(32, 223, 116, 0.22);
}

.live-music-overlay-save-chip[data-tone="error"] {
  color: #ffd5dc;
  background: rgba(231, 116, 134, 0.16);
  border-color: rgba(231, 116, 134, 0.26);
}

.live-music-overlay-section-hint {
  font-weight: 500;
  font-size: 0.66rem;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.85;
}

.live-music-overlay-field-hint {
  color: var(--c-text-muted);
  font-weight: 400;
  font-size: 0.72rem;
  margin-left: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.live-music-overlay-vip-section {
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.05), rgba(255, 209, 102, 0));
  border-left: 2px solid rgba(255, 209, 102, 0.45);
}

.live-music-overlay-vip-section .config-panel-module__N2e0SG__sectionTitle > span:first-child {
  color: #f0c861;
}

.config-panel-module__N2e0SG__colorRow {
  position: relative;
}

.live-music-overlay-color-preview {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: transparent;
  color: #fff;
  text-align: left;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: none;
}

.live-music-overlay-color-preview.is-numeric {
  font-size: 2.2rem;
  font-variant-numeric: tabular-nums;
}

.live-music-overlay-color-input {
  position: absolute;
  inset: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.live-music-overlay-color-input:focus-visible + .live-music-overlay-color-preview,
.live-music-overlay-color-input:focus + .live-music-overlay-color-preview {
  outline: 2px solid var(--c-primary);
  outline-offset: 1px;
}

.live-music-overlay-save-btn {
  min-width: 82px;
  background: linear-gradient(180deg, #7f73ff, #6b63e8);
  border: 1px solid rgba(127, 115, 255, 0.5);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.live-music-overlay-save-btn:hover {
  background: linear-gradient(180deg, #8a80ff, #756ef2);
}

.live-music-overlay-copy-btn {
  min-width: 148px;
}

.live-music-overlay-editor-shell {
  max-width: 1140px;
  margin: 0;
  padding-top: 8px;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__modal {
  max-width: 1140px;
  height: min(76vh, 620px);
  min-height: min(76vh, 620px);
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__modalHeader {
  gap: 0.85rem;
  padding: 0.72rem 1rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__modalTitle {
  font-size: 1rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__modalBody {
  grid-template-columns: minmax(246px, 284px) minmax(0, 1fr);
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__section {
  padding: 0.82rem 0.95rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__sectionTitle {
  margin-bottom: 0.72rem;
  font-size: 0.66rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__field,
.live-music-overlay-editor-shell .config-panel-module__N2e0SG__row,
.live-music-overlay-editor-shell .config-panel-module__N2e0SG__toggleRow {
  margin-bottom: 0.58rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__field label,
.live-music-overlay-editor-shell .config-panel-module__N2e0SG__toggleRow span {
  font-size: 0.78rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__row {
  gap: 0.6rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__toggleRow {
  min-height: 28px;
  gap: 0.6rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__textInput,
.live-music-overlay-editor-shell .config-panel-module__N2e0SG__selectInput {
  min-height: 31px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__colorRow {
  gap: 8px;
}

.live-music-overlay-editor-shell .live-music-overlay-color-preview {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 0;
}

.live-music-overlay-editor-shell .live-music-overlay-color-preview.is-numeric {
  font-size: 0;
}

.live-music-overlay-editor-shell .live-music-overlay-color-input {
  width: 28px;
  height: 28px;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__footer {
  padding: 0.82rem 0.95rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__restoreBtn {
  padding: 7px;
  font-size: 0.78rem;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__previewLabel {
  padding: 0.58rem 0.85rem;
  font-size: 0.64rem;
}

.live-music-overlay-editor-shell .music-overlay-preview-module__ki9GeW__previewContainer {
  min-height: 0;
}

.live-music-overlay-editor-shell .music-overlay-preview-module__ki9GeW__rendererWrapper {
  padding: 0.8rem;
}

.live-music-overlay-editor-shell .lightstream-music-preview-frame {
  min-height: 0;
}

.live-music-overlay-editor-shell .config-panel-module__N2e0SG__modalFooter {
  gap: 0.42rem;
  padding: 0.68rem 1rem;
}

.live-music-overlay-editor-shell .live-music-overlay-preview-note {
  font-size: 0.72rem;
}

.live-music-overlay-editor-shell .live-music-overlay-save-chip {
  min-height: 22px;
  font-size: 0.6rem;
}

@media (max-width: 1260px) {
  .live-music-overlay-editor-shell {
    max-width: 100%;
  }

  .live-music-overlay-editor-shell .config-panel-module__N2e0SG__modal {
    max-width: 100%;
  }
}

@media (max-width: 1520px) {
  .live-music-overlay-shell .overlay-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .live-music-overlay-shell .overlay-preview-shell {
    min-height: 560px;
  }

  .live-music-overlay-shell .overlay-preview-stage {
    width: min(100%, 320px);
  }
}

@media (max-width: 720px) {
  .live-music-overlay-shell .overlay-theme-grid,
  .live-music-overlay-shell .overlay-vstyle-grid,
  .live-music-overlay-shell .overlay-range-pair {
    grid-template-columns: 1fr;
  }

  .live-music-overlay-shell .overlay-group-body-placement,
  .live-music-overlay-shell .overlay-group-body-content,
  .live-music-overlay-shell .overlay-style-groups {
    grid-template-columns: 1fr;
  }

  .live-music-overlay-shell .overlay-preview-shell {
    min-height: 500px;
    padding: 12px;
  }

  .live-music-overlay-shell .overlay-preview-stage {
    width: min(100%, 280px);
  }

  .music-overlay-preview-box-label {
    bottom: 8px;
    max-width: calc(100% - 16px);
    white-space: normal;
    text-align: center;
  }

  .config-panel-module__N2e0SG__modalBody {
    grid-template-columns: 1fr;
  }

  .config-panel-module__N2e0SG__modalPreviewPane {
    display: none;
  }
}

@media (max-width: 640px) {
  .config-panel-module__N2e0SG__row {
    grid-template-columns: 1fr;
  }

  .config-panel-module__N2e0SG__modalFooter {
    flex-wrap: wrap;
  }

  .live-music-overlay-footer-meta {
    width: 100%;
  }
}

.pad-actions {
  display: flex;
  gap: 8px;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(241, 88, 181, 0.52);
  box-shadow:
    0 0 0 1px rgba(241, 88, 181, 0.26),
    0 0 0 3px rgba(241, 88, 181, 0.1);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(255, 45, 141, 0.22);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text);
}

.danger-btn {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
  font-weight: 700;
  border: 1px solid rgba(251, 113, 133, 0.18);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #ff2d8d 0%,
      #ff4da6 var(--range-fill, 50%),
      #2a2f3a var(--range-fill, 50%),
      #2a2f3a 100%
    );
  accent-color: var(--accent);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border: 0;
  border-radius: 999px;
  background: #f5f2ff;
  box-shadow:
    0 0 0 4px rgba(245, 86, 180, 0.18),
    0 8px 18px rgba(245, 86, 180, 0.18);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #2a2f3a;
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2d8d 0%, #ff4da6 100%);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #f5f2ff;
  box-shadow:
    0 0 0 4px rgba(245, 86, 180, 0.18),
    0 8px 18px rgba(245, 86, 180, 0.18);
}

.video-stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 7, 16, 0.74);
  backdrop-filter: blur(12px);
}

.video-stage-card {
  width: min(1200px, 92vw);
  padding: 14px;
}

.video-stage-header,
.dialog-header,
.dialog-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.video-stage-player {
  width: 100%;
  max-height: 72vh;
  border-radius: 20px;
  background: #000;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 7, 16, 0.76);
  backdrop-filter: blur(12px);
  overflow-y: auto;
}

.app-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--text);
  overflow: hidden;
  position: relative;
  pointer-events: auto;
}

.dialog-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  max-height: calc(100vh - 52px);
  overflow: auto;
  overscroll-behavior: contain;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.type-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  align-content: start;
  align-items: start;
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-section h3,
.dialog-header h2 {
  margin: 0;
}

.dialog-header {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 0;
  padding: 18px 18px 12px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border);
}

.dialog-footer {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  margin: 0 -18px -18px;
  padding: 12px 18px 18px;
  background: var(--surface-strong);
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.backup-grid {
  display: grid;
  gap: 14px;
}

.backup-card-header {
  justify-content: space-between;
}

.backup-size-value {
  margin: 6px 0;
  font-size: 28px;
  font-weight: 800;
}

.remote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--remote-pad-hit-size, 76px), var(--remote-pad-hit-size, 76px)));
  justify-content: start;
  gap: 10px;
}

.remote-pad-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: var(--remote-pad-hit-size, 76px);
  min-height: calc(var(--remote-pad-hit-size, 76px) + 20px);
  padding: 7px 5px 5px;
  gap: 5px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.06), transparent 58%),
    rgba(13,17,29,0.92);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 28px rgba(0,0,0,0.24);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.remote-pad-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 16px 34px rgba(0,0,0,0.3),
    0 0 20px rgba(255,45,141,0.08);
}

.remote-pad-card:active {
  transform: translateY(0);
}

.remote-pad-card.is-playing {
  border-color: rgba(78, 220, 178, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(78, 220, 178, 0.35),
    0 0 0 1px rgba(78, 220, 178, 0.18),
    0 14px 30px rgba(78, 220, 178, 0.18);
  animation: remote-pad-pulse 1.6s ease-in-out infinite;
}

.remote-pad-progress {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.remote-pad-card.is-playing .remote-pad-progress {
  opacity: 1;
}

.remote-pad-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(78, 220, 178, 0.8), rgba(78, 220, 178, 1));
  transition: width 200ms linear;
  border-radius: inherit;
}

.remote-pad-card {
  position: relative;
}

@keyframes remote-pad-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(78, 220, 178, 0.35),
      0 0 0 1px rgba(78, 220, 178, 0.18),
      0 14px 30px rgba(78, 220, 178, 0.18);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(78, 220, 178, 0.55),
      0 0 0 2px rgba(78, 220, 178, 0.32),
      0 18px 38px rgba(78, 220, 178, 0.28);
  }
}

.remote-pad-card .pad-thumb,
.remote-pad-card .pad-fallback {
  width: var(--remote-pad-icon-size, 40px);
  height: var(--remote-pad-icon-size, 40px);
  margin: 0;
  border-radius: 8px;
}

.remote-pad-card .pad-thumb {
  object-fit: contain;
}

.remote-pad-card .pad-fallback {
  font-size: calc(var(--remote-pad-icon-size, 40px) * 0.46);
}

.remote-pad-name {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  color: #eef2ff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  letter-spacing: 0;
  text-wrap: balance;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 640px) {
  .remote-grid {
    grid-template-columns: repeat(auto-fill, minmax(var(--remote-pad-hit-size-mobile, 70px), var(--remote-pad-hit-size-mobile, 70px)));
    gap: 9px;
  }

  .remote-pad-card {
    width: var(--remote-pad-hit-size-mobile, 70px);
    min-height: calc(var(--remote-pad-hit-size-mobile, 70px) + 20px);
    padding: 6px 4px 5px;
    gap: 4px;
    border-radius: 15px;
  }

  .remote-pad-card .pad-thumb,
  .remote-pad-card .pad-fallback {
    width: var(--remote-pad-icon-size-mobile, 36px);
    height: var(--remote-pad-icon-size-mobile, 36px);
  }

  .remote-pad-name {
    font-size: 8px;
  }
}

.remote-toolbar {
  margin-bottom: 14px;
}

.toolbar-group-filter-shell {
  display: grid;
  gap: 5px;
  min-width: max-content;
  align-content: end;
}

.pad-group-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.pad-group-filter-bar::-webkit-scrollbar {
  display: none;
}

.pad-group-filter-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    rgba(15,19,30,0.96);
  color: #9aa4b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 20px rgba(0,0,0,0.16);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.pad-group-filter-btn:hover,
.pad-group-filter-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,45,141,0.26);
  color: #eef2ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.24);
}

.pad-group-filter-btn.is-active {
  border-color: rgba(255,45,141,0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    rgba(255,45,141,0.16);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 34px rgba(255,45,141,0.18);
}

.pad-group-filter-icon {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 12px;
}

.pad-group-filter-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.remote-toolbar {
  display: grid;
  gap: 14px;
}

.remote-toolbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.8fr);
  gap: 14px;
}

.remote-group-filter-shell {
  min-width: 0;
}

.remote-group-filter-shell .pad-group-filter-bar {
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .toolbar-group-filter-shell {
    min-width: 0;
  }

  .remote-toolbar-main {
    grid-template-columns: 1fr;
  }
}

.toast {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 90;
  display: grid;
  justify-items: end;
  min-width: 0;
  max-width: min(360px, calc(100vw - 32px));
  color: #4d5565;
  pointer-events: none;
}

.toast::before {
  display: none;
}

.toast.is-compact::before {
  display: none;
}

.toast-card,
.toast-compact-row {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid rgba(219, 224, 231, 0.92);
  border-radius: 18px;
  background: #f7f4f6;
  box-shadow: 0 18px 30px rgba(6, 9, 16, 0.22);
}

.toast-card {
  min-width: 272px;
}

.toast-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5ac55d;
  font-size: 13px;
  font-weight: 700;
}

.toast-message,
.toast-compact-label {
  color: #747d8d;
  font-size: 13px;
  line-height: 1.35;
}

.toast[data-status="error"] .toast-title-row {
  color: #d76767;
}

.toast[data-status="neutral"] .toast-title-row,
.toast[data-status="loading"] .toast-title-row {
  color: #8b95a7;
}

.toast-compact-row {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #97a3b6;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-icon-success {
  color: #5ac55d;
}

.toast-icon-error {
  color: #d76767;
}

.toast-icon-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(124, 134, 148, 0.3);
  border-top-color: #8b95a7;
  animation: toast-spin 0.85s linear infinite;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

