/* GLHF Captions (captions.com.ua). Dark only: a video tool, the picture is the brightest thing on screen. */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/ui/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/ui/inter-latin-wght-normal.woff2") format("woff2");
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JB Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("/ui/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JB Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("/ui/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491; }
@font-face { font-family: "Enerhodar"; font-display: swap; font-weight: 800;
  src: url("/ui/Enerhodar_ExtraBold_Web.woff2") format("woff2"); }
/* caption fonts for the style cards (the same files libass uses) */
@font-face { font-family: "Cap Montserrat XB"; font-display: swap; src: url("/fonts/Montserrat-ExtraBold.ttf"); }
@font-face { font-family: "Cap Montserrat Black"; font-display: swap; src: url("/fonts/Montserrat-Black.ttf"); }
@font-face { font-family: "Cap Enerhodar XB"; font-display: swap; src: url("/fonts/Enerhodar-ExtraBold.otf"); }
@font-face { font-family: "Cap Enerhodar Black"; font-display: swap; src: url("/fonts/Enerhodar-Black.otf"); }
@font-face { font-family: "Cap Rubik Black"; font-display: swap; src: url("/fonts/Rubik-Black.ttf"); }
@font-face { font-family: "Cap Rubik Bold"; font-display: swap; src: url("/fonts/Rubik-Bold.ttf"); }
@font-face { font-family: "Cap Unbounded"; font-display: swap; src: url("/fonts/Unbounded-ExtraBold.ttf"); }
@font-face { font-family: "Cap Oswald"; font-display: swap; src: url("/fonts/Oswald-Bold.ttf"); }
@font-face { font-family: "Cap Inter Black"; font-display: swap; src: url("/fonts/Inter-Black.ttf"); }

:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-2: #0b0c0f;
  --surface: #101115;
  --surface-2: #15171c;
  --surface-3: #1b1e24;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);
  --text: #eceef1;
  --text-2: #b9bec7;
  --muted: #868c96;
  --faint: #5c626c;
  --accent: #37e07a;
  --accent-2: #2bc767;
  --accent-ink: #03150a;
  --accent-soft: rgba(55, 224, 122, 0.12);
  --accent-glow: rgba(55, 224, 122, 0.35);
  --danger: #ff5d5d;
  --danger-soft: rgba(255, 93, 93, 0.12);
  --warn: #f2b84b;
  --info: #6cb4ff;
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JB Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --top-h: 64px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* a faint light from above and film grain: depth without decoration */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 520px at 50% -180px, rgba(55, 224, 122, 0.075), transparent 70%),
    radial-gradient(900px 600px at 100% 0, rgba(108, 180, 255, 0.035), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
img { max-width: 100%; }
::selection { background: rgba(55, 224, 122, 0.3); }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.sub { color: var(--muted); margin-top: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* -- scrollbars ------------------------------------------------------------------------------------ */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }

/* -- app shell ------------------------------------------------------------------------------------- */
.app { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 28px; padding: 0 28px;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect:first-child { fill: #14161b; stroke: var(--line-2); }
.brand-mark .b1 { fill: #eceef1; }
.brand-mark .b2 { fill: var(--accent); transform-origin: 6px 20px; transition: transform 0.6s var(--ease); }
.brand:hover .b2 { transform: scaleX(0.72); }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-2); }
.brand-name b { font-family: "Enerhodar", var(--sans); font-weight: 800; letter-spacing: 0.02em; color: var(--text); margin-right: 2px; }

.nav { position: relative; display: flex; gap: 4px; }
.nav-a {
  position: relative; z-index: 1; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font-weight: 500; cursor: pointer; transition: color 0.25s;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-a:hover { color: var(--text); }
.nav-a.is-on { color: var(--text); }
.nav-ink {
  position: absolute; z-index: 0; top: 0; height: 34px; left: 0; width: 0; border-radius: 9px;
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
}
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  animation: badge-in 0.5s var(--ease) both;
}
@keyframes badge-in { from { transform: scale(0.4); opacity: 0; } }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pulse {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; white-space: nowrap;
  transition: color 0.3s, border-color 0.3s;
}
.pulse i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transition: background 0.3s; }
.pulse.is-busy { color: var(--text-2); border-color: rgba(55, 224, 122, 0.25); }
.pulse.is-busy i { background: var(--accent); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); } 50% { box-shadow: 0 0 0 5px rgba(55, 224, 122, 0); } }

