.color-swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
}
.color-swatch.selected { border-color: var(--gold-strong); }

.token-settings-box {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(22, 28, 38, 0.9), rgba(16, 16, 18, 0.88)),
    radial-gradient(circle at 12% 0%, rgba(208, 70, 74, 0.16), transparent 38%);
}
.token-settings-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 14px; border-bottom: 1px solid var(--border-soft); padding-bottom: 12px;
}
.modal-kicker {
  margin: 0 0 4px; color: var(--parchment-muted); font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.8px;
}
.token-settings-head h3 { margin: 0; font-size: 26px; color: var(--gold-strong); }
.modal-x {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--parchment); cursor: pointer;
  font-weight: 800; font-family: var(--font-display); font-size: 18px;
}
.modal-x:hover { border-color: var(--accent); background: rgba(208,70,74,0.14); }
.token-settings-section {
  padding: 14px; margin-bottom: 12px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); background: rgba(255,255,255,0.035);
}
.token-settings-section h4 {
  margin: 0 0 10px; color: var(--parchment); font-family: var(--font-display);
  font-size: 18px; text-transform: uppercase; letter-spacing: 0.9px;
}
.modal-help { font-size: 11px; color: var(--parchment-muted); margin-top: 4px; }
.sheet-open-btn {
  margin-top: 12px; padding: 8px 12px; border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--parchment);
  cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.8px;
}
.sheet-open-btn:hover { background: rgba(208,70,74,0.24); border-color: var(--accent); }
.inline-check {
  display: flex !important; align-items: center; gap: 8px; margin-top: 10px !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
.inline-check input { width: auto; }

.token-settings-section input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  margin-top: 4px;
}
.trigger-active-hint {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(95, 209, 122, 0.16);
  color: #8fe3a4;
  font-weight: 600;
}
.layer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.layer-buttons .secondary-btn { width: 100%; }
.token-sync-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.token-inline-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.token-inline-actions .secondary-btn { width: 100%; }
.token-sync-actions .secondary-btn { width: 100%; }
.token-bar-editor {
  display: grid; grid-template-columns: 14px 72px minmax(70px, 1fr) auto minmax(70px, 1fr) 42px;
  align-items: center; gap: 8px; margin-bottom: 8px;
}
/* Helles/daemmriges Licht (ft) im Token-Editor: eigenes Layout, weil das
   HP/AC-Leisten-Grid nur fuer sechs Spalten gedacht ist. */
.token-light-range-row { display: flex; gap: 10px; margin-bottom: 8px; }
.token-light-range-row label { display: block; margin-bottom: 4px; }
.token-light-range-row input { width: 100%; }
.token-bar-editor:last-child { margin-bottom: 0; }
.bar-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }
.token-bar-editor strong, .aura-editor strong {
  font-family: var(--font-display); color: var(--parchment); text-transform: uppercase; letter-spacing: 0.8px;
}
.token-bar-editor input[type=color], .aura-editor input[type=color] {
  width: 40px; height: 34px; padding: 2px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--ink-950);
}
.aura-editor {
  display: grid; grid-template-columns: 74px 56px minmax(70px, 1fr) 38px minmax(90px, 1fr) 104px 42px;
  align-items: center; gap: 8px; margin-bottom: 8px;
}
.aura-editor:last-child { margin-bottom: 0; }
.aura-editor label { margin: 0; font-size: 10px; }
.color-swatch.disabled { opacity: 0.45; cursor: default; }

@media (max-width: 760px) {
  .token-sync-actions { grid-template-columns: 1fr; }
  .token-bar-editor, .aura-editor { grid-template-columns: 1fr 1fr; }
  .token-bar-editor .bar-dot { display: none; }
}

html[data-theme="light"] .token-settings-box {
  background:
    radial-gradient(circle at 12% 0%, rgba(200,67,76,0.07), transparent 38%),
    var(--theme-panel-bg);
}
html[data-theme="light"] .modal-x {
  background: rgba(24,26,30,0.04);
}
html[data-theme="light"] .modal-x:hover,
html[data-theme="light"] .sheet-open-btn:hover {
  background: rgba(200,67,76,0.16);
}
html[data-theme="light"] .token-settings-section {
  background: rgba(24,26,30,0.035);
}
