/*
  FUNX Downloader v8.1 — Cursor Editorial System
  Source direction: DESIGN-CURSOR-SOURCE.md
  Principles: warm editorial canvas, hairline depth, scarce orange,
  restrained typography, functional motion, mobile-first interaction.
*/

:root {
  --fx-orange: #f54e00;
  --fx-orange-active: #d04200;
  --fx-ink: #26251e;
  --fx-body: #5a5852;
  --fx-muted: #807d72;
  --fx-muted-soft: #a09c92;
  --fx-canvas: #f7f7f4;
  --fx-canvas-soft: #fafaf7;
  --fx-card: #ffffff;
  --fx-strong: #e6e5e0;
  --fx-line: #e6e5e0;
  --fx-line-soft: #efeee8;
  --fx-line-strong: #cfcdc4;
  --fx-success: #1f8a65;
  --fx-error: #cf2d56;
  --fx-warning: #9a5f0b;
  --fx-thinking: #dfa88f;
  --fx-grep: #9fc9a2;
  --fx-read: #9fbbe0;
  --fx-edit: #c0a8dd;
  --fx-done: #c08532;
  --fx-page: 1200px;
  --fx-narrow: 920px;
  --fx-radius-xs: 4px;
  --fx-radius-sm: 6px;
  --fx-radius-md: 8px;
  --fx-radius-lg: 12px;
  --fx-radius-xl: 16px;
  --fx-motion: 220ms cubic-bezier(.2,.8,.2,1);
  --fx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --fx-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Compatibility aliases for legacy components. */
  --primary: var(--fx-orange);
  --primary-dark: var(--fx-orange-active);
  --secondary: var(--fx-ink);
  --success: var(--fx-success);
  --warning: var(--fx-warning);
  --danger: var(--fx-error);
  --bg-primary: var(--fx-canvas);
  --bg-secondary: var(--fx-canvas-soft);
  --bg-card: var(--fx-card);
  --text-primary: var(--fx-ink);
  --text-secondary: var(--fx-body);
  --text-muted: var(--fx-muted);
  --border-color: var(--fx-line);
  --radius-sm: var(--fx-radius-sm);
  --radius-md: var(--fx-radius-md);
  --radius-lg: var(--fx-radius-lg);
  --radius-xl: var(--fx-radius-xl);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

html[data-theme="dark"] {
  --fx-ink: #f5f3eb;
  --fx-body: #c9c6bb;
  --fx-muted: #9d998d;
  --fx-muted-soft: #767268;
  --fx-canvas: #1f1e19;
  --fx-canvas-soft: #24231d;
  --fx-card: #292821;
  --fx-strong: #39372e;
  --fx-line: #3b3930;
  --fx-line-soft: #302f28;
  --fx-line-strong: #565247;
  --fx-success: #63c5a2;
  --fx-error: #ff7695;
  --fx-warning: #e7b458;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background: var(--fx-canvas);
}

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

body,
body.page-tiktok {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--fx-canvas) !important;
  background-image: none !important;
  color: var(--fx-ink);
  font-family: var(--fx-font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after { display: none !important; }

::selection { background: rgba(245, 78, 0, .18); color: var(--fx-ink); }

a { color: inherit; }
img, video { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--fx-orange) !important;
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--fx-ink);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.18;
}

p { color: var(--fx-body); }
code, pre, kbd, samp { font-family: var(--fx-mono); }
code {
  padding: .12em .35em;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-xs);
  background: var(--fx-card);
  color: var(--fx-ink);
  font-size: .86em;
}

.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.fx-skip-link {
  position: fixed;
  z-index: 9999;
  top: 8px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-radius-md);
  background: var(--fx-card);
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--fx-motion);
}
.fx-skip-link:focus { transform: translateY(0); }

/* Navigation */
.fx-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--fx-line);
  background: color-mix(in srgb, var(--fx-canvas) 94%, transparent) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.fx-nav {
  width: min(calc(100% - 32px), var(--fx-page));
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.fx-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fx-ink) !important;
  text-decoration: none;
}

.fx-brand-badge {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: var(--fx-radius-md);
  background: var(--fx-orange) !important;
  color: #fff;
  box-shadow: none !important;
  font-family: var(--fx-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.05em;
  transition: transform var(--fx-motion), background var(--fx-motion);
}
.fx-brand:hover .fx-brand-badge { transform: rotate(-3deg); background: var(--fx-orange-active) !important; }

.fx-brand-title { display: flex; flex-direction: column; line-height: 1.08; }
.fx-brand-title strong { color: var(--fx-ink); font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.fx-brand-title span { margin-top: 3px; color: var(--fx-muted); font-family: var(--fx-mono); font-size: 10px; letter-spacing: .02em; }

.fx-navlinks {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.fx-navlinks a {
  position: relative;
  padding: 9px 11px;
  border-radius: var(--fx-radius-md);
  color: var(--fx-body) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--fx-motion), background var(--fx-motion);
}
.fx-navlinks a::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 5px;
  left: 11px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--fx-orange);
  transition: transform var(--fx-motion);
}
.fx-navlinks a:hover,
.fx-navlinks a[aria-current="page"] { color: var(--fx-ink) !important; background: var(--fx-card) !important; }
.fx-navlinks a:hover::after,
.fx-navlinks a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.fx-actions { display: flex; align-items: center; gap: 8px; }
.fx-lang {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-md);
  background: var(--fx-card) !important;
}
.fx-lang button {
  min-width: 32px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--fx-radius-sm);
  background: transparent;
  color: var(--fx-muted);
  font-family: var(--fx-mono);
  font-size: 11px;
  cursor: pointer;
}
.fx-lang button.active { background: var(--fx-ink) !important; color: var(--fx-canvas) !important; }
.fx-ig { color: var(--fx-body) !important; text-decoration: none; font-size: 13px; }
.fx-ig:hover { color: var(--fx-orange) !important; }
.fx-menu-btn {
  display: none;
  min-width: 44px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-radius-md);
  background: var(--fx-card);
  color: var(--fx-ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.fx-mobile { border-top: 1px solid var(--fx-line); background: var(--fx-canvas) !important; }
.fx-mobile-panel { width: min(calc(100% - 32px), var(--fx-page)); margin: 0 auto; padding: 12px 0 18px; }
.fx-mobile-links { display: grid; }
.fx-mobile-links a {
  min-height: 48px;
  padding: 12px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fx-line);
  color: var(--fx-ink) !important;
  text-decoration: none;
  font-size: 15px;
}
.fx-mobile-meta { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; color: var(--fx-muted); }

/* Buttons */
.btn,
.download-button,
button.btn,
a.btn {
  min-height: 40px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--fx-radius-md) !important;
  box-shadow: none !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, background var(--fx-motion), border-color var(--fx-motion), color var(--fx-motion);
}
.btn:active,
.download-button:active { transform: translateY(1px) scale(.99); }
.btn-primary,
.download-button {
  border-color: var(--fx-orange) !important;
  background: var(--fx-orange) !important;
  color: #fff !important;
}
.btn-primary:hover,
.download-button:hover { border-color: var(--fx-orange-active) !important; background: var(--fx-orange-active) !important; }
.btn-secondary {
  border-color: var(--fx-line-strong) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
}
.btn-secondary:hover { border-color: var(--fx-ink) !important; background: var(--fx-canvas-soft) !important; }
.btn-dark { border-color: var(--fx-ink) !important; background: var(--fx-ink) !important; color: var(--fx-canvas) !important; }
.btn-xs { min-height: 34px; padding: 8px 11px; font-size: 12px; }
.btn-lg { min-height: 44px; padding: 12px 20px; }
.btn-icon { min-width: 42px; }
button[disabled] { opacity: .48; cursor: not-allowed; transform: none !important; }

/* Shared page shell */
.container,
.fx-page {
  width: min(calc(100% - 32px), var(--fx-page)) !important;
  max-width: none !important;
  margin-inline: auto;
  padding-inline: 0 !important;
}
.container-sm { width: min(calc(100% - 32px), var(--fx-narrow)) !important; }
.fx-page { padding-top: clamp(48px, 7vw, 88px) !important; padding-bottom: 80px !important; }

.site-footer,
.fx-footer {
  margin-top: 80px !important;
  padding: 40px 0 56px !important;
  border-top: 1px solid var(--fx-line) !important;
  background: transparent !important;
  color: var(--fx-body) !important;
}
.footer-row,
.fx-footer-inner {
  width: min(calc(100% - 32px), var(--fx-page));
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.fx-foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fx-foot-links a,
.site-footer a { color: var(--fx-body) !important; text-decoration: none; font-size: 13px; }
.fx-foot-links a:hover,
.site-footer a:hover { color: var(--fx-orange) !important; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-link {
  padding: 9px 12px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-md);
  background: var(--fx-card);
  color: var(--fx-ink) !important;
  text-decoration: none;
  font-size: 13px;
}

/* Home */
.home-shell { width: min(calc(100% - 32px), var(--fx-page)); margin: 0 auto; }
.home-hero {
  min-height: auto !important;
  padding: clamp(68px, 10vw, 128px) 0 72px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
  text-align: left !important;
  border-bottom: 1px solid var(--fx-line);
  background: transparent !important;
}
.home-hero::before,
.home-hero::after { display: none !important; }
.home-kicker,
.eyebrow {
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fx-muted);
  font-family: var(--fx-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-kicker::before,
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--fx-orange); }
.home-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--fx-ink);
  font-size: clamp(48px, 7.2vw, 82px) !important;
  font-weight: 400 !important;
  line-height: 1.02;
  letter-spacing: -.048em;
}
.home-hero h1 em { color: var(--fx-orange); font-style: normal; }
.home-hero p {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--fx-body) !important;
  font-size: clamp(17px, 2vw, 20px) !important;
  line-height: 1.55;
}
.home-hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.home-proof { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--fx-muted); font-family: var(--fx-mono); font-size: 11px; }
.home-proof span { display: inline-flex; align-items: center; gap: 7px; }
.home-proof span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fx-success); }

