.vb-page {
  --font-display: 'Iowan Old Style', 'Charter', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  --vb-bg: oklch(98% 0.004 95);
  --vb-surface: #fff;
  --vb-glass: oklch(100% 0 0 / 0.12);
  --vb-text: oklch(20% 0.018 70);
  --vb-muted: oklch(48% 0.012 70);
  --vb-border: oklch(88% 0.008 95);
  --vb-primary: oklch(50% 0.11 28);
  --vb-primary-soft: oklch(96% 0.018 28);
  --vb-green: oklch(48% 0.11 150);
  --vb-soft-green: oklch(96% 0.018 150);
  --vb-shadow: 0 10px 30px oklch(0% 0 0 / 0.07);
  --bg: var(--vb-bg);
  --surface: var(--vb-surface);
  --fg: var(--vb-text);
  --text: var(--vb-text);
  --muted: var(--vb-muted);
  --border: var(--vb-border);
  --accent: var(--vb-primary);
  --accent-soft: var(--vb-primary-soft);
  --accent-bg: oklch(95% 0.015 28);
  --shadow: var(--vb-shadow);
  --shadow-float: var(--vb-shadow);
  color: var(--vb-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  --vb-page-inline-padding: 24px;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, oklch(98% 0.008 80), var(--vb-bg) 420px), var(--vb-bg);
  margin: -24px;
  overflow-x: clip;
  padding: 0 var(--vb-page-inline-padding) 72px;
}

.vb-page,
.vb-page * {
  box-sizing: border-box;
}

body:has(> .vb-page) {
  margin: 0;
}

body > .vb-page {
  margin: 0;
}

.vb-page.layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  --home-header-height: 61px;
}

.vb-page > main {
  display: block;
}

.vb-page > .layout__header {
  margin-inline: calc(var(--vb-page-inline-padding) * -1);
}

.vb-page.layout > .layout__header {
  border-bottom-color: color-mix(in oklch, var(--vb-border) 72%, transparent);
  background: color-mix(in oklch, var(--vb-bg) 86%, white);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}

/* Legacy static-page nav selectors kept for older cached markup. */
.vb-topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  border-bottom: 1px solid color-mix(in oklch, var(--vb-border) 72%, transparent);
  background: color-mix(in oklch, var(--vb-bg) 74%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}

.vb-topnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px 24px;
}

.vb-topnav__left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.vb-brand,
.vb-nav-primary a,
.vb-mobile-menu__panel a,
.vb-nav-link {
  color: var(--vb-text);
  text-decoration: none;
}

.vb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vb-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.vb-brand span {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.vb-nav-primary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.vb-nav-primary a {
  color: color-mix(in oklch, var(--vb-text) 78%, var(--vb-muted));
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.vb-nav-primary a:hover,
.vb-mobile-menu__panel a:hover {
  color: var(--vb-primary);
  text-decoration: none;
}

.vb-mobile-menu {
  position: relative;
  display: none;
}

.vb-mobile-menu__trigger {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-surface) 88%, transparent);
  color: var(--vb-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.vb-mobile-menu__trigger::-webkit-details-marker {
  display: none;
}

.vb-mobile-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--vb-border);
  border-radius: 12px;
  background: color-mix(in oklch, var(--vb-surface) 94%, transparent);
  box-shadow: var(--vb-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}

.vb-mobile-menu__panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: color-mix(in oklch, var(--vb-text) 78%, var(--vb-muted));
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.vb-mobile-menu__panel a:hover {
  background: var(--vb-primary-soft);
}

.vb-topnav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vb-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-surface) 88%, transparent);
  box-shadow: 0 8px 20px oklch(0% 0 0 / 0.03);
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.vb-brand:hover,
.vb-nav-primary a:hover,
.vb-mobile-menu__panel a:hover,
.vb-nav-link:hover {
  text-decoration: none;
}

.vb-nav-link:hover {
  border-color: color-mix(in oklch, var(--vb-text) 34%, var(--vb-border));
}

.vb-nav-link--primary {
  border-color: var(--vb-primary);
  background: var(--vb-primary);
  color: white;
  box-shadow: none;
}

.vb-nav-link--primary:hover {
  border-color: oklch(44% 0.11 28);
  background: oklch(44% 0.11 28);
  color: white;
}

.vb-page h1,
.vb-page h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.08;
}

.vb-page h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.vb-page h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.vb-page h3,
.vb-page p {
  margin: 0;
}

.vb-hero,
.vb-demo-shell,
.vb-review-block {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.vb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: auto;
  padding: clamp(40px, 6vw, 68px) 0 clamp(28px, 5vw, 56px);
}

.vb-hero__copy {
  display: grid;
  gap: 20px;
}

.vb-hero__copy > p:not(.vb-eyebrow) {
  color: var(--vb-muted);
  font-size: 16px;
  line-height: 1.65;
}

.vb-hero__copy p a {
  color: var(--vb-primary);
  font-weight: 750;
  text-decoration-color: color-mix(in oklch, var(--vb-primary) 42%, transparent);
  text-underline-offset: 3px;
}

.vb-hero__copy p a:hover {
  color: oklch(44% 0.11 28);
}

