/* onest-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-cyrillic-ext-wght-normal-DOFToQv1.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* onest-cyrillic-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-cyrillic-wght-normal-DayYxulF.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* onest-math-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-math-wght-normal-Bl4ZGkZl.woff2) format('woff2-variations');
  unicode-range: U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF;
}

/* onest-symbols-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-symbols-wght-normal-DxQzqQfC.woff2) format('woff2-variations');
  unicode-range: U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB00-1FBFF;
}

/* onest-vietnamese-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-vietnamese-wght-normal-BBxOatbv.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* onest-latin-ext-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-latin-ext-wght-normal-QAhDxQuo.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* onest-latin-wght-normal */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/app/assets/onest-latin-wght-normal-Dun_Rd-l.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* familjen-grotesk-vietnamese-wght-normal */
@font-face {
  font-family: 'Familjen Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/app/assets/familjen-grotesk-vietnamese-wght-normal-DKRsWTd7.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* familjen-grotesk-latin-ext-wght-normal */
@font-face {
  font-family: 'Familjen Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/app/assets/familjen-grotesk-latin-ext-wght-normal-Cvgdx4cy.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* familjen-grotesk-latin-wght-normal */
@font-face {
  font-family: 'Familjen Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/app/assets/familjen-grotesk-latin-wght-normal-CfZa4wxB.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* martian-mono-cyrillic-ext-standard-normal */
@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url(/app/assets/martian-mono-cyrillic-ext-standard-normal-BFx_pHPN.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* martian-mono-cyrillic-standard-normal */
@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url(/app/assets/martian-mono-cyrillic-standard-normal-Dgr-UBxV.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* martian-mono-latin-ext-standard-normal */
@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url(/app/assets/martian-mono-latin-ext-standard-normal-DeTdBbNh.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* martian-mono-latin-standard-normal */
@font-face {
  font-family: 'Martian Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url(/app/assets/martian-mono-latin-standard-normal-1TqSgyfh.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/*
 * Vodmill's design system. Light and warm: paper background, white cards, ink text, hairline borders.
 * The only dark surface is the stage that holds video, so colours in a frame read true.
 * One accent (the operator's brand colour; App.tsx writes --accent and --on-accent on <html> before the
 * first paint), kept for the primary button, the active tab, selection and the playhead.
 * Scores and states use the green / amber / red scale, never the accent.
 * Token names are a contract with the editor, campaigns and publishing folders: keep them.
 */
:root {
  /* paper */
  --bg: #f5f3ee;
  --panel: #ffffff;
  --raised: #faf9f6;
  --hover: #efece5;
  --line: #e7e3da;
  --line2: #d2cdc1;
  /* ink */
  --ink: #1c1b18;
  --muted: #5f5b52;
  --faint: #777268;
  /* accent */
  --accent: #1f6feb;
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--panel));
  /* states and the score scale */
  --red: #bf372c;
  --red-soft: #fbe6e2;
  --green: #1c7a50;
  --green-soft: #e2f1e8;
  --amber: #9a5b06;
  --amber-soft: #f8ecd2;
  /* the stage: the one dark surface, only around video */
  --stage: #16171b;
  --stage-2: #212329;
  --stage-ink: #f3f2ee;
  --stage-muted: #a0a1aa;
  --stage-line: #33353d;
  /* type */
  --ui: "Onest Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Familjen Grotesk Variable", "Onest Variable", system-ui, sans-serif;
  --mono: "Martian Mono Variable", ui-monospace, "SF Mono", Menlo, monospace;
  /* shape */
  --r-panel: 14px;
  --r-ctl: 9px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(46, 38, 20, .05), 0 6px 18px -6px rgba(46, 38, 20, .1);
  --shadow-lg: 0 2px 6px rgba(46, 38, 20, .06), 0 28px 64px -16px rgba(46, 38, 20, .26);
  /* layout (not part of the contract) */
  --bar-h: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: 30px; letter-spacing: -.022em; }
h2 { font-size: 21px; }
h3 { font-size: 16px; letter-spacing: -.005em; line-height: 1.25; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tc { font-family: var(--mono); font-size: 11.5px; font-stretch: 87.5%; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lede { font-size: 15px; color: var(--muted); max-width: 64ch; }

/* ---------- shell: a slim bar on top, the work below ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: var(--bar-h); display: flex; align-items: center; gap: 6px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font: 650 17px/1 var(--display); letter-spacing: -.02em; text-decoration: none; padding: 6px 14px 6px 0; flex: none; }
.brand img { height: 26px; width: auto; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 15px/1 var(--display); flex: none; }
.topnav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; min-width: 0; }
.topnav a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-radius: 0; }
.topnav a svg { width: 16px; height: 16px; flex: none; }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
/* the active section is marked the way a timeline marks "now": a playhead on the bar's lower edge */
.topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.topnav a[aria-current="page"]::before { content: ""; position: absolute; left: 50%; bottom: 1px; margin-left: -4px; border: 4px solid transparent; border-bottom-color: var(--accent); }
.topbar .grow { flex: 1; }
.credits { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 9px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-weight: 550; white-space: nowrap; }
.credits:hover { border-color: var(--line2); }
.credits svg { width: 15px; height: 15px; color: var(--muted); }
.credits .tc { font-size: 12px; }
.credits .lbl { color: var(--muted); font-weight: 450; font-size: 12.5px; }
.bell { position: relative; }
.bell-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font: 650 10px/16px var(--ui); text-align: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--hover); border: 1px solid var(--line2); display: grid; place-items: center; font: 600 11px/1 var(--ui); color: var(--ink); flex: none; }
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r-pill); border: 1px solid transparent; background: none; cursor: pointer; max-width: 220px; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--panel); border-color: var(--line); }
.acct-btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.acct-btn > svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 280px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-lg); display: grid; gap: 1px; animation: rise .14s ease; }
.acct-pop .who { padding: 10px 10px 8px; display: grid; gap: 1px; min-width: 0; }
.acct-pop .who b, .acct-pop .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-pop .ws { padding: 4px 10px 10px; display: grid; gap: 6px; }
.acct-pop hr { border: 0; height: 1px; background: var(--line); margin: 5px 0; }
.acct-pop a, .acct-pop button.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.acct-pop a:hover, .acct-pop button.item:hover, .acct-pop a:focus-visible, .acct-pop button.item:focus-visible { background: var(--hover); }
.acct-pop a[aria-current="page"] { background: var(--raised); font-weight: 600; }
.acct-pop a svg, .acct-pop button.item svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1280px; margin: 0 auto; padding: 34px 32px 96px; }
.page.narrow { max-width: 860px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.banner { padding: 7px 16px; background: var(--amber-soft); color: var(--amber); text-align: center; font-size: 13px; border-bottom: 1px solid color-mix(in srgb, var(--amber) 22%, transparent); }
.boot { min-height: 100vh; display: grid; place-items: center; padding: 24px; color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line2); background: var(--panel); font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 0 rgba(46, 38, 20, .04); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--raised); border-color: color-mix(in srgb, var(--line2) 60%, var(--muted)); }
.btn:active { box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(46, 38, 20, .08), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 90%, var(--ink)); border-color: color-mix(in srgb, var(--accent) 90%, var(--ink)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, var(--line2)); }
.btn.sm, .btn.small { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.sm svg, .btn.small svg { width: 14px; height: 14px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn .tc { opacity: .82; }
.icon-btn { position: relative; width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover, .icon-btn.on { background: var(--hover); color: var(--ink); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn svg { width: 17px; height: 17px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.field .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.input, .textarea, .select { width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-ctl); padding: 8px 11px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--line2) 55%, var(--muted)); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--raised); color: var(--muted); cursor: not-allowed; }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.switch { position: relative; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--line2); border: 0; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgba(46, 38, 20, .3); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line2); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; text-align: left; }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.chip svg { width: 14px; height: 14px; flex: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--hover); gap: 2px; max-width: 100%; }
.seg button { border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(46, 38, 20, .12); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 0; background: none; color: var(--muted); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on, .tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab.on::after, .tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.tab .tc { color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 550; background: var(--hover); color: var(--muted); white-space: nowrap; }
.pill svg { width: 12px; height: 12px; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn, .pill.run { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.info, .pill.acc { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.run .dot { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--panel); font: 500 10.5px/1 var(--mono); color: var(--muted); }

/* ---------- surfaces and layout ---------- */
.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; box-shadow: var(--shadow); }
.panel.flat, .card.flat { background: transparent; box-shadow: none; }
.panel h3 + *, .card h3 + * { margin-top: 12px; }
.stack { display: grid; gap: 16px; }
.stack > * { min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap, .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.gap-s { gap: 6px; }
.gap-m { gap: 16px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 > *, .grid3 > * { min-width: 0; align-content: start; }
.divider { height: 1px; background: var(--line); margin: 4px 0; border: 0; }
.notice { padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--raised); font-size: 13.5px; }
.notice.err { border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); background: var(--red-soft); }
.notice.warn { border-color: color-mix(in srgb, var(--amber) 28%, transparent); color: var(--amber); background: var(--amber-soft); }
.notice.ok { border-color: color-mix(in srgb, var(--green) 28%, transparent); color: var(--green); background: var(--green-soft); }
.empty { padding: 64px 24px; text-align: center; border: 1px dashed var(--line2); border-radius: var(--r-panel); display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 19px; }
.empty p { max-width: 52ch; }
.empty > svg { color: var(--faint); }
.empty .btn { margin-top: 8px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 550; color: var(--faint); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--hover) 25%, var(--raised) 45%, var(--hover) 65%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; color: transparent; }
@keyframes shimmer { to { background-position: -150% 0; } }
.progress { height: 5px; border-radius: var(--r-pill); background: var(--hover); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .6s ease; }
.progress.acc i { background: var(--accent); }

/* ---------- the stage: dark, only around video ---------- */
.stage { background: var(--stage); color: var(--stage-ink); border-radius: var(--r-panel); }
.stage .muted { color: var(--stage-muted); }
.stage .faint { color: color-mix(in srgb, var(--stage-muted) 70%, var(--stage)); }
.stage .icon-btn { color: var(--stage-muted); }
.stage .icon-btn:hover, .stage .icon-btn.on { background: var(--stage-2); color: var(--stage-ink); }
.stage .kbd { background: var(--stage-2); border-color: var(--stage-line); color: var(--stage-muted); }
.stage video { background: #000; }
.ar-916 { aspect-ratio: 9 / 16; } .ar-169 { aspect-ratio: 16 / 9; } .ar-11 { aspect-ratio: 1; } .ar-45 { aspect-ratio: 4 / 5; }
.fmt { display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; vertical-align: middle; flex: none; }
.fmt.f916 { width: 9px; height: 15px; } .fmt.f169 { width: 16px; height: 9px; } .fmt.f11 { width: 12px; height: 12px; } .fmt.f45 { width: 11px; height: 13px; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(40, 34, 22, .34); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 24px; animation: fade .15s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-lg); display: grid; gap: 18px; animation: rise .18s ease; }
.modal > * { min-width: 0; }
.modal > .seg { justify-self: start; }
.modal.wide { width: min(940px, 100%); }
.modal .foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 10px 16px; border-radius: 11px; background: var(--ink); color: var(--bg); font-weight: 550; box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.toast.err { background: var(--red); color: #fff; }

/* ---------- sign in: the form on paper, the product's stage beside it ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 520px) 1fr; }
.auth .form { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth .form .brand { padding: 0; }
.auth .stage { position: relative; margin: 16px; border-radius: 22px; display: grid; align-content: end; overflow: hidden; padding: 44px; }
.auth-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth .stage-panel { position: relative; display: grid; gap: 8px; max-width: 30ch; }
.auth .stage-panel b { font: 600 30px/1.1 var(--display); letter-spacing: -.02em; }
.auth .stage-panel .muted { font-size: 15px; }

/* ---------- small shared pieces of the platform pages ---------- */
.pf-grid > *, .pf-grid .stack > * { min-width: 0; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.pf-list > li:last-child { border-bottom: 0; }
.pf-list > li.col { display: grid; gap: 8px; align-items: start; }
.pf-grow { flex: 1; min-width: 0; }
.pf-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-code { font: 11.5px/1.7 var(--mono); font-stretch: 87.5%; background: var(--raised); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; overflow-x: auto; white-space: pre; margin: 0; color: var(--ink); }
.pf-secret { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); background: var(--amber-soft); }
.pf-secret .input { font-family: var(--mono); font-size: 11.5px; }
.pf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.pf-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.pf-kpi b { font: 600 26px/1.05 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.pf-bars .bar { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--ink); opacity: .78; position: relative; }
.pf-bars .bar.zero { background: var(--line2); opacity: 1; height: 2px !important; }
.pf-bars .bar:hover { opacity: 1; }
.pf-axis { display: flex; justify-content: space-between; padding-top: 6px; }
.pf-hbar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 70px; gap: 12px; align-items: center; padding: 6px 0; }
.pf-hbar i { display: block; height: 8px; border-radius: var(--r-pill); background: var(--ink); opacity: .78; min-width: 2px; }

/* ---------- first steps ---------- */
.ob { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; padding: 18px 20px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); }
.ob-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; counter-reset: ob; }
.ob-step { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 13px 4px 6px; border-radius: var(--r-pill); border: 1px solid var(--line2); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 500; background: var(--panel); }
.ob-step:hover { border-color: var(--muted); }
.ob-step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); font: 500 10.5px/1 var(--mono); color: var(--muted); flex: none; }
.ob-step.done { color: var(--muted); border-color: var(--line); background: var(--raised); }
.ob-step.done .n { background: var(--green-soft); color: var(--green); }
.ob-step.next { border-color: var(--accent); }
.ob-step.next .n { background: var(--accent); color: var(--on-accent); }
.ob-step svg { width: 13px; height: 13px; }

