/* Wartosci projektu (kolory, zaokraglenia) dla calego Kinvid: stron publicznych i panelu. Serwer dokleja ten plik na poczatek /app.css. */
:root {
  --bg: #f6f6f3; --surface: #ffffff; --text: #1b1b1f; --muted: #62626b; --line: #dedbd3;
  --accent: #5b3df5; --accent-text: #ffffff; --accent-soft: #ece8ff;
  --ok: #167a45; --ok-soft: #dcf3e6; --warn: #8a5a00; --warn-soft: #fbefd2; --bad: #b3261e; --bad-soft: #fbe2df;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f13; --surface: #1a1a20; --text: #ececf1; --muted: #9a9aa6; --line: #2e2e38;
    --accent: #8b74ff; --accent-text: #0f0f13; --accent-soft: #272244;
    --ok: #55d08a; --ok-soft: #14301f; --warn: #f0c060; --warn-soft: #352a10; --bad: #ff8a80; --bad-soft: #3a1815;
  }
}
/* Podstawy wspolne dla stron publicznych i panelu: typografia, linki, przyciski, tabele. Serwer dokleja ten plik do /app.css zaraz po tokens.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
a { color: var(--accent); }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 10px 16px; min-height: 44px; }
a.btn { text-decoration: none; display: inline-block; text-align: center; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.link { background: none; border: 0; color: var(--accent); padding: 4px 8px; min-height: 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

/* Baner zgody na pliki cookie i pomiar (strony publiczne, site/src/landing/consent.ts). */
.ck { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; max-width: 560px; margin-inline: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 18px 50px -18px rgba(0,0,0,.45); font-size: .92rem; }
.ck h2 { font-size: 1rem; margin: 0 0 6px; }
.ck p { margin: 0 0 10px; color: var(--muted); }
.ck a { color: var(--accent); }
.ck label { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.ck label input { margin-top: 3px; }
.ck .ck-more { margin: 6px 0 10px; }
.ck .ck-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ck .ck-row .btn { flex: 1 1 auto; }

/* Kolorowy przycisk planow z rabatem: naglowek stron publicznych i panelu. */
a.btn.promo { background: linear-gradient(110deg, #5b3df5, #e255c5 55%, #ff7a45); border: 0; color: #fff; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 10px 24px -12px #e255c5; }
a.btn.promo b { background: #fff; color: #a21c86; border-radius: 999px; padding: 1px 8px; font-size: .82rem; }
a.btn.promo:hover { filter: brightness(1.08); }

/* znaczki rodzin modeli (components/ModelIcon.tsx): strony publiczne i panel */
.mi { --m: #6b7080; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--m); color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; font-style: normal; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.mi-seedance { --m: #0f7f8f; } .mi-seedream { --m: #1767c9; } .mi-banana { --m: #8a6a00; } .mi-veo { --m: #2c5fd0; } .mi-kling { --m: #6a3fd0; }
.mi-grok { --m: #26282e; } .mi-gpt { --m: #0b7a59; } .mi-flux { --m: #b3431d; } .mi-wan { --m: #a8246a; } .mi-minimax { --m: #b02a3c; } .mi-horse { --m: #6d5a2e; } .mi-eleven { --m: #3d3f47; }
.mi-gemini { --m: #3b5bdb; } .mi-ideogram { --m: #8b2fa0; } .mi-recraft { --m: #1f6f50; } .mi-krea { --m: #44506b; } .mi-runway { --m: #16181d; } .mi-ltx { --m: #7a3b12; }

/* Filtr listy modeli ukrywa pozycje takze tam, gdzie karta ma wlasny "display". */
[data-sortable] > [hidden], .mcat-grid > [hidden] { display: none !important; }
table[data-hd] tr[data-low] { display: none; }

/* Okno logowania na stronach publicznych (landing/login.ts) i wyglad panelu w jego ramce. */
dialog.authm { padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); width: min(480px, calc(100vw - 20px)); height: min(820px, calc(100vh - 32px)); height: min(820px, calc(100dvh - 32px)); max-width: none; max-height: none; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
dialog.authm::backdrop { background: rgba(12, 10, 26, .62); backdrop-filter: blur(3px); }
dialog.authm iframe { display: block; width: 100%; height: 100%; border: 0; }
.authm-x { position: absolute; top: 8px; right: 8px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
html:has(dialog.authm[open]) { overflow: hidden; }

.price-std { display: block; }
.price-range { display: block; }
.mcat-n, .mpick-n { margin-left: 0.4em; padding: 0 0.4em; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 0.82em; font-variant-numeric: tabular-nums; }
.mcat-n:empty { display: none; }
@media (max-width: 700px) { .mcat-n, .mpick-n { display: none; } }

/* Pasek „zlec to AI” (components/AiHint.tsx). */
.ai-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; box-sizing: border-box; margin-block: 20px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 18px; text-align: left; background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, var(--pink) 12%, var(--surface))); }
.ai-hint.lp-wrap { width: min(calc(100% - 32px), 1100px); padding: 16px 20px; }
/* Polaczone MCP (site/src/mcp-state.ts): zamiast zachet sam komunikat „polaczono”. */
html:not(.mcp-on) [data-mcp="on"], html.mcp-on [data-mcp="off"] { display: none !important; }
/* Menu w jednym rzedzie, reszta pod przyciskiem … (site/src/overflow-menu.ts). */
.ovf-row.ovf-row { flex-wrap: nowrap; min-width: 0; max-width: 100%; }
.ovf-row.ovf-row > * { flex-shrink: 0; white-space: nowrap; }
/* Jeden rząd dotyczy samych pozycji menu; w rozwijanych okienkach tekst zawija się normalnie. */
.ovf-row.ovf-row > * .nv-panel { white-space: normal; }
.ovf-hide.ovf-hide.ovf-hide { display: none !important; }
.ovf-row > button.ovf-more.ovf-more { flex: none; display: inline-flex; align-items: center; justify-content: center; align-self: center; width: 40px; height: 36px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.ovf-row > button.ovf-more.ovf-on { border-color: var(--accent); color: var(--accent); }
.ovf-row > button.ovf-more[aria-expanded="true"] { background: var(--accent-soft); }
.ovf-pop { position: fixed; z-index: 70; box-sizing: border-box; min-width: 200px; max-width: min(320px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.ovf-pop a, .ovf-pop button, .ovf-pop summary { display: block; box-sizing: border-box; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; font-size: .93rem; line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer; }
.ovf-pop a:hover, .ovf-pop button:hover, .ovf-pop summary:hover { background: var(--accent-soft); }
.ovf-pop [aria-current] { font-weight: 700; background: var(--accent-soft); }
.ovf-pop details > a, .ovf-pop details > button { padding-left: 26px; }
.ovf-pop summary { font-weight: 600; }
.mcp-chip { position: fixed; z-index: 30; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); box-sizing: border-box; display: flex; align-items: flex-start; gap: 9px; max-width: min(270px, calc(100vw - 28px)); padding: 8px 12px; border: 1px solid color-mix(in srgb, #22c55e 45%, var(--line)); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 6px 20px rgba(0, 0, 0, .22); text-align: left; font-size: .75rem; line-height: 1.35; cursor: default; }
.mcp-chip .mcp-chip-min { display: none; }
html.mcp-min .mcp-chip { align-items: center; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
html.mcp-min .mcp-chip p { display: none; }
html.mcp-min .mcp-chip .mcp-chip-min { display: block; color: var(--text); }
html.mcp-min .mcp-chip .nv-dot { margin-top: 0; }
.mcp-chip p { margin: 0; }
.mcp-chip b, .mcp-chip span { display: block; }
.mcp-chip span { color: var(--muted); }
.mcp-chip .nv-dot { margin-top: 3px; width: 8px; height: 8px; }
@media (max-width: 640px) { .mcp-chip { padding: 6px 10px; font-size: .7rem; } .mcp-chip span:not(.mcp-chip-thx) { display: none; } }
.ai-hint-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--pink)); }
.ai-hint-ic .nv-ic { width: 24px; height: 24px; }
.ai-hint-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ai-hint-text b { font-size: 1.02rem; line-height: 1.3; }
.ai-hint-text span { font-size: .9rem; line-height: 1.45; color: var(--muted); }
.ai-hint-text q { font-size: .9rem; line-height: 1.45; }
.ai-hint-text q em { font-style: normal; font-weight: 700; }
.ai-hint > a.btn { white-space: nowrap; }
@media (max-width: 560px) { .ai-hint > a.btn { width: 100%; text-align: center; } .ai-hint-ic { display: none; } }

/* Okienka Kinvid (dialog.ts) */
dialog.kv-ask { box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
dialog.kv-ask::backdrop { background: rgba(8, 6, 20, .62); }
.kv-ask form { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px; }
.kv-ask-head { display: flex; align-items: center; gap: 10px; }
.kv-ask-head img { border-radius: 10px; }
.kv-ask-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; }
.kv-ask-name b { color: var(--accent); }
.kv-ask-text { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.kv-ask textarea { width: 100%; box-sizing: border-box; }
.kv-ask-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.kv-ask-foot .btn { min-height: 44px; min-width: 110px; justify-content: center; }
.kv-ask.kv-danger { border-top-color: var(--bad); }
.kv-ask.kv-danger .btn.primary { background: var(--bad); border-color: var(--bad); color: var(--surface); }
/* Style panelu (po zalogowaniu), ekranow logowania i dokumentow. Serwer podaje je w /app.css razem z tokens.css i base.css (w tej kolejnosci). */
.boot { padding: 2rem 16px; color: var(--muted); }

/* Pelna szerokosc okna z marginesami rosnacymi razem z ekranem (16 px na telefonie, do 56 px na duzym monitorze). */
.wrap { max-width: none; margin: 0 auto; padding: 0 clamp(16px, 3vw, 56px) 48px; }
header.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; }
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; margin-right: auto; }
.brand b { color: var(--accent); }
.brand-icon { width: 1.4em; height: 1.4em; vertical-align: -.3em; margin-right: .4em; border-radius: 7px; }
@media (max-width: 700px) { .topbar-wait .brand-name { display: none; } }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
nav.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer; }
nav.tabs button[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.pill { background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: .95rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 520px) { .pill { white-space: normal; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack > * + * { margin-top: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 120px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }
.err { color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.err:empty { display: none; }
.ok-note { color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.warn-note { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }

.authcard { max-width: 420px; margin: 8vh auto 0; }
/* Ekrany logowania panelu: wszystko na srodku, duze logo. */
.authcard-c { text-align: center; padding: 28px 24px 22px; }
.authcard-c .brand { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 14px; font-size: 2.6rem; line-height: 1; }
.authcard-c .brand-icon { width: 64px; height: 64px; margin: 0; border-radius: 16px; }
.brand-wide { display: block; margin: 0 auto 10px; line-height: 0; }
.brand-wide a { display: block; border-radius: 8px; }
.brand-wide a:focus-visible { outline-offset: 4px; }
.brand-wide img { display: block; width: min(300px, 100%); height: auto; margin: 0 auto; }
.authcard-c .brand-wide { margin: 0 auto 14px; }
.authcard-c .field { text-align: center; }
.authcard-c .check { justify-content: center; text-align: left; }
.authcard-c .seg { text-align: center; }
.authcard-c .submit-wrap { display: block; }
.authcard-c .submit-wrap .btn { min-width: 160px; }
.authcard-c .ok-note { text-align: center; }
.authcard-c .legalfoot { text-align: center; }
/* Plansze laczenia aplikacji (OAuth): zgoda i ekran po zgodzie */
.oa-pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 2px; }
.oa-ico { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.oa-letter { display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 1.6rem; }
.oa-dots { width: 44px; border-top: 3px dotted var(--line); }
.oa-title { text-align: center; font-size: 1.45rem; margin: 0; }
.oa-sub { text-align: center; margin: 0; }
.oa-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.oa-box p { margin: 0 0 6px; }
.oa-list { margin: 0; padding-left: 20px; color: var(--muted); }
.oa-list li { margin: 4px 0; }
.oa-gift { margin: 0; text-align: center; }
.oa-form .btn { width: 100%; }
.oa-foot { text-align: center; margin: 0; }
.oa-skiprow { display: flex; justify-content: flex-end; margin: 0; }
.oa-packs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oa-pack { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--text); background: var(--bg); }
.oa-pack:hover { border-color: var(--accent); }
.oa-pack span { font-size: 1.15rem; font-weight: 700; }
.oa-pack small { color: var(--muted); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.seg button { flex: 1; font: inherit; border: 0; background: none; padding: 10px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 600; }

.price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; background: var(--accent-soft); border-radius: 10px; margin-bottom: 16px; }
.price strong { font-size: 1.3rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.job { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.job video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.job img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--bg); display: block; }
.job .audio { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg); padding: 12px; }
.job .audio audio { width: 100%; }
.job .ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg); color: var(--muted); padding: 12px; text-align: center; font-size: .9rem; }
.job .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.job .prompt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid.folded, .cards.folded { align-items: start; }
.job img.pthumb { width: 64px; height: 64px; aspect-ratio: auto; object-fit: cover; }
.job .fold { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.job .fold-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .fold svg { flex: none; }
.job .fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.job .fold .chip { flex: none; }
.job.compact .folderrow { padding-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.run { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* Doladuj: karty planow i suwak pakietow maja style stron publicznych (offerCss), tu tylko roznice panelu. */
.offer { margin-top: 40px; }
.offer > h2 { text-align: center; font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 .3em; }
.offer-lead { text-align: center; color: var(--muted); max-width: 52em; margin: 0 auto 14px; }
.offer-center { text-align: center; }
.offer-current { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; max-width: 880px; margin: 0 auto 18px; }
.offer .pp-toggle button { font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; cursor: pointer; border-radius: 999px; padding: 9px 20px; }
.offer .pp-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.offer .pp-card h3 { margin-top: 0; }
button.pp-cta { width: 100%; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
button.pp-cta:disabled { cursor: default; opacity: .55; transform: none; box-shadow: none; }
.offer .pks-marks { gap: 6px; margin-top: 4px; }
.offer .pks-marks button { font: inherit; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.offer .pks-marks button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.offer .pks-main { display: flex; flex-direction: column; }
.offer .pks-main h3 { margin: 0; }
.offer .pks-main .check { margin: auto 0 0; padding-top: 14px; font-size: .86rem; }
.offer .pks .pp-cta, .plan-chosen .pp-cta { color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); margin-top: 12px; }
.bigbal { font-size: 2rem; font-weight: 800; }
pre, code { font: .85rem ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px 18px 12px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--accent); border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
#toast img { border-radius: 8px; flex: none; }
#toast.show { opacity: 1; }
.mockpay { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.mockpay .card { max-width: 420px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 520px) { .authcard { margin-top: 3vh; } }

.legalfoot { margin-top: 18px; }
.lf-row { display: inline; }
.lf-row + .lf-row::before { content: " · "; }
@media (max-width: 520px) { .legalfoot { text-align: center; } .lf-row { display: block; } .lf-row + .lf-row::before { content: none; } }
.legal { max-width: none; padding-top: 16px; }
.legal h2 { margin-top: 1.4em; }
.legal mark { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; }
.legal table { margin-bottom: 1em; }
.legal li { margin-bottom: .4em; }

.linkbtn { background: none; border: 0; padding: 0; color: var(--accent, inherit); text-decoration: underline; cursor: pointer; font: inherit; }
.warn-note .btn, .ok-note .btn { margin-left: 8px; }
.forgot { margin: 24px 0 8px; text-align: center; }
.linkbtn { padding: 6px 4px; }
.gsign { margin: 4px 0 12px; text-align: center; }
.gsign-or { margin: 12px 0 10px; }
.gsign-btn { display: flex; justify-content: center; min-height: 44px; }
.gsign-btn[hidden] { display: none; }
.gsign .stack { text-align: left; }
.gsign-wrap { position: relative; }
.gsign-wrap[hidden] { display: none; }
.submit-wrap { display: inline-block; }
.last-used { position: absolute; top: -9px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent, #5b3df5); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.4; pointer-events: none; }
.gsign-wrap > .gsign-btn { margin: 10px 0 0; }
.asign-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 320px; max-width: 100%; height: 40px; margin: 10px auto 0; padding: 0 12px; background: #000; color: #fff; border: 1px solid #747775; border-radius: 4px; font: 500 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; cursor: pointer; }
.msign-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 320px; max-width: 100%; height: 40px; margin: 10px auto 0; padding: 0 12px; background: #fff; color: #5e5e5e; border: 1px solid #8c8c8c; border-radius: 4px; font: 600 14px/1 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif; cursor: pointer; }
.msign-btn:hover { background: #f3f3f3; }
.msign-btn:focus-visible { outline: 2px solid var(--accent, #5b3df5); outline-offset: 2px; }
.msign-btn:disabled { opacity: .6; cursor: default; }
.asign-btn:hover { background: #1c1c1e; }
.asign-btn:focus-visible { outline: 2px solid var(--accent, #5b3df5); outline-offset: 2px; }
.asign-btn:disabled { opacity: .6; cursor: default; }
.linkbtn[aria-current="true"] { font-weight: 700; text-decoration: none; color: inherit; cursor: default; }

[hidden] { display: none !important; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.statv { font-size: 1.5rem; font-weight: 800; }
.barcell { white-space: nowrap; }
.bar { display: inline-block; width: 90px; height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.mcp { margin-top: 16px; }
.mcp summary { cursor: pointer; font-weight: 600; }
.mcp pre { overflow-x: auto; }
.mcp-clients { display: flex; flex-wrap: wrap; gap: 6px; }
.mcp-steps { padding-left: 20px; display: grid; gap: 6px; }

/* pasek postepu i komunikaty w kartach zlecen */
.job .ph.wait { gap: 8px; align-content: center; justify-items: stretch; padding: 16px 20px; }
.job .ph.wait > div { text-align: center; }
.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress .bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #e255c5); transition: width .5s linear; }
.progress[data-status="queued"] .bar { width: 35%; animation: kv-slide 1.6s ease-in-out infinite alternate; }
@keyframes kv-slide { from { transform: translateX(0); } to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) { .progress[data-status="queued"] .bar { animation: none; } .progress .bar { transition: none; } }
.job .ph.fail { color: var(--text); background: var(--bad-soft); }
.job .ph.fail p { margin: .4em 0 0; font-size: .88rem; }
.job .ph.fail .refund { font-weight: 600; color: var(--bad); }
/* Każdy podgląd ma tę samą wysokość; dłuższy komunikat przewija się w środku. */
.job > .ph, .job > .audio { min-height: 0; overflow: auto; align-content: safe center; }
.notifybar { margin: 0 0 14px; }

.job .failactions { margin-top: 10px; }
.job .failactions .row { gap: 8px; }
.job .failactions .err { margin: 6px 0 0; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.danger:hover:not(:disabled) { background: var(--bad-soft); }
.job .jobactions { gap: 8px; margin-top: 8px; }

/* ---------- galeria: filtry i wyszukiwanie ---------- */
.gtoolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.gtoolbar .seg { margin-bottom: 0; flex: 0 1 auto; flex-wrap: wrap; }
.gtoolbar .seg button { flex: 0 0 auto; padding: 8px 14px; }
.gtoolbar .gsearch { flex: 1 1 200px; max-width: 320px; }
.job img.zoomable { cursor: zoom-in; }

/* ---------- podglad pracy ---------- */
body.noscroll { overflow: hidden; }
.vback.fileview img { max-width: 100%; max-height: calc(100vh - 24px); object-fit: contain; display: block; }
.vback.fileview .vclose { position: fixed; top: 12px; right: 12px; }
.vback { position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 12, .86); display: grid; place-items: center; padding: 12px; }
.viewer { position: relative; width: min(1100px, 100%); max-height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: 56px 1fr 56px; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.vstage { grid-column: 2; grid-row: 1; display: grid; place-items: center; background: #000; min-height: 200px; max-height: 64vh; }
.vstage img, .vstage video { max-width: 100%; max-height: 64vh; display: block; object-fit: contain; }
.vstage .vjoined { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 10px 0; }
.vstage .vjoined video { max-height: calc(100% - 60px); }
.vstage .vaudio { width: 100%; padding: 40px 16px; background: var(--bg); }
.vstage .vaudio audio { width: 100%; }
.vnav { grid-row: 1; align-self: center; justify-self: center; font-size: 1.6rem; line-height: 1; padding: 10px 12px; }
.vprev { grid-column: 1; }
.vnext { grid-column: 3; }
.vclose { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 6px 10px; }
.vcount { position: absolute; top: 12px; left: 14px; z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; padding: 2px 8px; border-radius: 8px; }
.vinfo { grid-column: 1 / -1; grid-row: 2; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; max-height: 32vh; overflow: auto; }
.vprompt { white-space: pre-wrap; overflow-wrap: anywhere; }
.vdl .row { gap: 8px; align-items: center; }
.vdl select { width: auto; }
.vquality { display: flex; gap: 8px; align-items: center; }
.vquality input[type=range] { width: 120px; }
.vdl .err { margin: 6px 0 0; }
@media (max-width: 640px) {
  .viewer { grid-template-columns: 40px 1fr 40px; }
  .vnav { padding: 8px 8px; }
}

/* ---------- parametry pracy (karta i podglad) ---------- */
/* Parametry pracy: etykieta nad wartoscia, pary ukladaja sie w kolumny po co najmniej 120 px. */
dl.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 14px; margin: 0; font-size: .82rem; }
dl.params .prow { min-width: 0; }
dl.params dt { color: var(--muted); font-size: .92em; }
dl.params dd { margin: 0; overflow-wrap: break-word; }
.vinfo dl.params { font-size: .88rem; }

/* ---------- obrazy referencyjne w Studio ---------- */
.refs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.refs:empty { display: none; }
.ref { position: relative; width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref .btn { position: absolute; top: 2px; right: 2px; padding: 0 6px; min-height: 0; line-height: 1.4; font-size: .8rem; }

/* ---------- menu eksportu ---------- */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; display: inline-block; user-select: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: " ▾"; }
.menubox { position: absolute; z-index: 20; min-width: 230px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.job { position: relative; }
.job details.menu { position: static; }
.job details.menu .menubox { left: 14px; right: 14px; bottom: 44px; min-width: 0; margin: 0; }
.menuitem { background: none; border: 0; color: var(--text); font: inherit; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menuitem:hover:not(:disabled), .menuitem:focus-visible { background: var(--accent-soft); }
.menuitem:disabled { color: var(--muted); cursor: default; }
.gexport { margin-left: auto; }
.vmore { gap: 8px; }
.vinfo details.menu .menubox { bottom: 100%; margin: 0 0 4px; }
.row.center { justify-content: center; margin: 16px 0; }
.gdates { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gdates select, .gdates input[type="date"] { width: auto; min-width: 0; }
.jobdate { margin: 2px 0 4px; }
.gdates .gperiod { margin-bottom: 0; flex: 0 1 auto; flex-wrap: wrap; }
.gdates .gperiod button { flex: 0 0 auto; padding: 8px 14px; }
.gslider { display: flex; align-items: center; gap: 10px; }
.gslider input[type="range"] { width: 160px; }

/* ---------- Reel (kreator) ---------- */
.row.between { justify-content: space-between; align-items: center; }
.row.actions { gap: 10px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tier { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.tier[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tier:disabled { opacity: .5; cursor: not-allowed; }
.tier .tprice { font-weight: 700; margin-top: 4px; }
fieldset.modes { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; display: grid; gap: 12px; }
fieldset.modes legend { font-weight: 600; padding: 0 6px; }
.pricebox { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
.over { color: var(--bad); font-weight: 600; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rrow { width: 100%; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.rrow:hover { border-color: var(--accent); }
.rrow .rtitle { font-weight: 600; flex: 1 1 200px; overflow-wrap: anywhere; }
ol.steps { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 4px 0 0; padding: 0; counter-reset: st; }
ol.steps li { counter-increment: st; color: var(--muted); font-size: .9rem; }
ol.steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; border: 1px solid var(--line); font-size: .8rem; }
ol.steps li.done { color: var(--text); }
ol.steps li.done::before { background: var(--ok-soft); color: var(--ok); border-color: transparent; content: "✓"; }
ol.steps li[aria-current="step"] { color: var(--text); font-weight: 700; }
ol.steps li[aria-current="step"]::before { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.rprogress { width: 100%; }
.card.scene h3 { margin-bottom: .8em; }
.card.scene textarea { min-height: 84px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.rgrid.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rgrid:empty { display: none; }
.rpart { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.rpart video { width: 100%; background: #000; display: block; }
.rpart.vertical video { aspect-ratio: 9 / 16; max-height: 420px; object-fit: contain; }
.rpart.horizontal video { aspect-ratio: 16 / 9; }
.rpart audio { width: 100%; display: block; margin: 12px 0 0; padding: 0 12px; }
.rpart .ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg); color: var(--muted); padding: 12px; text-align: center; font-size: .9rem; }
.rpart.vertical.scene .ph { aspect-ratio: 9 / 16; max-height: 420px; }
.rpart .ph.wait { gap: 8px; align-content: center; justify-items: stretch; padding: 16px 20px; }
.rpart .ph.wait > div { text-align: center; }
.rpart .ph.fail { color: var(--text); background: var(--bad-soft); }
.rpart .ph.fail p { margin: .4em 0 0; font-size: .88rem; }
.rpart .ph.fail .refund { font-weight: 600; color: var(--bad); }
.rpart .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rpart textarea { min-height: 64px; }
.rpart details > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.rpart .say { margin: 0; overflow-wrap: anywhere; }
.btn.small { min-height: 0; padding: 6px 12px; font-size: .9rem; }
.stack.small > * + * { margin-top: 8px; }
.card.final video { width: 100%; background: #000; display: block; margin: 0 auto; border-radius: 8px; }
.card.final video.vertical { max-width: 360px; aspect-ratio: 9 / 16; }
.card.final video.horizontal { aspect-ratio: 16 / 9; }
.postdesc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.scriptlist { padding-left: 1.2em; display: grid; gap: 10px; }
.refund-note { font-weight: 600; color: var(--ok); }
fieldset { min-width: 0; }

.tier ul.uses { list-style: none; margin: 6px 0 0; padding: 0; text-align: left; }
.tier ul.uses li { margin: 1px 0; }

.assist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.assist .suggests { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.suggest { text-align: left; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; cursor: pointer; font: inherit; }
.suggest:hover, .suggest:focus-visible { border-color: var(--accent); }
details.assist-det { margin-top: 4px; }
details.assist-det > summary { cursor: pointer; color: var(--accent); }

details.guide > summary { cursor: pointer; }
ol.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: gs; }
ol.guide-steps li { counter-increment: gs; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: start; }
ol.guide-steps li::before { content: counter(gs); grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .85rem; font-weight: 700; }


/* ---------- Studio: sekcje, funkcje, pliki wejsciowe, maska ---------- */
.seg { flex-wrap: wrap; }
.fseg { margin-top: -6px; background: var(--bg); }
.fseg button { flex: 0 0 auto; padding: 8px 12px; font-size: .92rem; }
.dropzone { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.fprev { margin-bottom: 8px; }
.fprev:empty { display: none; }
.fprev img, .fprev video { max-width: 100%; max-height: 240px; border-radius: 8px; display: block; }
.fprev audio { width: 100%; }
progress { width: 100%; height: 8px; }
.mp-wrap { position: relative; width: 100%; line-height: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; touch-action: none; }
.mp-base { display: block; width: 100%; height: auto; }
.mp-over { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.mp-bar { align-items: center; margin-bottom: 8px; }
.mp-bar input[type="range"] { vertical-align: middle; width: 120px; }
.mp-bar .btn[aria-pressed="true"] { background: var(--accent-soft); font-weight: 600; }
.textout { white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; margin: 0; padding: 12px; background: var(--bg); font: .85rem/1.45 ui-monospace, Menlo, monospace; border-radius: 8px 8px 0 0; }
.textout.full { max-height: 60vh; min-width: min(90vw, 640px); background: var(--surface); }
.job .jobfolder { gap: 8px; margin-top: 8px; align-items: center; }
.job .jobfolder select { width: auto; min-width: 150px; padding: 6px 8px; }
.gtoolbar > select { width: auto; min-width: 190px; flex: 0 1 auto; }
.libgrid { margin-top: 16px; }
.libpick { margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0; }
h2.sec { margin-top: 1.6em; }

/* projekty, postacie marki, kolory marki */
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pthumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pthumb.big { width: 96px; height: 96px; }
.field.grow { flex: 1 1 260px; }
.swatches { gap: 6px; align-items: center; margin-top: 6px; }
.swatches input[type="color"] { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; flex: none; }
details.remake > summary { list-style: none; cursor: pointer; display: inline-block; }
details.remake > summary::-webkit-details-marker { display: none; }
details.remake[open] { flex: 1 1 100%; }
details.remake .stack { margin-top: 8px; }
.cards.fill { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.libparts { margin-bottom: 16px; }
.brandrow { align-items: flex-start; justify-content: space-between; }
.brandcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.brandcard .brandrow > .row { align-items: center; margin: 0; }
a.chip { text-decoration: none; }
a.chip:hover { color: var(--text); border-color: var(--accent); }
input[type="color"].swatch { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.tablewrap { overflow-x: auto; }
.tablewrap th, .tablewrap td { text-align: left; padding: 6px 10px 6px 0; white-space: nowrap; }

/* ---------- efekty panelu i ekranow logowania ----------
   Czysty CSS; ruch wylacza prefers-reduced-motion. Poswiate za kursorem na kartach rysuje maly skrypt w panel/main.tsx (--mx, --my). */
:root { --pink: #e255c5; --fx-glow: color-mix(in srgb, var(--accent) 14%, transparent); }

/* tlo: powolna zorza za cala strona panelu i ekranow logowania */
body:has(main.wrap)::before {
  content: ""; position: fixed; inset: -10% -10% auto -10%; height: 70vh; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .45;
  background:
    radial-gradient(36% 50% at 15% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    radial-gradient(32% 46% at 85% 10%, color-mix(in srgb, var(--pink) 35%, transparent), transparent 70%);
  animation: fx-aurora 20s ease-in-out infinite alternate;
}
@keyframes fx-aurora { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.1); } }

/* gora: szklo, saldo z gradientem */
header.top { position: relative; }
.pill { background-image: linear-gradient(110deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 70%, var(--pink))); }

/* zakladki: plynny kolor i wskaznik z gradientem */
nav.tabs button { transition: color .2s ease, border-color .2s ease, background-color .2s ease; border-radius: 8px 8px 0 0; }
nav.tabs button:hover { color: var(--text); background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
nav.tabs button[aria-current="page"] { border-image: linear-gradient(90deg, var(--accent), var(--pink)) 1; border-image-slice: 1; border-top-width: 0; border-left-width: 0; border-right-width: 0; }

/* przyciski: gradient glowny, polysk i delikatne wcisniecie */
.btn { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.btn:not(:disabled):active { transform: scale(.98); }
.btn:not(.primary):not(.link):not(:disabled):hover { border-color: var(--accent); }
.btn.primary { position: relative; overflow: hidden; isolation: isolate; background-image: linear-gradient(110deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--pink))); }
.btn.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%); transform: translateX(-120%); }
.btn.primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:not(:disabled):hover::after { transform: translateX(120%); transition: transform .7s ease; }

/* pola: swiecaca obwodka przy wpisywaniu */
input, textarea, select { transition: border-color .2s ease, box-shadow .2s ease; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

/* przelacznik: wybrana pozycja z gradientem */
.seg button { transition: background-color .2s ease, color .2s ease; }
.seg button[aria-pressed="true"] { background-image: linear-gradient(110deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 65%, var(--pink))); }

/* karty: wejscie, swiatlo za kursorem i uniesienie przy najechaniu */
.cards > .card, .grid > .card, .cards > *, .grid > * { position: relative; transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease; }
.cards > .card:hover, .grid > .card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); box-shadow: 0 16px 36px -24px color-mix(in srgb, var(--accent) 60%, transparent); background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--fx-glow), transparent 60%); }
.card, .cards > *, .grid > * { animation: fx-in .4s cubic-bezier(.2, .7, .2, 1) both; }
.cards > :nth-child(2), .grid > :nth-child(2) { animation-delay: .05s; }
.cards > :nth-child(3), .grid > :nth-child(3) { animation-delay: .1s; }
.cards > :nth-child(4), .grid > :nth-child(4) { animation-delay: .15s; }
.cards > :nth-child(n+5), .grid > :nth-child(n+5) { animation-delay: .2s; }
@keyframes fx-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ekran logowania: karta wjezdza, ma swiecaca obwodke */
.authcard { animation: fx-pop .55s cubic-bezier(.2, .8, .2, 1) both; box-shadow: 0 30px 70px -34px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent); }
@keyframes fx-pop { from { opacity: 0; translate: 0 22px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
.brand-wide img { animation: fx-float 7s ease-in-out infinite; }
@keyframes fx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }

/* komunikaty wsuwaja sie, a nie pojawiaja nagle */
.ok-note, .err { animation: fx-in .35s ease both; }

@media (prefers-reduced-motion: reduce) {
  body:has(main.wrap)::before, .card, .cards > *, .grid > *, .authcard, .brand-wide img, .ok-note, .err { animation: none !important; }
  .btn, nav.tabs button, .cards > *, .grid > * { transition: none; }
  .btn:not(:disabled):active, .btn.primary:not(:disabled):hover, .cards > .card:hover, .grid > .card:hover { transform: none; }
}

/* kafle ze statystykami (panel i panel administratora) */
.stats > .stat { position: relative; transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease; animation: fx-in .4s cubic-bezier(.2, .7, .2, 1) both; }
.stats > :nth-child(2) { animation-delay: .05s; } .stats > :nth-child(3) { animation-delay: .1s; } .stats > :nth-child(n+4) { animation-delay: .15s; }
.stats > .stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 14px 30px -22px color-mix(in srgb, var(--accent) 60%, transparent); background-image: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), var(--fx-glow), transparent 60%); }
.statv { background: linear-gradient(90deg, var(--text), color-mix(in srgb, var(--accent) 70%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { .stats > .stat { animation: none !important; transition: none; } .stats > .stat:hover { transform: none; } }

/* ekrany zgody (laczenie z Claude i innymi aplikacjami): zywa para ikon, lista i podarunek */
.oa-ico { box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 65%, transparent); }
.oa-letter { background-image: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--pink))); }
.oa-dots { border-top: 0; height: 6px; background: radial-gradient(circle, var(--accent) 0 2.2px, transparent 2.6px) 0 50% / 11px 6px repeat-x; animation: fx-flow 1.1s linear infinite; }
@keyframes fx-flow { to { background-position: 11px 50%; } }
.oa-box { background-image: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 70%); }
.oa-list { list-style: none; padding-left: 0; }
.oa-list li { position: relative; padding-left: 26px; animation: fx-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.oa-list li::before { content: "\2713"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--accent-text); background: linear-gradient(135deg, var(--accent), var(--pink)); }
.oa-list li:nth-child(2) { animation-delay: .08s; } .oa-list li:nth-child(3) { animation-delay: .16s; }
.oa-gift { background-image: linear-gradient(100deg, var(--ok-soft), color-mix(in srgb, var(--ok-soft) 60%, var(--accent-soft))); border-radius: 10px; padding: 10px 12px; }
.oa-pack { transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease; }
.oa-pack:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px color-mix(in srgb, var(--accent) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { .oa-dots, .oa-list li { animation: none !important; } .oa-pack { transition: none; } .oa-pack:hover { transform: none; } }

/* regulamin, polityka prywatnosci, cookies: pasek postepu czytania, naglowki, tabele jak karty */
.legal h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.02em; background: linear-gradient(90deg, var(--text), var(--accent), var(--pink), var(--accent), var(--text)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-shift 12s linear infinite; }
@keyframes fx-shift { to { background-position: -300% 0; } }
.legal h2 { display: flex; flex-direction: column; scroll-margin-top: 16px; }
.legal h2::after { content: ""; width: 40px; height: 4px; border-radius: 4px; margin-top: 7px; background: linear-gradient(90deg, var(--accent), var(--pink)); }
.legal table { border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px -34px color-mix(in srgb, var(--accent) 55%, transparent); }
.legal thead th { background: linear-gradient(100deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 60%, var(--surface))); color: var(--text); padding: 10px 12px; }
.legal td { padding: 9px 12px; transition: background-color .15s ease; }
.legal tbody tr:last-child td { border-bottom: 0; }
.legal tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.legal li::marker { color: var(--accent); }
.legal .warn-note { border-radius: 12px; border-left: 4px solid var(--warn); }
.legal a { text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); transition: text-decoration-color .2s ease; }
.legal a:hover { text-decoration-color: var(--accent); }
@media (max-width: 700px) { .legal table { display: block; overflow-x: auto; } }
@supports (animation-timeline: view()) {
  .legal h2 { animation: fx-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  body:has(main.legal)::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 20; pointer-events: none; background: linear-gradient(90deg, var(--accent), var(--pink)); transform-origin: 0 50%; animation: fx-progress linear both; animation-timeline: scroll(root); }
}
@keyframes fx-rise { from { opacity: 0; translate: 0 28px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes fx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .legal h1, .legal h2, .legal table, body:has(main.legal)::after { animation: none !important; } .legal td { transition: none; } }

/* panel dodany do ekranu glownego telefonu (tryb aplikacji): bez paska przegladarki, z marginesami na wyciecie ekranu i pasek gestow */
@media (display-mode: standalone) {
  html { overscroll-behavior-y: none; }
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); -webkit-tap-highlight-color: transparent; }
  .btn, nav.tabs button, .seg button { -webkit-user-select: none; user-select: none; }
}

/* Przejscie do Kinvid Social: zakladka obok sekcji na szerokim ekranie, przycisk w gornym pasku na waskim. */
nav.tabs .tab-social { margin-left: auto; padding: 10px 14px; color: var(--accent); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
nav.tabs .tab-social:hover { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); border-radius: 8px 8px 0 0; }

/* ekran logowania: kolorowa, powoli obracajaca sie obwodka, poswiata za logo i kolejne wejscie pol */
@property --fx-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.authcard { position: relative; isolation: isolate; }
.authcard::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--fx-ang), transparent 0 55%, var(--accent), var(--pink), transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .85; animation: fx-spin 9s linear infinite;
}
@keyframes fx-spin { to { --fx-ang: 360deg; } }
.authcard-c .brand-wide { position: relative; }
.authcard-c .brand-wide::before { content: ""; position: absolute; inset: 0 12% -8%; z-index: -1; border-radius: 50%; filter: blur(34px); opacity: .45; background: radial-gradient(closest-side, var(--accent), color-mix(in srgb, var(--pink) 50%, transparent) 65%, transparent); animation: fx-glow-pulse 5s ease-in-out infinite alternate; }
@keyframes fx-glow-pulse { from { opacity: .3; transform: scale(.92); } to { opacity: .55; transform: scale(1.06); } }
.authcard .field label, .authcard .field > span { transition: color .2s ease; }
.authcard .field:focus-within > label, .authcard .field:focus-within > span:first-child { color: var(--accent); }
.authcard .gsign-btn, .authcard .gsign .btn { transition: transform .18s ease, box-shadow .2s ease; }
.authcard .gsign-btn:hover, .authcard .gsign .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 65%, transparent); }
.authcard .linkbtn, .legalfoot a { text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s ease, color .2s ease; }
.authcard .linkbtn:hover, .legalfoot a:hover { text-decoration-color: currentColor; }
.legalfoot { animation: fx-in .5s ease .4s both; }
@media (prefers-reduced-motion: reduce) {
  .authcard::before, .authcard-c .brand-wide::before, .authcard-c > *, .legalfoot { animation: none !important; }
  .authcard .gsign-btn, .authcard .gsign .btn { transition: none; }
  .authcard .gsign-btn:hover, .authcard .gsign .btn:hover { transform: none; }
}

/* ekrany zgody: kolejne wejscie sekcji, poswiata za ikonami i uniesienie paczek */
.authcard.stack > * { animation: fx-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.authcard.stack > :nth-child(2) { animation-delay: .06s; } .authcard.stack > :nth-child(3) { animation-delay: .12s; }
.authcard.stack > :nth-child(4) { animation-delay: .18s; } .authcard.stack > :nth-child(5) { animation-delay: .24s; }
.authcard.stack > :nth-child(n+6) { animation-delay: .3s; }
.oa-pair { position: relative; }
.oa-pair::before { content: ""; position: absolute; inset: -14px 14%; z-index: -1; border-radius: 50%; filter: blur(30px); opacity: .45; background: radial-gradient(closest-side, var(--accent), color-mix(in srgb, var(--pink) 50%, transparent) 65%, transparent); animation: fx-glow-pulse 5s ease-in-out infinite alternate; }
.oa-ico:not(.oa-letter) { animation: fx-float 6s ease-in-out infinite; }
.oa-letter { animation: fx-float 6s ease-in-out infinite .6s; }
.oa-pack { transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease; }
.oa-pack:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 65%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .authcard.stack > *, .oa-pair::before, .oa-ico, .oa-letter { animation: none !important; }
  .oa-pack { transition: none; } .oa-pack:hover { transform: none; }
}

/* ---- Ekrany logowania: swiatlo WebGL za karta (site/src/landing/light.ts) i lekkie przechylanie karty ---- */
body.auth-light { position: relative; isolation: isolate; }
body.auth-light > .light-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; mix-blend-mode: screen; }
body.auth-light > .light-bg.on { opacity: .38; }
@media (prefers-color-scheme: light) { body.auth-light > .light-bg { mix-blend-mode: normal; } body.auth-light > .light-bg.on { opacity: .35; } }
.authcard-c { --tx: 0deg; --ty: 0deg; transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { body.auth-light > .light-bg { display: none; } .authcard-c { transform: none !important; } }

/* ---- Ekrany zgody i logowania z serwera (bez skryptow, CSP default-src 'none'): swiatlo i szklo wylacznie w CSS ---- */
body:has(.authcard.stack)::after {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: .4; filter: blur(22px); mix-blend-mode: screen;
  background:
    repeating-linear-gradient(115deg, transparent 0 190px, color-mix(in srgb, var(--accent) 70%, transparent) 230px, transparent 290px 420px),
    repeating-linear-gradient(115deg, transparent 0 310px, color-mix(in srgb, var(--pink) 60%, transparent) 340px, transparent 380px 560px),
    repeating-linear-gradient(115deg, transparent 0 120px, color-mix(in srgb, #17c3e8 55%, transparent) 140px, transparent 170px 640px);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 100%); mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 100%);
  animation: fx-beams 22s linear infinite;
}
@keyframes fx-beams { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(420px, 0, 0); } }
@media (prefers-color-scheme: light) { body:has(.authcard.stack)::after { mix-blend-mode: normal; opacity: .22; } }
/* szklany polysk, ktory co kilka sekund przebiega przez karte */
.authcard.stack::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .13) 48%, transparent 60%) -150% 0 / 60% 100% no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12);
  animation: fx-glint 7s ease-in-out 1.2s infinite;
}
@keyframes fx-glint { 0%, 55% { background-position: -150% 0; } 100% { background-position: 260% 0; } }
@media (prefers-reduced-motion: reduce) { body:has(.authcard.stack)::after, .authcard.stack::after { animation: none !important; } .authcard.stack::after { background: none; } }

/* ---- Panel po zalogowaniu: subtelne swiatlo WebGL pod naglowkiem (site/src/landing/light.ts, tworzy je Shell.tsx) ---- */
.panel-light { position: fixed; top: 0; left: 0; right: 0; height: 300px; z-index: -1; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent); mask-image: linear-gradient(180deg, #000 10%, transparent); }
.panel-light > .light-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s ease; mix-blend-mode: screen; }
.panel-light > .light-bg.on { opacity: .32; }
@media (prefers-color-scheme: light) { .panel-light > .light-bg { mix-blend-mode: normal; } .panel-light > .light-bg.on { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .panel-light { display: none; } }

/* ---- Telefon: zakladki przyklejone do gory ze szklem, podpowiedz przewijania, mniejszy naglowek, rozswietlenie dotknietego miejsca ---- */
@media (max-width: 700px) {
  nav.tabs { position: sticky; top: 0; z-index: 6; margin-inline: calc(-1 * clamp(16px, 3vw, 56px)); padding-inline: clamp(16px, 3vw, 56px); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); }
  header.top { gap: 8px; }
  header.top .pill { font-size: .82rem; padding: 6px 11px; }
  header.top .btn { min-height: 40px; padding: 8px 14px; }
}
@media (pointer: coarse) {
  .btn:active, nav.tabs button:active, .seg button:active { background-image: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%); }
  .btn.primary:active { background-image: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .3), transparent 70%), linear-gradient(110deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--pink))); }
}
@media (display-mode: standalone) and (max-width: 700px) { nav.tabs { top: env(safe-area-inset-top); } }

/* Panel administratora: bez poswiaty za logo na ekranie logowania. */
.authcard-plain .brand-wide::before { content: none; }

/* Zakladka „Zrob taki film” */
.film-video{width:100%;height:300px;object-fit:contain;border-radius:10px;background:#000}
.cards > .film-pick{border-color:var(--accent)}

/* ---------- wybor modelu w Studiu (tabs/studio/ModelField.tsx) ---------- */
.mpick { position: relative; }
.mpick-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; font: inherit; text-align: left; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; cursor: pointer; }
.mpick-btn span { flex: 1; overflow-wrap: anywhere; }
.mpick-arrow { width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -4px 2px 0; flex: none; }
.mpick-btn[aria-expanded="true"] .mpick-arrow { transform: rotate(225deg); margin-top: 4px; }
.mpick-panel { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 34px rgb(0 0 0 / .28); overflow: hidden; }
.mpick-sort { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.mpick-sort button { font: inherit; font-size: .82rem; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.mpick-sort button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 700; border-color: var(--accent); }
.mpick-list { list-style: none; margin: 0; padding: 6px; max-height: min(440px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.mpick-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; width: 100%; font: inherit; text-align: left; color: var(--text); background: none; border: 1px solid transparent; border-radius: 10px; padding: 10px; cursor: pointer; }
.mpick-item:hover { background: var(--bg); }
.mpick-item[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mpick-text { display: flex; flex-direction: column; gap: 4px; }
.mpick-note { font-size: .82rem; color: var(--muted); }
.mpick-rule { margin: 6px 0 0; padding: 7px 10px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--accent-soft); }
.cn-fields label:first-child select { min-width: 200px; }
.cr-rule { flex-basis: 100%; grid-column: 1 / -1; margin: 0; }
.mpick-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mpick-chips em { font-style: normal; font-size: .72rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.mpick-price { display: flex; flex-direction: column; align-items: flex-end; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.mpick-price small { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) {
  .mpick-item { grid-template-columns: auto minmax(0, 1fr); }
  .mpick-price { grid-column: 2; flex-direction: row; gap: 6px; align-items: baseline; }
}

/* Ekran logowania w oknie na stronie publicznej: karta wypelnia okno. */
html.embed, html.embed body { background: var(--surface); }
html.embed .wrap { padding: 0; }
html.embed .authcard { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding-top: 52px; }
.plan-chosen { border-color: var(--accent); background: var(--accent-soft); max-width: 640px; margin: 0 auto 22px; text-align: center; }
.plan-chosen .check { text-align: left; }

/* Oferta bez animacji wejscia od przezroczystosci (zostaje czytelna od razu). */
.offer .offer-current, .offer .plan-chosen { animation: none; }

/* Przyklady odcinkow w karcie seriali (zakladka Reel) */
.series-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; }
.series-examples figure { margin: 0; }
.series-examples video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 10px; background: #000; }
.series-examples figcaption { margin-top: 6px; }

.series-specs { display: grid; gap: 8px; margin: 0; }
.series-specs div { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 2px 14px; }
.series-specs dt { font-weight: 700; }
.series-specs dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .series-specs div { grid-template-columns: 1fr; } }

/* Profil uzytkownika: awatar w naglowku z menu konta, strona profilu (panel i /@nazwa) oraz okno edycji. */
.pf-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 1.05rem; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-avatar.big { width: 104px; height: 104px; font-size: 2.4rem; border: 4px solid var(--surface); }
.pf-menu { position: relative; }
.pf-trigger { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.pf-trigger:hover, .pf-trigger[aria-expanded="true"] { border-color: var(--accent); }
.pf-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow-y: auto; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.pf-who { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pf-who div { min-width: 0; display: flex; flex-direction: column; }
.pf-who b, .pf-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-wallet { display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-soft); font-size: .92rem; }
.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; white-space: nowrap; }
.pf-wallet i, .kr-pill i { font-style: normal; color: var(--accent); }
.pf-total span { color: var(--muted); }
.pf-sum { font-size: 1.05rem; }
.pf-bar { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.pf-bar .pf-row > span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--bar-a); }
.pf-bar.plan { --bar-a: #7c4dff; --bar-b: #e255c5; }
.pf-bar.pack { --bar-a: #ff7a45; --bar-b: #ffd23f; }
.pf-bar.admin { --bar-a: #0ea5b7; --bar-b: #67e8f9; }
.pf-bar.gift { --bar-a: #22c55e; --bar-b: #d8ff3e; }
.pf-used { margin-top: -4px; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.pf-wallet progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--text) 16%, transparent); }
.pf-wallet progress::-webkit-progress-bar { background: color-mix(in srgb, var(--text) 16%, transparent); }
.pf-wallet progress::-webkit-progress-value { background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); border-radius: 999px; }
.pf-wallet progress::-moz-progress-bar { background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); border-radius: 999px; }
.pf-total { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.pf-buy { display: block; width: 100%; min-height: 40px; padding: 10px 14px; border: 0; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 800; line-height: 20px; text-align: center; color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); text-decoration: none; cursor: pointer; }
.kr-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 6px 11px 6px 13px; border: 0; border-radius: 999px; background-color: var(--accent-soft); color: var(--text); font: inherit; font-size: .92rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.kr-pill::after { content: ""; width: 5px; height: 5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .55; }
.kr-pill[aria-expanded="true"]::after { transform: translateY(1px) rotate(225deg); }
.kr-pill:hover, .kr-pill[aria-expanded="true"] { outline: 1px solid var(--accent); }
.kr-menu .pf-pop { width: min(290px, calc(100vw - 24px)); }
.kr-menu .pf-wallet { margin-bottom: 0; }
@media (max-width: 560px) {
  .kr-menu .pf-pop { position: fixed; top: 62px; right: 12px; }
}
.pf-item { display: block; width: 100%; min-height: 40px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pf-item:hover { background: var(--accent-soft); }
.pf-out { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 6px; }
.card.pf-head { padding: 0; overflow: hidden; }
.pf-cover { position: relative; height: clamp(120px, 22vw, 240px); background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--accent) 45%, var(--surface))); }
.pf-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-cover-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pf-file { position: relative; display: inline-flex; align-items: center; margin: 0; font-weight: 400; cursor: pointer; }
.pf-file input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.pf-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-id { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px 20px; }
.pf-id > * { margin: 8px 0 0; }
.pf-id > .pf-avatar { position: relative; margin-top: -52px; }
.pf-id h1, .pf-id h2 { overflow-wrap: anywhere; }
.pf-id > .pf-handle { margin-top: 0; }
.pf-headline { font-weight: 600; overflow-wrap: anywhere; }
.pf-bio { max-width: 60ch; white-space: pre-line; overflow-wrap: anywhere; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; }
.pf-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0; list-style: none; }
.pf-links a { text-decoration: none; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pf-actions .btn { text-decoration: none; }
.pf-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-filter .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.pf-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; padding: 0; list-style: none; }
.card.pf-work { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 10px; min-width: 0; }
.pf-work video, .pf-work img, .pf-gone { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #000; }
.pf-gone { display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.pf-work p { margin: 0; }
.pf-title { font-weight: 600; overflow-wrap: anywhere; }
.pf-work-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
dialog.pf-dialog { width: min(560px, calc(100vw - 20px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); }
dialog.pf-dialog::backdrop { background: rgba(12, 10, 26, .62); }
.pf-dialog h2 { margin-top: 0; }
.pf-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.pf-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-bottom: 16px; }
.pf-check input { margin-top: 4px; }
.pf-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; border: 0; padding: 0; margin: 0; }
.pf-socials legend { font-weight: 600; margin-bottom: 8px; }
.pf-public-box { border-top: 1px solid var(--line); padding-top: 16px; }
.pf-dialog-actions { position: sticky; bottom: -20px; display: flex; gap: 8px; justify-content: flex-end; padding: 12px 0; background: var(--surface); }
/* publiczna strona /@nazwa */
.pf-public { max-width: 1100px; }
.pf-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pf-top .btn { text-decoration: none; }
.pf-brand { font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; }
.pf-counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-weight: 700; }
.pf-react { margin: 0; }
.pf-react .btn { margin: 0; }
.btn.pf-on { border-color: var(--accent); background: var(--accent-soft); }
.pf-filter a.btn { text-decoration: none; }
.pf-filter .btn[aria-current] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.pf-rank { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pf-rank > li.card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; animation: none; }
.pf-place { min-width: 2ch; font-size: 1.15rem; text-align: right; }
.pf-rank-who { display: flex; flex-direction: column; flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.pf-rank-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pf-report { margin-top: 32px; max-width: 640px; }
.pf-report summary { cursor: pointer; font-weight: 600; }
.pf-report form { margin-top: 12px; }
.pf-report input, .pf-report select, .pf-report textarea { margin-top: 6px; font-weight: 400; }
/* Karty profilu pojawiaja sie od razu, bez wejscia z przezroczystosci (czytelnosc). */
.pf-public .card, .card.pf-head, .pf-works > .card, .pf-works > * { animation: none; }
.pf-public .pf-top { padding-top: 14px; }
/* Na waskim ekranie zdjecie zachodzi na dol okladki, wiec jej przyciski ida na gore. */
@media (max-width: 640px) { .pf-cover-actions { top: 10px; bottom: auto; right: 10px; left: 10px; } }

.pf-follow-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.pf-follow-head h3 { margin: 0; }
.pf-follow-head .btn { text-decoration: none; }
.pf-follow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 8px; }
.pf-follow li { display: flex; align-items: center; gap: 10px; margin: 0; }
.pf-follow a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pf-follow .btn { margin: 0; flex: none; width: auto; margin-left: auto; }
.pf-public h2 { margin-top: 26px; }
/* Społeczność: katalog, strona pracy i okno udostępniania */
.cm .pf-filter { margin-top: 10px; }
.cm-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.cm .card.cm-card { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 10px; min-width: 0; }
.cm-card a { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; }
.cm-view { display: block; position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #000; }
.cm-badge { position: absolute; top: 8px; left: 8px; padding: 2px 9px; border-radius: 999px; background: rgb(0 0 0 / 62%); color: #fff; font-size: 0.75rem; font-weight: 600; line-height: 1.5; }
.cm-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.cm-meta .cm-by { min-width: 0; font-size: 0.875rem; }
.cm-meta .cm-by > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-cat { flex: none; }
.cm-view video, .cm-view img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cm-title { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.cm-card p { margin: 0; }
.cm-card a.cm-by, .cm-by { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 28px; line-height: 1.2; vertical-align: middle; }
.cm-by > span { display: block; padding: 0; margin: 0; }
.cm p:has(> .cm-by:only-child) { display: flex; align-items: center; min-height: 28px; }
.cm-card a.cm-by, a.cm-by { color: inherit; text-decoration: underline; }
.cm-avatar { width: 28px; height: 28px; flex: none; display: block; border-radius: 50%; object-fit: cover; }
.cm-author { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cm-author h1 { margin: 0; overflow-wrap: anywhere; }
.cm h1 { overflow-wrap: anywhere; }
.cm-stage video, .cm-stage img { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 12px; background: #000; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cm-actions .btn { margin: 0; width: auto; text-decoration: none; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-license h2 { margin-top: 0; }
.cm-foot { margin-top: 32px; }
.cm-actions button.btn { cursor: pointer; }
.cm-made h2, .cm-pop h2 { margin: 0; }
.cm-made h3, .cm-pop h3 { margin: 16px 0 6px; font-size: 1rem; }
.cm-made dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 14px 0 0; }
.cm-made dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.cm-bar { display: block; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; }
.cm-made ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 6px 24px; }
.cm-made li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cm-made li span { flex: 1; overflow-wrap: anywhere; }
.cm-made li b { font-variant-numeric: tabular-nums; }
.cm-made summary { cursor: pointer; margin-top: 10px; }
.cm-dot { width: 10px; height: 10px; flex: none; }
.cm-c0 { fill: #2a78d6; } .cm-c1 { fill: #1baf7a; } .cm-c2 { fill: #eda100; } .cm-c3 { fill: #008300; } .cm-c4 { fill: #4a3aa7; } .cm-c5 { fill: #e34948; } .cm-c6 { fill: #8a8a86; }
@media (prefers-color-scheme: dark) { .cm-c0 { fill: #3987e5; } .cm-c1 { fill: #199e70; } .cm-c2 { fill: #c98500; } .cm-c4 { fill: #9085e9; } .cm-c5 { fill: #e66767; } }
.cm .card.cm-pop { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; margin: auto; color: var(--text); border: 1px solid var(--line); box-sizing: border-box; }
.cm-pop:not(:popover-open) { display: none; }
.cm .cm-pop::backdrop { background: rgb(0 0 0 / 60%); }
.cm-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cm-pop .btn { margin: 0; width: auto; }
.cm-pop p { margin: 0 0 8px; }
.cm-pop-link { display: flex; gap: 8px; }
.cm-pop-link input { flex: 1; min-width: 0; margin: 0; }
.cm-pop ul { list-style: none; padding: 0; margin: 0; }
.cm-pop li a { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.cm-pop li a b { flex: 1; }
.cm-share label { display: block; }
.cm-share label.pf-check { display: flex; margin-bottom: 10px; }
.cm-share label > input:not([type="checkbox"]), .cm-share label > select, .cm-share label > textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; font-weight: 400; }
.cm-share-author { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 4px; margin: 0 0 12px; min-width: 0; }
.cm-share-author-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 8px; }
.cm-share-author-links .btn { margin: 0; width: auto; }
.cm-share-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.cm-share-link a { flex: 1 1 100%; overflow-wrap: anywhere; }
.cm-share-link .btn { margin: 0; width: auto; }
.cm-share-mine ul { list-style: none; padding: 0; }
.cm-share-mine li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cm-share-mine li .btn { margin: 0; width: auto; }
.pf-public > .pf-filter { margin-top: 14px; }
.pf-follow li { flex-wrap: wrap; }
.pf-follow a { flex: 1 1 140px; }

/* Logowanie na osobnej stronie: przyklady za karta (site/src/auth/Backdrop.tsx), nigdy pusty ekran. */
.auth-back { position: fixed; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-content: start; gap: 10px; padding: 10px; overflow: hidden; pointer-events: none; }
.auth-back img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; opacity: .75; }
.auth-back ~ .wrap { position: relative; z-index: 1; }
/* Karta jest widoczna od pierwszej klatki: bez wejscia od przezroczystosci. */
.auth-back ~ .wrap .authcard, .auth-back ~ .wrap .authcard *:not(.oa-dots) { animation: none; }
@media (max-width: 640px) { .auth-back { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; } }

@media (max-width: 480px) { nav.tabs button { padding-inline: 9px; } .sw-menu .seg button, .fseg button { padding-inline: 11px; } }
.sw-menu { min-width: 0; }

/* Galeria: „Zaznacz więcej” */
.job.picking { position: relative; }
.job.picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.jobpick { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: flex-start; padding: 10px; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.gtoolbar .pickmode[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.jobpick span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--accent); background: var(--surface); color: transparent; font-size: 18px; font-weight: 700; line-height: 1; }
.jobpick[aria-pressed="true"] span { background: var(--accent); color: var(--surface); }
.jobpick:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.selbar { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); z-index: 20; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.selbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.selbar-row .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.selbar-row svg { flex: none; }
/* Pasek zaznaczania: same ikony z dymkami (title) na każdej szerokości; opisy zostają dla czytników ekranu. */
.selbar-row .btn { justify-content: center; padding: 8px 12px; }
.selbar-row .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.selbar-row .menu > summary.btn::after { display: none; }
.selbar-gap { flex: 1; }
.selbar p { margin: 8px 0 0; }
.selbar .menu .menubox { top: auto; bottom: calc(100% + 6px); max-height: 50vh; overflow: auto; }
@media (max-width: 640px) {
  /* Telefon: licznik w pierwszej linii, pod nim jeden równy rząd ikon z podpowiedziami. */
  .selbar-row { position: relative; flex-wrap: nowrap; gap: 6px; padding-top: 28px; }
  .selbar-row strong { position: absolute; top: 0; left: 2px; white-space: nowrap; }
  .selbar-gap { display: none; }
  .selbar-row > .btn, .selbar-row > .menu { flex: 1 1 0; min-width: 0; }
  .selbar-row > .menu > summary.btn { width: 100%; }
  .selbar-row .btn { justify-content: center; padding: 10px 0; }
  .selbar-row .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .selbar-row .menu > summary.btn::after { display: none; }
  .selbar .menu { position: static; }
  .selbar .menu .menubox { left: 0; right: 0; }
}

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; margin: 0; flex: none; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--accent); cursor: pointer; }
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.danger { color: var(--danger, #e66767); }
.icon-btn:disabled { opacity: .5; cursor: default; }
/* Zakladka Obrazy: duze okno tworzenia grafik z paskiem na dole (na telefonie okienka to arkusze od dolu). */
.imgx { display: flex; flex-direction: column; min-height: calc(100vh - 210px); min-height: calc(100dvh - 210px); }
.imgx-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.imgx-stage { flex: 1; }
.imgx-empty { max-width: 960px; margin: 0 auto; padding: clamp(24px, 6vh, 72px) 0 24px; text-align: center; }
.imgx-empty h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); letter-spacing: -.03em; margin: 0 0 8px; }
.imgx-ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 24px; text-align: left; }
.imgx-ideas button { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.imgx-ideas button:hover { border-color: var(--accent); }
.imgx-ideas span { color: var(--muted); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.imgx-feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.imgx-feed li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.imgx-pic { aspect-ratio: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
.imgx-pic > button { border: 0; background: none; padding: 0; width: 100%; height: 100%; min-height: 0; cursor: zoom-in; }
.imgx-pic img { width: 100%; height: 100%; min-height: 0; object-fit: contain; display: block; }
.imgx-pic img.tall { object-fit: cover; object-position: 50% 20%; }
.imgx-pic > .ph { width: 100%; padding: 16px; text-align: center; }
.imgx-prompt { margin: 10px 12px 0; font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.imgx-note { margin: 4px 12px 0; font-size: .8rem; color: var(--muted); }
.imgx-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; margin-top: auto; }
.imgx-actions .btn { margin: 0; min-height: 0; padding: 6px 10px; font-size: .84rem; }
.imgx-more { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 18px 0 6px; }

.imgx-dock { position: sticky; bottom: 0; z-index: 30; padding: 14px 0 12px; }
.imgx-bar { max-width: 1160px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 14px 16px; box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 10px; }
.imgx-bar:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.imgx-bar > textarea { border: 0; background: transparent; padding: 4px 2px; resize: vertical; min-height: 52px; max-height: 40vh; font-size: 1.05rem; width: 100%; box-shadow: none; }
.imgx-bar > textarea:focus-visible { box-shadow: none; }
.imgx-bar p { margin: 0; }
.imgx-ownstyle { width: 100%; }
.imgx-foot { display: flex; align-items: flex-end; gap: 12px; }
.imgx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.imgx-slot { position: relative; flex: none; }
.imgx-chip, .imgx-count { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, var(--surface)); color: var(--text); font: inherit; font-size: .92rem; }
.imgx-chip { padding: 6px 13px; cursor: pointer; white-space: nowrap; }
.imgx-chip > span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.imgx-chip:hover, .imgx-chip[aria-expanded="true"] { border-color: var(--accent); }
.imgx-chip.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.imgx-count { padding: 0 4px; gap: 2px; }
.imgx-count button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 32px; min-height: 34px; border-radius: 8px; }
.imgx-count button:disabled { opacity: .35; cursor: default; }
.imgx-count .imgx-n { display: inline-flex; align-items: center; gap: 5px; padding: 0 4px; }
.imgx-n i { font-style: normal; font-size: .72rem; width: 16px; height: 16px; border: 1px solid var(--muted); color: var(--muted); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.imgx-go.btn { flex: none; min-height: 56px; min-width: 170px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; margin: 0; font-size: 1.05rem; }
.imgx-go small { font-weight: 500; font-size: .82rem; opacity: .9; }

.imgx-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.imgx-thumbs button { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 0; width: 60px; height: 60px; overflow: hidden; background: none; cursor: pointer; }
.imgx-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgx-thumbs i { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-style: normal; font-size: .85rem; line-height: 18px; text-align: center; }

.imgx-backdrop { display: none; }
.imgx-pop { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 50; width: 320px; max-height: min(56vh, 520px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); text-align: left; }
.imgx-pop.wide { width: 420px; }
.imgx-pop.end { left: auto; right: 0; }
.imgx-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; }
.imgx-x { border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.imgx-pop-body { overflow: auto; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.imgx-pop-body p { margin: 0; }
.imgx-list { display: flex; flex-direction: column; gap: 6px; }
.imgx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.imgx-sub { font-weight: 700; font-size: .82rem; color: var(--muted); padding-top: 6px; }
.imgx-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, var(--surface)); color: var(--text); font: inherit; padding: 9px 11px; cursor: pointer; flex: none; }
.imgx-opt:hover:not(:disabled) { border-color: var(--line); }
.imgx-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.imgx-opt:disabled { opacity: .5; cursor: default; }
.imgx-opt-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.imgx-opt-text b { font-size: .92rem; }
.imgx-opt-text small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.imgx-opt-side { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.imgx-search, .imgx-text { width: 100%; }
.imgx-search { flex: none; }
.imgx-text { flex: none; }
.imgx-ai { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 0 4px; }
.imgx-ai b, .imgx-ai small { display: block; }
.imgx-ai small { color: var(--muted); }
.imgx-ratios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imgx-ratios button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: .82rem; padding: 10px 4px; cursor: pointer; }
.imgx-ratios button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.imgx-shape { flex: none; }
.imgx-assets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; flex: none; }
.imgx-assets button { border: 1px solid var(--line); border-radius: 10px; padding: 0; aspect-ratio: 1; overflow: hidden; background: none; cursor: pointer; }
.imgx-assets button:disabled { opacity: .45; cursor: default; }
.imgx-assets img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgx-pop .seg { flex: none; }
.imgx-pop .btn { flex: none; }

@media (max-width: 720px) {
  .imgx-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .imgx-actions { padding: 8px; gap: 4px; }
  .imgx-prompt, .imgx-note { margin-left: 8px; margin-right: 8px; }
  .imgx-ideas { grid-template-columns: 1fr; }
  .imgx-dock { margin: 0 -8px; padding: 10px 0 max(8px, env(safe-area-inset-bottom)); }
  .imgx-bar { border-radius: 20px; padding: 10px 12px; }
  .imgx-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .imgx-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .imgx-go.btn { min-height: 48px; flex-direction: row; gap: 8px; width: 100%; }
  .imgx-slot { position: static; }
  .imgx-count { flex: none; }
  .imgx-backdrop { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, .45); }
  .imgx-pop, .imgx-pop.wide, .imgx-pop.end { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 78vh; max-height: 78dvh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .imgx-two { grid-template-columns: 1fr; }
  /* telefon: w wyborze proporcji same ksztalty (opis zostaje dla czytnikow w etykiecie przycisku) */
  .imgx-ratios { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .imgx-ratios span { display: none; }
  .imgx-ratios button { padding: 12px 4px; }
}

.imgx-pic .audio { padding: 0 18px; text-align: center; }
/* Tryb goscia: naglowek edytora i plansza „Załóż konto”. */
.guest-top .guest-brand { margin-right: auto; color: inherit; text-decoration: none; }
.guest-top .guest-link { color: var(--muted); }
/* Szkice projektow nad edytorem */
.drafts { margin: 0 0 14px; }
.drafts-head { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.drafts-wait { margin: 0 0 6px; }
.drafts ul { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; }
.drafts li { display: flex; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.drafts-open { display: grid; gap: 2px; text-align: left; background: none; border: 0; color: inherit; padding: 8px 10px; max-width: 240px; cursor: pointer; font: inherit; }
.drafts-open span { font-size: 12px; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drafts-del { background: none; border: 0; border-left: 1px solid var(--line); color: inherit; min-width: 36px; cursor: pointer; font-size: 18px; }

.gate { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; padding: 16px; background: transparent; color: var(--text); }
.gate[open] { display: grid; place-items: center; }
.gate::backdrop { background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.gate-x { position: fixed; top: 14px; right: 14px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.gate-body { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 520px; padding: 28px 20px; border-radius: 20px; text-align: center; }
.gate-body img { border-radius: 14px; }
.gate-body h2 { margin: 6px 0 0; font-size: clamp(1.4rem, 4.5vw, 2.1rem); text-wrap: balance; }
.gate-body p { margin: 0; color: var(--muted); }
.gate-body .gate-free { color: var(--text); font-weight: 600; }
.gate-go { min-width: 220px; margin-top: 8px; }
.gate-auth { width: 100%; max-width: 420px; margin: 40px 0; padding: 24px 22px 14px; }
.gate-auth.authcard-c { transform: none; }
.gate-auth.authcard-c > * { animation: none; }
.gate-auth.authcard-c .brand { gap: 0; font-size: 2rem; margin: 0 0 6px; }
.gate-auth.authcard-c .brand-icon { width: 44px; height: 44px; margin-right: 12px; }
.gate-auth .err:empty { margin: 0; }
/* Okno logowania: edytor za nim ma zostac widoczny. */
/* Formularz i karty sa widoczne od pierwszej klatki, bez wejscia od przezroczystosci. */
.gate-login .gate-auth, .gate-login .gate-auth * { animation: none; }
html.embed .gate-auth { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding-top: 52px; animation: none; }
html.embed .gate-auth > * { animation: none; }
.gate.gate-login::backdrop { background: color-mix(in srgb, var(--surface) 35%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
/* Gorny pasek w panelu (ten sam co na stronach publicznych) i zakladka Narzedzia. */
.topbar { position: sticky; top: 0; z-index: 20; }
.topbar .lp-nav { position: static; }
.topbar-wait { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(16px, 3vw, 56px); border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-account { display: flex; align-items: center; gap: 10px; position: relative; }
@media (max-width: 560px) {
  .topbar-account { gap: 6px; }
  .topbar-account { min-width: 0; }
  .topbar-account .kr-pill { padding: 5px 9px 5px 10px; font-size: .82rem; }
  .topbar .lp-nav .nv-actions { min-width: 0; }
}

.cr h1 { margin: 20px 0 6px; }
.cr-back { margin-top: 14px; padding-left: 0; }
.cr-back + h1 { margin-top: 6px; }
.cr-lead { margin: 0 0 18px; max-width: 70ch; color: var(--muted); }
.cr-tabs { margin-bottom: 18px; }
.cr-cards { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cr-cards button { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; font: inherit; }
.cr-cards button:hover, .cr-cards button:focus-visible { border-color: var(--accent); }
.cr-cards span, .cr-cards small { color: var(--muted); font-size: .9rem; }
.cr-people img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }

.cr-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cr-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cr-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.cr-side > label:not(.cr-consent), .cr-text { display: flex; flex-direction: column; gap: 6px; }
.cr-results { grid-column: 1 / -1; }
.cr-slot, .cr-opt { border: 0; margin: 0; padding: 0; min-width: 0; }
.cr-slot legend, .cr-opt legend { font-weight: 600; padding: 0 0 8px; }
.cr-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.cr-photo { position: relative; }
.cr-photo img { width: 132px; height: 132px; object-fit: cover; border-radius: 16px; display: block; }
.cr-photo button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.cr-add { position: relative; min-width: 132px; min-height: 132px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--line); border-radius: 16px; cursor: pointer; color: var(--muted); background: var(--surface); }
.cr-add:hover, .cr-add:focus-within { border-color: var(--accent); color: var(--text); }
.cr-add b { font-size: 1.6rem; }
.cr-add input, .cv-bar label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chips button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; cursor: pointer; }
.cr-chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.cr-shuffle { display: flex; gap: 10px; flex-wrap: wrap; }
.cr-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.cr-consent input { width: auto; flex: none; margin-top: 4px; }
.cr-go { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; }
.cr-guide ul { margin: 6px 0 12px; padding: 0; list-style: none; font-size: .9rem; }
.cr-guide li::before { content: "✓ "; color: #2e9e5b; font-weight: 700; }
.cr-guide .cr-no li::before { content: "✕ "; color: #d4483b; }

.cv-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; align-items: center; }
.cv-bar label { position: relative; cursor: pointer; }
.cv-zoom { display: inline-flex; gap: 4px; }
.cv-board { position: relative; height: 68vh; min-height: 420px; overflow: hidden; touch-action: none; cursor: grab; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(var(--line) 1.2px, transparent 1.2px) 0 0 / 22px 22px, var(--surface); }
.cv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-item { position: absolute; background: var(--bg); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; cursor: default; box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .45); }
.cv-on { border-color: var(--accent); }
.cv-grip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 8px; cursor: move; touch-action: none; font-size: .8rem; }
.cv-grip label { display: inline-flex; align-items: center; gap: 5px; margin: 0; cursor: pointer; }
.cv-grip input { width: auto; }
.cv-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.cv-tools button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font-size: 1rem; }
.cv-tools button:hover { background: var(--accent-soft); }
.cv-item img { display: block; width: 100%; cursor: move; touch-action: none; }
.cv-item textarea { width: 100%; border: 0; border-radius: 0; resize: vertical; background: var(--accent-soft); }
.cv-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; margin: 0; pointer-events: none; }
.cv-gallery { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.cv-gallery button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.cv-gallery img { display: block; width: 110px; height: 110px; object-fit: cover; }

/* Wspolne dla okien narzedzi */
.tw-card { width: min(380px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.tw-card h1 { margin: 4px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.tw-card .cr-slot legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tw-card .cr-add { min-width: 240px; min-height: 90px; }
.tw-h { margin: 34px 0 14px; text-align: center; }
.tw-tabs { display: flex; justify-content: center; margin: 4px auto 14px; max-width: 320px; }
.tw-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.tw-split .tw-panel { position: static; padding: 24px; gap: 14px; }
.tw-panel h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; text-transform: uppercase; }
.tw-preview { display: flex; align-items: center; justify-content: center; min-height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.tw-preview img { width: 100%; height: 100%; max-height: 640px; object-fit: contain; }
.tw-steps { list-style: none; counter-reset: tw; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tw-steps li { counter-increment: tw; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.tw-steps li::before { content: counter(tw); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.tw-steps span { color: var(--muted); font-size: .92rem; }

/* Relight */
.rl { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rl-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 560px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 22px 22px; }
.rl-note { width: min(520px, 100%); }
.rl-view { position: relative; margin: 0; max-width: 100%; border-radius: 18px; overflow: hidden; isolation: isolate; }
.rl-view img { display: block; max-width: 100%; width: auto; height: auto; max-height: 60vh; }
.rl-light { position: absolute; inset: 0; mix-blend-mode: soft-light; pointer-events: none; }
.rl-light.rl-back { mix-blend-mode: screen; transform: scale(1.35); }
.rl-side { position: static; }
.rl-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rl-quick button { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.rl-quick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.rl-pad { position: relative; height: 220px; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(var(--line) 1.2px, transparent 1.2px) 0 0 / 18px 18px, var(--bg); cursor: grab; touch-action: none; user-select: none; }
.rl-pad span { position: absolute; left: 12px; right: 12px; bottom: 8px; text-align: center; pointer-events: none; }
.rl-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: 0 0 26px 6px color-mix(in srgb, var(--accent) 55%, transparent); pointer-events: none; }
.rl-dot.rl-back { border-style: dashed; width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.rl-seg { display: flex; }
.rl-seg button { flex: 1; }
.rl-range { display: flex; flex-direction: column; gap: 6px; }
.rl-range span { display: flex; justify-content: space-between; }
.rl-range input { width: 100%; padding: 0; accent-color: var(--accent); }
.rl-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rl-colors button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.rl-colors button[aria-pressed="true"] { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.rl-colors input[type="color"] { width: 44px; height: 32px; padding: 2px; border-radius: 8px; cursor: pointer; }
.rl .cr-results { grid-column: 1 / -1; }

/* Face swap */
.fs-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fs-slots .cr-add { width: 100%; min-height: 190px; }
.fs-slots .cr-photos, .fs-slots .cr-photo { width: 100%; }
.fs-slots .cr-photo img { width: 100%; height: 190px; object-fit: contain; }
.fs-video { padding: 16px; border: 1px dashed var(--line); border-radius: 16px; }
.fs-video p { margin: 8px 0 0; }

/* Manga */
.mg-hero { text-align: center; padding: 28px 12px 12px; }
.mg-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 4rem); font-style: italic; font-weight: 900; text-transform: uppercase; background: linear-gradient(100deg, #8b74ff, #e255c5 55%, #ff9a45); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-hero p { max-width: 62ch; margin: 0 auto; }
.mg-box { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.mg-box textarea { width: 100%; border: 0; background: transparent; resize: vertical; }
.mg-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-bar .btn[aria-expanded="true"] { border-color: var(--accent); }
.mg-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 10px; }
.mg-styles button { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.mg-styles button[aria-pressed="true"] { border-color: var(--accent); }
.mg-art { display: grid; grid-template: 1.4fr 1fr / 1fr 1fr; gap: 3px; aspect-ratio: 3 / 4; padding: 3px; border-radius: 8px; background: #fff; }
.mg-art i { background: linear-gradient(135deg, var(--m1), var(--m2)); border: 1.5px solid #17141f; }
.mg-art i:first-child { grid-column: 1 / -1; }
.mg-manga { --m1: #f2f2f2; --m2: #4b4b52; }
.mg-color { --m1: #ffb45c; --m2: #3b2f7d; }
.mg-webtoon { --m1: #a9d8ff; --m2: #e58ac4; }
.mg-comic { --m1: #ffd23f; --m2: #d6334a; }
.mg-ligne { --m1: #fdf1d0; --m2: #3d9a8b; }
.mg-art.mg-webtoon { grid-template: repeat(3, 1fr) / 1fr; }
.mg-settings { display: flex; flex-direction: column; gap: 12px; }
.mg-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mg-models label { display: flex; flex-direction: column; gap: 6px; }
.mg-form .cr-results { margin-top: 18px; }
.mg-templates { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mg-cover { width: 100%; height: 100%; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px; padding: 14px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, transparent 20%, rgba(10, 8, 18, .88) 75%), radial-gradient(circle at 70% 22%, var(--m1), var(--m2) 70%); color: #fff; font: inherit; cursor: pointer; }
.mg-cover small { align-self: flex-start; margin-bottom: auto; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); }
.mg-cover b { font-size: 1.15rem; line-height: 1.2; text-transform: uppercase; }
.mg-cover span { font-size: .82rem; opacity: .85; }
.mg-cover:hover, .mg-cover:focus-visible { border-color: var(--accent); }

/* Moodboard */
.mb-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 12px 0; }
.mb-hero h1 { margin: 6px 0 0; font-size: clamp(1.8rem, 5vw, 3.2rem); text-transform: uppercase; }
.mb-hero p { max-width: 62ch; margin: 0 0 6px; }
.mb-collage { display: flex; justify-content: center; }
.mb-collage img { width: clamp(72px, 14vw, 150px); height: clamp(72px, 14vw, 150px); object-fit: cover; border: 3px solid #fff; border-radius: 16px; margin-left: -12px; transform: rotate(-6deg); }
.mb-collage img:nth-child(even) { transform: rotate(5deg); }
.mb-collage img:nth-child(3) { border-radius: 50%; }
.mb-looks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mb-look { width: 100%; min-height: 170px; display: flex; align-items: flex-end; padding: 14px; border: 2px solid transparent; border-radius: 18px; color: #fff; font: inherit; text-align: left; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); cursor: pointer; }
.mb-look[aria-pressed="true"] { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.mb-warm { background: radial-gradient(circle at 70% 25%, #e8b27a, transparent 55%), linear-gradient(160deg, #6b4a2f, #241a14); }
.mb-y2k { background: radial-gradient(circle at 30% 30%, #ff8fd0, transparent 50%), linear-gradient(170deg, #52b7ff, #2b4fd8); }
.mb-summer { background: radial-gradient(circle at 75% 20%, #fff0b8, transparent 45%), linear-gradient(180deg, #7fc9d8, #d9a97c); }
.mb-theatre { background: radial-gradient(ellipse at 35% 30%, #7d9186, transparent 55%), linear-gradient(160deg, #27352f, #0c0f0e); }
.mb-street { background: linear-gradient(115deg, #3c3f45 0 45%, #ffcc22 45% 55%, #6d737c 55%); }
.mb-film { background: radial-gradient(circle at 60% 35%, #e9c9a0, transparent 55%), linear-gradient(150deg, #8a5a52, #3b3a4a); }
.mb-nordic { background: linear-gradient(180deg, #cfd8dc, #8d9ea4 55%, #5d5348); }
.mb-neon { background: radial-gradient(circle at 25% 70%, #ff2fa8, transparent 45%), radial-gradient(circle at 80% 30%, #22e0ff, transparent 45%), #12102a; }
.mb-form { scroll-margin-top: 96px; }

/* Edytuj obraz */
.eh { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.eh button { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 10px 16px; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; font: inherit; cursor: pointer; }
.eh button:hover, .eh button:focus-visible { border-color: var(--accent); }
.eh button > b, .eh button > span:not(.eh-art) { padding: 0 6px; }
.eh button > span:not(.eh-art) { color: var(--muted); font-size: .9rem; }
.eh-art { width: 100%; height: 110px; border-radius: 12px; background: linear-gradient(135deg, #5b3df5, #e255c5); }
.eh-relight .eh-art { background: radial-gradient(circle at 70% 20%, #ffe7b0, #b4543f 35%, #191226 75%); }
.eh-repaint .eh-art { background: linear-gradient(115deg, #2f7d5a 0 52%, #c8455d 52%); }
.eh-erase .eh-art { background: radial-gradient(circle at 62% 50%, transparent 0 22px, #5b3df5 23px 25px, transparent 26px), linear-gradient(135deg, #34435e, #6d85a8); }
.eh-remove-bg .eh-art { background: radial-gradient(circle at 50% 60%, #e255c5 0 34px, transparent 35px), conic-gradient(#8884 90deg, transparent 0 180deg, #8884 0 270deg, transparent 0) 0 0 / 22px 22px; }
.eh-replace-bg .eh-art { background: radial-gradient(circle at 50% 62%, #fff 0 30px, transparent 31px), linear-gradient(90deg, #1f8fae 0 50%, #f08a3c 50%); }
.eh-outpaint .eh-art { background: linear-gradient(#6c4bf6, #6c4bf6) center / 46% 62% no-repeat, repeating-linear-gradient(45deg, #6c4bf633 0 8px, transparent 8px 16px); }
.eh-upscale .eh-art { background: linear-gradient(90deg, transparent calc(50% - 1px), #fff 0 calc(50% + 1px), transparent 0), repeating-conic-gradient(#7a5cff 0 90deg, #4a37a8 0 180deg) 0 0 / 28px 28px; }
.eh-faceswap .eh-art { background: radial-gradient(circle at 33% 52%, #ffd7c2 0 28px, transparent 29px), radial-gradient(circle at 67% 52%, #c98f6a 0 28px, transparent 29px), linear-gradient(135deg, #2a2342, #5a2a56); }
.eh-vectorize .eh-art { background: conic-gradient(from 45deg at 50% 50%, #22c3a6, #5b3df5, #e255c5, #22c3a6); }

.ex { margin: 8px 0; width: 100%; text-align: center; }
.ex-row { display: flex; justify-content: center; align-items: flex-start; gap: 10px; }
.ex-shot { flex: 1 1 0; min-width: 0; max-width: 300px; display: flex; flex-direction: column; gap: 6px; }
.ex-shot img { width: 100%; height: auto; border-radius: 12px; }
.ex figcaption { margin-top: 8px; }
.ex-clip video { max-width: 100%; max-height: 480px; border-radius: 14px; }
img.eh-art { display: block; object-fit: cover; background: #e9e6f5; }
.eh-relight img.eh-art, .eh-repaint img.eh-art { object-position: 50% 28%; }
.eh-remove-bg img.eh-art, .eh-vectorize img.eh-art { object-fit: contain; }
.eh-vectorize img.eh-art { background: #fff; }

@media (max-width: 860px) {
  .tw-split, .rl { grid-template-columns: minmax(0, 1fr); }
  .rl-stage { min-height: 0; }
  .tw-preview { min-height: 240px; }
  .mb-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb-look { min-height: 112px; }
  .eh { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-form { grid-template-columns: minmax(0, 1fr); }
  .cr-side { position: static; }
}

/* Okno narzedzia (zakladka Studio): scena na srodku, ustawienia po prawej */
.sw { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px 24px; align-items: start; }
.sw [hidden] { display: none; }
.sw-menu { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sw-menu .seg { justify-content: center; max-width: 100%; margin: 0; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); }
.sw-menu .seg button { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; }
.sw-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 600px; min-width: 0; padding: clamp(16px, 3vw, 32px); border: 1px dashed var(--line); border-radius: 24px; background: radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 22px 22px; }
.sw-stage > .err:empty { display: none; }
.sw-stage > .field { width: min(640px, 100%); margin: 0; }
.sw-stage > .field textarea { min-height: 120px; }
.sw-head { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 640px; text-align: center; }
.sw-head h1, .sw-head h2 { margin: 6px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; letter-spacing: .04em; }
.sw-head p { margin: 0; }
.sw-head .ex { max-width: 520px; }
.sw-icon { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--pink))); font-size: 3rem; }
.sw-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }
.sw-slots .dropzone { flex: 1 1 280px; max-width: 520px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; border-radius: 20px; background: var(--surface); text-align: center; }
.sw-slots .dropzone label { margin: 0; font-weight: 700; }
.sw-slots .dropzone .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sw-slots .slot-pick { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; padding-inline: 22px; }
.sw-slots .dropzone p { margin: 0; }
.sw-slots .dropzone p:empty { display: none; }
.sw-slots .fprev { margin: 0; max-width: 100%; }
.sw-slots .fprev img, .sw-slots .fprev video { max-height: 52vh; margin: 0 auto; border-radius: 14px; }
.sw-slots .libpick { width: 100%; }
.sw-masking .sw-slots .fprev { display: none; }
.sw-masking > .field { text-align: center; }
.sw-masking > .field canvas { margin-inline: auto; }
.sw-legal { max-width: 640px; margin: 0; text-align: center; }
.sw-side .row { margin: 0; }
.sw-side .field, .sw-side .price { margin: 0; }
.sw-photos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; }
.sw-photos .cr-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; text-align: center; }
.sw-photos .cr-photos { justify-content: center; }
.sw-photos .cr-add { min-width: 240px; min-height: 90px; }
.sw-fields { display: flex; flex-direction: column; gap: 14px; width: min(720px, 100%); }
.sw-stage.sw-top { justify-content: flex-start; }
.sw-stage.sw-solo .cr-cards { width: min(720px, 100%); margin: 0; }
@media (max-width: 900px) {
  .sw { grid-template-columns: minmax(0, 1fr); }
  .sw-stage { min-height: 0; }
}

/* Okna wideo: lista narzedzi, efekty, Studio filmowe, ciag dalszy i kroki „jak zaczac”. */
.steps3 { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; padding: 0; width: 100%; max-width: 820px; text-align: center; }
.steps3 li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.steps3 i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--text); color: var(--surface); font-style: normal; font-weight: 800; }
.steps3 span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.steps3-art img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; width: 100%; margin-bottom: 16px; }
.fx-card { --fx1: #4b3fb5; --fx2: #b254f0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px; min-height: 108px; padding: 12px; border: 2px solid transparent; border-radius: 16px; background: linear-gradient(150deg, var(--fx1), var(--fx2)); color: #fff; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.fx-card i { font-style: normal; font-size: 1.7rem; line-height: 1; margin-bottom: auto; }
.fx-card:hover, .fx-card:focus-visible { border-color: var(--text); }
.fx-card[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx2) 60%, transparent); }
.fx-alive, .fx-cartoon { --fx1: #14634f; --fx2: #2f9e6e; }
.fx-push, .fx-golden { --fx1: #8a3b12; --fx2: #c76a1b; }
.fx-orbit, .fx-cyber { --fx1: #0f4c81; --fx2: #1f87b8; }
.fx-freeze, .fx-winter, .fx-snow { --fx1: #2b5876; --fx2: #4e7fa8; }
.fx-drone, .fx-high { --fx1: #1e3c72; --fx2: #2a5298; }
.fx-storm, .fx-rain, .fx-dusk { --fx1: #232a4d; --fx2: #4a4e8c; }
.fx-confetti, .fx-neon { --fx1: #8e1760; --fx2: #7b2ff7; }
.fx-dust, .fx-retro { --fx1: #5c3b1e; --fx2: #9a6b3f; }
.vh { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; }
.vh button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.vh button:hover, .vh button:focus-visible { border-color: var(--text); }
.vh i { display: grid; place-items: center; width: 100%; height: 92px; margin-bottom: 6px; border-radius: 12px; background: linear-gradient(135deg, #4b3fb5, #b254f0); color: #fff; font-style: normal; font-size: 2rem; }
.vh span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.rs section { margin-bottom: 8px; }
.rs .ex { margin: 0 0 18px; }
.rs .ex-clip video { max-height: 240px; }
.cn { display: flex; flex-direction: column; gap: 18px; }
.cn-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cn-hero h1 { margin-bottom: 4px; }
.cn-reel { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; width: 100%; max-width: 640px; }
.cn-reel video { width: 100%; max-height: 180px; object-fit: cover; }
.cn-reel figure { margin: 0; }
.cn-bar { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.cn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cn-chip { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; }
.cn-chip span { font-size: .72rem; color: var(--muted); }
.cn-chip select { padding: 0; border: 0; background: transparent; color: var(--text); font-weight: 700; min-width: 112px; }
.cn-chip select option { background: var(--surface); }
.cn-text textarea { width: 100%; }
.cn-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px); gap: 16px; align-items: end; }
.cn-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.cn-go { display: flex; flex-direction: column; gap: 6px; }
.vid-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; width: 100%; text-align: left; }
.sw-stage > .cr-results { width: 100%; }
.xt-frame { margin: 0 0 12px; text-align: center; }
.xt-frame img { max-width: 100%; max-height: 360px; border-radius: 14px; }
.xt-pick { cursor: pointer; margin-bottom: 14px; }
.xt-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.xt-join { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 10px; cursor: pointer; }
.sw-text { width: 100%; max-width: 720px; }
.sw-text textarea { width: 100%; }
@media (max-width: 900px) {
  .steps3 { grid-template-columns: 1fr; }
  .cn-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cn-reel figure + figure { display: none; }
  .cn-reel video, .rs .ex-clip video { max-height: 160px; }
}

/* Tablica z wezlami */
.fl h1 { margin: 6px 0; }
.fl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.fl-bar select, .fl-bar input[type="text"] { width: auto; max-width: 100%; min-width: 0; flex: 0 1 230px; margin: 0; }
.fl-board { overflow: auto; height: min(72vh, 760px); min-height: 420px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.fl-space { position: relative; background-image: radial-gradient(var(--line) 1px, transparent 1.5px); background-size: 22px 22px; }
.fl-space > svg { position: absolute; inset: 0; pointer-events: none; }
.fl-space path { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.fl-node { position: absolute; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 18px #0002; }
.fl-node.bad { border-color: var(--bad); }
.fl-node.is-running { border-color: var(--accent); border-width: 2px; }
.fl-node.is-succeeded { border-color: var(--ok); }
.fl-node.is-failed { border-color: var(--bad); }
.fl-node > header { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.fl-node > header b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.fl-status { font-size: .75rem; color: var(--muted); }
.fl-x, .fl-unlink { background: none; border: 0; color: var(--muted); font: inherit; font-size: 1.1rem; line-height: 1; padding: 4px 8px; cursor: pointer; }
.fl-ports { position: relative; }
.fl-in { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding-left: 14px; font-size: .8rem; color: var(--muted); }
.fl-in > span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-out { position: absolute; right: 0; top: 0; display: flex; align-items: center; font-size: .8rem; color: var(--muted); }
.fl-out > span { padding-right: 14px; }
.fl-node .fl-dot { position: absolute; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 3px solid var(--accent); background: var(--bg); cursor: crosshair; touch-action: none; }
.fl-in .fl-dot { left: -10px; }
.fl-out .fl-dot { right: -10px; }
.fl-node .fl-dot.on { background: var(--accent); }
.fl-node .fl-dot.ready { box-shadow: 0 0 0 6px var(--accent-soft); background: var(--accent); }
.fl-body { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; }
.fl-body select, .fl-body textarea, .fl-body input[type="text"], .fl-body input[type="number"] { width: 100%; margin: 0; font-size: .86rem; }
.fl-body textarea { resize: vertical; max-height: 160px; }
.fl-body img, .fl-body video { width: 100%; max-height: 150px; object-fit: contain; border-radius: 10px; background: #0001; display: block; }
.fl-body audio { width: 100%; }
.fl-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.fl-set:empty { display: none; }
.fl-opt { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; margin: 0; }
.fl-file { position: relative; display: block; margin: 0; padding: 10px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; cursor: pointer; font-size: .86rem; }
.fl-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fl-file:focus-within { border-color: var(--accent); }
.fl-result { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.fl-problem { margin: 0; color: var(--bad); font-size: .8rem; }
.fl-price { margin: 0; text-align: right; font-weight: 600; font-size: .86rem; }
.fl-empty { position: sticky; left: 0; width: min(100%, 640px); padding: 48px 24px; display: flex; flex-direction: column; gap: 14px; }
.fl-empty p { margin: 0; color: var(--muted); }
.fl-empty div { display: flex; flex-wrap: wrap; gap: 10px; }
.fl-run { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 14px 0; }
.fl-run p { margin: 0; }
.fl-history ul { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fl-history li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
@media (max-width: 640px) {
  .fl-board { height: 68vh; }
  .fl-empty { width: min(100%, 340px); }
}

.vh i.vh-art-wrap { position: relative; }
.vh i { position: relative; overflow: hidden; }
.vh-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vh-draw { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vh-bar { fill: #fff; opacity: .9; transform-box: fill-box; transform-origin: center; animation: vh-bar 1.3s ease-in-out infinite; }
.vh-wire { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 5 6; fill: none; animation: vh-dash 1s linear infinite; }
.vh-node { fill: rgba(255,255,255,.16); stroke: #fff; stroke-width: 2.5; animation: vh-pulse 2.4s ease-in-out infinite; }
.vh-node.n2 { animation-delay: .5s; }
.vh-node.n3 { animation-delay: 1s; }
.vh-sun { fill: #fff; transform-box: fill-box; transform-origin: center; animation: vh-glow 2.2s ease-in-out infinite; }
.vh-rays { stroke: #fff; stroke-width: 3; stroke-linecap: round; fill: none; transform-box: fill-box; transform-origin: center; animation: vh-glow 2.2s ease-in-out infinite; }
.vh-cap { fill: #fff; transform-box: fill-box; transform-origin: left center; animation: vh-type 3s ease-in-out infinite; }
.vh-cap.c2 { animation-delay: .6s; }
.vh-star { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; animation: vh-star 2.6s ease-in-out infinite; }
.vh-check { fill: rgba(255,255,255,.14); }
.vh-person { fill: #fff; opacity: .92; animation: vh-bob 2.4s ease-in-out infinite; }
@keyframes vh-bar { 0%, 100% { transform: scaleY(.22); } 50% { transform: scaleY(1); } }
@keyframes vh-dash { to { stroke-dashoffset: -11; } }
@keyframes vh-pulse { 0%, 100% { fill: rgba(255,255,255,.12); } 50% { fill: rgba(255,255,255,.4); } }
@keyframes vh-glow { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes vh-type { 0% { transform: scaleX(0); } 40%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes vh-star { 0%, 100% { fill: rgba(255,255,255,0); } 40%, 80% { fill: #fff; } }
@keyframes vh-bob { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .vh-bar, .vh-wire, .vh-node, .vh-sun, .vh-rays, .vh-cap, .vh-star, .vh-person { animation: none; } .vh-bar { transform: scaleY(.6); } .vh-cap { transform: none; } .vh-star { fill: #fff; } }
.eh-art { position: relative; overflow: hidden; display: block; }
.vh-cube { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: vh-spin 5s ease-in-out infinite; }
.vh-layer { fill: rgba(255,255,255,.16); stroke: #fff; stroke-width: 2.4; animation: vh-layer 3s ease-in-out infinite; }
.vh-layer.l2 { animation-delay: .25s; }
.vh-layer.l3 { animation-delay: .5s; }
.vh-note { fill: rgba(255,255,255,.18); stroke: #fff; stroke-width: 2.4; animation: vh-bob 3s ease-in-out infinite; }
.vh-note.n2 { animation-delay: .6s; }
.vh-note.n3 { animation-delay: 1.2s; }
@keyframes vh-spin { 0%, 100% { transform: rotate(-8deg) scale(.96); } 50% { transform: rotate(8deg) scale(1.04); } }
@keyframes vh-layer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
img.eh-art.eh-photo { object-fit: cover; }
.cr-cards .cr-art { position: relative; display: block; width: 100%; height: 110px; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #4b3fb5, #b254f0); }
.cr-cards .cr-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .vh-cube, .vh-layer, .vh-note { animation: none; } }

/* hub art: pełny kadr 16:9 jak w YouTube, bez ucinania */
.vh i, .eh-art, .cr-cards .cr-art { height: auto; aspect-ratio: 16 / 9; }
.vh i { width: 100%; }
.hub-wide { position: absolute; inset: 0; display: block; overflow: hidden; background: #1a1530; }
.hub-wide img { position: absolute; display: block; }
.hub-wide-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.7); transform: scale(1.2); }
.hub-wide-fg { inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* zdjęcie w całości (przebija ogólne "cover" kart) */
.cr-cards .cr-art .hub-wide-fg, .eh-art .hub-wide-fg, .vh i .hub-wide-fg { object-fit: contain; }
.cr-cards .cr-art .hub-wide-bg, .eh-art .hub-wide-bg { object-fit: cover; }

/* okładki: neonowy blask w kolorze kafelka, pulsujący; mocniejszy po najechaniu */
.cr-cards > li, .eh > li, .vh > li { --h: 265; }
.cr-cards > li:nth-child(7n+2), .eh > li:nth-child(7n+2), .vh > li:nth-child(7n+2) { --h: 190; }
.cr-cards > li:nth-child(7n+3), .eh > li:nth-child(7n+3), .vh > li:nth-child(7n+3) { --h: 320; }
.cr-cards > li:nth-child(7n+4), .eh > li:nth-child(7n+4), .vh > li:nth-child(7n+4) { --h: 35; }
.cr-cards > li:nth-child(7n+5), .eh > li:nth-child(7n+5), .vh > li:nth-child(7n+5) { --h: 150; }
.cr-cards > li:nth-child(7n+6), .eh > li:nth-child(7n+6), .vh > li:nth-child(7n+6) { --h: 215; }
.cr-cards > li:nth-child(7n+7), .eh > li:nth-child(7n+7), .vh > li:nth-child(7n+7) { --h: 350; }
.cr-cards .cr-art, .eh-art, .vh i {
  overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1px hsl(var(--h) 95% 70% / .75), 0 0 18px 1px hsl(var(--h) 95% 62% / .45), 0 8px 26px -10px hsl(var(--h) 95% 55% / .6);
  animation: cv-neon 3.4s ease-in-out infinite;
}
.cr-cards .cr-art::after, .eh-art::after, .vh i::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg, transparent 38%, hsl(var(--h) 100% 90% / .38) 50%, transparent 62%) -140% 0 / 250% 100% no-repeat,
    radial-gradient(120% 90% at 50% 120%, hsl(var(--h) 95% 60% / .35), transparent 60%);
  animation: cv-sweep 5.5s ease-in-out infinite;
}
.vh-draw { filter: drop-shadow(0 0 5px hsl(0 0% 100% / .9)) drop-shadow(0 0 12px hsl(var(--h) 100% 70% / .9)); }
.cr-cards li:hover .cr-art, .eh li:hover .eh-art, .vh li:hover i { box-shadow: 0 0 0 2px hsl(var(--h) 100% 78%), 0 0 30px 4px hsl(var(--h) 100% 65% / .7), 0 10px 30px -8px hsl(var(--h) 100% 55%); }
@keyframes cv-neon { 0%, 100% { filter: saturate(1); } 50% { filter: saturate(1.25) brightness(1.06); } }
@keyframes cv-sweep { 0%, 55% { background-position: -140% 0, 0 0; } 100% { background-position: 240% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .cr-cards .cr-art, .eh-art, .vh i, .cr-cards .cr-art::after, .eh-art::after, .vh i::after { animation: none; } }

/* Kafle Studiów: dwa razy większe, ścięte rogi, własny neon i plakietka */
.vh > li.vh-studio { grid-column: span 2; --h: 300; filter: drop-shadow(0 0 14px hsl(var(--h) 100% 60% / .55)); }
.vh > li.vh-studio:nth-child(2) { --h: 190; }
.vh > li.vh-studio button { position: relative; padding: 14px; border: 0; background: linear-gradient(140deg, hsl(var(--h) 60% 14%), hsl(calc(var(--h) + 40) 55% 9%)); clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px)); }
.vh > li.vh-studio button::before { content: ""; position: absolute; inset: 1.5px; z-index: 0; pointer-events: none; background: linear-gradient(140deg, hsl(var(--h) 55% 15%), hsl(calc(var(--h) + 40) 50% 8%)); clip-path: polygon(0 0, calc(100% - 33px) 0, 100% 33px, 100% 100%, 33px 100%, 0 calc(100% - 33px)); }
.vh > li.vh-studio button::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(120deg, hsl(var(--h) 100% 70%), transparent 35%, transparent 65%, hsl(calc(var(--h) + 50) 100% 70%)); clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px), 0 0, 1.5px 1.5px, 1.5px calc(100% - 34px), calc(34px + 1px) calc(100% - 1.5px), calc(100% - 1.5px) calc(100% - 1.5px), calc(100% - 1.5px) 34px, calc(100% - 34px) 1.5px, 1.5px 1.5px); }
.vh > li.vh-studio button > * { position: relative; z-index: 1; }
.vh > li.vh-studio i { aspect-ratio: 21 / 9; clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px)); border-radius: 0; box-shadow: none; animation: none; }
.vh > li.vh-studio i::after { display: none; }
.vh > li.vh-studio b { font-size: 1.25rem; letter-spacing: .01em; }
.vh-badge { position: absolute; top: 10px; left: 12px; z-index: 5; padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1.4; font-style: normal; letter-spacing: .16em; color: #fff; background: linear-gradient(90deg, hsl(var(--h) 90% 55%), hsl(calc(var(--h) + 50) 90% 55%)); box-shadow: 0 0 14px hsl(var(--h) 100% 60% / .8); }
.vh > li.vh-studio:hover { filter: drop-shadow(0 0 24px hsl(var(--h) 100% 65% / .85)); }
@media (max-width: 640px) { .vh > li.vh-studio { grid-column: auto; } }
/* Studio montażu: lista filmów, edytor, oś czasu i panele. */
.mt-home > h1 { margin: 20px 0 6px; }
.mt-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; }
.mt-tabs button { font: inherit; cursor: pointer; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 16px; }
.mt-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
/* Zakładki nad ustawieniami zawsze w jednym rzędzie. */
.mt-side .mt-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, auto); justify-content: stretch; }
.mt-side .mt-tabs button { min-width: 0; padding: 7px 6px; border-radius: 12px; font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
.mt-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(20px, 5vw, 48px); border: 1px dashed var(--line); border-radius: 24px; background: var(--surface); text-align: center; }
.mt-filebtn { display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.mt-filebtn input, .mt-add input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.mt-wait { text-align: center; }
.mt-projects, .mt-jobs { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mt-projects li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mt-row-actions { display: flex; flex-wrap: nowrap; gap: 6px; }
.mt-open, .mt-jobs button { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; cursor: pointer; }
.mt-open:hover, .mt-jobs button:hover { border-color: var(--accent); }
.mt-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--accent-soft) left center / auto 100%; }
.mt-thumb.empty { display: grid; place-items: center; font-size: 1.6rem; }
.mt-jobs video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #000; }
.mt-jobs span { font-size: .88rem; overflow-wrap: anywhere; }
.mt-how { list-style: none; counter-reset: mt; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mt-how li { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.mt-how li:not(.mt-mcp)::before { counter-increment: mt; content: counter(mt); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.mt-how span { color: var(--muted); }

.mt-editor { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.mt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mt-grow { flex: 1; }
.mt-name { font: inherit; font-weight: 600; min-width: 0; width: min(230px, 100%); padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text); }
.mt-name:hover, .mt-name:focus { border-color: var(--line); background: var(--surface); }
.mt-top .btn[aria-pressed="true"], .mt-edit-head .btn[aria-pressed="true"], .mt-controls .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mt-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.mt-side { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 96px; }
.mt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.mt-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mt-panel h2, .mt-panel h3, .mt-panel p { margin: 0; }
.mt-panel h2 { font-size: 1.15rem; }
.mt-panel h3 { font-size: 1rem; }
.mt-panel label:not(.mt-check, .btn, .mt-add) { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .92rem; }
.mt-panel input:not([type="checkbox"], [type="range"], [type="color"], [type="file"]), .mt-panel textarea, .mt-panel select, .mt-go select { font: inherit; width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.mt-panel textarea { resize: vertical; }
.mt-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.mt-panel input[type="color"] { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.mt-panel .btn { min-height: 38px; padding: 7px 12px; }
.mt-panel .btn.link { align-self: flex-start; padding-left: 0; min-height: 0; }
.mt-panel details { border-top: 1px solid var(--line); padding-top: 10px; }
.mt-panel details > :not(summary) { margin-top: 10px; }
.mt-panel summary { cursor: pointer; font-weight: 600; }
.mt-field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.mt-field legend { font-weight: 600; padding: 0 0 6px; font-size: .92rem; }
.mt-check { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; }
.mt-check input { margin-top: 3px; accent-color: var(--accent); }
.mt-check small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.mt-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.mt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.mt-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mt-tools, .mt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-tools button, .mt-list button { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-left: 5px solid var(--tool, var(--line)); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.mt-tools button:hover, .mt-list button:hover { border-color: var(--accent); border-left-color: var(--tool, var(--accent)); }
.mt-tools span, .mt-tools small, .mt-list span { color: var(--muted); font-size: .85rem; }
.tool-swap { --tool: #e255c5; }
.tool-prompt { --tool: #5b3df5; }
.tool-replace { --tool: #ff7a45; }
.tool-angle { --tool: #0ea5b7; }
.tool-camera { --tool: #22c55e; }
.tool-relight { --tool: #e0a100; }
.tool-brush { --tool: #e0476a; }
.tool-voice { --tool: #3fa7a0; }
.mt-voices { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.mt-voices button { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.mt-voices button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mt-voices span { font-size: .8rem; color: var(--muted); }
.mt-versions audio { width: 100%; }
.mt-edit-head .mt-icon { flex: none; width: 52px; height: 52px; min-width: 52px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; }
.mt-edit-head .mt-power[aria-pressed="true"] { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.mt-edit-head .mt-power[aria-pressed="false"] { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.mt-edit-head .mt-icon-bad:hover:not(:disabled) { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.mt-now { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; list-style: none; }
.mt-now li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .8rem; }
.mt-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mt-log li { display: grid; gap: 2px; border-left: 3px solid var(--line); padding-left: 10px; }
.mt-warn { color: var(--bad); }
.mt-log li.bad { border-left-color: var(--danger, #c0392b); }
.mt-log li.good { border-left-color: var(--accent); }
.mt-log time { font-size: .75rem; color: var(--muted); }
.mt-sfx, .mt-ideas { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.mt-sfx li { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.mt-sfx audio { width: 100%; }
.mt-sfx li b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mt-ideas small { display: block; color: var(--muted); }
.mt-cues li { flex-wrap: wrap; }
.mt-cues li input { flex: 1; min-width: 0; }
.mt-cues .mt-range { width: 100%; }
.mt-sounds span { position: absolute; top: 5px; max-width: 18%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; line-height: 22px; padding: 0 6px; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.mt-sounds .mt-sfx-block { position: absolute; top: 4px; bottom: 4px; min-width: 22px; max-width: 40%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; line-height: 24px; padding: 0 8px; border-radius: 6px; border: 0; border-left: 3px solid var(--accent); background: var(--accent-soft); color: inherit; cursor: grab; touch-action: none; text-align: left; }
.mt-sounds .mt-sfx-block.on { box-shadow: 0 0 0 2px var(--text); }
.mt-sfx li.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mt-edit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mt-edit-head h2 { flex: 1; }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chips button { font: inherit; font-size: .85rem; cursor: pointer; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.mt-chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.mt-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-photos > span { position: relative; }
.mt-photos img { display: block; width: 82px; height: 82px; object-fit: cover; border-radius: 12px; }
.mt-photos > span button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.mt-panel .mt-add { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 82px; height: 82px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; font-size: .75rem; color: var(--muted); cursor: pointer; }
.mt-mask { max-width: 160px; border: 1px solid var(--line); border-radius: 8px; }
.mt-sphere { width: 180px; height: 180px; align-self: center; cursor: crosshair; touch-action: none; }
.mt-sphere .ball { fill: var(--accent-soft); stroke: var(--line); stroke-width: .02; }
.mt-sphere .wire { fill: none; stroke: var(--muted); stroke-width: .008; opacity: .5; }
.mt-sphere .dot { stroke: var(--text); stroke-width: .035; }
.mt-sphere .dot.behind { stroke-dasharray: .06 .05; opacity: .7; }
.mt-versions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mt-versions li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: .85rem; }
.mt-versions button { width: 100%; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; cursor: pointer; }
.mt-versions li.on button { border-color: var(--accent); background: var(--accent-soft); }
.mt-versions video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 8px; background: #000; }
/* Ostrzeżenie nad „Generuj”: czerwone, gdy fragment ma złą długość; żółte, gdy brakuje ustawień. */
.mt-fix { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 2px solid var(--bad); border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.mt-fix p { margin: 0; font-size: .95rem; }
.mt-fix p::before { content: "⚠ "; }
.mt-panel .mt-fix .btn { background: var(--bad); border-color: var(--bad); color: var(--bg); font-weight: 700; }
.mt-fix.soft { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.mt-go { display: flex; align-items: flex-end; gap: 10px; position: sticky; bottom: -14px; padding: 10px 0; background: var(--surface); border-top: 1px solid var(--line); }
.mt-go label { min-width: 90px; flex: none; white-space: nowrap; }
.mt-go .btn { flex: 1; }
.mt-order, .mt-cues { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.mt-order li, .mt-cues li { display: flex; gap: 6px; align-items: center; }
.mt-order button, .mt-cues button { font: inherit; font-size: .85rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.mt-order button:first-child { flex: 1; text-align: left; }
.mt-order button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mt-order button:disabled { opacity: .4; cursor: default; }
.mt-clipset { display: flex; flex-direction: column; gap: 10px; }
.mt-textrow { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.mt-plan { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.mt-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.mt-preview { display: flex; flex-direction: column; gap: 8px; }
.mt-screens { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 20px; background: #101014; }
.mt-screens figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-width: 0; }
.mt-screens figcaption { color: #fff; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
/* Wysokość ogranicza szerokość, żeby pionowy film mieścił się na ekranie w swoich proporcjach. */
.mt-stage { position: relative; overflow: hidden; width: 100%; max-width: 100%; max-height: 56vh; margin: 0 auto; background: #000; container-type: size; }
.mt-frame, .mt-blur { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-blur { object-fit: cover; object-position: left; filter: blur(24px) brightness(.7); transform: scale(1.15); }
.mt-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mt-stage.fit-fill .mt-frame video, .mt-stage.fit-follow .mt-frame video { object-fit: cover; }
.mt-over { visibility: hidden; pointer-events: none; }
.mt-over.on { visibility: visible; }
.look-cinema { filter: contrast(1.12) saturate(.9) sepia(.12); }
.look-warm { filter: sepia(.22) saturate(1.15); }
.look-cool { filter: hue-rotate(10deg) saturate(.92) brightness(1.02); }
.look-bw { filter: grayscale(1) contrast(1.08); }
.look-vivid { filter: saturate(1.4) contrast(1.06); }
.look-vintage { filter: sepia(.4) contrast(.92) saturate(.85); }
.look-faded { filter: contrast(.85) saturate(.8) brightness(1.08); }
.mt-text { position: absolute; left: 4%; right: 4%; text-align: center; font-weight: 700; line-height: 1.2; text-shadow: 0 0 3px #000, 0 1px 2px #000; pointer-events: none; overflow-wrap: anywhere; font-size: 5.5cqmin; }
.mt-text.pos-top { top: 7%; }
.mt-text.pos-middle { top: 50%; transform: translateY(-50%); }
.mt-text.pos-bottom { bottom: 8%; }
.mt-text.size-small { font-size: 4cqmin; }
.mt-text.size-large { font-size: 7.5cqmin; }
.mt-text.size-hero { font-size: 11cqmin; }
.mt-text.font-serif { font-family: Georgia, "Times New Roman", serif; }
.mt-text.font-mono { font-family: ui-monospace, Menlo, monospace; }
.mt-cutnote { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .75rem; }
.mt-paint { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .55; cursor: crosshair; touch-action: none; }
.mt-paint[hidden] { display: none; }
.mt-box { position: absolute; border: 2px dashed #ff2bd6; pointer-events: none; }
.mt-box.round { border-radius: 50%; }
.mt-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.mt-clock { font-variant-numeric: tabular-nums; }

.mt-timeline { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; min-width: 0; }
.mt-tl-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.mt-tl-bar label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.mt-tl-bar input { width: 120px; accent-color: var(--accent); }
.mt-scroll { overflow-x: auto; padding: 8px 0 4px; }
.mt-timeline { position: relative; }
.mt-tl-bar label svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mt-tl-bar .mt-mk-add i { font-style: normal; }
.mt-tip { position: absolute; z-index: 30; transform: translate(-50%, -100%); display: grid; gap: 3px; width: max-content; max-width: min(260px, 100%); padding: 8px 12px; border-radius: 12px; border: 2px solid var(--tool, var(--line)); background: var(--surface); color: var(--text); box-shadow: 0 8px 22px rgb(0 0 0 / .4); font-size: .8rem; }
.mt-tip[role="tooltip"] { pointer-events: none; }
.mt-tip span, .mt-tip small { color: var(--muted); }
.mt-tip .btn { justify-self: stretch; margin-top: 4px; padding: 6px 12px; font-size: .8rem; }
.mt-tracks { position: relative; min-width: 100%; user-select: none; touch-action: pan-y; cursor: pointer; }
.mt-ruler { position: relative; height: 20px; font-size: .7rem; color: var(--muted); }
.mt-ruler span { position: absolute; top: 0; border-left: 1px solid var(--line); padding-left: 3px; white-space: nowrap; }
.mt-lane { position: relative; height: 34px; margin-bottom: 4px; border-radius: 8px; background: var(--bg); }
.mt-block { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; min-width: 18px; border-radius: 8px; background: color-mix(in srgb, var(--tool) 30%, var(--surface)); border: 2px solid var(--tool); color: var(--text); font-size: .78rem; font-weight: 600; cursor: grab; touch-action: none; overflow: hidden; }
.mt-block.on { box-shadow: 0 0 0 2px var(--text); }
.mt-block.off { opacity: .45; }
.mt-block span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 10px; pointer-events: none; }
.mt-block.st-new, .mt-block.st-failed, .mt-block.st-unused { border-style: dashed; background: color-mix(in srgb, var(--tool) 8%, var(--surface)); }
.mt-block.st-running { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tool) 30%, var(--surface)) 0 10px, color-mix(in srgb, var(--tool) 12%, var(--surface)) 10px 20px); }
.mt-status { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin: 8px 0; border: 2px solid var(--line); border-radius: 12px; }
.mt-status.st-on { border-color: #22c55e; background: color-mix(in srgb, #22c55e 12%, transparent); }
.mt-status.st-changed, .mt-status.st-unused, .mt-status.st-failed { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 10%, transparent); }
.mt-status.st-new, .mt-status.st-off { border-style: dashed; }
.mt-status span { font-size: .9rem; }
.mt-status small { color: var(--muted); }
.mt-list span.mt-state { color: var(--text); }
.mt-list span.mt-state.st-on { color: #22c55e; }
.mt-grip { position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--tool); cursor: ew-resize; touch-action: none; }
.mt-grip.end { left: auto; right: 0; }
.mt-film { position: relative; height: 58px; border-radius: 8px; overflow: hidden; background: #000 center / 100% 100% no-repeat; }
.mt-gap { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .86) 0 6px, rgba(0, 0, 0, .66) 6px 12px); }
.mt-clip { position: absolute; top: 0; bottom: 0; padding: 0; background: none; border: 0; border-left: 2px solid #fff; cursor: pointer; overflow: hidden; }
.mt-clip.on { box-shadow: inset 0 0 0 3px var(--accent); }
.mt-clip span { position: absolute; left: 4px; bottom: 3px; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .68rem; white-space: nowrap; }
.mt-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--pink); pointer-events: none; }

.mt-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); }
.mt-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.mt-dialog > div { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mt-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt-dialog h2, .mt-dialog p { margin: 0; }
.mt-dialog ul { list-style: none; margin: 0; padding: 0; }
.mt-dialog li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.mt-dialog li > div:first-child { display: flex; flex-direction: column; gap: 3px; flex: 1 1 240px; }
.mt-dialog .err { color: var(--bad); }
.mt-dialog li > .mt-export-progress { display: flex; flex-direction: column; gap: 5px; flex: 1 1 100%; }
.mt-export-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mt-export-line b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.mt-export-bar { height: 18px; border-radius: 999px; overflow: hidden; background: var(--bg); border: 1px solid var(--muted); }
.mt-export-bar > div { height: 100%; border-radius: 999px; transition: width .9s linear; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .28) 0 10px, transparent 10px 20px) 0 0 / 200% 100%, linear-gradient(90deg, var(--accent), var(--pink)); animation: mt-stripes 1.2s linear infinite; }
.mt-export-progress.waiting .mt-export-bar > div { opacity: .45; }
@keyframes mt-stripes { to { background-position: 44.1px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .mt-export-bar > div { animation: none; transition: none; } }
.mt-finish { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.mt-finish > p { grid-column: 1 / -1; }
.mt-formats { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt-formats > .btn { align-self: flex-start; }
.mt-downloads { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.mt-downloads > summary { cursor: pointer; font-weight: 700; }

@media (max-width: 960px) {
  .mt-body { grid-template-columns: minmax(0, 1fr); }
  .mt-main { order: -1; }
  .mt-side { position: static; max-height: none; overflow: visible; }
  .mt-go { bottom: 0; }
}
/* Na węższych ekranach pływający znacznik MCP zasłaniał pasek „Generuj”. */
@media (max-width: 1200px) { body:has(.mt-go) .mcp-chip { display: none !important; } }
.mt-source, .mt-req { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; text-align: left; }
.mt-source summary, .mt-req summary { cursor: pointer; }
.mt-source summary span { color: var(--muted); font-size: .85rem; margin-left: 6px; }
.mt-source dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 0; font-size: .85rem; }
.mt-source dt { color: var(--muted); }
.mt-source dd { margin: 0; overflow-wrap: anywhere; }
.mt-source small { display: block; color: var(--muted); }
@media (max-width: 640px) { .mt-source dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .mt-source dd { margin-bottom: 8px; } }
.mt-req { width: 100%; box-sizing: border-box; font-size: .85rem; }
.mt-req ul { margin: 8px 0; padding-left: 18px; }
.mt-model { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: .85rem; }
.mt-model span { color: var(--muted); }
.mt-model span.err { color: #f59e0b; }


/* Znaczniki: pas na osi, lista w panelu i kolory. */
.mk-blue { --mk: #3b82f6; }
.mk-green { --mk: #22c55e; }
.mk-yellow { --mk: #eab308; }
.mk-red { --mk: #ef4444; }
.mk-purple { --mk: #a855f7; }
.mt-marks { position: relative; height: 26px; }
.mt-marks button { position: absolute; top: 2px; max-width: 15%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: inherit; font-size: .75rem; line-height: 20px; padding: 0 6px; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--mk); border-left-width: 3px; border-radius: 0 6px 6px 0; }
.mt-marks button.left { border-left-width: 1px; border-right-width: 3px; border-radius: 6px 0 0 6px; }
.mt-marks button.range { max-width: none; border-right-width: 3px; border-radius: 4px; }
.mt-marks button.on { background: var(--mk); color: #000; z-index: 1; }
.mt-markers { display: grid; gap: 10px; }
.mt-markers ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mt-markers li { display: grid; gap: 8px; border: 1px solid var(--line); border-left: 4px solid var(--mk); border-radius: 12px; padding: 10px; }
.mt-markers li.on { border-color: var(--mk); }
.mt-mk-head { display: flex; align-items: center; gap: 8px; }
.mt-mk-head > button:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font: inherit; font-size: .9rem; text-align: left; color: var(--text); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.mt-mk-head i { flex: none; font-style: normal; color: var(--muted); }
.mt-mk-head [aria-expanded="true"] i { transform: rotate(90deg); }
.mt-mk-head span { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.mt-mk-head b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mt-mk-head em { flex: none; font-style: normal; font-weight: 700; color: var(--bad); }
.mt-markers .mt-mk-all { justify-self: end; }
.mt-markers input, .mt-markers textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-size: .9rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.mt-markers .mt-row label { display: grid; gap: 2px; font-size: .75rem; color: var(--muted); flex: 1 1 80px; }
.mt-mk-remove { margin-left: auto; }
.mt-mk-colors { display: flex; gap: 8px; }
.mt-mk-colors button { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; background: var(--mk); border: 2px solid transparent; }
.mt-mk-colors button[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--surface); }
.mt-mk-files { display: grid; gap: 6px; }
.mt-mk-files .mt-row { flex-wrap: wrap; }
.mt-mk-files ul { padding-left: 18px; }
.mt-tl-bar .mt-mk-add { padding: 4px 12px; font-size: .8rem; }
.mt-export-marks { display: grid; gap: 6px; width: 100%; }
/* Zakładki jako ikony w jednym rzędzie, z dymkiem po najechaniu. */
.mt-icontabs { margin: 0 0 14px; }
.mt-icontabs > div { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.mt-icontabs button { position: relative; display: grid; place-items: center; height: 52px; cursor: pointer; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--tab, var(--muted)); }
.mt-icontabs button:hover { border-color: var(--tab); }
.mt-icontabs button[aria-selected="true"] { border-color: var(--tab); background: color-mix(in srgb, var(--tab) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--tab); }
.mt-icontabs button::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20; display: none; white-space: nowrap; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: 0 6px 18px rgb(0 0 0 / .35); font-size: .8rem; font-weight: 600; pointer-events: none; }
.mt-icontabs button:first-child::after { left: 0; transform: none; }
.mt-icontabs button:last-child::after { left: auto; right: 0; transform: none; }
.mt-icontabs button:focus-visible::after { display: block; }
@media (hover: hover) { .mt-icontabs button:hover::after { display: block; } }
.mt-tab-effects { --tab: #a855f7; }
.mt-tab-film { --tab: #3b82f6; }
.mt-tab-ai { --tab: #14b8a6; }
.mt-tab-marks { --tab: #f59e0b; }
.mt-tab-log { --tab: #ec4899; }
/* Cofnij, przywróć i historia jako jeden zestaw; na telefonie same ikonki. */
.mt-undo { display: inline-flex; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.mt-undo button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 46px; height: 44px; padding: 0 14px; font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; cursor: pointer; }
.mt-undo button + button { border-left: 1px solid var(--line); }
.mt-undo-back { --tint: #f59e0b; }
.mt-undo-again { --tint: #22c55e; }
.mt-undo-log { --tint: #ec4899; }
.mt-undo svg { color: var(--tint); }
.mt-undo button:hover:not(:disabled), .mt-undo button[aria-pressed="true"] { background: color-mix(in srgb, var(--tint) 16%, transparent); }
.mt-undo button:disabled { cursor: default; opacity: .4; }
@media (max-width: 700px) {
  .mt-undo button { padding: 0; width: 48px; }
  .mt-undo button span { display: none; }
}
.mt-tl-bar { flex-wrap: wrap; } .mt-tl-bar > span { white-space: nowrap; } .mt-tl-bar input { max-width: 100%; }
@media (max-width: 700px) { .mt-tl-bar .mt-mk-add span, .mt-tl-bar label span { display: none; } .mt-tl-bar .mt-mk-add { min-width: 44px; min-height: 36px; } .mt-tl-bar label { flex: 1; justify-content: flex-end; } }
.mt-hint { position: fixed; z-index: 200; max-width: min(260px, calc(100vw - 16px)); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: 0 6px 18px rgb(0 0 0 / .35); font-size: .8rem; font-weight: 600; pointer-events: none; }
.mt-act { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
/* Licznik efektów: na telefonie skrót „10 Fx · na filmie: 8” w osobnej linii pod przyciskami. */
.mt-count { white-space: nowrap; }
.mt-count-short { display: none; }
@media (max-width: 700px) { .mt-count-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .mt-count-short { display: inline; } .mt-top .mt-count { order: 1; flex: 0 0 100%; } }
.mt-refresh svg { color: #38bdf8; }
.mt-link svg { color: #22c55e; }
@media (max-width: 700px) { .mt-act span { display: none; } .mt-top .mt-act { min-width: 46px; width: 46px; height: 44px; padding: 0; } .mt-top { column-gap: 6px; } }
/* Komputer: cofanie i odświeżanie jako ikonki z dymkami, żeby „Link prywatny” i „Eksport” zostały w tym samym rzędzie. */
@media (min-width: 701px) and (max-width: 1400px) { .mt-top .mt-undo button { padding: 0; width: 46px; min-width: 46px; } .mt-top .mt-undo button span, .mt-top .mt-refresh span { display: none; } .mt-top .mt-refresh { width: 46px; padding: 0; } }
/* Na telefonie przyciski zawsze zaczynają własny rząd, więc ikony nie rozjeżdżają się na dwa. */
@media (max-width: 700px) { .mt-top .mt-grow { flex: 0 0 100%; margin-top: -10px; } }
/* Wąski telefon: cofanie, licznik i ikony mieszczą się w jednym rzędzie. */
@media (max-width: 420px) { .mt-top .mt-undo button { width: 44px; min-width: 44px; } .mt-top .mt-act { min-width: 44px; width: 44px; } }

/* Pełny ekran podglądu: obraz na całą wysokość, pod nim pasek postępu i przyciski. */
.mt-player { display: flex; flex-direction: column; gap: 8px; }
.mt-player.full { position: fixed; inset: 0; z-index: 2000; gap: 0; background: #000; outline: none; }
.mt-player.full .mt-screens { flex: 1; min-height: 0; flex-direction: row; align-items: stretch; justify-content: center; gap: 8px; margin: 0; padding: 0; border-radius: 0; background: #000; }
@media (orientation: portrait) { .mt-player.full .mt-screens { flex-direction: column; } }
.mt-player.full figure { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; margin: 0; container-type: size; align-items: center; justify-content: center; }
.mt-player.full figcaption { position: absolute; top: 8px; z-index: 5; padding: 2px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; }
.mt-player.full .mt-stage { width: min(100cqw, calc(100cqh * var(--mt-ratio))); max-width: none; max-height: none; flex: none; }
.mt-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: linear-gradient(transparent, rgba(0, 0, 0, .85) 35%); color: #fff; }
.mt-player.idle { cursor: none; }
.mt-player.idle .mt-bar { visibility: hidden; }
.mt-bar .btn { min-width: 44px; height: 44px; padding: 0 10px; color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); }
.mt-bar .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mt-bar-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.mt-bar-row .mt-bar-play { min-width: 60px; }
.mt-bar-row .mt-clock { margin: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-progress { position: relative; height: 30px; margin-bottom: 4px; }
.mt-progress input { position: absolute; inset: 0; width: 100%; height: 30px; margin: 0; background: transparent; appearance: none; cursor: pointer; }
.mt-progress input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--mt-done), rgba(255, 255, 255, .3) var(--mt-done)); }
.mt-progress input::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 0; border-radius: 50%; background: #fff; }
.mt-progress input::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.mt-progress input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.mt-progress input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }
.mt-progress i { position: absolute; top: 9px; width: 2px; height: 12px; margin-left: -1px; background: #fbbf24; pointer-events: none; z-index: 1; }
@media (max-width: 520px) { .mt-bar-row { flex-wrap: wrap; row-gap: 6px; } .mt-bar-row .mt-clock { order: -1; flex: 0 0 100%; text-align: center; } }

/* Plansze przed filmem i po nim: mały podgląd w proporcjach filmu. */
.mt-card + .mt-card, .mt-card + .btn, .mt-panel .btn + .mt-card { margin-top: 10px; }
.mt-card-frame { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqmin; width: 100%; max-width: 320px; align-self: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; text-align: center; container-type: size; }
.mt-card-frame img { max-width: 84%; max-height: 46%; object-fit: contain; }
.mt-card-frame img.full { max-width: 100%; max-height: 100%; }
.mt-card-frame b, .mt-card-frame span { max-width: 86%; line-height: 1.3; overflow-wrap: anywhere; }
.mt-card-frame b { font-size: 8.5cqmin; }
.mt-card-frame span { font-size: 4.5cqmin; }
.mt-card-colors { display: flex; gap: 12px; }
@font-face { font-family: "KvLato"; src: url("/api/montage-font/lato"); font-display: swap; }
@font-face { font-family: "KvRoboto"; src: url("/api/montage-font/roboto"); font-display: swap; }
@font-face { font-family: "KvBebas"; src: url("/api/montage-font/bebas"); font-display: swap; }
@font-face { font-family: "KvLobster"; src: url("/api/montage-font/lobster"); font-display: swap; }
@font-face { font-family: "KvGaramond"; src: url("/api/montage-font/garamond"); font-display: swap; }
.mt-card-frame.font-sans { font-family: "DejaVu Sans", Verdana, sans-serif; }
.mt-card-frame.font-serif { font-family: "DejaVu Serif", Georgia, serif; }
.mt-card-frame.font-mono { font-family: "DejaVu Sans Mono", "Courier New", monospace; }
.mt-card-frame.font-lato { font-family: "KvLato", sans-serif; }
.mt-card-frame.font-roboto { font-family: "KvRoboto", sans-serif; }
.mt-card-frame.font-bebas { font-family: "KvBebas", sans-serif; }
.mt-card-frame.font-lobster { font-family: "KvLobster", cursive; }
.mt-card-frame.font-garamond { font-family: "KvGaramond", serif; }
/* Podgląd animacji napisów: drugi wiersz wchodzi chwilę po pierwszym, jak w eksporcie. */
.mt-card-frame.anim-fade b, .mt-card-frame.anim-fade span { animation: kv-card-fade .6s both; }
.mt-card-frame.anim-rise b, .mt-card-frame.anim-rise span { animation: kv-card-rise .6s ease-out both; }
.mt-card-frame.anim-slide b, .mt-card-frame.anim-slide span { animation: kv-card-slide .6s ease-out both; }
.mt-card-frame.anim-wipe b, .mt-card-frame.anim-wipe span { animation: kv-card-wipe .9s linear both; }
.mt-card-frame[class*="anim-"] span { animation-delay: .25s; }
@keyframes kv-card-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kv-card-rise { from { opacity: 0; transform: translateY(80%); } to { opacity: 1; transform: none; } }
@keyframes kv-card-slide { from { opacity: 0; transform: translateX(-40%); } to { opacity: 1; transform: none; } }
@keyframes kv-card-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.mt-step { margin: 8px 0 0; font-size: 1rem; }
.mt-compare { font-size: .875rem; }
.mt-compare summary { cursor: pointer; }
.mt-compare div { margin-top: 10px; }
.mt-compare ul { margin: 4px 0 0; padding-left: 20px; display: block; }
.mt-compare li { display: list-item; border: 0; padding: 0; }

/* Wskazywanie aktora: klatka nagrania z ramkami wokół ludzi. */
.mt-pick { position: relative; align-self: center; width: 100%; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; cursor: crosshair; }
.mt-pick video { display: block; width: 100%; height: 100%; }
.mt-pick button { position: absolute; border: 2px solid #fff; border-radius: 10px; background: transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); padding: 0; cursor: pointer; }
.mt-pick button[aria-pressed="true"] { border: 4px solid var(--accent); background: rgba(139, 92, 246, .2); }
.mt-pick .mt-pin { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 3px solid #fff; background: var(--accent); pointer-events: none; }
.mt-pick-time { display: flex; align-items: center; gap: 10px; }
.mt-pick-time input { flex: 1; }

/* Widoki podglądu: obok siebie (Split), przesuwana linia (Compare), tylko po zmianach (Final) i kadr spod kursora. */
.mt-screens { position: relative; }
.mt-screens.view-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.mt-screens.view-split figure.mt-was { order: -1; }
.mt-screens.view-split .mt-stage { max-height: 48vh; }
.mt-views { order: 1; grid-column: 1 / -1; justify-self: center; display: inline-flex; gap: 2px; max-width: 100%; padding: 4px; border-radius: 14px; background: #1d1d25; border: 1px solid #34343f; }
.mt-views button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 16px; border: 0; border-radius: 10px; background: none; color: #c9c9d4; font: inherit; font-size: .86rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.mt-views button[aria-pressed="true"] { background: #3a3a48; color: #fff; }
.mt-views svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mt-screens.view-compare .mt-stage { width: min(100%, calc(56vh * var(--mt-ratio))); }
.mt-under { position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #000; cursor: pointer; }
.mt-tag { position: absolute; top: 8px; left: 8px; z-index: 4; max-width: calc(50% - 14px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 3px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.mt-tag.end { left: auto; right: 8px; }
.mt-divider:focus, .mt-divider:focus-visible { outline: none; }
.mt-divider:focus-visible span { box-shadow: 0 0 0 3px #a855f7, 0 4px 14px rgba(0, 0, 0, .45); }
.mt-divider { position: absolute; top: 0; bottom: 0; z-index: 5; width: 36px; margin-left: -18px; cursor: ew-resize; touch-action: none; }
.mt-divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: 17px; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .6); }
.mt-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #14141a; font-size: .95rem; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.mt-peek { position: absolute; z-index: 8; pointer-events: none; }
.mt-peek p { margin: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: .8rem; }
.mt-peek b { color: #d8ff3e; font-variant-numeric: tabular-nums; }
/* Ta sama skala co ekran: kadr leży na nim co do piksela. */
.mt-peek.same { inset: 0; }
.mt-peek-picture { position: absolute; inset: 0; overflow: hidden; background: #000; }
.mt-peek.half .mt-peek-picture { clip-path: inset(0 50% 0 0); }
.mt-peek.half::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .6); }
.mt-peek.same p { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); box-sizing: border-box; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .72); }
.mt-peek.half p { max-width: calc(50% - 16px); }
.mt-peek-over { visibility: visible; }
.mt-stage:has(> .mt-peek) > :is(.mt-divider, .mt-under, .mt-tag) { visibility: hidden; }
/* Cały kadr pomniejszony w lewej połowie. */
.mt-peek.whole { left: 0; top: 0; bottom: 62px; box-sizing: border-box; width: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px 8px 14px; border-radius: 20px 0 0 0; border-right: 1px solid #3a3a48; background: rgba(16, 16, 20, .97); }
.mt-peek.whole .mt-stage { flex: 0 1 auto; min-height: 0; width: min(100%, calc(48vh * var(--mt-ratio))); max-height: calc(100% - 30px); }
.mt-views .mt-peek-mode { margin-left: 6px; border-left: 1px solid #34343f; border-radius: 0 10px 10px 0; }
@media (hover: none) { .mt-views .mt-peek-mode { display: none; } }
.mt-hoverline { position: absolute; top: 0; bottom: 0; z-index: 4; width: 1px; background: var(--muted); pointer-events: none; }
.mt-hoverline span { position: absolute; top: 0; left: 3px; padding: 0 6px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: .7rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-hoverline.left span { left: auto; right: 3px; }
.mt-player.full .mt-views { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 11; }
.mt-player.full.idle .mt-views { visibility: hidden; }
.mt-player.full .mt-screens.view-split { display: flex; }
.mt-player.full .mt-screens.view-split .mt-stage { max-height: none; }
.mt-player.full .mt-screens.view-compare .mt-stage { width: min(100cqw, calc(100cqh * var(--mt-ratio))); }
.mt-player.full .mt-tag { top: auto; bottom: 96px; }
@media (max-width: 600px) {
  .mt-screens.view-split { grid-template-columns: minmax(0, 1fr); }
  .mt-screens.view-split .mt-stage { max-height: 30vh; }
  .mt-views button { padding: 6px 11px; gap: 5px; font-size: .8rem; }
}
.mt-tl-bar .mt-cut { display: inline-flex; align-items: center; gap: 6px; }
.mt-tl-bar .mt-cut select { max-width: 190px; padding: 4px 8px; font-size: .8rem; border-radius: 8px; background: var(--panel, transparent); color: inherit; border: 1px solid var(--line, #8884); }
@media (max-width: 700px) { .mt-tl-bar .mt-cut select { max-width: 120px; } .mt-tl-bar .mt-cut .mt-mk-add span { display: none; } }
/* Poziomy efektów: przeciąganie w górę i w dół, nowy poziom nad wszystkimi; film na dole się nie rusza. */
.mt-block { touch-action: none; cursor: grab; }
.mt-block.lifted { z-index: 6; cursor: grabbing; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.mt-lane.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.mt-lane.over.bad, .mt-lane.bad { outline-color: var(--err, #ff5d5d); background: color-mix(in srgb, var(--err, #ff5d5d) 12%, var(--bg)); }
.mt-lane.mt-newlane { position: absolute; left: 0; right: 0; margin: 0; transform: translateY(-38px); z-index: 5; border: 1px dashed var(--muted); display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); pointer-events: none; }
.mt-lane.mt-newlane.over { border-color: var(--accent); color: var(--text); }
.mt-clip { position: absolute; }
.mt-clip .mt-trim { position: absolute; top: 0; bottom: 0; left: 0; width: 12px; cursor: ew-resize; background: linear-gradient(90deg, rgba(255,255,255,.55), transparent); touch-action: none; border-radius: 6px 0 0 6px; }
.mt-clip .mt-trim.end { left: auto; right: 0; background: linear-gradient(270deg, rgba(255,255,255,.55), transparent); border-radius: 0 6px 6px 0; }
.mt-clip .mt-trim:hover { background-color: rgba(255,255,255,.18); }

.mt-guide { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.mt-logo-thumb { max-width: 160px; max-height: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: repeating-conic-gradient(#2a2a35 0 25%, #1c1c25 0 50%) 50% / 14px 14px; }
.mt-insert { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.mt-clock-btn { background: none; border: 0; padding: 2px 6px; color: inherit; font: inherit; cursor: pointer; border-radius: 6px; }
.mt-clock-btn:hover, .mt-clock-btn[aria-pressed="true"] { background: var(--accent-soft); }
.mt-insert-layer { position: absolute; inset: 0; background: #000; pointer-events: none; }
.mt-insert-layer img, .mt-insert-layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mt-insert-layer.fit-cover img, .mt-insert-layer.fit-cover video { object-fit: cover; }
.mt-logo { position: absolute; height: auto; pointer-events: none; }
.mt-logo.pos-tl { left: 3%; top: 3%; }
.mt-logo.pos-tr { right: 3%; top: 3%; }
.mt-logo.pos-bl { left: 3%; bottom: 3%; }
.mt-logo.pos-br { right: 3%; bottom: 3%; }
/* Studio dźwięku: wgrywanie, gotowe zestawy, ustawienia i porównanie „przed i po”. */
.sd { display: flex; flex-direction: column; gap: 14px; }
.sd > h1 { margin: 20px 0 0; }
.sd > h2 { margin: 8px 0 0; font-size: 1.15rem; }
.sd > p { margin: 0; }
.sd audio { width: 100%; }
.sd video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.sd-history { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--line); }
.sd-history > h2 { margin-top: 0; }
.sd-history .sd-results { gap: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.sd-item { border-bottom: 1px solid var(--line); min-width: 0; }
.sd-item:last-child { border-bottom: 0; }
.sd-item summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.sd-item summary::-webkit-details-marker { display: none; }
.sd-item summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.sd-item details:not([open]) summary::after { transform: rotate(-90deg); }
.sd-item summary:hover { background: var(--accent-soft); }
.sd-brief { font-variant-numeric: tabular-nums; }
.sd-item-body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; min-width: 0; }
.sd-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.sd-source { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sd-source b { overflow-wrap: anywhere; min-width: 0; }
.sd-source .btn { margin-left: auto; }
.sd-pick, .sd-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sd-pick { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sd-pick button, .sd-presets button { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.sd-pick button:hover, .sd-presets button:hover { border-color: var(--accent); }
.sd-pick span { font-size: .88rem; overflow-wrap: anywhere; }
.sd-pick small, .sd-presets span { color: var(--muted); font-size: .85rem; }
.sd-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.sd-presets button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.sd-chips { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.sd-presets.sd-chips button { height: auto; align-items: center; text-align: center; padding: 8px 10px; border-radius: 12px; }
.sd-preset-info { margin: 8px 0 0; min-height: 2.6em; }
.sd-mine { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
.sd-presets .sd-mine > button:first-child { flex: 1 1 auto; width: auto; height: auto; min-width: 0; overflow-wrap: anywhere; justify-content: center; }
.sd-presets .sd-mine > button:not(:first-child) { flex: 0 0 auto; width: auto; height: auto; align-self: stretch; padding: 8px 10px; align-items: center; justify-content: center; }
.sd-save { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sd-save input, .sd-offer input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.sd-offer input { flex: 0 0 auto; width: 100%; box-sizing: border-box; }
.sd-offer { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.sd-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; align-items: start; }
.sd-groups fieldset { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.sd-groups legend { padding: 0 6px; font-weight: 600; }
.sd label:not(.sd-check, .btn) { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .92rem; }
.sd select { font: inherit; width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.sd-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.sd-check input { margin-top: 4px; accent-color: var(--accent); }
.sd-check span { display: flex; flex-direction: column; gap: 2px; }
.sd-check b { font-weight: 500; font-size: .92rem; }
.sd-check small { color: var(--muted); }
.sd-go { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.sd-go label { min-width: 180px; }
.sd-go .sd-price { margin: 0 0 8px auto; }
.sd-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.sd-compare figure { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sd-compare figcaption { font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) {
  .sd-go label { min-width: 0; flex: 1 1 140px; }
  .sd-go .sd-price { margin-left: 0; flex-basis: 100%; }
  .sd-go .btn { width: 100%; }
}
.sd-report { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.sd-report div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sd-report .wide { grid-column: span 2; }
.sd-report dt { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.sd-report dd { margin: 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-timeline summary { cursor: pointer; font-weight: 600; }
.sd-timeline label { display: grid; gap: 4px; margin-bottom: 8px; }
.sd-timeline input { width: 100%; max-width: 420px; }
.sd-timeline-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-tracks { display: grid; gap: 8px; }
.sd-tracks ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sd-tracks li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sd-tracks li > b { flex: none; font-size: .85rem; }
.sd-tracks li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-tracks .btn { justify-self: start; }

/* Grupy ustawien: kazda ma swoj kolor, swiecacy pasek u gory i legende jak plakietke. */
.sd-groups fieldset { --g: #a78bfa; position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--g) 38%, var(--line)); background: linear-gradient(165deg, color-mix(in srgb, var(--g) 13%, var(--surface)) 0%, var(--surface) 55%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--g) 10%, transparent), 0 10px 30px -14px color-mix(in srgb, var(--g) 55%, transparent); transition: box-shadow .2s, border-color .2s, transform .2s; }
.sd-groups fieldset:hover, .sd-groups fieldset:focus-within { border-color: color-mix(in srgb, var(--g) 70%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--g) 30%, transparent), 0 14px 38px -12px color-mix(in srgb, var(--g) 70%, transparent); transform: translateY(-1px); }
.sd-groups fieldset:nth-child(1) { --g: #2dd4bf; }
.sd-groups fieldset:nth-child(2) { --g: #ff7a59; }
.sd-groups fieldset:nth-child(3) { --g: #c084fc; }
.sd-groups legend { padding: 5px 14px; border-radius: 999px; font-size: .95rem; font-weight: 700; letter-spacing: .02em; color: #fff; background: linear-gradient(120deg, var(--g), color-mix(in srgb, var(--g) 55%, #1b1030)); box-shadow: 0 0 16px -2px var(--g), inset 0 1px 0 rgb(255 255 255 / .25); text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.sd-groups input[type="checkbox"] { accent-color: var(--g); }
.sd-groups select:focus-visible, .sd-groups input:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }
.sd-groups .sd-check:has(input:checked) b { color: color-mix(in srgb, var(--g) 80%, #fff); }
/* Naglowki sekcji Studia dzwieku: kolorowy pasek i delikatny gradient. */
.sd > h2 { display: flex; align-items: center; gap: 10px; }
.sd > h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: linear-gradient(180deg, #ff7a59, #c084fc); box-shadow: 0 0 10px rgb(192 132 252 / .6); }
@media (prefers-reduced-motion: reduce) { .sd-groups fieldset { transition: none; } .sd-groups fieldset:hover { transform: none; } }

/* Historia wynikow: ten sam jezyk wizualny co grupy ustawien (kolor, swiecacy pasek, plakietka w naglowku). */
.sd-history { --g: #38bdf8; position: relative; }
.sd-history > h2 { display: inline-flex; align-items: center; margin: 4px 0 14px; padding: 6px 16px; border-radius: 999px; font-size: 1.05rem; font-weight: 700; color: #fff; background: linear-gradient(120deg, #38bdf8, #7c5cf0); box-shadow: 0 0 18px -2px #38bdf8, inset 0 1px 0 rgb(255 255 255 / .25); text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.sd-history .sd-results { border-color: color-mix(in srgb, var(--g) 38%, var(--line)); background: linear-gradient(165deg, color-mix(in srgb, var(--g) 10%, var(--surface)) 0%, var(--surface) 50%); box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--g) 55%, transparent); }
.sd-item summary:hover { background: color-mix(in srgb, var(--g) 14%, transparent); }
.sd-item details[open] > summary { background: color-mix(in srgb, var(--g) 9%, transparent); box-shadow: inset 3px 0 0 var(--g); }
.sd-history .sd-report div { border-color: color-mix(in srgb, var(--g) 28%, var(--line)); background: color-mix(in srgb, var(--g) 6%, transparent); }

/* Zakladki Studia dzwieku: Czyszczenie / Wyniki. */
.sd-tabs { display: inline-flex; gap: 4px; margin: 4px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.sd-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border: 0; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); background: transparent; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.sd-tabs button:hover { color: var(--text); }
.sd-tabs button.on { color: #fff; background: linear-gradient(120deg, #ff7a59, #c084fc); box-shadow: 0 0 16px -3px #c084fc, inset 0 1px 0 rgb(255 255 255 / .25); }
.sd-tabs button:last-child.on { background: linear-gradient(120deg, #38bdf8, #7c5cf0); box-shadow: 0 0 16px -3px #38bdf8, inset 0 1px 0 rgb(255 255 255 / .25); }
.sd-count { min-width: 1.5em; padding: 1px 7px; border-radius: 999px; font-size: .78rem; text-align: center; background: rgb(255 255 255 / .18); }
.sd-tabs button:not(.on) .sd-count { background: var(--line); }
.sd-live { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: sd-pulse 1.4s ease-in-out infinite; }
@keyframes sd-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sd-live { animation: none; } }
@media (max-width: 560px) { .sd-tabs { display: flex; } .sd-tabs button { flex: 1; justify-content: center; padding: 8px 10px; } }

/* Raport przy wyniku: porownanie przed i po (paski), kafelki z liczbami, wnioski. */
.sd-stats { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sd-ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.sd-ba { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--g, #38bdf8) 28%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--g, #38bdf8) 6%, transparent); min-width: 0; }
.sd-ba-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sd-delta { padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #052e2a; background: linear-gradient(120deg, #34d399, #2dd4bf); box-shadow: 0 0 12px -3px #34d399; }
.sd-ba-row { display: grid; grid-template-columns: 3.2em minmax(40px, 1fr) auto; align-items: center; gap: 10px; font-size: .88rem; }
.sd-ba-row > span { color: var(--muted); }
.sd-ba-row > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sd-bar i { display: block; height: 100%; border-radius: inherit; }
.sd-bar i.before { background: linear-gradient(90deg, #64748b, #94a3b8); }
.sd-bar i.after { background: linear-gradient(90deg, #ff7a59, #c084fc); box-shadow: 0 0 10px rgb(192 132 252 / .5); }
.sd-insights { padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, #a78bfa 30%, var(--line)); background: linear-gradient(165deg, color-mix(in srgb, #a78bfa 10%, transparent), transparent 70%); }
.sd-insights ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sd-insights li { position: relative; padding-left: 18px; font-size: .92rem; line-height: 1.4; }
.sd-insights li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #ff7a59, #c084fc); box-shadow: 0 0 8px rgb(192 132 252 / .6); }
.sd-groups fieldset:nth-child(4) { --g: #facc15; grid-column: 1 / -1; }
.sd-extras-info { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.sd-extras-info li { padding-left: 10px; border-left: 3px solid var(--line); }
.sd-extras-info li.on { border-left-color: var(--g); color: var(--text, inherit); }
.sd-docs { margin-top: 14px; padding: 12px; border: 1px solid color-mix(in srgb, #facc15 40%, var(--line)); border-radius: 14px; background: color-mix(in srgb, #facc15 6%, var(--surface)); display: flex; flex-direction: column; gap: 10px; }
.sd-docs > h4 { margin: 0; font-size: 1rem; }
.sd-docs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-docs-tabs button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: .88rem; }
.sd-docs-tabs button[aria-pressed="true"] { background: linear-gradient(120deg, #facc15, #fb923c); color: #1b1030; border-color: transparent; font-weight: 600; }
.sd-docs pre { margin: 0; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: 10px; border-radius: 10px; background: rgb(0 0 0 / .22); font: inherit; font-size: .88rem; line-height: 1.5; }
.sd-docs select { max-width: 100%; }
/* Trzy grupy na pelna szerokosc (czwarta, dokumenty, pod spodem); na wezszych ekranach jedna pod druga. */
.sd-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .sd-groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); } }
/* Demo Studia montażu (strony publiczne i panel). Szerokości bloków odpowiadają długościom fragmentów filmu. */
.md { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.md h2, .md p { margin: 0; }
.md-box { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: clamp(10px, 2vw, 20px); border-radius: 24px; background: #101014; color: #fff; }
.md-screens { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: end; }
.md-screens figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.md-screens figcaption { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.md-after figcaption { color: #d8ff3e; opacity: 1; }
.md-screens video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; cursor: pointer; }
.md-bar { display: flex; justify-content: center; gap: 8px; }
.md-bar[hidden] { display: none; }
.md-bar button { font: inherit; font-size: .9rem; min-width: 48px; min-height: 40px; padding: 6px 16px; border: 1px solid #3a3a46; border-radius: 999px; background: #1c1c24; color: #fff; cursor: pointer; }
.md-bar button[aria-pressed="true"] { border-color: #d8ff3e; }
.md-tl { position: relative; display: flex; flex-direction: column; gap: 4px; }
.md-tl > img { display: block; width: 100%; height: 44px; object-fit: fill; border-radius: 8px; }
.md-tl > i { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.md-blocks { display: flex; }
.md-seg { --seg: #5b3df5; }
.md-seg-1 { --seg: #3da9f5; }
.md-seg-2 { --seg: #ff7a45; }
.md-seg-3 { --seg: #22c55e; }
.md-seg-4 { --seg: #e255c5; }
.md-seg-5 { --seg: #f5c23d; }
.md-seg-6 { --seg: #3dd6a8; }
.md-blocks .md-seg-1 { width: 16.72%; }
.md-blocks .md-seg-2 { width: 12.41%; }
.md-blocks .md-seg-3 { width: 20.86%; }
.md-blocks .md-seg-4 { width: 20.86%; }
.md-blocks .md-seg-5 { width: 20.86%; }
.md-blocks .md-seg-6 { width: 8.28%; }
.md-blocks button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 46px; padding: 4px 6px; font: inherit; color: #fff; background: color-mix(in srgb, var(--seg) 28%, #101014); border: 2px solid var(--seg); border-radius: 10px; cursor: pointer; overflow: hidden; }
.md-blocks button[aria-pressed="true"] { background: color-mix(in srgb, var(--seg) 70%, #101014); }
.md-blocks b, .md-blocks small { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.md-blocks b { font-size: .85rem; }
.md-blocks small { font-size: .7rem; opacity: .85; }
.md-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md-card { display: flex; gap: 12px; align-items: center; min-height: 92px; padding: 10px 14px; border-left: 5px solid var(--seg); border-radius: 12px; background: #1c1c24; }
.md-card[hidden] { display: none; }
.md-card img { width: 56px; height: 84px; object-fit: cover; border-radius: 8px; }
.md-card p { margin: 4px 0 0; opacity: .85; font-size: .92rem; }
@media (max-width: 720px) {
  .md-screens { grid-template-columns: minmax(0, 1fr); }
  .md-tl > img { height: 26px; }
  .md-blocks small { display: none; }
  .md-blocks b { font-size: .72rem; }
}
.lp-wrap{ max-width: none; margin: 0 auto; padding: 0 clamp(16px, 3vw, 56px); }
.lp-nav{ position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.lp-nav .lp-wrap{ display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.lp-nav .brand{ text-decoration: none; color: var(--text); }
.lp-nav .brand{ display: inline-flex; align-items: center; }
.lp-nav .brand img{ height: 48px; width: auto; display: block; }
.lp-foot .lp-wrap{ max-width: 1400px; }
.lp .lp-nav .lp-wrap{ max-width: none; }
.lp-nav{ backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); }
@supports (animation-timeline: view()){.lp-nav::after{ content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; background: linear-gradient(90deg, var(--accent), var(--pink)); transform-origin: 0 50%; animation: fx-progress linear both; animation-timeline: scroll(root); }
}
@media (prefers-reduced-motion: reduce){.lp-nav::after{ animation: none !important; }
}
@keyframes nav-shrink{ to { padding-top: 5px; padding-bottom: 5px; } }
@keyframes nav-logo{ to { height: 33px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent)); } }
@keyframes nav-edge{ to { box-shadow: 0 14px 32px -22px color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--bg) 78%, transparent); } }
@keyframes nav-logo-m{ to { height: 30px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent)); } }
@supports (animation-timeline: scroll()){.lp-nav{ animation: nav-edge linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
.lp-nav .lp-wrap{ animation: nav-shrink linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
.lp-nav .brand img{ animation: nav-logo linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
@media (max-width: 700px){.lp-nav .brand img{ animation-name: nav-logo-m; }
}
}
@keyframes nav-logo-l{ to { height: 33px; } }
@keyframes nav-logo-lm{ to { height: 30px; } }
@supports (animation-timeline: scroll()){@media (prefers-color-scheme: light){.lp-nav .brand img{ animation-name: nav-logo-l; }
}
@media (prefers-color-scheme: light) and (max-width: 700px){.lp-nav .brand img{ animation-name: nav-logo-lm; }
}
}
@media (prefers-reduced-motion: reduce){.lp-nav,.lp-nav .lp-wrap,.lp-nav .brand img{ animation: none !important; }
}
.lp .pp.lp-wrap{ padding-top: 20px; padding-bottom: 80px; max-width: 1920px; padding-left: clamp(12px, 1.2vw, 24px); padding-right: clamp(12px, 1.2vw, 24px); }
.lp-nav .lp-wrap{ position: relative; gap: 14px; }
.nv-video{ --c1: #6d5ef5; --c2: #b254f0; }
.nv-image{ --c1: #db3f91; --c2: #ff7a45; }
.nv-audio{ --c1: #0d9488; --c2: #35b865; }
.nv-text{ --c1: #2563eb; --c2: #0ea5c6; }
.nv-explore{ --c1: #d97706; --c2: #e5484d; }
.nv-lang{ --c1: var(--accent); --c2: var(--pink); }
.nv-item > summary{ list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; user-select: none; }
.nv-item > summary::-webkit-details-marker{ display: none; }
.nv-item > summary::after{ content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .55; transition: transform .2s; }
.nv-item[open] > summary::after{ transform: translateY(1px) rotate(225deg); }
.nv-item > summary > .nv-ic,.nv-link > .nv-ic{ color: var(--c1); flex: none; }
.nv-link{ --c1: #16a34a; display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--text); }
.nv-mcp{ --c1: #7c3aed; --c2: #e255c5; }
.nv-dot{ display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .22); }
.nv-col b .nv-dot{ margin-left: 8px; }
html.mcp-on .nv-mcp{ --c1: #16a34a; --c2: #22c55e; }
html.mcp-on .nv-mcp-entry .nv-tile{ color: #16a34a; background: rgba(34, 197, 94, .16); }
.nv-item.nv-mcp > summary::after{ display: none; }
.nv-mcp em{ font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; padding: 3px 8px; border-radius: 999px; color: #fff; background: linear-gradient(120deg, var(--c1), var(--c2)); }
.nv-h{ display: flex; align-items: center; gap: 6px; margin: 0 0 8px !important; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.nv-col ul{ list-style: none; margin: 0; padding: 0; }
.nv-col li a{ display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; color: var(--text); text-decoration: none; font-size: .92rem; line-height: 1.25; }
.nv-col li a > span{ display: flex; flex-direction: column; min-width: 0; }
.nv-col li a b{ font-weight: 600; }
.nv-col li a small{ color: var(--muted); font-size: .78rem; }
.nv-col li a:hover,.nv-col li a:focus-visible{ background: color-mix(in srgb, var(--c1) 12%, transparent); }
.nv-tile{ flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 15%, transparent); color: color-mix(in srgb, var(--c1) 78%, var(--text)); transition: background .15s, color .15s, transform .15s; }
.nv-col li a:hover .nv-tile{ background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; transform: translateY(-1px); }
.nv-explore li:nth-child(2){ --c1: #6d5ef5; --c2: #b254f0; }
.nv-explore li:nth-child(3){ --c1: #0d9488; --c2: #35b865; }
.nv-explore li:nth-child(4){ --c1: #db3f91; --c2: #ff7a45; }
.nv-explore .nv-col:nth-child(2) li:nth-child(1){ --c1: #7c3aed; --c2: #e255c5; }
.nv-explore .nv-col:nth-child(2) li:nth-child(2){ --c1: #2563eb; --c2: #0ea5c6; }
.nv-explore .nv-col:nth-child(2) li:nth-child(3){ --c1: #d97706; --c2: #e5484d; }
.nv-plugins{ grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none; line-height: 1.3; background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 14%, transparent), color-mix(in srgb, var(--c2) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--c1) 28%, transparent); }
.lp-nav a.nv-plugins,.lp-nav a.nv-plugins:hover{ color: var(--text); }
.lp-nav a.nv-plugins:hover,.lp-nav a.nv-plugins:focus-visible{ border-color: var(--c1); }
.nv-plugins > span:not(.nv-tile){ display: flex; flex-direction: column; min-width: 0; }
.nv-plugins b{ font-weight: 700; font-size: .93rem; }
.nv-plugins small{ color: var(--muted); font-size: .8rem; }
.nv-mcp .nv-plugins em{ margin-left: 6px; font-size: .62rem; text-transform: uppercase; display: inline-block; vertical-align: 1px; }
.nv-plugins > i{ margin-left: auto; font-style: normal; font-weight: 800; }
.nv-film{ grid-column: 1 / -1; justify-self: end; margin-top: -4px; padding: 2px 6px; font-size: .84rem; font-weight: 700; text-decoration: none; }
.nv-intro{ display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; border-radius: 16px; text-decoration: none; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(140deg, color-mix(in srgb, var(--c1) 88%, #000), var(--c1) 45%, color-mix(in srgb, var(--c2) 82%, #000)); }
.lp-nav a.nv-intro,.lp-nav a.nv-intro:hover{ color: #fff; }
.nv-intro b{ font-size: 1.45rem; line-height: 1.15; }
.nv-intro > span:not(.nv-badge){ font-size: .93rem; line-height: 1.45; }
.nv-intro em{ margin-top: auto; font-style: normal; font-weight: 700; font-size: .88rem; background: #fff; color: #17131f; border-radius: 999px; padding: 8px 14px; }
.nv-badge{ width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.nv-badge .nv-ic{ width: 26px; height: 26px; }
.nv-studios{ --c1: #e0457b; --c2: #7c5cf6; }
.st-tiles{ list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1040px; }
.st-tiles a{ display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 6px 6px 10px; border-radius: 16px; text-decoration: none; color: var(--text); line-height: 1.3; }
.st-tiles a:hover,.st-tiles a:focus-visible{ background: color-mix(in srgb, var(--c1) 12%, transparent); }
.st-tiles img,.st-art{ display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 5px; }
.st-art{ display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.st-art.st-canvas{ background: linear-gradient(135deg, #0d9488, #2563eb); }
.st-art .nv-ic{ width: 38px; height: 38px; }
.st-tiles b{ font-weight: 700; font-size: .93rem; padding: 0 4px; }
.st-tiles small{ color: var(--muted); font-size: .78rem; padding: 0 4px; }
.nv-studios .nv-note{ max-width: 1040px; }
.nv-note{ margin: 14px 0 0 !important; padding: 10px 14px; border-radius: 12px; font-size: .85rem; color: var(--text); background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 14%, transparent), color-mix(in srgb, var(--c2) 8%, transparent)); }
.nv-actions{ display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nv-actions .btn{ white-space: nowrap; min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.lp-nav a.btn.primary,.lp-nav a.btn.primary:hover{ color: var(--accent-text); }
.nv-lang{ position: relative; }
.nv-lang > summary{ border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; min-height: 40px; font-weight: 700; font-size: .86rem; }
.nv-langs{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.nv-langs a{ display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: .92rem; white-space: nowrap; }
.nv-langs a:hover,.nv-langs a:focus-visible{ background: var(--accent-soft); }
.nv-langs a[aria-current]{ background: linear-gradient(120deg, var(--accent), var(--pink)); color: #fff; font-weight: 700; }
.nv-burger{ display: none; }
.nv-status{ --lamp: #9ca3af; flex: none; display: grid; place-items: center; width: 34px; height: 40px; border-radius: 10px; }
.nv-status:hover,.nv-status:focus-visible{ background: color-mix(in srgb, var(--lamp) 16%, transparent); }
.nv-status i{ width: 11px; height: 11px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lamp) 24%, transparent), 0 0 10px 2px color-mix(in srgb, var(--lamp) 70%, transparent); }
.nv-status[data-state="ok"]{ --lamp: #22c55e; }
.nv-status[data-state="degraded"]{ --lamp: #f59e0b; }
.nv-status[data-state="down"]{ --lamp: #ef4444; }
.nv-status[data-state] i{ animation: nv-lamp 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){.nv-status[data-state] i{ animation: none; }
}
@media (max-width: 560px){.nv-status{ width: 24px; }
}
@media (min-width: 1101px){.nv-menu[popover]{ display: flex; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.nv-top,.nv-extra{ display: none; }
.nv-list{ display: flex; align-items: center; gap: 2px; }
.nv-list > .nv-item > summary,.nv-list > .nv-link{ min-height: 42px; padding: 0 10px; border-radius: 10px; font-size: .95rem; font-weight: 600; white-space: nowrap; }
.nv-list > .nv-item > summary:hover,.nv-list > .nv-item[open] > summary,.nv-list > .nv-link:hover{ background: color-mix(in srgb, var(--c1) 13%, transparent); }
.nv-list [aria-current="page"]{ box-shadow: inset 0 -2px 0 var(--c1); }
.nv-panel{ position: absolute; top: 100%; left: clamp(8px, 2vw, 32px); right: clamp(8px, 2vw, 32px); z-index: 20; margin-top: 1px; padding: 18px; max-height: calc(100vh - 90px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c1); border-radius: 4px 4px 22px 22px; box-shadow: 0 40px 80px -30px rgba(10, 6, 30, .45); animation: nv-in .18s ease both; }
.nv-panel::before{ content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; }
.nv-item[open] > .nv-panel{ overflow: visible; }
.nv-grid{ display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 2.4fr) minmax(180px, .8fr); gap: 22px; align-items: stretch; max-width: 1280px; margin: 0 auto; }
.nv-tools ul.two{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
.nv-models{ border-left: 1px solid var(--line); padding-left: 18px; }
.nv-explore .nv-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 960px; }
.nv-mcp .nv-grid{ grid-template-columns: minmax(220px, .9fr) repeat(3, minmax(0, 1fr)); max-width: 1180px; }
.nv-note{ max-width: 1280px; margin-inline: auto !important; }
.nv-explore .nv-note{ display: none; }
.nv-lang .nv-panel{ left: auto; right: 0; top: calc(100% + 8px); width: 300px; padding: 8px; border-radius: 4px 4px 16px 16px; }
.nv-lang .nv-panel::before{ top: -14px; height: 14px; }
}
@media (max-width: 1480px){.nv-promo .promo-text{ display: none; }
.lp-nav .nv-promo a.btn.promo{ gap: 0; padding: 0 8px; }
}
@media (min-width: 1101px) and (max-width: 1320px){.nv-list > .nv-item > summary,.nv-list > .nv-link{ padding: 0 6px; font-size: .9rem; gap: 5px; }
.nv-list > .nv-item > summary > .nv-ic,.nv-list > .nv-link > .nv-ic{ display: none; }
.lp-nav .lp-wrap{ gap: 8px; }
}
@media (min-width: 1101px){.nv-list.nv-noicons > .nv-item > summary > .nv-ic,.nv-list.nv-noicons > .nv-link > .nv-ic{ display: none; }
}
@media (min-width: 1101px) and (max-width: 1200px){.nv-mcp > summary em{ display: none; }
}
@media (max-width: 1100px){.nv-menu:popover-open{ display: flex; flex-direction: column; position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); border: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--text); animation: nv-in .2s ease both; }
.nv-top{ position: sticky; top: 0; z-index: 2; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 1.15rem; }
.nv-close{ font: inherit; font-size: 1.1rem; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.nv-list,.nv-extra{ flex: none; width: 100%; max-width: 640px; margin-inline: auto; }
.nv-list{ display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.nv-list > .nv-item,.nv-list > .nv-link{ border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.nv-list > .nv-item[open]{ border-color: color-mix(in srgb, var(--c1) 55%, var(--line)); }
.nv-list > .nv-item > summary,.nv-list > .nv-link{ gap: 12px; min-height: 56px; padding: 0 16px 0 10px; font-weight: 700; font-size: 1.02rem; }
.nv-list > .nv-item > summary::after{ margin-left: auto; }
.nv-list > .nv-item > summary > .nv-ic,.nv-list > .nv-link > .nv-ic{ width: 36px; height: 36px; padding: 8px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2, var(--c1))); }
.nv-list .nv-panel{ padding: 0 10px 12px; }
.nv-list .nv-grid{ display: flex; flex-direction: column; gap: 14px; }
.nv-intro{ padding: 14px 16px; }
.nv-badge{ display: none; }
.nv-intro b{ font-size: 1.15rem; }
.nv-models ul{ display: flex; flex-wrap: wrap; gap: 6px; }
.st-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nv-models li a{ border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 7px; min-height: 40px; gap: 7px; }
.nv-col li a{ min-height: 48px; }
.nv-extra{ display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.nv-extra a.btn.promo{ justify-content: center; min-height: 48px; }
.nv-cta{ display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.nv-cta .btn{ min-height: 48px; display: grid; place-items: center; }
.nv-extra .nv-h{ margin-top: 6px !important; }
.nv-extra .nv-langs a{ border: 1px solid var(--line); min-height: 44px; }
.nv-actions{ gap: 8px; }
.nv-burger{ display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; flex: none; }
.nv-burger span,.nv-burger span::before,.nv-burger span::after{ display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; content: ""; }
.nv-burger span{ position: relative; }
.nv-burger span::before,.nv-burger span::after{ position: absolute; left: 0; }
.nv-burger span::before{ top: -6px; }
.nv-burger span::after{ top: 6px; }
.lp-nav .brand img{ height: 38px; }
html:has(.nv-menu:popover-open){ overflow: hidden; }
}
@media (min-width: 561px) and (max-width: 1100px){.nv-tools ul{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
}
@media (max-width: 560px){.lp-nav .lp-wrap{ gap: 8px; padding-left: 12px; padding-right: 12px; }
.lp-nav .brand img{ height: 36px; }
.nv-actions .btn{ padding: 8px 11px; font-size: .86rem; }
}
@media (max-width: 480px){.nv-actions .nv-promo{ display: none; }
}
@media (max-width: 374px){.nv-actions .nv-start{ display: none; }
}
@media (prefers-reduced-motion: reduce){.nv-panel,.nv-menu,.nv-tile{ animation: none !important; transition: none !important; }
}
.nv-im .im-tiles{ list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; }
.nv-im .im-tiles a{ display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); height: 100%; }
.nv-im .im-tiles a:hover,.nv-im .im-tiles a:focus-visible{ border-color: var(--c1); }
.nv-im .im-tiles img{ width: 100%; height: 76px; object-fit: cover; border-radius: 9px; margin-bottom: 4px; }
.nv-im .im-tiles b{ font-size: .9rem; line-height: 1.2; }
.nv-im .im-tiles small{ color: var(--muted); font-size: .74rem; line-height: 1.3; }
.nv-im .im-cols{ display: flex; flex-direction: column; gap: 14px; }
.nv-im .im-row b em{ margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-style: normal; font-size: .64rem; font-weight: 800; text-transform: uppercase; vertical-align: middle; color: #fff; background: #db3f91; }
.nv-im .im-row b em.im-new{ background: #0d9488; }
.nv-im .im-row small{ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nv-im .im-more > summary{ cursor: pointer; padding: 10px 8px; font-weight: 700; font-size: .86rem; color: var(--c1); }
.nv-im .im-card{ display: none; }
.nv-im .nv-note a{ font-weight: 700; }
@media (min-width: 1101px){.nv-list > .nv-image,.nv-list > .nv-video{ position: relative; }
.nv-list > .nv-image .nv-panel.nv-im{ left: 0; right: auto; width: 544px; }
.nv-list > .nv-video .nv-panel.nv-im{ left: 0; right: auto; width: 544px; }
.nv-im .im-cols{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 14px; align-items: start; }
.nv-im .im-models{ border-left: 1px solid var(--line); padding-left: 12px; }
.nv-im .im-scroll{ max-height: max(220px, calc(100vh - 420px)); overflow-y: auto; overscroll-behavior: contain; }
.nv-im .im-row small{ display: none; }
.nv-im .im-card{ position: absolute; top: 0; z-index: 2; width: 264px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(10, 6, 30, .55); font-size: .88rem; }
.nv-im .im-card::before{ content: ""; position: absolute; top: 0; bottom: 0; width: 10px; }
.nv-im .im-left{ right: calc(100% + 8px); }
.nv-im .im-left::before{ right: -10px; }
.nv-im .im-right{ left: calc(100% + 8px); }
.nv-im .im-right::before{ left: -10px; }
.nv-im:not(.im-js) .im-item:hover > .im-card,.nv-im:not(.im-js) .im-item:focus-within > .im-card,.nv-im .im-item.on > .im-card{ display: block; }
.nv-im .im-facts{ list-style: none; display: grid; gap: 4px; font-size: .86rem; }
.nv-im .im-facts li::before{ content: "✓ "; color: var(--c1); font-weight: 800; }
.nv-im .im-card-h{ display: block; font-size: 1rem; margin-bottom: 6px; }
.nv-im .im-card p{ margin: 0 0 10px; color: var(--muted); line-height: 1.45; }
.nv-im .im-card ul{ margin: 0 0 10px; padding: 0; }
.nv-im .im-card li a{ padding: 6px 8px; font-size: .86rem; border: 1px solid var(--line); margin-bottom: 5px; }
.nv-im .im-card li a .nv-ic{ flex: none; color: var(--c1); }
.nv-im .im-go{ display: inline-block; font-weight: 700; color: var(--c1); text-decoration: none; }
}
@media (min-width: 1101px) and (max-width: 1140px){.nv-im .im-card{ width: 250px; }
}
.nv-actions .pf-menu{ text-align: left; }
.nv-actions .pf-pop a.pf-item,.nv-actions .pf-pop a.pf-buy{ text-decoration: none; }
.nv-actions .pf-pop a.pf-buy{ color: #fff; }
@media (max-width: 560px){.nv-actions .kr-pill{ padding: 5px 9px 5px 10px; font-size: .82rem; }
}
@media (max-width: 1100px){.nv-actions .nv-lang .nv-panel{ position: fixed; top: 62px; right: 12px; z-index: 40; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 76px); overflow-y: auto; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
}
@media (max-width: 560px){.lp-nav .lp-wrap,.lp-nav .nv-actions{ gap: 6px; }
.lp-nav .brand img{ height: 36px; }
.nv-actions .nv-lang > summary{ gap: 5px; padding: 0 8px; }
.nv-actions .nv-lang > summary > .nv-ic{ display: none; }
.nv-actions .pf-trigger,.nv-actions .pf-avatar{ width: 40px; height: 40px; }
.nv-actions .pf-pop .pf-avatar{ width: 40px; height: 40px; }
.nv-actions .nv-burger{ width: 40px; height: 40px; }
}
@media (max-width: 400px){.lp-nav .lp-wrap,.lp-nav .nv-actions{ gap: 5px; }
.lp-nav .brand img{ height: 34px; }
.nv-actions .nv-lang > summary{ padding: 0 6px; }
.nv-actions .kr-pill::after{ display: none; }
}
@media (max-width: 359px){.lp-nav .brand img{ height: 30px; }
.nv-actions .kr-pill i{ display: none; }
}
@media (max-width: 700px){.lp-nav .brand img{ aspect-ratio: 280 / 252; width: auto; object-fit: cover; object-position: left center; }
}
.lp-foot .paym{ margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.pp-free{ --c1: #8a8f9c; --c2: #b9bdc8; }
.pp-starter{ --c1: #2f7cf6; --c2: #22c3e6; }
.pp-plus{ --c1: #5b3df5; --c2: #e255c5; }
.pp-pro{ --c1: #0f9d77; --c2: #a3d939; }
.pp-ultra{ --c1: #f0427c; --c2: #ff9a3d; }
.pp-toggle{ display: flex; width: max-content; margin: 0 auto 22px; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.pp-toggle label{ cursor: pointer; border-radius: 999px; padding: 9px 20px; font-weight: 600; }
.pp-toggle em{ font-style: normal; font-size: .75rem; font-weight: 800; background: #d8ff3e; color: #17181c; border-radius: 999px; padding: 2px 7px; margin-left: 4px; }
#bill-month:checked ~ .pp-toggle .t-month,#bill-year:checked ~ .pp-toggle .t-year{ background: var(--accent); color: var(--accent-text); }
#bill-month:focus-visible ~ .pp-toggle .t-month,#bill-year:focus-visible ~ .pp-toggle .t-year{ outline: 3px solid var(--accent); outline-offset: 2px; }
.pp-cards{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1180px){.pp-cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px){.pp-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){.pp-cards{ grid-template-columns: 1fr; }
}
.pp-card{ position: relative; display: flex; flex-direction: column; border-radius: 20px; padding: 22px 18px; border: 1px solid color-mix(in srgb, var(--c1) 45%, var(--line)); background: linear-gradient(170deg, color-mix(in srgb, var(--c1) 22%, var(--surface)), var(--surface) 46%, color-mix(in srgb, var(--c2) 10%, var(--surface))); transition: transform .18s ease, box-shadow .18s ease; }
.pp-card:hover{ transform: translateY(-3px); box-shadow: 0 24px 44px -28px var(--c1); }
.pp-card.featured{ border: 2px solid var(--c2); box-shadow: 0 26px 52px -28px var(--c2); }
.pp-badge{ align-self: flex-start; font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, var(--c1), var(--c2)); border-radius: 999px; padding: 3px 10px; }
.pp-card > .pp-badge{ position: absolute; top: -11px; left: 18px; }
.pp-card h3{ font-size: 1.35rem; margin-bottom: 2px; }
.pp-for{ color: var(--muted); font-size: .88rem; min-height: 2.8em; }
.pp-price{ margin: 0; }
.pp-price b{ font-size: 2.1rem; letter-spacing: -.03em; }
.pp-price span,.pp-usd{ color: var(--muted); font-size: .88rem; }
.pp-usd{ margin: 0; }
.pp-sub{ font-size: .84rem; color: var(--muted); min-height: 4.6em; margin: 4px 0 10px; }
.pp-card .when-year,.pp-card .when-month{ display: flex; flex-direction: column; }
.pp-cta{ display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; font-weight: 800; text-decoration: none; text-align: center; padding: 10px 12px; color: #10121a; background: linear-gradient(100deg, color-mix(in srgb, var(--c1) 35%, #fff), color-mix(in srgb, var(--c2) 55%, #fff)); transition: transform .15s ease, box-shadow .15s ease; }
.pp-cta:hover,.pp-cta:focus-visible{ transform: translateY(-2px); box-shadow: 0 14px 26px -14px var(--c2); }
.pp-plus .pp-cta{ color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); }
.pp-cta em{ font-style: normal; font-size: .76rem; background: #17181c; color: #d8ff3e; border-radius: 999px; padding: 2px 8px; }
.pp-credits{ display: flex; flex-direction: column; margin-top: 16px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c1) 14%, transparent); font-size: .9rem; }
.pp-list{ list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.pp-list li{ position: relative; padding-left: 22px; }
.pp-list li::before{ content: "✓"; position: absolute; left: 0; font-weight: 800; color: color-mix(in srgb, var(--c1) 75%, var(--text)); }
.pf-head .pp-sub{ min-height: 0; }
.pp-over{ margin: 0 0 8px; min-height: 2.6em; font-size: .8rem; font-weight: 700; color: color-mix(in srgb, var(--c1) 70%, var(--text)); }
.pp-card .when-year .pp-cta,.pp-card .when-month .pp-cta{ margin-top: auto; }
.pp-makes{ list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: .76rem; color: var(--muted); }
.pp-makes li,.pks-makes li{ display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; }
.pp-makes b{ color: var(--text); }
.paym{ display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin: 16px 0; font-size: .82rem; color: var(--muted); }
.paym b{ display: inline-flex; align-items: center; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--surface); color: var(--text); }
.paym-mark{ display: block; height: 32px; width: auto; }
.paym-mark.pay-google{ height: 52px; margin: -10px -8px; }
.paym-mark.pay-visa{ box-sizing: border-box; width: 76px; object-fit: cover; background: #fff; border: 1px solid #c9ccd4; border-radius: 6px; }
.paym-mark.pay-blik{ height: 56px; margin: -12px -13px; }
.paym-mark.pay-paypal{ box-sizing: border-box; width: 72px; object-fit: contain; padding: 8px 10px; background: #fff; border: 1px solid #c9ccd4; border-radius: 6px; }
.paym-mark.pay-revolut{ box-sizing: border-box; width: 104px; object-fit: contain; padding: 8px 10px; background: #fff; border: 1px solid #c9ccd4; border-radius: 6px; }
.pks{ --c1: #5b3df5; --c2: #e255c5; max-width: 880px; margin: 0 auto; }
.pks-ctl input{ width: 100%; accent-color: var(--accent); }
.pks-marks{ display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); margin-bottom: 14px; }
.pks-pack{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--surface); margin-bottom: 12px; }
.pks-pack[hidden]{ display: none; }
.pks-pack p{ margin: 4px 0; }
.pks-price b{ font-size: 2.2rem; letter-spacing: -.03em; }
.pks-credits{ font-weight: 700; }
.pks-credits em{ font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
.pks .pp-cta{ margin-top: 12px; color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); }
.pks-makes ul{ list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: .86rem; }
@media (max-width: 640px){.pks-pack{ grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce){.pp-card,.pp-cta{ transition: none; }
.pp-card:hover,.pp-cta:hover{ transform: none; }
}
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.packs .pack .pp-cta{ margin-top: auto; color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); }
[data-plan] .pp-cta.is-current,[data-plan] .pp-cta.is-lower{ color: var(--text); background: color-mix(in srgb, var(--text) 12%, transparent); }
[data-plan] .pp-cta.is-lower{ font-weight: 600; }
.packs .pack > .pp-badge{ color: #fff; background: linear-gradient(100deg, #5b3df5, #c92fae); }
