/* ==========================================================================
   RASIK AI — base styles shared by the landing, legal/SEO pages and the app.
   Design «Галерея» (docs/DESIGN_GALLERY.md): the real palette, fonts and components live in gallery.css
   (--g-* tokens, light by default, dark «Вечерняя» on :root[data-theme="dark"]). The names below are the
   former «Монтажный стол» tokens kept as aliases, so every not-yet-restyled component follows the gallery
   palette and fonts in both themes. Every page links gallery.css next to this file.
   Contents: aliases · reset · legacy components still emitted by markup — SEO/legal pages (steps, reel,
   prices, final, prose) and the turnkey wizard / legacy app screens (wizard.js, app.js #/orders #/balance
   #/invite #/help, extras.js). Rules no page or script emits any more were removed (foundation, 2026-10):
   a class stays only while some HTML/JS string can still produce it; verified by a computed-style A/B crawl.
   ========================================================================== */

:root {
  --paper: var(--g-paper);
  --ink: var(--g-ink);
  --muted: var(--g-muted);
  --dim: var(--g-muted);
  --acc: var(--g-accent);
  --acc-ink: var(--g-on-accent);
  --acc-hover: var(--g-accent-hover);
  --acc-soft: var(--g-accent-soft);
  --acc-line: color-mix(in srgb, var(--g-accent) 40%, transparent);
  --hand: var(--g-accent);
  --card: var(--g-paper);
  --card-2: var(--g-soft);
  --warm: var(--g-soft);
  --note: var(--g-soft);
  --line: var(--g-line);
  --line-2: var(--g-line-strong);
  --ink-soft: color-mix(in srgb, var(--g-ink) 6%, transparent);
  --frame: var(--g-paper);
  --cap-ink: var(--g-ink);
  --cap-mute: var(--g-muted);
  --tape: transparent;
  --hl: color-mix(in srgb, var(--g-accent) 22%, transparent);
  --ok: var(--g-ok);
  --ok-soft: var(--g-ok-soft);
  --warn: var(--g-warn);
  --warn-soft: var(--g-warn-soft);
  --err: var(--g-danger);
  --err-soft: var(--g-danger-soft);
  --info: var(--g-info);
  --info-soft: var(--g-info-soft);
  --star: var(--g-warn);
  --c1: #9C4B32; --c2: #8A6116; --c3: #4E6A3D; --c4: #3D5A73; --c5: #7A4A6E; --c6: #8B5A3C;
  --th-horror: #ECE6E3; --th-family: #F1E8DA; --th-ad: #F3E4DD; --th-free: #E5E9E1;
  --shadow-sm: none;
  --shadow: var(--g-shadow-pop);
  --shadow-pol: var(--g-shadow-sm);
  --btn-shadow: none;
  --glow: 0 0 0 1px var(--g-accent);

  --font-display: var(--g-font-ui);
  --font-ui: var(--g-font-ui);
  --font-hand: var(--g-font-ui);
  --r: var(--g-r-sm);
  --r-card: var(--g-r-md);
  --r-lg: var(--g-r-md);
  --ease: var(--g-ease, cubic-bezier(.2, .7, .2, 1));
  --dur: 180ms;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* dark «Вечерняя» only by explicit choice (menu «Тема», profile, toggle; «как в системе» is resolved by theme.js) */
:root[data-theme="dark"] {
  --c1: #D9805F; --c2: #E0B860; --c3: #9DBA86; --c4: #9DB6CC; --c5: #C99BBE; --c6: #D8A47F;
  --th-horror: #2A2624; --th-family: #2D271F; --th-ad: #2E2420; --th-free: #222821;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background-color: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: var(--paper);
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--hl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 1000; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r); font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
section[id] { scroll-margin-top: 84px; }
.section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 820px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--acc); margin-bottom: 14px; }
.h2 { font-family: var(--font-display); font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -.02em; line-height: 1.1; font-weight: 700; text-wrap: balance; }
.h3 { font-family: var(--font-display); font-size: clamp(19px, 1.8vw, 21px); letter-spacing: -.01em; font-weight: 600; line-height: 1.25; }
.lead { color: var(--muted); font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.65; margin-top: 16px; text-wrap: pretty; }
.grad-text { color: var(--acc); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* handwriting */
.hand { position: relative; display: inline-block; font-family: var(--font-hand); font-weight: 700; color: var(--hand); letter-spacing: 0; white-space: nowrap; }

/* polaroid + tape */
.polaroid { position: relative; background: var(--frame); padding: 9px 9px 40px; border-radius: 3px; box-shadow: var(--shadow-pol); }
.pol-cap { position: absolute; left: 12px; right: 12px; bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--font-hand); font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--cap-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pol-cap span { color: #B9473A; flex: none; }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.card { padding: clamp(20px, 2.4vw, 28px); }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 22px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  font-family: var(--font-ui); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .25s, color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .5; pointer-events: none; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16.5px; }
.btn-block { width: 100%; white-space: normal; text-align: center; line-height: 1.2; }
@media (max-width: 420px) { .btn-lg { --h: 52px; padding: 0 20px; font-size: 15.5px; } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary, .tg-btn { color: var(--acc-ink); background: var(--acc); box-shadow: var(--btn-shadow); }
.btn-primary:hover, .tg-btn:hover { background: var(--acc-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink-soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: .85; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chips / badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge.s-done { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.s-work { color: var(--acc); background: var(--acc-soft); border-color: transparent; }
.badge.s-work::before, .badge.s-fix::before { animation: pulse 1.4s ease-in-out infinite; }
.badge.s-queue { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.s-fix { color: var(--acc); background: var(--acc-soft); border-color: transparent; }
.badge.s-err { color: var(--err); background: var(--err-soft); border-color: transparent; }
.badge.s-ref { color: var(--info); background: var(--info-soft); border-color: transparent; }
.badge.s-draft { color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* hero copy animates on load (no wait for IntersectionObserver → faster first paint) */

/* ==========================================================================
   LANDING
   ========================================================================== */
.hero-ctas { position: relative; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* stage: polaroids */
.reel .badge { background: rgba(29, 24, 19, .62); color: #fff; border-color: rgba(255, 255, 255, .16); }

/* idea → script note */

/* marquee */

/* steps */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; }
.step-num { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: var(--r-card); display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 22px; color: var(--ink); transition: transform .5s var(--ease); }
.step:hover .step-num { transform: translateY(-2px) rotate(-2deg); }
.step-num svg { width: 28px; height: 28px; }
.step-num::after { content: attr(data-n) "."; position: absolute; top: -20px; right: -16px; font-family: var(--font-hand); font-size: 36px; font-weight: 700; line-height: 1; color: var(--hand); transform: rotate(-6deg); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
.step .free { display: inline-block; margin-top: 8px; height: auto; padding: 0; background: none; border: 0; font-family: var(--font-hand); font-weight: 700; font-size: 25px; color: var(--hand); transform: rotate(-3deg); }
.step .free::before { display: none; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 72px 1fr; gap: 22px; padding-bottom: 34px; }
  .step-num { margin-bottom: 0; }
}

/* agents bento */

/* examples gallery (polaroids) */
.reel { --rot: -2deg; position: relative; padding: 10px 10px 0; transform: perspective(900px) rotate(var(--rot)) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(var(--lift, 0px)); transition: transform .5s var(--ease), box-shadow .4s var(--ease); }
.reel:nth-child(2) { --rot: 1.5deg; margin-top: 36px; }
.reel:nth-child(3) { --rot: -1.2deg; }
.reel:nth-child(4) { --rot: 2.4deg; margin-top: 36px; }
.reel:hover { box-shadow: 0 26px 44px -18px rgba(44, 36, 28, .5), 0 2px 6px rgba(44, 36, 28, .12); }
.reel-media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 2px; background: #1D1813; }
.reel-media video, .reel-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel .badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.reel-meta { display: grid; gap: 0; padding: 8px 4px 12px; }
.reel-meta b { font-family: var(--font-hand); font-size: 23px; line-height: 1.15; font-weight: 700; color: var(--cap-ink); }
.reel-meta span { font-size: 12.5px; color: var(--cap-mute); font-weight: 500; }
@media (max-width: 900px) {
  .reel { scroll-snap-align: center; }
  .reel:nth-child(2), .reel:nth-child(4) { margin-top: 0; }
}

/* pricing */
.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price { display: flex; flex-direction: column; gap: 4px; padding: 26px 22px; }
.price .p-dur { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price .amt { font-family: var(--font-display); font-size: clamp(32px, 3.3vw, 42px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 10px; transition: opacity .25s; font-variant-numeric: tabular-nums; }
.price .per { font-family: var(--font-hand); color: var(--hand); font-size: 21px; font-weight: 700; line-height: 1.15; }
.price ul { margin: 16px 0 22px; display: grid; gap: 9px; font-size: 14.5px; color: var(--muted); }
.price li { display: flex; gap: 9px; align-items: flex-start; }
.price li::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 4px; background: var(--acc); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.price .btn { margin-top: auto; }
.price.hot { border: 1.5px solid var(--acc); box-shadow: var(--shadow); }
.price.hot .badge { position: absolute; top: -15px; right: 14px; height: auto; padding: 2px 12px 4px; border-radius: 3px; border: 0; background: var(--note); color: var(--ink); font-family: var(--font-hand); font-size: 21px; font-weight: 700; transform: rotate(4deg); box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .3); }
.price.hot .badge::before { display: none; }
.price-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.price-note { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--card); font-size: 14.5px; font-weight: 500; }
.price-note .ic { flex: none; width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); font-size: 18px; }
@media (max-width: 1000px) { .prices { grid-template-columns: repeat(2, 1fr); } .price-notes { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .prices { grid-template-columns: 1fr 1fr; gap: 12px; row-gap: 22px; } .price { padding: 20px 14px; } .price .amt { font-size: clamp(22px, 7.2vw, 30px); } .price .per { font-size: 18px; } .price ul { display: none; } .price .btn { --h: 40px; padding: 0 12px; font-size: 13.5px; margin-top: 14px; } .price.hot .badge { font-size: 18px; right: 8px; } }

/* referral band */
.invite-hero > * { min-width: 0; }

/* FAQ */
.faq { max-width: 840px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: var(--g-r-md); border: 1px solid var(--line); background: var(--card); transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; font-size: 16.5px; border-radius: var(--g-r-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); transition: transform .35s var(--ease), background-color .3s, color .3s; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.8px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); }
.faq summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .35s var(--ease); }
.faq details[open] .pm { background: var(--acc); color: var(--acc-ink); border-color: transparent; transform: rotate(180deg); }
.faq details[open] .pm::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq .ans { padding: 0 20px 20px; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.faq .ans p + p { margin-top: 10px; }
.faq .ans strong { color: var(--ink); }
.faq .ans a { color: var(--acc); }

/* final CTA */
.final { position: relative; text-align: center; padding: clamp(52px, 8vw, 104px) var(--gutter); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.final::before, .final::after { content: ""; position: absolute; top: -10px; width: 82px; height: 22px; background: var(--tape); }
.final::before { left: 28px; transform: rotate(-8deg); }
.final::after { right: 28px; transform: rotate(7deg); }
.final h2 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 60px); letter-spacing: -.025em; line-height: 1.08; font-weight: 700; max-width: 860px; margin: 0 auto; text-wrap: balance; }
.final p { color: var(--muted); margin: 18px auto 0; max-width: 560px; font-size: 17px; }
.final .hero-ctas { justify-content: center; }

/* ==========================================================================
   LEGAL / PROSE
   ========================================================================== */
.legal-hero { position: relative; padding: 132px 0 34px; }
.legal-hero h1 { font-family: var(--g-font-display); font-size: clamp(34px, 5vw, 54px); line-height: 1.15; letter-spacing: -.03em; font-weight: 400; text-wrap: balance; }
.legal-hero p { color: var(--muted); margin-top: 12px; }
.legal-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start; }
.legal-toc { position: sticky; top: 104px; display: grid; gap: 2px; font-size: 14px; padding: 12px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.legal-toc a { color: var(--muted); padding: 6px 10px; border-radius: var(--g-r-md); }
.legal-toc a:hover { color: var(--ink); background: var(--ink-soft); }
.prose { max-width: 760px; font-size: 16px; line-height: 1.75; color: var(--ink); }
.prose > p, .prose > ul, .prose > ol, .prose > h3 { max-width: 65ch; }
.legal-wrap .prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow-sm); }
.prose h2 { font-family: var(--g-font-display); font-size: clamp(23px, 2.5vw, 28px); line-height: 1.25; letter-spacing: -.02em; color: var(--ink); margin: 44px 0 12px; scroll-margin-top: 104px; font-weight: 400; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; color: var(--ink); margin: 24px 0 8px; font-weight: 600; font-family: var(--font-ui); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--acc); }
.prose a { color: var(--acc); text-decoration: underline; text-decoration-color: var(--acc-line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.prose .note { display: block; color: inherit; font-weight: 400; font-size: 15.5px; padding: 16px 18px; border-radius: var(--r); background: var(--note); border: 1px solid var(--line); margin: 0 0 18px; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; padding: 2px 6px; border-radius: var(--g-r-md); background: var(--ink-soft); }
.ph { padding: 1px 6px; border-radius: 4px; background: var(--hl); color: var(--ink); font-weight: 600; white-space: normal; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: 1fr; gap: 20px; } .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; } .legal-toc a { border: 1px solid var(--line); border-radius: 999px; } }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 6px 0 30px; }
.contact-card { display: grid; gap: 6px; align-content: start; }
.contact-card .ic { width: 44px; height: 44px; border-radius: var(--g-r-md); display: grid; place-items: center; font-size: 20px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 8px; }
.contact-card b { color: var(--ink); font-size: 17px; font-family: var(--font-display); }
.contacts-prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow-sm); }

/* ==========================================================================
   SHARED UI & APP SHELL live in gallery.css: toasts, #modal, menus, side sheet, header, demo strip,
   studio sidebar, footer, phone bottom bar, login sheet, skeletons.
   ========================================================================== */
.tg-btn { --h: 52px; width: 100%; font-size: 15.5px; }
.tg-btn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* page headings in app */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; line-height: 1.1; font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* wizard */
.wz-step { margin-bottom: 30px; }
.wz-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; font-size: 16.5px; font-family: var(--font-display); }
.wz-title .n { min-width: 22px; font-family: var(--font-hand); font-size: 32px; font-weight: 700; line-height: .8; color: var(--hand); transform: rotate(-6deg); }
.wz-title .n::after { content: "."; }
.wz-title.done::after { content: "✓"; font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: var(--ok); }
.fmt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fmt-card { position: relative; display: grid; gap: 8px; align-content: start; text-align: left; padding: 16px; border-radius: var(--g-r-md); min-height: 126px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.fmt-card:hover { border-color: var(--line-2); }
.fmt-card b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.fmt-card small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.fmt-card[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc); box-shadow: inset 0 0 0 .5px var(--acc); }
.fmt-card[aria-checked="true"]::after { content: "✓"; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.fmt-card:active { transform: scale(.98); }
@media (max-width: 760px) { .fmt-grid { grid-template-columns: 1fr 1fr; } .fmt-card { min-height: 112px; padding: 14px; } }

.dur-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dur { display: grid; gap: 2px; padding: 13px 10px; border-radius: var(--g-r-md); text-align: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, background-color .2s; }
.dur b { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.dur span { font-size: 13.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.dur:hover { border-color: var(--line-2); }
.dur[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc); box-shadow: inset 0 0 0 .5px var(--acc); }
.dur[aria-checked="true"] span { color: var(--ink); }
@media (max-width: 420px) { .dur-grid { gap: 8px; } .dur { padding: 11px 4px; } .dur b { font-size: 16px; } .dur span { font-size: 12.5px; } }

.idea-box { position: relative; }
.idea-meta { position: absolute; left: 16px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; pointer-events: none; }
.idea-meta .ok { color: var(--ok); }
.idea-ex { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.idea-ex button { color: var(--acc); font-weight: 600; text-align: left; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.idea-ex button:hover { text-decoration-style: solid; }

/* order: writing */
.writing { display: grid; gap: 18px; }
.writer-head { display: flex; align-items: center; gap: 16px; }
.writer-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.writer-head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; min-height: 1.5em; transition: opacity .3s; }
.skel-script { display: grid; gap: 14px; }
.skel-scene { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dots 1.2s infinite; opacity: .3; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 30% { opacity: 1; transform: translateY(-3px); } }

/* order: script — a notebook page with a margin line */
.script-card { --m: 50px; display: grid; gap: 22px; padding-left: calc(var(--m) + 22px); overflow: hidden; }
.script-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--m); width: 1.5px; background: var(--acc-line); }
.sc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-title { font-family: var(--font-display); font-size: clamp(25px, 4.4vw, 34px); letter-spacing: -.02em; line-height: 1.12; font-weight: 700; text-wrap: balance; }
.sc-log { color: var(--muted); font-size: 16px; line-height: 1.6; margin-top: 10px; }
.hook { position: relative; padding: 14px 18px 16px; border-radius: 4px; background: var(--note); border: 1px solid var(--line); transform: rotate(-.4deg); }
.hook p { font-size: 15.5px; font-weight: 500; }
.chars { display: flex; flex-wrap: wrap; gap: 8px; }
.char { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.char i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: var(--card); }
.timeline { position: relative; display: grid; }
.tl-scene { position: relative; display: block; padding: 12px 0 16px; border-bottom: 1px dashed var(--line-2); }
.tl-scene:first-child { padding-top: 4px; }
.tl-scene:last-child { border-bottom: 0; padding-bottom: 0; }
.tl-body { min-width: 0; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.tl-meta .badge { height: 22px; font-size: 11.5px; }
.tl-sum { font-size: 15.5px; line-height: 1.6; }
.lines { display: grid; gap: 6px; margin-top: 10px; }
.dl-line { display: grid; gap: 1px; padding: 8px 13px; border-radius: 3px 12px 12px 12px; background: var(--card-2); border: 1px solid var(--line); max-width: 100%; width: fit-content; }
.dl-line b { font-size: 12px; font-weight: 700; }
.dl-line span { font-size: 14.5px; color: var(--ink); }
@media (max-width: 560px) { .script-card { --m: 34px; padding-left: calc(var(--m) + 14px); } }
.sc-actions { display: grid; gap: 12px; }
.done-actions .btn { min-width: 0; padding: 0 12px; white-space: normal; line-height: 1.2; text-align: center; }
.rev-count { text-align: center; font-size: 13px; color: var(--muted); font-weight: 500; }

/* order: production */
.prod { display: grid; gap: 20px; }
.prod-hero { display: grid; gap: 16px; text-align: center; justify-items: center; padding: 40px 20px 28px; }
.prod-stage { font-family: var(--font-display); font-size: clamp(18px, 3.2vw, 22px); font-weight: 700; }
.progress { position: relative; width: 100%; height: 10px; border-radius: 999px; background: var(--ink-soft); border: 1px solid var(--line); overflow: hidden; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--acc); transition: width .8s var(--ease); }
.progress i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shimmer 1.6s infinite; transform: translateX(-100%); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--note); border: 1px solid var(--line); font-size: 14px; color: var(--ink); font-weight: 500; line-height: 1.5; }
.note svg { color: var(--acc); }

