@import url("/themes.css");

@font-face {
  font-family: "Roboto Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 100.06%;
  ascent-override: 92.67%;
  descent-override: 24.41%;
  line-gap-override: 0%;
}

/* Studio fallback until HtmlTheme boot writes html[data-theme]. */
:root {
  color-scheme: dark;
  --bg: #14090a;
  --bg-subtle: rgba(255, 45, 32, 0.06);
  --bg-card: rgba(255, 138, 128, 0.07);
  --border: rgba(255, 138, 128, 0.16);
  --border-glass: rgba(255, 138, 128, 0.2);
  --text: #fff4f2;
  --muted: #e0c4c0;
  --text-muted: #e0c4c0;
  --primary: #ff8f88;
  --primary-hover: #ffb4ae;
  --primary-soft: rgba(255, 45, 32, 0.14);
  --accent: #ff2d20;
  --accent-soft: rgba(255, 45, 32, 0.16);
  --success: #86efac;
  --danger: #ff9b94;
  --grid-line: rgba(255, 45, 32, 0.08);
  --surface: rgba(36, 14, 16, 0.66);
  --surface-strong: rgba(12, 6, 7, 0.94);
  --header-bg: rgba(12, 6, 7, 0.72);
  --header-border: rgba(255, 138, 128, 0.18);
  --nav-hover: rgba(255, 45, 32, 0.16);
  --canvas-veil: rgba(10, 5, 6, 0.78);
  --canvas-hi: #241012;
  --canvas-mid: #14090a;
  --canvas-lo: #080405;
  --orb: rgba(255, 45, 32, 0.28);
  --link-hover: #ffb4ae;
  --primary-btn: #8c1515;
  --on-primary: #fff7f5;
  --primary-btn-hover: #a31818;
  --panel: rgba(255, 138, 128, 0.09);
  --panel-soft: rgba(255, 45, 32, 0.06);
  --panel-input: rgba(255, 45, 32, 0.12);
  --edge: rgba(255, 138, 128, 0.2);
  --spec: rgba(255, 45, 32, 0.18);
  --hairline: rgba(255, 138, 128, 0.16);
  --placeholder: #c4a09c;
  --focus-ring: rgba(255, 143, 136, 0.4);
  --blob-hi: rgba(255, 45, 32, 0.24);
  --blob-mid: rgba(255, 138, 128, 0.14);
  --blob-lo: rgba(140, 21, 21, 0.12);
  --blob-fill: linear-gradient(155deg, rgba(255, 45, 32, 0.16), rgba(20, 9, 10, 0.08));
  --blob-border: rgba(255, 138, 128, 0.18);
  --glass-fill: rgba(36, 14, 16, 0.58);
  --glass-bloom: rgba(255, 45, 32, 0.12);
  --glass-edge-hi: rgba(255, 184, 174, 0.38);
  --glass-inset: rgba(255, 138, 128, 0.2);
  --glass-lift: 0 10px 36px rgba(8, 4, 5, 0.55);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.48), inset 0 1px 1px rgba(255, 45, 32, 0.12);
  --glass-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 143, 136, 0.16);
  --glass-highlight: linear-gradient(145deg, rgba(255, 45, 32, 0.16), rgba(255, 255, 255, 0.02));
  --glass-blur: 42px;
  --glass-saturate: 180%;
  --yt-red: var(--accent);
  --yt-red-hover: var(--primary-btn-hover);
  --fg: var(--text);
  --bg-elev: var(--surface);
  --bg-soft: var(--panel-soft);
  --line: var(--border);
  --accent-dim: var(--primary);
  --on-accent: var(--on-primary);
  --shadow: var(--glass-shadow);
  --glass: var(--header-bg);
  --header-h: 3.75rem;
  --radius: 20px;
  --radius-btn: 14px;
  --copy-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --copy-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M9 12h6M9 16h6'/%3E%3C/svg%3E");
  --copy-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4.2 4.2L19 7'/%3E%3C/svg%3E");
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%230f0f0f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.8 6 6.2 10.5 1.8'/%3E%3C/svg%3E");
  --select-chevron-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%23fff4f2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.8 6 6.2 10.5 1.8'/%3E%3C/svg%3E");
  --font: "Roboto", "Roboto Fallback", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: var(--font);
  --sans: var(--font);
  --max: 1180px;
  --page-pad: max(1rem, env(safe-area-inset-left, 0px));
  --page-pad-end: max(1rem, env(safe-area-inset-right, 0px));
  --liquid-a: 58% 42% 32% 68% / 58% 38% 62% 42%;
  --liquid-b: 42% 58% 68% 32% / 48% 62% 38% 52%;
}

