/* CloudTV Music dashboard. Tokens on :root (light), dark via prefers-color-scheme or [data-theme]. */
:root {
  --bg: #f6f6f9; --surface: #ffffff; --surface-2: #f0f0f5; --line: #e3e3ec; --text: #17171f; --muted: #6b6b7b;
  --brand: #7c5cff; --brand-ink: #ffffff; --brand-soft: #efeaff; --ok: #12a26b; --ok-soft: #e3f6ee;
  --danger: #e5484d; --danger-soft: #fdecec; --warn: #c27c0e; --warn-soft: #fff4dc;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 8px 24px rgba(20, 20, 40, .06);
  --shadow-lg: 0 24px 64px rgba(10, 10, 30, .25);
  --r: 14px; --r-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e14; --surface: #17171f; --surface-2: #20202b; --line: #2c2c3a; --text: #f2f2f7; --muted: #9b9bad;
    --brand-soft: #2a2347; --ok-soft: #0f2e23; --danger-soft: #3a1618; --warn-soft: #36290f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e14; --surface: #17171f; --surface-2: #20202b; --line: #2c2c3a; --text: #f2f2f7; --muted: #9b9bad;
  --brand-soft: #2a2347; --ok-soft: #0f2e23; --danger-soft: #3a1618; --warn-soft: #36290f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; }
.center { text-align: center; }
.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Buttons / fields ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn:not(.primary):not(.danger).loading::after { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13.5px; }
input[type=text], input[type=email], input[type=password], input[type=url], select {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.invalid input, input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field-error { color: var(--danger); font-size: 12.5px; min-height: 0; }
.field-error:empty { display: none; }
.form-error {
  background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px;
}

/* ---- Toasts ---- */
#toasts { position: fixed; z-index: 100; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: #1d1d27;
  color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .2s ease-out; transition: opacity .3s, transform .3s;
}
.toast.ok .icon { color: #4ade80; }
.toast.error .icon { color: #ff7a7e; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- Modal ---- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 16, .55); display: grid; place-items: center;
  padding: 24px; overflow-y: auto; animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(520px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; max-height: calc(100vh - 48px); animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(6px); } }
.modal.small { width: min(420px, 100%); }
.modal.wide { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.modal-head h2 { font-size: 19px; }
.modal-head p { font-size: 13.5px; margin-top: 2px; }
.modal-body { padding: 8px 22px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line);
}
.modal-foot .grow { flex: 1; min-width: 0; }
.confirm-text { color: var(--muted); }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; letter-spacing: -.01em; }
.brand b { font-weight: 700; }
.brand-mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #9b7bff, #6a45f5);
}
.brand.big { font-size: 19px; }
.brand.big .brand-mark { width: 36px; height: 36px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); font-weight: 700; font-size: 13px; flex: none;
}
.account-name { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }

/* ---- Sign in ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.25fr 1fr; }
.auth-hero {
  padding: 48px; display: flex; flex-direction: column; gap: 18px; justify-content: center;
  background: radial-gradient(120% 80% at 0% 0%, var(--brand-soft), transparent 60%), var(--bg);
}
.auth-hero h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; margin-top: 12px; }
.auth-hero p { max-width: 520px; font-size: 16px; }
.auth-hero .tv { margin-top: 16px; max-width: 680px; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: var(--surface); }
.auth-card > * { width: 100%; max-width: 380px; margin-left: auto; margin-right: auto; }
.auth-card h2 { font-size: 26px; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }

/* ---- TV preview (scales with its box: container units) ---- */
.tv {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px; overflow: hidden; background: #000;
  container-type: inline-size; box-shadow: var(--shadow-lg); isolation: isolate; user-select: none;
}
.tv.no-image .tv-bg { background: repeating-linear-gradient(45deg, #1b1b25 0 12px, #20202c 12px 24px); }
.tv-bg { position: absolute; inset: 0; background: center / cover no-repeat; transition: background-image .3s; }
.tv-top { position: absolute; inset: 0 0 auto; height: 19%; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.tv-foot { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.tv-info {
  position: absolute; left: 50%; bottom: 31cqw; transform: translateX(-50%); text-align: center; color: #fff;
  background: rgba(0, 0, 0, .45); border-radius: 1.1cqw; padding: .8cqw 1.8cqw; max-width: 80%; pointer-events: none;
}
.tv-info::before { content: ""; position: absolute; left: 1.2cqw; right: 1.2cqw; bottom: 0; height: .25cqw; border-radius: 1cqw; background: var(--accent); opacity: .9; }
.tv-title { font-weight: 700; font-size: 2.2cqw; line-height: 1.2; }
.tv-line { font-size: 1.25cqw; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-row {
  position: absolute; left: 0; right: 0; bottom: 3.4cqw; display: flex; justify-content: center; align-items: center;
  gap: 1.8cqw; pointer-events: none;
}
.tv-card {
  position: relative; width: 17cqw; aspect-ratio: 16 / 9; border-radius: .9cqw; overflow: hidden; background: #2a2a35;
  opacity: .8; box-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .4);
}
.tv-card.focus { width: 20cqw; opacity: 1; outline: .25cqw solid #fff; }
.tv-card.ghost { background: rgba(255, 255, 255, .08); }
.tv-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-card.focus .tv-bgthumb { display: none; }
.tv-card span {
  position: absolute; left: .8cqw; bottom: .5cqw; color: #fff; font-size: 1.15cqw; font-weight: 600; text-shadow: 0 1px 3px #000;
}
.tv-card b {
  position: absolute; right: .7cqw; top: .7cqw; color: #fff; font-size: .9cqw; background: rgba(0, 0, 0, .55);
  border-radius: 1cqw; padding: .1cqw .7cqw;
}
.tv-card.focus { background-size: cover; background-position: center; }
.tv-marker {
  position: absolute; z-index: 3; transform: translate(-50%, -50%); color: #fff; filter: drop-shadow(0 1px 3px #000);
  pointer-events: none;
}
.tv.picking { cursor: crosshair; }

/* Effects (the launcher's AmbientFx, in CSS) */
.fx { position: absolute; inset: 0; container-type: size; pointer-events: none; overflow: hidden; }
.fx i { position: absolute; display: block; }
.p-rain {
  top: 0; width: 1px; background: linear-gradient(transparent, rgba(220, 230, 255, .55));
  animation: rain linear infinite; will-change: transform;
}
@keyframes rain {
  from { transform: translate(0, -12cqh) rotate(7deg); }
  to { transform: translate(-14cqh, 112cqh) rotate(7deg); }
}
.p-snow { top: 0; border-radius: 50%; background: rgba(255, 255, 255, .78); animation: snow linear infinite; will-change: transform; }
@keyframes snow {
  0% { transform: translate(0, -2cqh); }
  25% { transform: translate(1.2cqw, 24cqh); }
  50% { transform: translate(-.8cqw, 50cqh); }
  75% { transform: translate(1cqw, 76cqh); }
  100% { transform: translate(0, 102cqh); }
}
.p-glow {
  width: 32cqw; height: 32cqw; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 150, 40, .6), rgba(255, 150, 40, .25) 55%, transparent);
  animation: flicker 1.6s infinite; mix-blend-mode: screen;
}
@keyframes flicker {
  0%, 100% { opacity: .9; } 18% { opacity: .62; } 31% { opacity: 1; } 47% { opacity: .7; } 63% { opacity: .95; } 80% { opacity: .58; }
}
.p-ember {
  width: .35cqw; height: .35cqw; border-radius: 50%; background: rgb(255, 170, 60); box-shadow: 0 0 .5cqw rgba(255, 140, 40, .9);
  animation: ember ease-out infinite;
}
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .95; }
  50% { transform: translate(.8cqw, -15cqh); background: rgb(255, 130, 60); }
  100% { transform: translate(-.6cqw, -30cqh); opacity: 0; background: rgb(255, 80, 60); }
}
@media (prefers-reduced-motion: reduce) { .fx i { animation-duration: 0s !important; } }

/* ---- Scenes page ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; }
.page-head p { margin-top: 4px; }
.feed {
  margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); font-size: 14px;
}
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.feed code {
  font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px;
}
.feed .sep { width: 1px; height: 18px; background: var(--line); }
.feed a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 500;
}
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.chip .count { color: var(--muted); font-weight: 500; }
.toolbar .hint { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.scene {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, opacity .2s;
}
.scene:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(20, 20, 40, .14); }
.scene.off .scene-img { filter: grayscale(.9) brightness(.7); }
.scene.dragging { opacity: .4; }
.scene.drop-before { box-shadow: -4px 0 0 0 var(--brand), var(--shadow); }
.scene.drop-after { box-shadow: 4px 0 0 0 var(--brand), var(--shadow); }
.scene-img {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  background: var(--surface-2) center / cover no-repeat; transition: filter .2s;
}
.scene-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .7)); }
.scene-name {
  position: absolute; z-index: 1; left: 14px; bottom: 10px; color: #fff; font-weight: 700; font-size: 18px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.badge {
  position: absolute; z-index: 1; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
}
.badge.fx-badge { right: 10px; }
.badge.order { left: 10px; min-width: 26px; justify-content: center; }
.badge.off-badge { right: 10px; top: auto; bottom: 10px; background: rgba(229, 72, 77, .9); }
.scene-meta { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.scene-station { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-actions { display: flex; align-items: center; gap: 2px; padding: 0 6px 8px 8px; }
.scene-actions .grip { cursor: grab; }
.scene-actions .spacer { flex: 1; }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none;
}
.toggle .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.toggle input:checked + .track { background: var(--ok); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.add-card {
  display: grid; place-items: center; align-content: center; gap: 10px; min-height: 230px; border: 2px dashed var(--line);
  border-radius: var(--r); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600;
}
.add-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.add-card .plus { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); }
.empty { text-align: center; padding: 64px 16px; display: grid; justify-items: center; gap: 10px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); }
.skeleton { aspect-ratio: 16 / 12; border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Scene editor ---- */
.editor { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.editor-preview { position: sticky; top: 0; display: grid; gap: 10px; }
.preview-caption { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-height: 20px; }
.preview-caption.pick { color: var(--warn); font-weight: 600; }
.editor-form { display: grid; gap: 22px; }
.step { display: grid; gap: 10px; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2);
  font-size: 12.5px; font-weight: 700; color: var(--muted); flex: none;
}
.step.done .step-num { background: var(--ok); color: #fff; }
.step.bad .step-num { background: var(--danger); color: #fff; }
.step-head h3 { font-size: 15px; }
.step-head .hint { margin-left: auto; }
.drop {
  display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px dashed var(--line); border-radius: var(--r);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop.bad { border-color: var(--danger); background: var(--danger-soft); }
.drop-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--surface-2) center / cover; display: grid; place-items: center; color: var(--muted); flex: none; }
.drop-text { display: grid; gap: 2px; font-size: 13.5px; min-width: 0; }
.drop-text b { font-size: 14px; }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }
.check-list span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.check-list .ok { color: var(--ok); }
.check-list .no { color: var(--danger); }
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row input { flex: 1; }
.counter { font-size: 12px; color: var(--muted); min-width: 42px; text-align: right; }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 236px; overflow-y: auto; padding: 2px; }
.station {
  display: grid; gap: 1px; text-align: left; padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 13px;
}
.station b { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.station span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station:hover { border-color: var(--brand); }
.station.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.station.custom b { color: var(--brand); }
.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.status-pill.ok { background: var(--ok-soft); color: var(--ok); }
.status-pill.bad { background: var(--danger-soft); color: var(--danger); }
.status-pill.wait { background: var(--surface-2); color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transition: transform .1s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch-label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.swatch-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.effects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.effect {
  display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600;
}
.effect:hover { border-color: var(--brand); }
.effect.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.glow-pos { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.errors { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: 13.5px; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 16px; }
  .auth-card { padding: 32px 16px 48px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .account-name { display: none; }
  .page { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 23px; }
  .feed a { margin-left: 0; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal { border-radius: 18px 18px 0 0; max-height: 96vh; width: 100%; }
  .modal-body { padding: 8px 16px 16px; }
  .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .effects { grid-template-columns: repeat(2, 1fr); }
  .toolbar .hint { display: none; }
}
