:root {
  color-scheme: light;
  --soz-bg: #f7f6f0;
  --soz-bg-soft: #eef3ea;
  --soz-surface: #ffffff;
  --soz-surface-2: #f1f6f0;
  --soz-text: #102018;
  --soz-muted: #607468;
  --soz-border: rgba(16, 32, 24, 0.12);
  --soz-accent: #159957;
  --soz-accent-hover: #11884d;
  --soz-accent-soft: #dff4e8;
  --soz-gold: #c9a227;
  --soz-gold-soft: #f3ead0;
  --soz-danger: #d33d3d;
  --soz-warning: #c98210;
  --soz-radius-sm: 10px;
  --soz-radius-md: 16px;
  --soz-radius-lg: 24px;
  --soz-radius-xl: 32px;
  --soz-shadow-sm: 0 8px 24px rgba(20, 40, 28, 0.08);
  --soz-shadow-md: 0 18px 60px rgba(20, 40, 28, 0.13);
  --bg: var(--soz-bg);
  --bg-top: var(--soz-bg-soft);
  --panel: var(--soz-surface);
  --panel-soft: var(--soz-surface-2);
  --ink: var(--soz-text);
  --muted: var(--soz-muted);
  --line: var(--soz-border);
  --field: var(--soz-surface);
  --track: var(--soz-bg-soft);
  --accent: var(--soz-accent);
  --accent-dark: var(--soz-accent-hover);
  --ornament: var(--soz-gold);
  --blue: #376f8f;
  --danger: var(--soz-danger);
  --warning: var(--soz-warning);
  --gold: var(--soz-gold);
  --gold-soft: var(--soz-gold-soft);
  --shadow: var(--soz-shadow-md);
}

html.review-gesture-lock,
body.review-gesture-lock {
  overscroll-behavior: none;
  touch-action: none;
}

.system-bar:not(.admin-system) {
  display: none;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 1.16rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.86rem;
}

.public-shell {
  max-width: 1180px;
}

.public-header {
  padding-top: 10px;
}

.public-nav {
  align-items: center;
}

.hero-product {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(620px, calc(100vh - 172px));
  overflow: hidden;
  padding: 56px 0;
  isolation: isolate;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 38%, color-mix(in srgb, var(--bg) 70%, transparent) 62%, color-mix(in srgb, var(--bg) 20%, transparent) 100%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-product::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 720px;
}

.hero-copy .eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 900;
}

.hero-copy h1 {
  overflow: visible;
  max-width: 820px;
  margin-bottom: 18px;
  font-size: 3.8rem;
  line-height: 1;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.hero-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.trust-strip,
.site-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-strip {
  margin: 10px 0 28px;
}

.trust-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--panel);
  font-weight: 800;
  font-size: 0.86rem;
}

.site-footer {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 20px 0 8px;
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

.unified-footer {
  align-items: flex-start;
  gap: 14px 20px;
}

.unified-footer strong {
  font-weight: 500;
}

.unified-footer nav {
  display: flex;
  max-width: 620px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.unified-footer a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.unified-footer a:hover,
.unified-footer a:focus-visible {
  color: var(--accent);
}

.footer-brand {
  min-width: 180px;
}

.footer-made {
  flex: 1 1 100%;
  text-align: center;
  font-size: 0.78rem;
}

.public-footer {
  align-items: flex-start;
}

.public-footer nav {
  display: flex;
  max-width: 640px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.public-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.public-footer a:hover,
.public-footer a:focus-visible {
  color: var(--accent);
}

.public-section {
  padding: 18px 0 4px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.6;
}

.public-article {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: min(640px, calc(100vh - 92px));
  padding: 34px 0 20px;
}

.public-article h1 {
  overflow: visible;
  max-width: 760px;
  margin-bottom: 16px;
  font-size: 3.6rem;
  line-height: 0.98;
  text-overflow: clip;
  white-space: normal;
}

.public-article p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.landing-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 24px;
}

.landing-form input,
.auth-panel input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

.contact-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.contact-link-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-sm);
  padding: 12px 14px;
  color: var(--soz-text);
  background: var(--soz-surface);
  box-shadow: var(--soz-shadow-sm);
  text-decoration: none;
}

.contact-link-card span {
  color: var(--soz-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.contact-link-card strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.public-preview {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 34px;
}

.public-grid h2,
.public-grid h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.public-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.step-card {
  min-height: 132px;
}

.step-card h2,
.step-card h3 {
  font-size: 1.1rem;
}

.auth-shell {
  max-width: 980px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.auth-intro {
  padding: 12px 0;
}

.auth-intro h1 {
  overflow: visible;
  max-width: 580px;
  margin-bottom: 14px;
  font-size: 3.35rem;
  line-height: 1;
  text-overflow: clip;
  white-space: normal;
}

.auth-intro p,
.auth-intro li {
  color: var(--muted);
  line-height: 1.6;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.auth-points span,
.saved-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-panel {
  margin-top: 0;
  border-radius: var(--soz-radius-md);
  padding: clamp(18px, 3vw, 24px);
  background: color-mix(in srgb, var(--soz-surface) 94%, transparent);
  box-shadow: var(--soz-shadow-sm);
}

.auth-form {
  gap: 12px;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--soz-radius-sm);
  background: var(--soz-surface);
}

.auth-form .submit-button {
  position: static;
  width: 100%;
  margin-top: 4px;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--soz-accent) 20%, transparent);
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  inset-block: 6px;
  inset-inline-end: 6px;
  display: grid;
  width: 36px;
  min-width: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--soz-muted);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.active {
  color: var(--soz-accent);
  background: var(--soz-accent-soft);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-panel h1,
.auth-panel h2 {
  max-width: none;
  margin-bottom: 8px;
}

.saved-link {
  display: inline-flex;
  margin: 0 0 10px;
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.auth-error {
  margin: 16px 0;
  color: var(--danger);
  font-weight: 700;
}

.auth-consents {
  display: grid;
  gap: 8px;
  margin: 4px 0 2px;
}

.legal-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.legal-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.legal-check a {
  color: var(--accent);
  text-decoration: none;
}

.legal-check a:hover,
.legal-check a:focus-visible {
  text-decoration: underline;
}

.auth-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.account-chip {
  display: flex;
  min-height: 40px;
  max-width: 230px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 0.86rem;
}

.account-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip form {
  margin: 0;
}

.account-link {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 820px) {
  .auth-layout,
  .public-article,
  .landing-form,
  .public-grid {
    grid-template-columns: 1fr;
  }

  .hero-product {
    min-height: auto;
    padding: 30px 0 38px;
    background:
      linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 52%, var(--bg) 100%),
      var(--hero-image);
    background-position: center top;
    background-size: cover;
  }

  .public-article {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-copy h1,
  .public-article h1,
  .auth-intro h1 {
    font-size: 2.45rem;
  }

  .public-footer,
  .public-footer nav,
  .unified-footer,
  .unified-footer nav {
    justify-content: flex-start;
  }

  .footer-made {
    text-align: left;
  }

  .account-chip {
    max-width: 100%;
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .app-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .app-header .brand {
    flex: 1 1 210px;
  }

  .app-header .top-controls {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .public-nav .small-button {
    flex: 1 1 92px;
  }

  .public-nav .theme-switch {
    flex: 0 0 48px;
    justify-content: center;
  }

  .public-nav .language-switch {
    flex: 0 0 176px;
  }
}

@media (max-width: 480px) {
  .hero-copy h1,
  .public-article h1,
  .auth-intro h1 {
    font-size: 1.78rem;
  }

  .hero-lead {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .public-nav {
    width: 100%;
  }

  .public-nav .small-button {
    flex: 1 1 auto;
    justify-content: center;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --soz-bg: #07110d;
  --soz-bg-soft: #0b1812;
  --soz-surface: #0f1d17;
  --soz-surface-2: #13261e;
  --soz-text: #f2f7f4;
  --soz-muted: #9fb3a9;
  --soz-border: rgba(255, 255, 255, 0.10);
  --soz-accent: #24c26a;
  --soz-accent-hover: #35d978;
  --soz-accent-soft: rgba(36, 194, 106, 0.14);
  --soz-gold: #e0bd46;
  --soz-gold-soft: rgba(224, 189, 70, 0.14);
  --soz-danger: #ef4444;
  --soz-warning: #f59e0b;
  --soz-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --soz-shadow-md: 0 24px 80px rgba(0, 0, 0, 0.38);
  --bg: var(--soz-bg);
  --bg-top: var(--soz-bg-soft);
  --panel: var(--soz-surface);
  --panel-soft: var(--soz-surface-2);
  --ink: var(--soz-text);
  --muted: var(--soz-muted);
  --line: var(--soz-border);
  --field: #0b1812;
  --track: var(--soz-surface-2);
  --accent: var(--soz-accent);
  --accent-dark: var(--soz-accent-hover);
  --ornament: var(--soz-gold);
  --blue: #85b7d0;
  --danger: var(--soz-danger);
  --warning: var(--soz-warning);
  --gold: var(--soz-gold);
  --gold-soft: var(--soz-gold-soft);
  --shadow: var(--soz-shadow-md);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.13;
  background:
    radial-gradient(circle at 28px 28px, transparent 0 12px, color-mix(in srgb, var(--ornament) 65%, transparent) 12px 14px, transparent 14px) 0 0 / 112px 112px,
    radial-gradient(circle at 84px 84px, transparent 0 12px, color-mix(in srgb, var(--accent) 60%, transparent) 12px 14px, transparent 14px) 0 0 / 112px 112px,
    linear-gradient(45deg, transparent 0 44%, color-mix(in srgb, var(--ornament) 58%, transparent) 44% 47%, transparent 47% 53%, color-mix(in srgb, var(--ornament) 58%, transparent) 53% 56%, transparent 56%) 0 0 / 56px 56px,
    linear-gradient(135deg, transparent 0 44%, color-mix(in srgb, var(--accent) 52%, transparent) 44% 47%, transparent 47% 53%, color-mix(in srgb, var(--accent) 52%, transparent) 53% 56%, transparent 56%) 28px 28px / 56px 56px;
  mask-image:
    radial-gradient(ellipse at 50% 10%, #000 0%, rgba(0, 0, 0, 0.88) 36%, transparent 82%),
    linear-gradient(180deg, #000 0%, transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.09;
  background:
    conic-gradient(from 45deg at 50% 50%, transparent 0 20%, var(--ornament) 20% 25%, transparent 25% 50%, var(--accent) 50% 55%, transparent 55% 100%) 0 0 / 84px 84px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, transparent 78%);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.app-header,
.system-bar,
.workspace,
.status-row,
.panel-heading,
.task-meta,
.task-actions,
.top-controls,
.brand,
.url-row,
.unit-input {
  display: flex;
}

.app-header {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.brand {
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.16));
}

.brand-copy {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  overflow: hidden;
  max-width: 280px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

.brand p,
.message,
.eyebrow,
.hint,
.empty-state,
.task-main span,
.task-meta {
  color: var(--muted);
}

.brand p {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.78;
}

.top-controls {
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.segmented {
  display: grid;
  width: 132px;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--track);
}

.language-switch {
  flex: 0 0 176px;
}

.language-menu {
  position: relative;
  width: 176px;
}

.language-menu summary {
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-trigger {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.language-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 75%, transparent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.language-flag {
  display: none;
}

.language-chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.68;
  transform: rotate(45deg) translateY(-2px);
}

.language-menu[open] .language-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.language-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 35;
  display: grid;
  width: 208px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: var(--shadow);
}

.language-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.language-option small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.active {
  color: var(--accent);
  background: var(--panel-soft);
}

.language-rail {
  display: none;
}

.language-rail-option {
  display: grid;
  width: 40px;
  height: 40px;
  min-width: 40px;
  place-items: center;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 84%, var(--soz-surface-2));
  text-decoration: none;
  cursor: pointer;
}

.language-rail-option.active,
.language-rail-option:hover,
.language-rail-option:focus-visible {
  border-color: color-mix(in srgb, var(--soz-accent) 70%, var(--soz-border));
  background: var(--soz-accent-soft);
}

.segment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.segment-button.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  display: inline-flex;
  width: 40px;
  height: 24px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--track);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}

.theme-switch input:checked + .switch-track {
  border-color: var(--accent);
  background: var(--accent);
}

.theme-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.icon-button,
.account-icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  text-decoration: none;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible,
.burger-button:hover,
.burger-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  color: var(--accent);
}

.icon-button svg,
.burger-item svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-icon-form,
.burger-logout {
  margin: 0;
}

.burger-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  cursor: pointer;
}

.burger-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.burger-menu {
  position: relative;
}

.burger-menu summary {
  list-style: none;
}

.burger-menu summary::-webkit-details-marker {
  display: none;
}

.burger-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(270px, calc(100vw - 28px));
  min-height: 260px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: var(--shadow);
}

.burger-user {
  overflow: hidden;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.burger-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.burger-item:hover,
.burger-item:focus-visible {
  color: var(--accent);
  background: var(--panel-soft);
}

.burger-menu-spacer {
  flex: 1 1 auto;
  min-height: 16px;
}

.burger-danger {
  width: 100%;
  color: var(--danger);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.system-bar {
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.metric {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 8px;
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric strong {
  grid-column: 2;
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.1;
}

.metric-icon {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 42%, var(--accent) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, var(--accent) 42% 58%, transparent 58%);
  opacity: 0.86;
}

.metric-memory {
  background:
    linear-gradient(var(--accent), var(--accent)) 6px 5px / 10px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 6px 10px / 10px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 6px 15px / 10px 2px no-repeat;
}

.metric-disk {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--panel) 0 3px, transparent 4px),
    conic-gradient(var(--accent) 0 70%, transparent 70% 100%);
}

.metric-tasks {
  background:
    linear-gradient(var(--accent), var(--accent)) 5px 6px / 12px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 5px 10px / 12px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 5px 14px / 12px 2px no-repeat;
}

.workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ornament), var(--accent));
  opacity: 0.55;
}

.input-panel,
.output-panel,
.review-panel,
.task-panel {
  padding: 18px;
}

.job-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

label {
  font-size: 13px;
  font-weight: 800;
}

input,
select,
button,
textarea,
.button-link {
  font: inherit;
}

input,
select,
.submit-button,
.small-button,
.control-button {
  min-height: 42px;
  border-radius: 6px;
}

input,
select {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  background: var(--field);
}

.quality-control,
.subtitle-style-control {
  display: grid;
  gap: 8px;
}

.quality-control input[type="range"],
.subtitle-style-control input[type="range"] {
  width: 100%;
  height: 34px;
  min-height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
}

.quality-labels,
.subtitle-style-labels,
.clip-labels {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quality-labels {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subtitle-style-labels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subtitle-mobile-labels {
  display: none;
}

.clip-labels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clip-labels span:last-child {
  text-align: right;
}

.quality-labels span,
.subtitle-style-labels span {
  position: relative;
  min-width: 0;
  text-align: center;
}

.quality-labels span::before,
.subtitle-style-labels span::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: var(--accent);
}

.clip-control {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.clip-preview-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  min-height: 150px;
  aspect-ratio: 16 / 9;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.24), transparent),
    var(--field);
}