.product-window {
  overflow: hidden;
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-radius-lg);
  background: var(--fx-card);
  transform: rotate(.8deg);
  transition: transform 500ms cubic-bezier(.2,.8,.2,1);
}
.product-window:hover { transform: rotate(0deg) translateY(-3px); }
.product-window__bar {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fx-line);
  background: var(--fx-canvas-soft);
  color: var(--fx-muted);
  font-family: var(--fx-mono);
  font-size: 10px;
}
.product-window__dots { display: flex; gap: 5px; }
.product-window__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fx-line-strong); }
.product-window__body { padding: 24px; }
.product-link {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-radius-md);
  background: var(--fx-canvas-soft);
  color: var(--fx-body);
  font-family: var(--fx-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-link::before { content: "↗"; color: var(--fx-orange); }
.product-timeline { margin-top: 18px; display: grid; gap: 10px; }
.product-stage {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--fx-body);
  font-family: var(--fx-mono);
  font-size: 11px;
}
.timeline-pill {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #26251e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.timeline-pill.thinking { background: var(--fx-thinking); }
.timeline-pill.read { background: var(--fx-read); }
.timeline-pill.edit { background: var(--fx-edit); }
.timeline-pill.done { background: var(--fx-done); color: #fff; }
.product-stage__line { height: 1px; background: var(--fx-line); }
.product-stage__status { color: var(--fx-muted); }
.product-result {
  margin-top: 22px;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--fx-line);
}
.product-result__thumb { aspect-ratio: 4/5; border-radius: var(--fx-radius-md); background: linear-gradient(145deg, #28251f, #8c4b29); }
.product-result h3 { margin: 0 0 5px; font-size: 15px; font-weight: 600; }
.product-result p { margin: 0; font-family: var(--fx-mono); font-size: 10px; }
.product-result__btn { padding: 9px 12px; border-radius: var(--fx-radius-md); background: var(--fx-ink); color: var(--fx-canvas); font-size: 12px; }

.home-section { padding: 80px 0; border-bottom: 1px solid var(--fx-line); }
.section-head { margin-bottom: 36px; display: grid; grid-template-columns: 1fr minmax(260px, 420px); align-items: end; gap: 40px; }
.section-head h2 { margin: 0; max-width: 700px; font-size: clamp(34px, 4.4vw, 54px); font-weight: 400; letter-spacing: -.042em; }
.section-head p { margin: 0; font-size: 16px; }
.platforms-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border-top: 1px solid var(--fx-line);
  border-left: 1px solid var(--fx-line);
}
.platform-card {
  position: relative;
  min-height: 280px;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  border: 0 !important;
  border-right: 1px solid var(--fx-line) !important;
  border-bottom: 1px solid var(--fx-line) !important;
  border-radius: 0 !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
  text-align: left !important;
  text-decoration: none;
  transition: background var(--fx-motion), transform var(--fx-motion) !important;
}
.platform-card:hover { z-index: 1; background: var(--fx-canvas-soft) !important; transform: translateY(-2px) !important; }
.platform-card::after { content: "↗"; position: absolute; top: 22px; right: 22px; color: var(--fx-muted); font-family: var(--fx-mono); }
.platform-card .platform-icon { margin: 0 0 auto !important; color: var(--fx-ink) !important; font-size: 28px !important; }
.platform-card h3 { margin: 36px 0 8px !important; font-size: 22px !important; font-weight: 400 !important; }
.platform-card p { margin: 0 0 22px; color: var(--fx-body) !important; font-size: 14px; }
.platform-badge,
.badge {
  width: max-content;
  padding: 5px 9px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fx-strong) !important;
  color: var(--fx-ink) !important;
  font-family: var(--fx-mono);
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.badge-success { background: rgba(31,138,101,.14) !important; color: var(--fx-success) !important; }
.badge-warning { background: rgba(192,133,50,.16) !important; color: var(--fx-warning) !important; }

.features-section { padding: 80px 0 !important; border-bottom: 1px solid var(--fx-line); }
.features-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 16px !important;
}
.feature-item {
  min-height: 220px;
  padding: 24px !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
  text-align: left !important;
}
.feature-icon { margin: 0 0 auto !important; color: var(--fx-orange) !important; font-size: 20px !important; }
.feature-item h4 { margin: 42px 0 8px !important; font-size: 18px !important; font-weight: 600 !important; }
.feature-item p { margin: 0; color: var(--fx-body) !important; font-size: 14px; }

.home-cta {
  padding: 96px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.home-cta h2 { margin: 0; max-width: 760px; font-size: clamp(36px, 5vw, 64px); font-weight: 400; letter-spacing: -.045em; }

/* TikTok workspace */
.page-tiktok .container-sm { width: min(calc(100% - 32px), var(--fx-page)) !important; }
.fx-status {
  margin: 14px 0 0 !important;
  padding: 11px 13px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  font-size: 13px;
}
.download-shell { padding: clamp(52px, 8vw, 92px) 0 80px; }
.download-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.7fr); gap: clamp(36px, 6vw, 84px); align-items: start; }
.download-intro { position: sticky; top: 100px; }
.download-intro .eyebrow { margin-bottom: 20px; }
.download-intro h1 { margin: 0; font-size: clamp(44px, 6vw, 72px); font-weight: 400; letter-spacing: -.05em; }
.download-intro > p { margin: 22px 0 0; max-width: 360px; font-size: 17px; }
.download-intro__facts { margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--fx-line); }
.download-intro__facts li { padding: 14px 0; display: grid; grid-template-columns: 24px 1fr; gap: 10px; border-bottom: 1px solid var(--fx-line); color: var(--fx-body); font-size: 13px; }
.download-intro__facts b { color: var(--fx-ink); font-weight: 600; }
.download-intro__facts span:first-child { color: var(--fx-orange); font-family: var(--fx-mono); }
.download-intro__actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }

.tiktok-header { display: none !important; }
.tiktok-download-card {
  margin: 0 !important;
  padding: clamp(24px, 4vw, 38px) !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
}
.workspace-head { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.workspace-head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 400; }
.workspace-head p { margin: 8px 0 0; max-width: 560px; font-size: 14px; }
.workspace-status { display: inline-flex; align-items: center; gap: 7px; color: var(--fx-muted); font-family: var(--fx-mono); font-size: 10px; white-space: nowrap; }
.workspace-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fx-success); animation: statusPulse 2s ease-in-out infinite; }
@keyframes statusPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,138,101,.25); } 50% { box-shadow: 0 0 0 6px rgba(31,138,101,0); } }

.url-input-group {
  padding: 6px !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto auto auto;
  gap: 6px !important;
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-radius-lg);
  background: var(--fx-canvas-soft);
}
.url-input {
  width: 100%;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: var(--fx-radius-md) !important;
  background: transparent !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
  font-family: var(--fx-mono);
  font-size: 13px;
  outline: none;
}
.url-input::placeholder { color: var(--fx-muted-soft) !important; }
.url-input-group:focus-within { border-color: var(--fx-orange); box-shadow: 0 0 0 3px rgba(245,78,0,.08); }
.url-input-group .btn,
.url-input-group .download-button { min-height: 48px; }

.fx-inline-row { margin-top: 12px !important; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.fx-chip {
  padding: 4px 9px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fx-thinking) !important;
  color: #26251e !important;
  font-family: var(--fx-mono);
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fx-inline-hint { color: var(--fx-muted) !important; font-size: 12px !important; }
.fx-inline-hint b { color: var(--fx-ink); font-family: var(--fx-mono); font-weight: 500; }

.fx-toggle { margin-top: 22px !important; display: inline-flex !important; align-items: center; gap: 10px; color: var(--fx-body) !important; font-size: 13px; cursor: pointer; }
.fx-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.fx-toggle__ui {
  width: 34px !important;
  height: 20px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: 999px !important;
  background: var(--fx-strong) !important;
  transition: background var(--fx-motion), border-color var(--fx-motion);
}
.fx-toggle__ui::after {
  width: 14px !important;
  height: 14px !important;
  top: 2px !important;
  left: 2px !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
}
.fx-toggle input:checked + .fx-toggle__ui { border-color: var(--fx-orange) !important; background: var(--fx-orange) !important; }
.fx-toggle input:checked + .fx-toggle__ui::after { transform: translateX(14px) !important; }

.fx-first-run {
  margin-top: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--fx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.fx-first-run__head { padding-top: 20px; display: flex; align-items: center; gap: 10px; }
.fx-first-run__badge {
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: var(--fx-read) !important;
  color: #26251e !important;
  font-family: var(--fx-mono);
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fx-first-run__title { color: var(--fx-ink) !important; font-size: 14px; font-weight: 600; }
.fx-first-run__list { margin: 16px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; list-style: none; background: var(--fx-line); border: 1px solid var(--fx-line); }
.fx-first-run__list li { min-height: 96px; padding: 15px !important; background: var(--fx-card); color: var(--fx-body); font-size: 12px; }
.fx-first-run__list li b { display: block; margin-bottom: 7px; color: var(--fx-ink); font-family: var(--fx-mono); font-size: 11px; }
.fx-first-run__row { margin-top: 12px !important; display: flex; flex-wrap: wrap; gap: 8px; }

.fx-retry {
  margin-top: 22px !important;
  padding: 16px !important;
  border: 1px solid rgba(207,45,86,.28) !important;
  border-radius: var(--fx-radius-md) !important;
  background: rgba(207,45,86,.045) !important;
  color: var(--fx-ink) !important;
}
.fx-retry__pill { border-radius: 999px !important; background: var(--fx-error) !important; color: #fff !important; font-family: var(--fx-mono); }
.fx-retry__bar { background: var(--fx-line) !important; }
.fx-retry__barFill { background: var(--fx-error) !important; }
.fx-retry__sub { color: var(--fx-body) !important; }

.trust-row { margin: 24px 0 0; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--fx-line); color: var(--fx-muted); font-family: var(--fx-mono); font-size: 10px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--fx-success); }

.loading-container,
.result-container {
  margin-top: 28px !important;
  padding-top: 28px !important;
  border-top: 1px solid var(--fx-line);
}
.loading-container { color: var(--fx-body); text-align: left !important; }
.spinner {
  width: 20px !important;
  height: 20px !important;
  margin: 0 0 12px !important;
  border: 2px solid var(--fx-line) !important;
  border-top-color: var(--fx-orange) !important;
  box-shadow: none !important;
}
.fx-skeleton { border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius-md) !important; background: var(--fx-canvas-soft) !important; }
.fx-skel-thumb,
.fx-skel-line { background: linear-gradient(90deg,var(--fx-line-soft),var(--fx-strong),var(--fx-line-soft)) !important; background-size: 200% 100% !important; }
.fx-steps { margin-top: 18px; display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 1px !important; border: 1px solid var(--fx-line); background: var(--fx-line); }
.fx-step {
  min-height: 52px;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fx-card) !important;
  color: var(--fx-muted) !important;
}
.fx-step-dot { width: 8px !important; height: 8px !important; background: var(--fx-line-strong) !important; box-shadow: none !important; }
.fx-step-text { font-family: var(--fx-mono); font-size: 10px !important; font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase; }
.fx-step.is-active { background: color-mix(in srgb, var(--fx-thinking) 40%, var(--fx-card)) !important; color: var(--fx-ink) !important; }
.fx-step.is-active .fx-step-dot { background: var(--fx-thinking) !important; box-shadow: none !important; }
.fx-step.is-done { background: color-mix(in srgb, var(--fx-done) 16%, var(--fx-card)) !important; color: var(--fx-ink) !important; }
.fx-step.is-done .fx-step-dot { background: var(--fx-done) !important; box-shadow: none !important; }

#resultTitle { margin: 0 0 16px !important; font-size: 18px !important; font-weight: 600 !important; }
.fx-preview-card {
  overflow: hidden;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
}
.fx-preview-media { background: var(--fx-ink) !important; }
.fx-preview-meta { padding: 22px !important; }
.fx-preview-title { color: var(--fx-ink) !important; font-size: 20px !important; font-weight: 400 !important; letter-spacing: -.025em; }
.fx-preview-sub,
.fx-caption { color: var(--fx-body) !important; }
.fx-author-row { border-color: var(--fx-line) !important; }
.fx-avatar { border: 1px solid var(--fx-line) !important; background: var(--fx-canvas-soft) !important; }
.fx-verified { color: var(--fx-success) !important; }
.fx-mini-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-mini-actions .btn { min-height: 36px; padding: 8px 11px; }

.download-options-grid,
.download-buttons-grid { margin-top: 14px !important; display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px !important; }
.download-option,
.btn-download-video,
.btn-download-audio {
  min-height: 78px !important;
  padding: 16px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
}
.download-option:hover,
.btn-download-video:hover,
.btn-download-audio:hover { border-color: var(--fx-orange) !important; background: var(--fx-canvas-soft) !important; }

.fx-carousel,
.fx-carousel-premium,
.fx-grid-wrap,
.fx-carousel-track-wrap { border-color: var(--fx-line) !important; background: var(--fx-canvas-soft) !important; }
.fx-car-nav { border: 1px solid var(--fx-line-strong) !important; background: var(--fx-card) !important; color: var(--fx-ink) !important; box-shadow: none !important; }
.fx-dot { background: var(--fx-line-strong) !important; }
.fx-dot.active { background: var(--fx-orange) !important; }
.fx-thumb { border-color: var(--fx-line) !important; }
.fx-thumb.active { border-color: var(--fx-orange) !important; }
.fx-photo-tools,
.fx-carousel-actions,
.fx-carousel-controls { border-color: var(--fx-line) !important; }
.fx-grid { gap: 10px !important; }
.fx-grid-item { border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius-md) !important; background: var(--fx-card) !important; }
.fx-check { background: var(--fx-card) !important; border-color: var(--fx-line-strong) !important; }

.fx-dlall { border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius-md) !important; background: var(--fx-canvas-soft) !important; }
.fx-dlall__bar { background: var(--fx-line) !important; }
.fx-dlall__barFill { background: var(--fx-orange) !important; }
.fx-error-tools { border: 1px solid rgba(207,45,86,.25) !important; border-radius: var(--fx-radius-md) !important; background: rgba(207,45,86,.04) !important; }
.fx-reqid { font-family: var(--fx-mono); color: var(--fx-muted) !important; }