.me { position: relative; }
.me-btn {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 4px; border-radius: 19px;
  border: 1px solid transparent; background: none; cursor: pointer; transition: background 0.25s, border-color 0.25s;
}
.me-btn:hover, .me-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line); }
.me-btn svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.6; transition: transform 0.3s var(--ease); }
.me-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.me-name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.ava--xl { width: 72px; height: 72px; }
.ava--sm { width: 26px; height: 26px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px;
  background: rgba(21, 23, 28, 0.96); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px); transform-origin: top right; animation: pop-in 0.22s var(--ease) both;
}
.menu.is-leaving { animation: pop-out 0.16s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu-head { padding: 9px 11px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: grid; }
.menu-head .me-name { max-width: none; }
.menu-head small { color: var(--muted); font-size: 12px; }
.menu-a { display: block; padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--text-2); transition: background 0.2s, color 0.2s; }
.menu-a:hover { background: var(--surface-3); color: var(--text); }

/* -- views: one at a time, with a soft cross-fade ------------------------------------------------- */
.views { position: relative; flex: 1; display: flex; flex-direction: column; }
.view { display: none; flex: 1; }
.view.is-on { display: flex; flex-direction: column; animation: view-in 0.5s var(--ease) both; }
.view.is-leaving { display: flex; flex-direction: column; position: absolute; inset: 0; animation: view-out 0.2s ease both; pointer-events: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes view-out { to { opacity: 0; transform: translateY(-6px); } }
.app[data-view="boot"] .top-right, .app[data-view="login"] .top-right { visibility: hidden; }

.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }

/* -- buttons & fields ----------------------------------------------------------------------------- */
.btn {
  --h: 38px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; overflow: hidden;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s var(--ease), box-shadow 0.3s, opacity 0.25s;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-3); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.btn--primary {
  background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600;
  box-shadow: 0 0 0 0 var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { background: #4cea8b; border-color: transparent; box-shadow: 0 8px 28px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: rgba(255, 93, 93, 0.3); }
.btn--sm { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn--lg { --h: 46px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn--xl { --h: 54px; padding: 0 26px; font-size: 16px; border-radius: 15px; }
.btn.is-busy { color: transparent !important; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; color: var(--text); flex: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), color 0.2s;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--line-3); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn--danger:hover { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 93, 93, 0.3); }
.chip-btn {
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-3); }
.chip-btn--danger:hover { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 93, 93, 0.3); }
.link-quiet { color: var(--muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.link-quiet:hover { color: var(--text); }

input[type="text"], input[type="search"], textarea, .select select {
  width: 100%; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s; outline: none;
}
input[type="text"], input[type="search"] { height: 40px; padding: 0 13px; }
textarea { padding: 11px 13px; resize: vertical; min-height: 44px; line-height: 1.5; }
input[type="text"]:focus, input[type="search"]:focus, textarea:focus, .select select:focus {
  border-color: rgba(55, 224, 122, 0.55); box-shadow: 0 0 0 4px rgba(55, 224, 122, 0.1); background: #0d0f12;
}
::placeholder { color: var(--faint); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; height: 38px; padding: 0 36px 0 12px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg);
}
.select option, .select optgroup { background: #15171c; }
.field-inline { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.field-inline .select { min-width: 230px; }

.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 12px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.3s var(--ease), box-shadow 0.3s;
}
.switch i::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #d7dbe1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.35s var(--ease), background 0.3s;
}
.switch input:checked + i { background: var(--accent); box-shadow: inset 0 0 0 1px transparent; }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch--lg { width: 52px; height: 30px; }
.switch--lg i { border-radius: 15px; }
.switch--lg i::after { width: 24px; height: 24px; }
.switch--lg input:checked + i::after { transform: translateX(22px); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0;
  --p: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, 0.1) var(--p));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0 0 4px rgba(55, 224, 122, 0), 0 2px 8px rgba(0, 0, 0, 0.5); transition: box-shadow 0.25s, transform 0.2s var(--ease);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(55, 224, 122, 0.18), 0 2px 8px rgba(0, 0, 0, 0.5); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

