@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   Hubicx webapp — Soft Neutral theme
   Drop-in replacement for ma.css
   ============================================================ */
:root {
  --bg: #f3f2ee;
  --card: #ffffff;
  --ink: #1c1c1a;
  --muted: #8d8d87;
  --faint: #b6b6af;
  --line: #e9e8e3;
  --accent: #fcfd76;
  --accent-ink: #1c1c1a;
  --link: #7a9c92;
  --nav-bg: #e8e7e2;
  --nav-active: #ffffff;
  --r: 18px;
  --r-lg: 24px;
  --shadow: 0 6px 20px rgba(40,40,30,.07);
  --shadow-sm: 0 3px 10px rgba(40,40,30,.05);
  --maxw: 392px;
}

html.theme-dark,
body.theme-dark {
  --bg: #111318;
  --card: #191c23;
  --ink: #f2f4f8;
  --muted: #a0a7b4;
  --faint: #69707d;
  --line: #292d36;
  --accent: #f5f85d;
  --accent-ink: #111318;
  --link: #90c7b8;
  --nav-bg: #0b0d11;
  --nav-active: #232731;
  --shadow: 0 8px 26px rgba(0,0,0,.35);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.28);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--nav-bg); }
body {
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -.01em;
}
#root { min-height: 100%; display: flex; justify-content: center; }
.phone {
  position: relative; width: 100%; max-width: 100%; min-height: 100dvh;
  background: var(--bg); overflow: hidden; display: flex; flex-direction: column;
}

