/* ─────────────────────────────────────────────────────────────
   drop — design tokens
   Two themes from one set of names. Every colour is a token so
   the light theme is a redefinition, never a second stylesheet.
   ───────────────────────────────────────────────────────────── */

:root {
  --accent-1: #6ee7ff;
  --accent-2: #7c6cff;
  --accent-3: #c46bff;
  --grad: linear-gradient(115deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));

  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 140ms var(--ease);
  --med: 260ms var(--ease);
  --slow: 520ms var(--ease);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1080px;
}

/* dark (default) */
:root,
:root[data-theme="dark"] {
  --bg: #08090d;
  --bg-2: #0c0e14;
  --surface: rgba(255, 255, 255, .038);
  --surface-2: rgba(255, 255, 255, .062);
  --surface-3: rgba(255, 255, 255, .095);
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .15);
  --text: #eef1f7;
  --text-2: #a2abbd;
  --text-3: #6c7689;
  --glass: rgba(14, 16, 23, .72);
  --shadow: 0 24px 60px -22px rgba(0, 0, 0, .85);
  --glow: 0 0 0 1px rgba(124, 108, 255, .28), 0 12px 46px -12px rgba(124, 108, 255, .42);
  --on-accent: #07080c;
  --blob-op: .38;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: rgba(12, 16, 32, .034);
  --surface-2: rgba(12, 16, 32, .058);
  --surface-3: rgba(12, 16, 32, .09);
  --line: rgba(12, 16, 32, .1);
  --line-2: rgba(12, 16, 32, .18);
  --text: #12151f;
  --text-2: #515a6e;
  --text-3: #7a8396;
  --glass: rgba(255, 255, 255, .78);
  --shadow: 0 24px 60px -26px rgba(20, 26, 48, .28);
  --glow: 0 0 0 1px rgba(124, 108, 255, .26), 0 12px 40px -14px rgba(124, 108, 255, .35);
  --on-accent: #ffffff;
  --blob-op: .3;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7fb;
    --bg-2: #eef0f7;
    --surface: rgba(12, 16, 32, .034);
    --surface-2: rgba(12, 16, 32, .058);
    --surface-3: rgba(12, 16, 32, .09);
    --line: rgba(12, 16, 32, .1);
    --line-2: rgba(12, 16, 32, .18);
    --text: #12151f;
    --text-2: #515a6e;
    --text-3: #7a8396;
    --glass: rgba(255, 255, 255, .78);
    --shadow: 0 24px 60px -26px rgba(20, 26, 48, .28);
    --on-accent: #ffffff;
    --blob-op: .3;
  }
}

/* ── base ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

/* Several things below are toggled with the `hidden` attribute while also
   carrying a `display` of their own, which would otherwise win. This keeps
   `hidden` meaning hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.02em; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: .82em; }
.muted { color: var(--text-3); font-size: 13px; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── ambient background ────────────────────────────────────── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(90rem 50rem at 50% -18rem, color-mix(in oklab, var(--accent-2) 12%, transparent), transparent 70%),
    var(--bg);
}

/* The colour lives behind the hero and settles out further down, so the
   queue and the service grid keep their contrast. */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0, transparent 22%, var(--bg) 72%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--blob-op);
  will-change: transform;
}
.blob-1 { width: 42rem; height: 42rem; top: -19rem; left: -9rem; background: var(--accent-1); animation: drift1 26s ease-in-out infinite; }
.blob-2 { width: 36rem; height: 36rem; top: -14rem; right: -10rem; background: var(--accent-3); animation: drift2 32s ease-in-out infinite; }
.blob-3 { width: 28rem; height: 28rem; top: 6rem; left: 44%; background: var(--accent-2); animation: drift3 38s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6rem,4rem,0) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1.05); } 50% { transform: translate3d(-5rem,5rem,0) scale(.92); } }
@keyframes drift3 { 0%,100% { transform: translate3d(0,0,0) scale(.95); } 50% { transform: translate3d(-7rem,-3rem,0) scale(1.1); } }