/* ---------- notifications ---------- */
.nt-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.nt-list li { border-bottom: 1px solid var(--line); }
.nt-list li:last-child { border-bottom: 0; }
.nt-list a, .nt-list .nt-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; text-decoration: none; color: inherit; }
.nt-list a:hover { background: var(--raised); }
.nt-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.nt-ic svg { width: 16px; height: 16px; }
.nt-ic.ok { color: var(--green); background: var(--green-soft); } .nt-ic.bad { color: var(--red); background: var(--red-soft); } .nt-ic.acc { color: var(--accent); background: var(--accent-soft); }
.nt-unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .credits .lbl { display: none; }
  .acct-btn .name { display: none; }
}
@media (max-width: 820px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 14px 0; row-gap: 0; }
  .topnav { order: 5; flex: 0 0 calc(100% + 28px); margin: 6px -14px 0; padding: 0 6px; height: 42px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
  .topnav::-webkit-scrollbar { display: none; }
  .page { padding: 22px 16px 72px; }
  h1 { font-size: 25px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth .stage { display: none; }
  .auth .form { padding: 32px 22px; }
  .pf-hbar { grid-template-columns: 96px minmax(0, 1fr) 56px; }
  .ob { grid-template-columns: 1fr; }
  .scrim { padding: 10px; align-items: end; }
  .modal { padding: 18px; max-height: calc(100vh - 20px); }
}
/*
 * Account pages: files, team, plan and credits, workspace. Built on the tokens in styles.css.
 */

/* ---------- shared bits ---------- */
.pg-menu { position: relative; }
.pg-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 180px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: grid; gap: 1px; animation: rise .12s ease; }
.pg-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); font-size: 13.5px; }
.pg-pop button:hover, .pg-pop button:focus-visible { background: var(--hover); outline: none; }
.pg-pop button.danger { color: var(--red); }
.pg-pop button:disabled { opacity: .45; cursor: not-allowed; }
.pg-pop svg { width: 15px; height: 15px; color: var(--muted); }
.pg-pop button.danger svg { color: inherit; }