.download-secondary-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tips-box,
.history-section {
  margin-top: 0 !important;
  padding: 24px !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
}
.tips-box h4,
.history-section h4 { margin: 0; font-size: 18px !important; font-weight: 600 !important; }
.fx-tips { margin: 18px 0 0 !important; padding: 0 !important; display: grid !important; grid-template-columns: 1fr !important; gap: 0 !important; list-style: none; }
.fx-tips li { padding: 12px 0 !important; display: grid !important; grid-template-columns: 26px 1fr; gap: 10px; border-top: 1px solid var(--fx-line); color: var(--fx-body) !important; font-size: 13px; }
.tip-ico { color: var(--fx-orange) !important; }
.fx-history-head { display: grid !important; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.fx-history-head h4 { grid-column: 1; grid-row: 1; }
.fx-history-tools { grid-column: 1 / -1; grid-row: 2; }
.fx-history-search {
  width: 100%;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-canvas-soft) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
}
.history-items { margin-top: 14px; }
.fx-history-day { margin: 18px 0 8px !important; color: var(--fx-muted) !important; font-family: var(--fx-mono); font-size: 10px !important; letter-spacing: .06em; text-transform: uppercase; }
.history-item {
  margin: 0 !important;
  padding: 12px 0 !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0,1fr);
  gap: 12px;
  border: 0 !important;
  border-top: 1px solid var(--fx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.history-thumb { width: 52px !important; height: 60px !important; border-radius: var(--fx-radius-sm) !important; background-color: var(--fx-strong) !important; }
.history-title { color: var(--fx-ink) !important; font-size: 13px !important; font-weight: 600 !important; }
.history-meta { color: var(--fx-muted) !important; font-family: var(--fx-mono); font-size: 9px !important; }
.history-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Settings, PWA, modal */
.fx-settings-trigger { min-width: 40px; min-height: 40px; padding: 0 12px; }
.fx-bottom-bar {
  position: fixed !important;
  z-index: 120;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: none !important;
  grid-template-columns: 44px 44px minmax(0,1fr);
  gap: 8px;
  border-top: 1px solid var(--fx-line);
  background: color-mix(in srgb, var(--fx-canvas) 95%, transparent) !important;
  backdrop-filter: blur(14px);
}
.fx-bottom-mini { padding: 0 !important; }
.fx-bottom-btn { min-height: 46px; }
.fx-install {
  position: fixed !important;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  left: auto !important;
  width: min(420px, calc(100% - 36px));
  padding: 16px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
}
.fx-install__title { color: var(--fx-ink) !important; font-size: 14px; font-weight: 600; }
.fx-install__sub { color: var(--fx-body) !important; font-size: 12px; }
.fx-install__close { border: 0; background: transparent; color: var(--fx-muted); }
.ig-fab { display: none !important; }

.fx-drawer,
.fx-modal { position: fixed; inset: 0; z-index: 500; pointer-events: none; opacity: 0; transition: opacity var(--fx-motion); }
.fx-drawer.is-open,
.fx-modal.is-open { pointer-events: auto; opacity: 1; }
.fx-drawer__overlay,
.fx-modal__overlay { position: absolute; inset: 0; background: rgba(38,37,30,.32) !important; backdrop-filter: blur(3px); }
.fx-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  padding: 22px;
  overflow: auto;
  border-left: 1px solid var(--fx-line-strong) !important;
  background: var(--fx-canvas) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1);
}
.fx-drawer.is-open .fx-drawer__panel { transform: translateX(0); }
.fx-drawer__head { padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--fx-line); }
.fx-drawer__title { font-size: 18px; font-weight: 600; }
.fx-drawer__section { border-color: var(--fx-line) !important; }
.fx-row { padding: 16px 0 !important; border-color: var(--fx-line) !important; }
.fx-row__label { color: var(--fx-ink) !important; }
.fx-row__hint { color: var(--fx-muted) !important; }
.fx-select { min-height: 40px; padding: 0 10px; border: 1px solid var(--fx-line-strong) !important; border-radius: var(--fx-radius-md) !important; background: var(--fx-card) !important; color: var(--fx-ink) !important; }
.fx-switch span { background: var(--fx-strong) !important; border-color: var(--fx-line-strong) !important; }
.fx-switch input:checked + span { background: var(--fx-orange) !important; border-color: var(--fx-orange) !important; }
.fx-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  transform: translate(-50%,-48%) scale(.98);
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
  transition: transform var(--fx-motion);
}
.fx-modal.is-open .fx-modal__panel { transform: translate(-50%,-50%) scale(1); }
.fx-modal__head { border-color: var(--fx-line) !important; }
.fx-modal__body { background: var(--fx-canvas-soft) !important; }

/* Legal, FAQ, changelog */
.fx-hero,
.fx-card {
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
}
.fx-page > .fx-card:first-child { padding: clamp(28px, 5vw, 48px) !important; }
.fx-page > .fx-card + .fx-card { margin-top: 16px !important; }
.fx-title { margin: 0 0 8px !important; font-size: clamp(32px, 5vw, 52px) !important; font-weight: 400 !important; letter-spacing: -.04em; }
.fx-card h2.fx-title { font-size: 24px !important; letter-spacing: -.025em; }
.fx-sub { margin: 0 0 24px !important; max-width: 720px; color: var(--fx-body) !important; }
.fx-search { margin: 30px 0 18px !important; padding-top: 22px; display: grid !important; grid-template-columns: minmax(0,1fr) 220px auto; gap: 8px !important; border-top: 1px solid var(--fx-line); }
.fx-search input,
.fx-search select {
  min-height: 44px;
  padding: 0 13px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-canvas-soft) !important;
  color: var(--fx-ink) !important;
}
.fx-search input::placeholder { color: var(--fx-muted-soft) !important; }
.fx-faq-list { display: grid !important; gap: 0 !important; border-top: 1px solid var(--fx-line); }
.fx-faq-item {
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--fx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.fx-faq-item summary { padding: 20px 34px 20px 0; position: relative; color: var(--fx-ink); font-size: 17px; font-weight: 500; list-style: none; cursor: pointer; }
.fx-faq-item summary::-webkit-details-marker { display: none; }
.fx-faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 18px; color: var(--fx-orange); font-family: var(--fx-mono); font-size: 18px; }
.fx-faq-item[open] summary::after { content: "−"; }
.fx-faq-item .meta { margin: -14px 0 16px !important; color: var(--fx-muted) !important; font-family: var(--fx-mono); font-size: 10px !important; text-transform: uppercase; letter-spacing: .06em; }
.fx-faq-item > div:not(.meta) { padding: 0 34px 20px 0; color: var(--fx-body); }
.fx-faq-item p,
.fx-faq-item li,
.fx-card p,
.fx-card li { color: var(--fx-body); }
.fx-card a { color: var(--fx-orange); }
.fx-card hr { border: 0; border-top: 1px solid var(--fx-line); }

/* Coming soon */
.cs-wrap,
.coming-soon-container {
  width: min(calc(100% - 32px), var(--fx-page)) !important;
  min-height: calc(100vh - 64px);
  margin: 0 auto !important;
  padding: clamp(64px, 10vw, 120px) 0 !important;
  display: grid !important;
  place-items: center;
  background: transparent !important;
}
.cs-grid { width: 100%; display: grid !important; grid-template-columns: minmax(0,1.45fr) minmax(280px,.55fr); gap: 16px !important; }
.cs-card,
.coming-soon-card {
  overflow: hidden;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
}
.cs-hero { padding: clamp(30px, 5vw, 54px) !important; border-bottom: 1px solid var(--fx-line) !important; background: var(--fx-canvas-soft) !important; }
.cs-badge { width: max-content; padding: 5px 9px !important; border-radius: 999px !important; background: var(--fx-thinking) !important; color: #26251e !important; font-family: var(--fx-mono); font-size: 10px !important; letter-spacing: .06em; text-transform: uppercase; }
.cs-title,
.coming-soon-title { margin: 24px 0 0 !important; color: var(--fx-ink) !important; font-size: clamp(46px, 7vw, 82px) !important; font-weight: 400 !important; letter-spacing: -.05em; }
.grad { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--fx-ink) !important; }
.cs-desc,
.coming-soon-message { max-width: 640px; color: var(--fx-body) !important; font-size: 17px !important; }
.cs-body { padding: clamp(24px, 4vw, 40px) !important; }
.cs-progress { padding: 0 0 24px !important; border: 0 !important; border-bottom: 1px solid var(--fx-line) !important; border-radius: 0 !important; background: transparent !important; }
.cs-meter { height: 5px !important; background: var(--fx-line) !important; }
.cs-meter > div { background: var(--fx-orange) !important; }
.cs-chip { border: 0 !important; border-radius: 999px !important; background: var(--fx-strong) !important; color: var(--fx-ink) !important; font-family: var(--fx-mono); font-size: 10px !important; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 404 */
.error-container {
  min-height: 100vh !important;
  padding: 32px !important;
  display: grid !important;
  place-items: center;
  background: var(--fx-canvas) !important;
}
.error-content {
  width: min(760px, 100%);
  max-width: 760px !important;
  padding: clamp(32px, 7vw, 72px) !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-card) !important;
  box-shadow: none !important;
  text-align: left !important;
}
.error-icon { margin: 0 0 26px !important; color: var(--fx-orange) !important; font-size: 28px !important; animation: none !important; }
.error-code { margin: 0 !important; background: none !important; color: var(--fx-ink) !important; -webkit-text-fill-color: currentColor !important; font-family: var(--fx-mono); font-size: clamp(76px, 15vw, 144px) !important; font-weight: 400 !important; letter-spacing: -.08em; }
.error-title { margin: 10px 0 0 !important; color: var(--fx-ink) !important; font-size: clamp(28px, 5vw, 48px) !important; font-weight: 400 !important; }
.error-message { max-width: 620px; color: var(--fx-body) !important; }
.error-actions { margin: 28px 0 0 !important; justify-content: flex-start !important; }
.quick-links { border-color: var(--fx-line) !important; }
.links-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
.link-card { border: 1px solid var(--fx-line) !important; border-radius: var(--fx-radius-md) !important; background: var(--fx-canvas-soft) !important; color: var(--fx-ink) !important; box-shadow: none !important; }
.link-card:hover { border-color: var(--fx-orange) !important; transform: translateY(-2px) !important; }

/* Tooltip + toast */
.fx-tip { border: 1px solid var(--fx-line-strong) !important; background: var(--fx-card) !important; color: var(--fx-muted) !important; }
.fx-tip-bubble {
  max-width: 260px;
  padding: 10px 12px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-ink) !important;
  color: var(--fx-canvas) !important;
  box-shadow: none !important;
}
.fx-toast-wrap,
.toast-stack { position: fixed; z-index: 800; right: 14px; bottom: 14px; display: grid; gap: 8px; }
.fx-toast,
.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 38px 14px 14px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: var(--fx-radius-md) !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: none !important;
  animation: toastIn 240ms cubic-bezier(.2,.8,.2,1);
}
.fx-toast p,
.toast p { color: var(--fx-body) !important; }
.fx-toast .x { color: var(--fx-muted) !important; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Motion system */
[data-reveal],
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms cubic-bezier(.2,.8,.2,1), transform 650ms cubic-bezier(.2,.8,.2,1); }
[data-reveal].in-view,
.reveal.in-view { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }

@media (max-width: 1024px) {
  .home-hero { grid-template-columns: 1fr; }
  .product-window { width: min(720px, 100%); transform: none; }
  .platforms-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .features-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .download-layout { grid-template-columns: 1fr; gap: 32px; }
  .download-intro { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: end; }
  .download-intro__facts { margin-top: 0; }
  .download-intro__actions { grid-column: 1 / -1; margin-top: 0; }
  .cs-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  body.page-tiktok { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .fx-nav { width: min(calc(100% - 24px), var(--fx-page)); min-height: 60px; gap: 12px; }
  .fx-brand-title span { display: none; }
  .fx-navlinks,
  .fx-actions .fx-ig,
  .fx-actions .fx-lang { display: none !important; }
  .fx-menu-btn { display: inline-flex; align-items: center; margin-left: auto; }
  .fx-mobile-panel { width: min(calc(100% - 24px), var(--fx-page)); }
  .container,
  .fx-page,
  .home-shell,
  .page-tiktok .container-sm { width: min(calc(100% - 24px), var(--fx-page)) !important; }
  .home-hero { padding: 58px 0 54px !important; gap: 42px; }
  .home-hero h1 { font-size: clamp(42px, 13vw, 58px) !important; }
  .home-hero p { font-size: 17px !important; }
  .product-window__body { padding: 18px; }
  .product-stage { grid-template-columns: 74px 1fr; }
  .product-stage__status { display: none; }
  .product-result { grid-template-columns: 58px 1fr; }
  .product-result__btn { grid-column: 1 / -1; text-align: center; }
  .home-section,
  .features-section { padding: 58px 0 !important; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section-head h2 { font-size: 38px; }
  .platforms-grid,
  .features-grid { grid-template-columns: 1fr !important; }
  .platform-card { min-height: 230px; }
  .home-cta { padding: 68px 0; grid-template-columns: 1fr; }
  .footer-row,
  .fx-footer-inner { width: min(calc(100% - 24px), var(--fx-page)); flex-direction: column; }

  .download-shell { padding: 48px 0 40px; }
  .download-intro { display: block; }
  .download-intro h1 { font-size: 48px; }
  .download-intro__facts { margin-top: 28px; }
  .tiktok-download-card { padding: 20px !important; }
  .workspace-head { display: block; }
  .workspace-status { margin-top: 12px; }
  .url-input-group { grid-template-columns: 1fr auto auto !important; }
  .url-input-group .download-button { grid-column: 1 / -1; }
  .url-input-group .btn-text { display: none; }
  .fx-inline-row { align-items: flex-start; flex-direction: column; }
  .fx-first-run__list { grid-template-columns: 1fr; }
  .fx-first-run__list li { min-height: 0; }
  .fx-steps { grid-template-columns: 1fr !important; }
  .download-options-grid,
  .download-buttons-grid,
  .download-secondary-grid { grid-template-columns: 1fr !important; }
  .fx-bottom-bar { display: grid !important; }
  .fx-install { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .tips-box,
  .history-section { padding: 20px !important; }

  .fx-page { padding-top: 46px !important; }
  .fx-title { font-size: 36px !important; }
  .fx-search { grid-template-columns: 1fr !important; }
  .fx-search > div { margin-left: 0 !important; }
  .cs-wrap,
  .coming-soon-container { width: min(calc(100% - 24px), var(--fx-page)) !important; padding: 48px 0 !important; }
  .cs-title,
  .coming-soon-title { font-size: 50px !important; }
  .error-container { padding: 12px !important; }
  .error-content { padding: 26px 20px !important; }
  .links-grid { grid-template-columns: 1fr !important; }
  .fx-toast-wrap,
  .toast-stack { right: 10px; bottom: calc(84px + env(safe-area-inset-bottom)); left: 10px; }
  .fx-toast,
  .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 420px) {
  .fx-brand-title strong { font-size: 13px; }
  .home-hero h1 { font-size: 42px !important; }
  .url-input-group { grid-template-columns: minmax(0,1fr) 42px 42px !important; }
  .url-input-group .btn { padding: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .fx-header,
  .fx-bottom-bar,
  .fx-install,
  .ig-fab,
  .fx-drawer,
  .fx-modal { display: none !important; }
  body { background: #fff !important; }
}

/* Ensure drawer/modal can animate instead of snapping through legacy display:none. */
.fx-drawer,
.fx-modal {
  display: block !important;
  visibility: hidden;
}
.fx-drawer.is-open,
.fx-modal.is-open {
  visibility: visible;
}
body.fx-menu-open { overflow: hidden; }

/* Final fidelity rules: solid surfaces, language FOUC prevention, print hygiene. */
.fx-header,
.fx-bottom-bar {
  background: var(--fx-canvas) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.fx-drawer__overlay,
.fx-modal__overlay { backdrop-filter: none !important; }
.product-result__thumb { background: #d8a080 !important; }
html[lang="id"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="id"] { display: none; }
@media print {
  .fx-drawer,
  .fx-modal { display: none !important; }
}

/* Legacy reset overrides that must be explicit, not inherited. */
.home-hero {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--fx-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.home-hero h1 {
  background: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--fx-ink) !important;
}
.home-hero h1 em { color: var(--fx-orange) !important; -webkit-text-fill-color: currentColor !important; }
.platforms-grid,
.features-grid { margin: 0 !important; }
.fx-actions,
.fx-lang { flex: 0 0 auto !important; width: auto !important; }
.fx-navlinks { flex: 0 1 auto; }

/* Rebuilt release and 404 surfaces. */
.cs-side { display: grid; gap: 16px; align-content: start; }
.cs-note { padding: 28px !important; }
.cs-note h2 { margin: 0 0 12px; font-size: 26px; font-weight: 400; }
.cs-note p { margin: 0 0 22px; }
.cs-feature-block { padding: 26px 0; border-bottom: 1px solid var(--fx-line); }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip { padding: 7px 10px !important; display: inline-flex; align-items: center; gap: 7px; }
.cs-form { display: grid; gap: 8px; }
.cs-form label { color: var(--fx-muted); font-family: var(--fx-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.cs-form input {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--fx-line-strong); border-radius: var(--fx-radius-md);
  background: var(--fx-canvas-soft); color: var(--fx-ink); outline: none;
}
.cs-form input:focus { border-color: var(--fx-orange); box-shadow: 0 0 0 3px rgba(245,78,0,.08); }
.cs-form-status { min-height: 18px; margin: 10px 0 0 !important; color: var(--fx-success) !important; font-size: 12px; }

.error-actions .btn { min-height: 44px !important; padding: 12px 20px !important; }
.quick-links { margin-top: 34px !important; padding-top: 28px !important; }
.link-card {
  min-height: 128px; padding: 18px !important;
  display: flex !important; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  text-align: left !important;
}
.link-card .link-index { margin-bottom: auto; color: var(--fx-orange); font-family: var(--fx-mono); font-size: 11px; }
.link-card strong { margin-top: 22px; color: var(--fx-ink); font-size: 16px; font-weight: 600; }
.link-card span:last-child { margin-top: 4px; color: var(--fx-muted); font-size: 12px; }
.error-note { margin-top: 28px; padding: 18px; border-top: 1px solid var(--fx-line); background: var(--fx-canvas-soft); }
.error-note strong { color: var(--fx-ink); font-size: 14px; }
.error-note p { margin: 6px 0 0; font-size: 13px; }
.error-note a { color: var(--fx-orange); }
.home-hero .btn { min-height: 44px !important; padding: 12px 20px !important; }
.fx-card, .platform-card, .tiktok-download-card, .feature-item { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

@media (max-width: 760px) {
  .cs-note { padding: 22px !important; }
  .error-actions { display: grid !important; grid-template-columns: 1fr; }
  .error-actions .btn { width: 100%; }
}


/* v8.1.1 — persistent Saweria support surface */
.fx-support-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 890;
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--fx-hairline-strong);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-ink);
  font: 600 13px/1 var(--fx-font-sans);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.fx-support-fab:hover { transform: translateY(-2px); border-color: var(--fx-primary); }
.fx-support-fab span:first-child { color: var(--fx-primary); font-size: 15px; }
.fx-footer-support {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.fx-footer-support:hover { color: var(--fx-ink); text-decoration: underline; text-underline-offset: 4px; }
.fx-support-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.fx-support-layer.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.fx-support-overlay { position: absolute; inset: 0; border: 0; background: rgba(38,37,30,.54); cursor: default; }
.fx-support-panel {
  position: relative;
  width: min(100%, 470px);
  padding: 30px;
  border: 1px solid var(--fx-hairline-strong);
  border-radius: 12px;
  background: var(--fx-canvas);
  color: var(--fx-ink);
  transform: translateY(14px) scale(.985);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
  outline: none;
}
.fx-support-layer.is-open .fx-support-panel { transform: translateY(0) scale(1); }
.fx-support-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 8px;
  background: var(--fx-primary);
  color: #fff;
  font: 700 13px/1 var(--fx-font-mono);
}
.fx-support-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--fx-hairline);
  border-radius: 8px;
  background: var(--fx-surface);
  color: var(--fx-ink);
  font-size: 22px;
  cursor: pointer;
}
.fx-support-kicker { margin-bottom: 10px; color: var(--fx-primary); font: 600 11px/1.4 var(--fx-font-sans); letter-spacing: .08em; text-transform: uppercase; }
.fx-support-panel h2 { margin: 0 0 12px; font-size: clamp(28px, 6vw, 38px); font-weight: 400; letter-spacing: -.03em; }
.fx-support-panel p { margin: 0; color: var(--fx-body); font-size: 15px; line-height: 1.65; }
.fx-support-actions { display: flex; gap: 10px; margin-top: 26px; }
.fx-support-panel small { display: block; margin-top: 18px; color: var(--fx-muted); line-height: 1.5; }
body.fx-support-open { overflow: hidden; }
@media (max-width: 760px) {
  body.page-tiktok .fx-support-fab { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .fx-support-fab { right: 14px; }
  .fx-support-panel { padding: 24px; }
  .fx-support-actions { flex-direction: column; }
  .fx-support-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-support-fab, .fx-support-layer, .fx-support-panel { transition: none !important; }
}


/* v8.4.5 UI polish pass */
.fx-actions { display:flex; align-items:center; gap:10px; }
.fx-theme-quick,
.fx-settings-trigger { min-width:46px; min-height:46px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px !important; }
.fx-theme-quick i,
.fx-settings-trigger i { font-size:16px; }
.workspace-head { gap: 14px; }
.workspace-status {
  padding: 10px 14px !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--fx-success) 8%, var(--fx-card)) !important;
  color: var(--fx-success) !important;
  font-weight: 600;
  white-space: nowrap;
}
.fx-preview-card { display:grid; grid-template-columns:minmax(220px,320px) minmax(0,1fr); align-items:stretch; }
.fx-preview-card--photo { grid-template-columns:minmax(260px,420px) minmax(0,1fr); }
.fx-preview-media { position:relative; min-height:260px; border-right:1px solid var(--fx-line); }
.fx-preview-media img, .fx-slide-media img, .fx-grid-item img, .fx-photo-main img { width:100%; height:100%; object-fit:cover; display:block; }
.fx-preview-play { width:54px; height:54px; display:flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(38,37,30,.72); color:#fff; box-shadow:0 10px 24px rgba(0,0,0,.18); }
html[data-theme="dark"] .fx-preview-play { background:rgba(255,255,255,.14); color:var(--fx-ink); }
.fx-preview-meta { display:flex; flex-direction:column; gap:14px; min-width:0; }
.fx-author-row { display:flex; align-items:center; gap:12px; padding-bottom:12px; min-width:0; }
.fx-author-row > div:last-child { min-width:0; }
.fx-avatar { width:52px !important; height:52px !important; min-width:52px !important; border-radius:999px !important; overflow:hidden; display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--fx-ink); }
.fx-preview-title { display:flex; align-items:center; flex-wrap:wrap; gap:8px; line-height:1.2; word-break:break-word; }
.fx-preview-sub { line-height:1.45; }
.fx-caption { font-size:14px; line-height:1.65; word-break:break-word; }
.text-sm.text-muted { line-height:1.55; }
.fx-mini-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.fx-mini-actions .btn { min-height:46px !important; padding:10px 14px !important; width:100%; justify-content:center; gap:8px; text-align:center; line-height:1.25; }
.download-options-grid, .download-buttons-grid { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important; gap:12px !important; }
.download-option, .btn-download-video, .btn-download-audio { display:flex !important; align-items:center !important; justify-content:flex-start !important; gap:12px; min-height:88px !important; text-align:left; }
.download-option i, .btn-download-video i, .btn-download-audio i { font-size:18px; flex:0 0 auto; }
.download-option .download-label, .download-option span, .btn-download-video span, .btn-download-audio span { line-height:1.3; }
.btn, .download-button, .download-option, .btn-download-video, .btn-download-audio { border-radius:12px !important; }
.btn { min-height:44px; }
.download-button { min-height:52px !important; padding-inline:18px !important; font-weight:700 !important; }
.fx-footer-support, .fx-support-fab { border:1px solid color-mix(in srgb, var(--fx-orange) 55%, var(--fx-line)); background:color-mix(in srgb, var(--fx-orange) 10%, var(--fx-card)); color:var(--fx-ink) !important; }
.fx-support-fab span:first-child { color:var(--fx-orange) !important; }
.fx-footer-support:hover, .fx-support-fab:hover { background:color-mix(in srgb, var(--fx-orange) 16%, var(--fx-card)); border-color:var(--fx-orange); }
.fx-support-panel { color:var(--fx-ink); background:var(--fx-card); }
.fx-support-panel .btn-primary { background:var(--fx-orange) !important; color:#fff !important; border-color:var(--fx-orange) !important; }
html[data-theme="dark"] .fx-support-panel .btn-primary, html[data-theme="dark"] .download-button { color:#151515 !important; }
@media (max-width: 960px){ .fx-preview-card, .fx-preview-card--photo { grid-template-columns:1fr; } .fx-preview-media { min-height:240px; border-right:0; border-bottom:1px solid var(--fx-line); } }
@media (max-width: 760px){ .fx-navlinks { display:none; } .fx-actions { gap:8px; } .fx-theme-quick, .fx-settings-trigger { min-width:42px; min-height:42px; } .workspace-head { align-items:flex-start; } .workspace-status { font-size:12px; } .fx-preview-meta { padding:18px !important; gap:12px; } .fx-mini-actions { grid-template-columns:1fr; } .download-option, .btn-download-video, .btn-download-audio { min-height:78px !important; } }


/* v8.4.5 — Mobile-first rescue pass */
:root {
  --fx-mobile-pad: 14px;
  --fx-touch: 48px;
}

html[data-theme="dark"] {
  --fx-canvas: #15140f;
  --fx-canvas-soft: #1b1a14;
  --fx-card: #211f18;
  --fx-ink: #f8f4e8;
  --fx-body: #d8d2c3;
  --fx-muted: #a9a293;
  --fx-muted-soft: #847d70;
  --fx-line: #373226;
  --fx-line-soft: #2b281f;
  --fx-line-strong: #514a3a;
  --bg-primary: var(--fx-canvas);
  --bg-secondary: var(--fx-canvas-soft);
  --bg-card: var(--fx-card);
  --text-primary: var(--fx-ink);
  --text-secondary: var(--fx-body);
  --text-muted: var(--fx-muted);
  --border-color: var(--fx-line);
}
html[data-theme="light"] {
  color-scheme: light;
  --fx-ink: #26251e;
  --fx-body: #4f4d47;
  --fx-muted: #6f6a60;
  --fx-muted-soft: #8d887c;
  --fx-canvas: #f7f7f4;
  --fx-canvas-soft: #fbfaf6;
  --fx-card: #ffffff;
  --fx-line: #e3e0d7;
  --fx-line-soft: #eeeeE8;
  --fx-line-strong: #c8c3b8;
  --bg-primary: var(--fx-canvas);
  --bg-secondary: var(--fx-canvas-soft);
  --bg-card: var(--fx-card);
  --text-primary: var(--fx-ink);
  --text-secondary: var(--fx-body);
  --text-muted: var(--fx-muted);
  --border-color: var(--fx-line);
}
html[data-theme="light"] .btn,
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .fx-menu-btn,
html[data-theme="light"] .fx-theme-quick,
html[data-theme="light"] .fx-settings-trigger,
html[data-theme="light"] .download-option {
  color: #26251e !important;
  background: #fff !important;
}
html[data-theme="dark"] .btn,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .fx-menu-btn,
html[data-theme="dark"] .fx-theme-quick,
html[data-theme="dark"] .fx-settings-trigger,
html[data-theme="dark"] .download-option {
  color: var(--fx-ink) !important;
  background: color-mix(in srgb, var(--fx-card) 88%, #000) !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color: var(--fx-ink) !important;
  background: var(--fx-canvas-soft) !important;
  border-color: var(--fx-line-strong) !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: #26251e !important;
  background: #fff !important;
}
html[data-theme="dark"] input::placeholder { color: #8f8878 !important; }
html[data-theme="light"] input::placeholder { color: #928c80 !important; }

.fx-theme-quick span { margin-left: 7px; font-size: 12px; font-weight: 700; }
.fx-theme-quick,
.fx-settings-trigger,
.fx-menu-btn {
  border: 1px solid var(--fx-line-strong) !important;
}

.fx-actions { min-width: 0; }
.fx-mobile-panel {
  border: 1px solid var(--fx-line-strong);
  border-radius: 18px;
  background: var(--fx-card);
  overflow: hidden;
}
.fx-mobile-links a {
  min-height: 56px;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fx-line);
  color: var(--fx-ink) !important;
  text-decoration: none !important;
}
.fx-mobile-links a:last-child { border-bottom: 0; }
.fx-mobile-links span { color: var(--fx-orange); font-family: var(--fx-mono); font-size: 11px; }

.url-input-group .btn,
.fx-first-run__row .btn,
.download-intro__actions .btn,
.fx-mini-actions .btn,
#result .btn,
.fx-bottom-bar .btn,
.fx-bottom-bar .download-button {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body.page-tiktok { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  .fx-header { top: 0; }
  .fx-nav {
    width: calc(100% - 16px) !important;
    min-height: 58px !important;
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 0 0 18px 18px;
  }
  .fx-brand { min-width: 0; flex: 1 1 auto; }
  .fx-brand-badge { width: 34px !important; height: 34px !important; min-width: 34px; font-size: 12px !important; }
  .fx-brand-title { min-width: 0; }
  .fx-brand-title strong {
    display: block;
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fx-actions { flex: 0 0 auto; gap: 6px !important; }
  .fx-theme-quick,
  .fx-settings-trigger,
  .fx-menu-btn {
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 11px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .fx-theme-quick span { display: none; }
  .fx-menu-btn {
    font-size: 0 !important;
  }
  .fx-menu-btn::before {
    content: "Menu";
    font-size: 12px;
    font-weight: 700;
  }

  .page-tiktok .container-sm,
  .container,
  .fx-page,
  .home-shell {
    width: calc(100% - 18px) !important;
    max-width: none !important;
  }
  .download-shell { padding: 18px 0 24px !important; }
  .download-layout { display: block !important; }
  .download-intro {
    position: static !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
    border: 1px solid var(--fx-line);
    border-radius: 20px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--fx-card) 88%, var(--fx-orange) 12%), var(--fx-card));
  }
  .download-intro .eyebrow { margin-bottom: 8px !important; }
  .download-intro h1 {
    font-size: clamp(28px, 10vw, 42px) !important;
    line-height: .98 !important;
    letter-spacing: -.045em !important;
  }
  .download-intro p {
    margin-top: 10px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .download-intro__facts {
    margin-top: 14px !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 0 !important;
  }
  .download-intro__facts li {
    min-height: 54px;
    padding: 10px 12px !important;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    border: 1px solid var(--fx-line) !important;
    border-radius: 16px;
    background: var(--fx-canvas-soft);
  }
  .download-intro__actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
  }
  .download-intro__actions .btn {
    min-height: 48px;
    justify-content: center;
    border-radius: 16px !important;
  }

  .tiktok-download-card {
    padding: 14px !important;
    border-radius: 22px !important;
  }
  .workspace-head {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 10px !important;
    align-items: start !important;
    margin-bottom: 14px !important;
  }
  .workspace-head h2 {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.05 !important;
  }
  .workspace-head p {
    margin-top: 7px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
  .workspace-head code { font-size: 11px; }
  .workspace-status {
    margin: 0 !important;
    padding: 8px 10px !important;
    max-width: 110px;
    justify-content: center;
    font-size: 9px !important;
  }

  .url-input-group {
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    border-radius: 20px !important;
    background: var(--fx-canvas-soft) !important;
  }
  .url-input {
    grid-column: 1 / -1;
    min-height: 54px !important;
    padding: 0 14px !important;
    border: 1px solid var(--fx-line) !important;
    border-radius: 16px !important;
    background: var(--fx-card) !important;
    font-size: 13px !important;
  }
  .url-input-group .btn,
  .url-input-group .download-button {
    min-height: 52px !important;
    border-radius: 16px !important;
    justify-content: center !important;
    gap: 8px;
    font-size: 13px !important;
    padding: 0 12px !important;
  }
  #pasteBtn .btn-text,
  #clearBtn .btn-text { display: inline !important; }
  #downloadBtn {
    grid-column: 1 / -1 !important;
    background: var(--fx-orange) !important;
    color: #151510 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }
  .fx-inline-row {
    margin-top: 10px !important;
    padding: 10px 12px;
    border: 1px solid var(--fx-line);
    border-radius: 16px;
    background: var(--fx-card);
  }
  .fx-toggle {
    width: 100%;
    margin-top: 12px !important;
    padding: 12px;
    border: 1px solid var(--fx-line);
    border-radius: 16px;
    background: var(--fx-card);
    justify-content: flex-start;
  }
  .fx-first-run {
    margin-top: 12px !important;
    padding: 12px !important;
    border: 1px solid var(--fx-line) !important;
    border-radius: 18px !important;
    background: var(--fx-card) !important;
  }
  .fx-first-run__head { padding-top: 0 !important; }
  .fx-first-run__list {
    margin-top: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    background: transparent !important;
    border: 0 !important;
  }
  .fx-first-run__list li {
    min-height: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--fx-line);
    border-radius: 16px;
    background: var(--fx-canvas-soft);
  }
  .fx-first-run__row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }
  .fx-first-run__row .btn {
    min-height: 48px;
    border-radius: 16px !important;
    justify-content: center;
  }

  .trust-row {
    margin-top: 14px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    border-top: 0 !important;
  }
  .trust-row span {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--fx-line);
    border-radius: 14px;
    background: var(--fx-card);
  }

  .loading-container,
  .result-container {
    margin-top: 16px !important;
    padding-top: 16px !important;
  }
  #resultTitle {
    margin-bottom: 12px !important;
    padding: 0 2px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }
  .fx-preview-card,
  .fx-preview-card--photo {
    display: grid !important;
    grid-template-columns: 1fr !important;
    border-radius: 20px !important;
  }
  .fx-preview-media {
    min-height: 220px !important;
    max-height: 380px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--fx-line);
  }
  .fx-preview-meta {
    padding: 14px !important;
    gap: 12px !important;
  }
  .fx-author-row {
    gap: 10px !important;
    padding-bottom: 10px !important;
  }
  .fx-avatar {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
  }
  .fx-preview-title {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }
  .fx-preview-sub,
  .fx-caption,
  .text-sm.text-muted {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .fx-mini-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .fx-mini-actions .btn {
    min-height: 50px !important;
    padding: 8px 10px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
  }
  .download-options-grid,
  .download-buttons-grid {
    margin-top: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .download-option,
  .btn-download-video,
  .btn-download-audio {
    min-height: 64px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }
  #result > .flex {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    margin-top: 12px !important;
  }
  #result > .flex .btn {
    min-height: 50px;
    justify-content: center;
    border-radius: 16px !important;
  }

  .download-secondary-grid {
    margin-top: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .tips-box,
  .history-section {
    padding: 14px !important;
    border-radius: 20px !important;
  }
  .fx-history-head {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 10px !important;
  }
  .fx-history-search {
    min-height: 48px !important;
    border-radius: 16px !important;
  }

  .fx-bottom-bar {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: 52px 52px 1fr !important;
    gap: 8px !important;
    border: 1px solid var(--fx-line-strong) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--fx-card) 92%, transparent) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 48px rgba(0,0,0,.24) !important;
  }
  .fx-bottom-mini {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 !important;
    border-radius: 17px !important;
  }
  .fx-bottom-btn {
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 17px !important;
    background: var(--fx-orange) !important;
    color: #151510 !important;
    justify-content: center !important;
  }
  .fx-support-fab {
    right: 12px !important;
    bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    min-height: 44px;
    padding: 0 12px !important;
    border-radius: 999px !important;
  }
  .fx-install {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
  }
  .fx-drawer__panel {
    width: 100% !important;
    padding: 16px !important;
    border-left: 0 !important;
    border-radius: 20px 20px 0 0;
  }
  .fx-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 12px !important;
    align-items: center;
    padding: 14px 0 !important;
  }
  .fx-row__label { line-height: 1.3; }
  .fx-row__hint { line-height: 1.45; }
}

@media (max-width: 380px) {
  .fx-brand-title strong { max-width: 92px; }
  .workspace-head { grid-template-columns: 1fr !important; }
  .workspace-status { max-width: max-content; }
  .download-intro__actions,
  .fx-first-run__row,
  .fx-mini-actions,
  #result > .flex,
  .trust-row {
    grid-template-columns: 1fr !important;
  }
}


/* v8.4.5 — mobile carousel, action cards, contrast audit */
.fx-toggle[for="fxTitleToggle"],
#fxTitleToggle { display: none !important; }

.download-buttons-grid--pro {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 12px !important;
}
.download-action-card {
  width: 100%;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--fx-line-strong);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: var(--fx-card);
  color: var(--fx-ink);
  text-align: left;
  cursor: pointer;
}
.download-action-card i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--fx-orange) 16%, var(--fx-canvas-soft));
  color: var(--fx-orange);
}
.download-action-card b {
  display: block;
  color: var(--fx-ink);
  font-size: 14px;
  line-height: 1.2;
}
.download-action-card small {
  display: block;
  margin-top: 4px;
  color: var(--fx-body);
  font-size: 12px;
  line-height: 1.35;
}
.download-action-card--primary {
  border-color: color-mix(in srgb, var(--fx-orange) 70%, var(--fx-line-strong));
  background: color-mix(in srgb, var(--fx-orange) 10%, var(--fx-card));
}
.download-action-card:hover {
  border-color: var(--fx-orange);
  transform: translateY(-1px);
}
.fx-audio-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 14px;
  background: var(--fx-canvas-soft);
  color: var(--fx-body);
  font-size: 12px;
  line-height: 1.5;
}