html[data-theme] {
  --fg: var(--text);
  --bg-elev: var(--surface);
  --bg-soft: var(--panel-soft);
  --line: var(--border);
  --accent-dim: var(--primary);
  --on-accent: var(--on-primary);
  --yt-red: var(--accent);
  --yt-red-hover: var(--primary-btn-hover);
  --shadow: var(--glass-shadow);
  --glass: var(--header-bg);
}

html[data-theme="paper"],
html[data-theme="slate"] {
  --danger: #9f1239;
}

html[data-theme="studio"],
html[data-theme="midnight"],
html[data-theme="ember"],
html[data-theme="aurora"],
html[data-theme="forest"] {
  --danger: #ff9b94;
}

@media (prefers-contrast: more) {
  :root,
  html[data-theme] {
    --muted: var(--text);
    --text-muted: var(--text);
    --placeholder: var(--text);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvb;
  font-family: var(--font);
  font-size: clamp(0.95rem, 0.25vw + 0.92rem, 1.05rem);
  font-size-adjust: 0.528;
  line-height: 1.5;
  color: var(--text);
  accent-color: var(--primary);
  background: var(--bg);
  position: relative;
  isolation: isolate;
}

input, textarea, select { color: var(--text); color-scheme: inherit; font: inherit; }
::placeholder { color: var(--placeholder); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(var(--canvas-veil), var(--canvas-veil)),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(ellipse 90% 70% at 8% -15%, var(--orb), transparent 55%),
    radial-gradient(ellipse 70% 55% at 95% 5%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 105%, color-mix(in srgb, var(--bg-card) 80%, transparent), transparent 55%),
    linear-gradient(168deg, var(--canvas-hi) 0%, var(--canvas-mid) 45%, var(--canvas-lo) 100%);
  background-size: auto, 48px 48px, 48px 48px, auto, auto, auto, auto;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  width: min(42vw, 480px);
  height: min(42vw, 480px);
  top: -18%;
  right: -12%;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb) 0%, transparent 68%);
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  animation: liquid-float 22s ease-in-out infinite alternate;
}

@keyframes liquid-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 5%) scale(1.05); }
}

@keyframes liquid-morph {
  0%, 100% { border-radius: 58% 42% 32% 68% / 58% 38% 62% 42%; }
  33% { border-radius: 42% 58% 68% 32% / 48% 62% 38% 52%; }
  66% { border-radius: 52% 48% 38% 62% / 42% 58% 48% 52%; }
}

img {
  max-inline-size: 100%;
  height: auto;
}

code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.app {
  min-height: 100dvb;
  display: flex;
  flex-direction: column;
}

[data-r-vt] {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.liquid-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.liquid-blob {
  position: absolute;
  border-radius: var(--liquid-a);
  background:
    radial-gradient(circle at 32% 24%, var(--blob-hi) 0%, transparent 38%),
    radial-gradient(circle at 78% 82%, var(--blob-mid) 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, var(--blob-lo) 0%, transparent 55%),
    var(--blob-fill);
  border: 1px solid var(--blob-border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  animation: liquid-morph 26s ease-in-out infinite alternate;
}
.liquid-blob-a {
  width: min(38vw, 420px);
  height: min(32vw, 360px);
  top: 8%;
  right: 6%;
  opacity: 0.72;
}
.liquid-blob-b {
  width: min(22vw, 240px);
  height: min(28vw, 300px);
  bottom: 12%;
  left: 4%;
  opacity: 0.55;
  border-radius: var(--liquid-b);
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}
.liquid-blob-c {
  width: min(28vw, 320px);
  height: min(24vw, 280px);
  top: 42%;
  right: 18%;
  opacity: 0.4;
  animation-duration: 34s;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  view-transition-name: site-header;
  container-type: scroll-state;
  container-name: site-header;
  background: var(--header-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 1px solid var(--header-border);
  box-shadow: inset 0 1px 0 var(--glass-inset);
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-edge-hi), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem var(--page-pad-end) 0.55rem var(--page-pad);
  padding-top: max(0.55rem, env(safe-area-inset-top, 0px));
  width: 100%;
  position: relative;
}

.brand.is-active { color: var(--link-hover); }

.header-inner::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 55%, var(--line));
  opacity: 0;
  transition: opacity 180ms ease;
}

