/* SmartReels studio design system: tokens, base, components. Shared by every page of the studio. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f6f6f8; --surface: #ffffff; --surface-2: #f2f2f5; --surface-3: #e9e9ee;
  --border: #e4e4e9; --border-strong: #d2d2da;
  --text: #17171c; --text-2: #50505c; --text-3: #8a8a96;
  --accent: #5a3fff; --accent-hover: #4a30f0; --accent-soft: rgba(90, 63, 255, .1); --accent-text: #ffffff;
  /* the site's signature gradient, for emphasis only: the logo mark, the active place, progress */
  --grad: linear-gradient(110deg, #ff6a2b 0%, #ff4fb8 50%, #8b7bff 100%);
  --accent-glow: 0 10px 28px rgba(90, 63, 255, .32);
  --logo-ink: #5a3fff;
  --success: #15924a; --success-soft: rgba(21, 146, 74, .1);
  --warn: #c76a00; --warn-soft: rgba(199, 106, 0, .12);
  --danger: #d92d3a; --danger-soft: rgba(217, 45, 58, .1);
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .05);
  --shadow-md: 0 4px 16px rgba(16, 16, 24, .08), 0 1px 3px rgba(16, 16, 24, .06);
  --shadow-lg: 0 24px 60px rgba(16, 16, 24, .18), 0 4px 12px rgba(16, 16, 24, .08);
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px;
  --side: 248px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* legacy names still used by inline markup */
  --bd: var(--border); --ac: var(--accent); --mut: var(--surface-3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0a12; --surface: #14121d; --surface-2: #1b1828; --surface-3: #242033;
    --border: #232030; --border-strong: #322d44;
    --text: #efedf6; --text-2: #aba7bd; --text-3: #706b85;
    --accent: #7c66ff; --accent-hover: #8b7bff; --accent-soft: rgba(124, 102, 255, .16);
  --logo-ink: #ffffff;
    --logo-ink: #ffffff;
    --success: #3fbf74; --success-soft: rgba(63, 191, 116, .14);
    --warn: #f0a33a; --warn-soft: rgba(240, 163, 58, .14);
    --danger: #ff5c68; --danger-soft: rgba(255, 92, 104, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0a12; --surface: #14121d; --surface-2: #1b1828; --surface-3: #242033;
  --border: #232030; --border-strong: #322d44;
  --text: #efedf6; --text-2: #aba7bd; --text-3: #706b85;
  --accent: #7c66ff; --accent-hover: #8b7bff; --accent-soft: rgba(124, 102, 255, .16);
  --success: #3fbf74; --success-soft: rgba(63, 191, 116, .14);
  --warn: #f0a33a; --warn-soft: rgba(240, 163, 58, .14);
  --danger: #ff5c68; --danger-soft: rgba(255, 92, 104, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
[hidden] { display: none !important; }
a { color: var(--accent); }
img, video { max-width: 100%; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { color: var(--text); letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; text-transform: none; opacity: 1; }
h3 { font-size: 13px; font-weight: 600; margin: 18px 0 8px; color: var(--text-2); }
section > h2:first-child, .c > h2:first-child { margin-top: 0; }
small { color: var(--text-3); }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
details > summary { cursor: pointer; color: var(--text-2); font-weight: 500; list-style: none; display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s var(--ease); flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
pre { font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 14px 0 6px; opacity: 1; }
textarea, input[type=text], input[type=number], input[type=url], input[type=email], input[type=search], input[type=password], input[type=date], input:not([type]), select {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 9px 12px; min-height: 40px;
  transition: border-color .15s, box-shadow .15s; }
textarea { line-height: 1.5; resize: vertical; }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a8a96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
textarea:hover, input:hover, select:hover { border-color: var(--text-3); }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
::placeholder { color: var(--text-3); }
input[type=color] { width: 100%; height: 40px; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.ck { display: inline-flex; gap: 8px; align-items: center; margin: 10px 16px 0 0; font-size: 13px; color: var(--text-2); }
.ck label { margin: 0; font-weight: 500; cursor: pointer; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.g2 > div > label:first-child { margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; }

/* ---------- buttons ---------- */
button { font: inherit; }
.btn, .sm, .chips button, .seg button { -webkit-tap-highlight-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; min-height: 42px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r-md); background: var(--accent); color: var(--accent-text);
  font: 600 14px/1.2 "Inter", system-ui, sans-serif; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--accent-hover); box-shadow: var(--accent-glow); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); font-weight: 500; }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled, .sm:disabled, button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 12px;
  font: 500 13px/1.2 "Inter", system-ui, sans-serif; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.sm:hover { background: var(--surface-2); border-color: var(--text-3); }
.sm.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.sm.primary:hover { background: var(--accent-hover); box-shadow: var(--accent-glow); }
.sm.danger, #pdel { color: var(--danger) !important; border-color: color-mix(in srgb, var(--danger) 40%, transparent) !important; }
.sm.danger:hover, #pdel:hover { background: var(--danger-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* chips & segmented control */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips:empty { display: none; }
.chips button { min-height: 34px; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; transition: all .15s; }
.chips button:hover { color: var(--text); border-color: var(--text-3); }
.chips button.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.seg { display: flex; padding: 3px; gap: 3px; margin-top: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button { flex: 1; min-height: 30px; padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--text-2); background: transparent; border: 0; border-radius: 7px; cursor: pointer; transition: all .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- surfaces ---------- */
.c { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 16px 18px; min-width: 0; box-shadow: var(--shadow-sm); }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; min-width: 0; cursor: pointer; transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card b { display: block; font-size: 14px; font-weight: 600; margin-top: 8px; line-height: 1.35; }
.card small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card video, .card img { border-radius: 10px; }
.card video { margin: 0; aspect-ratio: 9/16; max-height: 300px; width: 100%; object-fit: cover; background: #000; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.empty { color: var(--text-3); font-size: 13px; padding: 22px 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface-2); line-height: 1.55; }
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: 22px 18px; text-align: center; font-size: 14px; font-weight: 500; color: var(--text); background: var(--surface-2); cursor: pointer; transition: all .15s; }
.drop small { display: block; margin-top: 4px; font-weight: 400; }
.drop:hover { border-color: var(--text-3); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.files div { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.files div:last-child { border-bottom: 0; }
.files a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.files a:hover { color: var(--accent); }
.mut { color: var(--text-3); font-size: 13px; opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
video { border-radius: var(--r-lg); background: #000; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; cursor: pointer; color: var(--text); text-decoration: none; }
/* the site's own logo (mark and wordmark), drawn in the theme's logo colour */
.brand-logo { display: block; flex: none; height: 22px; aspect-ratio: 2839 / 482; background: url(/brand/logo-color-light.svg) center / contain no-repeat; }
/* the mark in the brand gradient, the word in the theme's ink */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background-image: url(/brand/logo-color-dark.svg); } }
:root[data-theme="dark"] .brand-logo { background-image: url(/brand/logo-color-dark.svg); }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; box-shadow: 0 4px 14px rgba(255, 79, 184, .28); }
.side .proj-pick { padding: 0 2px 12px; }
.side .proj-pick label { margin: 0 0 6px 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-h { margin: 14px 0 4px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.nav button, .nav a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2); font: 500 14px/1.2 "Inter", system-ui, sans-serif; text-align: left; cursor: pointer; text-decoration: none; transition: background .12s, color .12s; }
.nav button:hover, .nav a:hover { background: var(--surface-2); color: var(--text); }
.nav button.on { position: relative; background: var(--accent-soft); color: var(--accent); }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav svg { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
.nav .count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: center; }
.paused .count { background: var(--warn) !important; color: #fff !important; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot small { padding-left: 8px; }
.main { min-width: 0; padding: 18px 26px 44px; }
.page { max-width: 1240px; margin: 0 auto; }
.pagehead { max-width: 1240px; margin: 0 auto 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pagehead p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; max-width: 680px; }
.phw { position: relative; }
.phh { display: inline-flex; align-items: center; gap: 8px; }
.pagehead h1 { display: flex; align-items: center; gap: 8px; }
.phq { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--text-3); font: 700 12px/1 Inter, system-ui, sans-serif; cursor: pointer; display: inline-grid; place-items: center; transition: color .15s, border-color .15s; }
.phq:hover, .pagehead.open .phq, .phw.open .phq { color: var(--accent); border-color: var(--accent); }
.phq[hidden] { display: none; }
.phw .phpop { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: max-content; max-width: min(420px, 86vw); margin: 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 14px 40px rgba(0,0,0,.35); font-size: 13px; line-height: 1.5; color: var(--text-2); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.phw:has(.phq:hover) .phpop, .pagehead.open .phpop, .phw.open .phpop { opacity: 1; visibility: visible; transform: none; }
.w { display: grid; grid-template-columns: 400px 1fr; gap: 20px; max-width: 1240px; margin: 0 auto; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mobile-bar { display: none; }

@media (max-width: 1100px) { .w { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .app.menu-open .side { transform: none; }
  .app.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .35); }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  .mobile-bar .brand { padding: 0; }
  .main { padding: 18px 16px 48px; }
  .pagehead h1 { font-size: 20px; }
  .c { padding: 16px; border-radius: var(--r-lg); }
  .g2 { grid-template-columns: 1fr; }
}

/* ---------- popover / modal / toast ---------- */
.pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-lg); }
.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--text); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.45; animation: toastIn .25s var(--ease); white-space: pre-wrap; overflow-wrap: anywhere; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--success); color: #fff; }
.toast button { margin-left: auto; flex: none; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 14, .45); backdrop-filter: blur(2px); animation: fadeIn .15s; }
.modal { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-lg); animation: toastIn .2s var(--ease); }
.modal p { margin: 0 0 18px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.modal .row { justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ---------- credits ---------- */
.credits { margin: 10px 2px 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.cr-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-2); font-weight: 500; }
.cr-top b { font-size: 18px; color: var(--text); letter-spacing: -.01em; }
.cr-top b.low { color: var(--warn); }
.cr-bar { height: 5px; margin: 8px 0; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.cr-bar i { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .3s var(--ease); }
.cr-sub { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.me-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.me-t { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.me-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-t small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-link { background: none; border: 0; padding: 0; font: 600 12px "Inter", system-ui, sans-serif; color: var(--accent); cursor: pointer; }
/* what an action costs, on its button */
[data-cost]::after { content: attr(data-cost); margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.btn[data-cost]::after, .sm.primary[data-cost]::after { background: rgba(255,255,255,.2); color: inherit; }

/* ---------- a compact sidebar: the workspace links fold away ---------- */
.side { gap: 2px; padding: 14px 12px; }
.brand { padding: 2px 8px 12px; }
.side .proj-pick { padding: 0 2px 8px; }
.nav button, .nav a { min-height: 32px; padding: 6px 10px; font-size: 13.5px; }
.nav-h { margin: 10px 0 2px 10px; }
.ws { margin-top: 8px; }
.ws > summary { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.ws > summary:hover { background: var(--surface-2); color: var(--text-2); }
.ws > summary::before { order: 2; margin-left: auto; }
.ws[open] > summary { margin-bottom: 2px; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ws[open] .ws-dot { display: none; }
.credits { margin: 8px 2px 0; padding: 10px 12px; }
.cr-top b { font-size: 16px; }
.cr-bar { margin: 6px 0; }
.side-foot { padding-top: 10px; }
/* the breakdown of a video example */
.watch-modal { width: min(920px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.watch-modal h4 { margin: 20px 0 8px; font-size: 14px; color: var(--text); }
.wchips { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.wchips span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2, rgba(127,127,127,.08)); }
.wchips b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.wchips small { font-size: 11.5px; color: var(--text-2); }
.wimg { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: #000; }
.wtext { font-size: 14px; line-height: 1.6; color: var(--text); }
.wtext p { margin: 0 0 10px; white-space: normal; }
.wtext .wl { margin: 0 0 10px; padding-left: 0; list-style: none; }
.wtext .wl li { margin: 4px 0; }
.wtext .wn { display: inline-block; min-width: 1.6em; font-weight: 600; color: var(--accent); }
.wtext code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: rgba(127,127,127,.12); }
.watch-modal details { margin-top: 14px; }
.watch-modal summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); }

/* ---------- the folded sidebar: an icon rail sewn to the left edge, rounded only on the right, like the Create tabs' notch ---------- */
.side-tog { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; margin-top: 6px; padding: 6px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-3); font: 500 12.5px "Inter", system-ui, sans-serif; cursor: pointer; }
.side-tog:hover { background: var(--surface-2); color: var(--text); }
.side-tog svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 821px) {
  :root.side-mini { --side: 74px; }
  .side-mini .app > .main { grid-column: 2; }
  .side-mini .app > .side { position: fixed; left: 0; top: 50%; transform: translateY(-50%); height: auto; max-height: calc(100vh - 40px); width: 58px; padding: 10px 7px; gap: 3px; align-items: center; overflow: visible;
    border: 1px solid var(--border); border-left: 0; border-radius: 0 22px 22px 0; box-shadow: 0 12px 30px rgba(0,0,0,.16); z-index: 40; }
  .side-mini .app > .side::before, .side-mini .app > .side::after { content: ""; position: absolute; left: 0; width: 20px; height: 20px; pointer-events: none; }
  .side-mini .app > .side::before { top: -20px; background: radial-gradient(circle at 100% 0, transparent 19.5px, var(--border) 19.5px, var(--border) 20.5px, var(--surface) 20.5px); }
  .side-mini .app > .side::after { bottom: -20px; background: radial-gradient(circle at 100% 100%, transparent 19.5px, var(--border) 19.5px, var(--border) 20.5px, var(--surface) 20.5px); }
  .side-mini .app > .side .brand { padding: 2px 0 8px; justify-content: center; }
  .side-mini .app > .side .brand-logo { height: 28px; aspect-ratio: 1; background: url(/icon.svg) center / contain no-repeat !important; }
  .side-mini .app > .side .brand-sub, .side-mini .app > .side .proj-pick, .side-mini .app > .side .nav-h, .side-mini .app > .side .ws,
  .side-mini .app > .side .credits, .side-mini .app > .side .side-foot .me { display: none; }
  .side-mini .app > .side .nav { align-items: center; gap: 3px; }
  .side-mini .app > .side .nav a, .side-mini .app > .side .nav button, .side-mini .app > .side .side-tog { width: 44px; height: 40px; min-height: 40px; padding: 0; justify-content: center; font-size: 0; border-radius: 13px; gap: 0; }
  .side-mini .app > .side .nav svg, .side-mini .app > .side .side-tog svg { width: 20px; height: 20px; }
  .side-mini .app > .side .nav .count { display: none; }
  .side-mini .app > .side .nav button.on, .side-mini .app > .side .nav a.on { color: #fff; background: linear-gradient(120deg, #ff6a2b, #ff4f9a 55%, #7b5cff); box-shadow: 0 6px 18px rgba(255,79,154,.32); }
  .side-mini .app > .side .nav button.on::before { display: none; }
  .side-mini .app > .side .side-tog span { display: none; }
  .side-mini .app > .side .side-foot { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border); justify-content: center; width: 100%; }
}
@media (max-width: 820px) { .side-tog { display: none; } }

/* ---------- the top bar: the everyday sections as a notch sewn to the top edge, the project on the left ---------- */
.topbar { position: sticky; top: 0; z-index: 35; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; margin: -18px -26px 14px; padding: 0 26px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
/* what scrolls under the bar is hidden by a band of the page colour fading out below it */
.topbar::before { content: ""; position: absolute; inset: 0 0 -14px; background: linear-gradient(var(--bg) 78%, transparent); pointer-events: none; z-index: -1; }
.tb-l { display: flex; align-items: center; gap: 14px; padding-top: 10px; min-width: 0; }
.tb-logo { display: none; flex: none; padding: 4px 2px; }
.tb-logo .brand-logo { height: 22px; }
.side-mini .tb-logo { display: block; }
/* with the rail folded the bar spans the whole window: logo and project in the very corner, the notch at the screen's centre */
@media (min-width: 821px) { .side-mini .topbar { margin-left: calc(-26px - var(--side)); padding-left: 22px; } }
.side-mini .app > .side .brand { display: none !important; }
.tb-l .proj-pick { padding: 0; flex: 1; min-width: 130px; max-width: 240px; }
@media (max-width: 1280px) and (min-width: 821px) { .topbar { grid-template-columns: auto auto 1fr; } .tb-logo .brand-logo { height: 18px; } .tb-l .proj-pick { max-width: 190px; } }
.tb-l .proj-pick label { display: none; }
.tb-l .proj-pick select { min-height: 36px; padding: 4px 30px 4px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; background-color: var(--surface); }
.topnav { position: relative; display: flex; gap: 4px; padding: 6px 8px 8px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 22px 22px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.topnav::before, .topnav::after { content: ""; position: absolute; top: 0; width: 20px; height: 20px; pointer-events: none; }
.topnav::before { left: -20px; background: radial-gradient(circle at 0 100%, transparent 19.5px, var(--border) 19.5px, var(--border) 20.5px, var(--surface) 20.5px); }
.topnav::after { right: -20px; background: radial-gradient(circle at 100% 100%, transparent 19.5px, var(--border) 19.5px, var(--border) 20.5px, var(--surface) 20.5px); }
.topnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 18px; border-radius: 15px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: color .15s, background .2s, box-shadow .2s, transform .15s; }
.topnav a svg { width: 17px; height: 17px; flex: none; }
.topnav a:hover:not(.on) { color: var(--text); background: var(--surface-2); }
.topnav a:active { transform: scale(.96); }
.topnav a.on { color: #fff; background: linear-gradient(120deg, #ff6a2b, #ff4f9a 55%, #7b5cff); box-shadow: 0 6px 18px rgba(255,79,154,.32), inset 0 1px 0 rgba(255,255,255,.25); }
.top-dup { display: none !important; }
@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr; margin: -18px -16px 12px; padding: 0 16px; }
  .tb-l, .tb-r { display: none; }
  .topnav { justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .topnav::before, .topnav::after { display: none; }
  .topnav a { padding: 0 12px; font-size: 13px; }
}

/* ---------- the profile in the top-right corner: an avatar ringed by the credits left, and its menu ---------- */
.tb-r { display: flex; justify-content: flex-end; padding-top: 8px; }
.pf { position: relative; }
.pf-btn { position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.pf-ring { position: absolute; inset: 0; width: 44px; height: 44px; transform: rotate(-90deg); }
.pf-ring circle { fill: none; stroke-width: 3; }
.pf-ring .trk { stroke: var(--border-strong); }
.pf-ring .val { stroke: url(#pfg); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .6s cubic-bezier(.2,.8,.2,1); }
.pf-btn.low .pf-ring .val { stroke: #ff5a6e; }
.pf-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 14px; }
.pf-btn:hover .pf-av, .pf-btn[aria-expanded="true"] .pf-av { background: var(--accent-soft); color: var(--accent); }
.pf-menu { position: absolute; right: 0; top: 52px; width: 290px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 8px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,.35); z-index: 60; }
.pf-menu[hidden] { display: none; }
.pf-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.pf-head .pf-av.big { width: 40px; height: 40px; font-size: 16px; background: linear-gradient(120deg, #ff6a2b, #ff4f9a 55%, #7b5cff); color: #fff; flex: none; }
.pf-head div { min-width: 0; } .pf-head b { display: block; font-size: 14px; } .pf-head small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-cr { margin: 0 4px 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pf-crt { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-2); } .pf-crt b { font-size: 16px; color: var(--text); }
.pf-cr .cr-bar { margin: 8px 0; }
.pf-crs { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.pf-bill { border: 0; background: none; color: var(--accent); font: 600 12px "Inter", system-ui, sans-serif; cursor: pointer; padding: 0; }
.pf-h { margin: 10px 10px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.pf-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: 500 13.5px "Inter", system-ui, sans-serif; cursor: pointer; text-align: left; }
.pf-it svg { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
.pf-it span { flex: 1; } .pf-n { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; text-align: center; }
.pf-it:hover, .pf-it:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.pf-out:hover { color: #ff5a6e; }
.pf-sep { height: 1px; margin: 8px 6px; background: var(--border); }
/* with the profile menu the sidebar is not needed on a computer: the whole width is the work */
@media (min-width: 821px) {
  .pf-on .app { grid-template-columns: 1fr; }
  .pf-on .app > .side { display: none !important; }
  .pf-on .app > .main { grid-column: 1; }
  .pf-on .topbar, .pf-on.side-mini .topbar { margin-left: -26px; padding-left: 22px; }
  .pf-on .tb-logo { display: block; }
}

/* skeleton loading: grey bars that shimmer while a list or a page loads (Create tabs and their pages) */
.skel{background:linear-gradient(100deg,var(--surface-2) 30%,color-mix(in srgb,var(--surface-2) 80%,var(--text) 8%) 50%,var(--surface-2) 70%);background-size:220% 100%;animation:skel 1.3s ease-in-out infinite;border-radius:10px}
@keyframes skel{from{background-position:120% 0}to{background-position:-100% 0}}
.skfeed{display:grid;gap:12px}
/* shaped like a feed card: the 9:16 clip on the left, its text and buttons beside it, on the card's own surface */
.skfeed .sk{display:grid;grid-template-columns:minmax(220px,340px) 1fr;gap:16px;align-items:start;padding:12px;border-radius:14px;background:var(--surface)}
.skfeed .sk>i{display:block;aspect-ratio:9/16;max-height:72vh;border-radius:12px}.skfeed .sk>div{display:grid;gap:10px;padding-top:4px}
.skfeed .sk b{display:block;height:12px}.skfeed .sk b:nth-child(2){width:70%}.skfeed .sk b:nth-child(3){width:60%;height:32px;margin-top:6px;border-radius:9px}
@media(max-width:700px){.skfeed .sk{grid-template-columns:1fr}}

/* ---------- voice: a microphone in every text field, and «Скажіть, що зробити» ---------- */
.vx { position: relative; display: block; }
.vx > textarea { padding-right: 44px; }
.vx.vx-in { display: block; } .vx.vx-in > input { padding-right: 40px; }
.vx-mic { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; padding: 0 !important; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-2, var(--text)); display: grid; place-items: center; cursor: pointer; opacity: .75; transition: opacity .15s, transform .15s, box-shadow .15s; z-index: 2; min-height: 0 !important; }
.vx.vx-in .vx-mic { top: 50%; bottom: auto; transform: translateY(-50%); width: 26px; height: 26px; }
.vx-mic svg { width: 15px; height: 15px; }
.vx:hover .vx-mic, .vx-mic:focus-visible { opacity: 1; }
.vx-mic:hover { border-color: transparent; background: var(--grad); color: #fff; }
.vx-mic.rec { opacity: 1; border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 0 0 calc(4px + var(--lv, 0) * 10px) rgba(255, 79, 184, .22); }
.vx-mic.busy { opacity: 1; color: transparent; }
.vx-mic.busy::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: vxspin .8s linear infinite; }
@keyframes vxspin { to { transform: rotate(360deg); } }
.vx-tip { position: absolute; right: 46px; bottom: 13px; font-size: 12px; color: var(--text-3); pointer-events: none; white-space: nowrap; background: var(--surface); padding: 0 4px; border-radius: 4px; }
.vx-tip:empty { display: none; }
.vx.vx-in .vx-tip { bottom: auto; top: 50%; transform: translateY(-50%); right: 40px; }

.vcmd { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px !important; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; margin-right: 10px; white-space: nowrap; }
.vcmd svg { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: var(--grad); color: #fff; box-sizing: border-box; }
.vcmd:hover { border-color: var(--border-strong); box-shadow: 0 4px 16px rgba(255, 79, 184, .16); }
@media (max-width: 760px) { .vcmd span { display: none; } .vcmd { padding: 0 4px !important; } }
.vcmd-pop { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1000; width: min(560px, calc(100vw - 32px)); display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(10, 8, 30, .28); animation: vcin .22s var(--ease, ease) both; }
@keyframes vcin { from { opacity: 0; transform: translate(-50%, 12px); } }
.vcmd-orb { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; }
.vcmd-orb svg { width: 24px; height: 24px; position: relative; }
.vcmd-orb i { position: absolute; inset: 0; border-radius: 50%; background: var(--grad); opacity: .35; transform: scale(calc(1 + var(--lv, 0) * .6)); transition: transform .08s; }
.vcmd-orb.busy i { animation: vcpulse 1s ease-in-out infinite; }
@keyframes vcpulse { 50% { transform: scale(1.35); opacity: .15; } }
.vcmd-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vcmd-body b { font-size: 16px; }
.vcmd-body small { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.vcmd-said { font-style: normal; font-size: 13.5px; color: var(--text); }
.vcmd-said:empty { display: none; }
.vcmd-acts { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- assistant: reports (competitors, songs), the strategy, task files, Google Drive ---------- */
.as-card { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.as-card h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.as-card ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; } .as-card li + li { margin-top: 4px; }
.as-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.as-h b { display: block; font-size: 15px; } .as-h small { display: block; margin-top: 2px; font-size: 12.5px; }
.as-sum { font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
.as-err { color: var(--danger, #e5484d); font-size: 14px; margin: 0 0 10px; }
.as-foot { font-size: 12.5px; margin: 14px 0 0; }
.as-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.as-empty { padding: 40px 24px; text-align: center; } .as-empty b { font-size: 16px; } .as-empty p { max-width: 420px; margin: 8px auto 0; font-size: 14px; line-height: 1.5; }
.as-busy { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.as-busy b { display: block; font-size: 14px; } .as-busy small { display: block; font-size: 12.5px; margin-top: 2px; }
.as-spin { width: 28px; height: 28px; flex: none; border-radius: 50%; background: conic-gradient(from 0deg, #ff6a2b, #ff4fb8, #8b7bff, transparent 75%); -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px); mask: radial-gradient(circle, transparent 9px, #000 10px); animation: vxspin 1s linear infinite; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.song-mood { display: block; margin-top: 6px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.sub summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2, var(--text)); margin-top: 10px; }

.cmp-chk { display: flex !important; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; font-weight: 400 !important; }
.cmp-chk input { margin-top: 3px; } .cmp-chk b { display: block; font-size: 13.5px; } .cmp-chk small { display: block; font-size: 12px; margin-top: 2px; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cmp-c { padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.45; }
.cmp-c p { margin: 6px 0 0; } .cmp-c details { margin-top: 8px; font-size: 13px; } .cmp-c summary { cursor: pointer; font-weight: 600; }
.cmp-n { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .cmp-n a { font-weight: 700; color: var(--text); text-decoration: none; } .cmp-n a:hover { text-decoration: underline; }
.cmp-f { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; } .cmp-f span { font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.cmp-pm b { display: inline-block; width: 14px; color: var(--text-3); }
.cmp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; } @media (max-width: 700px) { .cmp-two { grid-template-columns: 1fr; } }
.cmp-box { padding: 14px; border-radius: 12px; border: 1px solid var(--border); }
.cmp-box.hot { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.cmp-ih { margin-top: 18px !important; }
.cmp-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cmp-i { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.cmp-i em { font-style: normal; font-weight: 600; } .cmp-i small { font-size: 12.5px; line-height: 1.4; } .cmp-i button { margin-top: auto; }

.song-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; } @media (max-width: 700px) { .song-top { grid-template-columns: 1fr; } }
.song-top p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.song-concept { margin: 14px 0; padding: 14px 16px; border-radius: 12px; color: #fff; background: var(--grad); display: flex; flex-direction: column; gap: 4px; }
.song-concept small { opacity: .85; font-size: 12px; } .song-concept b { font-size: 15.5px; line-height: 1.4; } .song-concept span { font-size: 13px; opacity: .92; }
.song-play { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.sc { display: flex; flex-direction: column; gap: 2px; }
.sc-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.sc-row:hover { background: var(--surface-2); } .sc-row.on { background: var(--accent-soft); }
.sc-t { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-3); padding-top: 2px; }
.sc-row em { display: block; font-size: 12.5px; color: var(--text-3); } .sc-row b { display: block; font-size: 14.5px; margin: 2px 0; } .sc-row small { display: block; font-size: 13px; color: var(--text-2, var(--text)); line-height: 1.4; }
.song-cap { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; margin: 8px 0 0; }

.att { margin-top: 8px; }
.att-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .att-row button { display: inline-flex; align-items: center; gap: 6px; } .att-row svg { width: 15px; height: 15px; } .att-row small { font-size: 12px; }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; } .att-list:not(:empty) { margin-bottom: 8px; }
.att-f { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 6px 5px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.att-f b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; } .att-f small { color: var(--text-3); }
.att-f.up { opacity: .7; } .att-f button { border: 0; background: none; padding: 0 4px !important; color: var(--text-3); cursor: pointer; min-height: 0 !important; }
.att-over { outline: 2px dashed var(--accent); outline-offset: -6px; border-radius: 16px; }

.drv { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin: 4px 0 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.drv:empty { display: none; }
.drv-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; } .drv-ic svg { width: 22px; height: 22px; }
.drv-t { flex: 1; min-width: 200px; } .drv-t b { display: block; font-size: 14.5px; } .drv-t small { display: block; font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.drv-a { display: flex; gap: 8px; }
.drv-modal { width: min(640px, 100%) !important; }
.drv-list { max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px; }
.drv-f { display: grid !important; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.drv-f:hover { background: var(--surface-2); } .drv-f.on { background: var(--accent-soft); }
.drv-f b { display: block; font-size: 13.5px; font-weight: 600; word-break: break-word; } .drv-f small { display: block; font-size: 12px; margin-top: 2px; }
.drv-f select { width: auto; font-size: 12.5px; padding: 4px 6px; }

.strat { margin-bottom: 16px; }
.strat-pos { font-size: 17px; line-height: 1.45; font-weight: 600; margin: 0 0 12px; }
.strat-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.strat-b { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.5; } .strat-b small { display: block; color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.strat-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: start; gap: 10px; margin-top: 10px; }
.strat-s { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 13.5px; line-height: 1.45; } .strat-s b { display: block; font-size: 12.5px; margin-bottom: 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-m { width: min(620px, 100%) !important; }
.story-big { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; border-radius: 16px; background: var(--surface-2); text-align: center; margin-bottom: 12px; }
.story-big button.orb { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0 !important; box-shadow: 0 0 0 calc(var(--lv, 0) * 16px) rgba(255, 79, 184, .2); transition: box-shadow .08s; }
.story-big button.orb svg { width: 30px; height: 30px; } .story-big b { font-size: 15px; } .story-big small { font-size: 12.5px; color: var(--text-3); }
.seg2 { display: flex; gap: 6px; margin: 4px 0 10px; } .seg2 button { flex: 1; padding: 10px !important; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; font: inherit; }
.seg2 button b { display: block; font-size: 13.5px; } .seg2 button small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.seg2 button.on { border-color: var(--accent); background: var(--accent-soft); }

/* the voice command at work: an orb with a turning ring, three steps, a moving bar */
.vcmd-orb.busy::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, #ff6a2b, #ff4fb8, #8b7bff); -webkit-mask: radial-gradient(circle, transparent 31px, #000 32px); mask: radial-gradient(circle, transparent 31px, #000 32px); animation: vxspin 1.1s linear infinite; }
.vcmd-pop.working .vcmd-body b::after { content: ""; }
.vcmd-prog { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }
.vcmd-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.vcmd-steps li { display: flex; align-items: center; gap: 7px; transition: color .2s; }
.vcmd-steps li i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; transition: all .2s; }
.vcmd-steps li.on { color: var(--text); font-weight: 600; }
.vcmd-steps li.on i { border-color: transparent; border-top-color: #ff4fb8; border-right-color: #8b7bff; animation: vxspin .8s linear infinite; }
.vcmd-steps li.done { color: var(--text-2, var(--text)); }
.vcmd-steps li.done i { border: 0; background: var(--grad); }
.vcmd-steps li.done i::after { content: ""; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.vcmd-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.vcmd-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--grad); animation: vcbar 1.2s ease-in-out infinite; }
@keyframes vcbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ---------- phone: the voice button and the profile sit in the top bar (not in a row of their own), the three sections
   share the width, side panels scroll with the page (an inner scroll box drew text out of place on iPhone) ---------- */
@media (max-width: 820px) {
  .tb-r.in-mb { display: flex; margin-left: auto; padding: 0; align-items: center; }
  .pf-btn, .pf-ring { width: 40px; height: 40px; } .pf-av { width: 31px; height: 31px; font-size: 13px; }
  .vcmd { height: 36px; margin-right: 4px; padding: 0 4px !important; } .vcmd span { display: none; }
  .pf-menu { position: fixed; right: 8px; top: 58px; width: min(330px, calc(100vw - 16px)); max-height: calc(100dvh - 72px); }
  .app { align-content: start; } .mobile-bar { min-height: 56px; padding-top: 6px; padding-bottom: 6px; align-self: start; }
  .topbar { top: 56px; }
  .topnav { justify-self: stretch; }
  .topnav a { flex: 1; justify-content: center; padding: 0 6px; gap: 6px; }
  .genwrap .gpanel, .gpanel { position: static !important; max-height: none !important; overflow: visible !important; }
  .job-video, .igwrap { position: static !important; }
  .genwrap > *, .gpanel > *, .lay > *, .cmp-two > *, .strat-g > * { min-width: 0; }
  html, body { overflow-x: clip; }
  .gfeed { padding: 0 !important; border: 0 !important; min-height: 0 !important; } .as-card { padding: 14px; border-radius: 14px; } .gfeed-head { padding: 4px 2px 10px !important; }
  .main .row { flex-wrap: wrap; } .main select, .main input, .main textarea { max-width: 100%; }
  .vx-tip { right: 44px; bottom: 12px; font-size: 11px; }
  .vcmd-pop { bottom: 12px; padding: 16px; gap: 12px; } .vcmd-orb { width: 48px; height: 48px; }
  .modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
}
@media (max-width: 380px) { .topnav a svg { display: none; } }

.as-pulse { animation: aspulse 1.2s ease-in-out 4; border-color: transparent !important; background: var(--grad) !important; color: #fff !important; }
@keyframes aspulse { 50% { box-shadow: 0 0 0 8px rgba(255, 79, 184, .25); } }
/* the visual script on a video's page: per scene the voice, what is on screen, its labels */
.sb-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.sb-head h3{margin:0}
.sb-list{display:grid;gap:10px;margin:12px 0}
.sb-sc{display:grid;grid-template-columns:26px minmax(0,1fr);gap:10px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}
.sb-n{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;background:var(--surface-3)}
.sb-k{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;opacity:.55;margin:8px 0 4px}.sb-b>.sb-k:first-child{margin-top:3px}
.sb-say{margin:0;font-weight:500}.sb-show{margin:0;opacity:.8;font-size:14px}
.sb-tags{display:flex;gap:6px;flex-wrap:wrap}.sb-tags span{font-size:12px;padding:3px 9px;border-radius:999px;border:1px solid var(--border)}
.sb-sc textarea,.sb-sc input{width:100%;font-size:14px}
/* «З подкасту»: the cast who will act the moments, and how it works */
.clip-cast{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px;margin:6px 0 18px}
.clip-cast figure{margin:0;display:grid;justify-items:center;gap:2px}.clip-cast svg{width:100%;max-width:130px;height:auto}
.clip-cast figcaption{text-align:center}.clip-cast figcaption b{display:block;font-size:13px}.clip-cast figcaption small{font-size:11.5px;opacity:.6}
.clip-how{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px;counter-reset:ch}
.clip-how li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px 10px;counter-increment:ch}
.clip-how li::before{content:counter(ch);grid-row:span 2;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;background:var(--surface-3)}
.clip-how b{font-size:14px}.clip-how span{font-size:13px;opacity:.75}