.clip-preview-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #050808;
  object-fit: cover;
}

.clip-subtitle-preview {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 7%, 42px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--clip-subtitle-width, min(72%, 520px));
  max-width: calc(100% - 128px);
  min-height: 44px;
  box-sizing: border-box;
  border: 1.5px dashed rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 8px 30px 8px 12px;
  background: rgba(0, 0, 0, 0.18);
  cursor: ns-resize;
  pointer-events: auto;
  touch-action: none;
  transform: translateX(-50%);
  user-select: none;
}

.clip-subtitle-preview:focus-visible,
.clip-subtitle-preview.is-resizing {
  border-color: color-mix(in srgb, var(--accent) 72%, #ffffff);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.14),
    0 0 24px color-mix(in srgb, var(--accent) 28%, transparent);
}

.clip-subtitle-preview > span:not(.subtitle-size-handle) {
  display: block;
  max-width: 100%;
  color: #fff;
  font-size: clamp(0.95rem, calc(0.9rem * var(--subtitle-preview-scale, 1)), 1.95rem);
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.96),
    0 0 8px rgba(0, 0, 0, 0.84),
    0 0 18px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  text-wrap: balance;
}

.subtitle-size-handle {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.subtitle-size-handle::before,
.subtitle-size-handle::after {
  content: "";
  position: absolute;
  left: 4px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.subtitle-size-handle::before {
  top: 4px;
}

.subtitle-size-handle::after {
  bottom: 4px;
}

.clip-preview-shell.is-vertical-video .clip-subtitle-preview > span:not(.subtitle-size-handle) {
  font-size: clamp(0.88rem, calc(0.76rem * var(--subtitle-preview-scale, 1)), 1.55rem);
}

.clip-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.38);
}

.clip-loading .progress-spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.clip-preview-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.clip-media-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
}

.clip-media-button:disabled {
  cursor: default;
  opacity: 0.46;
}

.clip-media-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.clip-timeline {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 78px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.clip-filmstrip {
  --shade-left: 0%;
  --shade-right: 0%;
  --zoom: 1;
  position: relative;
  height: 100%;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 var(--shade-left), rgba(43, 189, 144, 0.2) var(--shade-left) calc(100% - var(--shade-right)), transparent calc(100% - var(--shade-right))),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, color-mix(in srgb, var(--panel-soft) 80%, var(--accent)), var(--field));
}

.clip-filmstrip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 var(--shade-left), transparent var(--shade-left) calc(100% - var(--shade-right)), rgba(0, 0, 0, 0.55) calc(100% - var(--shade-right))),
    linear-gradient(90deg, transparent 0 var(--shade-left), rgba(43, 189, 144, 0.2) var(--shade-left) calc(100% - var(--shade-right)), transparent calc(100% - var(--shade-right)));
}

.clip-filmstrip.has-thumb {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 var(--shade-left), transparent var(--shade-left) calc(100% - var(--shade-right)), rgba(0, 0, 0, 0.55) calc(100% - var(--shade-right))),
    var(--panel-soft);
}

.clip-filmstrip.has-real-frames {
  gap: 1px;
}

.clip-filmstrip.is-loading .clip-frame {
  opacity: 0.62;
}

.clip-frame {
  min-width: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05) contrast(1.04);
}

.clip-filmstrip::after {
  content: attr(data-zoom);
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 10px;
  font-weight: 800;
}

.clip-selected {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  min-width: 28px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(43, 189, 144, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.22);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.clip-timeline.is-dragging .clip-selected {
  cursor: grabbing;
}

.clip-handle {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 20px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: ew-resize;
  pointer-events: auto;
}

.clip-handle::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
}

.clip-handle-start {
  left: 0;
}

.clip-handle-end {
  right: 0;
}

.clip-timeline.disabled .clip-handle {
  cursor: default;
  opacity: 0.5;
}

.clip-timeline.is-dragging .clip-selected {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 0 3px rgba(43, 189, 144, 0.22);
}

.app-footer {
  margin-top: 18px;
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.app-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.app-footer a:hover,
.app-footer a:focus-visible {
  color: var(--accent);
}

@media (min-width: 861px) {
  body[data-app-state="configure"] .clip-preview-shell {
    min-height: 218px;
  }

  body[data-app-state="configure"] .clip-timeline {
    height: 86px;
  }

  body[data-app-state="configure"] .clip-media-button {
    width: 42px;
    height: 42px;
  }
}

textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(43, 189, 144, 0.18);
}

.url-row {
  align-items: stretch;
  gap: 8px;
}

.url-row input {
  flex: 1 1 auto;
}

.url-status {
  display: inline-flex;
  min-width: 68px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.url-status-spinner,
.button-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid color-mix(in srgb, currentColor 24%, transparent);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: spinner-rotate 0.72s linear infinite;
}

.button-spinner {
  display: none;
}

.small-button {
  flex: 0 0 104px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-soft);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.probe-result {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 13px;
}

.probe-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.probe-result span,
.hint {
  color: var(--muted);
  font-size: 12px;
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.range-grid > div {
  display: grid;
  gap: 6px;
}

.unit-input {
  align-items: stretch;
  min-width: 0;
}

.unit-input input {
  width: 100%;
  border-radius: 6px 0 0 6px;
}

.unit-input select {
  width: 76px;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  padding: 0 8px;
}

.submit-button,
.button-link,
.control-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.submit-button {
  margin-top: 6px;
  color: #fff;
  background: var(--accent);
}

.submit-button:disabled,
.control-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.status-row,
.panel-heading {
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-pill.running,
.status-pill.pending,
.status-pill.review {
  background: var(--blue);
}

.status-pill.paused {
  background: var(--warning);
}

.status-pill.complete {
  background: var(--accent-dark);
}

.status-pill.failed,
.status-pill.canceled {
  background: var(--danger);
}

.progress-track,
.mini-track {
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-head strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.progress-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.progress-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinner-rotate 760ms linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.progress-track {
  height: 10px;
}

.progress-fill,
.mini-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 180ms ease;
}

.progress-fill {
  width: 0%;
}

.details-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.detail-value {
  min-height: 22px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin: 16px 0 22px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.share-action,
.task-share-button {
  justify-content: flex-start;
}

.share-action {
  min-width: 0;
}

.share-status {
  display: inline-flex;
  min-width: 34px;
  height: 22px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: inherit;
  background: color-mix(in srgb, var(--soz-accent) 10%, transparent);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.share-status .button-spinner {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
  border-width: 1.4px;
}

.is-preparing .share-status .button-spinner {
  display: inline-block;
}

.is-ready .share-status {
  min-width: 32px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.is-ready .share-status-text {
  font-size: 14px;
}

.action-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-action {
  border-color: #15803d;
  color: #fff;
  background: #15803d;
}

.download-action:hover {
  border-color: #166534;
  background: #166534;
}

.share-action:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.action-button.is-loading,
.action-button.is-preparing,
.action-button.is-busy,
.action-button:disabled {
  opacity: 0.66;
  cursor: wait;
  pointer-events: none;
}

.share-action.is-preparing:disabled,
.task-share-button.is-preparing:disabled {
  opacity: 1;
}

.action-button.is-loading .button-spinner {
  display: inline-block;
}

.action-button.is-loading > svg {
  display: none;
}

.export-menu {
  position: relative;
  order: 3;
  min-width: 0;
}

.export-menu summary {
  list-style: none;
}

.export-menu summary::-webkit-details-marker {
  display: none;
}

.export-menu > summary.button-link {
  gap: 7px;
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 12px;
  user-select: none;
}

.export-menu svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.export-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: grid;
  min-width: 148px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.export-menu-panel a {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink);
  background: var(--field);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  cursor: pointer;
  text-decoration: none;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.button-link {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--field);
}

.button-link.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.button-link.subtle {
  min-height: 34px;
  padding: 0 12px;
  align-self: center;
  color: var(--muted);
  background: transparent;
}

.preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #071014;
}

.task-list {
  display: grid;
  gap: 10px;
}

.review-panel {
  display: grid;
  gap: 8px;
}

.review-panel > .hint {
  display: none;
}

.review-list {
  display: none;
}

.review-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.review-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.review-video-shell {
  position: relative;
  display: block;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-md);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.34), transparent 55%),
    #06110d;
  overscroll-behavior: contain;
  touch-action: none;
}

.review-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 176px;
  max-height: min(58vh, 520px);
  object-fit: contain;
  background: #050b09;
}

.review-video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
}

.review-video-empty strong {
  color: #fff;
  font-size: 1.35rem;
}

.review-video-loading {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: #fff;
  background: rgba(5, 11, 9, 0.58);
  backdrop-filter: blur(5px);
}

.review-video-spinner {
  width: 42px;
  height: 42px;
  margin-inline: auto;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--soz-accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.review-video-loading strong {
  font-size: 0.95rem;
}

.review-video-loading small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.review-subtitle-frame {
  position: absolute;
  z-index: 5;
  left: var(--review-subtitle-left, 6%);
  bottom: var(--review-subtitle-bottom, 13%);
  width: var(--review-subtitle-width, 88%);
  max-width: 94%;
  min-width: 36%;
  border-radius: 12px;
  border: 1.5px dashed transparent;
  outline: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.review-subtitle-frame.screen-overflow {
  border-color: var(--soz-danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--soz-danger) 18%, transparent);
}

.review-subtitle-frame.is-adjusting,
.review-subtitle-frame:focus-within {
  border-color: rgba(255, 255, 255, 0.66);
  box-shadow: 0 0 0 4px rgba(36, 194, 106, 0.16);
}

.review-video-subtitle {
  width: 100%;
  min-height: 42px;
  max-height: calc(2.36em + 16px);
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  font-size: max(10px, calc(var(--subtitle-preview-font-px, 16px) * var(--subtitle-fit-scale, 1)));
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.8);
  outline: none;
  pointer-events: auto;
  caret-color: #fff;
  cursor: text;
  overflow-wrap: anywhere;
  overflow: hidden;
  word-break: normal;
  white-space: pre-wrap;
  touch-action: none;
}

.review-video-subtitle:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.58);
}

.review-video-subtitle.editing {
  background: rgba(0, 0, 0, 0.28);
}

.review-video-subtitle.screen-overflow {
  background: color-mix(in srgb, var(--soz-danger) 12%, rgba(0, 0, 0, 0.22));
}

.review-video-subtitle.karaoke {
  color: rgba(255, 255, 255, 0.56);
  background: transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.92), 0 0 2px rgba(0, 0, 0, 0.8);
}