.vb-hero__visual {
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.vb-hero__visual img {
  width: 100%;
  height: auto;
  display: block;
}

.vb-eyebrow {
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.vb-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vb-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: var(--vb-surface);
  color: var(--vb-muted);
  font-size: 13px;
  font-weight: 650;
}

.vb-primary-cta,
.vb-page main button:not(.layout__tools-trigger):not(.layout__mobile-menu-trigger) {
  min-height: 42px;
  border-radius: 8px;
  font: inherit;
}

.vb-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0 18px;
  border: 1px solid var(--vb-primary);
  background: var(--vb-primary);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.vb-primary-cta:hover {
  text-decoration: none;
  background: oklch(44% 0.11 28);
}

.vb-hero__copy > .vb-primary-cta,
.vb-seo-sections .vb-final-cta .vb-primary-cta {
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.05s;
}

.vb-hero__copy > .vb-primary-cta:active,
.vb-seo-sections .vb-final-cta .vb-primary-cta:active {
  transform: translateY(1px);
}

.vb-primary-cta:disabled,
.vb-page button:disabled,
.vb-page button[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
}

.ytv-tool {
  display: grid;
  width: min(1120px, 100%);
  gap: 34px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 70px) 0 34px;
  font-family: var(--font-body);
}

.ytv-tool__intro,
.ytv-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.ytv-tool__intro h2,
.ytv-panel-heading h2 {
  font-family: var(--font-body);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: 0;
}

.ytv-tool__intro p,
.ytv-tool__intro > span,
.ytv-panel-heading > span,
.ytv-message,
.ytv-video-card span,
.ytv-video-card a,
.ytv-vocab-card p,
.ytv-vocab-card blockquote,
.ytv-transcript p {
  color: var(--vb-muted);
  font-size: 13px;
  line-height: 1.5;
}

.ytv-tool__intro p {
  max-width: 680px;
  margin-top: 8px;
  font-size: 16px;
}

.ytv-tool__intro > span,
.ytv-panel-heading > span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: var(--vb-surface);
}

.ytv-preview,
.ytv-workspace,
.ytv-examples {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid color-mix(in oklch, var(--vb-border) 82%, white);
  border-radius: 12px;
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
}

.ytv-url-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.ytv-url-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--vb-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.ytv-url-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
  color: var(--vb-text);
  font: inherit;
  font-size: 15px;
  text-transform: none;
}

.ytv-url-form .vb-primary-cta {
  min-height: 50px;
  white-space: nowrap;
}

.ytv-message--error {
  color: oklch(45% 0.14 28);
}

.ytv-message--success {
  color: oklch(43% 0.12 148);
}

.ytv-message--warning {
  padding: 10px 12px;
  border: 1px solid color-mix(in oklch, var(--vb-accent) 36%, var(--vb-border));
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-accent-soft) 72%, white);
  color: var(--vb-text);
}

.ytv-import-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  margin-inline: auto;
  padding: 10px 14px;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 30%, var(--vb-border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-primary-soft) 72%, white);
  color: var(--vb-primary);
  font-size: 13px;
  font-weight: 750;
}

.ytv-import-status div {
  display: flex;
  gap: 4px;
}

.ytv-import-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.ytv-video-card {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.ytv-video-card img,
.ytv-example img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: var(--vb-primary-soft);
}

.ytv-video-player {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: var(--vb-primary-soft);
}

.ytv-video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ytv-video-card__meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ytv-video-card strong {
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ytv-video-card a {
  color: var(--vb-primary);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ytv-vocab-grid,
.ytv-example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ytv-vocab-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-bg) 54%, white);
}

.ytv-vocab-card__details[hidden] {
  display: none;
}

.ytv-vocab-card .ytv-vocab-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ytv-vocab-card .ytv-vocab-card__actions button {
  width: auto;
}

.ytv-explain-popover {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 12px;
  max-width: calc(100vw - 32px);
  max-height: min(520px, calc(100vh - 32px));
  padding: 16px;
  overflow: auto;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 36%, var(--vb-border));
  border-radius: 8px;
  background: var(--vb-bg, #fffaf5);
  box-shadow: 0 20px 52px rgba(41, 33, 27, 0.18);
  color: var(--vb-text, #211b16);
  font-family: var(
    --font-body,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif
  );
}

.ytv-explain-popover[hidden] {
  display: none;
}

.ytv-explain-popover__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.ytv-explain-popover__header > div,
.ytv-explain-popover__body {
  display: grid;
  gap: 8px;
}

.ytv-explain-popover span {
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
}

.ytv-explain-popover h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ytv-explain-popover p {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--vb-muted);
  font-size: 14px;
  line-height: 1.45;
}

.ytv-explain-popover p strong {
  color: var(--vb-text);
}

.ytv-explain-popover small {
  color: var(--vb-muted);
  font-size: 12px;
  font-weight: 700;
}

.ytv-explain-popover button {
  justify-self: start;
  min-height: 36px;
  padding-inline: 14px;
  border: 1px solid var(--vb-primary);
  border-radius: 8px;
  background: var(--vb-primary);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.ytv-explain-popover button.ytv-explain-popover__close {
  min-width: 36px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--vb-primary);
}

.ytv-vocab-card span {
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
}

.ytv-vocab-card h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 750;
}

.ytv-vocab-card blockquote {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--vb-primary-soft);
}

.ytv-vocab-card small {
  color: var(--vb-muted);
  font-size: 12px;
  font-weight: 700;
}

.ytv-vocab-card button {
  justify-self: start;
  min-height: 36px;
  padding-inline: 14px;
  border: 1px solid var(--vb-primary);
  border-radius: 8px;
  background: var(--vb-primary);
  color: white;
  font-weight: 750;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.05s;
}