@container site-header scroll-state(stuck: top) {
  .header-inner::after {
    opacity: 1;
  }
}

.nav-progress {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0.2);
  opacity: 0;
  pointer-events: none;
}

html.is-navigating .nav-progress {
  opacity: 1;
  animation: ytt-progress 0.9s ease-in-out infinite;
}

@keyframes ytt-progress {
  0% { transform: scaleX(0.18); opacity: 0.35; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0.18); opacity: 0.35; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 10px;
  background: var(--primary-btn);
  color: var(--on-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  box-shadow: inset 0 1px 0 var(--glass-inset);
}

.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  letter-spacing: -0.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main,
.workspace-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad-end) 3rem var(--page-pad);
  min-width: 0;
}

.home-page {
  position: relative;
  container: home / inline-size;
}

.workspace-main {
  container: workspace / inline-size;
  max-width: min(92rem, 100%);
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 1.35rem 0 0.5rem;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  color: var(--text);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 2.65rem);
  line-height: 1.15;
  max-width: 22ch;
}

.hero-lead {
  margin: 0.7rem 0 1.15rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  margin-block-start: -0.15rem;
  margin-inline-start: calc(var(--page-pad) * -1);
  margin-inline-end: calc(var(--page-pad-end) * -1);
  padding: 1.25rem var(--page-pad-end) 0.25rem var(--page-pad);
  border-bottom: 1px solid var(--edge);
}
.hero-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 88% 18%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 35% at 12% 85%, color-mix(in srgb, var(--canvas-hi) 70%, transparent), transparent 70%);
}
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
}
.hero-particles-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-wrap .hero { position: relative; z-index: 1; }

.hero-form {
  position: relative;
  background: var(--glass-fill);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.05rem;
  box-shadow: var(--glass-shadow);
  width: 100%;
  max-width: none;
  backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturate));
}
.hero-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-edge-hi), transparent);
}

.hero-form.is-busy {
  opacity: 0.86;
  pointer-events: none;
}

.hero-form.is-busy .btn-primary {
  cursor: progress;
}

.hp-field {
  position: absolute !important;
  left: -10000px;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.another-form .hp-field label,
.another-form .hp-field input,
.hero-form .hp-field input {
  min-height: 0 !important;
  width: 1px !important;
}

.hero-label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 500;
}

.hero-field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-field input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 3rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-input);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hero-field input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hero-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
  margin-top: 0.7rem;
}

.hero-dl + .hero-dl {
  margin-top: 0.55rem;
}

.hero-dl .btn {
  flex: 1 1 9.5rem;
  justify-content: center;
}

.hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-error {
  color: var(--danger);
  font-weight: 600;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.rescue {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.rescue h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.35rem;
}

.steps {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.steps li {
  margin: 0.4rem 0;
}

.recents {
  margin-top: 1rem;
}

.recents p {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.recents ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.recents a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease;
}

.recents a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  padding: 0.72rem 1.15rem;
  min-height: 2.75rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--fg);
  touch-action: manipulation;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn.is-busy {
  cursor: progress;
  pointer-events: none;
  opacity: 0.92;
}

.btn .btn-spinner {
  display: none;
  width: 1.05em;
  height: 1.05em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  flex-shrink: 0;
}

.btn.is-busy .btn-spinner,
.btn[aria-busy="true"] .btn-spinner {
  display: inline-block;
  animation: ytt-spin 0.65s linear infinite;
}

@keyframes ytt-spin {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-busy .btn-spinner,
  .btn[aria-busy="true"] .btn-spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.55;
  }
  body::after,
  .liquid-blob {
    animation: none;
  }
  .hero-particles { display: none; }
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-btn);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
}

.media-dl {
  display: grid;
  gap: 0.7rem;
  margin: 0.85rem 0 0.4rem;
}

.media-dl > .btn-primary {
  width: 100%;
  justify-content: center;
}

.media-dl-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  min-width: 0;
}

.media-dl-row .btn {
  flex: 1 1 auto;
  justify-content: center;
  white-space: nowrap;
}

.media-dl-qwrap {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.5rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem 0 1.1rem;
  border-radius: var(--radius-btn);
  background: var(--bg-soft);
  cursor: pointer;
}