.review-video-subtitle.karaoke [data-karaoke-word] {
  color: rgba(255, 255, 255, 0.56);
  transition: color 120ms ease;
}

.review-video-subtitle.karaoke [data-karaoke-word].active {
  color: #fff;
}

.review-subtitle-frame-move,
.review-subtitle-frame-corner {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(5px);
  touch-action: none;
  user-select: none;
}

.review-subtitle-frame-move {
  display: none;
  left: -12px;
  top: -12px;
  cursor: move;
}

.review-subtitle-frame-move svg,
.review-subtitle-frame-corner svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.review-subtitle-frame-corner {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  opacity: 0.72;
}

.review-subtitle-frame-corner::before {
  content: "";
  width: 12px;
  height: 12px;
  border-color: rgba(255, 255, 255, 0.74);
  border-style: solid;
  transition: border-color 120ms ease, opacity 120ms ease;
}

.review-subtitle-frame-corner:hover::before,
.review-subtitle-frame-corner:focus-visible::before,
.review-subtitle-frame.is-adjusting .review-subtitle-frame-corner::before {
  border-color: #fff;
}

.corner-top-left {
  left: -14px;
  top: -14px;
  cursor: nwse-resize;
}

.corner-top-left::before {
  border-width: 2px 0 0 2px;
}

.corner-top-right {
  right: -14px;
  top: -14px;
  cursor: nesw-resize;
}

.corner-top-right::before {
  border-width: 2px 2px 0 0;
}

.corner-bottom-left {
  left: -14px;
  bottom: -14px;
  cursor: nesw-resize;
}

.corner-bottom-left::before {
  border-width: 0 0 2px 2px;
}

.corner-bottom-right {
  right: -14px;
  bottom: -14px;
  cursor: nwse-resize;
}

.corner-bottom-right::before {
  border-width: 0 2px 2px 0;
}

.review-quick-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
}

.review-tool-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--soz-border);
  border-radius: 50%;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 84%, transparent);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.review-tool-button:hover,
.review-tool-button:focus-visible,
.segment-nav-button:hover,
.segment-nav-button:focus-visible,
.karaoke-toggle:hover,
.karaoke-toggle:focus-within {
  border-color: color-mix(in srgb, var(--soz-accent) 44%, var(--soz-border));
  transform: translateY(-1px);
}

.review-tool-button svg,
.review-icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.review-tool-button.danger {
  color: color-mix(in srgb, var(--soz-danger) 72%, var(--soz-text));
  background: color-mix(in srgb, var(--soz-danger) 10%, var(--soz-surface));
}

.review-tool-button.add {
  color: #fff;
  border-color: var(--soz-accent);
  background: var(--soz-accent);
}

.review-tool-button.muted {
  color: color-mix(in srgb, var(--soz-muted) 80%, var(--soz-text));
  background: color-mix(in srgb, var(--soz-muted) 12%, var(--soz-surface));
}

.review-tool-button:disabled {
  opacity: 0.42;
}

.review-tool-caption {
  display: none;
}

.subtitle-timeline-editor {
  display: grid;
  gap: 5px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-md);
  background: color-mix(in srgb, var(--soz-surface-2) 72%, transparent);
}

.subtitle-timeline-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.review-save-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  margin-right: auto;
  width: 104px;
  max-width: min(104px, calc(var(--timeline-visible-width, 360px) - 206px));
  min-width: 72px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--soz-muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: opacity 0.16s ease;
}

.review-save-status.is-active {
  opacity: 1;
}

.review-save-status svg {
  order: 1;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.review-save-toast {
  position: static;
  order: 2;
  min-width: 0;
  max-width: 72px;
  overflow: hidden;
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: none;
  transition: opacity 0.16s ease;
  white-space: nowrap;
}

.review-save-label {
  display: none;
}

.review-save-toast.is-visible {
  opacity: 1;
}

.review-save-status[data-state="saving"] {
  color: var(--soz-warning);
}

.review-save-status[data-state="saving"] svg {
  animation: review-save-pulse 0.72s ease-in-out infinite alternate;
}

.review-save-status[data-state="failed"] {
  color: var(--soz-danger);
}

@keyframes review-save-pulse {
  from {
    transform: translateY(0);
    opacity: 0.62;
  }

  to {
    transform: translateY(-1px);
    opacity: 1;
  }
}

.icon-text-button {
  min-height: 30px;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--soz-text);
  background: var(--soz-surface);
  font-weight: 800;
  font-size: 0.74rem;
}

.timeline-zoom-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  color: var(--soz-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
}

.timeline-zoom-dock {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 2px 0 0;
}

.timeline-zoom-dock .timeline-zoom-row {
  grid-template-columns: 31px minmax(0, 1fr) 31px;
  gap: 5px;
  min-height: 31px;
}

.timeline-zoom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--soz-border);
  border-radius: 50%;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 84%, transparent);
}

.timeline-zoom-dock .timeline-zoom-button {
  width: 31px;
  height: 31px;
  background: color-mix(in srgb, var(--soz-surface) 86%, transparent);
}

.timeline-zoom-button:disabled {
  opacity: 0.42;
}

.timeline-zoom-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-zoom-overview {
  position: relative;
  display: grid;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  padding: 0 46px 0 12px;
  background: color-mix(in srgb, var(--soz-surface) 82%, transparent);
  cursor: grab;
  touch-action: none;
  user-select: none;
  --timeline-overview-left: 0%;
  --timeline-overview-width: 100%;
}

.timeline-zoom-dock .timeline-zoom-overview {
  min-height: 31px;
  padding: 0 44px 0 12px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--soz-surface) 34%, transparent);
}

.timeline-zoom-overview.dragging {
  cursor: grabbing;
}

.timeline-zoom-overview-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--soz-accent) 28%, transparent) 0 1px, transparent 1px 14px),
    color-mix(in srgb, var(--soz-muted) 18%, transparent);
}

.timeline-zoom-overview-window {
  position: absolute;
  top: 50%;
  left: var(--timeline-overview-left);
  width: var(--timeline-overview-width);
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid color-mix(in srgb, var(--soz-muted) 48%, var(--soz-surface));
  border-radius: 999px;
  background: color-mix(in srgb, var(--soz-surface) 34%, transparent);
  pointer-events: none;
}

.timeline-zoom-row output {
  position: absolute;
  right: 12px;
  top: 50%;
  min-width: 42px;
  transform: translateY(-50%);
  color: var(--soz-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
}

.timeline-zoom-dock .timeline-zoom-row output {
  right: 11px;
}

.timeline-zoom-row input[type="range"] {
  display: none;
}

.timeline-zoom-buttons {
  display: none;
}

.timeline-zoom-buttons button {
  min-height: 30px;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  color: var(--soz-text);
  background: var(--soz-surface);
  font-weight: 900;
}

.timeline-zoom-buttons button.active {
  border-color: var(--soz-accent);
  color: #fff;
  background: var(--soz-accent);
}

.subtitle-timeline-scroll {
  width: 100%;
  max-width: 100%;
  min-height: 178px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  border-radius: var(--soz-radius-sm);
  background: color-mix(in srgb, var(--soz-bg-soft) 82%, #123a28);
  scrollbar-width: none;
}

.subtitle-timeline-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.subtitle-timeline-editor.expanded .subtitle-timeline-scroll {
  min-height: 198px;
}

.subtitle-timeline-canvas {
  position: relative;
  min-width: 100%;
  height: 178px;
  padding: 6px 0 20px;
}

.subtitle-timeline-canvas::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 51px 0 9px;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      transparent 0 5px,
      rgba(255, 255, 255, 0.15) 5px 6px,
      transparent 6px 40px,
      rgba(255, 255, 255, 0.13) 40px 41px,
      transparent 41px 78px,
      rgba(224, 189, 70, 0.24) 78px 79px,
      transparent 79px 116px,
      rgba(255, 255, 255, 0.11) 116px 117px,
      transparent 117px 100%),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--soz-accent) 8%, transparent) 5px 34px,
      transparent 34px 43px,
      color-mix(in srgb, var(--soz-gold) 9%, transparent) 43px 72px,
      transparent 72px 85px,
      color-mix(in srgb, var(--soz-surface) 7%, transparent) 85px 116px,
      transparent 116px 100%);
}

.subtitle-timeline-editor.expanded .subtitle-timeline-canvas {
  height: 198px;
}

.subtitle-filmstrip {
  position: absolute;
  inset: 6px 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  height: 30px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 24px),
    linear-gradient(90deg, rgba(21, 153, 87, 0.28), rgba(201, 162, 39, 0.14));
}

.subtitle-filmstrip.has-frames {
  gap: 2px;
  background: #07110d;
}

.subtitle-filmstrip-frame,
.subtitle-filmstrip-cell {
  min-width: 34px;
  height: 30px;
  background-position: center;
  background-size: cover;
}

.subtitle-filmstrip-cell:nth-child(odd) {
  background: rgba(255, 255, 255, 0.05);
}

.subtitle-ruler {
  position: absolute;
  z-index: 2;
  inset: 34px 0 auto;
  height: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
  pointer-events: none;
}

.subtitle-ruler-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  min-width: 34px;
}

.subtitle-ruler-tick i {
  width: 1px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.subtitle-ruler-tick b {
  display: block;
  margin-top: 1px;
  border-radius: 5px;
  padding: 0 2px;
  background: rgba(7, 17, 13, 0.42);
  font-size: inherit;
  line-height: 1;
}

.subtitle-playhead {
  position: absolute;
  z-index: 6;
  top: 6px;
  height: 30px;
  width: 28px;
  transform: translateX(-50%);
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
  pointer-events: auto;
}

.subtitle-playhead::after {
  content: "";
  position: absolute;
  top: 0;
  height: 30px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: var(--soz-gold);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 16px var(--soz-gold);
  transform: translateX(-50%);
}

.subtitle-playhead.dragging::after {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--soz-gold) 42%, transparent), 0 0 22px var(--soz-gold);
}

.subtitle-play-button {
  position: absolute;
  z-index: 7;
  top: 52px;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--soz-gold) 42%, var(--soz-border));
  border-radius: 8px;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 78%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  opacity: 0.78;
  transform: translateX(-50%);
}

.subtitle-play-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.subtitle-play-button.hidden {
  display: none;
}

.subtitle-selection-range {
  position: absolute;
  z-index: 2;
  top: 86px;
  height: 30px;
  border: 2px solid color-mix(in srgb, var(--soz-gold) 78%, var(--soz-surface));
  border-radius: 12px;
  background: color-mix(in srgb, var(--soz-gold) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--soz-gold) 26%, transparent);
  display: none;
  pointer-events: none;
}

.subtitle-selection-range.conflict {
  border-color: var(--soz-danger);
  background: color-mix(in srgb, var(--soz-danger) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--soz-danger) 28%, transparent);
}

.subtitle-block-layer {
  position: absolute;
  z-index: 3;
  inset: 57px 0 0;
}

.subtitle-block {
  position: absolute;
  top: 0;
  display: grid;
  place-items: center;
  height: 28px;
  min-width: 36px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #102018;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  touch-action: none;
  cursor: grab;
}

.subtitle-block {
  overflow: visible;
}

.subtitle-block.dragging {
  cursor: grabbing;
}

.subtitle-block.dragging * {
  cursor: grabbing;
}