.ytv-vocab-card button:hover:not(:disabled) {
  border-color: oklch(44% 0.11 28);
  background: oklch(44% 0.11 28);
  box-shadow: 0 8px 18px color-mix(in oklch, var(--vb-primary) 16%, transparent);
}

.ytv-vocab-card button:active:not(:disabled) {
  transform: translateY(1px);
}

.ytv-vocab-card button:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--vb-primary) 36%, transparent);
  outline-offset: 2px;
}

.ytv-vocab-card button:disabled {
  border-color: color-mix(in oklch, var(--vb-primary) 28%, var(--vb-border));
  background: color-mix(in oklch, var(--vb-primary-soft) 72%, white);
  color: var(--vb-primary);
}

.ytv-workspace__top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
}

.ytv-preview .ytv-video-card,
.ytv-workspace .ytv-video-card {
  grid-template-columns: 1fr;
  align-self: start;
}

.ytv-workspace .ytv-panel-heading h2 {
  font-size: clamp(24px, 2.6vw, 32px);
}

.ytv-workspace-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 12px;
  color: var(--vb-text-muted);
  font-size: 13px;
}

.ytv-workspace-status span {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  overflow-wrap: anywhere;
}

.ytv-workspace-status span:nth-child(2) {
  max-width: min(520px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ytv-transcript {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--vb-border);
  border-radius: 10px;
  background: color-mix(in oklch, var(--vb-bg) 54%, white);
}

.ytv-transcript-column {
  position: relative;
  min-width: 0;
}

.ytv-transcript__body {
  display: grid;
  max-height: 360px;
  gap: 10px;
  overflow: auto;
  padding-right: 6px;
}

.ytv-transcript p {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  outline: none;
}

.ytv-transcript a {
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
}

.ytv-transcript__line--active,
.ytv-transcript p:focus {
  background: color-mix(in oklch, var(--vb-primary-soft) 62%, white);
}

.ytv-selection-popover,
.ytv-saved-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-bg) 62%, white);
}

.ytv-selection-popover {
  position: absolute;
  top: 0;
  right: auto;
  left: 0;
  z-index: 5;
  max-height: min(420px, calc(100vh - 160px));
  overflow: auto;
  margin-top: 0;
  transform: translateY(calc(-100% - 6px));
  gap: 14px;
  padding: 16px;
  border-color: color-mix(in oklch, var(--vb-primary) 18%, var(--vb-border));
  border-radius: 12px;
  background: var(--vb-surface);
  box-shadow: 0 18px 42px color-mix(in oklch, var(--vb-text) 12%, transparent);
}

.ytv-selection-popover.selection-toolbar {
  --primary: var(--vb-primary);
  --primary-soft: var(--vb-primary-soft);
  --surface: var(--vb-surface);
  --panel: color-mix(in oklch, var(--vb-bg) 55%, white);
  --soft: color-mix(in oklch, var(--vb-bg) 62%, white);
  --border: var(--vb-border);
  --text: var(--vb-text);
  --muted: var(--vb-muted);
  --control-sm-h: 34px;
  --control-sm-px: 12px;
  --control-sm-font-size: 13px;
  --radius-control: 8px;
  display: block;
  gap: 0;
  width: min(580px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  left: 0;
  right: auto;
  padding: 0;
  color: var(--text);
}

.ytv-selection-popover .selection-toolbar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.ytv-selection-popover .selection-toolbar__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ytv-selection-popover .selection-toolbar__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.ytv-selection-popover .selection-toolbar__icon svg,
.ytv-selection-popover .selection-toolbar__close-button svg,
.ytv-selection-popover .selection-toolbar__pronunciation-button svg,
.ytv-selection-popover .selection-toolbar__save-button svg,
.ytv-selection-popover .selection-toolbar__copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ytv-selection-popover .selection-toolbar__title,
.ytv-selection-popover .selection-toolbar__subtitle {
  display: block;
}

.ytv-selection-popover .selection-toolbar__title {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}

.ytv-selection-popover .selection-toolbar__subtitle {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ytv-selection-popover .selection-toolbar__header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  max-width: min(340px, 58%);
}

.ytv-selection-popover .selection-toolbar__close-button,
.ytv-selection-popover .selection-toolbar__pronunciation-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.ytv-selection-popover .selection-toolbar__save-button,
.ytv-selection-popover .selection-toolbar__copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.ytv-selection-popover .selection-toolbar__save-button {
  min-width: 124px;
}

.ytv-selection-popover .selection-toolbar__copy-button {
  min-width: 84px;
}

.ytv-selection-popover .selection-toolbar__close-button:hover,
.ytv-selection-popover .selection-toolbar__pronunciation-button:hover,
.ytv-selection-popover .selection-toolbar__save-button:hover,
.ytv-selection-popover .selection-toolbar__copy-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ytv-selection-popover .selection-toolbar__panel {
  display: grid;
  gap: 14px;
  max-height: min(32vh, 220px);
  overflow: auto;
  padding: 18px 20px;
}

.ytv-selection-popover .selection-toolbar__lang-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.ytv-selection-popover .selection-toolbar__text-block {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.ytv-selection-popover .selection-toolbar__lang-badge {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.ytv-selection-popover .selection-toolbar__lang-badge--target {
  border-color: transparent;
  background: color-mix(in oklch, var(--primary-soft) 64%, white);
  color: var(--primary);
}

.ytv-selection-popover .selection-toolbar__text {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
}

.ytv-selection-popover .selection-toolbar__text--source {
  font-size: 18px;
  font-weight: 750;
  overflow-wrap: normal;
  white-space: normal;
  word-break: keep-all;
}

.ytv-selection-popover .selection-toolbar__text--target {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 1.55em;
}

.ytv-selection-popover .selection-toolbar__lexical-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ytv-selection-popover .selection-toolbar__phonetic {
  font-family: var(--font-body);
}

.ytv-selection-popover .selection-toolbar__part-of-speech {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-transform: lowercase;
}

.ytv-selection-popover .selection-toolbar__context {
  display: grid;
  gap: 4px;
  margin: 0 20px 16px 64px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  min-width: 0;
  max-width: calc(100% - 84px);
}

.ytv-selection-popover .selection-toolbar__context span {
  display: inline;
  color: var(--muted);
  font-weight: 700;
}

.ytv-selection-popover .selection-toolbar__context p {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  color: var(--muted);
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
}

.ytv-selection-popover .selection-toolbar__divider {
  height: 1px;
  margin: 0 20px;
  background: var(--border);
}

.ytv-selection-popover .selection-toolbar__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 20px 14px;
}

.ytv-selection-popover .selection-toolbar__target-lang-control {
  flex: 0 0 auto;
}

.ytv-selection-popover .selection-toolbar__target-lang-select {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.ytv-selection-popover__header,
.ytv-selection-popover__footer,
.ytv-saved-item,
.ytv-saved-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ytv-selection-popover__header span,
.ytv-selection-popover__actions span,
.ytv-selection-popover__meta dt {
  color: var(--vb-muted);
  font-size: 12px;
  font-weight: 700;
}

.ytv-selection-popover__header > div {
  display: grid;
  gap: 5px;
}

.ytv-selection-popover__header strong {
  color: var(--vb-text);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.15;
}

.ytv-selection-popover__header > span {
  align-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-primary-soft) 55%, white);
  color: var(--vb-primary);
  font-size: 12px;
}

.ytv-selection-popover__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.62fr) auto;
  gap: 8px;
  align-items: center;
}