/* order: done */
.done-grid { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 30px; align-items: start; }
.player { position: relative; padding: 10px 10px 42px; transform: rotate(-1.2deg); margin-top: 8px; }
.player-media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 2px; background: #000; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .pol-cap { font-size: 22px; bottom: 8px; }
.done-side { display: grid; gap: 16px; }
.done-title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; line-height: 1.12; font-weight: 700; }
.caption-box { position: relative; padding: 14px 16px; border-radius: var(--r); background: var(--card-2); border: 1px dashed var(--line-2); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.stars { display: inline-flex; gap: 2px; }
.stars button { font-size: 30px; line-height: 1; color: var(--line-2); transition: transform .2s var(--ease), color .2s; padding: 2px; }
.stars button.on { color: var(--star); }
.stars button:hover { transform: scale(1.12); }
.done-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 760px) { .done-grid { grid-template-columns: 1fr; } .player { width: min(100% - 16px, 330px); margin: 8px auto 0; } }

/* states */
.state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 46px 20px; }
.state .emo { width: 84px; height: 84px; border-radius: var(--g-r-md); display: grid; place-items: center; font-size: 40px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 8px; transform: rotate(-3deg); }
.state h2 { font-family: var(--font-display); font-size: 23px; font-weight: 700; }
.state p { color: var(--muted); max-width: 420px; font-size: 15px; }
.state .btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* orders grid */
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.ocard { display: grid; border-radius: var(--r-card); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; text-align: left; padding: 7px 7px 0; }
.ocard:hover { transform: translateY(-3px) rotate(-.5deg); border-color: var(--line-2); box-shadow: var(--shadow); }
.othumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; font-size: 44px; border-radius: var(--g-r-md); }
.othumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.othumb .badge { position: absolute; top: 8px; left: 8px; z-index: 2; max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; display: block; line-height: 22px; background-color: var(--card); border: 1px solid var(--line); }
.othumb .badge::before { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.othumb.g-horror { background: var(--th-horror); }
.othumb.g-family { background: var(--th-family); }
.othumb.g-ad { background: var(--th-ad); }
.othumb.g-free { background: var(--th-free); }
.oinfo { padding: 12px 9px 14px; display: grid; gap: 3px; }
.oinfo b { font-weight: 600; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oinfo span { font-size: 13px; color: var(--muted); font-weight: 500; }
@media (max-width: 480px) { .orders { grid-template-columns: 1fr 1fr; gap: 12px; } .oinfo { padding: 10px 6px 12px; } .othumb { font-size: 36px; } }

/* balance */
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.preset { height: 50px; border-radius: var(--g-r-md); font-weight: 600; font-size: 15px; background: var(--card); border: 1px solid var(--line-2); transition: all .2s; font-variant-numeric: tabular-nums; }
.preset:hover { border-color: var(--acc-line); }
.preset[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc); box-shadow: inset 0 0 0 .5px var(--acc); }
@media (max-width: 480px) { .presets { grid-template-columns: 1fr 1fr; } }
.amount-input { position: relative; }
.amount-input::after { content: "₽"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 18px; }
.pay-note { display: flex; justify-content: center; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 500; text-align: center; }

/* invite */
.invite-hero { position: relative; display: grid; gap: 14px; }
.invite-hero h2 { font-family: var(--font-display); font-size: clamp(24px, 4.6vw, 34px); letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line-2); }
.link-box code { flex: 1; min-width: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(21px, 4.6vw, 30px); letter-spacing: -.02em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
@media (max-width: 400px) { .stat { padding: 13px 10px; } }

/* help chat */
.chat { display: grid; gap: 12px; }
.chat-log { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: var(--g-r-md); font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; animation: view-in .3s var(--ease) both; }
.bubble.me { justify-self: end; background: var(--acc); color: var(--acc-ink); border-bottom-right-radius: 4px; }
.bubble.bot { justify-self: start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.bot .who { display: block; font-family: var(--font-hand); font-size: 19px; font-weight: 700; color: var(--hand); line-height: 1.1; margin-bottom: 2px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form .btn { --h: 52px; width: 52px; padding: 0; flex: none; }

.stack-lg { display: grid; gap: 24px; }
.stack-lg > *, .done-side > * { min-width: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   WIZARD v2 (js/wizard.js): stepper, idea, heroes, styles, script editor,
   cast, launch settings, production, done; growth UI in the cabinet
   ========================================================================== */
/* stepper */
.wz-steps { position: relative; margin: -4px 0 18px; }
.wz-steps ol { position: relative; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 0; align-items: start; }
.wz-steps ol::before { content: ""; position: absolute; left: 7%; right: 7%; top: 15px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 11px); }
.wz-steps li { position: relative; display: grid; justify-items: center; min-width: 0; }
.wz-steps li > a, .wz-steps li > span { display: grid; justify-items: center; gap: 5px; min-width: 0; width: 100%; padding: 0 2px; border-radius: var(--g-r-md); -webkit-tap-highlight-color: transparent; }
@media (max-width: 560px) {
  .wz-steps { margin: -6px -6px 14px; }
  .wz-steps ol::before { top: 12px; }
  .wz-steps:has(li.is-view) { margin-bottom: 34px; }
}
.wz-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.wz-body > .stack-lg, .wz-body > .writing, .wz-body > .prod { min-width: 0; }
.wz-in { animation: wz-in .45s var(--ease) both; }
@keyframes wz-in { from { opacity: 0; transform: translate3d(14px, 0, 0); } }
.wz-head { margin-bottom: 20px; }
.wz-head p { max-width: 620px; }
.wz-body .sc-top { margin-bottom: 16px; }
.wz-body .stack-lg > .sc-top, .wz-body .writing > .sc-top, .wz-body .prod > .sc-top { margin-bottom: 0; }
.wz-bar { position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 10px 10px 20px; margin-top: 22px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.wz-bar .info { min-width: 0; display: grid; }
.wz-bar .info b { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-bar .info span { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.wz-bar .btn { flex: none; }
.wz-fine { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.wz-fine b { color: var(--ink); }
.wz-bar { bottom: calc(var(--g-tabbar-space, 0px) + 12px); }
@media (max-width: 560px) {
  .wz-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; }
  .wz-bar .info { grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; padding: 2px 6px 0; }
  .wz-bar .info b { font-size: 16px; }
  .wz-bar .info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wz-bar .btn { width: 100%; white-space: normal; }
}

/* step 1: formats incl. gift */
.fmt-grid-v2 .fmt-card { min-height: 0; }
.fmt-card .ft { display: grid; gap: 4px; }
.fmt-card.fmt-gift { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--note); border-color: var(--line-2); overflow: visible; }
.fmt-card.fmt-gift b { font-family: var(--font-display); font-size: 18px; }
.fmt-card.fmt-gift small { font-size: 13.5px; }
.fmt-card.fmt-gift[aria-checked="true"] { background: var(--acc-soft); }
@media (max-width: 420px) { .fmt-card.fmt-gift { padding: 16px; gap: 12px; } }
.gift-box { display: grid; gap: 16px; margin: -12px 0 30px; background: var(--card); padding-top: 26px; }
.gb-title { margin: 0; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 4px; -webkit-overflow-scrolling: touch; }
.chips-row::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .chips-row { flex-wrap: wrap; overflow: visible; } }

/* templates */
.tpl-wrap { margin: -4px 0 12px; }
.tpl-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 calc(var(--gutter, 16px) * -1); padding-left: var(--gutter, 16px); padding-right: var(--gutter, 16px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent); scroll-snap-type: x proximity; }
.tpl-row::-webkit-scrollbar { display: none; }
.tpl-chip { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--card); border: 1px dashed var(--line-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.tpl-chip span { font-size: 17px; }
.tpl-chip:hover { border-color: var(--acc); }
.tpl-chip:active { transform: scale(.97); }
.tpl-chip[aria-pressed="true"] { border-style: solid; border-color: var(--acc); background: var(--acc-soft); }
@media (min-width: 901px) { .tpl-row { margin: 0; padding-left: 2px; padding-right: 2px; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; } }

.resume-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 20px; border-radius: var(--g-r-md); background: var(--note); border: 1px solid var(--line-2); transition: transform .2s var(--ease), border-color .2s; }
.resume-card:hover { border-color: var(--acc); transform: translateY(-1px); }
.resume-card > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.resume-card b { font-size: 15px; }
.resume-card small { font-size: 13px; color: var(--muted); }
.resume-card svg { width: 18px; height: 18px; flex: none; color: var(--acc); }

/* step 2: briefing animation */
.brief-anim { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 26px; align-items: center; padding: 30px; overflow: hidden; margin-bottom: 18px; }
.ba-idea { font-size: 14px; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ba-text h2 { font-family: var(--font-display); font-size: clamp(20px, 3.4vw, 24px); font-weight: 700; line-height: 1.2; }
.ba-text p { color: var(--muted); font-size: 15px; margin-top: 8px; min-height: 1.5em; transition: opacity .3s; }
@media (max-width: 640px) { .brief-anim { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; } }

/* step 2: questions */
.idea-card { position: relative; display: grid; gap: 10px; background: var(--note); border-color: var(--line-2); margin-bottom: 16px; padding-top: 24px; }
.ic-k { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.ic-ta { min-height: 96px; resize: none; background: var(--card); font-size: 16px; line-height: 1.55; }
.ic-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.hero-qs { display: grid; gap: 14px; margin-bottom: 16px; }
.hero-q { display: grid; gap: 16px; }
.hq-head { display: flex; align-items: center; gap: 12px; }
.hq-ava { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--card); transform: rotate(-4deg); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line-2); }
.hq-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.hq-head small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.hq-q { display: grid; gap: 8px; min-width: 0; }
@media (min-width: 900px) { .hero-qs { grid-template-columns: 1fr 1fr; } .hero-qs > :only-child { grid-column: 1 / -1; } }

/* step 3: styles */
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; padding-top: 10px; }
@media (min-width: 640px) { .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; } }
.style-grid.one { grid-template-columns: minmax(0, 300px); justify-content: center; }
.style-card { position: relative; display: grid; align-content: start; text-align: left; padding: 8px 8px 12px; border-radius: 3px; background: var(--frame); color: var(--cap-ink); box-shadow: var(--shadow-pol); transform: rotate(var(--rot, 0deg)); transition: transform .35s var(--ease), box-shadow .3s, outline-color .2s; outline: 3px solid transparent; outline-offset: 3px; -webkit-tap-highlight-color: transparent; }
button.style-card:hover { transform: rotate(0deg) translateY(-3px); }
button.style-card:active { transform: scale(.98); }
.style-card[aria-checked="true"] { transform: rotate(0deg) translateY(-4px) scale(1.02); outline-color: var(--acc); box-shadow: 0 22px 40px -18px rgba(110, 40, 28, .55), 0 2px 6px rgba(0, 0, 0, .12); }
.sc-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #EFE6D8; }
.sc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.sc-media.has-img img { opacity: 1; }
.sc-media.no-img img { display: none; }
.sc-ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; color: #5B4632; }
.sc-media.has-img .sc-ph { opacity: 0; }
.sc-ph span { font-family: var(--font-hand); font-weight: 700; font-size: clamp(24px, 6vw, 32px); line-height: 1; transform: rotate(-6deg); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.sc-ph.ph-0 { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .6) 0 18%, transparent 19%) 0 0 / 26px 26px, #F4DDC4; }
.sc-ph.ph-1 { background: repeating-linear-gradient(135deg, #E6EEE4 0 10px, #DCE7D8 10px 20px); color: #3E5A44; }
.sc-ph.ph-2 { background: linear-gradient(rgba(60, 106, 150, .12) 1px, transparent 1px) 0 0 / 100% 16px, #E8EEF6; color: #34506E; }
.sc-ph.ph-3 { background: radial-gradient(circle, rgba(185, 71, 58, .22) 1.6px, transparent 2px) 0 0 / 12px 12px, #F7E4DE; color: #8A3227; }
.sc-ph.ph-4 { background: conic-gradient(from 45deg, #F3E6C8 25%, #EEDDB8 0 50%, #F3E6C8 0 75%, #EEDDB8 0) 0 0 / 22px 22px; color: #6E5520; }
.sc-rec { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(29, 24, 19, .66); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.6; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-desc { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--cap-mute); }
.sc-fit { display: inline-block; margin-top: 7px; padding: 1px 8px; border-radius: 999px; border: 1px dashed rgba(44, 36, 28, .25); font-size: 11px; font-weight: 600; color: var(--cap-mute); }
@media (max-width: 420px) { .sc-desc { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .style-card { padding: 6px 6px 10px; } }

/* step 4: script tools + manual editor */
.script-edit { display: grid; gap: 18px; }
.se-head h2 { display: flex; align-items: center; gap: 8px; }
.se-head h2 svg { width: 18px; height: 18px; color: var(--acc); }
.se-head p { font-size: 14px; margin-top: 6px; }
.se-list { display: grid; gap: 12px; }
.se-scene { display: grid; gap: 10px; padding: 12px; border-radius: var(--g-r-md); background: var(--card-2); border: 1px solid var(--line); }
.se-scene.flash { animation: se-flash 1s var(--ease); }
@keyframes se-flash { 0% { box-shadow: 0 0 0 3px var(--acc); transform: scale(1.01); } 100% { box-shadow: 0 0 0 0 transparent; } }
.se-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.se-meta { display: flex; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.se-tools { display: flex; gap: 4px; flex: none; }
.se-tool { width: 38px; height: 38px; border-radius: var(--g-r-md); display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); font-size: 16px; font-weight: 700; transition: background-color .2s, border-color .2s; }
.se-tool:hover:not(:disabled) { border-color: var(--acc); }
.se-tool:disabled { opacity: .35; cursor: default; }
.se-tool.del:hover:not(:disabled) { background: var(--err-soft); border-color: var(--err); }
.se-sum { min-height: 64px; resize: none; font-size: 15px; }
.se-lines { display: grid; gap: 8px; }
.se-line { display: grid; gap: 4px; }
.se-sp { font-size: 12px; font-weight: 700; }
.se-in { position: relative; }
.se-cnt { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.se-cnt.max { color: var(--err); font-weight: 700; }
.se-actions { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 10px; margin: 0 -10px -10px; border-radius: var(--g-r-md); background: var(--card); border-top: 1px dashed var(--line-2); }
@media (max-width: 900px) { .se-actions { bottom: calc(var(--g-tabbar-space, 0px) + 12px); } }
@media (max-width: 480px) { .se-actions .btn { flex: 1; padding: 0 12px; } }

/* step 5: cast */
.cast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; padding-top: 14px; }
@media (min-width: 700px) { .cast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; } }
.cast-card { display: grid; gap: 12px; align-content: start; min-width: 0; }
.cast-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; background: #EFE6D8; }
.cast-media img { width: 100%; height: 100%; object-fit: cover; }
.cast-media img.appear { animation: develop 1.1s var(--ease) both; }
@keyframes develop { from { opacity: 0; filter: sepia(.8) brightness(1.4) blur(3px); } to { opacity: 1; filter: none; } }
.cast-gen, .cast-fail { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; color: #6F6457; }
.cast-gen { background: repeating-linear-gradient(135deg, #EFE6D8 0 10px, #E8DDCC 10px 20px); }
.cast-fail { background: #F4E4DE; padding: 10px; }
.cast-fail span { font-size: 30px; }
.cast-fail b { font-family: var(--font-hand); font-size: 22px; color: #9A3B30; }
.cast-fail small { font-size: 12px; line-height: 1.3; }
.cast-fb { display: grid; gap: 8px; }
.cast-actions { display: grid; gap: 4px; }
.cast-actions .btn { white-space: normal; line-height: 1.2; min-height: 38px; height: auto; padding: 6px 10px; }
.cast-left { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.cast-card.is-gen .cast-fb { opacity: .7; }
/* проверка кадров и сцен клиентом (API3 §D): полароиды с «Сгенерировать заново» */
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; padding-top: 14px; }
@media (min-width: 700px) { .rv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 1100px) { .rv-grid.rv-frame { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 420px) { .rv-grid.rv-clip { grid-template-columns: minmax(0, 1fr); max-width: 340px; margin: 0 auto; } }
.rv-grid:has(> .rv-card:only-child) { grid-template-columns: minmax(0, 340px); justify-content: center; }
.rv-card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.rv-pol { padding: 8px 8px 38px; transform: rotate(var(--rot, 0deg)); transition: transform .4s var(--ease); }
.rv-card:hover .rv-pol, .rv-card:focus-within .rv-pol { transform: rotate(0deg); }
.rv-media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 2px; background: #EFE6D8; }
.rv-media img, .rv-media video { width: 100%; height: 100%; object-fit: cover; display: block; background: #1d1a17; }
.rv-media img.appear { animation: develop 1.1s var(--ease) both; }
.rv-pol .pol-cap { font-size: 21px; bottom: 6px; }
.rv-pol .pol-cap .cn { color: var(--cap-ink); }
.rv-pol .pol-cap .cs { color: #3B7A4C; font-family: var(--font-ui); font-size: 15px; font-weight: 700; }
.rv-sum { font-size: 14px; line-height: 1.4; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.rv-note { font-size: 12.5px; line-height: 1.35; margin: 0; padding: 8px 10px; border-radius: var(--g-r-md); }
.rv-stale { background: var(--acc-soft); color: var(--ink); }
.rv-err { background: #F4E4DE; color: #7A2E25; }
.rv-actions { display: grid; gap: 4px; }
.rv-actions .btn { white-space: normal; line-height: 1.2; min-height: 38px; height: auto; padding: 6px 10px; }
.rv-price { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.rv-fb { display: grid; gap: 8px; }
.rv-fb-row { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.rv-count { margin-right: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-card.is-gen .rv-actions { opacity: .6; }
.rv-montage { font-size: 18px; letter-spacing: .01em; }
:root[data-theme="dark"] .rv-err { background: rgba(185, 71, 58, .18); color: #F2C2BA; }

/* step 6: launch settings */
.launch-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .launch-grid { grid-template-columns: 1fr 1fr; } .launch-grid .sum-card { grid-column: 1 / -1; } }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.saved { font-size: 12.5px; font-weight: 600; color: var(--ok); opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }
.wm-wrap { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.phone-mock { width: 150px; padding: 7px; border-radius: 22px; background: #1D1813; box-shadow: var(--shadow-pol); }
.pm-screen { position: relative; aspect-ratio: 9 / 16; border-radius: var(--g-r-md); overflow: hidden; background: linear-gradient(160deg, #7A5A44, #2C241C); }
.pm-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pm-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; opacity: .6; }
.pm-screen img:not([hidden]) + .pm-fallback { display: none; }
.pm-spots { position: absolute; inset: 0; z-index: 2; }
.wm-spot { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.wm-spot i { width: 16px; height: 16px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .25); transition: transform .2s var(--ease), background-color .2s; }
.wm-spot:hover i { transform: scale(1.2); background: rgba(185, 71, 58, .6); }
.wm-spot[aria-checked="true"] i { opacity: 0; }
.wm-spot.s-top-left { left: 0; top: 0; } .wm-spot.s-top-right { right: 0; top: 0; }
.wm-spot.s-bottom-left { left: 0; bottom: 0; } .wm-spot.s-bottom-right { right: 0; bottom: 0; }
.wm-spot.s-bottom-center { left: 50%; bottom: 0; transform: translateX(-50%); }
.wm-mark { position: absolute; z-index: 1; max-width: 62%; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .95); font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .35s var(--ease); pointer-events: none; }
.wm-mark.p-top-left { left: 10px; top: 14px; } .wm-mark.p-top-right { right: 10px; top: 14px; }
.wm-mark.p-bottom-left { left: 10px; bottom: 14px; } .wm-mark.p-bottom-right { right: 10px; bottom: 14px; }
.wm-mark.p-bottom-center { left: 50%; bottom: 14px; transform: translateX(-50%); }
.wm-side { display: grid; gap: 12px; min-width: 0; align-content: start; }
.wm-none { justify-self: start; }
@media (max-width: 400px) { .wm-wrap { grid-template-columns: 1fr; justify-items: center; } .wm-side { width: 100%; } .phone-mock { width: 168px; } }
.radio-cards { display: grid; gap: 8px; }
.rc { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--g-r-md); border: 1px solid var(--line-2); background: var(--card); cursor: pointer; transition: border-color .2s, background-color .2s; }
.rc input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; transition: border-color .2s; }
.rc input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); transform: scale(0); transition: transform .2s var(--ease); }
.rc input:checked { border-color: var(--acc); }
.rc input:checked::after { transform: scale(1); }
.rc input:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.rc.on { border-color: var(--acc); background: var(--acc-soft); }
.rc-b { display: grid; min-width: 0; }
.rc-b b { font-size: 15px; font-weight: 600; }
.rc-b small { font-size: 12.5px; color: var(--muted); }
.rc-extra { padding: 2px 4px 6px 46px; }
.mood-row { display: flex; flex-wrap: wrap; gap: 6px; }
.upl-drop { width: 100%; display: grid; justify-items: center; gap: 2px; padding: 14px; border-radius: var(--g-r-md); border: 1.5px dashed var(--line-2); background: var(--card-2); transition: border-color .2s, background-color .2s; }
.upl-drop span { font-size: 20px; }
.upl-drop b { font-size: 14.5px; }
.upl-drop small { font-size: 12px; color: var(--muted); }
.upl-drop:hover, .music-card.drag .upl-drop { border-color: var(--acc); background: var(--acc-soft); }
.upl-file { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--g-r-md); background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.upl-file .uf-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.upl-prog .progress { flex: 1; }
@media (max-width: 400px) { .rc-extra { padding-left: 4px; } }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.toggle-row > div { display: grid; gap: 2px; min-width: 0; }
.toggle-row b { font-size: 15px; }
.toggle-row small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.toggle-row small b { font-size: inherit; color: var(--ink); font-weight: 600; }
.switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line-2); transition: background-color .25s; }
.switch i { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.switch:disabled { opacity: .55; cursor: not-allowed; }
.sum-list { display: grid; gap: 0; margin: 4px 0 10px; }
.sum-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 14.5px; }
.sum-list dt { color: var(--muted); font-weight: 500; flex: none; }
.sum-list dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.sum-list .total { border-bottom: 0; padding-top: 12px; }
.sum-list .total dt { color: var(--ink); font-weight: 600; }
.sum-list .total dd { font-family: var(--font-display); font-size: 24px; font-weight: 700; }

/* production extras */
.eta { position: relative; display: grid; justify-items: center; gap: 0; margin-top: -6px; }
.eta-k { font-family: var(--font-hand); font-size: 20px; font-weight: 700; color: var(--hand); line-height: 1; transform: rotate(-2deg); }
.eta-v { font-family: var(--font-display); font-size: clamp(32px, 7vw, 42px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.notif-card { display: flex; gap: 14px; align-items: flex-start; background: var(--warm); }
.nc-ic { flex: none; width: 44px; height: 44px; border-radius: var(--g-r-md); display: grid; place-items: center; font-size: 22px; background: var(--card); border: 1px solid var(--line); animation: bell 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(12deg); } 80% { transform: rotate(-10deg); } 85% { transform: rotate(6deg); } 90% { transform: rotate(-3deg); } }
.notif-card b { font-size: 15.5px; }
.notif-card p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.nc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.email-card { display: grid; gap: 10px; }
.promo-row { display: flex; gap: 8px; min-width: 0; }
.promo-row .btn { flex: none; height: auto; min-height: 48px; }
.ok-line { font-size: 14.5px; font-weight: 500; color: var(--ink); }

/* done extras */
.gift-hint { font-size: 20px; transform: rotate(-1.5deg); margin-top: -6px; }
.exp-card, .cap-card { display: grid; gap: 12px; padding: 16px 18px; }
.exp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.exp-btn { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--g-r-md); border: 1px solid var(--line-2); background: var(--card-2); text-align: center; transition: border-color .2s, transform .2s var(--ease); min-width: 0; }
.exp-btn:hover { border-color: var(--acc); }
.exp-btn:active { transform: scale(.97); }
.exp-btn .ex-ic { height: 26px; display: grid; place-items: center; font-size: 20px; }
.exp-btn b { font-size: 14px; }
.exp-btn small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.exp-btn.busy { pointer-events: none; border-color: var(--acc); background: var(--acc-soft); }
.cap-seg { justify-self: start; max-width: 100%; }
.cap-seg button { padding: 0 12px; }
.next-ep { position: relative; display: grid; gap: 12px; background: var(--warm); padding: 22px 20px 18px; }
.next-ep b { font-family: var(--font-display); font-size: 18px; }
.next-ep p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.next-ep .btn { justify-self: start; }
.review-form { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.review-form .btn { justify-self: start; }
.rate-card .ok-line { margin-top: 12px; }
.done-links { display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; }
.done-actions .btn { min-width: 0; }

/* recaps */
.recap-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.recap .idea-card p { font-size: 15.5px; }
@media (max-width: 480px) { .recap-btns .btn { width: 100%; white-space: normal; height: auto; min-height: 48px; } }

/* login sheet */
/* login sheet → gallery.css (.g-login) */

/* guests */
.guest-note { margin-bottom: 18px; }

/* balance growth */
.bonus-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--g-r-md); background: var(--note); border: 1px dashed var(--line-2); font-size: 14px; }
.preset { position: relative; }
.preset .pb { position: absolute; top: -9px; right: 6px; padding: 0 7px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.bonus-live { min-height: 1.4em; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.bonus-live b { color: var(--ok); }
.gift-card-sec { position: relative; background: var(--warm); padding-top: 28px; }
.gc-head { display: flex; gap: 14px; align-items: flex-start; }
.gc-list { display: grid; gap: 8px; }
.gc-list:empty { display: none; }
.gc-item { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "amt code btn" "amt st btn"; align-items: center; gap: 2px 12px; padding: 10px 10px 10px 14px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line); }
.gc-item.used { opacity: .65; }
.gc-amt { grid-area: amt; font-family: var(--font-display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gc-code { grid-area: code; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gc-item .badge { grid-area: st; justify-self: start; height: 20px; font-size: 11px; }
.gc-item .btn { grid-area: btn; }
@media (max-width: 380px) { .gc-item .btn span { display: none; } .gc-item .btn { width: 38px; padding: 0; } }

/* reduced motion: stop decorative loops in the wizard */
@media (prefers-reduced-motion: reduce) {
  .wz-in { animation: none; }
}

/* ==========================================================================
   LANDING growth: stats, quick-start templates, gift promo, gallery, reviews
   ========================================================================== */

.view { overflow-x: clip; }

/* ==========================================================================
   Photo references for characters (wizard: heroes, script, cast)
   ========================================================================== */
.refs { display: grid; gap: 10px; padding: 14px; border-radius: var(--g-r-md); background: var(--card-2); border: 1px dashed var(--line-2); min-width: 0; transition: border-color .2s, background-color .2s; }
.refs.drag { border-color: var(--acc); background: var(--acc-soft); }
.refs-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.refs-h b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refs-h span { font-size: 12.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.refs-thumbs { display: flex; flex-wrap: wrap; gap: 14px 12px; padding: 4px 2px 2px; }
.ref-pol { position: relative; width: 84px; margin: 0; padding: 5px 5px 22px; border-radius: 2px; background: var(--frame); box-shadow: var(--shadow-pol); transform: rotate(var(--rot, 0deg)); }
.ref-img { aspect-ratio: 1; overflow: hidden; border-radius: 1px; background: #EFE6D8; }
.ref-img img { width: 100%; height: 100%; object-fit: cover; }
.ref-pol figcaption { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; justify-content: center; }
.ref-q { font-size: 10px; font-weight: 700; line-height: 1.3; padding: 1px 5px; border-radius: 999px; white-space: nowrap; }
.ref-q.q-good { color: #2F6B3F; background: rgba(59, 122, 76, .14); }
.ref-q.q-ok { color: #3C6A96; background: rgba(60, 106, 150, .13); }
.ref-q.q-poor { color: #9A4A10; background: rgba(196, 120, 40, .2); }
.ref-del { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); color: var(--err); box-shadow: var(--shadow-sm); }
.ref-del svg { width: 12px; height: 12px; }
.ref-del:hover { background: var(--err-soft); }
.refs-poor-tips { display: grid; gap: 4px; margin: 0; padding: 10px 12px 10px 30px; list-style: disc; border-radius: var(--g-r-md); background: var(--warn-soft); font-size: 13.5px; color: var(--ink); }
.refs-poor-tips li::marker { color: var(--warn); }
.refs-kind { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line); }
.refs-kind button { min-height: 32px; padding: 3px 4px; border-radius: var(--g-r-md); font-size: 12px; font-weight: 600; line-height: 1.15; color: var(--muted); transition: background-color .2s, color .2s; }
.refs-kind button[aria-checked="true"] { background: var(--acc); color: var(--acc-ink); }
.refs-consent { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; font-weight: 500; cursor: pointer; }
.refs-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--acc); }
.refs-consent.shake { animation: shake .45s; color: var(--err); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.refs-drop { width: 100%; display: grid; justify-items: center; gap: 1px; padding: 12px; border-radius: var(--g-r-md); border: 1.5px dashed var(--line-2); background: var(--card); text-align: center; transition: border-color .2s, background-color .2s; }
.refs-drop:hover { border-color: var(--acc); background: var(--acc-soft); }
.refs-drop:disabled { opacity: .5; }
.refs-drop .rd-ic { font-size: 18px; }
.refs-drop b { font-size: 14px; }
.refs-drop small { font-size: 11.5px; color: var(--muted); }
.refs-prog { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.refs-prog .progress { flex: 1; height: 8px; }
.refs-tip { font-size: 13px; color: var(--muted); line-height: 1.45; padding-left: 22px; position: relative; }
.refs-tip::before { content: "💡"; position: absolute; left: 0; top: 0; }
.refs-tip.ok { color: var(--ok); }
.refs-tip.ok::before { content: "✓"; font-weight: 700; }
.refs-tip.warn { color: var(--warn); font-weight: 600; }
.refs-tip.warn::before { content: "⚠️"; }
.refs.has-poor { border-color: var(--warn); border-style: solid; }
.refs-help { border-top: 1px dashed var(--line-2); padding-top: 8px; }
.refs-help summary { cursor: pointer; list-style: none; font-family: var(--font-hand); font-weight: 700; font-size: 19px; color: var(--hand); display: inline-flex; align-items: center; gap: 6px; }
.refs-help summary::-webkit-details-marker { display: none; }
.refs-help summary::after { content: "▾"; font-family: var(--font-ui); font-size: 13px; transition: transform .2s; }
.refs-help[open] summary::after { transform: rotate(180deg); }
.rh-body { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
.rh-col { padding: 10px 12px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line); }
.rh-col b { font-size: 13px; }
.rh-col ul { display: grid; gap: 6px; margin-top: 6px; }
.rh-col li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.35; }
@media (min-width: 560px) { .hero-q .rh-body, .refs-card .rh-body { grid-template-columns: 1fr 1fr; } }
/* compact variant (cast cards) */
.refs.compact { padding: 10px; gap: 8px; }
.refs.compact .ref-pol { width: 62px; padding: 4px 4px 18px; }
.refs.compact .ref-q { font-size: 9px; padding: 0 4px; }
.refs.compact .refs-kind button { font-size: 11px; min-height: 30px; }
.refs.compact .refs-drop { padding: 8px; }
.refs.compact .refs-drop small { display: none; }
.refs-empty { display: none; }
.ref-nudge { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--g-r-md); background: var(--note); border: 1px solid var(--acc-line); font-size: 13.5px; font-weight: 600; animation: view-in .35s var(--ease) both; }
.ref-nudge .btn { justify-self: start; }
/* script step card */
.refs-card { padding: 0; }
.refs-card > summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 18px 22px; }
.refs-card > summary::-webkit-details-marker { display: none; }
.refs-card > summary span { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.refs-card > summary small { font-size: 13px; color: var(--muted); }
.refs-list { display: grid; gap: 14px; padding: 0 22px 20px; }
.refs-row { display: grid; gap: 6px; }
@media (max-width: 420px) { .refs { padding: 12px; } .refs-list { padding: 0 14px 16px; } .refs-card > summary { padding: 16px; } .refs-kind button { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .refs-consent.shake { animation: none; } }
.refs.compact .refs-kind { grid-template-columns: 1fr 1fr; }
.refs.compact .refs-tip { font-size: 12px; }
.refs.compact .ref-del { width: 24px; height: 24px; top: -8px; right: -8px; }
@media (max-width: 699px) { .refs.compact .refs-help { display: none; } .refs.compact .refs-consent { font-size: 12px; } }
.cast-grid:has(> .cast-card:only-child) { grid-template-columns: minmax(0, 340px); justify-content: center; }

/* ==========================================================================
   API3: tiers, language, templates groups, library heroes, voices, editor,
   after-done extras, subscriptions, content plan
   ========================================================================== */
.offpeak { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-left: 6px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-family: var(--font-ui); font-size: 12px; font-weight: 700; transform: rotate(-2deg); }
.q-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.q-card { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, background-color .2s, transform .2s var(--ease); min-width: 0; }
.q-card:hover { border-color: var(--line-2); }
.q-card:active { transform: scale(.98); }
.q-card[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc); box-shadow: inset 0 0 0 .5px var(--acc); }
.qc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qc-top b { font-family: var(--font-display); font-size: 17px; }
.qc-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.qc-price { margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.qc-price small { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--muted); }
.q-card.q-cinema { background: linear-gradient(160deg, var(--note), var(--card) 70%); border-color: var(--line-2); }
.q-card.q-cinema[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc); }
@media (max-width: 640px) { .q-cards { grid-template-columns: 1fr 1fr; } .q-card.q-cinema { grid-column: 1 / -1; } }
.lang-row { display: grid; gap: 6px; margin-top: 14px; }
.cp-hint { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: -14px 0 26px; border-radius: var(--g-r-md); background: var(--card); border: 1px dashed var(--line-2); transition: border-color .2s; }
.cp-hint:hover { border-color: var(--acc); }
.cp-hint > span:first-child { font-size: 22px; }
.cp-hint > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.cp-hint b { font-size: 14.5px; }
.cp-hint small { font-size: 12.5px; color: var(--muted); }
.cp-hint svg { width: 18px; height: 18px; color: var(--acc); flex: none; }
.tpl-groups { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.tpl-groups::-webkit-scrollbar { display: none; }
.tpl-groups button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.tpl-groups button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tpl-groups button:hover:not([aria-selected="true"]) { border-color: var(--line-2); }
.tc-f { font-style: normal; margin-left: 2px; color: var(--acc); font-size: 12px; }
.tpl-form { display: grid; gap: 12px; margin-top: 10px; padding: 16px; background: var(--note); }
.tf-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tf-h b { font-size: 15px; }
.tf-h small { font-size: 12.5px; color: var(--muted); }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

/* library: picker in wizard + page */
.lib-pick { display: grid; gap: 10px; margin-bottom: 16px; }
.lib-btn { border-style: dashed; }
.lib-imp { padding: 14px; border-radius: var(--g-r-md); background: var(--note); border: 1px solid var(--line); }
.li-h { display: grid; margin-bottom: 10px; }
.li-h b { font-size: 15px; }
.li-h small { font-size: 12.5px; color: var(--muted); }
.li-row { display: flex; flex-wrap: wrap; gap: 14px; }
.li-pol { width: 84px; margin: 0; padding: 5px 5px 22px; position: relative; background: var(--frame); border-radius: 2px; box-shadow: var(--shadow-pol); transform: rotate(var(--rot, 0deg)); }
.li-img { aspect-ratio: 1; overflow: hidden; background: #EFE6D8; }
.li-img img { width: 100%; height: 100%; object-fit: cover; }
.li-pol figcaption { position: absolute; left: 4px; right: 4px; bottom: 2px; font-family: var(--font-hand); font-weight: 700; font-size: 15px; color: var(--cap-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px 12px; padding-top: 6px; }
.hp-card { position: relative; display: grid; gap: 2px; padding: 6px 6px 10px; text-align: left; background: var(--frame); color: var(--cap-ink); border-radius: 3px; box-shadow: var(--shadow-pol); transform: rotate(var(--rot, 0deg)); outline: 3px solid transparent; outline-offset: 2px; transition: transform .25s var(--ease), outline-color .2s; }
.hp-card[aria-checked="true"] { outline-color: var(--acc); transform: rotate(0deg) scale(1.02); }
.hp-img { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #EFE6D8; margin-bottom: 4px; }
.hp-img img { width: 100%; height: 100%; object-fit: cover; }
.hp-card b { font-family: var(--font-hand); font-size: 20px; line-height: 1.05; }
.hp-card small { font-size: 11.5px; color: var(--cap-mute); }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; padding-top: 12px; }
@media (min-width: 700px) { .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; } }
.lib-card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.lib-img { aspect-ratio: 3 / 4; overflow: hidden; background: #EFE6D8; border-radius: 2px; }
.lib-img img { width: 100%; height: 100%; object-fit: cover; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-meta .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lib-actions { display: flex; gap: 8px; }

/* voices */
.voice-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--g-r-md); background: var(--card); border: 1px solid var(--line-2); min-width: 0; }
.vr-k { font-size: 18px; }
.vr-t { flex: 1; display: grid; min-width: 0; line-height: 1.2; }
.vr-t small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.vr-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-row .btn { flex: none; }
@media (max-width: 420px) { .voice-row { flex-wrap: wrap; } .voice-row .btn { width: 100%; } }
.vp-list { display: grid; gap: 6px; max-height: min(52vh, 460px); overflow-y: auto; padding: 2px; }
.vp-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border-radius: var(--g-r-md); border: 1px solid var(--line-2); background: var(--card); text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s; }
.vp-item:hover { border-color: var(--acc-line); }
.vp-item[aria-checked="true"] { border-color: var(--acc); background: var(--acc-soft); }
.vp-play { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); font-size: 13px; font-weight: 700; }
.vp-play.ghost { background: var(--card-2); color: var(--ink); font-size: 17px; }
.vp-play[aria-pressed="true"] { animation: pulse-ring 1.4s infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 var(--acc-line); } 100% { box-shadow: 0 0 0 10px transparent; } }
.vp-t { flex: 1; display: grid; gap: 3px; min-width: 0; }
.vp-t b { font-size: 15px; }
.vp-t small { font-size: 12.5px; color: var(--muted); }
.vp-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.vp-badges i { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.vp-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.vp-item[aria-checked="true"] .vp-dot { border-color: var(--acc); }
.vp-item[aria-checked="true"] .vp-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.vc-card { padding: 0; background: var(--note); }
.vc-card > summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 14px 16px; }
.vc-card > summary::-webkit-details-marker { display: none; }
.vc-card > summary span { font-weight: 700; font-size: 15px; }
.vc-card > summary small { font-size: 12.5px; color: var(--muted); }
.vc-body { display: grid; gap: 10px; padding: 0 16px 16px; }
.vc-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vc-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 42px; }
.vc-up { cursor: pointer; }
.rec-on { background: var(--err) !important; animation: pulse-ring 1.2s infinite; }
#vcPrev { width: 100%; height: 40px; }

/* launch: express + live preview */
.exp-row-l { border-bottom: 1px dashed var(--line-2); padding: 10px 0 !important; display: block !important; }
.exp-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.exp-toggle input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--acc); }
.et-b { display: grid; gap: 1px; }
.et-b b { font-size: 14.5px; }
.et-b small { font-size: 12.5px; color: var(--muted); }
.pm-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pm-screen.live .pm-fallback { display: none; }
.pm-screen.live::after { content: "живое превью"; position: absolute; left: 8px; bottom: 34px; z-index: 1; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 9.5px; font-weight: 700; pointer-events: none; }

/* done extras */
.share-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 8px; border-radius: var(--g-r-md); border: 1px solid var(--line-2); background: var(--card); font-size: 13.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; transition: border-color .2s, background-color .2s; }
.sh-btn svg { width: 16px; height: 16px; flex: none; }
.sh-btn:hover { border-color: var(--acc); }
@media (max-width: 380px) { .sh-btn { font-size: 12px; gap: 4px; } }
.edit-card { display: grid; gap: 8px; padding: 18px 20px; background: var(--warm); }
.ec-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.ec-h b { font-family: var(--font-display); font-size: 17px; }
.ec-h small { font-size: 12.5px; font-weight: 600; color: var(--ok); }
.edit-card .muted { font-size: 13.5px; }
.ec-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cover-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 14px; }
.cv-img { aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--g-r-md); background: #1D1813; box-shadow: var(--shadow-sm); }
.cv-img img { width: 100%; height: 100%; object-fit: cover; }
.cv-t { display: grid; gap: 6px; justify-items: start; }
.cv-t b { font-size: 15px; }
.cv-t small { font-size: 12.5px; color: var(--muted); }
.sr-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.sr-box > summary { cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sr-box > summary::-webkit-details-marker { display: none; }
.sr-box > summary::before { content: "▸"; color: var(--acc); transition: transform .2s; }
.sr-box[open] > summary::before { transform: rotate(90deg); }
.sr-box > summary small { font-weight: 500; font-size: 12px; color: var(--muted); }
.sr-list { display: grid; gap: 8px; margin: 10px 0; }
.sr-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; }
.sr-t { font-size: 13px; line-height: 1.35; min-width: 0; }
.sr-b { display: flex; gap: 4px; }
.sr-b button { width: 36px; height: 34px; border-radius: var(--g-r-md); border: 1px solid var(--line-2); background: var(--card); font-size: 16px; filter: grayscale(.6); transition: all .15s; }
.sr-b button[aria-pressed="true"] { filter: none; border-color: var(--acc); background: var(--acc-soft); transform: scale(1.06); }
.sr-note { grid-column: 2 / -1; font-size: 14px; padding: 8px 12px; }
.pub-card { position: relative; display: grid; gap: 8px; padding: 22px 20px 16px; }
.pub-card > b { font-family: var(--font-display); font-size: 17px; }
.pub-card .muted { font-size: 13.5px; }

/* editor modal */
.ed-sec { display: grid; gap: 8px; }
.ed-sec > b { font-size: 14.5px; }
.ed-scenes { display: grid; gap: 6px; }
.ed-scenes li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: var(--g-r-md); background: var(--card-2); border: 1px solid var(--line); cursor: grab; user-select: none; }
.ed-scenes li.dragging { opacity: .5; border-style: dashed; border-color: var(--acc); }
.ed-scenes li.flash { animation: se-flash 1s var(--ease); }
.es-grip { color: var(--muted); letter-spacing: -2px; font-weight: 700; }
.es-t { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.ed-scenes .se-tool { width: 34px; height: 34px; flex: none; }
.ed-foot { font-size: 13.5px; }
.ln-list { display: grid; gap: 14px; max-height: 56vh; overflow-y: auto; }
.ln-row { display: grid; gap: 3px; margin-top: 6px; }
.ln-in { display: flex; gap: 6px; }
.ln-in .btn { flex: none; height: auto; }

/* subscriptions */
.sub-widget { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--acc-line); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.sub-widget:hover { transform: translateY(-1px); }
.sub-widget.sw-off { border-style: dashed; border-color: var(--line-2); }
.sub-widget svg { width: 18px; height: 18px; color: var(--acc); flex: none; }
#subNow { margin-bottom: 22px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding-top: 10px; }
.plan { position: relative; display: grid; gap: 10px; align-content: start; }
.plan.hot { border: 1.5px solid var(--acc); box-shadow: var(--shadow); }
.plan.hot .badge { position: absolute; top: -14px; right: 14px; height: auto; padding: 2px 12px 4px; border-radius: 3px; border: 0; background: var(--note); color: var(--ink); font-family: var(--font-hand); font-size: 20px; font-weight: 700; transform: rotate(4deg); }
.plan.hot .badge::before { display: none; }
.pl-price { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pl-price small { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.pl-list { display: grid; gap: 7px; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.pl-list li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.pl-list b { color: var(--ink); }
.pl-save { color: var(--ok); font-weight: 700; }

/* content plan */
.cp-form .cp-row { display: grid; grid-template-columns: auto auto auto; gap: 14px; align-items: end; justify-content: start; }
@media (max-width: 600px) { .cp-form .cp-row { grid-template-columns: 1fr 1fr; } .cp-form .cp-row > :first-child { grid-column: 1 / -1; } }
.cp-count { display: flex; align-items: center; gap: 8px; }
.cp-count output { min-width: 28px; text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-plan { position: relative; display: grid; gap: 12px; margin-top: 22px; padding-top: 26px; }
.cp-items { display: grid; gap: 6px; }
.cp-item { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--g-r-md); background: var(--card-2); border: 1px solid var(--line); cursor: pointer; }
.cp-item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--acc); }
.cp-day { font-family: var(--font-hand); font-weight: 700; font-size: 18px; color: var(--hand); line-height: 1.2; white-space: nowrap; }
.cp-t { display: grid; gap: 2px; min-width: 0; }
.cp-t b { font-size: 14.5px; }
.cp-t small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cp-item:has(input:not(:checked)) { opacity: .55; }
.cp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cp-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 420px) { .cp-item { grid-template-columns: auto 1fr; } .cp-day { grid-column: 2; } .cp-t { grid-column: 2; } }
  .cp-form .cp-row > * { min-width: 0; }
@media (max-width: 600px) { .cp-form .cp-row { grid-template-columns: minmax(0, 1fr); } }