.subtitle-block.user-created {
  top: 36px;
  border-color: color-mix(in srgb, var(--soz-gold) 82%, #fff);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.subtitle-timeline-editor.expanded .subtitle-block {
  height: 44px;
}

.subtitle-block.selected {
  border-color: color-mix(in srgb, var(--soz-surface) 84%, var(--soz-muted));
  outline: 2px solid color-mix(in srgb, var(--soz-accent) 52%, transparent);
  outline-offset: 2px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  cursor: grab;
}

.subtitle-block.user-created.selected {
  border-color: var(--soz-gold);
  outline-color: color-mix(in srgb, var(--soz-gold) 68%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.subtitle-block.empty {
  border-style: dashed;
}

.subtitle-block.too-long {
  border-color: var(--soz-warning);
}

.subtitle-block.screen-overflow {
  border-color: var(--soz-danger);
}

.subtitle-block-text {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.subtitle-block .subtitle-block-text {
  max-width: calc(100% - 32px);
}

.subtitle-block.tiny .subtitle-block-text {
  display: none;
}

.subtitle-block-handle {
  position: absolute;
  z-index: 3;
  top: -6px;
  bottom: -6px;
  width: 32px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.subtitle-block-handle:hover,
.subtitle-block-handle:active {
  cursor: ew-resize;
}

.subtitle-block-handle.left {
  left: -14px;
}

.subtitle-block-handle.right {
  right: -14px;
}

.subtitle-block-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--soz-accent) 64%, #fff);
}

.subtitle-block-handle.left::after {
  left: 12px;
}

.subtitle-block-handle.right::after {
  right: 12px;
}

.subtitle-block.user-created .subtitle-block-handle::after {
  background: color-mix(in srgb, var(--soz-gold) 82%, #fff);
}

.subtitle-warning-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--soz-surface);
  border-radius: 50%;
  background: var(--soz-warning);
}

.subtitle-block-number {
  position: absolute;
  top: 31px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}

.subtitle-timeline-editor.expanded .subtitle-block-number {
  top: 50px;
}

.subtitle-block-number.selected {
  color: rgba(255, 255, 255, 0.92);
}

.subtitle-block-number.user-created {
  top: 67px;
  color: color-mix(in srgb, var(--soz-gold) 88%, #fff);
}

.timeline-add-button,
.timeline-delete-button {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid color-mix(in srgb, var(--soz-gold) 70%, var(--soz-border));
  border-radius: 8px;
  opacity: 0.86;
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.timeline-add-button {
  left: var(--timeline-control-left, 7px);
  top: 95px;
  color: #2b2410;
  border: 1px solid color-mix(in srgb, var(--soz-gold) 52%, var(--soz-border));
  background: color-mix(in srgb, var(--soz-gold) 52%, #fff);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--soz-gold) 16%, transparent);
}

.timeline-delete-button {
  top: 25px;
  left: 7px;
  color: color-mix(in srgb, var(--soz-danger) 74%, var(--soz-text));
  border: 1px solid color-mix(in srgb, var(--soz-danger) 24%, var(--soz-border));
  background: color-mix(in srgb, var(--soz-surface) 88%, transparent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--soz-danger) 10%, transparent);
}

.timeline-delete-button:disabled {
  color: color-mix(in srgb, var(--soz-muted) 58%, transparent);
  border-color: var(--soz-border);
  background: color-mix(in srgb, var(--soz-surface) 72%, transparent);
  box-shadow: none;
  opacity: 0.32;
}

.timeline-add-button:hover,
.timeline-add-button:focus-visible,
.timeline-delete-button:hover,
.timeline-delete-button:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.timeline-add-button svg,
.timeline-delete-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.review-editor-toolbar {
  position: absolute;
  z-index: 6;
  top: 137px;
  left: var(--timeline-control-left, 7px);
  width: max(0px, calc(var(--timeline-visible-width, 360px) - 14px));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  pointer-events: auto;
  transition: left 0.08s linear, width 0.08s linear;
}

.review-toolbar-group {
  display: contents;
}

.review-toolbar-label {
  display: none;
}

.review-toolbar-row {
  display: contents;
  align-items: center;
}

.review-segment-editor {
  display: grid;
  gap: 8px;
  padding: 0;
}

.review-segment-nav {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 5px;
  font-weight: 900;
}

.review-subtitle-controls {
  display: contents;
  grid-template-columns: none;
  align-items: center;
  min-width: 0;
}

.segment-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--soz-border);
  border-radius: 50%;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 84%, transparent);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.segment-nav-button span {
  display: none;
}

.segment-nav-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.segment-nav-button:disabled {
  opacity: 0.42;
}

.review-selected-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 32px;
  gap: 5px;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--soz-surface) 82%, transparent);
}

.review-selected-number {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--soz-accent);
}

.review-selected-time {
  min-width: 0;
  overflow: hidden;
  color: var(--soz-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-editor-tools {
  display: contents;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.timeline-nav-button {
  position: absolute;
  z-index: 6;
  top: 57px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  opacity: 0.92;
}

.timeline-nav-button.prev {
  left: var(--timeline-control-left, 7px);
}

.timeline-nav-button.next {
  left: var(--timeline-control-right, calc(100% - 39px));
}

.review-text-warning {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--soz-danger) 28%, var(--soz-border));
  border-radius: 999px;
  padding: 7px 10px;
  color: color-mix(in srgb, var(--soz-danger) 82%, var(--soz-text));
  background: color-mix(in srgb, var(--soz-danger) 9%, var(--soz-surface));
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.review-action-notice {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--soz-gold) 34%, var(--soz-border));
  border-radius: 14px;
  padding: 8px 10px;
  color: color-mix(in srgb, var(--soz-gold) 76%, var(--soz-text));
  background: color-mix(in srgb, var(--soz-gold-soft) 72%, var(--soz-surface));
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.28;
  text-align: center;
}

.review-action-notice[data-tone="error"] {
  border-color: color-mix(in srgb, var(--soz-danger) 32%, var(--soz-border));
  color: color-mix(in srgb, var(--soz-danger) 82%, var(--soz-text));
  background: color-mix(in srgb, var(--soz-danger) 10%, var(--soz-surface));
}

.review-export-choice {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-md);
  background: color-mix(in srgb, var(--soz-surface) 96%, transparent);
  box-shadow: var(--soz-shadow-sm);
  transform: translateX(-50%);
}

.review-export-choice.hidden {
  display: none;
}

.review-export-choice > span {
  color: var(--soz-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.review-quality-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-quality-buttons button {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 46px;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  color: var(--soz-text);
  background: var(--soz-surface);
  font-weight: 900;
  line-height: 1.05;
}

.review-quality-buttons button small {
  color: var(--soz-muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.review-quality-buttons button.active {
  border-color: var(--soz-accent);
  color: #fff;
  background: var(--soz-accent);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--soz-accent) 22%, transparent);
}

.review-quality-buttons button.active small {
  color: rgba(255, 255, 255, 0.82);
}

.review-autosave-note {
  margin: 0;
  color: var(--soz-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

.review-export-wrap {
  position: relative;
  display: grid;
  width: 100%;
}

.review-export-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  font-size: clamp(1rem, 3.6vw, 1.18rem);
  box-shadow: 0 18px 46px color-mix(in srgb, var(--soz-accent) 30%, transparent);
}

.review-export-submit svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.karaoke-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--soz-border);
  border-radius: 50%;
  color: var(--soz-muted);
  background: color-mix(in srgb, var(--soz-surface) 78%, transparent);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.karaoke-toggle:has(input:checked) {
  color: #fff;
  border-color: var(--soz-accent);
  background: var(--soz-accent);
}

.karaoke-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.timeline-delete-button.hidden {
  display: none;
}

.subtitle-manual-placeholder {
  position: absolute;
  z-index: 2;
  top: 97px;
  left: calc(var(--timeline-control-left, 7px) + 34px);
  width: min(250px, calc(var(--timeline-visible-width, 360px) - 86px));
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  color: color-mix(in srgb, var(--soz-gold) 72%, var(--soz-text));
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.82;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-manual-placeholder.hidden {
  display: none;
}

.karaoke-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.karaoke-toggle .karaoke-highlight-mark {
  fill: currentColor;
  stroke: none;
  opacity: 0.22;
}

.karaoke-toggle:has(input:checked) .karaoke-highlight-mark {
  opacity: 0.34;
}

.review-selected-text {
  display: none;
}

.review-edit-actions {
  display: none;
}

.review-icon-action {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--soz-border);
  border-radius: 50%;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 84%, transparent);
}

.review-icon-action:disabled {
  opacity: 0.42;
}

.review-edit-actions svg {
  width: 16px;
  height: 16px;
}

.review-item.selected {
  border-color: var(--soz-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--soz-accent) 20%, transparent);
}

.review-item.empty {
  border-style: dashed;
}

.review-item.too-long {
  border-color: var(--soz-warning);
}

.review-time b {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 22px;
  margin-right: 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--soz-accent);
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main meta"
    "track track"
    "actions actions";
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: pointer;
}

.task-card.current {
  border-color: var(--accent);
}

.task-main {
  grid-area: main;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-main strong,
.task-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-version-summary,
.task-time-summary,
.task-modified-summary {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-version-summary {
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
}

.task-modified-summary {
  color: color-mix(in srgb, var(--muted) 92%, var(--ink));
  font-size: 11px;
}

.task-meta {
  grid-area: meta;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.mini-track {
  grid-area: track;
  height: 7px;
}

.task-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: minmax(108px, 0.8fr) minmax(148px, 1.2fr) 28px;
  align-items: center;
  gap: 7px;
}

.task-actions-transport {
  grid-template-columns: repeat(2, 42px) minmax(0, 1fr) 28px;
  justify-items: start;
}

.task-actions-transport .task-side-actions {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  align-content: center;
}

.task-actions-minimal {
  grid-template-columns: minmax(0, 1fr) 28px;
}

.task-actions-minimal .task-side-actions {
  grid-column: 2;
  grid-row: 1;
}

.control-button {
  min-width: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--field);
}

.control-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-button.compact {
  min-width: 0;
}

.control-button.icon-label {
  gap: 7px;
  max-width: 190px;
  padding: 0 12px;
}

.control-button.icon-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-actions .control-button.compact {
  width: 100%;
  min-height: 42px;
  font-size: 0.9rem;
}

.task-actions .control-button.icon-label {
  max-width: none;
}

.task-actions .task-download-button {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.task-actions .task-download-button,
.task-actions .task-share-button {
  min-width: 0;
}

.task-actions .task-edit-button {
  grid-column: 1 / span 2;
  min-height: 40px;
}

.control-button.is-loading .button-spinner,
.control-button.is-preparing .share-status .button-spinner {
  display: inline-block;
}

.control-button.is-loading > svg {
  display: none;
}

.task-share-button .share-status {
  flex: 0 0 auto;
  min-width: 34px;
  height: 22px;
  padding-inline: 6px;
  overflow: visible;
}

.task-share-button.is-ready .share-status {
  min-width: 30px;
}

.task-share-button .share-status-text {
  min-width: auto;
  overflow: visible;
  text-overflow: clip;
}

.control-button.icon-only {
  width: 42px;
  padding: 0;
}

.control-button.danger {
  color: color-mix(in srgb, var(--danger) 68%, var(--muted));
  border-color: color-mix(in srgb, var(--danger) 20%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel-soft));
}

.task-side-actions {
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: stretch;
  justify-items: end;
  align-content: space-between;
  gap: 8px;
}

.task-icon-button,
.task-actions .trash-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}

.task-export-menu {
  position: relative;
  order: 0;
  min-width: 28px;
}

.task-export-menu > summary.task-icon-button {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  background: color-mix(in srgb, var(--soz-gold-soft) 56%, var(--panel-soft));
}

.task-export-menu > summary.task-icon-button:hover {
  border-color: color-mix(in srgb, var(--soz-gold) 48%, var(--line));
  color: var(--ink);
}

.task-side-actions .export-menu-panel {
  right: 0;
  bottom: calc(100% + 7px);
}

.task-actions .trash-button {
  position: static;
  justify-self: end;
}

.task-actions .trash-button svg {
  width: 13px;
  height: 13px;
}

.trash-button:hover {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.empty-state {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 20px, 640px);
    padding: 12px 0 18px;
  }

  .app-header {
    gap: 10px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    flex-basis: 38px;
  }

  h1 {
    max-width: 150px;
    font-size: 16px;
  }

  .brand p {
    display: none;
  }

  .segmented {
    width: 114px;
  }

  .system-bar {
    gap: 6px;
  }

  .metric {
    min-width: 98px;
    padding: 8px 10px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .input-panel,
  .output-panel,
  .review-panel,
  .task-panel {
    padding: 14px;
  }

  .range-grid,
  .details-row {
    grid-template-columns: 1fr;
  }

  .url-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .small-button {
    flex-basis: auto;
  }
}
/* V4 Stage 6 app UX polish */
.segmented {
  width: min(100%, 210px);
}

.segment-button {
  min-height: 32px;
}

.configure-controls {
  display: grid;
  gap: 14px;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.quality-choices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subtitle-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-button {
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  font-weight: 900;
  cursor: pointer;
}

.choice-button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 24%, transparent);
}

.subtitle-choice {
  display: grid;
  place-items: center;
}

.range-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