.media-dl-qwrap:hover {
  background: color-mix(in srgb, var(--fg) 8%, var(--bg-soft));
}

.media-dl-qwrap > span {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1;
}

.media-dl-q {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 7.25rem;
  min-width: 7.25rem;
  height: 1.5rem;
  min-height: 0;
  margin: 0;
  padding: 0 1.85rem 0 0.2rem;
  border: 0;
  overflow: visible;
  background-color: transparent;
  background-image: light-dark(var(--select-chevron), var(--select-chevron-dark));
  background-repeat: no-repeat;
  background-position: right 0.15rem center;
  background-size: 0.7rem;
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5rem;
  cursor: pointer;
  field-sizing: content;
}

@supports (appearance: base-select) {
  .media-dl-q,
  .media-dl-q::picker(select) {
    appearance: base-select;
  }

  .media-dl-q {
    background-image: none;
    padding-right: 1.85rem;
    min-width: 7.25rem;
    width: 7.25rem;
    height: auto;
    line-height: 1;
  }

  .media-dl-q::picker-icon {
    color: var(--muted);
    align-self: center;
  }

  .media-dl-q::picker(select) {
    margin-top: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-elev);
    color: var(--fg);
    box-shadow: var(--shadow);
  }

  .media-dl-q option {
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-weight: 550;
  }

  .media-dl-q option:is(:hover, :focus, :checked) {
    background: var(--bg-soft);
  }
}

.dl-dialog {
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-height: min(90vh, 40rem);
  overflow: auto;
  padding: 1.15rem 1.15rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.dl-dialog::backdrop {
  background: rgb(12 12 14 / 0.55);
  backdrop-filter: blur(6px);
}

.dl-dialog h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.dl-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.dl-dialog .ad-slot {
  margin: 0.95rem 0 0.85rem;
}

.dl-dialog .ad-slot-rectangle {
  max-width: 300px;
}

.dl-dialog .ad-slot-rectangle .ad-slot-frame {
  min-height: 250px;
  min-width: 250px;
}

.dl-dialog form {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.btn-secondary,
.btn-ghost {
  background: var(--bg-soft);
  border-color: transparent;
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: color-mix(in srgb, var(--fg) 8%, var(--bg-soft));
}

.features {
  padding: 0.75rem 0 2rem;
}

.feature-grid {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem;
}

.feature-grid li {
  background: var(--glass-fill);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  min-width: 0;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturate));
}

.feature-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
}

.content-section {
  padding: 1.5rem 0 3rem;
  min-width: 0;
}

.site-footer {
  view-transition-name: site-footer;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad-end) max(1.5rem, env(safe-area-inset-bottom, 0px)) var(--page-pad);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.15rem;
  margin: 0 0 0.75rem;
}

.seo-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.seo-links a:hover,
.seo-links a.is-active {
  text-decoration: underline;
  color: var(--link-hover);
}

.sister-apps-links {
  margin: 0 0 0.65rem;
  padding: 0;
}

.sister-apps-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.sister-apps-links a:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "player"
    "transcript";
  gap: 1.15rem;
  align-items: start;
  padding-top: 0.6rem;
}

.workspace > script {
  display: none;
}

.player-col {
  grid-area: player;
}

.transcript-col {
  grid-area: transcript;
}

.player-col,
.transcript-col {
  min-width: 0;
}

.player-col {
  position: static;
}

.player-card,
.transcript-col {
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.player-facade {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f0f;
  aspect-ratio: 16 / 9;
}

.player-facade img,
.player-facade iframe,
#yt-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.player-facade iframe {
  position: absolute;
  inset: 0;
}

.play-hit {
  appearance: none;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  position: relative;
  background: #0f0f0f;
}

.play-hit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgb(0 0 0 / 0.45));
  pointer-events: none;
}

.play-badge {
  position: absolute;
  inset: auto auto 0.8rem 0.8rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 1;
}

.vid-title {
  margin: 0.85rem 0 0.25rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.3;
}

.vid-meta,
.vid-stats {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.chapters {
  margin-top: 0.8rem;
}

.chapters p {
  margin: 0 0 0.3rem;
  font-weight: 700;
}

.chapters ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
}

.chapters a {
  display: flex;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  min-width: 0;
}

.chapters a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chapters time {
  color: var(--accent-dim);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: end;
  margin-bottom: 0.7rem;
}

.toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  min-width: 0;
}

.toolbar label.grow {
  flex: 1 1 12rem;
}

