/*
 * FOREMAN — Shared Apple-inspired UI system
 * Used across marketplace, tool detail pages, creator portal, and product pages.
 * Link in every page with: <link rel="stylesheet" href="/assets/foreman-ui.css">
 */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --bg-tinted: #e8f0fa;
  --bg-tinted-pink: #fef1f3;
  --bg-tinted-amber: #fff7e6;
  --bg-dark: #000;
  --bg-dark-2: #1d1d1f;
  --bg-dark-3: #2c2c2e;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #86868b;
  --line: #d2d2d7;
  --line-2: #e5e5ea;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-dark: #2997ff;
  --blue-soft: #e9f2fc;
  --gold: #B8860B;
  --gold-2: #D4A84C;
  --grn: #248a3d;
  --red: #d70015;
  --purple: #5856d6;
  --teal: #30b0c7;
  --orange: #ff9500;
  --ff: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.25,0.1,0.25,1);
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.12);
  --shadow-icon: 0 10px 24px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  font-weight: 400;
  letter-spacing: -0.012em;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* Reveal */
.r { opacity: 0; transform: translateY(18px); transition: opacity .65s var(--ease-out), transform .65s var(--ease-out); }
.r.v { opacity: 1; transform: translateY(0); }
.r-d1 { transition-delay: .07s; } .r-d2 { transition-delay: .14s; } .r-d3 { transition-delay: .21s; } .r-d4 { transition-delay: .28s; }