/* Carousel must never put controls over landscape photos */
.fx-carousel,
.fx-carousel-premium {
  overflow: hidden;
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: var(--fx-canvas-soft);
}
.fx-carousel-track-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #101010;
}
.fx-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.fx-carousel-track::-webkit-scrollbar { display: none; }
.fx-slide {
  min-width: 100%;
  height: clamp(260px, 54vh, 560px);
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  background: #101010;
}
.fx-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
}
.fx-car-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 999px !important;
  transform: translateY(-50%);
}
.fx-car-nav.prev { left: 10px; }
.fx-car-nav.next { right: 10px; }
.fx-carousel-controls {
  position: relative !important;
  display: grid !important;
  gap: 10px !important;
  padding: 12px !important;
  border-top: 1px solid var(--fx-line);
  background: var(--fx-card);
}
.fx-carousel-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px !important;
}
.fx-carousel-actions .btn {
  min-height: 48px !important;
  justify-content: center;
  white-space: normal;
  line-height: 1.25;
}
.fx-carousel-thumbs {
  padding: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--fx-line);
  background: var(--fx-card);
}
.fx-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px !important;
}
.fx-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Settings rows: no overlap in dark/light */
.fx-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 14px !important;
}
.fx-row__left,
.fx-row__label,
.fx-row__hint { min-width: 0; }
.fx-row__label,
.fx-drawer__title { color: var(--fx-ink) !important; }
.fx-row__hint { color: var(--fx-body) !important; }
.fx-switch { flex: 0 0 auto; }
.fx-select {
  min-width: 130px;
  max-width: 100%;
  color: var(--fx-ink) !important;
  background: var(--fx-card) !important;
}