/* -- login --------------------------------------------------------------------------------------- */
.hero {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 64px 28px 72px; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: 56px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 13px 0 11px; border-radius: 15px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 13px; margin-bottom: 26px;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 650;
  background: linear-gradient(180deg, #fff 30%, #a9afb8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 540px; }
.hero .btn--xl { margin-top: 34px; }
.login-err { margin-top: 14px; color: var(--danger); }
.hero-points { list-style: none; margin: 52px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hero-points li { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.hero-points b { color: var(--text); font-weight: 600; font-size: 14px; }
.hero-copy > * { animation: rise 0.9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.hero-copy > :nth-child(n+5) { animation-delay: 0.26s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hero-demo { display: grid; place-items: center; animation: rise 1.1s 0.2s var(--ease) both; }
.phone {
  position: relative; width: min(340px, 100%); aspect-ratio: 9 / 18.5; border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #23262d, #0d0e11 40%, #17191e);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 60px 120px -30px rgba(0, 0, 0, 0.9), 0 0 120px -20px rgba(55, 224, 122, 0.18);
}
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #050607; }
.phone-bg {
  position: absolute; inset: -10%;
  background:
    radial-gradient(60% 40% at 30% 25%, rgba(255, 170, 90, 0.55), transparent 70%),
    radial-gradient(55% 45% at 75% 60%, rgba(90, 120, 255, 0.45), transparent 70%),
    radial-gradient(70% 50% at 40% 90%, rgba(55, 224, 122, 0.25), transparent 70%),
    linear-gradient(180deg, #1a1410, #0b0d14);
  filter: blur(18px) saturate(120%); animation: drift 18s ease-in-out infinite alternate;
}
.phone-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45)); }
@keyframes drift { to { transform: translate(-4%, 3%) scale(1.08) rotate(2deg); } }
.demo-cap {
  position: absolute; z-index: 2; left: 8%; right: 8%; top: 64%; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.08em 0.3em;
  font: 800 30px/1.18 "Cap Montserrat XB", var(--sans); text-transform: uppercase; color: #fff; text-align: center;
  paint-order: stroke fill; -webkit-text-stroke: 5px #0b0b0b; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.demo-cap .dw { position: relative; display: inline-block; z-index: 1; opacity: 0; transform: translateY(8px) scale(0.92); transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
.demo-cap .dw.is-in { opacity: 1; transform: none; }
.demo-cap .dw.is-out { opacity: 0; transform: translateY(-6px) scale(0.96); transition-duration: 0.25s; }
.demo-plate {
  position: absolute; z-index: 0; left: 0; top: 0; border-radius: 9px; background: var(--accent);
  transition: transform 0.16s var(--ease), width 0.16s var(--ease), height 0.16s var(--ease), opacity 0.25s;
}

/* -- no access ----------------------------------------------------------------------------------- */
.gate { margin: auto; width: 100%; max-width: 480px; padding: 60px 24px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.gate h1 { margin-top: 8px; font-size: 28px; }
.gate .lead { margin-top: 0; font-size: 15.5px; }
.gate-form { width: 100%; display: grid; gap: 12px; margin-top: 12px; }
.gate-done { display: grid; justify-items: center; gap: 14px; margin-top: 8px; color: var(--text-2); animation: rise 0.6s var(--ease) both; }
.tick { width: 52px; height: 52px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.7s var(--ease) forwards; opacity: 0.5; }
.tick path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.45s 0.45s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.gate .link-quiet { margin-top: 18px; }

/* -- queue ----------------------------------------------------------------------------------------- */
.drop {
  position: relative; width: 100%; display: grid; justify-items: center; gap: 8px; padding: 46px 24px 42px;
  border-radius: var(--r-lg); border: 1px dashed rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.015);
  color: var(--text); text-align: center; cursor: pointer; overflow: hidden;
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease);
}
.drop::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(500px 200px at 50% 0, rgba(55, 224, 122, 0.12), transparent 70%);
}
.drop:hover, .drop.is-over { border-color: rgba(55, 224, 122, 0.5); background: rgba(55, 224, 122, 0.025); }
.drop:hover::before, .drop.is-over::before { opacity: 1; }
.drop.is-over { transform: scale(1.01); }
.drop-ico {
  position: relative; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 8px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface)); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s var(--ease);
}
.drop:hover .drop-ico { transform: translateY(-3px); }
.drop-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { position: relative; font-size: 16px; font-weight: 550; }
.drop-title u { text-decoration: none; color: var(--accent); }
.drop-sub { position: relative; color: var(--muted); font-size: 13px; }

.list-head { display: flex; align-items: baseline; gap: 10px; margin: 40px 0 14px; }
.count { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.job {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 12px 14px 12px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; transition: border-color 0.3s, background 0.3s, opacity 0.35s, transform 0.4s var(--ease), grid-template-rows 0.4s var(--ease);
  animation: row-in 0.5s var(--ease) both;
}
.job:hover { border-color: var(--line-2); background: #121317; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.job.is-leaving { animation: row-out 0.38s var(--ease-io) both; pointer-events: none; }
@keyframes row-out { 0% { opacity: 1; } 60% { opacity: 0; transform: scale(0.985); max-height: 120px; } 100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -10px; border-width: 0; } }
.thumb {
  position: relative; width: 56px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-3); flex: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.5s; }
.thumb img.is-loaded { opacity: 1; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb-ph svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.job-main { min-width: 0; display: grid; gap: 7px; }
.job-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.job-user { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.job-user .ava { width: 18px; height: 18px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; background: var(--surface-3); color: var(--text-2); }
.tag--hdr { background: linear-gradient(90deg, rgba(242, 184, 75, 0.18), rgba(255, 93, 140, 0.18)); color: #ffd18a; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.is-run i { background: var(--accent); animation: beat 1.6s ease-in-out infinite; }
.status.is-done { color: var(--accent); }
.status.is-done i { background: var(--accent); }
.status.is-failed { color: var(--danger); }
.status.is-failed i { background: var(--danger); }
.job-acts { display: flex; align-items: center; gap: 6px; }
.job-err { grid-column: 2 / -1; margin-top: -4px; color: var(--danger); font-size: 12.5px; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 12px var(--accent-glow); transition: width 0.9s var(--ease), opacity 0.6s; }
.job.is-done .bar i, .job.is-failed .bar i { opacity: 0; }
.job.is-run .bar::after {
  content: ""; position: absolute; inset: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); animation: sheen 1.8s ease-in-out infinite;
}
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(400%); } }

.empty { display: grid; justify-items: center; gap: 16px; padding: 56px 0 24px; color: var(--muted); animation: rise 0.6s var(--ease) both; }
.empty-art { display: grid; gap: 7px; justify-items: center; }
.empty-art i { display: block; height: 9px; border-radius: 5px; background: var(--surface-3); }
.empty-art i:nth-child(1) { width: 92px; }
.empty-art i:nth-child(2) { width: 132px; height: 15px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(55, 224, 122, 0.25); }
.empty-art i:nth-child(3) { width: 70px; }

.drag-veil {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; opacity: 0;
  background: rgba(5, 6, 8, 0.72); backdrop-filter: blur(6px); transition: opacity 0.3s;
}
.drag-veil > div {
  display: grid; justify-items: center; gap: 16px; padding: 46px 64px; border-radius: 26px; border: 1.5px dashed rgba(55, 224, 122, 0.6);
  background: rgba(55, 224, 122, 0.05); font-size: 18px; transform: scale(0.96); transition: transform 0.4s var(--ease);
}
.drag-veil svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app.is-dragging .drag-veil { opacity: 1; }
.app.is-dragging .drag-veil > div { transform: none; }

/* -- segmented tabs --------------------------------------------------------------------------------- */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.seg--inline { grid-auto-columns: auto; }
.seg-a {
  position: relative; z-index: 1; height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--muted);
  font-weight: 500; font-size: 13.5px; cursor: pointer; transition: color 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.seg-a:hover, .seg-a.is-on { color: var(--text); }
.seg-ink {
  position: absolute; z-index: 0; top: 4px; left: 0; height: 32px; width: 0; border-radius: 9px; background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 12px -4px rgba(0, 0, 0, 0.6); transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.panes { position: relative; }
.pane { display: none; }
.pane.is-on { display: block; animation: pane-in 0.45s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }

/* -- editor ----------------------------------------------------------------------------------------- */
.view--editor.is-on, .view--editor.is-leaving { flex: none; min-height: 0; height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h)); }
.ed { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.ed-bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: rgba(11, 12, 15, 0.6); }
.ed-title { min-width: 0; flex: 1; display: grid; }
.ed-title span { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-title small { color: var(--muted); font-size: 12px; transition: color 0.3s; }
.ed-title small.is-dirty { color: var(--warn); }
.ed-main { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.ed-stage {
  position: relative; min-height: 0; display: grid; place-items: center; padding: 22px; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 40%, #0f1115, #060708);
}
.ed-frame { position: relative; line-height: 0; max-width: 100%; max-height: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -30px rgba(0, 0, 0, 0.9); cursor: pointer; }
.ed-frame video { display: block; max-width: 100%; max-height: calc(100dvh - var(--top-h) - 61px - 196px - 44px); width: auto; height: auto; background: #000; }
/* JASSUB puts its canvas right after the video: lay it over the frame the video fills */
.ed-frame > .JASSUB { position: absolute !important; inset: 0; pointer-events: none; }
.ed-frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 5v10l8-5z' fill='white'/%3E%3C/svg%3E") 55% 50% / 26px no-repeat;
  backdrop-filter: blur(6px); opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.4s var(--ease); pointer-events: none;
}
.ed-stage.is-paused .ed-frame::after { opacity: 1; transform: none; }
.ed-side { min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg-2); }
.ed-side > .seg { margin: 14px 16px 0; }
.ed-side .panes { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 28px; }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-card {
  position: relative; display: grid; gap: 0; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; overflow: hidden; text-align: left; transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.style-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.style-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -10px var(--accent-glow); }
.style-sample {
  height: 64px; display: grid; place-items: center; padding: 0 6px; overflow: hidden;
  background: linear-gradient(135deg, #2a2f38, #14171c 60%, #1e2229);
}
.style-sample span { white-space: nowrap; font-size: 15px; line-height: 1; letter-spacing: 0; paint-order: stroke fill; }
.style-sample b { font-weight: inherit; padding: 0.12em 0.18em; margin: 0 -0.05em; }
.style-name { padding: 8px 10px; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.style-name small { margin-left: auto; color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.style-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 7px; border: 0; background: rgba(0, 0, 0, 0.55);
  color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.2s, background 0.2s;
}
.style-del svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.style-card:hover .style-del { opacity: 1; }
.style-del:hover { background: var(--danger); }
.style-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.styles-label { grid-column: 1 / -1; margin: 6px 2px 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.ctl { margin-top: 10px; }
.ctl-group { border-top: 1px solid var(--line); }
.ctl-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; border: 0; background: none;
  color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer;
}
.ctl-head svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.7; transition: transform 0.4s var(--ease); }
.ctl-group.is-shut .ctl-head svg { transform: rotate(-90deg); }
.ctl-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.45s var(--ease), opacity 0.35s; }
.ctl-group.is-shut .ctl-body { grid-template-rows: 0fr; opacity: 0; }
.ctl-body > div { overflow: hidden; display: grid; gap: 14px; padding: 0 2px; }
.ctl-group:not(.is-shut) .ctl-body > div { padding-bottom: 18px; }
.ctl-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--text-2); transition: opacity 0.3s; }
.ctl-field.is-off { opacity: 0.38; }
.ctl-field input[type="range"] { grid-column: 1 / -1; }
.ctl-field output { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 56px; text-align: right; }
.ctl-field .select { grid-column: 1 / -1; }
.color {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 9px 0 4px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--text-2);
}
.color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.color i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); transition: background 0.2s; }