/* ── top bar ───────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, 5vw);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 62%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--med), background var(--med);
}
.topbar.is-stuck { border-bottom-color: var(--line); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; stroke: none; filter: drop-shadow(0 4px 14px color-mix(in oklab, var(--accent-2) 55%, transparent)); transition: transform var(--med); }
.brand:hover .brand-mark { transform: translateY(-2px) rotate(-6deg); }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.035em; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 13px;
  font: inherit; font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.pill:hover { background: var(--surface-2); color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ok) 22%, transparent); }
.dot.err { background: var(--err); box-shadow: 0 0 0 4px color-mix(in oklab, var(--err) 22%, transparent); }
.dot.wait { background: var(--warn); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }

.ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ico-sun { display: none; }
  :root:not([data-theme="dark"]) .ico-moon { display: block; }
}

/* ── layout ────────────────────────────────────────────────── */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px 80px;
}

.hero { text-align: center; padding: clamp(36px, 8vw, 78px) 0 26px; }
.hero-title {
  font-size: clamp(34px, 6.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 700;
}
.hero-title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--text-2);
  font-size: clamp(14px, 1.6vw, 16px);
}

/* ── console / command bar ─────────────────────────────────── */

.console {
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 14px;
}

.combar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--med), box-shadow var(--med), background var(--med);
}
.combar-inner:focus-within {
  border-color: transparent;
  background: var(--surface-2);
  box-shadow: var(--glow);
}

.combar-ico { flex: none; color: var(--text-3); width: 19px; height: 19px; }
.combar-inner:focus-within .combar-ico { color: var(--accent-2); }

.combar-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0;
  font: inherit;
  font-size: clamp(14px, 1.8vw, 16px);
  color: var(--text);
  background: none;
  border: 0;
  outline: none;
}
.combar-input::placeholder { color: var(--text-3); }

.combar-service {
  display: inline-flex; align-items: center; gap: 6px;
  flex: none;
  height: 26px; padding: 0 10px;
  font-size: 12px; font-weight: 550; letter-spacing: .01em;
  color: var(--text);
  background: var(--surface-3);
  border-radius: 999px;
  animation: popIn var(--med) both;
}
.svc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
@keyframes popIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }

.ghost-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none; padding: 0;
  color: var(--text-3);
  background: none; border: 0; border-radius: 10px;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.ghost-btn:hover { background: var(--surface-2); color: var(--text); }
.ghost-btn svg { width: 17px; height: 17px; }

.go-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  position: relative;
  flex: none;
  height: 44px; padding: 0 22px;
  font: inherit; font-size: 14.5px; font-weight: 620;
  color: var(--on-accent);
  background: var(--grad);
  background-size: 180% 180%;
  border: 0; border-radius: 14px;
  cursor: pointer;
  transition: transform var(--fast), box-shadow var(--med), filter var(--fast);
  box-shadow: 0 8px 24px -10px color-mix(in oklab, var(--accent-2) 80%, transparent);
}
.go-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px color-mix(in oklab, var(--accent-2) 90%, transparent); animation: shift 3.4s ease infinite; }
.go-btn:active { transform: translateY(0) scale(.985); }
.go-btn:disabled { cursor: progress; filter: saturate(.55) brightness(.9); }
.go-btn.compact { height: 38px; padding: 0 18px; font-size: 13.5px; }
.go-ico { width: 17px; height: 17px; stroke-width: 2; }
@keyframes shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.go-spin {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid color-mix(in oklab, var(--on-accent) 35%, transparent);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.go-btn.is-busy .go-label, .go-btn.is-busy .go-ico { display: none; }
.go-btn.is-busy .go-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── quick row ─────────────────────────────────────────────── */

.quickrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 4px 2px;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.seg {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px;
  font: inherit; font-size: 13px; font-weight: 520;
  color: var(--text-3);
  background: none; border: 0; border-radius: 10px;
  cursor: pointer; white-space: nowrap;
  transition: color var(--fast), background var(--fast);
}
.seg svg { width: 15px; height: 15px; }
.seg:hover { color: var(--text); }
.seg.is-active { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 2px rgba(0,0,0,.18); }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 13px;
  font: inherit; font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: all var(--fast);
}
.chip:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
.chip.is-on { color: var(--text); border-color: color-mix(in oklab, var(--accent-2) 55%, transparent); background: color-mix(in oklab, var(--accent-2) 14%, transparent); }