/* Bottom mobile command dock centered */
@media (max-width: 760px) {
  .fx-bottom-bar {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    width: min(calc(100vw - 20px), 560px) !important;
    transform: translateX(-50%) !important;
    display: grid !important;
    grid-template-columns: 52px 52px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
    margin: 0 !important;
  }
  .fx-bottom-btn {
    width: 100% !important;
    text-align: center;
  }
  .download-buttons-grid--pro {
    grid-template-columns: 1fr !important;
  }
  .download-action-card {
    min-height: 74px;
    padding: 12px;
    grid-template-columns: 40px minmax(0, 1fr);
    border-radius: 18px;
  }
  .download-action-card i {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }
  .fx-slide {
    height: clamp(240px, 52vh, 430px);
  }
  .fx-carousel-actions {
    grid-template-columns: 1fr !important;
  }
  .fx-carousel-actions .btn {
    width: 100%;
    min-height: 50px !important;
    border-radius: 16px !important;
  }
  .fx-photo-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .fx-photo-tools .flex {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
  }
  .fx-photo-tools .btn {
    min-height: 44px !important;
    justify-content: center;
    white-space: normal;
  }
  .fx-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .fx-row .fx-switch {
    justify-self: start;
  }
  .fx-select {
    width: 100%;
  }
}


/* v8.4.5 — support modal, footer, audio clarity audit */
.fx-support-layer {
  color: var(--fx-ink) !important;
}
.fx-support-overlay {
  background: rgba(0,0,0,.62) !important;
}
.fx-support-panel {
  width: min(440px, calc(100vw - 28px)) !important;
  padding: 28px !important;
  border: 1px solid var(--fx-line-strong) !important;
  border-radius: 24px !important;
  background: var(--fx-card) !important;
  color: var(--fx-ink) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.42) !important;
}
.fx-support-kicker {
  color: var(--fx-orange) !important;
  font-weight: 800 !important;
}
.fx-support-panel h2,
.fx-support-panel p,
.fx-support-panel small {
  color: var(--fx-ink) !important;
  background: transparent !important;
  text-shadow: none !important;
}
.fx-support-panel p {
  color: var(--fx-body) !important;
  line-height: 1.65 !important;
}
.fx-support-panel small {
  color: var(--fx-muted) !important;
}
.fx-support-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin-top: 24px !important;
}
.fx-support-actions .btn,
.fx-support-actions a,
.fx-support-actions button {
  min-height: 50px !important;
  width: 100% !important;
  justify-content: center !important;
  border-radius: 16px !important;
  text-decoration: none !important;
  color: var(--fx-ink) !important;
  background: var(--fx-canvas-soft) !important;
  border: 1px solid var(--fx-line-strong) !important;
}
.fx-support-actions .fx-support-primary {
  background: var(--fx-orange) !important;
  color: #17140f !important;
  border-color: var(--fx-orange) !important;
  font-weight: 800 !important;
}
.fx-support-actions .fx-support-ig {
  background: color-mix(in srgb, var(--fx-card) 82%, var(--fx-orange) 18%) !important;
  color: var(--fx-ink) !important;
}
.fx-support-actions .fx-support-later {
  color: var(--fx-body) !important;
}
.fx-support-close {
  color: var(--fx-ink) !important;
  background: var(--fx-canvas-soft) !important;
  border: 1px solid var(--fx-line) !important;
}
html[data-theme="light"] .fx-support-panel {
  background: #ffffff !important;
  color: #26251e !important;
}
html[data-theme="light"] .fx-support-panel p {
  color: #4f4d47 !important;
}
html[data-theme="light"] .fx-support-actions .fx-support-primary {
  color: #17140f !important;
}
html[data-theme="dark"] .fx-support-panel {
  background: #211f18 !important;
  color: #f8f4e8 !important;
}
html[data-theme="dark"] .fx-support-panel p {
  color: #d8d2c3 !important;
}
html[data-theme="dark"] .fx-support-actions .fx-support-primary {
  color: #17140f !important;
}

/* Footer polish across desktop/mobile */
.fx-footer {
  margin-top: 42px !important;
  border-top: 1px solid var(--fx-line) !important;
  background: var(--fx-canvas) !important;
  color: var(--fx-body) !important;
}
.fx-footer-inner {
  width: min(calc(100% - 32px), var(--fx-page)) !important;
  margin: 0 auto !important;
  padding: 24px 0 30px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: center !important;
}
.fx-footer-inner strong,
.fx-footer-inner span {
  color: var(--fx-ink) !important;
}
.fx-footer-inner span {
  color: var(--fx-body) !important;
  line-height: 1.55 !important;
}
.fx-foot-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
.fx-foot-links a,
.fx-footer-support {
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--fx-ink) !important;
  background: var(--fx-card) !important;
  text-decoration: none !important;
  font-size: 13px !important;
}
.fx-footer-support {
  cursor: pointer !important;
}
.fx-foot-links a:hover,
.fx-footer-support:hover {
  border-color: var(--fx-orange) !important;
  color: var(--fx-ink) !important;
  background: color-mix(in srgb, var(--fx-orange) 10%, var(--fx-card)) !important;
}

/* Audio cards clarity */
.fx-audio-note {
  color: var(--fx-body) !important;
  background: var(--fx-canvas-soft) !important;
  border-color: var(--fx-line) !important;
}
.fx-audio-note b {
  color: var(--fx-ink) !important;
}
.download-action-card {
  color: var(--fx-ink) !important;
  background: var(--fx-card) !important;
}
.download-action-card b {
  color: var(--fx-ink) !important;
}
.download-action-card small {
  color: var(--fx-body) !important;
}

/* Remove old/invalid video-sound card if browser cache somehow keeps old markup */
#btnDlVideoSound {
  display: none !important;
}

@media (max-width: 760px) {
  .fx-support-panel {
    width: calc(100vw - 24px) !important;
    padding: 22px !important;
    border-radius: 22px !important;
  }
  .fx-support-panel h2 {
    font-size: clamp(26px, 8vw, 34px) !important;
    line-height: 1.05 !important;
  }
  .fx-footer-inner {
    width: calc(100% - 24px) !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
  }
  .fx-foot-links {
    justify-content: flex-start !important;
  }
  .fx-foot-links a,
  .fx-footer-support {
    min-height: 42px !important;
  }
}


/* v8.4.5 — hard contrast fix + YouTube page styles */
.fx-support-actions .fx-support-primary,
html[data-theme="dark"] .fx-support-actions .fx-support-primary,
html[data-theme="light"] .fx-support-actions .fx-support-primary {
  background: #f54e00 !important;
  border-color: #f54e00 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.22) !important;
}
.fx-support-actions .fx-support-primary *,
html[data-theme="dark"] .fx-support-actions .fx-support-primary *,
html[data-theme="light"] .fx-support-actions .fx-support-primary * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.fx-support-actions .fx-support-ig,
html[data-theme="dark"] .fx-support-actions .fx-support-ig {
  color: var(--fx-ink) !important;
  -webkit-text-fill-color: var(--fx-ink) !important;
  background: color-mix(in srgb, var(--fx-card) 78%, var(--fx-orange) 22%) !important;
}
.fx-support-actions .fx-support-later {
  color: var(--fx-body) !important;
  -webkit-text-fill-color: var(--fx-body) !important;
}

.youtube-shell {
  padding: clamp(24px, 7vw, 82px) 0 80px;
}
.youtube-layout {
  display: grid;
  grid-template-columns: minmax(250px,.72fr) minmax(0,1.7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.youtube-intro {
  position: sticky;
  top: 100px;
}
.youtube-intro h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 400;
}
.youtube-intro p {
  margin: 18px 0 0;
  color: var(--fx-body);
  font-size: 15px;
  line-height: 1.65;
}
.yt-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--fx-line-strong);
  border-radius: 24px;
  background: var(--fx-card);
}
.yt-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}
.yt-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}
.yt-status {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fx-success);
  background: color-mix(in srgb, var(--fx-success) 8%, var(--fx-card));
  font-family: var(--fx-mono);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.yt-status::before { content:""; width:7px; height:7px; border-radius:50%; background: var(--fx-success); }
.yt-input-group {
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  border: 1px solid var(--fx-line-strong);
  border-radius: 20px;
  background: var(--fx-canvas-soft);
}
.yt-input {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  background: var(--fx-card);
  color: var(--fx-ink);
  font-family: var(--fx-mono);
  font-size: 13px;
}
.yt-paste {
  min-height: 54px !important;
  border-radius: 16px !important;
}
.yt-presets {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.yt-preset {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: var(--fx-card);
  color: var(--fx-ink);
  text-align: left;
  cursor: pointer;
}
.yt-preset b { display:block; font-size:13px; line-height:1.2; color: var(--fx-ink); }
.yt-preset small { display:block; margin-top:4px; font-size:11px; line-height:1.35; color: var(--fx-body); }
.yt-preset[aria-pressed="true"] {
  border-color: var(--fx-orange);
  background: color-mix(in srgb, var(--fx-orange) 12%, var(--fx-card));
}
.yt-run-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.yt-run {
  min-height: 56px !important;
  border-radius: 18px !important;
  background: var(--fx-orange) !important;
  border-color: var(--fx-orange) !important;
  color: #151510 !important;
  font-weight: 900 !important;
}
.yt-stop {
  min-height: 56px !important;
  border-radius: 18px !important;
}
.yt-console {
  margin-top: 18px;
  border: 1px solid var(--fx-line);
  border-radius: 20px;
  overflow: hidden;
  background: #0f0f0f;
}
.yt-console-head {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #f8f4e8;
  font-size: 12px;
}
.yt-log {
  min-height: 180px;
  max-height: 380px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #d8d2c3;
  font: 12px/1.55 var(--fx-mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.yt-results {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.yt-result-link {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line-strong);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--fx-card);
  color: var(--fx-ink);
  text-decoration: none;
}
.yt-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: var(--fx-canvas-soft);
  color: var(--fx-body);
  font-size: 12px;
  line-height: 1.55;
}
.yt-note b { color: var(--fx-ink); }

@media (max-width: 860px) {
  .youtube-layout { display: block; }
  .youtube-intro {
    position: static;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--fx-line);
    border-radius: 22px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--fx-card) 88%, var(--fx-orange) 12%), var(--fx-card));
  }
  .youtube-intro h1 { font-size: clamp(34px, 11vw, 48px); }
  .yt-card { padding: 14px; border-radius: 22px; }
  .yt-head { grid-template-columns: 1fr; }
  .yt-input-group { grid-template-columns: 1fr; }
  .yt-presets { grid-template-columns: 1fr 1fr; }
  .yt-run-row { grid-template-columns: 1fr; }
  .yt-results { padding-bottom: 10px; }
}
@media (max-width: 420px) {
  .yt-presets { grid-template-columns: 1fr; }
}


/* v8.4.5 — YouTube result polish + home CTA */
.home-hero-actions--stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  width: min(460px, 100%);
  gap: 10px !important;
}
.home-hero-actions--stack .btn {
  width: 100%;
  justify-content: center;
}
.btn-youtube-home {
  background: color-mix(in srgb, var(--fx-orange) 82%, #ff0000 18%) !important;
  border-color: color-mix(in srgb, var(--fx-orange) 72%, #ff0000 28%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.btn-youtube-home *,
.btn-youtube-home i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.yt-result-link--single {
  min-height: 64px !important;
  padding: 0 18px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  background: var(--fx-orange) !important;
  border-color: var(--fx-orange) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}
.yt-result-link--single span,
.yt-result-link--single i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.yt-result-link--single:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

@media (max-width: 760px) {
  .home-hero-actions--stack {
    width: 100%;
  }
  .yt-result-link--single {
    min-height: 58px !important;
    border-radius: 17px !important;
  }
}


/* v8.4.5 — clean progress UI + platform language audit */
.fx-lang {
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--fx-line-strong);
  border-radius: 14px;
  display: inline-flex;
  gap: 3px;
  align-items: center;
  background: var(--fx-card);
}
.fx-lang button {
  min-width: 36px;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--fx-body);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.fx-lang button.active,
.fx-lang button[aria-pressed="true"] {
  background: var(--fx-orange);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.yt-console,
.yt-log,
.yt-console-head {
  display: none !important;
}
.yt-progress-card {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--fx-line);
  border-radius: 20px;
  background: var(--fx-canvas-soft);
}
.yt-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--fx-ink);
  font-weight: 800;
  font-size: 13px;
}
.yt-progress-head strong {
  font-family: var(--fx-mono);
  color: var(--fx-orange);
}
.yt-progress {
  margin-top: 12px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fx-line);
}
.yt-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fx-orange), color-mix(in srgb, var(--fx-orange) 55%, #fff 45%));
  transition: width 260ms ease;
}
.yt-progress-sub {
  margin-top: 10px;
  color: var(--fx-body);
  font-size: 12px;
  line-height: 1.5;
}

