/* ==========================================================================
   Catch — glass theme

   A macOS‑style translucent window floating over a soft gradient wallpaper.
   Loaded after styles.css: it retunes the tokens and repaints the chrome,
   surfaces and controls, leaving layout and behaviour untouched.
   ========================================================================== */

:root {
  --bg: #0b0a12;
  --bg-2: #0f0d18;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);

  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.64);
  --dim: rgba(245, 245, 247, 0.42);

  /* Every accent in the app now resolves to the macOS system blue. */
  --violet: #5aa9ff;
  --pink: #ff6b9d;
  --amber: #ffd60a;
  --cyan: #64d2ff;
  --green: #30d158;
  --red: #ff453a;

  --blue: #0a84ff;
  --blue-hi: #409cff;
  --grad: linear-gradient(180deg, #4aa3ff 0%, #0a7cf0 100%);
  --grad-soft: linear-gradient(180deg, rgba(10, 132, 255, 0.2), rgba(10, 132, 255, 0.07));

  --banner:
    radial-gradient(120% 150% at 92% 6%, rgba(255, 219, 160, 0.5), transparent 52%),
    radial-gradient(80% 120% at 70% 118%, rgba(255, 96, 160, 0.45), transparent 62%),
    linear-gradient(100deg, #3b1a86 0%, #6427b4 24%, #a03cae 47%, #d44f8c 67%, #ec7a45 85%, #f7ab52 100%);

  --shadow: 0 26px 70px -40px rgba(0, 0, 0, 0.85);
  --radius: 16px;
  --radius-md: 13px;
  --radius-sm: 10px;

  --glass: linear-gradient(180deg, rgba(38, 35, 52, 0.8), rgba(19, 17, 28, 0.87));
  --glass-hi: rgba(255, 255, 255, 0.045);
}

html { background: #0b0a12; }

body {
  background: #0b0a12;
  font-size: 14px;
}

body::after { display: none; }
.grain { opacity: 0.02; }

/* ------------------------------- wallpaper ------------------------------- */

body {
  background:
    radial-gradient(120% 85% at 6% 2%, #2b46a8 0%, transparent 52%),
    radial-gradient(80% 70% at 72% -4%, #8a4fc4 0%, transparent 55%),
    radial-gradient(110% 95% at 104% 48%, #b83350 0%, transparent 58%),
    radial-gradient(95% 80% at 62% 104%, #e2682c 0%, transparent 56%),
    radial-gradient(70% 60% at 24% 88%, #272a63 0%, transparent 62%),
    linear-gradient(152deg, #101a3d 0%, #2a1a4e 34%, #5f2144 64%, #9d3a33 100%);
  background-attachment: fixed;
}

.aurora {
  opacity: 0.55;
  filter: blur(110px);
  background: radial-gradient(ellipse at 50% 0%, rgba(86, 60, 180, 0.18), transparent 62%);
}
.aurora .a1 {
  background: radial-gradient(circle at 42% 42%, rgba(58, 122, 255, 0.5), transparent 66%);
}
.aurora .a2 {
  background: radial-gradient(circle at 50% 50%, rgba(190, 60, 130, 0.42), transparent 66%);
}
.aurora .a3 {
  background: radial-gradient(circle at 50% 50%, rgba(226, 104, 44, 0.4), transparent 68%);
}

/* --------------------------------- window -------------------------------- */

.wrap {
  /* styles.css pins this to width:100%, which combined with the margins below
     would push the floating window past the viewport. Auto width fills the
     space between the margins and still centres under max-width. */
  width: auto;
  /* Keep a gutter at every width so the window always reads as floating. */
  max-width: min(1280px, calc(100% - 48px));
  margin: 24px auto 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(125%);
  -webkit-backdrop-filter: blur(40px) saturate(125%);
  box-shadow:
    0 50px 130px -46px rgba(0, 0, 0, 0.9),
    0 12px 40px -24px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

/* Title bar */
.topbar {
  position: relative;
  height: 54px;
  padding: 0 20px 0 88px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}

.chrome-dots {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}
.chrome-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.chrome-dots i:nth-child(1) { background: #ff5f57; }
.chrome-dots i:nth-child(2) { background: #febc2e; }
.chrome-dots i:nth-child(3) { background: #28c840; }

.brand { gap: 9px; }
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 6px 16px -8px rgba(10, 132, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.brand-mark svg {
  width: 15px;
  height: 15px;
  stroke: #fff;
  stroke-width: 2.3;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-pill {
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
}

.runtime {
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
}
.topbar .ghost-btn.sm { height: 28px; }

/* -------------------------------- content -------------------------------- */

main { padding: 0 24px 22px; }

/* -------------------------------- banner --------------------------------- */

.hero {
  position: relative;
  max-width: none;
  margin: 22px 0 0;
  padding: 30px 34px 26px;
  text-align: left;
  border-radius: 16px;
  background: var(--banner);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 24px 60px -34px rgba(90, 30, 120, 0.85);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(90% 120% at 0% 0%, rgba(26, 8, 58, 0.42), transparent 62%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(255, 255, 255, 0.16), transparent 58%),
    linear-gradient(180deg, transparent 60%, rgba(40, 8, 60, 0.18));
}
/* the platform map sits behind the banner at a whisper of opacity */
.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/assets/catch-supported-platforms.webp") center / cover no-repeat;
  opacity: 0.1;
}
.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: translate3d(var(--par-x, 0px), var(--par-y, 0px), 0);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-orbs i {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #f4ecff 0%, #c3a2ff 16%, #8b52ea 52%, #4d1f9e 100%);
  box-shadow: inset -8px -12px 24px rgba(30, 6, 60, 0.4), 0 16px 30px -10px rgba(40, 10, 70, 0.5);
  opacity: 0.9;
  will-change: transform;
}
/* the specular highlight drifts across each orb, so the light feels alive */
.hero-orbs i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 46%);
  opacity: 0.5;
  animation: orbGlint 7s ease-in-out infinite alternate;
}
.hero-orbs i:nth-child(1) { width: 118px; height: 118px; right: 46px; top: -26px; animation: orbFloat 9s ease-in-out infinite; }
.hero-orbs i:nth-child(2) { width: 58px; height: 58px; right: 210px; top: 38px; opacity: 0.8; animation: orbFloat 7.5s ease-in-out -1.8s infinite; }
.hero-orbs i:nth-child(3) { width: 34px; height: 34px; right: 330px; bottom: 34px; opacity: 0.7; animation: orbFloat 8.5s ease-in-out -3.4s infinite; }
.hero-orbs i:nth-child(4) {
  width: 44px; height: 44px;
  right: 130px; bottom: 30px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 24%, #ffe3cf 0%, #ffb27a 22%, #ef7a45 62%, #b8452b 100%);
  opacity: 0.85;
  animation: cubeFloat 11s ease-in-out -2.2s infinite;
}

/* a slow band of light crossing the banner, like a pane of glass catching the sun */
.hero-sheen {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(255, 255, 255, 0.12) 46%,
    rgba(255, 255, 255, 0.04) 52%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: sheenSweep 9s cubic-bezier(0.4, 0, 0.2, 1) 2s infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-7px, 13px, 0) scale(1.035); }
}
@keyframes cubeFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(16deg); }
  50% { transform: translate3d(-5px, 11px, 0) rotate(30deg); }
}
@keyframes orbGlint {
  from { opacity: 0.34; transform: translate3d(0, 0, 0); }
  to { opacity: 0.66; transform: translate3d(5px, 4px, 0); }
}
@keyframes sheenSweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* the banner copy settles in once, in reading order */
.hero .eyebrow,
.hero h1,
.hero .lede,
.hero .url-bar,
.hero .feature-row {
  animation: heroRise 0.72s cubic-bezier(0.22, 0.68, 0.24, 1) backwards;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero .lede { animation-delay: 0.2s; }
.hero .url-bar { animation-delay: 0.28s; }
.hero .feature-row { animation-delay: 0.36s; }

@keyframes heroRise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}

.hero .eyebrow,
.hero h1,
.hero .lede,
.hero .url-bar,
.hero .feature-row { position: relative; z-index: 1; }

.eyebrow {
  padding: 6px 12px 6px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

h1 {
  margin: 18px 0 0;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 680;
  color: #fff;
}
h1 .accent {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #fff;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  opacity: 0.94;
  text-shadow: 0 1px 20px rgba(255, 255, 255, 0.22);
}

.lede {
  max-width: 520px;
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.url-bar {
  width: min(680px, 100%);
  margin: 22px 0 0;
  padding: 6px 6px 6px 16px;
  gap: 8px;
  border-radius: 13px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(20, 14, 34, 0.5);
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.url-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: none;
}
.url-icon { color: rgba(255, 255, 255, 0.6); }
.url-bar:focus-within .url-icon { color: #fff; }
/* Pasted source wins over focus styling: the logo keeps its brand color. */
.url-bar .url-icon.brand[data-source="youtube"] { color: #ff4d45; }
.url-bar .url-icon.brand[data-source="pinterest"] { color: #ff2d55; }
.url-bar .url-icon.brand[data-source="tiktok"] { color: #25f4ee; }
.url-bar .url-icon.brand[data-source="instagram"] { color: #e1306c; }
.url-bar .url-icon.brand[data-source="x"] { color: #fff; }
.url-bar .url-icon.brand[data-source="facebook"] { color: #1877f2; }
.url-bar .url-icon.brand[data-source="vimeo"] { color: #1ab7ea; }
.url-bar .url-icon.brand[data-source="twitch"] { color: #9146ff; }
.url-bar .url-icon.brand[data-source="reddit"] { color: #ff4500; }
.url-bar .url-icon.brand[data-source="spotify"] { color: #1ed760; }
.url-bar .url-icon.brand[data-source="soundcloud"] { color: #ff5500; }
.url-bar input {
  height: 44px;
  font-size: 14.5px;
  color: #fff;
}
.url-bar input::placeholder { color: rgba(255, 255, 255, 0.52); }
.url-bar .icon-btn { color: rgba(255, 255, 255, 0.62); }
.url-bar .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

.fetch-btn {
  min-width: 104px;
  height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 24px -12px rgba(0, 20, 60, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.fetch-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 30px -14px rgba(0, 20, 60, 1), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.fetch-spinner {
  border-color: rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
}

/* Hosted-without-engine state */
.runtime.hosted .runtime-dot {
  background: var(--blue-hi);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16);
}
/* Inline explanation of the hosted build — kept at the bar so the answer is
   where the click happened, instead of a toast over the footer. */
.preview-note {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 5px 12px 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(12, 10, 22, 0.28);
  backdrop-filter: blur(14px) saturate(130%);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: left;
  color: rgba(255, 255, 255, 0.76);
}
.preview-note .ic { width: 12px; height: 12px; flex: none; color: var(--blue-hi); }

/* A click on Fetch re-states the rule right where it was asked for. */
.preview-note.nudge {
  animation: noteNudge 1.5s var(--ease) both;
}
.preview-note.nudge .ic { color: #fff; }
@keyframes noteNudge {
  0% {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(12, 10, 22, 0.28);
    color: rgba(255, 255, 255, 0.76);
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    transform: none;
  }
  16% {
    border-color: rgba(150, 205, 255, 1);
    background: rgba(10, 132, 255, 0.5);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.22), 0 8px 22px -12px rgba(10, 132, 255, 0.9);
    transform: translateY(-1px);
  }
  60% {
    border-color: rgba(120, 185, 255, 0.7);
    background: rgba(10, 132, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    transform: none;
  }
  100% {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(12, 10, 22, 0.28);
    color: rgba(255, 255, 255, 0.76);
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    transform: none;
  }
}
.feature-row { justify-content: flex-start; gap: 6px; margin-top: 16px; }
.feature {
  padding: 4px 9px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  border-color: transparent;
  background: rgba(255, 255, 255, 0.1);
}
.feature:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: transparent;
}
.feature.hint { color: rgba(255, 255, 255, 0.66); }
.feature.hint .ic { color: #fff; }

/* ------------------------------- workspace ------------------------------- */

.workspace {
  gap: 16px;
  padding: 16px 0 0;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card::before { display: none; }

.label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--dim);
}

.start-card { padding: 18px 20px; }
.start-head h3 { font-size: 15px; font-weight: 620; margin-top: 3px; }
.start-grid { gap: 8px; margin-top: 13px; }
.start-step {
  padding: 12px 12px;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.start-step:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}
.step-num { font-size: 20px; color: var(--violet); background: none; -webkit-text-fill-color: currentColor; }
.start-step h4 { font-size: 12px; font-weight: 600; }
.start-step p { font-size: 10.5px; color: var(--dim); }
.start-foot { margin-top: 14px; padding-top: 12px; border-top-color: rgba(255, 255, 255, 0.07); }
.fmt-chips span {
  padding: 2px 6px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  font-size: 9px;
  color: var(--muted);
}

/* -------------------------------- preview -------------------------------- */

.preview { grid-template-columns: 268px minmax(0, 1fr); gap: 16px; padding: 12px; }
.preview-media {
  border-radius: 12px;
  background: #08070d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.preview-media.empty {
  background:
    radial-gradient(120% 120% at 15% 10%, rgba(10, 132, 255, 0.34), transparent 58%),
    radial-gradient(100% 100% at 90% 90%, rgba(255, 107, 157, 0.22), transparent 58%),
    linear-gradient(135deg, #131229, #0a0912);
}
.preview h2 { font-size: 16px; font-weight: 620; margin-top: 7px; }
.preview-meta { font-size: 11.5px; margin-top: 7px; }
.preview-desc { font-size: 12px; margin-top: 8px; color: var(--muted); }
.channel-avatar {
  width: 18px; height: 18px;
  font-size: 9px;
  color: #fff;
  background: var(--grad);
}
.channel-avatar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.preview-play { background: rgba(14, 12, 22, 0.45); }
.preview-play:hover { background: rgba(10, 132, 255, 0.55); }
.player-close { background: rgba(14, 12, 22, 0.66); }
.player-close:hover { background: rgba(10, 132, 255, 0.6); }
.badge {
  border-radius: 6px;
  background: rgba(10, 9, 16, 0.6);
  border-color: rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
}

/* -------------------------------- options -------------------------------- */

.options { padding: 20px 20px 16px; }
.format-head h3 { font-size: 15px; font-weight: 620; margin-top: 3px; }

.segmented {
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.07);
}
.seg-thumb {
  top: 3px; left: 3px;
  width: calc(50% - 4px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.seg-btn { height: 30px; font-size: 12px; font-weight: 550; }
.seg-btn.active { color: #fff; }
.seg-btn .ic { width: 14px; height: 14px; }

.panel { margin-top: 16px; }
.section-label {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--muted);
}
.section-hint { font-size: 10.5px; color: var(--dim); }

.quality-grid { gap: 7px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.quality {
  padding: 10px 11px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.quality:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.065);
  transform: none;
}
.quality .q-name { font-size: 14px; font-weight: 620; }
.quality .q-meta { font-size: 10px; }
.quality .q-tag { background: rgba(255, 214, 10, 0.14); color: #ffe066; }
.quality.selected {
  border-color: rgba(10, 132, 255, 0.65);
  background: rgba(10, 132, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}
.quality .q-check { color: var(--blue-hi); }

/* -------------------------- progressive disclosure ----------------------- */

/* Secondary quality tiers stay out of the way until asked for. */
.quality-grid .q-extra { display: none; }
.quality-grid.expanded .q-extra { display: flex; }

.q-toggle {
  margin-left: 8px;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--blue-hi);
  cursor: pointer;
  border-radius: 4px;
}
.q-toggle:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.q-toggle:focus-visible { outline: 2px solid rgba(90, 169, 255, 0.9); outline-offset: 2px; }

.section-hint {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px;
}

.more-options { background: rgba(255, 255, 255, 0.03); }
.more-options .adv-title { font-weight: 600; }
.more-options .adv-body { padding-top: 2px; }
.more-options .extras-head { margin-top: 16px; }
.more-options.has-active { border-color: rgba(10, 132, 255, 0.32); }
.more-options.has-active .adv-hint { color: rgba(140, 198, 255, 0.92); }

.adv-hint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.two-col { gap: 9px; margin-top: 12px; }
.field { gap: 6px; }
.field > span { font-size: 10.5px; color: var(--dim); font-weight: 500; letter-spacing: 0.01em; }

.select-wrap select,
.text-input {
  height: 36px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12.5px;
}
.select-wrap select:hover,
.text-input:hover { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); }
.select-wrap select:focus,
.text-input:focus {
  border-color: rgba(10, 132, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}
.select-chevron { right: 10px; width: 13px; height: 13px; }

.audio-grid { gap: 7px; }
.audio-opt {
  padding: 10px;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.audio-opt:hover { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.065); transform: none; }
.audio-opt .a-icon { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.audio-opt strong { font-size: 12px; font-weight: 600; }
.audio-opt.selected {
  border-color: rgba(10, 132, 255, 0.65);
  background: rgba(10, 132, 255, 0.14);
}
.audio-opt.selected .a-icon { background: rgba(10, 132, 255, 0.2); color: var(--blue-hi); }

.pill {
  height: 28px;
  padding: 0 12px;
  font-size: 11.5px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.pill:hover { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.07); }
.pill.active {
  border-color: rgba(10, 132, 255, 0.7);
  background: rgba(10, 132, 255, 0.18);
  color: #cfe6ff;
}

/* ------------------------------ audio track ------------------------------ */

.track-block { margin-top: 14px; max-width: 300px; }

/* ---------------------------------- trim --------------------------------- */

.trim-block {
  margin-top: 14px;
  padding: 13px 14px 9px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.trim-block.active {
  border-color: rgba(10, 132, 255, 0.42);
  background: rgba(10, 132, 255, 0.07);
}
.trim-head h4 { font-size: 12.5px; font-weight: 600; }
.trim-range { font-size: 10.5px; }
.trim-block.active .trim-range { color: var(--blue-hi); }
.trim-range,
.trim-scale { font-family: var(--font); font-variant-numeric: tabular-nums; }
.trim-track { background: rgba(255, 255, 255, 0.1); }
.trim-fill {
  background: linear-gradient(90deg, #3d9bff, #0a84ff);
  box-shadow: 0 0 14px -4px rgba(10, 132, 255, 0.9);
}
.trim-input::-webkit-slider-thumb {
  width: 16px; height: 16px;
  margin-top: 9px;
  background: #f5f5f7;
  border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.trim-input::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #f5f5f7;
  border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.trim-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.4); }
.trim-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.4); }
.trim-scale { font-size: 10px; }
.trim-len { color: var(--blue-hi); }

.trim-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.trim-fields .field { gap: 4px; }
.trim-fields .field > span { font-size: 10px; }
.trim-fields .text-input { height: 32px; font-size: 12px; }

.playlist-block {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.pl-item { border-color: rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.28); }
.pl-ph { background: linear-gradient(135deg, #171a2e, #0d0b16); color: var(--dim); }

/* --------------------------------- extras -------------------------------- */

.extras-head { margin: 18px 0 8px; }
.extras-head h3 { font-size: 12.5px; }
.toggles { gap: 6px; }
.toggle-row,
.inline-field {
  padding: 9px 11px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
}
.toggle-row:hover,
.inline-field:hover { border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); }
.toggle-row:has(input:checked) {
  border-color: rgba(10, 132, 255, 0.42);
  background: rgba(10, 132, 255, 0.09);
}
.toggle-icon { width: 27px; height: 27px; border-radius: 8px; background: rgba(255, 255, 255, 0.055); }
.toggle-row:has(input:checked) .toggle-icon { color: var(--blue-hi); background: rgba(10, 132, 255, 0.18); }
.toggle-copy strong { font-size: 11.5px; font-weight: 550; }
.toggle-copy small { font-size: 10px; }

.switch-track {
  width: 34px; height: 20px;
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
}
.switch-knob {
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
input:checked + .switch-track { background: var(--blue); }
input:checked + .switch-track .switch-knob { transform: translateX(14px); }
.toggle-row:active .switch-knob,
.switch:active .switch-knob { width: 16px; }

.check-box {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}
.mini-check input:checked + .check-box { background: var(--blue); color: #fff; }

.advanced {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}
.advanced summary { padding: 10px 13px; }
.adv-title { font-size: 12px; font-weight: 550; }
.adv-hint { font-size: 10px; }
.adv-grid { gap: 10px; }
.adv-body { padding: 0 13px 12px; }
.adv-foot { border-top-color: rgba(255, 255, 255, 0.07); margin-top: 12px; padding-top: 11px; }
.adv-note { font-size: 10px; }

/* -------------------------------- download ------------------------------- */

.dl-bar {
  margin-top: 16px;
  padding-top: 14px;
  border-top-color: rgba(255, 255, 255, 0.08);
}
.dl-title { font-size: 12.5px; font-weight: 600; }
.dl-sub { font-size: 10.5px; }

.primary-btn {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    0 10px 24px -12px rgba(10, 132, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.primary-btn:hover {
  transform: none;
  filter: brightness(1.07);
  box-shadow:
    0 14px 30px -12px rgba(10, 132, 255, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.primary-btn .ic { width: 16px; height: 16px; stroke-width: 2; }

/* --------------------------------- queue --------------------------------- */

.queue {
  top: 16px;
  padding: 16px 14px 12px;
}
.queue-head h3 { font-size: 14px; font-weight: 600; }
.count-pill {
  min-width: 20px;
  height: 18px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}
.queue-empty {
  margin: 12px 0 4px;
  padding: 26px 16px 24px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: radial-gradient(100% 100% at 50% 0%, rgba(10, 132, 255, 0.07), transparent 70%);
}
.empty-art { width: 104px; opacity: 0.8; }
.queue-empty strong { font-size: 12px; font-weight: 550; }
.queue-empty span { font-size: 10.5px; }

.queue-list { gap: 6px; margin: 12px -2px 6px; padding: 0 2px; }
.job {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
}
.job:hover { border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
.job-thumb { width: 72px; height: 44px; border-radius: 7px; background: linear-gradient(135deg, #151a2f, #0b0a14); }
.job-thumb .ph { color: rgba(93, 168, 255, 0.55); background: radial-gradient(80% 80% at 30% 20%, rgba(10, 132, 255, 0.16), transparent 70%); }
.job-title { font-size: 11.5px; font-weight: 500; }
.job-meta { font-size: 9.5px; }
.job[data-status="downloading"] .job-state i,
.job[data-status="processing"] .job-state i { background: var(--blue-hi); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15); }
.job-bar { background: rgba(255, 255, 255, 0.09); }
.job-bar i { background: var(--blue); }
.job[data-status="processing"] .job-bar i { background: linear-gradient(90deg, #1a5fbf, #5aa9ff, #1a5fbf); }
.queue-foot { padding-top: 10px; border-top-color: rgba(255, 255, 255, 0.07); }
.foot-stat span { font-size: 11.5px; font-weight: 600; }
.foot-stat small { font-size: 8.5px; letter-spacing: 0.08em; }

.tip-card {
  padding: 13px 14px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
.tip-icon {
  width: 29px; height: 29px;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.16);
  border-color: rgba(10, 132, 255, 0.24);
  color: var(--blue-hi);
}
.tip-copy strong { font-size: 11px; font-weight: 550; }
.tip-copy span { font-size: 10px; }

/* --------------------------------- buttons ------------------------------- */

.ghost-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11.5px;
  font-weight: 500;
}
.ghost-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  transform: none;
}
.ghost-btn.sm { height: 29px; padding: 0 11px; font-size: 11px; }

.icon-btn {
  border-radius: 8px;
  color: var(--muted);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

/* --------------------------------- modal --------------------------------- */

.modal-backdrop { background: rgba(6, 5, 12, 0.5); backdrop-filter: blur(18px); }
.modal-card {
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 37, 54, 0.9), rgba(22, 20, 32, 0.92));
  backdrop-filter: blur(40px) saturate(140%);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.modal-head { padding: 14px 16px 12px; border-bottom-color: rgba(255, 255, 255, 0.08); }
.modal-head h3 { font-size: 14.5px; font-weight: 600; }
.file-row { border-radius: 9px; }
.file-row:hover { background: rgba(255, 255, 255, 0.06); border-color: transparent; }
.file-ic { width: 28px; height: 28px; border-radius: 7px; background: rgba(10, 132, 255, 0.14); color: var(--blue-hi); }
.file-name { font-size: 11.5px; }

/* --------------------------------- toasts -------------------------------- */

.toast {
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(34, 31, 46, 0.9);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 20px 50px -22px rgba(0, 0, 0, 0.9);
  font-size: 11.5px;
}
.toast .t-ic { border-radius: 6px; background: rgba(10, 132, 255, 0.18); color: var(--blue-hi); }
.toast strong { font-weight: 600; }

/* ---------------------------------- drop --------------------------------- */

.drop-overlay { background: rgba(8, 7, 14, 0.5); backdrop-filter: blur(16px); }
.drop-card {
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}
.drop-card .ic { color: #fff; }
.drop-card strong { font-size: 16px; font-weight: 600; }

/* --------------------------------- footer -------------------------------- */

.footer {
  padding: 16px 0 18px;
  margin-top: 18px;
  border-top-color: rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
}
.brand-mini { color: var(--muted); font-weight: 600; }

/* -------------------------------- scrollbars ----------------------------- */

* { scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.3); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

::selection { background: rgba(10, 132, 255, 0.42); }
:focus-visible { outline-color: rgba(90, 169, 255, 0.9); }

/* ------------------------------- responsive ------------------------------ */

@media (max-width: 1080px) {
  .wrap { margin: 16px auto 24px; max-width: min(1280px, calc(100% - 32px)); }
  main { padding: 0 18px 18px; }
  .preview { grid-template-columns: 240px minmax(0, 1fr); }
  .quality-grid { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); }
}

@media (max-width: 900px) {
  .wrap { margin: 12px auto 20px; max-width: min(1280px, calc(100% - 24px)); }
  .queue { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .preview-note {
    display: flex;
    align-items: flex-start;
    max-width: 100%;
    padding: 7px 11px;
    border-radius: 11px;
    font-size: 11px;
  }
  .preview-note .ic { margin-top: 2px; }

  .wrap {
    margin: 0;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    min-height: 100vh;
  }
  .topbar { height: 50px; padding: 0 14px 0 74px; }
  .chrome-dots { left: 14px; }
  main { padding: 0 14px 16px; }
  .hero { margin: 14px 0 0; padding: 22px 18px 20px; border-radius: 14px; }
  h1 { font-size: clamp(26px, 8.4vw, 34px); }
  .lede { font-size: 13px; }
  .url-bar { margin-top: 16px; padding: 5px 5px 5px 12px; border-radius: 11px; gap: 4px; }
  .url-bar input { height: 40px; font-size: 14px; }
  .fetch-btn { height: 40px; min-width: 88px; padding: 0 14px; border-radius: 8px; }
  .hero-orbs i:nth-child(2),
  .hero-orbs i:nth-child(3),
  .hero-orbs i:nth-child(4) { display: none; }
  .hero-orbs i:nth-child(1) { width: 92px; height: 92px; right: -18px; top: -24px; }
  /* The eyebrow already carries the headline specs — drop the chip wall on
     phones so the banner stays short. */
  .feature-row { display: none; }
  .workspace { padding-top: 12px; }
  /* styles.css switches these to one column at 640; restate it here so the
     wider 1080 breakpoint above doesn't keep two columns on phones. */
  .preview,
  .skeleton-card { grid-template-columns: 1fr; gap: 12px; }
  .preview { padding: 12px; }
  .preview-body { padding: 2px 4px 6px; }
  .options { padding: 16px 14px 14px; }
  .start-card { padding: 16px 14px; }
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
  .primary-btn { height: 42px; }
  .footer { padding-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