.toolbar-lang {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  background: color-mix(in srgb, var(--bg-elev) 96%, transparent);
  padding: 0.15rem 0 0.55rem;
  margin-bottom: 0.55rem;
}

.toolbar-lang label {
  flex: 1 1 10rem;
}

.toolbar-lang [data-apply] {
  flex: 0 0 auto;
  align-self: end;
}

.toolbar-lang .apply-status {
  flex: 1 1 100%;
  margin: 0.2rem 0 0;
  min-height: 1.2rem;
}

.toolbar input,
.toolbar select {
  font: inherit;
  font-size: 1rem;
  min-height: 2.6rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-input);
  color: var(--text);
}

.toolbar input[type="number"] {
  width: 6.5rem;
  max-width: 100%;
}

.check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem !important;
}

.tool-group {
  border: 0;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0 0;
  min-inline-size: 0;
  border-block-start: 1px solid var(--line);
}

.tool-group legend {
  padding: 0 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.tool-group .toolbar {
  margin-bottom: 0.5rem;
}

.tool-group .toolbar:last-child {
  margin-bottom: 0;
}

.trim-chips,
.toolbar-exports,
.prompts,
.toolbar-copy-more {
  align-items: center;
}

.toolbar-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: stretch;
  margin: 0.15rem 0 0.7rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-soft));
}

.toolbar-copy-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-copy-more .check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-soft);
  border-radius: var(--radius-btn);
  cursor: pointer;
}

.btn-copy {
  --copy-mask: var(--copy-icon);
  position: relative;
  isolation: isolate;
  overflow: visible;
  flex: 1 1 auto;
  width: 100%;
  min-height: 3.35rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-inline: 1.4rem;
  white-space: nowrap;
  box-shadow:
    0 1px 0 color-mix(in srgb, #000 18%, transparent),
    0 8px 22px color-mix(in srgb, var(--accent) 32%, transparent);
}

.btn-copy-icon {
  flex: 0 0 auto;
  width: 1.2em;
  height: 1.2em;
  background: currentColor;
  -webkit-mask: var(--copy-mask) center / contain no-repeat;
  mask: var(--copy-mask) center / contain no-repeat;
}

.btn-copy-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-accent);
  pointer-events: none;
  opacity: 0;
}

.btn-copy:hover {
  background: var(--yt-red-hover);
  box-shadow:
    0 1px 0 color-mix(in srgb, #000 18%, transparent),
    0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent);
}