/* Nav */
nav.top {
  position: sticky; top: 0; z-index: 80;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  background: rgba(251,251,253,0.82);
  border-bottom: 0.5px solid var(--line);
}
nav.top.dark {
  background: rgba(0,0,0,0.72);
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
}
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -0.022em; display: inline-flex; align-items: center; }
.brand::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #E6BE63, #B8860B); margin-left: 8px; }
nav.top.dark .brand { color: #fff; }
.nav-right { display: flex; gap: 2px; align-items: center; }
.nav-link { font-size: 14px; color: var(--ink); font-weight: 400; padding: 8px 14px; border-radius: 100px; letter-spacing: -0.01em; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(0,0,0,0.06); }
nav.top.dark .nav-link { color: #fff; }
nav.top.dark .nav-link:hover { background: rgba(255,255,255,0.1); }
.nav-cta { background: var(--blue); color: #fff; padding: 9px 18px; border-radius: 100px; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; margin-left: 8px; transition: background .15s; }
.nav-cta:hover { background: var(--blue-hover); }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-md { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn { padding: 12px 26px; border-radius: 100px; font-family: var(--ff); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s, transform .15s, box-shadow .2s; cursor: pointer; border: 0; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-ghost { background: rgba(0,0,0,0.06); color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,0.1); }
.btn-dark-primary { background: #fff; color: var(--ink); }
.btn-dark-primary:hover { background: rgba(255,255,255,0.92); }
.btn-dark-outline { background: transparent; color: var(--blue-dark); border: 1px solid var(--blue-dark); }
.btn-dark-outline:hover { background: rgba(41,151,255,0.12); }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* Filter chips */
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip { padding: 8px 18px; border-radius: 100px; background: rgba(0,0,0,0.05); color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; border: none; cursor: pointer; transition: background .15s, color .15s; text-decoration: none; }
.chip:hover { background: rgba(0,0,0,0.08); }
.chip.active { background: var(--ink); color: #fff; }

/* Hero primitives */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--bg-alt);
  border: 0.5px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  letter-spacing: -0.01em;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grn); animation: fm-pulse 2.4s ease-in-out infinite; }
@keyframes fm-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Typography primitives */
.fm-h1 { font-size: clamp(52px, 8vw, 104px); font-weight: 700; line-height: 1.02; letter-spacing: -0.045em; color: var(--ink); }
.fm-h1 em { font-style: normal; color: var(--ink-3); font-weight: 700; }
.fm-h2 { font-size: clamp(40px, 5.5vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; color: var(--ink); }
.fm-h2 em { font-style: normal; color: var(--ink-3); font-weight: 700; }
.fm-eyebrow { font-size: 15px; font-weight: 500; color: var(--blue); letter-spacing: -0.01em; }
.fm-lead { font-size: clamp(19px, 2vw, 23px); font-weight: 400; color: var(--ink-2); line-height: 1.35; letter-spacing: -0.015em; }

/* Section scaffolding */
section.sec { padding: 96px 0 24px; }
.sec-head { text-align: center; margin-bottom: 48px; }
.sec-head .eyebrow { display: inline-block; font-size: 15px; font-weight: 500; color: var(--blue); letter-spacing: -0.01em; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(40px, 5.5vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; color: var(--ink); margin-bottom: 14px; }
.sec-head h2 em { font-style: normal; color: var(--ink-3); font-weight: 700; }
.sec-head p { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 620px; margin: 0 auto; line-height: 1.4; font-weight: 400; letter-spacing: -0.015em; }
.dark-sec { background: var(--bg-dark); color: #fff; padding: 120px 0; }
.dark-sec .sec-head h2 { color: #fff; }
.dark-sec .sec-head h2 em { color: rgba(255,255,255,0.5); }
.dark-sec .sec-head p { color: rgba(255,255,255,0.7); }
.dark-sec .sec-head .eyebrow { color: var(--blue-dark); }

/* Tool tile (Apple App Store style) */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
  min-height: 248px;
  transition: transform .25s var(--ease-out), box-shadow .25s;
  text-decoration: none;
  border: 0.5px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile[data-status="soon"] { background: var(--bg-alt); }
.tile[data-status="soon"] .tile-name { color: var(--ink-2); }
.tile-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--g1, #0071e3) 0%, var(--g2, #5856d6) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  box-shadow: var(--shadow-icon);
  transition: transform .3s var(--ease-out);
}
.tile:hover .tile-icon { transform: scale(1.06) rotate(-3deg); }
.tile-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile-name { font-size: 19px; font-weight: 600; letter-spacing: -0.024em; color: var(--ink); line-height: 1.2; }
.tile-role { font-size: 13.5px; color: var(--ink-3); line-height: 1.42; font-weight: 400; letter-spacing: -0.01em; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.tile-price { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; }
.tile-price .unit { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-left: 1px; }
.tile-foot::after {
  content: 'Get';
  font-size: 13px; font-weight: 700;
  color: var(--blue); background: var(--blue-soft);
  padding: 5px 16px; border-radius: 100px;
  letter-spacing: -0.01em;
  transition: background .15s, color .15s;
}
.tile:hover .tile-foot::after { background: var(--blue); color: #fff; }
.tile[data-status="soon"] .tile-foot::after { content: 'Notify'; color: var(--ink-2); background: rgba(0,0,0,0.06); }
.tile[data-status="soon"]:hover .tile-foot::after { background: var(--ink); color: #fff; }
.tile[data-status="new"] .tile-foot::after { content: 'Try it'; color: #fff; background: var(--gold-2); }
.tile[data-status="new"]:hover .tile-foot::after { background: var(--gold); }
.badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 100px;
  letter-spacing: -0.005em;
}
.badge-live { color: var(--grn); background: rgba(36,138,61,0.12); }
.badge-new { color: #fff; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.badge-soon { color: var(--ink-3); background: rgba(0,0,0,0.06); }

/* Forms (shared for request-a-tool, waitlist, creator submission) */
.form-card {
  background: #fff;
  border-radius: 28px;
  padding: 64px 56px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.form-card h3 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; letter-spacing: -0.038em; margin-bottom: 14px; text-align: center; line-height: 1.02; color: var(--ink); }
.form-card h3 em { font-style: normal; color: var(--blue); font-weight: 700; }
.form-card .lead { color: var(--ink-2); font-size: 18px; text-align: center; margin-bottom: 36px; line-height: 1.45; font-weight: 400; max-width: 580px; margin-left: auto; margin-right: auto; letter-spacing: -0.015em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-bottom: 8px; letter-spacing: -0.005em; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--ff);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(0,113,227,0.15); }
.field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.field-full { grid-column: 1 / -1; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.submit-hint { font-size: 13.5px; color: var(--ink-3); letter-spacing: -0.01em; }
.form-msg { display: none; padding: 14px 18px; border-radius: 12px; margin-top: 20px; font-size: 14.5px; font-weight: 500; }
.form-msg.ok { display: block; color: var(--grn); background: rgba(36,138,61,0.1); }
.form-msg.err { display: block; color: var(--red); background: rgba(215,0,21,0.08); }

/* FAQ */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--line); padding: 28px 0; }
.faq-q { font-size: 20px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.025em; color: var(--ink); }
.faq-a { color: var(--ink-2); font-size: 16.5px; line-height: 1.5; max-width: 760px; font-weight: 400; letter-spacing: -0.015em; }

/* Footer */
footer { background: var(--bg-dark); color: rgba(255,255,255,0.62); padding: 56px 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.foot-row { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; letter-spacing: -0.01em; }
.foot-links a { color: rgba(255,255,255,0.62); margin-right: 22px; font-size: 13px; font-weight: 400; transition: color .12s; }
.foot-links a:hover { color: #fff; }

/* Intake pages */
.intake-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; }
.intake-gate { padding: 80px 24px; text-align: center; color: var(--ink-2); }
.intake-gate h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.028em; color: var(--ink); margin-bottom: 10px; }
.intake-gate p { font-size: 15px; line-height: 1.55; max-width: 520px; margin: 0 auto; letter-spacing: -0.015em; }
.intake-gate.err h2 { color: var(--red); }
.intake-hero { margin-bottom: 40px; }
.intake-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 100px; background: #e5f8ec; color: var(--grn); font-size: 13px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 22px; }
.intake-hero h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; color: var(--ink); margin-bottom: 14px; }
.intake-hero h1 em { font-style: normal; color: var(--blue); font-weight: 700; }
.intake-hero p { font-size: 17px; color: var(--ink-2); line-height: 1.5; letter-spacing: -0.015em; max-width: 600px; }
.intake-hero p strong { color: var(--ink); font-weight: 600; }
.intake-section { background: #fff; border: 0.5px solid var(--line-2); border-radius: 22px; padding: 36px 32px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
@media (max-width: 600px) { .intake-section { padding: 28px 22px; } }
.intake-section h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin-bottom: 6px; }
.intake-section .sub { font-size: 14.5px; color: var(--ink-3); line-height: 1.5; margin-bottom: 24px; letter-spacing: -0.01em; }
.intake-section .field { margin-bottom: 16px; }
.intake-section .field:last-child { margin-bottom: 0; }
.intake-section label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.015em; }
.intake-section .help { font-size: 13px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; letter-spacing: -0.01em; }
.intake-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 640px) { .intake-row { grid-template-columns: 1fr; } }
.intake-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .intake-row.three { grid-template-columns: 1fr; } }
.intake-check-group { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.intake-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--ink); font-weight: 400; cursor: pointer; padding: 10px 14px; background: var(--bg-alt); border-radius: 10px; transition: background .15s; }
.intake-check:hover { background: #eeeef0; }
.intake-check input { margin-top: 2px; accent-color: var(--blue); }
.intake-check input:checked + span { font-weight: 500; }
.intake-radio-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.intake-radio { flex: 1; min-width: 140px; }
.intake-radio input { position: absolute; opacity: 0; }
.intake-radio label { display: block; padding: 12px 16px; background: var(--bg-alt); border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink); text-align: center; cursor: pointer; border: 2px solid transparent; margin: 0; transition: background .15s, border-color .15s; }
.intake-radio input:checked + label { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.intake-submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 10px; flex-wrap: wrap; }
.intake-submit-bar .note { font-size: 13px; color: var(--ink-3); letter-spacing: -0.01em; }
.intake-success, .intake-already { background: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; box-shadow: var(--shadow-md); border: 0.5px solid var(--line-2); }
.intake-success .icon, .intake-already .icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.intake-success .icon { background: linear-gradient(135deg, #30d158, #84cc16); color: #fff; box-shadow: 0 12px 28px rgba(48,209,88,0.25); }
.intake-already .icon { background: var(--bg-alt); color: var(--ink-3); }
.intake-success h2, .intake-already h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.032em; color: var(--ink); margin-bottom: 10px; }
.intake-success p, .intake-already p { font-size: 16px; color: var(--ink-2); line-height: 1.5; max-width: 460px; margin: 0 auto 16px; letter-spacing: -0.015em; }

/* Responsive helpers */
@media (max-width: 600px) {
  .nav-right .nav-link { display: none; }
  section.sec { padding: 72px 0 16px; }
  .form-card { padding: 44px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .r { transition: none; opacity: 1; transform: none; }
  .tile:hover { transform: none; }
}

/* ============================================================
 * FOREMAN CHROME — premium aesthetic extensions (P1)
 * Paired with FOREMAN_DESIGN_2030.md §2. Non-breaking.
 * ============================================================ */

:root {
  /* Chrome edges & shadows */
  --chrome-edge: rgba(255,255,255,0.6);
  --chrome-hairline: 0.5px solid var(--line-2);
  --shadow-hero: 0 32px 80px -20px rgba(0,0,0,0.35);
  --shadow-data: 0 4px 24px -8px rgba(0,0,0,0.08);
  --shadow-inset-chrome: inset 0 0 0 1.5px var(--chrome-edge);

  /* Refractor */
  --refractor-conic: conic-gradient(from 180deg at 50% 50%, #ff006e, #fb5607, #ffbe0b, #8338ec, #3a86ff, #ff006e);
  --refractor-sheen: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.30) 50%, transparent 60%);
  --refractor-opacity: 0.08;

  /* Foil */
  --foil-gold: linear-gradient(135deg, #E6BE63 0%, #B8860B 50%, #D4A84C 100%);
  --foil-chrome: linear-gradient(135deg, #d2d2d7 0%, #f5f5f7 50%, #86868b 100%);

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'DM Mono', 'SF Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Motion */
  --ease-card: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-quick: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-card: 650ms;
  --dur-state: 220ms;
  --dur-reveal: 600ms;

  /* Grain (asset ships later phase — safe to declare) */
  --grain-url: url('/assets/noise.png');
  --grain-opacity: 0.03;

  /* Dark-panel palette (promoted for live + card consumers) */
  --ink-on-dark: #f5f5f7;
  --ink-on-dark-2: rgba(245,245,247,0.72);
  --ink-on-dark-3: rgba(245,245,247,0.50);
  --line-on-dark: rgba(255,255,255,0.10);
  --line-on-dark-soft: rgba(255,255,255,0.06);

  /* Live-action colors */
  --live-red: #ff453a;
  --live-green: #30d158;
  --live-amber: #ff9f0a;
  --live-blue: #2997ff;
}

/* Chrome card utility — opt-in */
.chrome-card { position: relative; border-radius: 22px; background: #fff; border: var(--chrome-hairline); box-shadow: var(--shadow-data); }
.chrome-card.hero { box-shadow: var(--shadow-hero); overflow: hidden; }
.chrome-card.hero::before { content: ''; position: absolute; inset: 0; background: var(--refractor-conic); opacity: var(--refractor-opacity); mix-blend-mode: color-dodge; pointer-events: none; border-radius: inherit; }
.chrome-card.grain::after { content: ''; position: absolute; inset: 0; background: var(--grain-url); opacity: var(--grain-opacity); mix-blend-mode: overlay; pointer-events: none; border-radius: inherit; }

/* Typography helpers */
.fm-num { font-family: var(--font-mono); letter-spacing: -0.02em; font-feature-settings: "tnum"; }
.fm-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.fm-eyebrow-serif { font-family: var(--font-serif); font-style: italic; font-size: 32px; line-height: 1.0; color: var(--ink); letter-spacing: -0.02em; }

/* Chip rail — canonical dropdown replacement (FOREMAN_DESIGN_2030.md §3.9) */
.fm-chip-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 4px 2px 14px;
  margin: 0 -4px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fm-chip-rail::-webkit-scrollbar { display: none; }
.fm-chip-rail-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  max-width: 220px;
  height: 64px;
  padding: 10px 16px 10px 10px;
  background: #fff;
  border: 0.5px solid var(--line-2);
  border-radius: 18px;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-state) var(--ease-quick),
              box-shadow var(--dur-state) var(--ease-quick),
              background var(--dur-state) var(--ease-quick),
              color var(--dur-state) var(--ease-quick);
  font-family: var(--ff);
  font-size: 14px;
  text-align: left;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.fm-chip-rail-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-data); }
.fm-chip-rail-item:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,113,227,0.15), var(--shadow-data); }
.fm-chip-rail-item.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-data), var(--shadow-inset-chrome);
  transform: translateY(-2px);
}
.fm-chip-avatar {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--foil-chrome);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.08);
}
.fm-chip-rail-item.is-active .fm-chip-avatar {
  border-color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.35);
}
.fm-chip-body { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-chip-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-chip-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-3);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-chip-rail-item.is-active .fm-chip-meta { color: rgba(255,255,255,0.7); }

@media (prefers-reduced-motion: reduce) {
  .fm-chip-rail-item { transition: none; }
  .fm-chip-rail-item:hover,
  .fm-chip-rail-item.is-active { transform: none; }
}