.ytv-selection-popover__actions span,
.ytv-selection-popover__actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: var(--vb-surface);
  color: var(--vb-muted);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ytv-selection-popover__actions button.ytv-text-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 24%, var(--vb-border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-primary-soft) 50%, white);
  color: var(--vb-primary);
  font-size: 13px;
  font-weight: 800;
}

.ytv-selection-popover__meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ytv-selection-popover__meta div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklch, var(--vb-border) 72%, transparent);
  border-radius: 10px;
  background: color-mix(in oklch, var(--vb-bg) 55%, white);
}

.ytv-selection-popover__meta dd {
  margin: 0;
  color: var(--vb-text);
  font-size: 13px;
  line-height: 1.45;
}

.ytv-selection-popover__footer {
  justify-content: flex-end;
}

.ytv-selection-popover__footer button:not(.ytv-text-button) {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--vb-primary);
  border-radius: 999px;
  background: var(--vb-primary);
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.ytv-selection-popover__footer button:not(.ytv-text-button):hover:not(:disabled) {
  background: oklch(44% 0.11 28);
}

.ytv-selection-popover__footer .ytv-text-button {
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  color: var(--vb-muted);
  font-size: 14px;
}

.ytv-saved-item p {
  margin: 0;
  color: var(--vb-muted);
  font-size: 13px;
  line-height: 1.5;
}

.ytv-text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vb-primary);
  font-weight: 750;
}

.ytv-chip-button {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.ytv-vocab-card__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ytv-vocab-card__summary > div:not(.ytv-vocab-card__actions) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.ytv-vocab-card__details {
  display: grid;
  gap: 10px;
}

.ytv-vocab-card__details p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.ytv-vocab-card__details strong,
.ytv-saved-item p strong {
  display: block;
  color: var(--vb-text);
  font-size: 12px;
  font-weight: 800;
}

.ytv-saved-list {
  display: grid;
  gap: 10px;
}

.ytv-saved-item {
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: var(--vb-surface);
  cursor: pointer;
}

.ytv-saved-item p {
  flex: 1 1 100%;
}

.ytv-saved-item__sentence {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ytv-saved-item span {
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
}

.ytv-undo-button {
  justify-self: start;
  min-height: 36px;
  padding-inline: 14px;
}

.ytv-example {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-bg) 54%, white);
  color: var(--vb-text);
  text-align: left;
}

.ytv-example span {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.vq-tool {
  display: grid;
  width: min(1120px, 100%);
  gap: 20px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 0 28px;
  font-family: var(--font-body);
}

.vq-tool__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.vq-tool__header h2 {
  font-family: var(--font-body);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
}

.vq-tool__header p,
.vq-stats,
.vq-message,
.vq-question__explanation {
  color: var(--vb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.vq-quota {
  display: grid;
  min-width: 220px;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklch, var(--vb-accent) 35%, var(--vb-border));
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-soft-green) 62%, white);
  color: var(--vb-text);
  text-align: right;
}

.vq-quota span,
.vq-quota small {
  color: var(--vb-muted);
  font-size: 12px;
  line-height: 1.35;
}

.vq-quota strong {
  font-size: 20px;
  line-height: 1.15;
}