.btn-copy:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 1px 6px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn-copy[data-copied="1"] {
  --copy-mask: var(--copy-check);
  background: #16a34a;
  box-shadow:
    0 1px 0 color-mix(in srgb, #000 18%, transparent),
    0 8px 22px color-mix(in srgb, #16a34a 38%, transparent);
}

.btn-copy[data-copied="1"]:hover {
  background: #15803d;
  box-shadow:
    0 1px 0 color-mix(in srgb, #000 18%, transparent),
    0 10px 26px color-mix(in srgb, #16a34a 42%, transparent);
}

.copy-status {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--fg);
}

.toolbar-actions .btn,
.toolbar-copy .btn-ghost,
.toolbar-exports .btn,
.prompts .btn,
.trim-chips .btn {
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
}

.match-count {
  font-size: 0.85rem;
  color: var(--muted);
  align-self: center;
}

.cues {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow: auto;
  content-visibility: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.35rem;
}

.cue {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.45rem 0.35rem;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 0 2.6rem;
}

.cue time {
  color: var(--accent-dim);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

[data-cue-text] {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cue:hover,
.cue.is-hit {
  background: var(--accent-soft);
}

.cue.is-current {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-elev));
  box-shadow: inset 3px 0 0 var(--accent);
}

.code-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  max-width: 100%;
  font-size: 0.92rem;
  -webkit-overflow-scrolling: touch;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.4rem;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.api-table th,
.api-table td {
  text-align: start;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 861px) {
  .workspace {
    grid-template-columns: minmax(18rem, 0.95fr) minmax(24rem, 1.35fr);
    grid-template-areas:
      "player transcript";
  }

  .player-col {
    position: sticky;
    top: calc(var(--header-h) + 0.65rem);
  }

  .cues {
    max-height: min(72vh, 52rem);
  }
}

@container workspace (min-width: 52rem) {
  .workspace {
    grid-template-columns: minmax(18rem, 0.95fr) minmax(24rem, 1.35fr);
    grid-template-areas:
      "player transcript";
  }

  .player-col {
    position: sticky;
    top: calc(var(--header-h) + 0.65rem);
  }

  .cues {
    max-height: min(72vh, 52rem);
  }
}

@media (max-height: 40rem) {
  .player-col {
    position: static;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timing-function: linear(0, 1)) {
    :root {
      --copy-spring: linear(0, 0.06, 0.22, 1.18, 0.92, 1.05, 0.985, 1);
    }
  }

  .btn-copy:hover:not(:active) {
    transform: translateY(-1px);
  }

  .btn-copy.is-press {
    animation: copy-pop 0.7s var(--copy-spring);
  }

  .btn-copy.is-press .btn-copy-burst {
    animation: copy-burst 0.7s ease-out forwards;
  }

  .btn-copy[data-copied="1"] .btn-copy-icon {
    animation: copy-icon-pop 0.45s var(--copy-spring);
  }

  ::view-transition-old(root) {
    animation: ytt-vt-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
  }

  ::view-transition-new(root) {
    animation: ytt-vt-in 320ms cubic-bezier(0, 0, 0.2, 1) both;
  }

  .feature-grid li {
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  .feature-grid li:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    box-shadow: var(--shadow);
  }
}

@keyframes ytt-vt-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes ytt-vt-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes copy-pop {
  0% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes copy-icon-pop {
  0% { transform: scale(0.4) rotate(-12deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes copy-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.35);
    box-shadow:
      0 0 0 0 #fff,
      0 0 0 0 #fff,
      0 0 0 0 #fff,
      0 0 0 0 #fff;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      22px -28px 0 1px #fff,
      -20px -22px 0 0 #fff,
      28px 8px 0 1px #fff,
      -26px 12px 0 0 #fff,
      8px 28px 0 1px #ffe08a,
      -12px -30px 0 0 #ffe08a,
      20px 22px 0 0 #fff,
      -22px 20px 0 1px #fff;
  }
}

::view-transition-group(site-header),
::view-transition-group(site-footer) {
  animation: none;
}

.skeleton-stack {
  display: grid;
  gap: 0.7rem;
  max-width: 36rem;
  margin-top: 1.4rem;
}

.skeleton-block {
  height: 9rem;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    var(--bg-soft) 0%,
    color-mix(in srgb, var(--bg-elev) 70%, var(--accent-soft)) 45%,
    var(--bg-soft) 100%
  );
  background-size: 200% 100%;
  animation: ytt-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 0.85rem;
  border-radius: 999px;
  background: var(--bg-soft);
  animation: ytt-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-50 { width: 50%; }

@keyframes ytt-shimmer {
  from { background-position: 100% 0; opacity: 0.7; }
  to { background-position: -100% 0; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .btn-copy,
  .btn-copy:hover,
  .btn-copy:active {
    transform: none;
    animation: none;
    transition: background 160ms ease, box-shadow 160ms ease;
  }

  .skeleton-block,
  .skeleton-line,
  html.is-navigating .nav-progress {
    animation: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

.howto,
.faq {
  padding: 0.75rem 0 1.75rem;
}

.howto h2,
.faq h2,
.features h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  margin: 0;
}

.howto-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  counter-reset: ytt-step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem;
}

.howto-grid li {
  counter-increment: ytt-step;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.45rem;
  background: var(--glass-fill);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  min-width: 0;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturate));
}

.howto-grid h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.08rem;
}

.howto-grid h3::before {
  content: counter(ytt-step);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--primary-btn);
  color: var(--on-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.howto-grid p,
.faq p {
  margin: 0;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.faq details {
  background: var(--glass-fill);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 0.15rem 1rem 0.15rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturate));
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 0;
  list-style: none;
  text-wrap: pretty;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--primary);
}

.ad-slot {
  width: 100%;
  margin: 0.85rem auto;
  display: grid;
  place-items: center;
}

.ad-slot-frame {
  width: 100%;
  border: 1px dashed color-mix(in srgb, var(--line) 80%, var(--accent) 20%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-slot-leaderboard .ad-slot-frame {
  min-height: 90px;
}

.ad-slot-rectangle {
  max-width: 336px;
  margin-inline: auto;
}

.ad-slot-rectangle .ad-slot-frame {
  min-height: 250px;
}

.ad-slot-infeed .ad-slot-frame {
  min-height: 90px;
}

.ad-slot.is-live .ad-slot-frame {
  border-style: solid;
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
}

.ad-slot.is-live .ad-slot-label {
  display: none;
}

.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: inherit;
}

.ad-rail {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.5rem var(--page-pad-end) 0 var(--page-pad);
}

.ad-rail-end {
  padding: 0.5rem var(--page-pad-end) max(1.25rem, env(safe-area-inset-bottom, 0px)) var(--page-pad);
}

.ad-rail .ad-slot {
  margin: 0;
}

.trim-chips .btn.is-on,
[data-edit].is-on,
[data-pick-range].is-on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent-dim);
}