.hint { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.words { display: flex; flex-wrap: wrap; gap: 6px 4px; line-height: 1; }
.word {
  height: 30px; padding: 0 7px; border-radius: 8px; border: 1px solid transparent; background: var(--surface); color: var(--text-2);
  font-size: 14px; min-width: 22px; outline: none; field-sizing: content; transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.word:hover { border-color: var(--line-2); }
.word:focus { border-color: rgba(55, 224, 122, 0.55); background: #0d0f12; color: var(--text); box-shadow: 0 0 0 3px rgba(55, 224, 122, 0.1); }
.word.is-edited { color: var(--warn); }
.word.is-now { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.word.is-sel { border-color: var(--line-3); }
.brk { flex-basis: 100%; height: 6px; }

/* timeline */
.tl { border-top: 1px solid var(--line); background: #090a0c; user-select: none; -webkit-user-select: none; }
.tl-bar { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-bottom: 1px solid var(--line); }
#tl-play .i-pause { display: none; }
#tl-play.is-playing .i-play { display: none; }
#tl-play.is-playing .i-pause { display: block; }
#tl-play svg path { fill: currentColor; stroke: none; }
.tc { font-family: var(--mono); font-size: 13px; color: var(--text-2); min-width: 150px; font-variant-numeric: tabular-nums; }
.tc small { color: var(--faint); }
.tl-sel { display: flex; align-items: center; gap: 6px; min-width: 0; animation: pane-in 0.3s var(--ease) both; }
.tl-word { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 4px; color: var(--accent); }
.tl-zoom { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 190px; color: var(--muted); }
.tl-zoom svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; flex: none; }
.tl-scroll { position: relative; height: 146px; overflow-x: auto; overflow-y: hidden; cursor: text; touch-action: pan-x; }
.tl-inner { position: relative; height: 100%; min-width: 100%; }
.tl-wave { position: sticky; left: 0; top: 0; display: block; height: 100%; pointer-events: none; }
.tl-words { position: absolute; left: 0; right: 0; top: 66px; height: 44px; }
.tl-w {
  position: absolute; top: 0; height: 44px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-2); font-size: 12px; font-weight: 500; line-height: 42px; padding: 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: grab; touch-action: none; transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.tl-w::before, .tl-w::after { content: ""; position: absolute; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); opacity: 0; transition: opacity 0.2s; }
.tl-w::before { left: 2px; }
.tl-w::after { right: 2px; }
.tl-w:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); color: var(--text); }
.tl-w:hover::before, .tl-w:hover::after { opacity: 1; }
.tl-w.is-now { background: rgba(55, 224, 122, 0.16); border-color: rgba(55, 224, 122, 0.5); color: #c9f7da; }
.tl-w.is-sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px -6px var(--accent-glow); z-index: 2; }
.tl-w.is-sel::before, .tl-w.is-sel::after { background: rgba(3, 21, 10, 0.5); opacity: 1; }
.tl-w.is-drag { cursor: grabbing; transition: none; }
.tl-w.is-edited:not(.is-sel) { border-color: rgba(242, 184, 75, 0.5); }
.tl-scroll.is-resize, .tl-scroll.is-resize .tl-w { cursor: ew-resize; }
.tl-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; z-index: 3; box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); will-change: transform; }
.tl-head::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid #fff; }