.range-details summary {
  min-height: 32px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.range-details[open] summary {
  margin-bottom: 10px;
}

body[data-app-state="empty"] .workspace {
  grid-template-columns: minmax(520px, 720px) minmax(0, 1fr);
  justify-content: stretch;
}

body[data-app-state="empty"] .input-panel {
  padding: clamp(20px, 4vw, 34px);
}

body[data-app-state="empty"] .job-form {
  gap: 14px;
}

body[data-app-state="empty"] .url-row input {
  min-height: 56px;
  font-size: 1.02rem;
}

body[data-app-state="empty"] .submit-button {
  min-height: 52px;
  font-size: 1rem;
}

body[data-app-state="configure"] .workspace {
  grid-template-columns: minmax(500px, 620px) minmax(0, 1fr);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.task-actions {
  align-items: center;
}

.actions .button-link.subtle {
  border-radius: 999px;
}

.admin-shell {
  gap: 20px;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading h1 {
  margin: 0;
  max-width: min(100%, 760px);
  overflow: visible;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: 0;
  text-overflow: clip;
  white-space: normal;
}

.admin-time {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-metric,
.admin-kpis > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.admin-metric span,
.admin-kpis span,
.admin-section-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.7rem;
  line-height: 1.1;
}

.admin-metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-traffic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-section {
  min-width: 0;
}

.admin-users-section,
.admin-create-section {
  grid-column: 1 / -1;
}

.admin-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.admin-alert.error {
  border-color: color-mix(in srgb, var(--danger) 54%, var(--line));
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
}

.admin-alert.success {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.admin-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(130px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-create-form label {
  display: grid;
  gap: 6px;
}

.admin-create-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-create-form input,
.admin-create-form select,
.admin-table-tools input,
.admin-table-tools select,
.admin-inline-form select,
.admin-password-form input {
  min-height: 40px;
  border-radius: 8px;
  background: var(--field);
}

.admin-table-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 220px));
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}

.admin-table-tools label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-table-tools label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-search {
  min-width: 0;
}

.admin-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-kpis strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: min(62vh, 680px);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.admin-table-scroll.small {
  max-height: min(46vh, 440px);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-user-table {
  min-width: 1280px;
}

.admin-visitor-table {
  min-width: 980px;
}

.admin-referrer-table {
  min-width: 360px;
}

.admin-audit-table {
  min-width: 1120px;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--panel) 94%, var(--bg));
  backdrop-filter: blur(14px);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td strong,
.admin-table td small {
  display: block;
}

.admin-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-filter-empty td {
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.admin-control-stack {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.admin-inline-form,
.admin-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-settings-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
}

.admin-checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-inline-form button,
.admin-password-form button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel-soft);
  font-weight: 850;
  cursor: pointer;
}

.admin-inline-form button:hover,
.admin-inline-form button:focus-visible,
.admin-password-form button:hover,
.admin-password-form button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  color: var(--accent);
}

.admin-inline-form button:disabled,
.admin-inline-form select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

@media (max-width: 860px) {
  .segmented {
    width: 100%;
    order: 3;
    flex-basis: 100%;
  }

  body[data-app-state="empty"] .workspace,
  body[data-app-state="configure"] .workspace {
    grid-template-columns: 1fr;
  }

  .quality-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submit-button {
    position: sticky;
    bottom: 12px;
    z-index: 10;
    min-height: 52px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  }

  .input-panel {
    overflow: visible;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .action-button {
    width: 100%;
    min-width: 0;
  }

  .actions .button-link.subtle {
    justify-content: center;
    min-height: 42px;
    padding: 0 10px;
  }

  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-metrics,
  .admin-grid,
  .admin-traffic-grid,
  .admin-analytics-grid,
  .admin-kpis {
    grid-template-columns: 1fr;
  }

  .admin-create-form {
    grid-template-columns: 1fr;
  }

  .admin-table-tools {
    grid-template-columns: 1fr;
  }

  .admin-table-wrap {
    max-height: 62vh;
  }

  .admin-table {
    min-width: 460px;
  }

  .admin-user-table {
    min-width: 1220px;
  }
}

.top-controls .language-switch {
  width: 176px;
  flex: 0 0 176px;
  order: initial;
}

/* V5 front polish */
.public-shell,
.shell {
  width: min(1180px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}

.source-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel-soft) 78%, var(--panel));
  text-align: left;
  cursor: pointer;
}

.source-card strong,
.source-card small {
  overflow-wrap: anywhere;
}

.source-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.source-card.active {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), color-mix(in srgb, var(--gold) 12%, var(--panel-soft)));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 16%, transparent);
}

.source-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.source-fields {
  display: grid;
  gap: 8px;
}

.upload-dropzone {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 52%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel-soft) 82%, var(--panel));
}

.upload-dropzone input {
  inset: 0 auto auto 0;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  appearance: none;
  white-space: nowrap;
}

.upload-picker-button {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #0b6b3e));
  cursor: pointer;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 20%, transparent);
}

.upload-picker-button svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.upload-file-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.upload-file-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-copy em {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 800;
}

.setting-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tooltip-mark {
  position: relative;
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: help;
}

.tooltip-mark::after {
  content: attr(aria-label);
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 8px);
  z-index: 50;
  width: min(280px, 72vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip-mark:hover::after,
.tooltip-mark:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.subtitle-preview-card {
  gap: 7px;
  padding: 8px;
}

.subtitle-preview-lines {
  display: grid;
  width: 56px;
  height: 30px;
  place-content: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.52)),
    color-mix(in srgb, var(--accent) 28%, #111);
}

.subtitle-preview-lines i {
  display: block;
  height: 4px;
  width: 34px;
  border-radius: 999px;
  background: #fff;
}

.subtitle-preview-reels {
  width: 42px;
  height: 34px;
}

.subtitle-preview-reels i {
  width: 28px;
  height: 5px;
}

.subtitle-preview-large i {
  width: 38px;
  height: 6px;
}

.choice-button.active .subtitle-preview-lines {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.46)),
    color-mix(in srgb, var(--accent-dark) 50%, #111);
}

.probe-result {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.site-footer.unified-footer {
  justify-content: center;
  gap: 10px 18px;
  padding-bottom: 12px;
  font-size: 0.86rem;
  font-weight: 500;
}

.site-footer.unified-footer strong {
  font-weight: 500;
}

.footer-made {
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 0.75rem;
  font-weight: 500;
}

.hero-product {
  min-height: min(620px, calc(100vh - 148px));
}

.hero-copy h1 {
  max-width: min(820px, calc(100vw - 28px));
}

.hero-lead,
.section-heading,
.section-heading p,
.public-grid p {
  max-width: min(100%, calc(100vw - 28px));
}

.hero-product::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  z-index: -1;
  width: 180px;
  height: 180px;
  opacity: 0.16;
  background:
    conic-gradient(from 22deg, transparent 0 12%, var(--gold) 12% 15%, transparent 15% 29%, var(--ornament) 29% 32%, transparent 32% 50%, var(--gold) 50% 53%, transparent 53% 100%),
    radial-gradient(circle, transparent 0 39%, var(--gold) 40% 43%, transparent 44%);
  border-radius: 50%;
}

.landing-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 12px;
  margin-top: 24px;
  max-width: 800px;
}

.landing-source-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--shadow) 45%, transparent);
}

.landing-form.landing-source-card {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.landing-source-card label,
.landing-source-card strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.landing-source-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.landing-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.landing-url-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

.landing-upload-card {
  display: grid;
  gap: 4px;
  align-content: start;
  text-decoration: none;
}

.landing-upload-card .source-icon {
  margin-bottom: 4px;
}

.public-grid .panel,
.auth-panel,
.input-panel,
.output-panel,
.review-panel,
.task-panel {
  border-radius: 8px;
}

@media (max-width: 860px) {
  .shell,
  .public-shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    overflow: hidden;
  }

  .hero-product {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: 340px;
  }

  .hero-copy h1,
  .hero-lead {
    width: 100%;
    max-width: 340px;
  }

  .section-heading,
  .section-heading p,
  .public-grid p {
    width: 100%;
    max-width: 340px;
    overflow-wrap: anywhere;
  }

  .landing-source-grid,
  .landing-url-row,
  .source-picker,
  .subtitle-choices {
    grid-template-columns: 1fr;
  }

  .landing-source-card,
  .panel,
  .public-grid,
  .trust-strip {
    max-width: 340px;
  }

  .source-card {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
  }

  .source-card small {
    grid-column: 2;
  }

  .tooltip-mark::after {
    inset-inline-end: auto;
    inset-inline-start: 50%;
    transform: translate(-50%, 4px);
  }

  .tooltip-mark:hover::after,
  .tooltip-mark:focus-visible::after {
    transform: translate(-50%, 0);
  }
}

/* V6 blocking visual redesign */
.soz-container {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
}

body {
  color: var(--soz-text);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--soz-accent-soft) 52%, transparent) 0 280px, transparent 360px),
    radial-gradient(circle at 84% 12%, color-mix(in srgb, var(--soz-gold-soft) 58%, transparent) 0 220px, transparent 320px),
    linear-gradient(180deg, var(--soz-bg-soft) 0%, var(--soz-bg) 42%, var(--soz-bg) 100%);
}

body::before {
  opacity: 0.11;
  background:
    linear-gradient(120deg, transparent 0 48%, color-mix(in srgb, var(--soz-gold) 55%, transparent) 48% 50%, transparent 50% 100%) 0 0 / 72px 72px,
    linear-gradient(60deg, transparent 0 48%, color-mix(in srgb, var(--soz-accent) 34%, transparent) 48% 50%, transparent 50% 100%) 0 0 / 72px 72px,
    radial-gradient(circle at 50% 50%, transparent 0 26px, color-mix(in srgb, var(--soz-gold) 34%, transparent) 27px 28px, transparent 29px) 0 0 / 144px 144px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.72) 42%, transparent 82%);
}

body::after {
  opacity: 0;
}

.shell,
.public-shell {
  width: min(100% - 32px, 1180px);
  max-width: 1180px;
  overflow: visible;
  padding: max(14px, env(safe-area-inset-top)) 0 28px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-md);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--soz-surface) 86%, transparent);
  box-shadow: var(--soz-shadow-sm);
  backdrop-filter: blur(18px);
}

.brand-copy strong,
.brand-copy h1 {
  max-width: none;
  color: var(--soz-text);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-copy small,
.brand-copy p {
  max-width: 180px;
  color: var(--soz-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.brand-logo {
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 12px;
  background: var(--soz-surface);
  box-shadow: var(--soz-shadow-sm);
}

.public-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 24px);
  margin-inline: auto;
}

.public-nav-links a {
  color: var(--soz-muted);
  font-size: 0.93rem;
  font-weight: 800;
  text-decoration: none;
}

.public-nav-links a:hover,
.public-nav-links a:focus-visible {
  color: var(--soz-accent);
}

.top-controls {
  flex-wrap: nowrap;
}

.language-switch,
.language-menu {
  width: 168px;
  flex-basis: 168px;
}

.language-trigger,
.icon-button,
.account-icon-button,
.burger-button {
  min-height: 44px;
  border-radius: 999px;
  border-color: var(--soz-border);
  background: color-mix(in srgb, var(--soz-surface) 84%, var(--soz-surface-2));
}

.language-panel {
  border-radius: var(--soz-radius-sm);
  background: var(--soz-surface);
  box-shadow: var(--soz-shadow-md);
}

.theme-switch {
  min-width: 54px;
  min-height: 44px;
  justify-content: center;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--soz-surface) 84%, var(--soz-surface-2));
}

.switch-track {
  width: 42px;
  height: 24px;
  background:
    radial-gradient(circle at 72% 34%, var(--soz-gold) 0 3px, transparent 4px),
    var(--soz-bg-soft);
}

.theme-switch input:checked + .switch-track {
  border-color: color-mix(in srgb, var(--soz-accent) 70%, var(--soz-border));
  background:
    radial-gradient(circle at 32% 38%, #fff 0 2px, transparent 3px),
    var(--soz-surface-2);
}

.soz-btn,
.submit-button,
.button-link,
.small-button,
.action-button,
.control-button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.soz-btn-primary,
.submit-button,
.download-action {
  border: 1px solid color-mix(in srgb, var(--soz-accent) 88%, var(--soz-border));
  color: #fff;
  background: linear-gradient(180deg, var(--soz-accent), var(--soz-accent-hover));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--soz-accent) 24%, transparent);
}

.soz-btn-primary:hover,
.submit-button:hover,
.download-action:hover {
  background: linear-gradient(180deg, var(--soz-accent-hover), var(--soz-accent));
}

.soz-btn-secondary,
.button-link,
.small-button,
.share-action,
.control-button {
  border: 1px solid var(--soz-border);
  color: var(--soz-text);
  background: var(--soz-surface);
}

.hero-product {
  display: grid;
  min-height: auto;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  margin-top: 18px;
  padding: clamp(36px, 6vw, 76px) 0 clamp(28px, 5vw, 58px);
  overflow: visible;
  background: none;
}

.hero-product::before {
  inset: auto 0 24px auto;
  width: 240px;
  height: 240px;
  opacity: 0.12;
  background:
    conic-gradient(from 18deg, transparent 0 12%, var(--soz-gold) 12% 14%, transparent 14% 28%, var(--soz-accent) 28% 30%, transparent 30% 50%, var(--soz-gold) 50% 52%, transparent 52% 100%),
    radial-gradient(circle, transparent 0 43%, var(--soz-gold) 44% 45%, transparent 46%);
}

.hero-product::after {
  display: none;
}

.hero-copy {
  width: min(100%, 720px);
  max-width: 720px;
}

.hero-copy .eyebrow,
.section-heading .eyebrow,
.eyebrow {
  color: var(--soz-accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  width: min(100%, 760px);
  max-width: 760px;
  margin: 14px 0 16px;
  color: var(--soz-text);
  font-size: clamp(2.25rem, 5.2vw, 4.75rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: 660px;
  color: var(--soz-muted);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.72;
}

.landing-source-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  gap: 12px;
  max-width: 790px;
  margin-top: 26px;
}

.landing-source-card,
.source-card,
.panel,
.product-preview-card,
.auth-panel {
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-sm);
  background: color-mix(in srgb, var(--soz-surface) 94%, transparent);
  box-shadow: var(--soz-shadow-sm);
}

