/* Foxli – design systém (samec-35). Výchozí je TMAVÝ motiv (i když má systém světlý); světlý jen přepínačem → [data-theme="light"]. */
/* písma se načítají <link>em v partials/head.ejs */

:root {
  --fx-orange: #FF6A2B; --fx-orange-2: #FF8A3D; --fx-ember: #F0531C; --fx-cream: #FFF4EC;
  --bg: #0C0A09; --bg-2: #13100E; --surface: #1A1613; --surface-2: #231E1A; --line: #2B2520; --line-2: #3A332C;
  --glass: rgba(28,24,20,.55); --glass-line: rgba(255,255,255,.07);
  --ink: #F6EFE8; --ink-2: #CFC5BA; --muted: #958A7E; --accent: var(--fx-orange); --accent-ink: #1A0F08;
  --ok: #3DD68C; --ok-ink: #3DD68C; --warn: #FFC34D; --warn-ink: #FFC34D; --err: #FF5D5D;
  --radius: 14px; --radius-lg: 22px; --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 30px 80px -30px rgba(0,0,0,.75);
  --head: 'Sora', system-ui, sans-serif; --body: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22,1,.36,1); --ease-io: cubic-bezier(.65,0,.35,1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FBF7F3; --bg-2: #F4EEE7; --surface: #FFFFFF; --surface-2: #F7F1EA; --line: #E8DFD5; --line-2: #D9CDBF;
  --glass: rgba(255,255,255,.65); --glass-line: rgba(60,35,15,.08);
  --ink: #1B1612; --ink-2: #4A4038; --muted: #8A7C70; --accent-ink: #FFFFFF; --ok-ink: #1B8A55; --warn-ink: #A86206; --shadow: 0 10px 30px -14px rgba(60,35,15,.25); --shadow-lg: 0 30px 80px -30px rgba(60,35,15,.3);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-2); }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.grad { background: linear-gradient(100deg, var(--fx-orange-2), var(--fx-ember)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* tlačítka */
.btn { --b: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--b); color: var(--ink); font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn:active { transform: translateY(0); }
.btn-accent { background: linear-gradient(180deg, var(--fx-orange-2), var(--fx-orange)); border-color: transparent; color: #1A0F08; box-shadow: 0 8px 24px -10px rgba(255,106,43,.7); }
.btn-accent:hover { box-shadow: 0 12px 30px -10px rgba(255,106,43,.85); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* formuláře */
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 15px/1.4 var(--body); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,106,43,.18); }
.form-err { background: rgba(255,93,93,.12); color: var(--err); border: 1px solid rgba(255,93,93,.3); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.form-ok { background: rgba(61,214,140,.12); color: var(--ok); border: 1px solid rgba(61,214,140,.3); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

/* hlavička */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-bar { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--head); letter-spacing: -.03em; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.nav-drop { display: none; }
@media (max-width: 860px) {
  .nav-links, .nav-actions .hide-m { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav-drop.open { display: grid; gap: 2px; position: absolute; top: 68px; right: 16px; left: 16px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); animation: drop .25s var(--ease); }
  .nav-drop a { padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
  .nav-drop a:hover { background: var(--surface-2); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* sekce */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 64px 0; } }

/* hero */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; text-align: center; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 680px; background: radial-gradient(50% 50% at 50% 50%, rgba(255,106,43,.22), transparent 70%); pointer-events: none; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); max-width: 640px; margin: 0 auto 34px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 24px; }
.badge b { background: var(--accent); color: #1A0F08; padding: 3px 8px; border-radius: 999px; font-size: 12px; }
.prompt-box { position: relative; max-width: 760px; margin: 0 auto; text-align: left; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-lg); transition: border-color .25s, box-shadow .25s; }
.prompt-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255,106,43,.14), var(--shadow-lg); }
.prompt-box textarea { width: 100%; min-height: 96px; resize: none; border: 0; background: transparent; color: var(--ink); font: 17px/1.5 var(--body); padding: 6px 8px; }
.prompt-box textarea:focus { outline: none; }
.prompt-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0; flex-wrap: wrap; }
@media (max-width: 560px) { .new-project .prompt-row .btn { width: 100%; margin-left: 0 !important; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 14px var(--body); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { border-color: var(--accent); color: var(--ink); background: var(--surface); }

/* ===== domovská stránka ===== */
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.hero-main { padding-top: 104px; }
.hero-main::before { display: none; }
.hero-glow { position: absolute; inset: -120px 0 auto; height: 760px; pointer-events: none; overflow: hidden; }
.hero-glow::before, .hero-glow::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.hero-glow::before { width: 620px; height: 620px; left: 50%; top: 40px; margin-left: -460px; background: radial-gradient(circle, rgba(255,106,43,.55), transparent 65%); animation: drift 18s var(--ease-io) infinite alternate; }
.hero-glow::after { width: 520px; height: 520px; left: 50%; top: 120px; margin-left: -40px; background: radial-gradient(circle, rgba(240,83,28,.35), transparent 65%); animation: drift 22s var(--ease-io) infinite alternate-reverse; }
:root[data-theme="light"] .hero-glow::before, :root[data-theme="light"] .hero-glow::after { opacity: .28; }
@keyframes drift { from { transform: translate3d(-40px, 0, 0) scale(1); } to { transform: translate3d(60px, 40px, 0) scale(1.12); } }

/* ===== prémiová ukázka builderu (jen transform/opacity/filter, smyčka bez skoků) ===== */
.demo { position: relative; max-width: 1140px; margin: 0 auto; text-align: left; --dur: .9s; }
.demo-aura { position: absolute; inset: -60px -40px -80px; pointer-events: none; z-index: 0; }
.demo-aura::before { content: ''; position: absolute; inset: 10% 15%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,106,43,.32), transparent 70%); filter: blur(40px); animation: auraPulse 7s var(--ease-io) infinite alternate; }
@keyframes auraPulse { from { transform: scale(.92); opacity: .7; } to { transform: scale(1.06); opacity: 1; } }
.demo-win { position: relative; z-index: 1; border-radius: 20px; padding: 1px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 40%, rgba(255,106,43,.25)); box-shadow: 0 60px 140px -50px rgba(0,0,0,.9), 0 20px 50px -30px rgba(255,106,43,.25); }
:root[data-theme="light"] .demo-win { background: linear-gradient(160deg, rgba(60,35,15,.16), rgba(60,35,15,.04) 40%, rgba(255,106,43,.35)); box-shadow: 0 50px 120px -50px rgba(60,35,15,.45); }
.demo-in { border-radius: 19px; overflow: hidden; background: var(--surface); }
.demo-bar { display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); font-size: 12.5px; color: var(--muted); }
.demo-bar > i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; } .demo-bar > i:nth-child(2) { background: #FEBC2E; } .demo-bar > i:nth-child(3) { background: #28C840; }
.demo-url { margin: 0 auto; display: flex; align-items: center; gap: 7px; padding: 5px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font: 12px var(--mono); color: var(--ink-2); }
.demo-url img { width: 14px; height: 14px; }
.demo-status { font: 600 12px var(--body); font-style: normal; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; min-width: 110px; justify-content: flex-end; }
.demo-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.demo-status.busy { color: var(--accent); } .demo-status.busy::before { animation: pulse 1s ease-in-out infinite; }
.demo-status.done { color: var(--ok-ink); }
.demo-body { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: minmax(0, 1fr); height: 480px; transition: opacity .7s var(--ease); }
.demo-body > * { min-height: 0; }
.demo.curtain .demo-body { opacity: 0; }
.demo.noanim *, .demo.noanim *::before, .demo.noanim *::after { transition: none !important; animation: none !important; }

/* chat */
.dm-chat { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); min-width: 0; }
.dm-msgs { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.dm-msg:not(.vis) { display: none; }
.dm-msg { opacity: 0; transform: translate3d(0, 14px, 0) scale(.97); transform-origin: 100% 100%; transition: opacity .55s var(--ease), transform .7s var(--ease); font-size: 13px; line-height: 1.5; }
.dm-msg.on { opacity: 1; transform: none; }
.dm-msg.gone { display: none; }
.dm-msg.u { align-self: flex-end; max-width: 92%; padding: 9px 12px; border-radius: 14px 14px 4px 14px; color: #1A0F08; background: linear-gradient(135deg, var(--fx-orange-2), var(--fx-orange)); box-shadow: 0 8px 24px -12px rgba(255,106,43,.7); }
.dm-msg.b { transform-origin: 0 100%; display: grid; gap: 8px; padding: 11px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.dm-who { display: flex; align-items: center; gap: 7px; font: 600 12px var(--body); color: var(--ink); }
.dm-who img { width: 18px; height: 18px; }
.dm-who em { font-style: normal; font-weight: 600; font-size: 11px; padding: 2px 7px; border-radius: 99px; background: rgba(255,106,43,.14); color: var(--accent); }
.dm-dots { display: inline-flex; gap: 4px; } .dm-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; } .dm-dots i:nth-child(2) { animation-delay: .15s; } .dm-dots i:nth-child(3) { animation-delay: .3s; }
.dm-files { display: flex; flex-wrap: wrap; gap: 5px; }
.dm-files span { font: 11px var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); opacity: 0; transform: scale(.9); transition: opacity .4s var(--ease), transform .5s var(--ease), color .3s, border-color .3s; }
.dm-files span.on { opacity: 1; transform: none; }
.dm-files span.w { color: var(--accent); border-color: rgba(255,106,43,.4); }
.dm-files span.ok { color: var(--ok-ink); }
.dm-sum { display: grid; }
.dm-sum > * { grid-area: 1 / 1; transition: opacity .4s var(--ease); }
.dm-sum .done { opacity: 0; }
.dm-msg.fin .dm-sum .wait { opacity: 0; } .dm-msg.fin .dm-sum .done { opacity: 1; }
.dm-input { position: relative; margin: 0 12px 12px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .35s var(--ease), box-shadow .35s var(--ease); }
.dm-input.focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,106,43,.14); }
.dm-text { min-height: 40px; font-size: 13px; line-height: 1.5; color: var(--ink); word-break: break-word; }
.dm-text .ph { color: var(--muted); }
.dm-text .caret { display: inline-block; width: 2px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--accent); opacity: 0; }
.dm-input.focus .caret { opacity: 1; animation: blinkc 1s steps(1) infinite; }
.dm-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.dm-chip { font: 600 11px var(--body); padding: 4px 9px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
.dm-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #B48CFF, #FF6A2B); }
.dm-send { margin-left: auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #1A0F08; transition: transform .25s var(--ease), box-shadow .3s; }
.dm-send svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dm-send.press { transform: scale(.86); box-shadow: 0 0 0 6px rgba(255,106,43,.2); }
@keyframes blinkc { 50% { opacity: 0; } }

/* pravá část: záložky + scéna */
.dm-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); }
.dm-tabs { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.dm-seg { position: relative; display: flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.dm-seg span { position: relative; z-index: 1; width: 70px; text-align: center; font: 600 12px/26px var(--body); color: var(--muted); transition: color .4s var(--ease); }
.dm-seg span.on { color: var(--ink); }
.dm-seg i { position: absolute; z-index: 0; top: 3px; left: 3px; width: 70px; height: 26px; border-radius: 7px; background: var(--surface-2); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .5s var(--ease); }
.dm-seg.code i { transform: translateX(70px); }
.dm-pub { margin-left: auto; font: 600 12px var(--body); padding: 6px 12px; border-radius: 8px; background: var(--accent); color: #1A0F08; opacity: .55; transition: opacity .5s; }
.demo.v1 .dm-pub, .demo.v2 .dm-pub { opacity: 1; }
.dm-stage { position: relative; flex: 1; overflow: hidden; }
.dm-view { position: absolute; inset: 0; transition: opacity .6s var(--ease), transform .7s var(--ease); }
.dm-code { display: grid; grid-template-columns: 150px 1fr; background: var(--bg-2); opacity: 0; transform: scale(.985); pointer-events: none; }
.dm-stage.code .dm-code { opacity: 1; transform: none; }
.dm-stage.code .dm-preview { opacity: 0; transform: scale(1.015); }
.dm-tree { padding: 12px 8px; border-right: 1px solid var(--line); font: 11.5px var(--mono); color: var(--muted); display: grid; gap: 3px; align-content: start; }
.dm-tree span { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border-radius: 6px; transition: background .3s, color .3s; }
.dm-tree span::after { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.dm-tree span.w { color: var(--ink); background: rgba(255,106,43,.1); } .dm-tree span.w::after { background: var(--accent); animation: pulse .9s infinite; }
.dm-tree span.ok { color: var(--ink-2); } .dm-tree span.ok::after { background: var(--ok); }
.dm-editor { position: relative; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 6%, #000 88%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 6%, #000 88%, transparent); }
.dm-lines, .dm-toast .l { font-variant-ligatures: none; }
.dm-lines { padding: 14px 16px; font: 12px/20px var(--mono); color: var(--ink-2); white-space: pre; transition: transform .45s var(--ease); counter-reset: ln; will-change: transform; }
.dm-lines div { opacity: 0; transform: translate3d(-6px, 0, 0); animation: lineIn .4s var(--ease) forwards; }
.dm-lines div::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 22px; margin-right: 12px; text-align: right; color: var(--line-2); }
@keyframes lineIn { to { opacity: 1; transform: none; } }
.tk-t { color: #FF8A3D; } .tk-a { color: #E6B673; } .tk-s { color: #7EE2A8; } .tk-c { color: var(--muted); font-style: italic; } .tk-p { color: #B48CFF; } .tk-n { color: #6CC4FF; }
:root[data-theme="light"] .tk-s { color: #1B8A55; } :root[data-theme="light"] .tk-a { color: #A86206; } :root[data-theme="light"] .tk-n { color: #1E6FB8; }

/* náhled – web zákazníka (vždy světlý) */
.dm-preview { padding: 14px; }
.site { position: relative; height: 100%; border-radius: 12px; overflow: hidden; background: #FBF6F0; color: #2B1D14; box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.site .sec { opacity: 0; filter: blur(10px); transform: translate3d(0, 14px, 0) scale(.96); transition: opacity .8s var(--ease), filter .9s var(--ease), transform 1s var(--ease); will-change: transform, opacity, filter; }
.site .sec.on { opacity: 1; filter: blur(0); transform: none; }
.site-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; color: #A08A78; font: 13px var(--body); transition: opacity .5s var(--ease); }
.site-empty img { width: 48px; margin: 0 auto; opacity: .85; }
.demo.started .site-empty { opacity: 0; }
.s-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font: 700 14px Georgia, serif; }
.s-nav > span:last-child { display: flex; gap: 14px; align-items: center; font: 500 11px var(--body); color: #7A6152; }
.s-nav em { font-style: normal; }
.s-nav b.mini-btn { font: 600 10.5px var(--body); padding: 5px 10px; border-radius: 99px; color: #fff; position: relative; overflow: hidden; background: #2B1D14; }
.s-hero { position: relative; margin: 0 14px; height: 168px; border-radius: 14px; overflow: hidden; padding: 20px 22px; display: grid; align-content: end; gap: 6px; color: #fff; isolation: isolate; }
.s-hero .bg { position: absolute; inset: 0; z-index: -1; transition: opacity 1.3s var(--ease-io); }
.s-hero .bg.warm { background: linear-gradient(0deg, rgba(43,29,20,.78), rgba(43,29,20,.05)), linear-gradient(135deg, #C9824C, #6B3B22 60%, #2B1D14); }
.s-hero .bg.green { opacity: 0; background: linear-gradient(0deg, rgba(14,40,28,.78), rgba(14,40,28,.05)), linear-gradient(135deg, #8BC48A, #2F6B4A 60%, #12301F); }
.s-hero .bg.green::after { content: ''; position: absolute; right: -30px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(220,255,200,.45), transparent 70%); }
.swap { position: relative; display: grid; }
.swap > * { grid-area: 1 / 1; transition: opacity .8s var(--ease), transform .9s var(--ease); }
.swap > .b { opacity: 0; transform: translate3d(0, 8px, 0); }
.demo.v2 .swap > .a { opacity: 0; transform: translate3d(0, -8px, 0); }
.demo.v2 .swap > .b { opacity: 1; transform: none; }
.s-hero h4 { margin: 0; font: 700 25px/1.1 Georgia, serif; }
.s-hero p { margin: 0; color: rgba(255,255,255,.82); font: 12px var(--body); }
.s-btn { justify-self: start; margin-top: 6px; position: relative; padding: 7px 14px; border-radius: 999px; font: 600 11px var(--body); overflow: hidden; isolation: isolate; color: #2B1D14; }
.s-btn::before, .s-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; transition: opacity 1s var(--ease-io); }
.s-btn::before { background: #F7E7D6; } .s-btn::after { opacity: 0; background: linear-gradient(135deg, #D7FF7A, #7BD88F); }
.demo.v2 .s-hero .bg.green { opacity: 1; }
.demo.v2 .s-btn::after { opacity: 1; }
.demo.v2 .s-btn { transform: scale(1.06); transition: transform .9s var(--ease); }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 14px; }
.s-card { border-radius: 10px; background: #fff; border: 1px solid #EFE3D6; padding: 9px; font: 11px var(--body); color: #7A6152; position: relative; }
.s-card b { display: block; font: 700 13px Georgia, serif; color: #2B1D14; margin: 0 0 1px; }
.s-card .img { position: relative; height: 44px; border-radius: 7px; margin-bottom: 7px; overflow: hidden; }
.s-card .img i { position: absolute; inset: 0; transition: opacity 1.2s var(--ease-io); }
.s-card .img i:first-child { background: linear-gradient(135deg, #E9C9A8, #B9774A); }
.s-card:nth-child(2) .img i:first-child { background: linear-gradient(135deg, #F1D9C2, #D49A6A); }
.s-card:nth-child(3) .img i:first-child { background: linear-gradient(135deg, #DDB896, #8C5434); }
.s-card .img i:last-child { opacity: 0; background: linear-gradient(135deg, #CDEBC0, #5FA36E); }
.s-card:nth-child(2) .img i:last-child { background: linear-gradient(135deg, #E3F4D6, #8CC79A); }
.s-card:nth-child(3) .img i:last-child { background: linear-gradient(135deg, #B9E6A6, #3F8F5A); }
.demo.v2 .s-card .img i:last-child { opacity: 1; }
.s-card .new { position: absolute; top: 6px; right: 6px; font: 700 9px var(--body); padding: 2px 6px; border-radius: 99px; background: #2F6B4A; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .5s var(--ease) .5s, transform .6s var(--ease) .5s; }
.demo.v2 .s-card .new { opacity: 1; transform: none; }
.s-foot { margin: 0 14px; border-radius: 12px; padding: 11px 14px; position: relative; overflow: hidden; isolation: isolate; font: 12px var(--body); color: #7A6152; }
.s-foot::before, .s-foot::after { content: ''; position: absolute; inset: 0; z-index: -1; transition: opacity 1.1s var(--ease-io); }
.s-foot::before { background: #F3E6D8; } .s-foot::after { opacity: 0; background: linear-gradient(90deg, #E3F2DA, #F3F9EC); }
.demo.v2 .s-foot::after { opacity: 1; }
.s-foot b { font: 700 13px Georgia, serif; color: #2B1D14; }
.s-foot .swap { align-items: center; }
.s-foot .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.s-foot .row span { font: 600 10.5px var(--body); padding: 5px 10px; border-radius: 99px; background: #2F6B4A; color: #fff; }
/* světelný přejezd po složení / úpravě */
.dm-shine { position: absolute; inset: 14px; border-radius: 12px; overflow: hidden; pointer-events: none; }
.dm-shine::before { content: ''; position: absolute; top: -20%; bottom: -20%; width: 40%; left: 0; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: translate3d(-120%, 0, 0) skewX(-12deg); opacity: 0; }
.dm-shine.go::before { animation: shine 1.4s var(--ease-io); }
@keyframes shine { 0% { transform: translate3d(-120%, 0, 0) skewX(-12deg); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate3d(320%, 0, 0) skewX(-12deg); opacity: 0; } }
/* plovoucí karta s kódem při úpravě */
.dm-toast { position: absolute; left: 26px; bottom: 26px; width: 300px; max-width: calc(100% - 52px); padding: 10px 12px; border-radius: 12px; background: rgba(20,17,15,.82); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.7); color: #CFC5BA;
  opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.dm-toast.on { opacity: 1; transform: none; }
.dm-toast .h { display: flex; align-items: center; gap: 7px; font: 600 11px var(--body); color: #F6EFE8; margin-bottom: 6px; }
.dm-toast .h i { width: 6px; height: 6px; border-radius: 50%; background: #FF6A2B; animation: pulse .9s infinite; }
.dm-toast .l { font: 11px/18px var(--mono); white-space: pre; overflow: hidden; }
.dm-toast .l div { opacity: 0; transform: translate3d(-6px, 0, 0); animation: lineIn .4s var(--ease) forwards; }
.dm-toast .add { color: #7EE2A8; } .dm-toast .del { color: #FF8F8F; text-decoration: line-through; opacity: .7; }
/* kurzor */
.dm-cursor { position: absolute; z-index: 5; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate3d(900px, 520px, 0); transition: transform var(--dur) cubic-bezier(.65,0,.25,1), opacity .4s; will-change: transform; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.dm-cursor.on { opacity: 1; }
.dm-cursor svg { width: 22px; height: 22px; transition: transform .15s var(--ease); transform-origin: 3px 3px; }
.dm-cursor.click svg { transform: scale(.82); }
.dm-cursor::after { content: ''; position: absolute; left: -9px; top: -9px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,106,43,.8); opacity: 0; transform: scale(.4); }
.dm-cursor.click::after { animation: ripple .5s var(--ease); }
@keyframes ripple { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 900px) { .demo-body { grid-template-columns: 250px 1fr; } .dm-code { grid-template-columns: 1fr; } .dm-tree { display: none; } }
@media (max-width: 680px) {
  .demo-body { grid-template-columns: 1fr; grid-template-rows: 250px 400px; height: auto; }
  .dm-chat { border-right: 0; border-bottom: 1px solid var(--line); }
  .dm-msgs { padding: 10px; justify-content: flex-end; }
  .dm-msg.b .dm-files { display: none; } .demo-url { display: none; } .s-grid { grid-template-columns: repeat(2, 1fr); } .s-card:nth-child(3) { display: none; } .dm-cursor { display: none; }
}
.prompt-box.flash { animation: flash .7s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 6px rgba(255,106,43,.22), var(--shadow-lg); } }
.theme-anim, .theme-anim * { transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease) !important; }
@media (prefers-reduced-motion: reduce) { .hero-glow::before, .hero-glow::after, .demo-aura::before { animation: none; } }

/* ukázky webů */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.show-card { text-decoration: none; color: inherit; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.show-card:hover { transform: translate3d(0, -6px, 0); border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.show-card:hover .mini { transform: scale(1.03); }
.show-card:hover .show-try { color: var(--accent); }
.show-meta { padding: 16px 18px 18px; display: grid; gap: 6px; }
.show-meta p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.show-try { font: 600 13px var(--body); color: var(--muted); transition: color .3s; }
.mini { --a: #C47A45; --b: #2B1D14; --bg: #FBF6F0; --t: #2B1D14; aspect-ratio: 16 / 10; background: var(--bg); padding: 12px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; transition: transform .7s var(--ease); transform-origin: 50% 100%; }
.mini-nav { display: flex; justify-content: space-between; align-items: center; font: 700 11px Georgia, serif; color: var(--t); }
.mini-nav span { display: flex; gap: 5px; } .mini-nav span i { width: 16px; height: 4px; border-radius: 2px; background: var(--t); opacity: .3; }
.mini-hero { border-radius: 9px; padding: 12px; display: grid; align-content: end; gap: 5px; background: linear-gradient(135deg, var(--a), var(--b)); }
.mini-hero i { display: block; border-radius: 3px; background: rgba(255,255,255,.9); }
.mini-hero .t1 { height: 9px; width: 62%; } .mini-hero .t2 { height: 5px; width: 40%; opacity: .7; } .mini-hero .mb { height: 12px; width: 52px; border-radius: 99px; margin-top: 4px; background: var(--btn, #fff); }
.mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; } .mini-row i { height: 26px; border-radius: 6px; background: var(--t); opacity: .08; }
.mini-photo { --a: #2A2A2E; --b: #0D0D10; --bg: #121214; --t: #EDEDED; --btn: #E8C07D; }
.mini-garage { --a: #1E4FD8; --b: #0B1F5C; --bg: #F3F6FB; --t: #0B1F3A; --btn: #FFC83D; }
.mini-salon { --a: #D9A7B5; --b: #6E3A4C; --bg: #FFF7F8; --t: #3B1F2B; }
.mini-wedding { --a: #A8B89A; --b: #4E5C44; --bg: #FAF8F2; --t: #33392E; }
.mini-app { --a: #7C5CFF; --b: #22105F; --bg: #0F0B1E; --t: #EDEAFF; --btn: #3DE0B0; }
@media (max-width: 980px) { .showcase { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .showcase { grid-template-columns: 1fr; } }

/* kroky, modely, poznámka u ceníku */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; position: relative; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step p { margin: 0; }
.steps::before { content: ''; position: absolute; top: 48px; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); z-index: 0; }
.step { z-index: 1; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps::before { display: none; } }
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 980px; margin: 0 auto; }
.model-card { position: relative; border-radius: var(--radius-lg); padding: 30px; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.model-card:hover { transform: translate3d(0, -4px, 0); box-shadow: var(--shadow-lg); }
.model-card.pro { border-color: rgba(255,106,43,.45); background: radial-gradient(120% 90% at 100% 0%, rgba(255,106,43,.16), transparent 60%), var(--glass); }
.model-card h3 { font-size: 24px; margin: 18px 0 8px; }
.model-top { display: flex; justify-content: space-between; align-items: center; }
.model-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,106,43,.12); }
.model-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.model-tag { font: 600 12px var(--body); padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); }
.model-card.pro .model-tag { border-color: rgba(255,106,43,.5); color: var(--accent); }
.model-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 18px; }
.model-meter .meter { margin: 0; }
@media (max-width: 760px) { .models { grid-template-columns: 1fr; } }
.free-note { max-width: 760px; margin: 28px auto 0; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center; font-size: 14.5px; color: var(--ink-2); }
.free-note a { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.topup-row { margin-top: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.topup-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .topup-row { grid-template-columns: 1fr; } }
.faq-group { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 44px 0 4px; }
.faq-group:first-child { margin-top: 0; }
.plan-tok { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.feats .feat { transition: transform .5s var(--ease), border-color .3s; }
.feats .feat:hover { transform: translate3d(0, -4px, 0); border-color: var(--line-2); }
.cta { text-align: center; padding: 56px 24px; border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(80% 120% at 50% 0%, rgba(255,106,43,.18), transparent 70%), var(--surface); }
.cta img { margin: 0 auto 18px; }
.cta p { max-width: 520px; margin: 0 auto 24px; }

.feat .ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,106,43,.12); margin-bottom: 14px; }
.feat .ico svg { width: 21px; height: 21px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* kroky, ceník, faq */
.step-n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,106,43,.14); color: var(--accent); font: 700 17px var(--head); margin-bottom: 16px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.plans.plans-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .plans.plans-3 { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.plan .price { font: 800 38px/1 var(--head); letter-spacing: -.03em; }
.plan .price small { font: 500 15px var(--body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.plan li::before { content: '✓'; color: var(--accent); font-weight: 700; margin-right: 8px; }
.plan .btn { margin-top: auto; }
.save { display: inline-block; padding: 1px 7px; border-radius: 99px; background: rgba(61,214,140,.15); color: var(--ok-ink); font: 700 12px var(--body); }
.tok-big { font: 800 24px var(--head); color: var(--ink); letter-spacing: -.02em; }
.tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #1A0F08; font: 700 12px/1 var(--body); padding: 6px 10px; border-radius: 999px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; font: 600 17px var(--head); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; }

.how { max-width: 820px; }
.how-row { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.how-row .step-n { margin: 0; }

/* auth */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(90% 70% at 20% 10%, rgba(255,106,43,.28), transparent 60%), var(--bg-2); border-right: 1px solid var(--line); }
.auth-side .big-fox { position: absolute; right: -80px; bottom: -60px; width: 420px; opacity: .14; transform: rotate(-8deg); }
.auth-side blockquote { margin: 0; font: 600 26px/1.3 var(--head); letter-spacing: -.02em; max-width: 440px; position: relative; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; position: relative; }
.auth-main .theme-corner { position: absolute; top: 16px; right: 16px; }
.auth-card .brand { display: none; margin-bottom: 28px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 18px; }
.auth-links a, .auth-card a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-card .brand { display: flex; } }
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 30px; }
.auth-card form { display: grid; gap: 16px; margin-top: 22px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }

/* aplikace – horní lišta */
.appbar { position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.appbar .brand { font-size: 19px; }
.crumb-sep { color: var(--line-2); font-size: 20px; }
.crumb { font: 600 15px var(--body); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appnav { display: flex; gap: 2px; margin-left: 12px; }
.appnav a { padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.appnav a:hover, .appnav a.active { background: var(--surface-2); color: var(--ink); }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.credits-pill { text-decoration: none; color: var(--ink); transition: border-color .2s; }
.credits-pill:hover { border-color: var(--accent); }
.tok-pill { gap: 8px; }
.tok-bar { width: 44px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: inline-block; }
.tok-bar b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--fx-orange-2), var(--fx-ember)); transition: width .6s var(--ease); }
.tok-pill.low .tok-bar b { background: var(--warn); }
.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 8px; }
.meter b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--fx-orange-2), var(--fx-ember)); transition: width .8s var(--ease); }
.meter.low b { background: var(--warn); }
.meter.sm { height: 6px; margin: 8px 0 6px; }
.quota { display: grid; gap: 16px; }
.quota-main { display: grid; grid-template-columns: 1fr; gap: 24px; }
.quota-main:has(.quota-day) { grid-template-columns: 2fr 1fr; }
.quota-num { font: 500 16px var(--body); margin-top: 6px; }
.quota-num b { font: 800 30px/1 var(--head); letter-spacing: -.02em; }
.quota-num.sm b { font-size: 22px; }
.quota-day { border-left: 1px solid var(--line); padding-left: 24px; }
.quota-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.quota-acts span { margin-right: auto; }
@media (max-width: 700px) { .quota-main:has(.quota-day) { grid-template-columns: 1fr; } .quota-day { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; } }
.low-bar {display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: rgba(255,195,77,.12); border: 1px solid rgba(255,195,77,.3); }
.low-bar span { flex: 1; min-width: 160px; }
.credits-pill.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); border-color: var(--accent); } }
.menu { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--fx-orange-2), var(--fx-ember)); color: #1A0F08; font: 700 15px var(--head); }
.menu-pop { display: none; position: absolute; right: 0; top: 46px; width: 240px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 60; }
.menu-pop.open { display: grid; animation: drop .2s var(--ease); }
.menu-who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow: hidden; }
.menu-who span { overflow: hidden; text-overflow: ellipsis; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); text-decoration: none; font: 500 14px var(--body); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop form { margin: 0; }
@media (max-width: 760px) { .appnav, .hide-s { display: none; } .crumb { max-width: 42vw; } }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(420px, calc(100% - 32px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 14px; animation: drop .25s var(--ease); }
.toast.err { border-color: rgba(255,93,93,.5); }
.toast.ok { border-color: rgba(61,214,140,.5); }

/* aplikace (dashboard) */
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 24px; }
.stat { display: grid; gap: 4px; }
.stat b { font: 700 28px/1 var(--head); }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project { text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .25s; display: grid; gap: 10px; }
.project:hover { transform: translateY(-3px); border-color: var(--line-2); }
.project .thumb { aspect-ratio: 16/10; border-radius: 12px; background: linear-gradient(135deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line); overflow: hidden; }
.project .thumb iframe { width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; }
.thumb-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.pub-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.pub-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(61,214,140,.2); }
.refill { margin: 10px 0 0; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.refill .ri { color: var(--accent); }
.verify-bar {display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding: 8px 8px 8px 16px; border-radius: 12px; background: rgba(255,195,77,.12); border: 1px solid rgba(255,195,77,.3); font-size: 14px; }
.verify-bar form { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); font: 600 13px var(--body); padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.seg button[disabled] { opacity: .5; cursor: not-allowed; }
.empty {text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.credits-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font: 600 14px var(--body); }
.credits-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.topup.featured { border-color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl td { padding: 12px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.tbl .plus { color: var(--ok); }

/* ===== builder ===== */
.builder-body { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.builder { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 400px) 1fr; }
.b-chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.b-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.b-hello { text-align: center; margin: auto 0; padding: 20px; }
.b-hello img { margin: 0 auto 12px; }
.msg { max-width: 100%; animation: drop .3s var(--ease); font-size: 14.5px; line-height: 1.55; }
.msg.user { align-self: flex-end; max-width: 88%; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 13px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; word-break: break-word; }
.msg.bot { display: grid; gap: 8px; }
.msg.bot .who { display: flex; align-items: center; gap: 8px; font: 600 13px var(--body); color: var(--muted); }
.msg.bot .who img { width: 20px; height: 20px; }
.msg.bot .txt { white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.msg.bot .files { display: flex; flex-wrap: wrap; gap: 6px; }
.msg.bot .files span { font: 12px var(--mono); padding: 4px 8px; border-radius: 8px; background: rgba(255,106,43,.1); color: var(--accent); }
.msg.bot .files span.w { animation: pulse 1.4s ease-in-out infinite; }
.msg.bot .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.msg.bot .meta b { color: var(--ink-2); font-weight: 600; }
.msg.err .txt { color: var(--err); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.b-input { margin: 0 12px 12px; padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.b-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,106,43,.14); }
.b-input textarea { width: 100%; resize: none; border: 0; background: transparent; color: var(--ink); font: 15px/1.5 var(--body); padding: 4px 6px; max-height: 200px; }
.b-input textarea:focus { outline: none; }
.b-input-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.b-input-row [data-send], .b-input-row [data-stop] { margin-left: auto; }
.b-est { white-space: nowrap; }
.model-note { margin: 8px 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); min-height: 18px; }
.model-note b { color: var(--ink-2); font-weight: 600; }
.model-note a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.seg button[data-locked] { opacity: .55; }
.b-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-2); }
.b-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.b-toolbar .seg button { display: inline-flex; align-items: center; }
.b-view { flex: 1; min-height: 0; position: relative; }
.b-view[hidden] { display: none; }
.b-frame-wrap { position: absolute; inset: 0; display: flex; justify-content: center; padding: 0; transition: padding .35s var(--ease); }
.b-frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .35s var(--ease), border-radius .35s, box-shadow .35s; }
.b-frame-wrap.mobile { padding: 18px 0; }
.b-frame-wrap.mobile iframe { width: 390px; max-width: 100%; border-radius: 22px; box-shadow: 0 0 0 8px var(--surface-2), var(--shadow-lg); }
.b-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: var(--bg-2); color: var(--muted); }
.b-empty[hidden] { display: none; }
.b-fox { margin: 0 auto 12px; }
.b-fox.busy img { animation: hop 1.2s var(--ease) infinite; }
@keyframes hop { 30% { transform: translateY(-10px) rotate(-4deg); } 60% { transform: translateY(0) rotate(0); } }
.b-code { position: absolute; inset: 0; display: grid; grid-template-columns: 240px 1fr; }
.b-tree { overflow: auto; border-right: 1px solid var(--line); padding: 8px; background: var(--bg); font: 13px var(--mono); }
.b-tree button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink-2); font: inherit; padding: 6px 8px; border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-tree button:hover { background: var(--surface-2); }
.b-tree button.on { background: rgba(255,106,43,.12); color: var(--accent); }
.b-tree .dir { padding: 8px 8px 4px; color: var(--muted); font-size: 12px; }
.b-file { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.b-file-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.b-file pre { flex: 1; margin: 0; overflow: auto; padding: 14px 16px; font-size: 13px; line-height: 1.6; color: var(--ink-2); tab-size: 2; }
.b-versions { position: absolute; inset: 0; overflow: auto; padding: 16px; display: grid; gap: 10px; align-content: start; }
.ver { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.ver .n { font: 700 14px var(--mono); color: var(--accent); }
.ver .p { font-size: 14px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ver .d { font-size: 12px; color: var(--muted); }
.ver.cur { border-color: var(--accent); }
.ver .acts { display: flex; gap: 6px; }
.b-mobile-tabs { display: none; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10,8,6,.55); backdrop-filter: blur(4px); animation: fade .2s; }
.modal[hidden] { display: none; }
.modal-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); animation: drop .25s var(--ease); }
.slug-row { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.slug-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,106,43,.18); }
.slug-pre { display: flex; align-items: center; padding: 0 0 0 12px; font: 13px var(--mono); color: var(--muted); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.slug-row .input { border: 0; border-radius: 0; box-shadow: none !important; padding-left: 2px; font-family: var(--mono); font-size: 14px; min-width: 0; }
.copy-row {display: flex; gap: 8px; margin-top: 14px; }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 860px) {
  .builder { grid-template-columns: minmax(0, 1fr); padding-bottom: 56px; }
  .b-chat, .b-main { min-width: 0; }
  .builder [data-pane] { display: none; }
  .builder[data-m="chat"] [data-pane="chat"], .builder[data-m="preview"] [data-pane="preview"] { display: flex; }
  .b-chat { border-right: 0; }
  .b-mobile-tabs { display: flex; position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; box-shadow: var(--shadow-lg); background: var(--surface); }
  .b-mobile-tabs button { padding: 9px 22px; font-size: 14px; }
  .b-code { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .b-tree { max-height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
  .b-est { display: none; }
}

/* patička */
.foot { border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot h4 { font: 600 14px var(--body); color: var(--ink); margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* animace při scrollu */
/* scroll reveal přes samostatnou vlastnost `translate`, ať se nepere s hover efekty na `transform` */
.reveal { opacity: 0; translate: 0 20px; transition: opacity .8s var(--ease), translate .9s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; transition: none; } html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* právní */
.prose { max-width: 760px; margin: 0 auto; padding: 56px 20px; }
.prose h2 { font-size: 24px; margin-top: 32px; }
.todo { background: rgba(255,195,77,.18); color: var(--warn); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