.vq-quota--blocked {
  border-color: var(--vb-danger);
  background: color-mix(in oklch, var(--vb-danger) 12%, white);
}

.vq-quota--blocked strong {
  color: var(--vb-danger);
}

.vq-tool__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.vq-panel__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.vq-panel__section {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.vq-panel__section + .vq-panel__section {
  padding-left: 24px;
  border-left: 1px solid color-mix(in oklch, var(--vb-border) 78%, white);
}

.vq-panel,
.vq-result {
  position: relative;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 22px;
  border: 1px solid color-mix(in oklch, var(--vb-border) 82%, white);
  border-radius: 12px;
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
}

.vq-panel h3,
.vq-result h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
}

.vq-result__content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.vq-panel label,
.vq-question-editor,
.vq-add-question {
  display: grid;
  gap: 8px;
}

.vq-question-editor__number {
  margin: 0;
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.vq-panel input,
.vq-panel select,
.vq-panel textarea,
.vq-title-edit,
.vq-question-editor input,
.vq-question-editor textarea,
.vq-add-question select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
  color: var(--vb-text);
  font: inherit;
  font-size: 14px;
}

.vq-panel input,
.vq-panel select,
.vq-title-edit,
.vq-question-editor input,
.vq-add-question select {
  padding: 0 12px;
}

.vq-panel textarea,
.vq-question-editor textarea {
  min-height: 130px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.vq-token-input {
  min-height: 76px;
  max-height: 132px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
}

.vq-token-list {
  display: flex;
  align-content: start;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  max-height: 96px;
  overflow-y: auto;
  padding-right: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.vq-token-list::-webkit-scrollbar {
  display: none;
}

.vq-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  max-width: 100%;
  padding: 0 7px;
  border: 1px solid color-mix(in oklch, var(--vb-border) 78%, white);
  border-radius: 4px;
  background: color-mix(in oklch, var(--vb-border) 18%, white);
  color: var(--vb-text);
  font-size: 13px;
  line-height: 22px;
}

.vq-token-chip span {
  overflow-wrap: anywhere;
}

.vq-token-chip button {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--vb-muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.vq-tag-entry {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.vq-tag-entry span {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.vq-tag-entry[hidden],
.vq-tag-add[hidden] {
  display: none;
}

.vq-tag-input {
  width: 120px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--vb-border);
  border-radius: 4px;
  background: white;
  color: var(--vb-text);
  font: inherit;
  font-size: 13px;
  line-height: 22px;
}

.vq-tag-input:focus {
  border-color: var(--vb-accent);
  outline: 2px solid color-mix(in oklch, var(--vb-accent) 20%, transparent);
}

.vq-tag-add {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border: 1px dashed var(--vb-border);
  border-style: dashed;
  border-radius: 4px;
  background: white;
  color: var(--vb-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 22px;
}

.vq-tag-add:hover {
  border-color: var(--vb-accent);
  color: var(--vb-accent);
}

.vq-stats,
.vq-samples,
.vq-actions,
.vq-question__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.vq-actions {
  flex-wrap: wrap;
}

.vq-stats span {
  padding: 5px 8px;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  background: oklch(98% 0.004 95);
}

.vq-message {
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in oklch, var(--vb-soft-green) 72%, white);
}

.vq-message--error {
  background: oklch(96% 0.025 28);
  color: oklch(42% 0.12 28);
}

.vq-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--vb-border);
  border-radius: 10px;
  background: oklch(98% 0.004 95);
}

.vq-tabs button,
.vq-actions button,
.vq-question__actions button {
  border: 1px solid var(--vb-border);
  background: var(--vb-surface);
  color: var(--vb-text);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease;
}

.vq-actions button:disabled {
  border-color: color-mix(in oklch, var(--vb-border) 76%, white);
  background: oklch(96% 0.004 95);
  color: color-mix(in oklch, var(--vb-muted) 72%, white);
  cursor: not-allowed;
  opacity: 0.74;
}

.vq-tabs button.is-active {
  border-color: var(--vb-primary);
  background: var(--vb-primary);
  color: white;
}

.vq-tabs button:hover:not(:disabled):not(.is-active),
.vq-actions button:hover:not(:disabled),
.vq-question__actions button:hover:not(:disabled),
.vq-preview-modal__close:hover,
.vq-toast button:hover {
  border-color: var(--vb-primary);
  background: color-mix(in oklch, var(--vb-primary) 8%, var(--vb-surface));
  box-shadow: 0 8px 18px color-mix(in oklch, var(--vb-primary) 16%, transparent);
  transform: translateY(-1px);
}

.vq-tabs button:active:not(:disabled),
.vq-actions button:active:not(:disabled),
.vq-question__actions button:active:not(:disabled),
.vq-preview-modal__close:active,
.vq-toast button:active {
  box-shadow: none;
  transform: translateY(0);
}

.vq-tabs button:focus-visible,
.vq-actions button:focus-visible,
.vq-question__actions button:focus-visible,
.vq-preview-modal__close:focus-visible,
.vq-toast button:focus-visible {
  outline: 2px solid var(--vb-primary);
  outline-offset: 2px;
}

.vq-result {
  scroll-margin-top: 80px;
}

.vq-result__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vq-result__loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 24px;
  border-radius: inherit;
  background: color-mix(in oklch, var(--vb-surface) 62%, transparent);
  backdrop-filter: blur(2px);
}

.vq-result__loading[hidden] {
  display: none;
}

