/* SaveAI — format-conversion hub + converter workspace.
 *
 * 1:1 with design_handoff_format_converter (three screens: hub hero + common
 * paths, converter workspace, and the 8-state format selector). Every colour,
 * size, radius, shadow and duration below is the handoff's final value — do not
 * "round" them. Tokens are namespaced under .fc-* so nothing here leaks into
 * the rest of the site (style.css keeps owning header/footer/nav).
 */

:root {
  /* brand green */
  --fc-green-900: #093429; --fc-green-850: #093B30; --fc-green-800: #0B4739;
  --fc-green-750: #0B5544; --fc-green-700: #0D4F40; --fc-green-600: #0D6B55;
  --fc-green-550: #12705B; --fc-green-500: #146D59; --fc-green-400: #2FA562;
  --fc-green-300: #63E0A3; --fc-green-200: #8FF0C2;
  /* neutrals (green-tinted; never swap for pure greys) */
  --fc-ink-900: #0F1A17; --fc-ink-700: #3C4A44; --fc-ink-600: #44524C;
  --fc-ink-500: #667670; --fc-ink-400: #7B8A84; --fc-ink-350: #94A19B;
  --fc-ink-300: #A8B5AF; --fc-ink-250: #B3C0BA; --fc-ink-200: #C3CEC9;
  /* lines & surfaces */
  --fc-line: #E6ECE9; --fc-line-soft: #EEF2F0; --fc-line-2: #E9EEEB;
  --fc-line-dash: #E0E6E3; --fc-line-swap: #DBE5E1; --fc-line-chain: #CFDCD6;
  --fc-line-hover: #C3D3CD;
  --fc-bg: #FFFFFF; --fc-bg-tint: #FBFDFC; --fc-bg-table: #F6F9F8;
  --fc-bg-panel: #F0F5F2; --fc-bg-page: #F4F7F6; --fc-bg-off: #F7F9F8;
  --fc-bg-chip: #EDF1EF; --fc-bg-sel: #F3F9F6; --fc-bg-ok: #F2FBF5;
  --fc-bg-ok-chip: #E6F5EC;
  /* alert red */
  --fc-red-600: #C0392B; --fc-red-500: #E24B3B; --fc-red-300: #E8B4AD;
  --fc-red-100: #FDECEA; --fc-red-50: #FDF3F1; --fc-red-40: #FDF7F6;
  --fc-red-dark-fg: #FFB0A3;
  /* misc */
  --fc-blue-chip-bg: #EAF2FD; --fc-blue-chip-fg: #2B6CC4; --fc-mark: #FDF1E3;
  /* type */
  --fc-font: 'Instrument Sans', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --fc-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* shadows */
  --fc-sh-btn: 0 1px 2px rgba(11, 85, 68, .4);
  --fc-sh-btn-hover: 0 6px 18px rgba(11, 85, 68, .28);
  --fc-sh-btn-hover-lg: 0 10px 26px rgba(11, 85, 68, .30);
  --fc-sh-card-hover: 0 10px 26px rgba(15, 26, 23, .07);
  --fc-sh-sel-hover: 0 6px 16px rgba(15, 26, 23, .07);
  --fc-sh-paper: 0 8px 28px rgba(15, 26, 23, .07);
  --fc-ring: 0 0 0 3px rgba(13, 107, 85, .08);
  --fc-sh-seg: 0 1px 2px rgba(15, 26, 23, .07);
}

@keyframes fcRiseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fcRiseInSm { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fcPulseWhite { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.28); } 70% { box-shadow: 0 0 0 16px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes fcPulseGreen { 0% { box-shadow: 0 0 0 0 rgba(18,112,91,.26); } 70% { box-shadow: 0 0 0 14px rgba(18,112,91,0); } 100% { box-shadow: 0 0 0 0 rgba(18,112,91,0); } }
@keyframes fcSpin { to { transform: rotate(360deg); } }
@keyframes fcCaret { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ============================ screen 1 · hub ============================= */

.fc-shell { max-width: 1440px; margin: 0 auto; padding: 0 56px; }

/* style.css owns generic landing rhythm with `.lp section:not(.cta-final)`
   (specificity 0,2,1) — including an nth-of-type(2n) grey wash. Our sections
   carry the handoff's own vertical rhythm, so match that specificity with
   `.lp section.fc-*` (same weight, loaded later) instead of reaching for
   !important. Never write these as `padding: X 0` shorthand: the horizontal
   padding belongs to .fc-shell, and a shorthand here would zero it out. */
.lp section.fc-hero { padding-top: 58px; padding-bottom: 62px; }
.lp section.fc-sec { padding-top: 0; padding-bottom: 0; background: #fff; }
.lp section.fc-plugin { padding-top: 0; padding-bottom: 80px; background: #fff; }
@media (max-width: 900px) {
  .lp section.fc-hero { padding-top: 40px; padding-bottom: 44px; }
  .lp section.fc-plugin { padding-bottom: 48px; }
}

.fc-hero {
  position: relative; overflow: hidden;
  padding: 58px 0 62px;
  background: radial-gradient(120% 140% at 78% 0%, #146D59 0%, #0B4739 55%, #093B30 100%);
  color: #fff; font-family: var(--fc-font);
}
.fc-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.fc-hero > .fc-shell { position: relative; }
.fc-hero-grid { display: grid; grid-template-columns: 400px 1fr; gap: 64px; align-items: center; }
.fc-hero-copy { animation: fcRiseIn .5s ease both; }
.fc-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.fc-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-green-300); display: block; }
.fc-hero h1 {
  margin: 20px 0 0; font-size: 56px; line-height: 1.1; font-weight: 900; letter-spacing: -.03em;
}
.fc-hero .fc-lead {
  margin: 18px 0 0; font-size: 17px; line-height: 1.65;
  color: rgba(255,255,255,.72); text-wrap: pretty;
}

/* the hero converter card is operable, not decorative */
.fc-hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px; padding: 30px 34px 26px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fcRiseIn .5s .1s ease both;
}
.fc-hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.fc-hero-card-top .lbl { font-size: 13px; font-weight: 600; letter-spacing: .1em; color: rgba(255,255,255,.55); }
.fc-where-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: rgba(99,224,163,.16); color: var(--fc-green-200);
}
.fc-where-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--fc-green-300); display: block; }
.fc-where-chip[data-where="server"] { background: rgba(255,176,163,.16); color: var(--fc-red-dark-fg); }
.fc-where-chip[data-where="server"] i { background: var(--fc-red-dark-fg); }