/* -- admin --------------------------------------------------------------------------------------- */
.card { position: relative; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card + .card, .grid-2 + .card, .card + .grid-2, .stats + .grid-2 { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .muted { font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card { margin-top: 0; }
.grid-2--wide { grid-template-columns: 1.15fr 1fr; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise 0.6s var(--ease) both; }
.stat:nth-child(2) { animation-delay: 0.05s; }
.stat:nth-child(3) { animation-delay: 0.1s; }
.stat:nth-child(4) { animation-delay: 0.15s; }
.stat-k { color: var(--muted); font-size: 12.5px; }
.stat-v { margin-top: 8px; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-v small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.stat-s { margin-top: 6px; color: var(--faint); font-size: 12px; }
.bars { height: 170px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; padding-top: 10px; }
.bars > div { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.bars i {
  display: block; width: 100%; max-width: 26px; min-height: 3px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--accent), rgba(55, 224, 122, 0.35)); transform-origin: bottom;
  animation: grow 0.8s var(--ease) both; transition: filter 0.2s;
}
.bars i.is-zero { background: var(--surface-3); }
.bars > div:hover i { filter: brightness(1.25); }
.bars small { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bars > div[data-tip]:hover::before {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 5px 8px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; color: var(--text); z-index: 2;
}
@keyframes grow { from { transform: scaleY(0); } }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; transition: background 0.2s; }
.rank li:hover { background: var(--surface-2); }
.rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rank .vl { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.none { color: var(--faint); font-size: 13px; padding: 10px 0; }

.roles { display: flex; flex-wrap: wrap; gap: 8px; }
.role {
  --c: #99a0aa; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: 17px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.2s var(--ease);
}
.role:hover { border-color: var(--line-3); color: var(--text); }
.role:active { transform: scale(0.97); }
.role i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.role svg { width: 0; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-left: -4px; transition: width 0.3s var(--ease), margin 0.3s var(--ease); }
.role.is-on { border-color: rgba(55, 224, 122, 0.6); background: var(--accent-soft); color: var(--text); }
.role.is-on svg { width: 14px; margin-left: 0; }

.search { position: relative; margin-bottom: 14px; }
.search > svg { position: absolute; left: 12px; top: 12px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.search input { padding-left: 38px; }
.search-res {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow: auto;
  border-radius: 14px; background: rgba(21, 23, 28, 0.98); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85);
  animation: pop-in 0.22s var(--ease) both;
}
.search-res li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.search-res li:hover { background: var(--surface-3); }
.search-res .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-res .why { color: var(--muted); font-size: 12px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.people li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 8px 8px 6px; border-radius: 11px;
  transition: background 0.2s; animation: row-in 0.4s var(--ease) both;
}
.people li:hover { background: var(--surface-2); }
.people li.is-leaving { animation: row-out 0.35s var(--ease-io) both; }
.people .nm { display: grid; min-width: 0; }
.people .nm b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .nm small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .acts { display: flex; gap: 6px; }
.card--req { border-color: rgba(55, 224, 122, 0.35); background: linear-gradient(180deg, rgba(55, 224, 122, 0.05), transparent 60%), var(--surface); }

.table-wrap { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 0 8px 10px; white-space: nowrap; }
.table td { padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
.table .who { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.table .num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.pill--admin { background: rgba(255, 93, 93, 0.14); color: #ff9c9c; }
.pill--role { background: var(--accent-soft); color: var(--accent); }
.pill--grant { background: rgba(108, 180, 255, 0.14); color: #9ccbff; }

.row-end { display: flex; justify-content: flex-end; margin-top: 12px; }
.card textarea { margin-top: 12px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kv div { display: grid; gap: 3px; }
.kv small { color: var(--muted); font-size: 12px; }
.kv b { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }

/* -- timers ---------------------------------------------------------------------------------------- */
.batch {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 1.2fr) auto; align-items: center; gap: 22px;
  padding: 16px 20px; margin-bottom: 12px; border-radius: var(--r); background: linear-gradient(180deg, rgba(55, 224, 122, 0.05), transparent 70%), var(--surface);
  border: 1px solid rgba(55, 224, 122, 0.22); animation: rise 0.5s var(--ease) both;
}
.batch-main { display: grid; gap: 3px; min-width: 0; }
.batch-main b { font-weight: 600; }
.batch-main span { color: var(--muted); font-size: 12.5px; }
.batch-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.batch-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 12px var(--accent-glow); transition: width 0.9s var(--ease); }
.batch-time { display: grid; justify-items: end; gap: 1px; }
.batch-clock { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.batch-time small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.batch.is-done .batch-clock { color: var(--accent); }
.timer { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.timer::before {
  content: ""; width: 12px; height: 12px; opacity: 0.7;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='9' r='5.5'/%3E%3Cpath d='M8 6v3l2 1.5M6.5 1.5h3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='9' r='5.5'/%3E%3Cpath d='M8 6v3l2 1.5M6.5 1.5h3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.timer.is-live { color: var(--accent); }
.vdur { display: inline-flex; align-items: center; gap: 5px; }
.vdur::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; opacity: 0.7; }
.ed-hist { display: flex; gap: 6px; }
.ed-hist .icon-btn:disabled { opacity: 0.35; pointer-events: none; }

/* -- the user's settings --------------------------------------------------------------------------- */
.page--narrow { max-width: 760px; }
.set-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px; }
.set-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, var(--surface-3), var(--surface)); box-shadow: inset 0 0 0 1px var(--line-2); }
.set-ico svg { width: 23px; height: 23px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.set-ico--discord svg { stroke: #8c98ff; }
.set-txt { display: grid; gap: 6px; }
.set-txt h3 { font-size: 15.5px; }
.set-warn { color: var(--warn); font-size: 13px; }
.small { font-size: 12.5px; margin-top: 12px; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 0; }
.acc-chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 600;
  color: #ffd86b; background: rgba(255, 210, 63, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.3); animation: badge-in 0.35s var(--ease) both;
}
.word.is-acc:not(.is-now) { color: var(--acc, #ffd23f); font-weight: 650; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc, #ffd23f) 45%, transparent); }
.tl-w.is-acc:not(.is-sel) { color: var(--acc, #ffd23f); border-color: color-mix(in srgb, var(--acc, #ffd23f) 55%, transparent); background: color-mix(in srgb, var(--acc, #ffd23f) 12%, transparent); font-weight: 650; }
.chip-btn--acc.is-on { color: #1a1400; background: var(--acc, #ffd23f); border-color: transparent; }

/* -- modal & toasts --------------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(4, 5, 7, 0.66); backdrop-filter: blur(8px); animation: fade-in 0.25s ease both; }
.modal.is-leaving { animation: fade-out 0.2s ease both; }
.modal-card { width: 100%; max-width: 420px; padding: 24px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9); display: grid; gap: 14px; animation: pop-in 0.35s var(--ease) both; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 13px; border-radius: 13px; background: rgba(27, 30, 36, 0.96);
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); font-size: 13.5px;
  animation: toast-in 0.45s var(--ease) both;
}
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.is-err i { background: var(--danger); }
.toast.is-leaving { animation: toast-out 0.3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* -- smaller screens -------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ed-main { grid-template-columns: minmax(0, 1fr) 330px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 40px; }
  .hero-demo { order: -1; }
  .phone { width: 250px; }
  .demo-cap { font-size: 22px; -webkit-text-stroke-width: 4px; }
  .grid-2, .grid-2--wide { grid-template-columns: 1fr; }
  .view--editor.is-on, .view--editor.is-leaving { height: auto; flex: 1; }
  /* phone: the video, its timeline right under it, then the settings */
  .ed { display: flex; flex-direction: column; }
  .ed-main { display: contents; }
  .ed-bar { order: 0; position: sticky; top: var(--top-h); z-index: 5; backdrop-filter: blur(14px); }
  .ed-stage { order: 1; padding: 14px; }
  .tl { order: 2; }
  .ed-side { order: 3; border-left: 0; border-top: 1px solid var(--line); }
  .ed-frame video { max-height: 56vh; }
  .ed-side .panes { overflow: visible; }
}
@media (max-width: 680px) {
  :root { --top-h: 58px; }
  .top { gap: 12px; padding: 0 16px; }
  .brand-name { display: none; }
  .pulse, .me-name, .me-btn svg { display: none; }
  .me-btn { padding: 0 4px; }
  .page { padding: 26px 16px 64px; }
  h1 { font-size: 25px; }
  .hero { padding: 28px 16px 48px; gap: 36px; }
  .hero-demo { order: 1; }
  .phone { width: 220px; }
  .demo-cap { font-size: 19px; -webkit-text-stroke-width: 3.5px; }
  .ed-title small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-points { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
  .lead { font-size: 15.5px; }
  .field-inline { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .field-inline .select { min-width: 0; }
  .drop { padding: 34px 18px 30px; }
  .job { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .job-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .job-err { grid-column: 1 / -1; }
  .thumb { width: 46px; height: 60px; }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat-v { font-size: 24px; }
  .card { padding: 16px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .seg--inline { width: 100%; grid-auto-columns: 1fr; }
  .seg--inline .seg-a { padding: 0 6px; font-size: 12.5px; }
  .set-row { grid-template-columns: minmax(0, 1fr) auto; padding: 16px; }
  .batch { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 16px; }
  .batch-bar { grid-column: 1 / -1; grid-row: 2; }
  .set-ico { display: none; }
  .ed-bar { padding: 8px 12px; }
  .hide-sm { display: none !important; }
  .tl-bar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .tl-zoom { width: 130px; }
  .tc { min-width: 0; }
  .tl-sel { order: 5; width: 100%; overflow-x: auto; }
  .styles { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