.landing-source-card {
  padding: 16px;
}

.landing-source-card label,
.landing-source-card strong {
  color: var(--soz-text);
  font-size: 0.98rem;
  font-weight: 900;
}

.landing-source-card small,
.landing-source-card em {
  color: var(--soz-muted);
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.45;
}

.landing-url-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.landing-url-row input,
.url-row input,
.unit-input input,
.unit-input select,
textarea,
input,
select {
  min-height: 48px;
  border: 1px solid var(--soz-border);
  border-radius: var(--soz-radius-sm);
  color: var(--soz-text);
  background: var(--soz-surface);
}

.landing-upload-card {
  align-content: stretch;
  min-height: 100%;
}

.source-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--soz-radius-sm);
  background: var(--soz-accent-soft);
  color: var(--soz-accent);
}

.source-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.trust-strip {
  margin: 18px 0 0;
}

.trust-strip span,
.preview-format-grid span {
  border-color: var(--soz-border);
  color: var(--soz-muted);
  background: color-mix(in srgb, var(--soz-surface) 82%, transparent);
}

.product-preview-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 22px);
  overflow: hidden;
}

.product-preview-card::before {
  content: "";
  position: absolute;
  inset: -28% -18% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--soz-accent) 22%, transparent) 0 36%, transparent 70%);
}

.preview-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-browser-bar {
  min-height: 34px;
  color: var(--soz-muted);
}

.preview-browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soz-border);
}

.preview-browser-bar strong {
  margin-left: auto;
  color: var(--soz-muted);
  font-size: 0.78rem;
}

.preview-video-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--soz-radius-md);
  background: #07110d;
}

.landing-demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07110d;
}

.landing-demo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: clamp(58px, 14vw, 76px);
  height: clamp(58px, 14vw, 76px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 17, 13, 0.68);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.landing-demo-play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
}

.landing-demo-play:hover,
.landing-demo-play:focus-visible {
  background: rgba(21, 153, 87, 0.86);
  transform: translate(-50%, -50%) scale(1.04);
}

.preview-video-frame.is-playing .landing-demo-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.94);
}

.preview-format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.preview-format-grid span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--soz-border);
  border-radius: 12px;
  padding: 8px 6px;
  color: var(--soz-text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--soz-accent-soft) 72%, var(--soz-surface)), color-mix(in srgb, var(--soz-gold-soft) 72%, var(--soz-surface)));
  font-size: 0.82rem;
  font-weight: 950;
}

.public-section {
  padding: clamp(34px, 6vw, 68px) 0 4px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-top: 8px;
  color: var(--soz-text);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
  margin-top: 10px;
  color: var(--soz-muted);
  line-height: 1.65;
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.pain-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pain-card,
.step-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.pain-card h3,
.step-card h3 {
  color: var(--soz-text);
  font-size: 1.02rem;
}

.pain-card p,
.step-card p {
  color: var(--soz-muted);
  line-height: 1.58;
}

.site-footer.unified-footer {
  display: block;
  border-top: 1px solid var(--soz-border);
  margin-top: clamp(34px, 6vw, 70px);
  padding: 26px 0 max(18px, env(safe-area-inset-bottom));
  color: var(--soz-muted);
  font-weight: 400;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(104px, 0.6fr) minmax(120px, 0.7fr) minmax(104px, 0.6fr) minmax(260px, 1.25fr);
  gap: 18px;
}

.site-footer.unified-footer .footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-column h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-brand strong {
  margin: 0 0 6px;
  color: var(--soz-text);
  font-size: 1.1rem;
  font-weight: 650;
}

.footer-brand span {
  max-width: 280px;
  line-height: 1.45;
}

.footer-column a {
  color: var(--soz-muted);
  font-size: 0.9rem;
  font-weight: 450;
  text-decoration: none;
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: var(--soz-accent);
}

.footer-contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  width: fit-content;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--soz-surface) 82%, transparent);
}

.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--soz-accent);
  background: var(--soz-accent-soft);
  flex: 0 0 auto;
}

.footer-contact-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-bottom {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 22px;
  text-align: center;
  font-size: 0.72rem;
}

.footer-made {
  color: color-mix(in srgb, var(--soz-muted) 82%, var(--soz-text));
  font-size: 0.72rem;
  font-weight: 450;
  text-decoration: none;
}

.footer-made:hover,
.footer-made:focus-visible {
  color: var(--soz-accent);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.06fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

body[data-app-state="empty"] .workspace,
body[data-app-state="configure"] .workspace {
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.9fr);
}

.input-panel,
.output-panel,
.review-panel,
.task-panel,
.empty-state-panel {
  padding: clamp(16px, 2.2vw, 22px);
}

.empty-state-panel {
  display: grid;
  gap: 8px;
}

body:not([data-app-state="empty"]) .empty-state-panel {
  display: none;
}

.source-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-card {
  gap: 8px;
  padding: 14px;
  box-shadow: none;
}

.source-card.active {
  border-color: color-mix(in srgb, var(--soz-accent) 58%, var(--soz-border));
  background: linear-gradient(135deg, var(--soz-accent-soft), color-mix(in srgb, var(--soz-surface) 88%, var(--soz-gold-soft)));
}

.upload-dropzone {
  border-radius: var(--soz-radius-sm);
  border-color: color-mix(in srgb, var(--soz-accent) 55%, var(--soz-border));
  background: color-mix(in srgb, var(--soz-accent-soft) 38%, var(--soz-surface));
}

.upload-dropzone em {
  color: var(--soz-muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.probe-result {
  border-radius: var(--soz-radius-sm);
}

.clip-preview-shell {
  border-radius: var(--soz-radius-sm);
  overflow: hidden;
  background: #050b08;
}

.clip-preview-video {
  width: 100%;
  max-height: min(54vh, 430px);
  object-fit: contain;
}

.clip-preview-actions {
  inset: auto 12px 12px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.clip-media-button {
  pointer-events: auto;
}

#clip-sound-button {
  order: 1;
}

#clip-play-button {
  order: 2;
}

.clip-timeline {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.quality-grid,
.quality-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice-button {
  min-height: 48px;
  border-radius: var(--soz-radius-sm);
  border-color: var(--soz-border);
  color: var(--soz-text);
  background: var(--soz-surface);
  font-weight: 850;
}

.choice-button.active {
  border-color: color-mix(in srgb, var(--soz-accent) 62%, var(--soz-border));
  color: var(--soz-text);
  background: linear-gradient(180deg, var(--soz-accent-soft), color-mix(in srgb, var(--soz-surface) 80%, var(--soz-accent-soft)));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--soz-accent) 16%, transparent);
}

.subtitle-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subtitle-preview-card {
  min-height: 136px;
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.preset-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.preset-copy strong {
  color: var(--soz-text);
  font-size: 0.98rem;
}

.preset-copy small,
.preset-copy em {
  color: var(--soz-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.tooltip-mark {
  border: 0;
  cursor: pointer;
}

.tooltip-mark::after {
  display: none;
}

.tooltip-mark:hover::after,
.tooltip-mark:focus-visible::after,
.tooltip-mark[data-tooltip-open="true"]::after {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.quality-control input.sr-only[type="range"],
.subtitle-style-control input.sr-only[type="range"] {
  position: absolute;
  inset: auto;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
}

.actions.hidden {
  display: none;
}

.actions .button-link.subtle,
.actions #rerender-button {
  min-height: 40px;
  padding-inline: 12px;
}

.actions .action-button {
  min-height: 44px;
  padding-inline: 14px;
  font-size: 0.94rem;
}

.actions #rerender-button {
  grid-column: span 1;
  white-space: normal;
}

.action-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-action {
  order: 2;
}

.share-action {
  order: 1;
}

.task-actions .control-button.compact {
  min-height: 42px;
  padding-inline: 12px;
  font-size: 0.9rem;
}

.task-side-actions .task-icon-button,
.task-side-actions .trash-button {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.task-side-actions .task-icon-button svg,
.task-side-actions .trash-button svg {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.task-panel {
  overflow: hidden;
}

@media (max-width: 520px) {
  .task-actions-complete {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .task-actions-complete .task-download-button,
  .task-actions-complete .task-share-button,
  .task-actions-complete .task-edit-button {
    grid-column: 1;
  }

  .task-actions-complete .task-side-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-content: space-between;
  }
}

@media (max-width: 1020px) {
  .public-nav-links {
    display: none;
  }

  .hero-product,
  .workspace,
  body[data-app-state="empty"] .workspace,
  body[data-app-state="configure"] .workspace {
    grid-template-columns: 1fr;
  }

  .product-preview-card {
    max-width: 680px;
  }

  .pain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .app-header {
    align-items: center;
    gap: 8px;
    min-height: 58px;
    border-radius: var(--soz-radius-sm);
    padding: 8px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
  }

  .brand-copy small,
  .brand-copy p {
    max-width: 138px;
  }

  .top-controls {
    gap: 6px;
  }

  .language-switch,
  .language-menu {
    width: 126px;
    flex-basis: 126px;
  }

  .language-trigger {
    padding-inline: 8px;
  }

  .language-panel {
    width: min(220px, calc(100vw - 24px));
  }

  .theme-switch {
    min-width: 46px;
  }

  .hero-product {
    padding-top: 30px;
  }

  .landing-source-grid,
  .landing-url-row,
  .source-picker,
  .subtitle-choices,
  .review-actions {
    grid-template-columns: 1fr;
  }

  .landing-url-row .submit-button,
  .hero-actions .soz-btn,
  #submit-button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .subtitle-timeline-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-editor-toolbar {
    top: 132px;
    justify-content: flex-start;
    gap: 10px;
  }

  .review-tool-button {
    width: 30px;
    height: 30px;
  }

  .review-tool-button svg {
    width: 15px;
    height: 15px;
  }

  .review-tool-caption {
    position: absolute;
    top: 31px;
    left: 50%;
    display: block;
    width: 68px;
    overflow: hidden;
    color: var(--soz-muted);
    font-size: 0.42rem;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
  }

  .review-toolbar-row {
    display: contents;
  }

  .review-save-status {
    max-width: min(94px, calc(var(--timeline-visible-width, 320px) - 188px));
    width: 94px;
    min-width: 66px;
    height: 30px;
    padding: 0;
    font-size: 0.64rem;
  }

  .review-save-toast {
    max-width: 62px;
    font-size: 0.64rem;
  }

  .segment-nav-button,
  .karaoke-toggle {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .review-selected-chip {
    height: 30px;
  }

  .review-selected-number {
    min-width: 26px;
    min-height: 22px;
  }
}

@media (max-width: 380px) {
  .review-selected-time {
    display: none;
  }
}

@media (max-width: 520px) {
  .soz-container,
  .shell,
  .public-shell {
    width: min(100% - 20px, 1180px);
  }

  .app-header {
    position: relative;
  }

  .brand {
    gap: 8px;
  }

  .brand-copy small,
  .brand-copy p {
    display: none;
  }

  .language-switch,
  .language-menu {
    width: 52px;
    flex-basis: 52px;
  }

  .language-current {
    display: none;
  }

  .language-trigger {
    justify-content: center;
    padding-inline: 0;
  }

  .language-chevron {
    display: none;
  }

  .icon-button,
  .account-icon-button,
  .burger-button,
  .theme-switch {
    width: 44px;
    min-width: 44px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 14vw, 3rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .product-preview-card {
    padding: 12px;
  }

  .preview-video-frame {
    min-height: 220px;
  }

  .pain-grid,
  .public-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer.unified-footer {
    padding-top: 22px;
  }

  .footer-grid {
    gap: 14px;
  }

  .site-footer.unified-footer .footer-column:not(.footer-brand):not(.footer-contacts) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .footer-column a {
    font-size: 0.88rem;
  }

  .footer-contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .footer-contact-link {
    width: 100%;
    min-height: 38px;
    justify-content: center;
  }

  .footer-contact-link:first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    margin-top: 18px;
  }

  .quality-grid,
  .quality-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions:not(.hidden) {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 24;
    margin-top: 14px;
    border: 1px solid var(--soz-border);
    border-radius: var(--soz-radius-md);
    padding: 8px;
    background: color-mix(in srgb, var(--soz-surface) 92%, transparent);
    box-shadow: var(--soz-shadow-md);
    backdrop-filter: blur(16px);
  }

  .tooltip-mark::after {
    position: fixed;
    inset: 78px 16px auto 16px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .tooltip-mark:hover::after,
  .tooltip-mark:focus-visible::after,
  .tooltip-mark[data-tooltip-open="true"]::after {
    transform: none;
  }
}

@media (max-width: 420px) {
  .quality-grid,
  .quality-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .source-card small {
    grid-column: 2;
  }

  .actions .button-link.subtle,
  .actions #rerender-button {
    grid-column: span 1;
  }
}

@media (max-width: 360px) {
  .task-actions {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .task-actions-transport {
    grid-template-columns: repeat(2, 42px) minmax(0, 1fr) 28px;
  }

  .task-actions-transport .task-side-actions {
    grid-column: 4;
    grid-row: 1;
  }

  .task-actions .task-download-button,
  .task-actions .task-share-button,
  .task-actions .task-edit-button {
    grid-column: 1;
  }

  .task-side-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-content: start;
  }

  .task-actions-complete .task-side-actions {
    align-content: space-between;
  }

  .top-controls {
    gap: 4px;
  }

  .brand-copy strong,
  .brand-copy h1 {
    font-size: 1rem;
  }

  .language-switch,
  .language-menu,
  .icon-button,
  .account-icon-button,
  .burger-button,
  .theme-switch {
    width: 40px;
    min-width: 40px;
    flex-basis: 40px;
  }

  .footer-contact-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile header controls: one row, compact, finger-friendly */
.switch-track {
  position: relative;
  display: grid;
  place-items: center;
}

.switch-track::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--soz-gold);
  box-shadow:
    0 -8px 0 -6px var(--soz-gold),
    0 8px 0 -6px var(--soz-gold),
    8px 0 0 -6px var(--soz-gold),
    -8px 0 0 -6px var(--soz-gold),
    6px 6px 0 -6px var(--soz-gold),
    -6px 6px 0 -6px var(--soz-gold),
    6px -6px 0 -6px var(--soz-gold),
    -6px -6px 0 -6px var(--soz-gold);
}

.switch-thumb {
  display: none;
}

.theme-switch input:checked + .switch-track {
  border-color: transparent;
  background: transparent;
}

.theme-switch input:checked + .switch-track::before {
  width: 19px;
  height: 19px;
  background: transparent;
  box-shadow: inset -6px -4px 0 0 var(--soz-text);
}

@media (max-width: 520px) {
  .app-header,
  .app-header.public-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-height: 56px;
    padding: 8px;
  }

  .app-header .brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .app-header .top-controls,
  .top-controls.public-nav {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
  }

  .top-controls .language-switch,
  .top-controls .language-menu {
    display: none;
  }

  .top-controls .language-rail {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
  }

  .language-rail-option,
  .theme-switch,
  .icon-button,
  .account-icon-button,
  .burger-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    flex-basis: 40px;
    padding: 0;
  }

  .theme-switch {
    border-radius: 999px;
  }

  .switch-track {
    width: 40px;
    height: 40px;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .language-rail-option .language-flag {
    width: 22px;
    height: 15px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    flex-basis: 38px;
  }

  .brand-copy strong,
  .brand-copy h1 {
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 360px) {
  .app-header,
  .app-header.public-header {
    gap: 4px;
    padding: 7px;
  }

  .app-header .top-controls,
  .top-controls.public-nav,
  .top-controls .language-rail {
    gap: 3px;
  }

  .language-rail-option,
  .theme-switch,
  .icon-button,
  .account-icon-button,
  .burger-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    flex-basis: 36px;
  }

  .switch-track {
    width: 36px;
    height: 36px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    flex-basis: 34px;
  }
}

/* Mobile header correction: one current language button, quiet theme icon, clean V5 surfaces. */
body {
  background:
    radial-gradient(circle at 16% -6%, color-mix(in srgb, var(--soz-accent-soft) 70%, transparent) 0 22rem, transparent 38rem),
    linear-gradient(180deg, var(--soz-bg-soft) 0%, var(--soz-bg) 58%, var(--soz-bg) 100%);
}

[data-theme="dark"] body,
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% -8%, color-mix(in srgb, var(--soz-accent) 16%, transparent) 0 22rem, transparent 39rem),
    linear-gradient(180deg, var(--soz-bg-soft) 0%, var(--soz-bg) 62%, var(--soz-bg) 100%);
}