.vq-result__loading-card {
  position: sticky;
  top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 28%, var(--vb-border));
  border-radius: 8px;
  background: color-mix(in oklch, white 72%, var(--vb-surface));
  box-shadow: var(--vb-shadow);
  color: var(--vb-text);
  font-size: 14px;
  font-weight: 750;
}

.vq-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in oklch, var(--vb-primary) 18%, var(--vb-border));
  border-top-color: var(--vb-primary);
  border-radius: 50%;
  animation: vq-spin 0.8s linear infinite;
}

.vq-result.is-loading .vq-result__content,
.vq-result.is-loading .vq-result__bar {
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
}

@keyframes vq-spin {
  to {
    rotate: 360deg;
  }
}

.vq-actions button,
.vq-question__actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}

.vq-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  color: var(--vb-muted);
  font-size: 14px;
}

.vq-check input {
  width: 16px;
  height: 16px;
}

.vq-questions {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vq-question {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
}

.vq-question ol {
  margin: 0;
  padding-left: 22px;
}

.vq-question__type {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.vq-question__type span:first-child {
  color: var(--vb-text);
}

.vq-add-question {
  grid-template-columns: minmax(0, 220px) auto;
  align-items: end;
}

.vq-add-question .vq-message {
  grid-column: 1 / -1;
  margin: 0;
}

.vq-answer-key {
  border-top: 1px solid var(--vb-border);
  padding-top: 14px;
}

.vq-answer-key summary {
  cursor: pointer;
  font-weight: 750;
}

.vq-answer-key ol {
  margin: 10px 0 0;
  padding-left: 24px;
}

.vq-toast {
  position: sticky;
  bottom: 16px;
  z-index: 2;
  width: fit-content;
  max-width: min(100%, 420px);
  padding: 10px 12px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
  color: var(--vb-text);
  font-size: 14px;
}

.vq-toast button {
  min-height: 30px;
  margin-left: 8px;
  padding: 0 10px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: var(--vb-surface);
  color: var(--vb-text);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease;
}

.vq-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.vq-preview-modal[hidden] {
  display: none;
}

.vq-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in oklch, black 42%, transparent);
  cursor: pointer;
}

.vq-preview-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  width: min(960px, 100%);
  max-height: min(86vh, 920px);
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--vb-border);
  border-radius: 12px;
  background: var(--vb-surface);
  box-shadow: 0 24px 80px color-mix(in oklch, black 22%, transparent);
}

.vq-preview-modal__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vq-preview-modal__header h3 {
  margin: 0;
}

.vq-preview-modal__close {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: var(--vb-surface);
  color: var(--vb-text);
  cursor: pointer;
  font-weight: 650;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease;
}

.vq-actions--modal {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vb-border);
}

.vq-preview-document {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  background: white;
  color: oklch(20% 0.012 75);
}

.vq-preview-document h4,
.vq-preview-document h5,
.vq-preview-document p {
  margin: 0;
}

.vq-preview-document h4 {
  font-size: 20px;
}

.vq-preview-document h5 {
  font-size: 15px;
}

.vq-preview-document__questions,
.vq-preview-document__answers ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.vq-preview-document__questions ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.vb-demo-shell {
  --vb-demo-panel-height: clamp(340px, 44vh, 420px);
  display: grid;
  gap: 14px;
  padding: clamp(28px, 5vw, 56px) 0 28px;
}

.vb-demo-shell,
.vb-demo-shell h2,
.vb-demo-shell button {
  font-family: var(--font-body);
}

.vb-demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vb-demo-header h2 {
  font-size: clamp(30px, 3vw, 38px);
}

.vb-input-panel,
.vb-reader-panel,
.vb-review-section,
.vb-explain-panel,
.vb-flash-card {
  border: 0;
  border-radius: 12px;
  background: var(--vb-surface);
  box-shadow: var(--vb-shadow);
}

.vb-input-panel,
.vb-reader-panel,
.vb-review-section {
  --vb-panel-padding: clamp(20px, 2.5vw, 28px);
  padding: var(--vb-panel-padding);
}

.vb-input-panel,
.vb-reader-panel {
  min-height: var(--vb-demo-panel-height);
  max-height: var(--vb-demo-panel-height);
}

.vb-input-panel,
.vb-reader-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 16px;
}

.vb-input-panel {
  gap: 0;
}

.vb-panel-heading {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.vb-input-panel textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 160px;
  resize: none;
  border: 0;
  border-radius: 12px;
  padding: 16px;
  background: oklch(99% 0.003 95);
  color: var(--vb-text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.75);
}

.vb-input-panel textarea:focus {
  outline: 2px solid color-mix(in oklch, var(--vb-primary) 25%, transparent);
  border-color: var(--vb-primary);
}

.vb-input-panel > .vb-primary-cta {
  width: 100%;
  margin-top: var(--vb-panel-padding);
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
}

.vb-secondary-cta {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--vb-surface);
  color: var(--vb-text);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.vb-secondary-cta:hover {
  border-color: color-mix(in oklch, var(--vb-primary) 45%, var(--vb-border));
  color: var(--vb-primary);
}

.vb-explain-panel button,
.vb-flash-card button {
  border: 0;
  background: var(--vb-surface);
  color: var(--vb-text);
  cursor: pointer;
}

.vb-explain-panel button,
.vb-flash-card button {
  padding: 0 14px;
}