.pg-drop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 26px 24px; border: 1px dashed var(--line2); border-radius: var(--r-panel); background: transparent; transition: border-color .15s, background .15s; margin-bottom: 22px; }
.pg-drop > svg { width: 26px; height: 26px; color: var(--faint); }
.pg-drop-text { display: grid; gap: 2px; }
.pg-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.pg-drop.compact { padding: 14px 18px; margin-bottom: 0; }
.pg-drop.compact > svg { width: 20px; height: 20px; }
.page > .pg-drop.compact { margin-bottom: 18px; }


.nv-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- uploads ---------- */
.up-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.up-usage { display: grid; gap: 5px; min-width: 160px; }
.up-meter { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.up-meter i { display: block; height: 100%; background: var(--muted); border-radius: inherit; }
.up-wall { columns: 5 200px; column-gap: 12px; }
.up-tile { position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--hover); cursor: pointer; break-inside: avoid; box-shadow: 0 0 0 1px var(--line); }
.up-tile img { width: 100%; height: auto; display: block; min-height: 60px; }
.up-tile img.logo { padding: 22px; object-fit: contain; background: repeating-conic-gradient(var(--hover) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.up-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 1px; padding: 26px 12px 10px; text-align: left; color: var(--stage-ink); background: linear-gradient(transparent, color-mix(in srgb, var(--stage) 86%, transparent)); opacity: 0; transition: opacity .15s; }
.up-cap b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-cap .small { opacity: .8; }
.up-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-tile:hover .up-cap, .up-tile:focus-visible .up-cap { opacity: 1; }
.up-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.up-music { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.up-music li { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(200px, 320px) auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-music-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.up-music-icon svg { width: 17px; height: 17px; }
.up-music-name { display: grid; min-width: 0; }
.up-music-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-music audio { width: 100%; height: 34px; }
.up-edit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.up-edit-view { display: grid; gap: 8px; }
.up-edit-view img { width: 100%; max-height: 54vh; object-fit: contain; border-radius: 14px; background: repeating-conic-gradient(var(--hover) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
@media (hover: none) { .up-cap { opacity: 1; } }
@media (max-width: 820px) {
  .up-wall { columns: 2 140px; column-gap: 8px; }
  .up-tile { margin-bottom: 8px; }
  .up-music li { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .up-music audio { grid-column: 1 / -1; }
  .up-edit { grid-template-columns: 1fr; }
  .pg-drop { grid-template-columns: auto 1fr; }
  .pg-drop > .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- team ---------- */
.tm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.tm-list { list-style: none; margin: 12px 0 0; padding: 0; }
.tm-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 140px 34px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tm-list .avatar { width: 34px; height: 34px; }
.tm-who { display: grid; min-width: 0; }
.tm-who b, .tm-who .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-who b { font-weight: 600; }
.tm-role { height: 34px; padding-top: 4px; padding-bottom: 4px; }
.tm-list .pill { justify-self: start; }
.tm-invite { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; }
.tm-sent { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); display: grid; gap: 10px; }
.tm-sent svg { vertical-align: -2px; }
.tm-sent .input { font-size: 12px; }
.tm-pending { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tm-pending li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tm-roles { position: sticky; top: 24px; padding: 4px 0; }
.tm-roles dl { margin: 12px 0 0; display: grid; gap: 0; }
.tm-roles dl > div { padding: 12px 0 12px 14px; border-left: 2px solid var(--line); }
.tm-roles dl > div.me { border-left-color: var(--accent); }
.tm-roles dt { font-weight: 600; }
.tm-roles dd { margin: 3px 0 0; }
@media (max-width: 980px) {
  .tm-grid { grid-template-columns: 1fr; }
  .tm-roles { position: static; }
}
@media (max-width: 560px) {
  .tm-list li { grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .tm-role, .tm-list .pill { grid-column: 2; grid-row: 2; width: auto; justify-self: start; }
  .tm-invite { grid-template-columns: 1fr 1fr; }
  .tm-invite .input { grid-column: 1 / -1; }
}

/* ---------- plan and credits ---------- */
.bl-top { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-bottom: 18px; }
.bl-balance { display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bl-big { font: 600 52px/1 var(--display); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin: 4px 0; }
.bl-plan { display: grid; gap: 16px; padding: 22px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bl-limits { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 22px; }
.bl-limits dt { font-size: 12px; color: var(--faint); }
.bl-limits dd { margin: 2px 0 0; }
.bl-off { padding: 18px 20px; border-radius: var(--r-panel); border: 1px dashed var(--line2); display: grid; gap: 6px; margin-bottom: 18px; }
.bl-section { margin-top: 40px; display: grid; gap: 14px; }
.bl-compare { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); }
.bl-col { display: grid; grid-template-rows: 116px; grid-auto-rows: 44px; border-left: 1px solid var(--line); }
.bl-col.bl-labels { border-left: 0; position: sticky; left: 0; background: var(--raised); z-index: 1; }
.bl-col.cur { background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 0 2px 0 var(--accent); }
.bl-cell { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 13px; }
.bl-cell.head { border-top: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
.bl-cell.head b { font: 650 18px/1 var(--display); }
.bl-labels .bl-cell { color: var(--muted); }
.bl-cell.no { color: var(--faint); }
.bl-yes { color: var(--green); flex: none; }
.bl-cell .bl-k { display: none; }
.bl-packs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bl-packs li { display: grid; grid-template-columns: 180px 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bl-pack-n { font: 650 20px/1 var(--display); }
.bl-ledger { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: auto; background: var(--panel); box-shadow: var(--shadow); }
.bl-ledger .table td { padding: 10px 14px; }
.bl-ledger .table th { padding: 10px 14px; }
.bl-delta { text-align: right; font-size: 13px; }
.bl-delta.plus { color: var(--green); }
.bl-delta.minus { color: var(--ink); }
.bl-when { white-space: nowrap; }
@media (max-width: 980px) {
  .bl-top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bl-labels { display: none !important; }
  .bl-compare { grid-auto-flow: row; grid-auto-columns: auto; }
  .bl-col { border-left: 0; border-top: 1px solid var(--line); grid-template-rows: auto; grid-auto-rows: auto; padding-bottom: 8px; }
  .bl-col:first-of-type { border-top: 0; }
  .bl-cell { border-top: 0; padding: 4px 16px; }
  .bl-cell.head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; padding: 14px 16px 8px; }
  .bl-cell .bl-k { display: inline; color: var(--muted); flex: 1; }
  .bl-packs li { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .bl-big { font-size: 46px; }
  .bl-ledger .table th:nth-child(4), .bl-ledger .table td:nth-child(4) { display: none; }
  .bl-when { white-space: normal; }
}

/* ---------- workspace ---------- */
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.st-row { display: flex; gap: 8px; margin-top: 12px; }
.st-key { display: grid; gap: 14px; }
.st-key h3 + * { margin-top: 0; }
.st-facts dl { margin: 12px 0 0; }
.st-facts dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.st-facts dt { color: var(--muted); }
.st-facts dd { margin: 0; text-align: right; min-width: 0; }
.st-id { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.st-id:hover { color: var(--ink); }
@media (max-width: 980px) { .st-grid { grid-template-columns: 1fr; } }
.panel .row > h3 + * { margin-top: 0; }
/*
 * The studio pages: library (lb-, ns-), clip board (bd-, wv-, tp-, ts-), exports (ex-), clip settings (cs-)
 * and the pieces they share (sd-). Colours and sizes come from the tokens in styles.css only.
 */

/* ---------- shared ---------- */
.sd-tile { background-color: var(--stage); background-repeat: no-repeat; position: relative; overflow: hidden; }
.sd-tile.none { display: grid; place-items: center; color: var(--stage-muted); background: var(--stage-2); }
.sd-tile.none svg { width: 22px; height: 22px; opacity: .7; }
.sd-score { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 600; flex: none; }
.sd-score .tc { font-size: 12.5px; font-weight: 600; }
.sd-score.hi { background: var(--green-soft); color: var(--green); }
.sd-score.mid { background: var(--amber-soft); color: var(--amber); }
.sd-score.lo { background: var(--red-soft); color: var(--red); }
.sd-num { display: flex; align-items: center; gap: 8px; }
.sd-num .input { width: 76px; font-size: 13px; }
.sd-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.sd-settings > :nth-child(4), .sd-settings > :nth-child(5) { grid-column: span 1; }
.sd-settings > :nth-child(5) { grid-column: span 2; }
.sd-settings > :nth-child(6) { grid-column: 1 / -1; }
.sd-price { margin: 0; display: grid; }
.sd-price > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sd-price > div:last-child { border-bottom: 0; }
.sd-price dt { color: var(--muted); }
.sd-price dd { margin: 0; text-align: right; }
.sd-price .sum dt { color: var(--ink); font-weight: 600; }
.sd-price .sum dd { font-size: 14px; font-weight: 600; }
.sd-analyse { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.sd-analyse-form { display: grid; gap: 16px; min-width: 0; }
.sd-analyse-side { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-panel); background: var(--raised); border: 1px solid var(--line); }
.sd-analyse-go { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.sd-analyse-go .btn.lg { flex: 1; }
.sd-chat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 11px; flex-wrap: wrap; }
.sd-chat > svg { width: 20px; height: 20px; color: var(--faint); flex: none; }
.sd-chat .grow { min-width: 200px; }
.sd-bulk { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.sd-bulk li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sd-bulk li:last-child { border-bottom: 0; }

/* ---------- library ---------- */
.lb { position: relative; }
.lb-meters { display: flex; gap: 12px 40px; flex-wrap: wrap; margin: -6px 0 24px; }
.lb-meter { display: grid; gap: 4px; min-width: 220px; }
.lb-meter .progress { height: 3px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }
.lb-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); overflow: hidden; min-width: 0; transition: box-shadow .15s, border-color .15s; }
.lb-card.open:hover { border-color: var(--line2); box-shadow: var(--shadow-lg); }
.lb-face { display: block; background: var(--stage); }
.lb-thumb { aspect-ratio: 16 / 9; width: 100%; }
.lb-dur, .lb-at { position: absolute; bottom: 8px; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--stage) 78%, transparent); color: var(--stage-ink); font-size: 10.5px; }
.lb-dur { right: 8px; }
.lb-at { left: 8px; }
.lb-body { padding: 14px 16px 16px; display: grid; gap: 4px; flex: 1; align-content: start; }
.lb-body h3 { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-top: 5px; }
.lb-body h3 a { text-decoration: none; }
.lb-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.lb-body .pg-menu { margin: -2px -8px 0 0; }
.lb-state { display: grid; gap: 8px; margin-top: 10px; justify-items: start; }
.lb-state > .row, .lb-state > .progress { width: 100%; }
.lb-note { display: flex; gap: 7px; color: var(--amber); }
.lb-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.lb-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lb-empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 56px 24px 40px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lb-empty h2 { font-size: 28px; letter-spacing: -.02em; }
.lb-empty .lede { margin-bottom: 6px; }
.lb-empty-art { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--stage); color: var(--stage-ink); }
.lb-empty-art svg { width: 28px; height: 28px; }
.lb-dropveil { position: fixed; inset: var(--bar-h) 0 0 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(2px); border: 2px dashed var(--accent); border-radius: 18px; margin: 12px; pointer-events: none; font-size: 17px; }
.lb-dropveil svg { width: 36px; height: 36px; color: var(--accent); }

/* new source */
.ns-drop { display: flex; align-items: center; gap: 16px; padding: 30px 24px; border: 1.5px dashed var(--line2); border-radius: var(--r-panel); background: var(--raised); transition: border-color .15s, background .15s; flex-wrap: wrap; }
.ns-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.ns-drop.has { border-style: solid; padding: 16px 18px; background: var(--panel); }
.ns-drop > svg { width: 28px; height: 28px; color: var(--faint); flex: none; }
.ns-drop .grow { display: grid; gap: 2px; min-width: 180px; }
.ns-rights { padding: 14px 16px; border-radius: 11px; background: var(--raised); border: 1px solid var(--line); font-weight: 500; }
.ns-upload { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--raised); }

/* ---------- clip board ---------- */
.bd { max-width: 1640px; margin: 0 auto; padding: 18px 24px 72px; }
.bd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.bd-head h1 { font-size: 22px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.bd-head .grow { min-width: 240px; display: grid; gap: 4px; }
.bd-progress { display: grid; gap: 8px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); }
.bd-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bd-left { position: sticky; top: calc(var(--bar-h) + 14px); height: calc(100vh - var(--bar-h) - 28px); min-height: 520px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bd-stage { flex: none; padding: 10px 10px 8px; display: grid; gap: 8px; min-width: 0; }
.bd-video { aspect-ratio: 16 / 9; max-height: 36vh; width: 100%; border-radius: 8px; overflow: hidden; background: #000; display: grid; place-items: center; justify-self: center; }
.bd-video video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.bd-novideo { display: grid; justify-items: center; gap: 8px; font-size: 13px; }
.bd-right { min-width: 0; display: grid; gap: 12px; }
.bd-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: var(--bar-h); z-index: 5; background: var(--bg); padding-top: 4px; }
.bd-tools .tabs { flex: 1; min-width: 0; }
.bd-sort { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; white-space: nowrap; }
.bd-sort .select { width: auto; padding-top: 5px; padding-bottom: 5px; font-size: 13px; color: var(--ink); }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bd-clip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; scroll-margin: calc(var(--bar-h) + 64px) 0 24px; transition: border-color .12s, box-shadow .12s; }
.bd-clip:hover { border-color: var(--line2); }
.bd-clip.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow); }
.bd-clip.rejected:not(.sel) { background: var(--raised); }
.bd-clip.rejected:not(.sel) .bd-thumb, .bd-clip.rejected:not(.sel) .bd-title { opacity: .6; }
.bd-row { display: grid; grid-template-columns: 22px 88px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; }
.bd-rank { color: var(--faint); text-align: right; }
.bd-thumb { width: 88px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; }
.bd-what { display: grid; gap: 4px; min-width: 0; }
.bd-title { border: 0; background: none; padding: 0; text-align: left; font: 600 14.5px/1.3 var(--ui); cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.bd-sub { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.bd-flagn { display: inline-flex; align-items: center; gap: 4px; color: var(--amber); font-weight: 550; }
.bd-flagn svg { width: 12px; height: 12px; }
.bd-quick { display: flex; gap: 2px; }
.bd-quick .icon-btn.ok:hover { background: var(--green-soft); color: var(--green); }
.bd-quick .icon-btn.no:hover { background: var(--red-soft); color: var(--red); }
.bd-detail { display: grid; gap: 16px; padding: 16px 16px 14px; border-top: 1px solid var(--line); background: var(--raised); }
.bd-detail h4 { margin: 0 0 6px; font: 600 12.5px/1.2 var(--ui); color: var(--muted); }
.bd-why p { font-size: 15px; line-height: 1.5; max-width: 68ch; }
.bd-why .small { display: block; margin-top: 6px; }
.bd-signals { display: grid; gap: 5px; }
.bd-signal { display: grid; grid-template-columns: 96px minmax(60px, 1fr) 44px 34px; gap: 10px; align-items: center; font-size: 13px; }
.bd-signal .bar { height: 6px; border-radius: var(--r-pill); background: var(--hover); overflow: hidden; }
.bd-signal .bar i { display: block; height: 100%; border-radius: inherit; }
.bd-signal .bar.hi i { background: var(--green); }
.bd-signal .bar.mid i { background: var(--amber); }
.bd-signal .bar.lo i { background: var(--red); }
.bd-signal .val, .bd-signal .wt { text-align: right; }
.bd-reasons { margin: 0; padding: 0 0 0 18px; display: grid; gap: 3px; font-size: 13.5px; color: var(--muted); max-width: 72ch; }
.bd-flags { display: grid; gap: 8px; }
.bd-flag { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); flex-wrap: wrap; }
.bd-flag > svg { width: 16px; height: 16px; flex: none; }
.bd-flag .grow { min-width: 180px; }
.bd-flag p { color: var(--ink); margin-top: 1px; }
.bd-flag .btn { color: var(--ink); }
.bd-tags { word-spacing: 2px; }
.bd-render { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.bd-render.failed { border-color: color-mix(in srgb, var(--red) 30%, transparent); background: var(--red-soft); color: var(--red); }
.bd-render.done svg { color: var(--green); }
.bd-render.done .btn svg { color: inherit; }
.bd-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bd-actions .kbd { margin-left: 2px; }
.btn.primary .kbd { background: transparent; border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); color: var(--on-accent); }
.bd-keys { display: flex; gap: 6px 16px; flex-wrap: wrap; padding: 6px 2px; }
.bd-keys > span { display: inline-flex; align-items: center; gap: 4px; }

/* transport */
.tp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px; }
.tp-play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--stage-ink); color: var(--stage); display: grid; place-items: center; cursor: pointer; flex: none; }
.tp-play svg { width: 16px; height: 16px; fill: currentColor; }
.tp-play:focus-visible, .tp-btn:focus-visible, .wv-box:focus-visible { outline-color: var(--stage-ink); }
.tp-time { color: var(--stage-muted); font-size: 12px; padding: 0 4px; white-space: nowrap; }
.tp-time b { color: var(--stage-ink); font-weight: 500; }
.tp-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--stage-line); background: none; color: var(--stage-ink); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tp-btn:hover { background: var(--stage-2); }
.tp-btn svg { width: 13px; height: 13px; }
.tp-btn.on { border-color: var(--stage-muted); background: var(--stage-2); }
.tp-btn.go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tp-btn .tc { font-size: 10.5px; opacity: .8; }
.tp-marks { display: inline-flex; align-items: center; gap: 4px; }

/* waveform */
.wv { display: grid; gap: 4px; min-width: 0; }
.wv-ruler { position: relative; height: 14px; overflow: hidden; }
.wv-ruler span { position: absolute; top: 0; transform: translateX(-50%); font-size: 9.5px; color: var(--stage-muted); opacity: .8; white-space: nowrap; }
.wv-box { position: relative; height: 84px; border-radius: 8px; background: var(--stage-2); overflow: hidden; cursor: pointer; touch-action: none; user-select: none; }
.wv-box canvas { position: relative; display: block; pointer-events: none; color: color-mix(in srgb, var(--amber) 42%, var(--stage-ink)); }
.wv-clip { position: absolute; top: 0; bottom: 0; min-width: 3px; padding: 0; border: 0; border-top: 3px solid var(--stage-muted); background: color-mix(in srgb, var(--stage-ink) 10%, transparent); cursor: pointer; }
.wv-clip.approved { border-top-color: color-mix(in srgb, var(--green) 50%, var(--stage-ink)); background: color-mix(in srgb, var(--green) 34%, transparent); }
.wv-clip.rejected { border-top-color: color-mix(in srgb, var(--red) 60%, var(--stage)); background: color-mix(in srgb, var(--red) 12%, transparent); }
.wv-clip.sel { border-top-color: var(--accent); background: color-mix(in srgb, var(--accent) 34%, transparent); box-shadow: inset 1px 0 0 var(--accent), inset -1px 0 0 var(--accent); z-index: 1; }
.wv-mark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--stage-ink); pointer-events: none; z-index: 2; }
.wv-marked { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--stage-ink) 12%, transparent); pointer-events: none; }
.wv-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 3; will-change: transform; }
.wv-head::before { content: ""; position: absolute; top: 0; left: -4px; border: 5px solid transparent; border-top-color: var(--accent); }
.wv-tip { position: absolute; top: 4px; transform: translateX(-50%); z-index: 4; display: grid; justify-items: center; gap: 3px; padding: 3px; border-radius: 7px; background: var(--stage); border: 1px solid var(--stage-line); pointer-events: none; color: var(--stage-ink); }
.wv-tip-img { width: 112px; aspect-ratio: 16 / 9; border-radius: 4px; background-repeat: no-repeat; }
.wv-tip .tc { font-size: 10.5px; padding: 0 3px 1px; }
.wv-mini { position: relative; height: 12px; border-radius: 4px; background: var(--stage-2); cursor: pointer; overflow: hidden; }
.wv-mini i { position: absolute; top: 3px; bottom: 3px; border-radius: 2px; background: var(--stage-muted); }
.wv-mini i.approved { background: color-mix(in srgb, var(--green) 50%, var(--stage-ink)); }
.wv-mini i.rejected { background: color-mix(in srgb, var(--red) 55%, var(--stage)); }
.wv-mini i.sel { background: var(--accent); }
.wv-win { position: absolute; top: 0; bottom: 0; border: 1px solid var(--stage-muted); border-radius: 4px; background: color-mix(in srgb, var(--stage-ink) 10%, transparent); pointer-events: none; }
.wv-minihead { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--accent); pointer-events: none; }
.wv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 30px; }
.wv-foot .icon-btn { width: 28px; height: 28px; }
.wv-foot .icon-btn svg { width: 14px; height: 14px; }
.wv-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--stage-muted); padding-left: 2px; }
.wv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wv-legend .k { display: inline-block; flex: none; }
.wv-legend .k.clip { width: 12px; height: 9px; border-top: 2px solid var(--stage-muted); background: color-mix(in srgb, var(--stage-ink) 14%, transparent); }
.wv-legend .k.loud { width: 2px; height: 11px; background: var(--stage-ink); box-shadow: 4px 0 0 var(--stage-ink), -4px 0 0 color-mix(in srgb, var(--stage-muted) 55%, transparent); margin: 0 4px; }
.wv-legend .k.chat { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--amber) 42%, var(--stage-ink)); }