body::before {
  opacity: 0.055;
  background:
    linear-gradient(120deg, transparent 0 46%, color-mix(in srgb, var(--soz-gold) 42%, transparent) 46% 48%, transparent 48% 100%) 0 0 / 64px 64px,
    linear-gradient(60deg, transparent 0 47%, color-mix(in srgb, var(--soz-accent) 34%, transparent) 47% 49%, transparent 49% 100%) 0 0 / 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.72) 34%, transparent 88%);
}

body::after {
  display: none;
}

.panel::before {
  display: none;
}

.panel,
.landing-source-card,
.source-card,
.auth-panel,
.product-preview-card {
  border: 1px solid var(--soz-border);
  background: color-mix(in srgb, var(--soz-surface) 94%, transparent);
}

.source-card.active,
.choice-button.active {
  border-color: color-mix(in srgb, var(--soz-accent) 58%, var(--soz-border));
  background: var(--soz-accent-soft);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--soz-accent) 13%, transparent);
}

.language-switch,
.language-menu {
  width: 152px;
  flex-basis: 152px;
}

.language-trigger {
  border-radius: 999px;
}

.language-flag {
  display: none !important;
}

.language-panel {
  border-radius: var(--soz-radius-sm);
}

.language-option.active small {
  color: currentColor;
}

.switch-track {
  overflow: visible;
}

.switch-track::before {
  position: relative;
  width: 14px;
  height: 14px;
  border: 2px solid var(--soz-gold);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  color: var(--soz-gold);
  background: currentColor;
  box-shadow:
    0 -9px 0 0 currentColor,
    0 9px 0 0 currentColor,
    9px 0 0 0 currentColor,
    -9px 0 0 0 currentColor,
    6px 6px 0 0 currentColor,
    -6px 6px 0 0 currentColor,
    6px -6px 0 0 currentColor,
    -6px -6px 0 0 currentColor;
}

.theme-switch input:checked + .switch-track::before {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  box-shadow: inset -6px -4px 0 0 var(--soz-text);
}

.theme-switch input:checked + .switch-track::after {
  display: none;
}

.icon-button svg,
.burger-item svg,
.account-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

#job-title {
  max-width: 100%;
  overflow: visible;
  color: var(--soz-text);
  font-size: clamp(1.35rem, 5.7vw, 2rem);
  line-height: 1.13;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 860px) {
  .shell,
  .public-shell {
    width: min(100% - 24px, 1180px);
    max-width: none;
    overflow: visible;
  }

  .workspace,
  body[data-app-state="empty"] .workspace,
  body[data-app-state="configure"] .workspace,
  .stack,
  .hero-copy,
  .landing-source-grid,
  .landing-source-card,
  .panel,
  .public-grid,
  .trust-strip,
  .section-heading,
  .section-heading p,
  .public-grid p {
    width: 100%;
    max-width: none;
  }

  .hero-copy h1,
  .hero-lead {
    width: 100%;
    max-width: min(100%, 680px);
  }

  .workspace,
  body[data-app-state="empty"] .workspace,
  body[data-app-state="configure"] .workspace {
    justify-items: stretch;
  }
}

@media (max-width: 520px) {
  .soz-container,
  .shell,
  .public-shell {
    width: min(100% - 20px, 1180px);
  }

  .app-header,
  .app-header.public-header {
    border-radius: var(--soz-radius-sm);
    background: color-mix(in srgb, var(--soz-surface) 88%, transparent);
    box-shadow: var(--soz-shadow-sm);
  }

  .app-header .top-controls,
  .top-controls.public-nav {
    gap: 6px;
  }

  .top-controls .language-rail {
    display: none !important;
  }

  .top-controls .language-switch,
  .top-controls .language-menu {
    display: block !important;
    width: 54px;
    min-width: 54px;
    flex: 0 0 54px;
  }

  .top-controls .language-trigger,
  .top-controls.public-nav .theme-switch,
  .app-header .top-controls .theme-switch,
  .theme-switch,
  .burger-button,
  .icon-button,
  .account-icon-button {
    width: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 999px;
  }

  .top-controls .language-trigger {
    justify-content: center;
    gap: 0;
    padding: 0;
    border-color: var(--soz-border);
    background: color-mix(in srgb, var(--soz-surface) 86%, var(--soz-surface-2));
  }

  .top-controls .language-chevron {
    display: none;
  }

  .top-controls .language-mark {
    display: none;
  }

  .top-controls .language-current {
    display: inline;
    max-width: 42px;
    font-size: 0;
  }

  .top-controls .language-current::first-letter {
    font-size: 0;
  }

  .top-controls .language-current::after {
    content: "KG";
    font-size: 0.78rem;
    font-weight: 900;
  }

  html[lang="ru"] .top-controls .language-current::after {
    content: "RU";
  }

  html[lang="en"] .top-controls .language-current::after {
    content: "EN";
  }

  .top-controls .language-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 74px);
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    width: min(210px, calc(100vw - 20px));
    border-radius: var(--soz-radius-sm);
    padding: 8px;
  }

  .language-option {
    min-height: 44px;
    border-radius: var(--soz-radius-sm);
  }

  .theme-switch {
    border: 1px solid var(--soz-border);
    background: color-mix(in srgb, var(--soz-surface) 86%, var(--soz-surface-2));
  }

  .switch-track {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
  }

  .burger-button span {
    width: 17px;
    height: 2px;
  }

  .hero-product {
    padding-top: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 10.8vw, 2.8rem);
    line-height: 1.06;
  }

  .input-panel,
  .output-panel,
  .review-panel,
  .task-panel,
  .empty-state-panel,
  .landing-source-card {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding: 16px;
  }

  .job-form > .submit-button {
    position: static;
    bottom: auto;
    z-index: auto;
  }

  .source-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .source-card {
    grid-template-columns: 1fr;
    min-height: 76px;
    justify-items: center;
    align-items: center;
    gap: 7px;
    padding: 10px 8px;
    text-align: center;
  }

  .source-icon {
    width: 34px;
    height: 34px;
  }

  .source-card strong {
    font-size: 0.9rem;
    line-height: 1.18;
  }

  .source-card small {
    display: none;
  }

  .url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .url-status {
    min-width: 58px;
    padding-inline: 8px;
  }

  .upload-dropzone {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .upload-picker-button {
    width: 48px;
    height: 48px;
  }

  .upload-file-copy strong {
    font-size: 0.9rem;
  }

  .status-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .subtitle-style-control {
    gap: 10px;
    border: 1px solid var(--soz-border);
    border-radius: var(--soz-radius-sm);
    padding: 12px;
    background: color-mix(in srgb, var(--soz-surface) 92%, transparent);
  }

  .subtitle-style-control input#subtitle-style.sr-only[type="range"] {
    position: static;
    inset: auto;
    width: 100%;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    margin: 0;
    border: 0;
    padding: 0;
    clip: auto;
    clip-path: none;
    background: transparent;
  }

  .subtitle-style-control .subtitle-choices {
    display: none;
  }

  .subtitle-mobile-labels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    color: var(--soz-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
  }

  .auth-layout {
    gap: 14px;
    margin-top: 16px;
  }

  .auth-intro {
    padding: 0;
  }

  .auth-intro h1 {
    font-size: clamp(1.8rem, 8.4vw, 2.35rem);
    line-height: 1.06;
  }

.auth-panel {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}
}

/* SEO V10 content blocks */
.answer-card,
.product-definition {
  border: 1px solid color-mix(in srgb, var(--soz-accent) 26%, var(--soz-border));
  border-radius: var(--soz-radius-md);
  background: color-mix(in srgb, var(--soz-accent-soft) 72%, var(--soz-surface));
  box-shadow: var(--soz-shadow-sm);
}

.answer-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.answer-card strong {
  color: var(--soz-accent);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.answer-card p,
.product-definition {
  color: var(--soz-text);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
}

.answer-card p {
  margin: 0;
}

.product-definition {
  margin: 0;
  padding: 16px 18px;
}

.format-list,
.related-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.format-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
}

.format-card strong {
  color: var(--soz-accent);
  font-size: 1.05rem;
  font-weight: 900;
}

.format-card span {
  color: var(--soz-muted);
  line-height: 1.5;
}

.related-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--soz-border);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--soz-text);
  background: color-mix(in srgb, var(--soz-surface) 90%, transparent);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.related-link:hover,
.related-link:focus-visible {
  border-color: color-mix(in srgb, var(--soz-accent) 50%, var(--soz-border));
  color: var(--soz-accent);
}

.seo-cta-section .answer-card {
  align-items: start;
}