.vb-reader-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-gutter: stable;
}

.vb-reading-stage {
  position: relative;
  min-height: 100%;
}

.vb-readable-text {
  min-height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.95;
}

.vb-reader-body > .vb-empty-copy {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 24px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.vb-token {
  min-height: 0;
  padding: 2px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.vb-token:hover,
.vb-token:focus {
  outline: none;
  background: var(--vb-primary-soft);
  color: var(--vb-primary);
}

.vb-explain-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
}

.vb-explain-panel--error {
  border-color: color-mix(in oklch, var(--danger, #bb3d32) 50%, var(--vb-border));
}

.vb-explain-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.vb-explain-panel dt {
  color: var(--vb-muted);
  font-size: 12px;
  font-weight: 750;
}

.vb-explain-panel dd {
  margin: 0;
}

.vb-explain-panel ul {
  margin: 0;
  padding-left: 20px;
}

.vb-save-message {
  color: var(--vb-muted);
}

.vb-review-block {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.vb-review-section {
  overflow: visible;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--vb-text);
}

.vb-review-carousel {
  position: relative;
  display: block;
  margin: -14px 0 -8px;
}

.vb-review-tabs {
  --vb-review-gap: 20px;
  --vb-review-visible-cards: 3.5;
  display: flex;
  gap: var(--vb-review-gap);
  min-width: 0;
  margin: 0;
  padding: 14px 2px 42px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-color: color-mix(in oklch, var(--vb-primary) 32%, var(--vb-border)) transparent;
  scrollbar-width: none;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.vb-review-tabs::-webkit-scrollbar {
  display: none;
}

.vb-review-tabs[data-dragging='true'] {
  cursor: grabbing;
  scroll-snap-type: none;
}

.vb-review-nav {
  position: absolute;
  top: 88px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgb(112 82 62 / 0.16);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.24);
  color: rgb(37 28 20 / 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 18px rgb(35 24 18 / 0.08);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.vb-review-nav:first-child {
  inset-inline-start: -44px;
}

.vb-review-nav:last-child {
  inset-inline-end: -44px;
}

.vb-review-nav:hover {
  border-color: rgb(112 82 62 / 0.28);
  background: rgb(255 255 255 / 0.42);
  color: var(--vb-primary);
}

.vb-review-nav:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--vb-primary) 38%, transparent);
  outline-offset: 3px;
}

.vb-review-tab {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  flex: 0 0 max(220px, calc((100% - (var(--vb-review-gap) * 3)) * 0.285714));
  gap: 10px;
  min-height: 140px;
  padding: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 18%, var(--vb-border));
  background:
    linear-gradient(135deg, oklch(100% 0 0 / 0.72), oklch(100% 0 0 / 0.34)),
    radial-gradient(circle at 18% 12%, var(--vb-primary-soft), transparent 58%);
  color: var(--vb-text);
  font-weight: 750;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 16px 34px oklch(0% 0 0 / 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.vb-review-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 0%, oklch(92% 0.01 80 / 0.48) 100%),
    radial-gradient(circle at 84% 10%, oklch(98% 0.018 80 / 0.72), transparent 34%);
}

.vb-review-tab > span {
  position: relative;
}

.vb-review-tab[aria-selected='true'] {
  border-color: color-mix(in oklch, var(--vb-primary) 38%, var(--vb-border));
  box-shadow:
    0 0 0 1px oklch(100% 0 0 / 0.7) inset,
    0 18px 38px oklch(0% 0 0 / 0.1);
}

.vb-review-tab[aria-selected='true'] .vb-review-tab__count {
  background: var(--vb-primary);
  color: white;
}

.vb-review-tab__label {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vb-review-tab__excerpt {
  display: -webkit-box;
  min-height: 3.9em;
  overflow: hidden;
  color: var(--vb-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.vb-review-tab__count {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--vb-primary-soft);
  color: inherit;
  font-size: 12px;
  line-height: 1.1;
}

.vb-review-word-panel {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: -18px;
  padding-top: 20px;
}

.vb-review-word-panel::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: min(460px, 60%);
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in oklch, var(--vb-primary) 44%, transparent),
    transparent
  );
}

.vb-review-word-panel__source {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--vb-primary-soft) 72%, white);
  color: var(--vb-primary);
  font-size: 12px;
  font-weight: 750;
}

.vb-review-word-panel__source span + span {
  color: var(--vb-muted);
  font-weight: 650;
}

.vb-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.vb-review-card {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid color-mix(in oklch, var(--vb-primary) 22%, var(--vb-border));
  border-radius: 8px;
  background: oklch(100% 0 0 / 0.72);
  color: var(--vb-text);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.vb-review-card::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--vb-primary);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--vb-primary-soft) 86%, transparent);
}

.vb-review-card strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vb-review-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 120px;
  padding: 20px 0 26px;
  color: var(--vb-muted);
  text-align: center;
}

.vb-review-empty strong {
  color: var(--vb-text);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.2;
}

.vb-review-empty,
.vb-review-section .vb-empty-copy {
  color: var(--vb-muted);
}

.vb-empty-copy {
  color: var(--vb-muted);
}