/* transcript */
.ts { flex: 1; min-height: 180px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.ts-head { display: flex; align-items: center; gap: 4px 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ts-head .check input { margin: 0; width: 15px; height: 15px; }
.ts-body { position: relative; flex: 1; overflow-y: auto; padding: 12px 16px 56px; font-size: 14.5px; line-height: 1.75; scroll-behavior: auto; }
.ts-para { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 3px 0; content-visibility: auto; contain-intrinsic-size: auto 78px; }
.ts-time { color: var(--faint); padding-top: 6px; font-size: 10.5px; cursor: pointer; user-select: none; }
.ts-time:hover { color: var(--ink); }
.ts-speaker { display: block; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.4; user-select: none; }
.ts-body [data-i] { cursor: pointer; border-radius: 3px; padding: 1px 0; }
.ts-body [data-i]:hover { background: var(--hover); }
.ts-body [data-i].in { background: var(--accent-soft); }
.ts-body [data-i].now { background: var(--accent); color: var(--on-accent); }
.ts-sel { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 14px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow-lg); animation: rise .14s ease; }

/* ---------- exports ---------- */
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 28px; align-items: start; }
.ex-listcol { min-width: 0; display: grid; gap: 10px; }
.ex-queue { padding: 0 2px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 9px 14px 9px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; cursor: pointer; transition: border-color .12s; }
.ex-row:hover { border-color: var(--line2); }
.ex-row.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.ex-cover { width: 48px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--stage); display: grid; place-items: center; color: var(--stage-muted); }
.ex-cover img { width: 100%; height: 100%; object-fit: cover; }
.ex-cover svg { width: 18px; height: 18px; }
.ex-what { display: grid; gap: 5px; min-width: 0; }
.ex-what b { font-weight: 600; }
.ex-meta { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.ex-meta .tc { display: inline-flex; align-items: center; gap: 5px; }
.ex-what .progress { height: 3px; }
.ex-none { display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 320px; border: 1px dashed var(--line2); border-radius: var(--r-panel); }
.ex-none svg { width: 26px; height: 26px; color: var(--faint); }
.ex-detail { position: sticky; top: calc(var(--bar-h) + 16px); max-height: calc(100vh - var(--bar-h) - 32px); overflow-y: auto; display: grid; gap: 18px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); min-width: 0; }
.ex-detail h2 { overflow-wrap: anywhere; font-size: 19px; }
.ex-detail h3 { margin-bottom: 8px; }
.ex-close { display: none; }
.ex-stage { padding: 12px; display: grid; justify-items: center; gap: 10px; }
.ex-stage video { max-height: 52vh; width: auto; max-width: 100%; border-radius: 8px; }
.ex-aspects { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--stage-2); }
.ex-aspects button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--stage-muted); padding: 4px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.ex-aspects button[aria-pressed="true"] { background: var(--stage); color: var(--stage-ink); }
.ex-wait { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); justify-items: start; }
.ex-wait .progress { width: 100%; }
.ex-files { display: grid; gap: 10px; justify-items: start; }
.ex-group { width: 100%; }
.ex-group-h { display: flex; align-items: center; gap: 6px; padding: 0 2px 4px; }
.ex-group ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.ex-group li { border-bottom: 1px solid var(--line); }
.ex-group li:last-child { border-bottom: 0; }
.ex-group a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; text-decoration: none; }
.ex-group a:hover { background: var(--raised); }
.ex-group a svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ex-group a .go { color: var(--faint); }
.ex-group a:hover .go { color: var(--ink); }
.ex-bytes { min-width: 62px; text-align: right; }
.ex-share { display: grid; gap: 8px; }
.ex-share .input { font-size: 11px; }
.ex-publish { padding-top: 16px; border-top: 1px solid var(--line); }
.ex-foot { padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- clip settings ---------- */
.cs-sec { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; padding: 28px 0; border-top: 1px solid var(--line); }
.cs-sec:first-of-type { border-top: 0; padding-top: 0; }
.cs-side { display: grid; gap: 10px; justify-items: start; position: sticky; top: calc(var(--bar-h) + 20px); }
.cs-switches { display: grid; gap: 14px; }
.cs-switches label { align-items: flex-start; cursor: pointer; }
.cs-switches .switch { margin-top: 2px; }
.cs-facts { margin: 6px 0 0; width: 100%; }
.cs-facts > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cs-facts dt { color: var(--muted); }
.cs-facts dd { margin: 0; }
.cs-h { margin-bottom: 10px; font-size: 14px; }
.cs-styles { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.cs-style { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cs-style:last-child { border-bottom: 0; }
.cs-presets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cs-presets li { display: grid; gap: 6px; }
.cs-presets .cs-sample { width: 100%; height: 64px; font-size: 15px; }
.cs-sample { display: grid; place-items: center; width: 96px; height: 46px; border-radius: 8px; font-size: 12.5px; line-height: 1; flex: none; overflow: hidden; white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .bd { padding: 14px 14px 64px; }
  .bd-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bd-left { display: contents; }
  .bd-stage { order: 1; }
  .bd-right { order: 2; }
  .ts { order: 3; max-height: 420px; flex: none; }
  .bd-tools { position: static; }
  .bd-video { max-height: 46vh; }
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
  .ex-none { display: none; }
  .ex-grid.has .ex-listcol { display: none; }
  .ex-detail { position: static; max-height: none; }
  .ex-close { display: inline-grid; }
  .cs-sec { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cs-side { position: static; }
  .sd-analyse { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sd-settings { grid-template-columns: 1fr 1fr; }
  .sd-settings > :nth-child(1), .sd-settings > :nth-child(4), .sd-settings > :nth-child(5), .sd-settings > :nth-child(6) { grid-column: 1 / -1; }
  .lb-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .lb-empty { padding: 36px 18px 28px; }
  .lb-empty h2 { font-size: 23px; }
  .lb-meter { min-width: 0; flex: 1 1 140px; }
  .bd-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .bd-rank { display: none; }
  .bd-tools .tabs { flex: 0 0 100%; }
  .ts { height: 420px; }
  .bd-thumb { width: 64px; }
  .bd-quick { grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; }
  .bd-signal { grid-template-columns: 84px minmax(40px, 1fr) 40px; }
  .bd-signal .wt { display: none; }
  .bd-keys { display: none; }
  .bd-head h1 { font-size: 19px; }
  .tp-time { order: 2; }
  .ts-para { grid-template-columns: 1fr; gap: 0; }
  .ex-row { grid-template-columns: 40px minmax(0, 1fr); }
  .ex-cover { width: 40px; height: 50px; }
  .ex-len { display: none; }
}

.lb-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