.admin-muted-note {
  margin: 12px 0 0;
  color: var(--soz-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .format-list,
  .related-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .format-list,
  .related-link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .top-controls .language-switch,
  .top-controls .language-menu,
  .top-controls .language-trigger {
    width: 50px;
    min-width: 50px;
    height: 38px;
    min-height: 38px;
    flex-basis: 50px;
  }

  .theme-switch,
  .burger-button,
  .icon-button,
  .account-icon-button,
  .switch-track {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    flex-basis: 38px;
  }

  .app-header .top-controls,
  .top-controls.public-nav {
    gap: 5px;
  }
}

/* Sketch-aligned compact source layout */
.source-stack {
  grid-template-columns: 1fr;
  gap: 10px;
}

.source-stack .source-entry {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  column-gap: 9px;
  min-height: 0;
  border-radius: 14px;
  padding: 10px;
  width: 100%;
  text-align: left;
}

.source-stack .source-entry[data-source-option="youtube"] {
  grid-template-columns: 40px minmax(0, 1fr);
  row-gap: 7px;
  min-height: 0;
}

.source-stack .source-entry[data-source-option="upload"] {
  min-height: 64px;
}

.source-stack .source-entry:focus-visible {
  border-color: var(--soz-accent);
  outline: 3px solid color-mix(in srgb, var(--soz-accent) 18%, transparent);
}

.source-stack .source-entry .source-icon,
.source-stack .upload-picker-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.source-stack .source-entry[data-source-option="youtube"] .source-icon {
  width: 40px;
  height: 40px;
}

.source-stack .source-entry .source-icon svg,
.source-stack .upload-picker-button svg {
  width: 24px;
  height: 24px;
}

.source-entry-copy,
.source-stack .upload-file-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.source-stack .source-entry[data-source-option="youtube"] .source-entry-copy {
  display: contents;
}

.source-stack .source-entry[data-source-option="youtube"] .source-entry-copy > strong {
  grid-column: 2;
}

.source-stack .source-entry[data-source-option="youtube"] .url-row {
  grid-column: 1 / -1;
}

.source-entry-copy strong,
.source-stack .upload-file-copy strong {
  color: var(--soz-text);
  font-size: clamp(0.98rem, 4vw, 1.15rem);
  font-weight: 900;
  line-height: 1.12;
}

.source-stack .upload-file-copy em {
  color: var(--soz-muted);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.source-stack .url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.source-stack .url-row:has(.url-status:not(.hidden)) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.source-stack .url-row input {
  min-height: 40px;
  border-radius: 10px;
  padding-inline: 10px;
}

body[data-app-state="empty"] .source-stack .url-row input {
  min-height: 40px;
  font-size: 0.95rem;
}

.source-stack #upload-file {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  appearance: none;
  white-space: nowrap;
}

body[data-app-state="empty"] .job-form > #submit-button {
  display: none;
}

.landing-source-stack {
  max-width: min(100%, 620px);
  margin-top: 22px;
}

.landing-source-stack .landing-source-card {
  color: var(--soz-text);
  text-decoration: none;
}

.landing-source-stack .landing-url-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
}

.landing-source-stack .landing-url-row input {
  min-width: 0;
  width: 100%;
}

.landing-inline-submit {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--soz-border);
  border-radius: 12px;
  color: white;
  background: var(--soz-accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--soz-accent) 24%, transparent);
  cursor: pointer;
}

.landing-inline-submit svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-source-stack .landing-upload-card {
  align-content: center;
}

@media (max-width: 520px) {
  .source-stack {
    gap: 10px;
  }

  .source-stack .source-entry {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 8px;
    padding: 9px;
  }

  .source-stack .source-entry[data-source-option="youtube"] {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
  }

  .source-stack .source-entry[data-source-option="upload"] {
    min-height: 62px;
  }

  .source-stack .source-entry .source-icon,
  .source-stack .upload-picker-button {
    width: 42px;
    height: 42px;
  }

  .source-stack .source-entry[data-source-option="youtube"] .source-icon {
    width: 38px;
    height: 38px;
  }

  .source-entry-copy strong,
  .source-stack .upload-file-copy strong {
    font-size: 0.98rem;
  }

  .source-stack .url-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-source-stack .landing-url-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .source-stack .url-row:has(.url-status:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 520px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-header,
  .workspace,
  .panel,
  .job-form,
  .source-stack,
  .source-stack .source-entry,
  .source-stack .url-row,
  .source-stack .url-row input {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .app-header .brand {
    flex: 0 1 96px;
    max-width: 96px;
  }

  .app-header .top-controls {
    flex: 0 0 auto;
    max-width: calc(100% - 104px);
  }

  .app-header .top-controls > .language-menu,
  .app-header .top-controls > .chrome-theme-switch,
  .app-header .top-controls > .burger-menu {
    width: 40px;
    min-width: 40px;
    flex: 0 0 40px;
  }

  .app-header .top-controls > .burger-menu {
    display: block;
  }
}

/* Compact project cards. */
.task-card {
  gap: 7px;
  padding: 10px;
}

.task-main {
  gap: 3px;
}

.task-main strong {
  font-size: clamp(0.96rem, 1.1vw, 1.08rem);
  line-height: 1.18;
}

.task-version-summary,
.task-time-summary,
.task-modified-summary {
  font-size: 11px;
  font-weight: 760;
}

.task-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 92px;
  font-size: 10px;
  font-weight: 850;
}

.task-stage-text {
  max-width: min(34vw, 210px);
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-stage-text.ok {
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

.task-stage-text.review {
  color: color-mix(in srgb, var(--soz-gold) 78%, var(--ink));
}

.task-stage-text.error {
  color: color-mix(in srgb, var(--danger) 74%, var(--ink));
}

.mini-track {
  height: 5px;
}

.task-actions,
.task-actions-complete,
.task-actions-review,
.task-actions-transport,
.task-actions-minimal {
  display: grid;
  grid-template-columns: repeat(5, 58px);
  align-items: stretch;
  justify-content: start;
  gap: 6px;
}

.task-actions-review {
  grid-template-columns: repeat(2, 58px);
  justify-content: start;
}

.task-actions-transport {
  grid-template-columns: repeat(3, minmax(50px, 64px));
  justify-content: start;
}

.task-actions-minimal {
  grid-template-columns: 58px;
  justify-content: end;
}

.task-action-tile {
  display: inline-grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px 6px;
  color: var(--ink);
  background: color-mix(in srgb, var(--field) 88%, transparent);
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.task-action-tile svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-action-tile span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-action-tile.is-primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.task-action-tile.danger {
  color: color-mix(in srgb, var(--danger) 74%, var(--muted));
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel-soft));
}

.task-action-tile:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.task-export-menu {
  position: relative;
  min-width: 0;
}

.task-export-menu > summary.task-action-tile {
  list-style: none;
  width: 100%;
  height: 100%;
  color: color-mix(in srgb, var(--soz-gold) 70%, var(--ink));
  border-color: color-mix(in srgb, var(--soz-gold) 28%, var(--line));
  background: color-mix(in srgb, var(--soz-gold-soft) 44%, var(--field));
}

.task-export-menu > summary.task-action-tile::-webkit-details-marker {
  display: none;
}

.task-export-menu[open] > summary.task-action-tile,
.task-export-menu > summary.task-action-tile:hover {
  border-color: color-mix(in srgb, var(--soz-gold) 62%, var(--line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--soz-gold) 18%, transparent);
}

.task-actions .share-status,
.actions .share-status {
  display: none !important;
}

.task-actions > .task-action-tile,
.task-actions > .task-export-menu,
.task-export-menu > summary.task-action-tile {
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.task-actions .trash-button {
  justify-self: stretch;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
  padding: 5px 6px !important;
  border-radius: 14px !important;
  line-height: 1.05;
}

.task-actions .trash-button svg {
  width: 18px !important;
  height: 18px !important;
  flex-basis: auto !important;
}

@media (hover: hover) {
  .task-action-tile:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 13%, transparent);
  }

  .task-action-tile.danger:hover {
    color: color-mix(in srgb, var(--danger) 86%, var(--ink));
    border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
    background: color-mix(in srgb, var(--field) 90%, transparent);
  }
}

.actions {
  grid-template-columns: repeat(5, minmax(54px, 68px));
  justify-content: center;
  justify-items: stretch;
  gap: 6px;
}

.actions .action-button,
.actions .button-link.subtle,
.actions #rerender-button {
  display: inline-grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 54px;
  border-radius: 14px;
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.05;
  text-align: center;
}

.actions .action-button svg,
.actions .button-link.subtle svg,
.actions #rerender-button svg {
  width: 18px;
  height: 18px;
}

.actions .export-menu > summary {
  width: 100%;
}

.actions > .action-button,
.actions > .button-link.subtle,
.actions > .export-menu {
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

.actions .download-action {
  order: 1;
}

.actions .share-action {
  order: 2;
}

.actions #rerender-button {
  order: 3;
}

.actions > .export-menu {
  order: 4;
}

.actions #current-delete-button {
  order: 5;
}

.actions .button-link.danger {
  color: color-mix(in srgb, var(--danger) 78%, var(--ink));
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--field) 88%, transparent) !important;
  box-shadow: none !important;
}

.actions .button-link.danger:hover {
  color: color-mix(in srgb, var(--danger) 86%, var(--ink)) !important;
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line)) !important;
  background: color-mix(in srgb, var(--field) 92%, transparent) !important;
}

@media (max-width: 520px) {
  .task-card {
    padding: 9px;
  }

  .task-meta {
    min-width: 72px;
  }

  .task-stage-text {
    max-width: 142px;
  }

  .task-actions,
  .task-actions-complete {
    grid-template-columns: repeat(5, minmax(48px, 56px));
    justify-content: center;
    justify-items: stretch;
    gap: 5px;
  }

  .task-actions-review {
    grid-template-columns: repeat(2, minmax(52px, 58px));
    justify-content: center;
  }

  .task-action-tile {
    min-height: 44px;
    border-radius: 12px;
    font-size: 0.62rem;
  }

  .task-actions .trash-button {
    min-height: 44px !important;
    border-radius: 12px !important;
  }

  .task-action-tile svg {
    width: 16px;
    height: 16px;
  }

  .task-actions .trash-button svg {
    width: 16px !important;
    height: 16px !important;
  }

  .actions {
    grid-template-columns: repeat(5, minmax(48px, 56px));
    gap: 5px;
  }

  .actions .action-button,
  .actions .button-link.subtle,
  .actions #rerender-button {
    min-height: 48px;
    padding: 5px 4px;
    font-size: 0.6rem;
  }

  .actions .action-button svg,
  .actions .button-link.subtle svg,
  .actions #rerender-button svg {
    width: 16px;
    height: 16px;
  }
}

.task-export-menu > summary.task-action-tile,
.task-export-menu[open] > summary.task-action-tile {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--field) 88%, transparent);
  box-shadow: none;
}

.task-export-menu > summary.task-action-tile:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--field) 92%, transparent);
}

.task-action-tile.danger {
  color: color-mix(in srgb, var(--danger) 78%, var(--ink));
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--field) 88%, transparent) !important;
  box-shadow: none !important;
}

.task-action-tile.danger:hover,
.trash-button:hover {
  color: color-mix(in srgb, var(--danger) 86%, var(--ink)) !important;
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line)) !important;
  background: color-mix(in srgb, var(--field) 92%, transparent) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--danger) 8%, transparent) !important;
}

.language-mark {
  display: none !important;
}

.language-switch,
.language-menu {
  width: auto;
  min-width: 126px;
  flex-basis: auto;
}

.language-trigger {
  justify-content: center;
  gap: 8px;
  padding-inline: 13px;
}

.language-current {
  max-width: 92px;
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 520px) {
  .top-controls .language-switch,
  .top-controls .language-menu,
  .app-header .top-controls > .language-menu {
    width: auto;
    min-width: 104px;
    flex: 0 1 112px;
  }

  .top-controls .language-trigger {
    width: auto;
    min-width: 104px;
    gap: 5px;
    padding-inline: 9px;
  }

  .top-controls .language-current {
    display: inline;
    max-width: 82px;
    font-size: 0.76rem;
  }

  .top-controls .language-current::first-letter,
  .top-controls .language-current::after,
  html[lang="ru"] .top-controls .language-current::after,
  html[lang="en"] .top-controls .language-current::after {
    content: none !important;
    font-size: inherit;
  }
}

/* Theme icon refresh: match the simple rounded sun reference without changing toggle behavior. */
.theme-switch .switch-track {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  overflow: visible;
  color: var(--soz-text);
  background: transparent;
}

.theme-switch .switch-track::before,
.theme-switch .switch-track::after {
  display: none !important;
}

.theme-switch .switch-thumb {
  display: none;
}

.theme-icon {
  width: 25px;
  height: 25px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.theme-icon-sun circle {
  fill: transparent;
}

.theme-icon-moon {
  display: none;
  stroke-width: 2.15;
}

.theme-switch input:checked + .switch-track {
  border-color: transparent;
  background: transparent;
}

.theme-switch input:checked + .switch-track .theme-icon-sun {
  display: none;
}

.theme-switch input:checked + .switch-track .theme-icon-moon {
  display: block;
}