/* ── top segmented nav ── */
.topnav {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 8px;
  background: var(--bg); position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.tn-seg {
  flex: 1; display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: var(--nav-bg);
}
.tn-item {
  flex: 1; height: 36px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .18s;
}
.tn-item.on { background: var(--nav-active); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tn-icon {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink); position: relative; cursor: pointer;
}
.tn-dot {
  position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: #e0664a; border: 2px solid var(--card);
}

/* ── scrollable screen body ── */
.screen {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(env(safe-area-inset-bottom) + 32px);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

/* ── cards ── */
.card {
  background: var(--card); border-radius: var(--r);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.row-link {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px; cursor: pointer;
}
.row-link:active { background: #f8f7f2; }
html.theme-dark .row-link:active { background: #20242c; }
.row-link .chev { margin-left: auto; }
.divider { height: 1px; background: var(--line); margin-left: 54px; }

/* ── section header ── */
.sec-h {
  display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px;
}
.sec-h h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.sec-h .all { color: var(--link); font-size: 13.5px; font-weight: 700; cursor: pointer; }

/* ── horizontal rail ── */
.rail {
  display: flex; gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.thumb {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #ebe9e0; flex: 0 0 auto; border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .lbl {
  position: absolute; left: 10px; right: 10px; bottom: 9px;
  font-weight: 700; font-size: 13px; line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0,0,0,.5); z-index: 2; color: #fff;
}
.thumb .shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55)); z-index: 1;
}

/* ── ask / search bar ── */
.askbar {
  display: flex; align-items: center; gap: 9px; height: 58px; border-radius: 19px;
  padding: 0 8px 0 18px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(40,40,30,.08);
}
.askbar input {
  flex: 1; background: none; border: none; outline: none; color: var(--ink);
  font-size: 15.5px; font-family: inherit; font-weight: 500;
}
.askbar input::placeholder { color: var(--muted); }
.send {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--nav-bg); color: var(--muted); transition: background .18s, color .18s;
}
.send.on { background: var(--ink); color: #fff; }

/* ── greeting ── */
.greeting {
  font-size: 27px; font-weight: 800; line-height: 1.12; letter-spacing: -.03em; margin-top: 16px;
}
.greeting .grad {
  background: linear-gradient(90deg, #7faa9d, #b6b5e6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.greeting-sub { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 6px; }

/* ── 2×2 action grid ── */
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 14px; }
.act-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  min-height: 96px; justify-content: space-between; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.act-card:active { transform: scale(.96); }
.act-card .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.act-card .t { font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; }
.act-card .s { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* ── quick idea tiles (4-col) ── */
.idea-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.idea-tile {
  border-radius: 16px; padding: 11px 9px; min-height: 86px;
  display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
}
.idea-tile .ic { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.idea-tile .l { font-size: 11px; font-weight: 700; line-height: 1.2; }

/* ── chat plate (in agent) ── */
.chat-plate {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.chat-plate .cp-av { width: 42px; height: 42px; border-radius: 13px; overflow: hidden; flex: 0 0 auto; }
.chat-plate .cp-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-plate .cp-x {
  margin-left: auto; color: var(--faint); width: 28px; height: 28px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.chat-plate .cp-x:active { background: var(--nav-bg); }

/* ── balance card (generation) ── */
.bal-card {
  display: flex; align-items: center; padding: 16px 18px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.bal-card .bk { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bal-card .bn { display: flex; align-items: center; gap: 7px; font-size: 22px; font-weight: 800; margin-top: 4px; }
.bal-card .bb {
  margin-left: auto; height: 40px; padding: 0 18px; border-radius: 13px; border: none;
  font-family: inherit; font-weight: 800; font-size: 14px;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
  box-shadow: 0 4px 12px rgba(210,210,80,.4);
}

/* ── token badge ── */
.tb-tok {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 19px;
  background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sm); flex: 0 0 auto;
}

/* ── bottom sheets ── */
.sheet-ov {
  position: fixed; inset: 0; z-index: 60; background: rgba(28,28,22,.36);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet { width: 100%; max-width: 100%; padding: 0 14px calc(env(safe-area-inset-bottom) + 14px); }
.sheet-card {
  background: var(--card); border-radius: 26px 26px 0 0;
  padding: 8px 18px 18px; border: 1px solid var(--line); border-bottom: none;
  box-shadow: 0 -14px 38px rgba(0,0,0,.10);
}
.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 14px; }
.sheet-h { color: var(--link); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.sheet-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 2px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.opt:last-child { border-bottom: none; }
.opt:active { background: #f8f7f2; }
.opt .o-t { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.opt .o-s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.opt .o-check { margin-left: auto; color: var(--ink); }
.sheet-cta {
  width: 100%; height: 54px; border: none; border-radius: 16px; margin-top: 12px;
  background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 800;
  cursor: pointer; font-family: inherit; box-shadow: 0 8px 20px rgba(210,210,80,.4);
}

/* ── generation spinner ── */
.gen-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--faint); border-top-color: var(--ink);
  animation: gen-spin .75s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }

/* ── primary buttons ── */
.btn-secondary {
  width: 100%; height: 52px; border-radius: 17px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.btn-secondary:active { opacity: .75; }
.btn-secondary:disabled { opacity: .5; cursor: default; }
.btn-primary {
  width: 100%; height: 56px; border-radius: 17px; border: none; font-size: 16px; font-weight: 800;
  color: var(--accent-ink); background: var(--accent); cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 24px rgba(210,210,80,.42);
}
.btn-primary:disabled { background: #eceae3; color: #b3b2a9; box-shadow: none; cursor: default; }
.btn-blue {
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: 13px;
  height: 40px; padding: 0 18px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit;
}

/* ── segmented control ── */
.seg { display: flex; background: var(--nav-bg); border-radius: 15px; padding: 4px; gap: 3px; }
.seg button {
  flex: 1; height: 40px; border: none; background: none; color: var(--muted);
  font-weight: 700; font-size: 13.5px; border-radius: 12px; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-family: inherit;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* ── create screen header ── */
.cr-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 18px 8px;
  background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.cr-back {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer;
}
.cr-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-tok { display: flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 800; font-size: 14px; }

/* ── upload drop zone ── */
.drop-zone {
  border-radius: var(--r); border: 1.5px dashed var(--faint); background: #f8f7f2;
  padding: 22px; text-align: center; cursor: pointer; margin-top: 12px;
}
html.theme-dark .drop-zone,
html.theme-dark .text-in,
html.theme-dark .emoji-cell { background: #12151b; }
html.theme-dark .text-in:focus { background: var(--card); border-color: #454b58; }
html.theme-dark .emoji-cell.on { background: #252a34; border-color: var(--ink); }
.drop-zone .di {
  width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line);
}
.drop-zone .dt { font-weight: 800; font-size: 15px; }
.drop-zone .ds { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.drop-zone.has { padding: 0; overflow: hidden; position: relative; border-style: solid; border-color: var(--line); }

/* ── profile ── */
.label-sec { color: var(--link); font-weight: 700; font-size: 13px; padding: 4px 2px; }
.muted { color: var(--muted); }
.prow { display: flex; align-items: center; gap: 10px; padding: 13px 2px; cursor: pointer; }
.linkrow { color: var(--link); font-weight: 700; font-size: 15px; padding: 14px 2px; cursor: pointer; }
.switch {
  width: 46px; height: 28px; border-radius: 16px; background: var(--line);
  position: relative; flex: 0 0 auto; transition: background .22s; cursor: pointer;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .22s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--ink); }
html.theme-dark .switch.on { background: var(--accent); }
html.theme-dark .switch.on i { background: #111318; }
.switch.on i { transform: translateX(18px); }
.text-in {
  width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line);
  background: #f8f7f2; color: var(--ink); font-size: 15px; padding: 0 16px;
  outline: none; font-family: inherit; margin-top: 4px;
}
.text-in::placeholder { color: var(--muted); }
.text-in:focus { border-color: #c7c6bd; background: var(--card); }
.emoji-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 6px; margin-top: 6px; }
.emoji-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 22px;
  border-radius: 10px; cursor: pointer; background: #f8f7f2; border: 1.5px solid transparent;
}
.emoji-cell.on { border-color: var(--ink); background: #f0efe8; }

/* ── chat overlay ── */
.chat-wrap {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 100%; height: 100dvh; z-index: 45;
  display: flex; flex-direction: column; background: var(--bg);
}
.chat-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 12px 18px;
  padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.chat-back {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer;
}
.chat-id { display: flex; align-items: center; gap: 10px; }
.chat-av { width: 40px; height: 40px; border-radius: 13px; overflow: hidden; flex: 0 0 auto; }
.chat-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.chat-body::-webkit-scrollbar { display: none; }
.bubble {
  max-width: 80%; padding: 11px 15px; border-radius: 18px; font-size: 15px;
  line-height: 1.42; white-space: pre-wrap;
}
.bubble.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.bot {
  align-self: flex-start; background: var(--card); border: 1px solid var(--line);
  border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm);
}
.bubble.bot.err { background: #fef0ee; border-color: #f5c0ba; color: #a83428; }
.bubble.typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: tdot 1.2s infinite; }
.bubble.typing span:nth-child(2) { animation-delay: .2s; }
.bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes tdot { 0%,60%,100%{opacity:.4;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }
.chat-input { flex: 0 0 auto; padding: 10px 18px calc(env(safe-area-inset-bottom) + 14px); }

/* ── misc ── */
.chev { color: var(--faint); display: flex; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 16px; border-radius: 15px;
  background: var(--card); color: var(--ink); font-size: 14.5px; font-weight: 700;
  border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow-sm);
}
.pill:active { transform: scale(.96); }
.scr-enter { animation: scrUp .3s cubic-bezier(.2,.85,.25,1) both; }
@keyframes scrUp { from { transform: translateY(12px); } to { transform: none; } }
.rise { animation: rise .48s cubic-bezier(.2,.85,.25,1) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .scr-enter, .bubble, .rise { animation: none !important; } }

/* ══ Telegram fullscreen: 100px safe area at top ═══════════════ */
.tg-fs .topnav {
  padding-top: max(env(safe-area-inset-top, 0px), 100px);
}
.tg-fs .chat-top {
  padding-top: max(calc(12px + env(safe-area-inset-top)), 112px);
}

/* ══ Desktop layout — browser ≥768px OR Telegram PC ═══════════════
   html.desktop class is toggled by JS (index.html init script).
   Triggered by: viewport ≥768px in browser, OR tdesktop/macos/web
   platform in Telegram.
══════════════════════════════════════════════════════════════════ */
html.desktop #root { align-items: flex-start; }

html.desktop .phone {
  max-width: 100%; min-height: 100dvh;
  box-shadow: 0 0 0 1px var(--line);
}

/* Screen wrapper: column → row */
html.desktop .phone > div:first-child {
  flex-direction: row !important;
  height: 100dvh !important;
  overflow: hidden;
}

/* ── Left sidebar nav ── */
html.desktop .topnav {
  width: 220px; min-width: 220px; flex-direction: column;
  height: 100dvh; position: sticky; top: 0;
  border-bottom: none; border-right: 1px solid var(--line);
  padding: 28px 14px 24px; gap: 14px; align-items: stretch;
  overflow-y: auto;
}
html.desktop .tn-seg {
  flex-direction: column; border-radius: 16px; padding: 5px; gap: 3px;
}
html.desktop .tn-item {
  height: 44px; border-radius: 13px; font-size: 14px;
  justify-content: flex-start; padding: 0 16px; flex: 0 0 auto;
}
html.desktop .tn-icon { margin-top: auto; }

/* ── Scrollable content area ── */
html.desktop .screen {
  flex: 1; height: 100dvh; overflow-y: auto;
  max-width: 760px; padding: 0 40px 48px;
}

/* ── Chat overlay: shift right of sidebar ── */
html.desktop .chat-wrap {
  left: 220px; width: calc(100vw - 220px);
  max-width: none; transform: none;
}

/* ── Bottom sheet: centered ── */
html.desktop .sheet { max-width: 480px; margin: 0 auto; }

/* ── Wider content ── */
html.desktop .act-grid { grid-template-columns: repeat(4, 1fr); }
html.desktop .idea-grid { grid-template-columns: repeat(4, 1fr); }
html.desktop .greeting { font-size: 34px; margin-top: 32px; }
html.desktop .askbar { height: 62px; border-radius: 22px; }

/* ============================================================
   Hubicx — staged-canvas "момент генерации" (H1 «Холст»)
   ============================================================ */
.gen-canvas, .dk-stage{
  position:relative; width:100%; border-radius:18px; overflow:hidden; margin-top:8px;
  background:rgba(10,16,26,.5); border:1px solid var(--line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.gen-canvas{min-height:220px;}
.gen-result-canvas{aspect-ratio:1/1; min-height:0; max-height:420px;}
.gen-skel{position:absolute; inset:0; overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));}
.gen-skel::after{content:""; position:absolute; top:0; bottom:0; width:55%;
  background:linear-gradient(100deg, transparent, rgba(127,184,255,.22) 45%, rgba(92,200,255,.32) 50%, transparent);
  transform:translateX(-120%); animation:genSweep 1.5s ease-in-out infinite;}
@keyframes genSweep{0%{transform:translateX(-120%)}100%{transform:translateX(220%)}}
.gen-media{position:absolute; inset:0; width:100%; height:100%; object-fit:contain;
  opacity:0; filter:blur(16px) saturate(.6); transform:scale(1.06);
  transition:opacity .9s ease, filter 1.1s ease, transform 1.1s ease; background:rgba(0,0,0,.04);}
.gen-media.in{opacity:1; filter:blur(0) saturate(1); transform:scale(1);}
.gen-grain{position:absolute; inset:0; opacity:.5; mix-blend-mode:overlay; pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size:3px 3px;}
.gen-stages{display:flex; gap:5px; margin-top:12px;}
.gen-chip{flex:1; height:5px; border-radius:3px; background:rgba(255,255,255,.18); overflow:hidden;}
.gen-chip i{display:block; height:100%; width:0; border-radius:3px;
  background:linear-gradient(90deg,#5cc8ff,#2f80ed); transition:width .4s ease;}
.gen-chip.done i{width:100%;}
.gen-chip.act i{width:60%; animation:genChipPulse 1.1s ease-in-out infinite;}
@keyframes genChipPulse{0%,100%{opacity:.7}50%{opacity:1}}
.gen-stagerow{display:flex; align-items:center; justify-content:space-between; margin-top:10px; gap:12px;}
.gen-stage-l{display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700;}
.gen-dot{width:7px; height:7px; border-radius:50%; background:#5cc8ff;
  box-shadow:0 0 0 0 rgba(92,200,255,.5); animation:genPing 1.4s ease-out infinite;}
@keyframes genPing{0%{box-shadow:0 0 0 0 rgba(92,200,255,.5)}100%{box-shadow:0 0 0 9px rgba(92,200,255,0)}}
.gen-eta{font-size:13px; color:var(--muted,#90A0B6); font-variant-numeric:tabular-nums; white-space:nowrap;}
@media (prefers-reduced-motion:reduce){
  .gen-skel::after, .gen-chip.act i, .gen-dot{animation:none}
  .gen-media{transition:none; opacity:1; filter:none; transform:none}
}