.btn-facebook-home {
  background: color-mix(in srgb, #1877f2 70%, var(--fx-orange) 30%) !important;
  border-color: color-mix(in srgb, #1877f2 70%, var(--fx-orange) 30%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.btn-facebook-home *,
.btn-facebook-home i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.page-facebook .youtube-intro {
  background: linear-gradient(180deg, color-mix(in srgb, var(--fx-card) 86%, #1877f2 14%), var(--fx-card));
}
.page-facebook .yt-run {
  background: color-mix(in srgb, #1877f2 62%, var(--fx-orange) 38%) !important;
  border-color: color-mix(in srgb, #1877f2 62%, var(--fx-orange) 38%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.page-facebook .yt-run * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* broader contrast + no-overlap safety */
.fx-card,
.tiktok-download-card,
.yt-card,
.fx-modal__panel,
.fx-drawer__panel,
.fx-support-panel,
.fx-footer,
.fx-mobile-panel {
  color: var(--fx-ink) !important;
}
.fx-card p,
.yt-card p,
.tiktok-download-card p,
.fx-footer span,
.fx-row__hint {
  color: var(--fx-body) !important;
}
.fx-actions,
.fx-nav,
.fx-navlinks,
.fx-mobile-links,
.yt-presets,
.yt-run-row,
.yt-results,
.download-buttons-grid,
.download-options-grid {
  min-width: 0;
}
.yt-preset,
.download-action-card,
.yt-result-link,
.btn,
.download-button {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .fx-actions .fx-lang {
    display: inline-flex !important;
  }
  .fx-actions {
    gap: 6px !important;
  }
}
@media (max-width: 760px) {
  .fx-nav {
    width: calc(100% - 12px) !important;
    gap: 6px !important;
  }
  .fx-brand-title strong {
    max-width: 104px !important;
  }
  .fx-lang {
    min-height: 40px;
    border-radius: 13px;
  }
  .fx-lang button {
    min-width: 32px;
    min-height: 32px;
    padding: 0 7px;
    font-size: 10px;
  }
  .fx-theme-quick,
  .fx-settings-trigger,
  .fx-menu-btn {
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  .yt-progress-card {
    padding: 12px;
    border-radius: 18px;
  }
  .yt-progress-head {
    font-size: 12px;
  }
  .youtube-intro p,
  .yt-head p,
  .yt-progress-sub {
    font-size: 12px !important;
    line-height: 1.55 !important;
  }
  .yt-presets {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .yt-preset {
    min-height: 62px;
    border-radius: 16px;
  }
}
@media (max-width: 420px) {
  .fx-brand-title strong {
    max-width: 80px !important;
  }
  .fx-theme-quick span {
    display: none !important;
  }
  .yt-presets {
    grid-template-columns: 1fr !important;
  }
}


/* v8.4.5 — unified header, clean progress, recent, platform parity */
.fx-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.fx-navlinks {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  gap: 4px !important;
}
.fx-navlinks a {
  padding-inline: 10px !important;
}
.fx-actions {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.fx-lang {
  flex: 0 0 auto;
}
.fx-theme-quick,
.fx-settings-trigger,
.fx-menu-btn {
  flex: 0 0 auto;
}
.fx-recent-panel {
  margin-top: 16px !important;
}
.fx-recent-list {
  display: grid;
  gap: 8px;
}
.fx-recent-empty,
.fx-platform-hold {
  padding: 13px 14px;
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  background: var(--fx-canvas-soft);
  color: var(--fx-body);
  font-size: 13px;
  line-height: 1.5;
}
.fx-platform-hold b {
  display: block;
  color: var(--fx-ink);
  margin-bottom: 4px;
}
.fx-platform-hold span {
  color: var(--fx-body);
}
.fx-recent-item {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--fx-card);
  color: var(--fx-ink);
  text-align: left;
  cursor: pointer;
}
.fx-recent-item b {
  display: block;
  max-width: 100%;
  color: var(--fx-ink);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-recent-item small {
  display: block;
  margin-top: 4px;
  color: var(--fx-body);
  font-size: 11px;
}
.fx-recent-item i {
  color: var(--fx-orange);
}
.yt-progress-card {
  position: relative;
  overflow: hidden;
}
.yt-progress-head span,
.yt-progress-head strong,
.yt-progress-sub {
  color: var(--fx-ink);
}
.yt-progress-sub {
  color: var(--fx-body) !important;
}
.yt-progress-fill {
  min-width: 1%;
}
.page-facebook .yt-status {
  color: var(--fx-orange) !important;
  background: color-mix(in srgb, var(--fx-orange) 10%, var(--fx-card)) !important;
}
.page-facebook .yt-status::before {
  background: var(--fx-orange) !important;
}
.platform-card .badge-success,
.platform-card .badge-warning,
.platform-badge {
  white-space: nowrap;
}
html[data-theme="light"] .fx-recent-empty,
html[data-theme="light"] .fx-platform-hold,
html[data-theme="light"] .yt-progress-card {
  background: #fff !important;
  color: #4f4d47 !important;
}
html[data-theme="light"] .yt-progress-head span,
html[data-theme="light"] .yt-progress-head strong,
html[data-theme="light"] .fx-platform-hold b {
  color: #26251e !important;
}
html[data-theme="dark"] .fx-recent-empty,
html[data-theme="dark"] .fx-platform-hold,
html[data-theme="dark"] .yt-progress-card {
  background: #1b1a14 !important;
  color: #d8d2c3 !important;
}

@media (max-width: 1120px) {
  .fx-navlinks a {
    padding-inline: 8px !important;
    font-size: 12px !important;
  }
}
@media (max-width: 960px) {
  .fx-navlinks {
    display: none !important;
  }
}
@media (max-width: 760px) {
  .fx-nav {
    width: calc(100% - 10px) !important;
    min-height: 58px !important;
    padding: 7px !important;
  }
  .fx-brand-title strong {
    max-width: 92px !important;
  }
  .fx-brand-title span {
    display: none !important;
  }
  .fx-actions {
    gap: 5px !important;
  }
  .fx-lang {
    min-height: 38px !important;
    padding: 2px !important;
  }
  .fx-lang button {
    min-width: 30px !important;
    min-height: 30px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
  }
  .fx-theme-quick,
  .fx-settings-trigger,
  .fx-menu-btn {
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
  }
  .fx-theme-quick span {
    display: none !important;
  }
  .fx-settings-trigger i,
  .fx-theme-quick i {
    font-size: 14px !important;
  }
  .fx-menu-btn::before {
    content: "☰" !important;
    font-size: 16px !important;
  }
  .fx-recent-item {
    min-height: 54px;
    padding: 11px 12px;
  }
  .yt-progress-card {
    margin-top: 14px;
  }
}
@media (max-width: 380px) {
  .fx-brand-title strong {
    max-width: 72px !important;
  }
  .fx-lang button {
    min-width: 28px !important;
    font-size: 9px !important;
  }
  .fx-theme-quick,
  .fx-settings-trigger,
  .fx-menu-btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }
}


/* v8.4.5 — Facebook matches Instagram in-progress page */
.cs-actions--stack {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px !important;
}
.cs-actions--stack .btn {
  width: 100%;
  justify-content: center;
}
.page-facebook-coming .cs-badge,
.page-facebook-coming .workspace-status {
  border-color: color-mix(in srgb, #1877f2 50%, var(--fx-line)) !important;
  background: color-mix(in srgb, #1877f2 10%, var(--fx-card)) !important;
}
.page-facebook-coming .cs-meter div {
  background: linear-gradient(90deg, #1877f2, var(--fx-orange)) !important;
}
.page-facebook-coming .cs-chip i {
  color: #1877f2 !important;
}
.page-coming-soon .cs-card,
.page-facebook-coming .cs-card {
  color: var(--fx-ink) !important;
}
.page-coming-soon .cs-card p,
.page-facebook-coming .cs-card p {
  color: var(--fx-body) !important;
}
@media (max-width: 760px) {
  .cs-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .cs-card {
    border-radius: 22px !important;
  }
}


/* v8.4.5 logo audit fix */
.fx-brand-badge{background:transparent !important;box-shadow:none !important;padding:0 !important;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.fx-brand-badge img{width:100%;height:100%;object-fit:contain;display:block;}
.fx-support-mark{background:transparent !important;box-shadow:none !important;padding:0 !important;display:flex;align-items:center;justify-content:center;}
.fx-support-mark img{width:100%;height:100%;object-fit:contain;display:block;}

/* v8.4.5 final branding polish — real FUNX logo everywhere */
.fx-brand-badge {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
.fx-brand-badge img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: inherit;
}
.fx-support-mark {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
.fx-support-mark img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
.fx-brand-title strong {
  letter-spacing: -0.01em;
}
.fx-lang [data-lang] {
  display: inline !important;
}


/* v8.4.5 final i18n + light-mode readability audit */
html[data-theme="light"] {
  color-scheme: light !important;
  --fx-bg: #f7f4ed !important;
  --fx-canvas: #f7f4ed !important;
  --fx-card: #fffdf8 !important;
  --fx-card-strong: #ffffff !important;
  --fx-ink: #1c1c1c !important;
  --fx-body: rgba(28,28,28,.78) !important;
  --fx-muted: rgba(28,28,28,.62) !important;
  --fx-line: #e8e1d4 !important;
  --fx-line-strong: #d8cbbb !important;
}
html[data-theme="light"] body,
html[data-theme="light"] .cursor-ui {
  background: #f7f4ed !important;
  color: #1c1c1c !important;
}
html[data-theme="light"] body::before,
html[data-theme="light"] body::after {
  opacity: .28 !important;
}
html[data-theme="light"] .fx-header,
html[data-theme="light"] .fx-mobile-panel,
html[data-theme="light"] .product-window,
html[data-theme="light"] .platform-card,
html[data-theme="light"] .feature-item,
html[data-theme="light"] .tiktok-download-card,
html[data-theme="light"] .download-intro,
html[data-theme="light"] .tips-box,
html[data-theme="light"] .history-section,
html[data-theme="light"] .fx-first-run,
html[data-theme="light"] .fx-support-panel,
html[data-theme="light"] .cs-card,
html[data-theme="light"] .yt-card,
html[data-theme="light"] .yt-recent-panel {
  background: #fffdf8 !important;
  color: #1c1c1c !important;
  border-color: #e8e1d4 !important;
}
html[data-theme="light"] .home-shell,
html[data-theme="light"] .home-section,
html[data-theme="light"] .features-section,
html[data-theme="light"] .download-shell,
html[data-theme="light"] .cs-shell,
html[data-theme="light"] .yt-shell {
  color: #1c1c1c !important;
}
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] .fx-title,
html[data-theme="light"] .fx-brand-title,
html[data-theme="light"] .fx-brand-title *,
html[data-theme="light"] .home-hero h1,
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .platform-card h3,
html[data-theme="light"] .feature-item h4,
html[data-theme="light"] .product-result h3,
html[data-theme="light"] .workspace-head h2 {
  color: #1c1c1c !important;
}
html[data-theme="light"] p,
html[data-theme="light"] small,
html[data-theme="light"] li,
html[data-theme="light"] .fx-sub,
html[data-theme="light"] .home-hero p,
html[data-theme="light"] .section-head p,
html[data-theme="light"] .platform-card p,
html[data-theme="light"] .feature-item p,
html[data-theme="light"] .product-result p,
html[data-theme="light"] .workspace-head p,
html[data-theme="light"] .fx-inline-hint,
html[data-theme="light"] .text-secondary,
html[data-theme="light"] .download-intro__facts {
  color: rgba(28,28,28,.74) !important;
}
html[data-theme="light"] .home-hero-actions .btn,
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .fx-theme-quick,
html[data-theme="light"] .fx-menu-btn,
html[data-theme="light"] .fx-settings-trigger,
html[data-theme="light"] .fx-footer-support {
  background: #fffdf8 !important;
  color: #1c1c1c !important;
  border-color: #d8cbbb !important;
}
html[data-theme="light"] .home-hero-actions .btn-primary,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .download-button,
html[data-theme="light"] .fx-support-primary {
  background: #f54e00 !important;
  color: #ffffff !important;
  border-color: #f54e00 !important;
  text-shadow: none !important;
}
html[data-theme="light"] .btn-primary *,
html[data-theme="light"] .download-button *,
html[data-theme="light"] .fx-support-primary * {
  color: #ffffff !important;
}
html[data-theme="light"] .platform-badge,
html[data-theme="light"] .timeline-pill,
html[data-theme="light"] .fx-chip,
html[data-theme="light"] .workspace-status,
html[data-theme="light"] .fx-first-run__badge {
  color: #1c1c1c !important;
  border-color: #d8cbbb !important;
}
html[data-theme="light"] .product-window__bar,
html[data-theme="light"] .product-stage,
html[data-theme="light"] .product-result,
html[data-theme="light"] .fx-first-run__list,
html[data-theme="light"] .trust-row,
html[data-theme="light"] .fx-footer {
  border-color: #e8e1d4 !important;
}
html[data-theme="light"] .url-input,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff !important;
  color: #1c1c1c !important;
  border-color: #d8cbbb !important;
}
html[data-theme="light"] .url-input::placeholder,
html[data-theme="light"] input::placeholder {
  color: rgba(28,28,28,.45) !important;
}

/* TikTok quick guide spacing rescue */
.fx-first-run {
  padding: 18px !important;
  overflow: hidden !important;
}
.fx-first-run__head {
  padding: 0 0 14px !important;
  margin: 0 !important;
  align-items: center !important;
}
.fx-first-run__list {
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.fx-first-run__list li {
  padding: 18px 16px !important;
  min-height: 96px !important;
}
.fx-first-run__row {
  margin-top: 14px !important;
  padding: 0 !important;
}
@media (max-width:760px) {
  .fx-first-run {
    padding: 14px !important;
  }
  .fx-first-run__list li {
    min-height: auto !important;
    padding: 15px 14px !important;
  }
}


/* v8.4.5 final motion + copy polish */
html.fx-page-ready body {
  animation: fxPageIn .34s cubic-bezier(.2,.8,.2,1) both;
}
html.fx-page-leaving body {
  animation: fxPageOut .16s ease both;
  pointer-events: none;
}
@keyframes fxPageIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes fxPageOut {
  from { opacity: 1; transform: translateY(0); filter: blur(0); }
  to { opacity: 0; transform: translateY(-4px); filter: blur(4px); }
}
@media (prefers-reduced-motion: reduce) {
  html.fx-page-ready body,
  html.fx-page-leaving body {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* Home hero: prevent literal newline/backslash issues and make copy breathe */
.home-hero h1 {
  white-space: normal !important;
  text-wrap: balance;
}
.home-hero h1 br {
  display: block;
}
.home-hero h1 em {
  font-style: normal;
  color: inherit;
}
.home-kicker {
  letter-spacing: .11em !important;
}
.home-hero-actions .btn {
  min-height: 44px;
}
.product-result {
  gap: 14px !important;
}
.product-result > div:not(.product-result__thumb) {
  min-width: 0 !important;
}
.product-result h3,
.product-result p {
  overflow-wrap: anywhere;
}
html[data-theme="light"] .home-hero-actions .btn-primary,
html[data-theme="light"] .btn-youtube-home,
html[data-theme="light"] .btn-facebook-home {
  background: #f54e00 !important;
  color: #fff !important;
  border-color: #f54e00 !important;
}
html[data-theme="light"] .home-hero-actions .btn-primary *,
html[data-theme="light"] .btn-youtube-home *,
html[data-theme="light"] .btn-facebook-home * {
  color: #fff !important;
}

/* Smooth state for interactive cards */
.platform-card,
.feature-item,
.product-window,
.tiktok-download-card,
.yt-card,
.cs-card {
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease, background-color .22s ease !important;
}
.platform-card:hover,
.feature-item:hover,
.product-window:hover,
.tiktok-download-card:hover,
.yt-card:hover,
.cs-card:hover {
  transform: translateY(-2px);
}

/* Quick guide: more breathing room, no border collision */
.fx-first-run {
  margin-top: 18px !important;
}
.fx-first-run__head {
  gap: 14px !important;
}
.fx-first-run__badge {
  flex: 0 0 auto;
}
.fx-first-run__title {
  padding-inline: 4px !important;
}
.fx-first-run__list {
  background: color-mix(in srgb, var(--fx-card, #fffdf8) 88%, transparent) !important;
}
.fx-first-run__list li + li {
  border-left-color: var(--fx-line) !important;
}
@media (max-width:760px){
  .home-hero h1 {
    font-size: clamp(52px, 15vw, 76px) !important;
    line-height: .96 !important;
    letter-spacing: -0.07em !important;
  }
  .home-hero-actions {
    gap: 10px !important;
  }
  .platforms-grid {
    margin-top: 18px !important;
  }
}


/* v8.4.5 final history + support-fab polish */
.history-section {
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.fx-history-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
}
.fx-history-head h4 {
  min-width: 0 !important;
  overflow-wrap: anywhere;
}
.fx-history-tools {
  grid-column: 1 / -1 !important;
}
.fx-history-search {
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  font-size: 14px !important;
}
.history-items {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  overflow: visible !important;
  padding: 0 !important;
  margin-top: 14px !important;
  min-width: 0 !important;
}
.fx-history-day {
  grid-column: 1 / -1 !important;
  margin: 8px 0 -2px !important;
  padding: 0 !important;
  color: var(--fx-muted) !important;
  font-family: var(--fx-mono) !important;
  font-size: 11px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  opacity: .82 !important;
}
.history-item {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--fx-card) 94%, transparent) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.08) !important;
  overflow: hidden !important;
  cursor: default !important;
}
.history-item:hover {
  transform: translateY(-1px) !important;
  border-color: color-mix(in srgb, var(--fx-orange) 34%, var(--fx-line)) !important;
}
.history-thumb {
  width: 72px !important;
  height: 72px !important;
  border-radius: 14px !important;
  background-color: var(--fx-strong) !important;
  background-size: cover !important;
  background-position: center !important;
  flex: 0 0 auto !important;
}
.history-content {
  min-width: 0 !important;
  display: grid !important;
  gap: 7px !important;
}
.history-title {
  color: var(--fx-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  word-break: break-word !important;
}
.history-meta {
  color: var(--fx-muted) !important;
  font-family: var(--fx-mono) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
}
.history-actions {
  margin-top: 4px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px !important;
  gap: 8px !important;
  width: 100% !important;
}
.history-actions .btn {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 0 9px !important;
  justify-content: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}
.history-actions .btn i {
  flex: 0 0 auto !important;
}
.history-actions .btn span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Desktop: compact two-column list without breaking actions */
@media (min-width: 1040px) {
  .history-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .fx-history-day {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile: single clean vertical card */
@media (max-width: 760px) {
  .history-section {
    padding: 18px !important;
    border-radius: 22px !important;
  }
  .fx-history-head {
    grid-template-columns: 1fr !important;
  }
  #historyClearBtn {
    width: auto !important;
    justify-self: start !important;
    min-height: 38px !important;
    padding-inline: 14px !important;
  }
  .history-item {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 11px !important;
    padding: 11px !important;
    border-radius: 18px !important;
  }
  .history-thumb {
    width: 62px !important;
    height: 62px !important;
    border-radius: 13px !important;
  }
  .history-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px !important;
    gap: 7px !important;
  }
  .history-actions .btn {
    min-height: 36px !important;
    font-size: 11px !important;
    padding: 0 7px !important;
  }
}
@media (max-width: 380px) {
  .history-item {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    padding: 10px !important;
  }
  .history-thumb {
    width: 54px !important;
    height: 54px !important;
  }
  .history-actions {
    grid-template-columns: 1fr 1fr 38px !important;
  }
  .history-actions .btn {
    font-size: 10.5px !important;
    gap: 5px !important;
  }
}

/* Support floating button: visible but not blocking content */
.fx-support-fab {
  position: fixed !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  z-index: 880 !important;
  min-height: 40px !important;
  max-width: calc(100vw - 28px) !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--fx-card) 92%, transparent) !important;
  color: var(--fx-ink) !important;
  border: 1px solid color-mix(in srgb, var(--fx-orange) 28%, var(--fx-line)) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
  backdrop-filter: blur(14px) !important;
}
.fx-support-fab span:last-child {
  white-space: nowrap !important;
}
.fx-support-fab:hover {
  transform: translateY(-2px) !important;
}
@media (max-width: 760px) {
  .fx-support-fab {
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    min-height: 38px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
    opacity: .92 !important;
  }
  .fx-support-fab span:last-child {
    max-width: 72px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}
@media (max-width: 380px) {
  .fx-support-fab {
    width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .fx-support-fab span:last-child {
    display: none !important;
  }
}


/* v8.4.5 mobile compact landing polish */
@media (max-width: 760px) {
  .home-shell {
    padding-top: 18px !important;
  }
  .home-hero {
    min-height: auto !important;
    padding: 22px 0 36px !important;
    gap: 22px !important;
  }
  .home-hero > div:first-child {
    display: grid !important;
    gap: 14px !important;
  }
  .home-kicker {
    font-size: 10px !important;
    letter-spacing: .09em !important;
    margin-bottom: 2px !important;
  }
  .home-hero h1 {
    font-size: clamp(46px, 13vw, 62px) !important;
    line-height: .94 !important;
    letter-spacing: -.065em !important;
    margin: 0 !important;
    max-width: 9ch !important;
  }
  .home-hero p {
    font-size: 17px !important;
    line-height: 1.55 !important;
    max-width: 34ch !important;
    margin: 2px 0 0 !important;
  }
  .home-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    margin-top: 4px !important;
  }
  .home-hero-actions .btn {
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }
  .home-proof {
    margin-top: 6px !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    font-size: 10.5px !important;
  }
  .product-window {
    display: none !important;
  }

  .home-section,
  .features-section {
    padding: 34px 0 !important;
  }
  .section-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }
  .section-head h2,
  #platform-title,
  #why-title,
  .home-cta h2 {
    font-size: clamp(38px, 10.8vw, 52px) !important;
    line-height: .98 !important;
    letter-spacing: -.055em !important;
    margin: 0 !important;
    max-width: 11ch !important;
  }
  .section-head p {
    font-size: 16px !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    max-width: 38ch !important;
  }

  .platforms-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 0 !important;
    border: 0 !important;
  }
  .platform-card {
    min-height: 132px !important;
    padding: 18px 18px !important;
    border: 1px solid var(--fx-line) !important;
    border-radius: 18px !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 4px !important;
    align-items: start !important;
  }
  .platform-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    font-size: 30px !important;
    margin: 2px 0 0 !important;
  }
  .platform-card h3 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    font-size: 26px !important;
    line-height: 1.05 !important;
    margin: 0 !important;
  }
  .platform-card p {
    grid-column: 2 / 4 !important;
    grid-row: 2 !important;
    font-size: 14.5px !important;
    line-height: 1.45 !important;
    margin: 4px 0 0 !important;
  }
  .platform-badge {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: start !important;
    font-size: 10px !important;
    min-height: 28px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .features-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }
  .feature-item {
    min-height: auto !important;
    padding: 18px 18px !important;
    border-radius: 18px !important;
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 4px !important;
    align-items: start !important;
  }
  .feature-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    font-size: 23px !important;
    margin: 2px 0 0 !important;
  }
  .feature-item h4 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 20px !important;
    line-height: 1.12 !important;
    margin: 0 !important;
  }
  .feature-item p {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 14.5px !important;
    line-height: 1.45 !important;
    margin: 4px 0 0 !important;
  }

  .home-cta {
    padding: 34px 0 54px !important;
    gap: 18px !important;
  }
  .home-cta .btn {
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }
  .fx-footer-inner {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 420px) {
  .home-hero h1 {
    font-size: clamp(42px, 12.5vw, 54px) !important;
  }
  .section-head h2,
  #platform-title,
  #why-title,
  .home-cta h2 {
    font-size: clamp(34px, 10vw, 46px) !important;
    max-width: 12ch !important;
  }
  .platform-card {
    min-height: 116px !important;
    padding: 16px !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
  }
  .platform-icon {
    font-size: 27px !important;
  }
  .platform-card h3 {
    font-size: 24px !important;
  }
  .platform-card p {
    font-size: 13.5px !important;
  }
  .feature-item {
    padding: 16px !important;
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }
  .feature-item h4 {
    font-size: 19px !important;
  }
  .feature-item p {
    font-size: 13.5px !important;
  }
}