.fc-hero-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: center; }
.fc-hero-slot {
  border: 1px solid rgba(255,255,255,.18); border-radius: 16px;
  background: rgba(255,255,255,.06); padding: 18px;
  text-align: left; width: 100%; font-family: inherit; color: #fff; cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.fc-hero-slot:hover { background: rgba(255,255,255,.11); }
.fc-hero-slot[data-role="target"] { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.13); }
.fc-hero-slot[data-role="target"]:hover { background: rgba(255,255,255,.18); }
.fc-hero-slot .cap { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.fc-hero-slot .row { display: flex; align-items: center; gap: 11px; }
.fc-hero-slot .tray { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: 0 0 44px; }
.fc-hero-slot .tray img { width: 28px; height: 28px; display: block; }
.fc-hero-slot .row > span:not(.tray) { min-width: 0; }
.fc-hero-slot .nm { display: block; font-size: 17px; font-weight: 700; }
.fc-hero-slot .sub { display: block; font-size: 12px; color: rgba(255,255,255,.5); }
.fc-hero-slot .sub[data-where="server"] { color: var(--fc-red-dark-fg); }

.fc-swap-lg {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--fc-green-800);
  display: grid; place-items: center; font-size: 17px; font-weight: 700; cursor: pointer;
  font-family: inherit; animation: fcPulseWhite 2.6s ease-out infinite;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.fc-swap-lg:hover { transform: rotate(180deg); }
.fc-swap-lg:disabled { opacity: .45; cursor: not-allowed; animation: none; }

.fc-hero-card-bottom { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.fc-hero-card-bottom .lbl { font-size: 13px; color: rgba(255,255,255,.5); }
.fc-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-quick button {
  padding: 6px 13px; border: 0; border-radius: 9px; background: rgba(255,255,255,.1);
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .18s ease;
}
.fc-quick button:hover { background: rgba(255,255,255,.2); }
.fc-quick button[aria-pressed="true"] { background: rgba(255,255,255,.28); }
.fc-quick button:disabled { opacity: .4; cursor: not-allowed; background: rgba(255,255,255,.06); }
.fc-hero-go {
  margin-left: auto; white-space: nowrap; height: 46px; padding: 0 28px;
  border: 0; border-radius: 11px; background: #fff; color: var(--fc-green-800);
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fc-hero-go:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }

/* common paths */
.fc-sec { font-family: var(--fc-font); background: #fff; }
.fc-sec-head { padding: 54px 0 26px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fc-sec-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.015em; color: var(--fc-ink-900); }
.fc-sec-head .note { font-size: 15px; color: var(--fc-ink-400); }
.fc-sec-head .more { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--fc-green-600); }
.fc-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; padding-bottom: 74px; }
.fc-path {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px;
  border: 1px solid var(--fc-line); border-radius: 14px; background: #fff;
  color: inherit; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.fc-path:hover { border-color: var(--fc-green-600); box-shadow: var(--fc-sh-card-hover); transform: translateX(4px); color: inherit; }
.fc-path .pair { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.fc-path .pair img { width: 32px; height: 32px; display: block; }
.fc-path .pair span { color: var(--fc-ink-200); }
.fc-path .body { flex: 1; min-width: 0; }
.fc-path .ttl { display: block; font-size: 16px; font-weight: 700; color: var(--fc-ink-900); }
.fc-path .desc { display: block; font-size: 13px; color: #77857F; margin-top: 3px; }
.fc-badge {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.fc-badge[data-where="local"] { background: var(--fc-bg-ok-chip); color: var(--fc-green-550); }
.fc-badge[data-where="server"] { background: var(--fc-red-100); color: var(--fc-red-600); }

/* extension strip */
.fc-plugin { padding: 0 0 80px; font-family: var(--fc-font); background: #fff; }
.fc-plugin-inner {
  display: flex; align-items: center; gap: 40px; padding: 30px 36px;
  border-radius: 18px; background: var(--fc-bg-panel); flex-wrap: wrap;
}
.fc-plugin-icons { display: flex; align-items: center; gap: 8px; }
.fc-plugin-icons img { width: 34px; height: 34px; display: block; }
.fc-plugin-icons span { color: var(--fc-ink-250); }
.fc-plugin-body { flex: 1; min-width: 260px; }
.fc-plugin-body .ttl { font-size: 19px; font-weight: 800; color: var(--fc-ink-900); }
.fc-plugin-body p { margin: 7px 0 0; font-size: 14px; line-height: 1.6; color: var(--fc-ink-500); text-wrap: pretty; }
.fc-btn-grad {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 24px;
  border: 0; border-radius: 10px; background: linear-gradient(180deg, var(--fc-green-550), var(--fc-green-750));
  color: #fff; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fc-btn-grad:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11,85,68,.28); color: #fff; }
.fc-btn-grad img { width: 19px; height: 19px; display: block; }

/* ====================== screen 2 · converter workspace =================== */

/* The workspace is a standalone app page: it does NOT load style.css (whose
   body background/typography would fight the app shell), so it carries the
   small reset it needs. Scoped to the body class so the hub page — which does
   load style.css — is untouched. */
body.fc-app-body {
  margin: 0; padding: 0; background: #fff; color: var(--fc-ink-900);
  font: 15px/1.6 var(--fc-font); -webkit-font-smoothing: antialiased;
}
body.fc-app-body *, body.fc-app-body *::before, body.fc-app-body *::after { box-sizing: border-box; }
body.fc-app-body a { color: var(--fc-green-600); text-decoration: none; }
body.fc-app-body a:hover { color: #0A4F3F; }
body.fc-app-body img, body.fc-app-body svg { display: block; max-width: 100%; }
body.fc-app-body button { font: inherit; }
body.fc-app-body h1, body.fc-app-body h2 { margin: 0; }
.fc-app {
  display: grid; grid-template-columns: 252px 1fr;
  /* Fixed to the viewport, like the handoff's 1440x1024 canvas: the page itself
     never scrolls, each region scrolls inside. With min-height instead, a long
     document made the preview paper tall enough to push the convert button and
     the sidebar promo thousands of pixels below the fold. */
  height: 100vh; height: 100dvh; overflow: hidden;
  font-family: var(--fc-font); color: var(--fc-ink-900);
}

.fc-side {
  background: linear-gradient(180deg, var(--fc-green-700), var(--fc-green-900));
  color: #fff; padding: 22px 18px; display: flex; flex-direction: column; gap: 26px;
  min-height: 0; overflow-y: auto;          /* promo card stays reachable on short screens */
}
.fc-side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; }
.fc-side-brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.fc-side-brand span { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.fc-side-brand:hover { color: #fff; }
/* The shell reset (body.fc-app-body a) is 0,1,1 and would repaint every
   sidebar link brand-green; these carry the same weight and load later. */
body.fc-app-body .fc-side-brand { color: #fff; }
body.fc-app-body .fc-nav-item { color: rgba(255,255,255,.72); }
body.fc-app-body .fc-nav-item:hover { color: #fff; }
body.fc-app-body .fc-nav-item[aria-current="page"] { color: #fff; }
body.fc-app-body .fc-side-promo a { color: var(--fc-green-800); }
body.fc-app-body .fc-avatar { color: #fff; }
.fc-side nav { display: flex; flex-direction: column; gap: 3px; }
.fc-nav-item {
  display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 13px;
  border: 0; border-radius: 10px; background: none; width: 100%;
  color: rgba(255,255,255,.72); font-family: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .16s ease, color .16s ease;
}
.fc-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.fc-nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; }
.fc-nav-item[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.fc-nav-item[aria-current="page"] .dot {
  margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--fc-green-300); display: block;
}
.fc-nav-count {
  margin-left: auto; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.14);
  font-size: 11px; font-weight: 700;
}
.fc-side-promo {
  margin-top: auto; padding: 16px; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.fc-side-promo .ttl { font-size: 14px; font-weight: 700; }
.fc-side-promo p { margin: 7px 0 13px; font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,.62); }
.fc-side-promo a {
  width: 100%; height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 9px; background: #fff; color: var(--fc-green-800);
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: transform .16s ease;
}
.fc-side-promo a:hover { transform: translateY(-1px); color: var(--fc-green-800); }
.fc-side-promo a img { width: 17px; height: 17px; display: block; }

.fc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.fc-main-head {
  display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 32px;
  border-bottom: 1px solid var(--fc-line-soft); flex: 0 0 auto;
}
.fc-main-head h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.fc-main-head .sub { font-size: 14px; color: var(--fc-ink-350); }
.fc-head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fc-btn-outline {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px;
  border: 1px solid var(--fc-line); border-radius: 9px; background: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--fc-ink-600); cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.fc-btn-outline:hover { border-color: var(--fc-green-600); color: var(--fc-green-600); }
.fc-btn-outline svg { width: 16px; height: 16px; }
.fc-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--fc-green-700); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; text-decoration: none;
}
.fc-avatar:hover { color: #fff; }

.fc-work {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: 26px; padding: 26px 32px 30px; overflow: hidden;   /* columns scroll, page doesn't */
}
.fc-col-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; min-height: 0; animation: fcRiseInSm .45s ease both; }
.fc-panel, .fc-actions { flex: 0 0 auto; }

/* --- format-selector panel --- */
.fc-panel { border: 1px solid var(--fc-line); border-radius: 16px; padding: 18px 20px 20px; background: #fff; }
.fc-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: end; }
.fc-cap { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--fc-ink-350); margin-bottom: 9px; }
.fc-swap {
  width: 40px; height: 40px; margin-bottom: 11px; border: 1px solid var(--fc-line-swap); border-radius: 50%;
  background: #fff; color: var(--fc-green-600); display: grid; place-items: center;
  font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
  animation: fcPulseGreen 3s ease-out infinite;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), background .18s ease;
}
.fc-swap:hover { transform: rotate(180deg); background: var(--fc-bg-panel); }
.fc-swap:disabled { opacity: .45; cursor: not-allowed; animation: none; }
.fc-swap:disabled:hover { transform: none; background: #fff; }

.fc-alt { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding-top: 15px; border-top: 1px dashed var(--fc-line); flex-wrap: wrap; }
.fc-alt .lbl { font-size: 13px; color: var(--fc-ink-350); }
.fc-alt-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.fc-chip {
  padding: 6px 12px; border: 1px solid var(--fc-line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--fc-ink-600); cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.fc-chip:hover { border-color: var(--fc-green-600); color: var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-chip[aria-pressed="true"] { border-color: var(--fc-green-600); color: var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-chip:disabled { border-style: dashed; border-color: var(--fc-line-dash); color: var(--fc-ink-250); background: var(--fc-bg-off); cursor: not-allowed; }
.fc-alt .chain { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--fc-green-600); background: none; border: 0; font-family: inherit; cursor: pointer; padding: 0; }

/* --- the format-selector card: ONE component, 8 states (§6 of the handoff).
   Height, radius, padding, gap and icon size never change between states —
   only border, background, shadow and the right-hand slot do, so switching
   state can't shift the layout. --- */
.fc-sel {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 11px; height: 62px; padding: 0 14px;
  border: 1px solid var(--fc-line); border-radius: 13px; background: var(--fc-bg-tint);
  width: 100%; font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fc-sel > img { width: 30px; height: 30px; display: block; flex: 0 0 30px; }
.fc-sel .txt { min-width: 0; }
.fc-sel .nm { font-size: 16px; font-weight: 700; color: var(--fc-ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-sel .sub { font-size: 11.5px; color: var(--fc-ink-350); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-sel .slot { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.fc-sel .caret { width: 14px; height: 14px; }
.fc-sel .caret path { stroke: var(--fc-ink-300); }
/* 01b hover */
.fc-sel:hover { border-color: var(--fc-line-hover); background: #fff; transform: translateY(-2px); box-shadow: var(--fc-sh-sel-hover); }
.fc-sel:hover .caret path { stroke: var(--fc-ink-400); }
/* 01c selected */
.fc-sel[data-state="selected"] {
  border: 1.5px solid var(--fc-green-600); background: var(--fc-bg-sel); box-shadow: var(--fc-ring);
}
.fc-sel[data-state="selected"]:hover { transform: none; box-shadow: var(--fc-ring); }
/* 02 unsupported */
.fc-sel[data-state="blocked"] {
  border: 1px dashed var(--fc-line-dash); background: var(--fc-bg-off); cursor: not-allowed;
}
.fc-sel[data-state="blocked"]:hover { transform: none; box-shadow: none; border-color: var(--fc-line-dash); background: var(--fc-bg-off); }
.fc-sel[data-state="blocked"] > img { opacity: .38; filter: grayscale(1); }
.fc-sel[data-state="blocked"] .nm { color: var(--fc-ink-250); }
.fc-sel[data-state="blocked"] .sub { color: var(--fc-ink-200); }
/* 04 local */
.fc-sel[data-state="local"] { border: 1.5px solid var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-sel[data-state="local"] .sub { color: var(--fc-green-550); font-weight: 600; }
.fc-sel[data-state="local"]:hover, .fc-sel[data-state="server"]:hover { transform: none; box-shadow: none; }
/* 05 server */
.fc-sel[data-state="server"] { border: 1.5px solid var(--fc-red-300); background: var(--fc-red-40); }
.fc-sel[data-state="server"] .sub { color: var(--fc-red-600); font-weight: 600; }
.fc-sel[data-state="server"]:hover { border-color: var(--fc-red-300); background: var(--fc-red-40); }
/* 07 converting */
.fc-sel[data-state="converting"] { border: 1.5px solid var(--fc-green-600); background: var(--fc-bg-sel); cursor: default; }
.fc-sel[data-state="converting"] .sub { color: var(--fc-green-600); font-weight: 600; }
.fc-sel[data-state="converting"]:hover { transform: none; box-shadow: none; }
/* 08a done */
.fc-sel[data-state="done"] { border: 1.5px solid var(--fc-green-400); background: var(--fc-bg-ok); cursor: default; }
.fc-sel[data-state="done"] .sub { color: var(--fc-green-550); font-weight: 600; }
.fc-sel[data-state="done"]:hover { transform: none; box-shadow: none; }
/* 08b failed */
.fc-sel[data-state="failed"] { border: 1.5px solid var(--fc-red-500); background: var(--fc-red-50); cursor: default; }
.fc-sel[data-state="failed"] .sub { color: var(--fc-red-600); font-weight: 600; }
.fc-sel[data-state="failed"]:hover { transform: none; box-shadow: none; }
/* source card keeps its own "auto-detected" hint in green */
.fc-sel .sub[data-auto="1"] { color: var(--fc-green-550); font-weight: 600; }

.fc-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.fc-pill[data-where="local"] { background: var(--fc-bg-ok-chip); color: var(--fc-green-550); }
.fc-pill[data-where="local"] i { width: 6px; height: 6px; border-radius: 50%; background: var(--fc-green-400); display: block; }
.fc-pill[data-where="server"] { background: var(--fc-red-100); color: var(--fc-red-600); }
.fc-pill[data-where="server"] svg { width: 13px; height: 13px; }
.fc-pill[data-where="blocked"] { background: var(--fc-bg-chip); color: var(--fc-ink-300); border-radius: 6px; padding: 4px 9px; font-size: 11px; }
.fc-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid #CFE3DB; border-top-color: var(--fc-green-600);
  animation: fcSpin .8s linear infinite;
}
.fc-sel-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #DCECE5; }
.fc-sel-bar i { display: block; height: 100%; width: 0; background: var(--fc-green-550); transition: width .3s ease; }
.fc-tick { width: 26px; height: 26px; border-radius: 50%; background: var(--fc-green-400); display: grid; place-items: center; flex: 0 0 26px; }
.fc-tick svg { width: 15px; height: 15px; }
.fc-btn-solid {
  padding: 8px 14px; border: 0; border-radius: 9px; background: var(--fc-green-700); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: transform .16s ease; white-space: nowrap;
}
.fc-btn-solid:hover { transform: translateY(-1px); color: #fff; }
.fc-btn-retry {
  padding: 8px 13px; border: 1px solid var(--fc-red-300); border-radius: 9px; background: transparent;
  color: var(--fc-red-600); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .16s ease; white-space: nowrap;
}
.fc-btn-retry:hover { background: var(--fc-red-100); }
.fc-btn-alt {
  padding: 8px 13px; border: 1px solid var(--fc-line); border-radius: 9px; background: transparent;
  color: var(--fc-ink-600); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .16s ease, color .16s ease; white-space: nowrap;
}
.fc-btn-alt:hover { border-color: var(--fc-green-600); color: var(--fc-green-600); }

/* format dropdown (opened by a selector card) */
.fc-menu-wrap { position: relative; }
.fc-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--fc-line); border-radius: 13px;
  box-shadow: var(--fc-sh-card-hover); padding: 6px; display: none;
}
.fc-menu.open { display: block; }
.fc-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 9px; background: none; font-family: inherit; cursor: pointer; text-align: left;
  transition: background .14s ease;
}
.fc-menu-item:hover { background: var(--fc-bg-sel); }
.fc-menu-item img { width: 24px; height: 24px; display: block; flex: 0 0 24px; }
.fc-menu-item .txt { min-width: 0; }
.fc-menu-item .nm { display: block; font-size: 14.5px; font-weight: 700; color: var(--fc-ink-900); }
.fc-menu-item .sub { display: block; font-size: 11.5px; color: var(--fc-ink-350); }
.fc-menu-item[disabled] { cursor: not-allowed; }
.fc-menu-item[disabled] img { opacity: .38; filter: grayscale(1); }
.fc-menu-item[disabled] .nm { color: var(--fc-ink-250); }
.fc-menu-item[disabled] .sub { color: var(--fc-ink-200); }
.fc-menu-item[disabled]:hover { background: var(--fc-bg-off); }
.fc-menu-item .fc-pill, .fc-menu-item .tail { margin-left: auto; }
.fc-menu-item[aria-checked="true"] { background: var(--fc-bg-sel); }

/* --- content editor --- */
.fc-editor {
  flex: 1; min-height: 120px; display: flex; flex-direction: column;
  border: 1px solid var(--fc-line); border-radius: 16px; overflow: hidden; background: #fff;
  transition: border-color .18s ease, background .18s ease;
}
.fc-editor.is-drag { border: 1px dashed var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-editor-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border-bottom: 1px solid var(--fc-line-soft); background: var(--fc-bg-tint); flex-wrap: wrap;
}
.fc-editor-head .ttl { font-size: 14px; font-weight: 700; }
.fc-file-chip {
  padding: 3px 9px; border-radius: 6px; background: var(--fc-blue-chip-bg); color: var(--fc-blue-chip-fg);
  font-size: 11.5px; font-weight: 700; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fc-editor-head .hint { margin-left: auto; font-size: 12.5px; color: var(--fc-ink-300); }
.fc-editor-body { flex: 1; min-height: 0; position: relative; }
.fc-editor-body textarea {
  position: absolute; inset: 0; width: 100%; height: 100%; resize: none; border: 0; outline: none;
  padding: 18px 20px; background: #fff; color: var(--fc-ink-700);
  font-family: var(--fc-mono); font-size: 13px; line-height: 1.85;
}
.fc-editor-body textarea::placeholder { color: var(--fc-ink-300); }
.fc-editor-body .binary {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; background: var(--fc-bg-tint);
}
.fc-editor-body .binary img { width: 44px; height: 44px; }
.fc-editor-body .binary .nm { font-size: 15px; font-weight: 700; }
.fc-editor-body .binary .sub { font-size: 12.5px; color: var(--fc-ink-400); }
.fc-editor-foot {
  display: flex; align-items: center; gap: 14px; padding: 11px 18px;
  border-top: 1px solid var(--fc-line-soft); background: var(--fc-bg-tint);
  font-size: 12.5px; color: var(--fc-ink-350); flex-wrap: wrap;
}
.fc-editor-foot .div { width: 1px; height: 12px; background: #E0E8E4; }
.fc-link {
  border: 0; background: none; padding: 0; font-family: inherit; font-size: 12.5px; color: var(--fc-ink-350);
  cursor: pointer; transition: color .16s ease;
}
.fc-link:hover { color: var(--fc-ink-900); }
.fc-link.danger { margin-left: auto; }
.fc-link.danger:hover { color: var(--fc-red-600); }

/* --- action row --- */
.fc-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fc-go {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 30px;
  border: 0; border-radius: 12px; background: linear-gradient(180deg, var(--fc-green-550), var(--fc-green-750));
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 4px rgba(11,85,68,.28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fc-go:hover { transform: translateY(-2px); box-shadow: var(--fc-sh-btn-hover-lg); }
.fc-go svg { width: 17px; height: 17px; }
.fc-go:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.fc-go[data-busy="1"] {
  background: var(--fc-green-750); box-shadow: none; cursor: default; transform: none; padding: 0 26px;
}
.fc-go[data-busy="1"]:hover { transform: none; box-shadow: none; }
.fc-go .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.16); transition: width .3s ease; }
.fc-go .lbl { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.fc-cancel { border: 0; background: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fc-ink-400); cursor: pointer; transition: color .16s ease; }
.fc-cancel:hover { color: var(--fc-red-600); }
.fc-notice {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600;
}
.fc-notice[data-where="server"] { background: var(--fc-red-100); color: var(--fc-red-600); }
.fc-notice[data-where="local"] { background: var(--fc-bg-ok-chip); color: var(--fc-green-550); }
.fc-notice[data-where="blocked"] { background: var(--fc-bg-chip); color: var(--fc-ink-400); }
.fc-notice svg { width: 15px; height: 15px; flex: 0 0 15px; }

/* --- preview panel --- */
.fc-preview {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--fc-line);
  border-radius: 16px; overflow: hidden; background: var(--fc-bg-tint);
  animation: fcRiseInSm .45s .08s ease both;
}
.fc-preview-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--fc-line-soft); background: #fff; flex-wrap: wrap;
}
.fc-seg { display: flex; padding: 3px; border-radius: 9px; background: var(--fc-bg-panel); }
.fc-seg button {
  padding: 6px 14px; border: 0; border-radius: 7px; background: none; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--fc-ink-400); cursor: pointer;
}
.fc-seg button[aria-selected="true"] { background: #fff; color: var(--fc-ink-900); font-weight: 700; box-shadow: var(--fc-sh-seg); }
.fc-preview-bar .meta { font-size: 12.5px; color: var(--fc-ink-300); }
.fc-preview-bar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fc-btn-sm {
  padding: 7px 13px; border: 1px solid var(--fc-line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--fc-ink-600); cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.fc-btn-sm:hover { border-color: var(--fc-green-600); color: var(--fc-green-600); }
.fc-btn-dl { padding: 7px 15px; border: 0; border-radius: 8px; background: var(--fc-green-700); color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .16s ease; }
.fc-btn-dl:hover { transform: translateY(-1px); }
.fc-btn-dl:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.fc-paper-wrap { flex: 1; min-height: 0; padding: 26px; overflow: auto; }
.fc-paper {
  min-height: 100%; background: #fff; border: 1px solid var(--fc-line-2); border-radius: 6px;
  box-shadow: var(--fc-sh-paper); padding: 40px 44px; overflow-wrap: break-word;
}
.fc-paper > :first-child { margin-top: 0; }
.fc-paper h1 { font-size: 25px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 22px; color: var(--fc-ink-900); }
.fc-paper h2 { font-size: 16px; font-weight: 700; padding-bottom: 7px; border-bottom: 1px solid var(--fc-line-soft); margin: 24px 0 13px; color: var(--fc-ink-900); }
.fc-paper h3, .fc-paper h4, .fc-paper h5, .fc-paper h6 { font-size: 14.5px; font-weight: 700; margin: 20px 0 10px; color: var(--fc-ink-900); }
.fc-paper p { margin: 12px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--fc-ink-700); text-wrap: pretty; }
.fc-paper ul, .fc-paper ol { margin: 12px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.95; color: var(--fc-ink-700); }
.fc-paper li { margin: 0; }
.fc-paper table { width: 100%; margin-top: 13px; border-collapse: collapse; font-size: 13px; }
.fc-paper th { text-align: left; padding: 9px 12px; background: var(--fc-bg-table); border: 1px solid var(--fc-line-2); font-weight: 700; color: var(--fc-ink-900); }
.fc-paper td { padding: 9px 12px; border: 1px solid var(--fc-line-2); color: var(--fc-ink-700); }
.fc-paper pre { margin: 13px 0 0; padding: 13px 15px; background: var(--fc-bg-table); border: 1px solid var(--fc-line-2); border-radius: 8px; overflow: auto; font-family: var(--fc-mono); font-size: 12.5px; line-height: 1.7; color: var(--fc-ink-700); }
.fc-paper code { font-family: var(--fc-mono); font-size: .92em; background: var(--fc-bg-table); border-radius: 4px; padding: .12em .34em; }
.fc-paper pre code { background: none; padding: 0; }
.fc-paper blockquote { margin: 13px 0 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--fc-line-chain); color: var(--fc-ink-500); font-size: 13.5px; line-height: 1.9; }
.fc-paper hr { border: 0; border-top: 1px solid var(--fc-line); margin: 22px 0; }
.fc-paper img { max-width: 100%; height: auto; margin: 13px 0 0; }
.fc-paper .sa-plain { white-space: pre-wrap; background: none; border: 0; padding: 0; font-family: var(--fc-mono); font-size: 13px; line-height: 1.85; }
.fc-paper-src {
  min-height: 100%; margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--fc-mono); font-size: 12.5px; line-height: 1.8; color: var(--fc-ink-700);
  background: #fff; border: 1px solid var(--fc-line-2); border-radius: 6px; box-shadow: var(--fc-sh-paper);
  padding: 24px 26px;
}
.fc-paper-empty { color: var(--fc-ink-300); font-size: 13.5px; }

/* --- chain (state 06) --- */
.fc-chain { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.fc-chain-seg {
  display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 16px;
  border: 1px solid var(--fc-line); border-radius: 13px; background: var(--fc-bg-tint);
  font-family: inherit; cursor: pointer; text-align: left;
}
.fc-chain-seg img { width: 28px; height: 28px; display: block; flex: 0 0 28px; }
.fc-chain-seg .txt { min-width: 0; }
.fc-chain-seg .nm { display: block; font-size: 15px; font-weight: 700; color: var(--fc-ink-900); }
.fc-chain-seg .sub { display: block; font-size: 11px; color: var(--fc-ink-350); }
.fc-chain-seg[data-final="1"] { border: 1.5px solid var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-chain-seg[data-final="1"] .sub { color: var(--fc-green-600); font-weight: 600; }
.fc-chain-seg[data-state="done"] { border: 1.5px solid var(--fc-green-400); background: var(--fc-bg-ok); }
.fc-chain-seg[data-state="failed"] { border: 1.5px solid var(--fc-red-500); background: var(--fc-red-50); }
.fc-chain-seg[data-state="converting"] { border: 1.5px solid var(--fc-green-600); background: var(--fc-bg-sel); }
.fc-chain-link { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0 14px; }
.fc-chain-link .line { display: flex; align-items: center; gap: 4px; }
.fc-chain-link .line i { width: 26px; height: 2px; background: var(--fc-line-chain); display: block; }
.fc-chain-link .line span { color: var(--fc-ink-300); font-size: 13px; }
.fc-chain-link .where { font-family: var(--fc-mono); font-size: 10.5px; }
.fc-chain-link .where[data-where="local"] { color: var(--fc-green-550); }
.fc-chain-link .where[data-where="server"] { color: var(--fc-red-600); }
.fc-chain-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fc-btn-chain-run {
  padding: 8px 16px; border: 0; border-radius: 9px; background: linear-gradient(180deg, var(--fc-green-550), var(--fc-green-750));
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.fc-btn-chain-run:disabled { opacity: .5; cursor: not-allowed; }

/* --- modal (settings / history) --- */
.fc-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.fc-modal.open { display: block; }
.fc-modal-back { position: absolute; inset: 0; background: rgba(15,26,23,.32); }
.fc-modal-box {
  position: relative; margin: 8vh auto 0; width: min(560px, calc(100vw - 32px));
  max-height: 80vh; overflow: auto; background: #fff; border: 1px solid var(--fc-line);
  border-radius: 18px; box-shadow: 0 24px 60px rgba(15,26,23,.18); padding: 24px 26px;
}
.fc-modal-box h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.fc-modal-box .lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.7; color: var(--fc-ink-500); }
.fc-modal-close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border: 1px solid var(--fc-line); border-radius: 8px; background: #fff; color: var(--fc-ink-400); cursor: pointer; display: grid; place-items: center; }
.fc-modal-close:hover { border-color: var(--fc-green-600); color: var(--fc-green-600); }
.fc-field { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--fc-line-soft); }
.fc-field:first-of-type { border-top: 0; }
.fc-field .k { font-size: 14px; font-weight: 600; color: var(--fc-ink-700); }
.fc-field .v { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fc-field select, .fc-field input[type="number"] {
  height: 34px; padding: 0 10px; border: 1px solid var(--fc-line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 13.5px; color: var(--fc-ink-700);
}
.fc-field select:focus, .fc-field input:focus { outline: none; border-color: var(--fc-green-600); box-shadow: var(--fc-ring); }
.fc-field input[type="number"] { width: 76px; }
.fc-switch { width: 42px; height: 24px; border-radius: 999px; border: 0; background: var(--fc-line); cursor: pointer; position: relative; transition: background .18s ease; }
.fc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.fc-switch[aria-checked="true"] { background: var(--fc-green-600); }
.fc-switch[aria-checked="true"]::after { transform: translateX(18px); }
.fc-hist { display: flex; flex-direction: column; gap: 8px; }
.fc-hist-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--fc-line); border-radius: 11px; background: var(--fc-bg-tint); }
.fc-hist-row img { width: 22px; height: 22px; }
.fc-hist-row .nm { display: block; font-size: 13.5px; font-weight: 700; color: var(--fc-ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-hist-row .sub { display: block; font-size: 11.5px; color: var(--fc-ink-350); }
.fc-hist-row .body { min-width: 0; flex: 1; }
.fc-modal-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.fc-modal-foot .fc-btn-solid { margin-left: auto; }

/* toast */
.fc-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  z-index: 200; max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 11px; font-family: var(--fc-font); font-size: 13.5px; font-weight: 600;
  background: var(--fc-ink-900); color: #fff; box-shadow: 0 12px 32px rgba(15,26,23,.24);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.fc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fc-toast[data-kind="error"] { background: var(--fc-red-600); }
.fc-toast[data-kind="ok"] { background: var(--fc-green-700); }

/* ============================== responsive ============================== */
@media (max-width: 1180px) {
  .fc-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .fc-work { grid-template-columns: 1fr; overflow: auto; }
  .fc-preview { min-height: 460px; }
  .fc-app { grid-template-columns: 200px 1fr; }
}
@media (max-width: 900px) {
  .fc-shell { padding: 0 20px; }
  .fc-hero { padding: 40px 0 44px; }
  .fc-hero h1 { font-size: 38px; }
  .fc-hero-card { padding: 20px 20px 18px; border-radius: 18px; }
  .fc-hero-pair { grid-template-columns: 1fr; }
  .fc-swap-lg { justify-self: center; transform: rotate(90deg); }
  .fc-swap-lg:hover { transform: rotate(270deg); }
  .fc-hero-go { margin-left: 0; width: 100%; }
  .fc-paths { grid-template-columns: 1fr; padding-bottom: 44px; }
  .fc-sec-head { padding: 34px 0 18px; }
  .fc-sec-head .more { margin-left: 0; }
  .fc-plugin-inner { gap: 20px; padding: 22px 20px; }
  /* Below this width the app shell becomes a normal scrolling page (a locked
     viewport is wrong on a phone), so the convert button is made sticky — it
     stays on screen no matter how long the pasted content is. */
  .fc-app { grid-template-columns: 1fr; height: auto; min-height: 100dvh; overflow: visible; }
  .fc-work { overflow: visible; }
  .fc-editor { min-height: 240px; }
  .fc-preview { min-height: 420px; }
  /* `sticky` is not enough here: it only pins within its own container, and
     .fc-col-left scrolls out of view long before the (much taller) preview
     does. Fixed to the window is what "always reachable" actually requires. */
  .fc-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    margin: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--fc-line-soft);
    box-shadow: 0 -4px 16px rgba(15, 26, 23, .06);
  }
  /* Reserve exactly what the bar occupies. A fixed number can't work: the
     notice wraps to a second line in some languages (de/ru run longer), so
     converter.js measures the bar and publishes --fc-bar-h. */
  .fc-work { padding-bottom: calc(var(--fc-bar-h, 104px) + 16px); }
  /* The entry animation leaves a transform on .fc-col-left, and ANY non-none
     transform makes it the containing block for position:fixed — which silently
     re-anchors the action bar to the column instead of the window. Drop the
     animation here; the bar staying reachable matters more than a 450ms rise. */
  .fc-col-left, .fc-preview { animation: none; }
  .fc-side { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; overflow-x: auto; overflow-y: hidden; }
  /* Horizontal rail: the wordmark would wrap and eat the row, and the main
     header already says where you are — keep the logo only. */
  .fc-side-brand { flex: 0 0 auto; padding: 0; }
  .fc-side-brand span { display: none; }
  .fc-side nav { flex-direction: row; gap: 4px; flex: 0 0 auto; }
  .fc-nav-item { height: 38px; white-space: nowrap; }
  .fc-nav-item[aria-current="page"] .dot { display: none; }
  .fc-side-promo { display: none; }
  .fc-main-head { height: auto; padding: 14px 18px; flex-wrap: wrap; }
  /* NOT a `padding` shorthand: the bottom reserve for the fixed action bar is
     set above and a shorthand here silently wipes it (same trap style.css
     documents for the landing rhythm). */
  .fc-work { padding-top: 18px; padding-left: 18px; padding-right: 18px; gap: 18px; }
  .fc-pair { grid-template-columns: 1fr; }
  .fc-swap { margin: 0 auto; transform: rotate(90deg); }
  .fc-swap:hover { transform: rotate(270deg); }
  .fc-paper { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-hero-copy, .fc-hero-card, .fc-col-left, .fc-preview { animation: none; }
  .fc-swap, .fc-swap-lg { animation: none; }
  .fc-swap:hover, .fc-swap-lg:hover { transform: none; }
  .fc-path:hover, .fc-sel:hover, .fc-go:hover, .fc-btn-grad:hover, .fc-hero-go:hover,
  .fc-btn-solid:hover, .fc-btn-dl:hover, .fc-side-promo a:hover { transform: none; }
  /* the progress bar and the loading spinner stay — they report real work */
}

/* ================================ RTL ================================== */
/* Layout mirrors itself (flex + auto margins), but directional arrows don't:
   flip the drawn ones, and the inline "→" glyphs in the icon pairs. */
[dir="rtl"] .fc-go svg,
[dir="rtl"] .fc-path .pair > span,
[dir="rtl"] .fc-plugin-icons > span,
[dir="rtl"] .fc-chain-link .line span { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .fc-editor-body textarea { text-align: right; }
[dir="rtl"] .fc-paper-src { text-align: right; }