#ytt-ws[data-ready="1"] [data-apply] {
  display: inline-flex;
}

.another-form {
  position: relative;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.another-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.another-form .hero-field {
  margin-top: 0.35rem;
}

.another-form input {
  flex: 1 1 10rem;
  min-width: 0;
  min-height: 2.6rem;
  font: inherit;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
}

.cue.is-range-start,
.cue.is-range-end {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.is-editing [data-cue-text] {
  border-radius: 6px;
  outline: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 0.05rem 0.2rem;
  cursor: text;
}

.is-editing [data-cue-text]:focus {
  outline: 2px solid var(--accent);
}

@media (max-width: 640px) {
  :root {
    --header-h: 6.25rem;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.75rem;
  }

  .nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    padding-inline: 0.6rem;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-form {
    padding: 0.9rem;
  }

  .hero-field {
    flex-direction: column;
  }

  .hero-field input,
  .hero-field .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .hero-dl .media-dl-qwrap,
  .hero-dl .btn {
    flex: 1 1 100%;
  }

  .player-card,
  .transcript-col {
    padding: 0.7rem;
  }

  .toolbar input[type="number"] {
    width: 100%;
  }

  .trim-chips .btn,
  .toolbar-copy .btn-ghost,
  .toolbar-exports .btn,
  .prompts .btn {
    flex: 1 1 auto;
  }

  .btn-copy {
    width: 100%;
  }

  .toolbar-copy-more {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-copy-more .check {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (min-width: 720px) {
  .toolbar-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .toolbar-copy-more {
    flex-wrap: nowrap;
  }
}

@media (max-width: 420px) {
  .cue {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .cue time {
    font-size: 0.8rem;
  }

  .ad-slot-leaderboard .ad-slot-frame {
    min-height: 50px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .player-col,
  .toolbar,
  .prompts,
  .ad-slot,
  .another-form,
  .trim-chips,
  .tool-group,
  .toolbar-copy,
  .copy-status {
    display: none !important;
  }

  .cues {
    max-height: none;
    overflow: visible;
  }

  .transcript-col {
    box-shadow: none;
    border: 0;
  }
}

.workspace.is-mode-srt [data-dl="srt"],
.workspace.is-mode-audio [data-audio],
.workspace.is-mode-audio [data-video],
.workspace.is-mode-translate [data-tlang-select] {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.workspace:not(.is-mode-summary) .recap {
  display: none;
}

.family-grid,
.related-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.family-card,
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  background: var(--glass-fill);
  box-shadow: var(--glass-shadow);
  text-decoration: none;
  color: var(--text);
  min-height: 5.5rem;
  cursor: pointer;
  appearance: none;
  backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturate));
  font: inherit;
  text-align: start;
  width: 100%;
  box-sizing: border-box;
}

.family-card:hover,
.related-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.family-card h3,
.related-card strong {
  margin: 0;
  font-size: 1.05rem;
}

.family-card p,
.related-card span {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.mode-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-block: 0.15rem;
}

.mode-tab {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-btn);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  flex: 0 0 auto;
}

.mode-tab.is-active {
  color: var(--accent-dim);
  background: var(--accent-soft);
}

.app-shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad-end) 3rem var(--page-pad);
}

.cross-sell,
.sister-apps {
  margin: 2rem 0 1rem;
}

.sister-apps .eyebrow {
  margin-bottom: 0.35rem;
}

.sister-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.recap {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.recap-body {
  white-space: pre-wrap;
  font: inherit;
  margin: 0.5rem 0 0;
}

.limits {
  padding-top: 0.5rem;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.recap,
.sister-card,
.rescue,
.player-card,
.transcript-col {
  background: var(--glass-fill);
  border-color: var(--border-glass);
  box-shadow: var(--glass-shadow);
}