@media (max-width: 860px) {
  .vb-page {
    --vb-page-inline-padding: 16px;
    margin: -24px -16px;
    padding-inline: 16px;
  }

  .vb-hero {
    grid-template-columns: 1fr;
  }

  .vb-demo-shell {
    --vb-demo-panel-height: auto;
    align-items: start;
  }

  .vb-input-panel,
  .vb-reader-panel {
    min-height: 0;
    max-height: none;
  }

  .vb-input-panel textarea {
    height: 190px;
  }

  .vb-reader-body {
    max-height: min(62vh, 460px);
  }

  .vb-hero {
    min-height: auto;
  }

  .vb-card-grid {
    gap: 8px;
  }

  .vq-tool__header,
  .vq-result__bar {
    align-items: start;
    flex-direction: column;
  }

  .vq-quota {
    width: 100%;
    text-align: left;
  }

  .vq-tool__grid {
    grid-template-columns: 1fr;
  }

  .ytv-tool__intro,
  .ytv-panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .ytv-url-form,
  .ytv-video-card {
    grid-template-columns: 1fr;
  }

  .ytv-url-form .vb-primary-cta {
    width: 100%;
  }

  .ytv-vocab-grid,
  .ytv-example-grid {
    grid-template-columns: 1fr;
  }

  .ytv-preview,
  .ytv-workspace,
  .ytv-examples {
    padding: 18px;
  }

  .ytv-selection-popover__header,
  .ytv-selection-popover__footer,
  .ytv-saved-item,
  .ytv-saved-item > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .ytv-selection-popover__actions {
    grid-template-columns: 1fr;
  }

  .ytv-selection-popover__footer button:not(.ytv-text-button),
  .ytv-selection-popover__footer .ytv-text-button {
    width: 100%;
    justify-content: center;
  }

  .ytv-selection-popover.selection-toolbar {
    width: min(580px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .ytv-selection-popover .selection-toolbar__header,
  .ytv-selection-popover .selection-toolbar__meta {
    align-items: stretch;
    flex-direction: column;
  }

  .ytv-selection-popover .selection-toolbar__header-actions {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr) 38px;
    width: 100%;
  }

  .ytv-selection-popover .selection-toolbar__save-button,
  .ytv-selection-popover .selection-toolbar__copy-button {
    min-width: 0;
    width: 100%;
  }

  .ytv-selection-popover .selection-toolbar__context {
    margin-left: 20px;
  }

  .vq-panel__layout {
    grid-template-columns: 1fr;
  }

  .vq-panel__section + .vq-panel__section {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid color-mix(in oklch, var(--vb-border) 78%, white);
    border-left: 0;
  }

  .vq-panel,
  .vq-result {
    padding: 18px;
  }

  .vq-add-question {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .ytv-workspace__top {
    grid-template-columns: 1fr;
  }
}

.modal-shell.auth-modal-shell {
  --auth-modal-bg: var(--vb-surface, oklch(99% 0.006 84));
  --auth-modal-border: var(--vb-border, oklch(87% 0.012 83));
  --auth-modal-muted: var(--vb-muted, oklch(46% 0.02 73));
  --auth-modal-page-bg: var(--vb-page-bg, oklch(97% 0.01 86));
  --auth-modal-primary: var(--vb-primary, oklch(48% 0.11 31));
  --auth-modal-text: var(--vb-text, oklch(19% 0.012 63));
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-shell.auth-modal-shell[hidden] {
  display: none;
}

.modal-shell.auth-modal-shell .modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: oklch(0% 0 0 / 0.38);
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(460px, 100%);
  min-height: 0;
  max-height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--auth-modal-border);
  border-radius: 8px;
  background: var(--vb-surface, oklch(99% 0.006 84));
  color: var(--auth-modal-text);
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.4;
  box-shadow: 0 22px 70px oklch(0% 0 0 / 0.24);
}

.auth-modal-card,
.auth-modal-card * {
  box-sizing: border-box;
}

.auth-modal-card button,
.auth-modal-card input {
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
  letter-spacing: 0;
}

.auth-modal__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--auth-modal-border);
}

.auth-modal__header h2 {
  margin: 5px 0 7px;
  font-family: var(--font-display, Georgia, "Times New Roman", serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.auth-modal__header p {
  max-width: 330px;
  margin: 0;
  color: var(--auth-modal-muted);
  font-size: 16px;
  line-height: 1.45;
}

.auth-modal__copy {
  min-width: 0;
}

.auth-modal__eyebrow {
  color: var(--auth-modal-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-modal__close {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--auth-modal-page-bg);
  color: var(--auth-modal-muted);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
}

.auth-modal-card .auth-card {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.auth-modal-card .auth-card--modal {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.auth-modal-card .auth-card--modal::-webkit-scrollbar {
  display: none;
}

@media (max-width: 520px) {
  .modal-shell.auth-modal-shell {
    padding: 12px;
  }

  .auth-modal-card {
    width: min(100%, 420px);
    padding: 18px;
  }

  .auth-modal__header h2 {
    font-size: 25px;
  }

  .auth-modal__header p {
    font-size: 14px;
  }
}

@media print {
  .vb-page {
    --vb-page-inline-padding: 0px;
    background: white;
    color: black;
    margin: 0;
    padding: 0;
  }

  .vq-tool__header,
  .vq-tool__grid,
  .vq-actions,
  .vq-check,
  .vq-add-question,
  .vq-question__actions,
  .vb-hero,
  .vb-seo-sections {
    display: none !important;
  }

  .vq-tool,
  .vq-result {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .vq-question {
    break-inside: avoid;
    background: white;
  }

  .vq-answer-key:not([open]) {
    display: none;
  }
}