.adv-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: auto;
  height: 32px; padding: 0 13px;
  font: inherit; font-size: 13px; color: var(--text-2);
  background: none; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
  transition: all var(--fast);
}
.adv-toggle:hover { color: var(--text); background: var(--surface); }
.adv-toggle svg { width: 15px; height: 15px; }
.adv-toggle .caret { transition: transform var(--med); }
.adv-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.adv-toggle[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }

/* ── advanced ──────────────────────────────────────────────── */

.advanced { padding: 16px 4px 4px; animation: slideDown var(--med) both; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.adv-group {
  margin: 0;
  padding: 14px 15px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.adv-group legend {
  padding: 0 7px;
  margin-left: -4px;
  font-size: 11px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3);
}

.field { display: block; margin-bottom: 11px; }
.field > span { display: block; margin-bottom: 5px; font-size: 12.5px; color: var(--text-2); }
.field select, .field input[type="text"] {
  width: 100%; height: 36px;
  padding: 0 11px;
  font: inherit; font-size: 13.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--fast), background var(--fast);
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.field select option { background: var(--bg-2); color: var(--text); }
.field select:hover, .field input[type="text"]:hover { border-color: var(--line-2); }
.field select:focus, .field input[type="text"]:focus { border-color: var(--accent-2); }

/* switches */
.switch {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.track {
  position: relative; flex: none;
  width: 34px; height: 20px;
  background: var(--surface-3);
  border-radius: 999px;
  transition: background var(--med);
}
.thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform var(--med), background var(--med);
}
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track .thumb { transform: translateX(14px); background: var(--on-accent); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.switch-label { font-size: 12.8px; color: var(--text-2); line-height: 1.35; }
.switch:hover .switch-label { color: var(--text); }

.adv-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 14px 2px 2px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.adv-note { margin-left: auto; font-size: 12px; color: var(--text-3); }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; font: inherit; font-size: 12.5px;
  color: var(--text-2);
  background: none; border: 0; cursor: pointer;
  transition: color var(--fast);
}
.link-btn:hover { color: var(--accent-2); }
.link-btn svg { width: 14px; height: 14px; }

/* batch */
.batch { padding: 14px 4px 4px; animation: slideDown var(--med) both; }
.batch textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none; resize: vertical;
  transition: border-color var(--fast);
}
.batch textarea:focus { border-color: var(--accent-2); }
.batch-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }

/* ── sections ──────────────────────────────────────────────── */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 40px 4px 14px;
}
.section-head h2 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.section-actions { display: flex; align-items: center; gap: 14px; }

/* ── queue ─────────────────────────────────────────────────── */

.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.job {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  animation: jobIn var(--med) both;
}
@keyframes jobIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }

.job-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-2);
}
.job-icon svg { width: 18px; height: 18px; }
.job.is-done .job-icon { background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }
.job.is-error .job-icon { background: color-mix(in oklab, var(--err) 16%, transparent); color: var(--err); }
.job.is-working .job-icon { background: color-mix(in oklab, var(--accent-2) 16%, transparent); color: var(--accent-2); }

.job-main { min-width: 0; }
.job-title {
  font-size: 13.8px; font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-sub {
  margin-top: 2px;
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job.is-error .job-sub { color: var(--err); }

.job-actions { display: flex; align-items: center; gap: 4px; }

.job-bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--grad);
  transition: width 180ms linear;
}
.job.is-working .job-bar.indeterminate {
  width: 34%;
  animation: sweep 1.15s var(--ease) infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

/* ── services ──────────────────────────────────────────────── */

.services {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 7px;
}
.services li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  font-size: 12.8px; color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: all var(--fast);
}
.services li:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.services li .svc-dot { flex: none; }
.services li.skeleton {
  height: 37px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-color: transparent;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── footer ────────────────────────────────────────────────── */

.foot {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 9px;
  padding: 28px 16px 44px;
  font-size: 12.2px; color: var(--text-3);
  text-align: center;
}
.foot a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot a:hover { color: var(--accent-2); }
.foot-sep { opacity: .4; }

/* ── modals ────────────────────────────────────────────────── */

.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-scrim {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade var(--fast) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: min(100%, 460px);
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: modalIn var(--med) both;
}
.modal.panel-lg { width: min(100%, 780px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 17px 13px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 17px; overflow-y: auto; flex: 1 1 auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  padding: 13px 17px 17px;
  border-top: 1px solid var(--line);
}

.ghost-cta {
  height: 38px; padding: 0 17px;
  font: inherit; font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; cursor: pointer;
  transition: all var(--fast);
}
.ghost-cta:hover { color: var(--text); background: var(--surface-2); }

.keys { display: grid; grid-template-columns: auto 1fr; gap: 11px 18px; margin: 0; align-items: center; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; font-size: 13.2px; color: var(--text-2); }
kbd {
  display: inline-grid; place-items: center;
  min-width: 25px; height: 25px; padding: 0 7px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 7px;
}

/* picker */
.picker-bar { display: flex; align-items: center; gap: 14px; padding-bottom: 13px; }
.picker-bar .muted { margin-left: auto; }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 9px;
}
.pick {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
  border: 2px solid transparent;
  transition: border-color var(--fast), transform var(--fast);
}
.pick:hover { transform: translateY(-2px); }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick input:checked ~ .pick-check { background: var(--grad); border-color: transparent; color: var(--on-accent); }
.pick input:checked ~ .pick-check svg { opacity: 1; }
.pick:has(input:checked) { border-color: var(--accent-2); }
.pick-check {
  position: absolute; top: 8px; left: 8px;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  background: color-mix(in oklab, var(--bg) 66%, transparent);
  border: 1.5px solid var(--line-2);
  border-radius: 7px;
  backdrop-filter: blur(6px);
  transition: all var(--fast);
}
.pick-check svg { width: 13px; height: 13px; opacity: 0; stroke-width: 2.6; transition: opacity var(--fast); }
.pick-kind {
  position: absolute; right: 7px; bottom: 7px;
  padding: 2px 8px;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pick-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-3);
}
.pick-fallback svg { width: 28px; height: 28px; }

.picker-audio {
  display: flex; align-items: center; gap: 11px;
  margin-top: 13px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px; color: var(--text-2);
}

/* ── toasts ────────────────────────────────────────────────── */

.toasts {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toastIn var(--med) both;
}
.toast.out { animation: toastOut 220ms var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px) scale(.97); } }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }
.toast.info svg { color: var(--accent-1); }
.toast-body { min-width: 0; }
.toast-title { font-size: 13.4px; font-weight: 570; }
.toast-msg { margin-top: 2px; font-size: 12.4px; color: var(--text-2); word-break: break-word; }

/* ── responsive ────────────────────────────────────────────── */

@media (max-width: 720px) {
  .combar-inner { flex-wrap: wrap; padding: 9px; gap: 7px; }
  .combar-ico { display: none; }
  .combar-input { flex-basis: 100%; height: 40px; padding: 0 6px; order: -1; }
  .go-btn { flex: 1 1 auto; }
  .adv-toggle { margin-left: 0; }
  .quickrow { gap: 8px; }
  .segmented { width: 100%; }
  .seg { flex: 1; justify-content: center; padding: 0 8px; }
  .job { grid-template-columns: 34px 1fr; grid-template-areas: "icon main" "actions actions"; }
  .job-icon { grid-area: icon; }
  .job-main { grid-area: main; }
  .job-actions { grid-area: actions; justify-content: flex-end; }
  .foot-sep { display: none; }
  .foot { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .blob { animation: none !important; }
}
