/* Self-hosted display font Bricolage Grotesque (SIL OFL 1.1, see fonts/OFL.txt). Latin subset, variable font; one file covers weights 600 and 700. */
@font-face {
  font-family: "TV2 Bricolage";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(/tv2/fonts/bricolage-grotesque-latin.v1.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback to limit layout shift while the display font loads.
   Computed from the font's real metrics (unitsPerEm 1000, hhea ascender 930, descender -270, lineGap 0)
   against Arial Bold (Liberation Sans Bold, metric-compatible), average glyph width weighted by English letter frequency:
   size-adjust = 0.4974 / 0.4840 = 102.8%; ascent = 930 / 1000 / 1.028 = 90.5%; descent = 270 / 1000 / 1.028 = 26.3%; line gap 0%. */
@font-face {
  font-family: "TV2 Bricolage Fallback";
  font-style: normal;
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  size-adjust: 102.8%;
  ascent-override: 90.5%;
  descent-override: 26.3%;
  line-gap-override: 0%;
}
/* Tool page v2 styles. Every rule is scoped under .tv2 (dark mode uses .dark .tv2), class selectors only, variables use the --tv2-* prefix.
   No global resets and no @import. Derived from the design system tokens.css, bundle.css and prototype v6. */
/* ===== Tokens (light mode; --tv2- prefix avoids clashes with global variables) ===== */
.tv2 {
  --tv2-bg: #f6f7f9;
  --tv2-surface: #ffffff;
  --tv2-surface-sunk: #eef0f3;
  --tv2-line: #e3e6ea;
  --tv2-line-strong: #868c96;
  --tv2-ink: #1d2127;
  --tv2-ink-muted: #565d68;
  --tv2-ink-subtle: #6b717c;
  --tv2-on-ink: #ffffff;
  --tv2-brand: #1f5fd6;
  --tv2-brand-hover: #194fb5;
  --tv2-on-brand: #ffffff;
  --tv2-brand-soft: #e6eefc;
  --tv2-brand-ink: #1a52bb;
  --tv2-focus: #1f5fd6;
  --tv2-overlay: rgba(15,17,21,0.72);
  --tv2-on-overlay: #ffffff;
  --tv2-ok-soft: #e2f2e8;
  --tv2-ok-ink: #1b6b3e;
  --tv2-danger-soft: #fde8e6;
  --tv2-danger-ink: #b42318;
  --tv2-shadow-workspace: 0 1px 2px rgba(23,24,28,0.06), 0 12px 32px -16px rgba(23,24,28,0.16);
  --tv2-shadow-sticky: 0 -6px 16px -8px rgba(23,24,28,0.18);
  --tv2-coin: #b7791f;
  --tv2-space-1: 4px;
  --tv2-space-2: 8px;
  --tv2-space-3: 12px;
  --tv2-space-4: 16px;
  --tv2-space-5: 24px;
  --tv2-space-6: 32px;
  --tv2-radius-sm: 6px;
  --tv2-radius-md: 10px;
  --tv2-radius-lg: 16px;
  --tv2-radius-pill: 999px;
  --tv2-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --tv2-font-display: "TV2 Bricolage", "TV2 Bricolage Fallback", var(--tv2-font-sans);
  --tv2-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* Remap only the three shadcn variables, scoped inside the .tv2 root */
  --primary: var(--tv2-brand);
  --primary-foreground: var(--tv2-on-brand);
  --ring: var(--tv2-focus);
}
/* ===== Base ===== */
.tv2 { font-family: var(--tv2-font-sans); color: var(--tv2-ink); line-height: 1.4; text-align: left; }
.tv2 .tv2-display { font-family: var(--tv2-font-display, var(--tv2-font-sans)); }
.tv2 h1, .tv2 h2 { font-family: var(--tv2-font-display, var(--tv2-font-sans)); }
.tv2 .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv2 .tv2-bx, .tv2 .e-tool, .tv2 .e-tool__bar, .tv2 .e-tool__in, .tv2 .e-tool__out, .tv2 .e-btn, .tv2 .ta, .tv2 .in, .tv2 .sel, .tv2 .rail, .tv2 .opts, .tv2 .nbox, .tv2 .e-doc, .tv2 .e-sticky, .tv2 .e-act, .tv2 .chip, .tv2 .acc, .tv2 .ibtn, .tv2 .mseg { box-sizing: border-box; }

/* ===== Title block (styles only; text and tags are untouched) ===== */
.tv2.tv2-head > div { max-width: none; margin-left: 0; margin-right: 0; text-align: left; }
.tv2.tv2-head h1 { font-family: var(--tv2-font-display, var(--tv2-font-sans)); font-weight: 700; font-size: 28px; line-height: 34px; letter-spacing: -0.01em; text-align: left; color: var(--tv2-ink); }
.tv2.tv2-head p { margin-left: 0; margin-right: 0; text-align: left; }
@media (min-width: 1024px) {
  .tv2.tv2-head h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.015em; }
}

/* ===== Access row container: aligned with the site container (mx-auto, px-6, lg:px-12); vertical spacing close to the legacy py-10 ===== */
.tv2 .tv2-wrap { box-sizing: border-box; margin-left: auto; margin-right: auto; padding: 40px 24px; width: 100%; }
@media (min-width: 1024px) {
  .tv2 .tv2-wrap { padding-left: 48px; padding-right: 48px; }
}
@media (min-width: 1536px) {
  .tv2 .tv2-wrap { max-width: 1536px; }
}

/* ===== Page grid: workbench + right rail ===== */
.tv2 .tv2-grid { display: grid; gap: var(--tv2-space-6); grid-template-columns: minmax(0, 1fr); }
.tv2 .tv2-main { min-width: 0; }
.tv2 .tv2-rail { display: none; min-width: 0; }
@media (min-width: 1280px) {
  .tv2[data-rail-slot] .tv2-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
  .tv2[data-rail-slot] .tv2-rail { display: block; }
}
.tv2 .tv2-rail[data-phase="live"] { display: block; }
.tv2 .tv2-rail[data-phase="off"] { display: none; }
.tv2 .tv2-rail__in { width: 300px; max-width: 100%; }
.tv2 .tv2-rail__in.is-sticky { position: sticky; top: 80px; }
.tv2 .tv2-rail__label { display: block; font: 600 10px/14px var(--tv2-font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--tv2-ink-subtle); margin-bottom: 4px; text-align: left; }
.tv2 .tv2-rail__box { width: 300px; max-width: 100%; height: 600px; overflow: hidden; background: var(--tv2-surface-sunk); border-radius: var(--tv2-radius-sm); }
.tv2 .tv2-rail__box.is-live { background: none; }
@media (max-width: 1279px) {
  .tv2 .tv2-rail__in { margin: 0 auto; }
}

/* ===== Shared small parts ===== */
.tv2 .ic { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.tv2 .coin { color: var(--tv2-coin); }
.tv2 .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tv2-ink); background: var(--tv2-surface); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-pill); padding: 4px 10px; white-space: nowrap; }
.tv2 .chip--plain { border-color: transparent; background: none; padding-inline: 0; }
.tv2 .chip--soft { background: var(--tv2-surface-sunk); }
.tv2 .chip--ok { background: var(--tv2-ok-soft); color: var(--tv2-ok-ink); border-color: transparent; }
.tv2 .chip--warn { background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); border-color: transparent; }
.tv2 .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tv2 .ibtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-sm); background: var(--tv2-surface); color: var(--tv2-ink); cursor: pointer; padding: 0; font: inherit; }
.tv2 .ibtn:hover { border-color: var(--tv2-line-strong); }
.tv2 .ibtn:disabled { opacity: .45; cursor: not-allowed; }
.tv2 .ibtn--ghost { border-color: transparent; background: none; color: var(--tv2-ink-muted); }
.tv2 .ibtn--ghost:hover { color: var(--tv2-ink); background: var(--tv2-surface-sunk); }
.tv2 .ibtn--on { border-color: var(--tv2-brand); color: var(--tv2-brand-ink); background: var(--tv2-brand-soft); }
.tv2 .err { color: var(--tv2-danger-ink); font-size: 13px; line-height: 18px; margin: 0; }
.tv2 .muted { color: var(--tv2-ink-muted); }
.tv2 .small { font-size: 13px; line-height: 19px; }
.tv2 .linkbtn { font: inherit; font-size: 13px; font-weight: 600; color: var(--tv2-brand-ink); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tv2 .linkbtn:hover { text-decoration: underline; }
.tv2 .tip { position: relative; display: inline-flex; }
.tv2 .tip:focus-visible { outline: 2px solid var(--tv2-focus); outline-offset: 2px; border-radius: var(--tv2-radius-sm); }
.tv2 .tip:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: 240px; padding: 6px 10px; border-radius: var(--tv2-radius-sm); background: var(--tv2-ink); color: var(--tv2-on-ink); font-size: 12px; line-height: 16px; font-weight: 500; white-space: normal; }
.tv2 .e-btn:focus-visible, .tv2 .ibtn:focus-visible, .tv2 .mseg__b:focus-visible, .tv2 .linkbtn:focus-visible, .tv2 .rail:focus-visible, .tv2 .opts__sum:focus-visible, .tv2 .ta:focus-visible, .tv2 .in:focus-visible, .tv2 .sel:focus-visible { outline: 2px solid var(--tv2-focus); outline-offset: 2px; }

/* ===== Buttons (from the design system e-btn) ===== */
.tv2 .e-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--tv2-space-2); height: 44px; padding: 0 var(--tv2-space-5); border-radius: var(--tv2-radius-md); font: 600 15px/20px var(--tv2-font-sans); border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tv2 .e-btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.tv2 .e-btn--sm { height: 36px; padding: 0 var(--tv2-space-4); font-size: 14px; }
.tv2 .e-btn--primary { background: var(--tv2-brand); color: var(--tv2-on-brand); }
.tv2 .e-btn--primary:hover { background: var(--tv2-brand-hover); }
.tv2 .e-btn--secondary { background: var(--tv2-surface); color: var(--tv2-ink); border-color: var(--tv2-line-strong); }
.tv2 .e-btn--ink { background: var(--tv2-ink); color: var(--tv2-on-ink); }
.tv2 .e-btn--ghost { background: transparent; color: var(--tv2-ink); }
.tv2 .e-btn[disabled] { background: var(--tv2-surface-sunk); color: var(--tv2-ink-subtle); border-color: var(--tv2-line); cursor: not-allowed; }
.tv2 .e-btn .ic { width: 18px; height: 18px; }
.tv2 .e-btn .price { display: inline-flex; align-items: center; gap: 4px; padding-left: 10px; margin-left: 4px; border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 40%, transparent); font-weight: 600; }
.tv2 .e-btn .price .ic { width: 15px; height: 15px; }
.tv2 .e-btn--primary .price .ic { color: inherit; }
.tv2 .e-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--tv2-radius-sm); font: 600 11px/16px var(--tv2-font-sans); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.tv2 .e-badge--free { background: var(--tv2-ok-soft); color: var(--tv2-ok-ink); }
.tv2 .e-badge--pro { background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); }
.tv2 .e-badge--credits { background: var(--tv2-surface-sunk); color: var(--tv2-ink-muted); }
.tv2 .e-hstack { display: flex; flex-wrap: wrap; gap: var(--tv2-space-3); align-items: center; }

/* ===== Workbench shell ===== */
.tv2 .e-tool { background: var(--tv2-surface); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-lg); box-shadow: var(--tv2-shadow-workspace); overflow: clip; display: grid; grid-template-columns: minmax(0, 1fr); }
.tv2 .e-tool__bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-2); padding: 0 var(--tv2-space-4); min-height: 52px; border-bottom: 1px solid var(--tv2-line); flex-wrap: wrap; min-width: 0; }
.tv2 .e-tool__in { padding: var(--tv2-space-4); display: flex; flex-direction: column; gap: var(--tv2-space-3); min-width: 0; }
.tv2 .e-tool__out { background: var(--tv2-surface-sunk); border-top: 1px solid var(--tv2-line); padding: var(--tv2-space-4); display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 768px) {
  .tv2 .e-tool__in, .tv2 .e-tool__out { padding: var(--tv2-space-5); }
}
@media (min-width: 1024px) {
  .tv2 .e-tool__out { border-top: 0; border-left: 1px solid var(--tv2-line); }
  .tv2 .e-tool--text-split { grid-template-columns: 1fr 1fr; }
  .tv2 .e-tool--text-split .e-tool__in, .tv2 .e-tool--text-split .e-tool__out { min-height: 0; }
}
.tv2 .e-tool--text-split .e-tool__out { min-height: 400px; }
.tv2 .e-act { display: grid; gap: 10px; padding-top: var(--tv2-space-4); border-top: 1px solid var(--tv2-line); margin-top: 0; }
.tv2 .e-act__row { display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-3); flex-wrap: wrap; row-gap: var(--tv2-space-2); }
.tv2 .e-act .e-btn { width: 100%; display: flex; }
.tv2 .idbadge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tv2-ink-muted); }
.tv2 .idbadge__name { color: var(--tv2-ink); }
.tv2 .idbadge .chip { padding: 2px 8px; font-size: 12px; }
.tv2 .barright { display: inline-flex; align-items: center; gap: var(--tv2-space-2); }

/* ===== Text input ===== */
.tv2 .taw { position: relative; }
.tv2 .ta { width: 100%; min-height: 190px; resize: vertical; border: 1px solid var(--tv2-line-strong); border-radius: var(--tv2-radius-md); background: var(--tv2-surface); color: var(--tv2-ink); padding: var(--tv2-space-3) var(--tv2-space-3) 44px; font: 16px/25px var(--tv2-font-sans); display: block; }
.tv2 .ta:read-only { background: var(--tv2-surface-sunk); color: var(--tv2-ink-muted); }
.tv2 .ta.is-err { border-color: var(--tv2-danger-ink); }
.tv2 .ta__corner { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tv2-ink-subtle); }
.tv2 .ta__corner .count { padding-right: 4px; font-variant-numeric: tabular-nums; }
.tv2 .in, .tv2 .sel { width: 100%; border: 1px solid var(--tv2-line-strong); border-radius: var(--tv2-radius-sm); background: var(--tv2-surface); color: var(--tv2-ink); padding: 8px 10px; font: 16px/22px var(--tv2-font-sans); }
.tv2 .in--area { min-height: 64px; resize: vertical; }
.tv2 .fld { display: grid; gap: 6px; min-width: 0; }
.tv2 .fld__l { font-size: 13px; font-weight: 600; line-height: 18px; }

/* ===== Options fold ===== */
.tv2 .opts { border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-md); }
.tv2 .opts__sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.tv2 .opts__sum::-webkit-details-marker { display: none; }
.tv2 .opts__sum .n { min-width: 18px; height: 18px; border-radius: 9px; background: var(--tv2-brand); color: var(--tv2-on-brand); font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; }
.tv2 .opts__sum .caret { margin-left: auto; color: var(--tv2-ink-subtle); transition: transform .15s; }
.tv2 .opts[open] .opts__sum .caret { transform: rotate(180deg); }
.tv2 .opts__body { padding: 0 12px 12px; display: grid; gap: var(--tv2-space-3); }
@media (min-width: 768px) {
  .tv2 .opts__body.two { grid-template-columns: 1fr 1fr; }
}

/* ===== Model switch ===== */
.tv2 .mseg { display: grid; grid-template-columns: repeat(var(--tv2-seg-n, 3), minmax(0, 1fr)); gap: 3px; padding: 3px; background: var(--tv2-surface-sunk); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-pill); }
.tv2 .mseg__b { font: inherit; font-size: 14px; font-weight: 600; height: 34px; border: 0; border-radius: var(--tv2-radius-pill); background: none; color: var(--tv2-ink-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 0 8px; }
.tv2 .mseg__b[aria-pressed="true"] { background: var(--tv2-surface); color: var(--tv2-ink); box-shadow: 0 0 0 1px var(--tv2-line-strong); }
.tv2 .mseg__b .ic { width: 13px; height: 13px; }
.tv2 .mseg__b .tri { font-size: 11px; line-height: 16px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--tv2-brand); color: var(--tv2-on-brand); }
.tv2 .mseg__b:disabled { cursor: default; }

/* ===== In progress ===== */
.tv2 .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--tv2-line-strong); border-right-color: transparent; animation: tv2-spin .9s linear infinite; flex: none; display: inline-block; vertical-align: -3px; }
.tv2 .e-btn .spin { border-color: currentColor; border-right-color: transparent; }
@keyframes tv2-spin { to { transform: rotate(360deg); } }
.tv2 .indet { height: 4px; border-radius: 2px; background: var(--tv2-line); overflow: hidden; position: relative; }
.tv2 .indet__bar { position: absolute; top: 0; bottom: 0; width: 35%; background: var(--tv2-brand); border-radius: 2px; animation: tv2-indet 1.4s ease-in-out infinite; }
@keyframes tv2-indet { from { left: -35%; } to { left: 100%; } }
.tv2 .caret-blink::after { content: ""; display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; margin-left: 2px; background: var(--tv2-ink); animation: tv2-blink 1s steps(1) infinite; }
@keyframes tv2-blink { 50% { opacity: 0; } }
@keyframes tv2-pulse { 50% { box-shadow: 0 0 0 6px var(--tv2-brand-soft); } }
.tv2 .stream { white-space: pre-wrap; }
.tv2 .working { display: grid; gap: var(--tv2-space-3); align-content: start; }
.tv2 .working__line { display: flex; align-items: center; gap: var(--tv2-space-2); font-weight: 600; font-size: 15px; }

/* ===== Result pane ===== */
.tv2 .rbar { display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-2); margin-bottom: var(--tv2-space-3); min-height: 34px; flex-wrap: wrap; position: sticky; top: var(--tv2-pin-top, 0px); z-index: 5; background: var(--tv2-surface-sunk); padding-block: 6px; margin-top: -6px; }
@media (min-width: 768px) {
  .tv2 { --tv2-pin-top: 48px; }
}
.tv2 .rbar__l { display: flex; align-items: center; gap: var(--tv2-space-2); flex-wrap: wrap; }
.tv2 .rbar__r { display: flex; gap: 6px; }
.tv2 .mark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tv2-ink-muted); }
.tv2 .out-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tv2 .changes { margin: var(--tv2-space-3) 0 0; padding-left: 20px; font-size: 15px; line-height: 24px; }
.tv2 .changes__item { margin-bottom: 6px; }
.tv2 .cta-line { margin-top: var(--tv2-space-3); display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-2); flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.tv2 .ex-wrap { flex: 1; display: flex; }
.tv2 .ex-wrap .e-example { flex: 1; display: flex; }
.tv2 .ex-wrap .e-doc { flex: 1; }
.tv2 .e-example .e-doc { padding-top: 40px; }
.tv2 .cta-line__t { display: inline-flex; align-items: center; gap: 6px; }
.tv2 .ph { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--tv2-space-3); min-height: 240px; color: var(--tv2-ink-subtle); font-weight: 600; text-align: center; }
.tv2 .ph .ic { width: 32px; height: 32px; }
.tv2 .e-example { position: relative; opacity: .55; pointer-events: none; }
.tv2 .e-example-tag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.tv2 .e-doc { flex: 1; background: var(--tv2-surface); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-md); padding: var(--tv2-space-4) var(--tv2-space-5); font-size: 16px; line-height: 27px; color: var(--tv2-ink); overflow: auto; min-width: 0; }
.tv2 .e-doc p { margin: 0 0 var(--tv2-space-3); }
.tv2 .e-doc h1, .tv2 .e-doc h2, .tv2 .e-doc h3, .tv2 .e-doc h4 { font-size: 15px; line-height: 22px; font-weight: 700; margin: var(--tv2-space-4) 0 var(--tv2-space-1); }
.tv2 .e-doc ul, .tv2 .e-doc ol { margin: 0 0 var(--tv2-space-3); padding-left: 22px; }
.tv2 .e-doc li { margin-bottom: 4px; }
.tv2 .e-doc strong { font-weight: 700; }
.tv2 .e-doc code { font-family: var(--tv2-font-mono); font-size: 14px; }
.tv2 .e-doc pre { overflow: auto; font-family: var(--tv2-font-mono); font-size: 14px; line-height: 22px; margin: 0 0 var(--tv2-space-3); }
.tv2 .e-doc blockquote { margin: 0 0 var(--tv2-space-3); padding-left: var(--tv2-space-3); border-left: 3px solid var(--tv2-line-strong); color: var(--tv2-ink-muted); }
.tv2 .e-doc.is-stale { opacity: .55; }

/* ===== Notices ===== */
.tv2 .nbox { border-radius: var(--tv2-radius-md); padding: var(--tv2-space-3) var(--tv2-space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-2) var(--tv2-space-3); flex-wrap: wrap; font-size: 14px; font-weight: 600; margin-bottom: var(--tv2-space-3); }
.tv2 .nbox__t { display: inline-flex; align-items: center; gap: 8px; }
.tv2 .nbox__sub { display: block; font-weight: 500; font-size: 13px; }
.tv2 .nbox--quota { background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); }
.tv2 .nbox--err { background: var(--tv2-danger-soft); color: var(--tv2-danger-ink); }
.tv2 .nbox .e-hstack { gap: 6px; }

/* ===== Text tool collapse ===== */
.tv2 .rail { display: none; font: inherit; color: var(--tv2-ink); background: var(--tv2-surface); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-md); cursor: pointer; padding: 10px 12px; align-items: center; gap: 10px; width: 100%; text-align: left; }
.tv2 .rail:hover { border-color: var(--tv2-line-strong); }
.tv2 .rail__ic { color: var(--tv2-brand-ink); display: inline-flex; }
.tv2 .rail__lbl { font-size: 14px; font-weight: 600; }
.tv2 .rail__meta { font-size: 13px; color: var(--tv2-ink-muted); margin-left: auto; }
.tv2 .rail__open { color: var(--tv2-ink-subtle); display: inline-flex; transform: rotate(90deg); }
.tv2 .is-collapsed .rail { display: flex; }
.tv2 .is-collapsed .formwrap { display: none; }
.tv2 .formwrap { display: grid; gap: var(--tv2-space-3); }
/* Form field grid: works with the 6-column span classes from FormFieldRenderer, single column on phones */
.tv2 .fgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tv2-space-3); }
@media (min-width: 768px) {
  .tv2 .fgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.tv2 .formhead { display: flex; justify-content: flex-end; margin: -8px -8px -4px 0; }
@media (min-width: 1024px) {
  .tv2 .e-tool--text-split { transition: grid-template-columns .2s ease; }
  .tv2 .e-tool--text-split.is-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
  .tv2 .is-collapsed .e-tool__in { padding: var(--tv2-space-3) 8px; }
  .tv2 .is-collapsed .rail { flex-direction: column; align-items: center; gap: 12px; border: 0; background: none; padding: 8px 0; height: 100%; justify-content: flex-start; }
  .tv2 .is-collapsed .rail:hover { background: var(--tv2-surface-sunk); }
  .tv2 .is-collapsed .rail__ic { width: 40px; height: 40px; border-radius: 50%; background: var(--tv2-brand-soft); display: grid; place-items: center; }
  .tv2 .is-collapsed .rail__lbl { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; color: var(--tv2-ink-muted); white-space: nowrap; }
  .tv2 .is-collapsed .rail__meta { display: none; }
  .tv2 .is-collapsed .rail__open { transform: none; margin-top: auto; }
}
/* Body text goes up one size only when the result fills the full page width (no right rail, form collapsed, viewport 1024px or wider) */
@media (min-width: 1024px) {
  .tv2[data-rail="none"] .e-tool--text-split.is-collapsed .e-tool__out .e-doc { font-size: 18px; line-height: 31px; padding: var(--tv2-space-5) var(--tv2-space-6); }
  .tv2[data-rail="none"] .e-tool--text-split.is-collapsed .e-tool__out .e-doc h3 { font-size: 18px; line-height: 26px; }
  .tv2[data-rail="none"] .e-tool--text-split.is-collapsed .e-tool__out .changes { font-size: 17px; line-height: 28px; }
}

/* ===== Access row ===== */
.tv2 .access-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.tv2 .access-row__t { font-weight: 600; color: var(--tv2-ink-muted); margin-right: 4px; }
.tv2 .acc { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--tv2-radius-pill); background: var(--tv2-surface); border: 1px solid var(--tv2-line); font-weight: 600; white-space: nowrap; }
.tv2 .acc .y { color: var(--tv2-ok-ink); }
.tv2 .acc .n { color: var(--tv2-ink-subtle); }
.tv2 .acc.is-off { color: var(--tv2-ink-subtle); }
.tv2 .acc .amt { display: inline-flex; align-items: center; gap: 3px; color: var(--tv2-ink-muted); font-weight: 500; }

/* ===== Mobile sticky bar ===== */
.tv2 .e-sticky { display: flex; align-items: center; gap: var(--tv2-space-3); padding: var(--tv2-space-3) var(--tv2-space-4); background: var(--tv2-surface); border-top: 1px solid var(--tv2-line); box-shadow: var(--tv2-shadow-sticky); }
.tv2 .sticky-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--tv2-surface); }
@media (min-width: 768px) {
  .tv2 .sticky-wrap { display: none !important; }
}
.tv2 .sticky-wrap .e-sticky .e-btn { flex: 1; justify-content: center; display: inline-flex; }

/* ===== Small screens ===== */
@media (max-width: 767px) {
  .tv2 .e-tool__bar .barright .muted { display: none; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .tv2 .spin, .tv2 .caret-blink::after, .tv2 .step.is-now .step__ic { animation: none; }
  .tv2 .indet__bar { animation: none; left: 0; width: 100%; opacity: .5; }
  .tv2 .e-tool--text-split { transition: none; }
  .tv2 .opts__sum .caret { transition: none; }
}

/* ===== Dark mode ===== */
.dark .tv2 {
  --tv2-bg: #0f1115;
  --tv2-surface: #181b21;
  --tv2-surface-sunk: #0b0d10;
  --tv2-line: #2a2e36;
  --tv2-line-strong: #646b77;
  --tv2-ink: #e9ecf1;
  --tv2-ink-muted: #a3a9b4;
  --tv2-ink-subtle: #868c97;
  --tv2-on-ink: #0f1115;
  --tv2-brand: #6ea0ff;
  --tv2-brand-hover: #8ab3ff;
  --tv2-on-brand: #0b1730;
  --tv2-brand-soft: #142445;
  --tv2-brand-ink: #8fb5ff;
  --tv2-focus: #6ea0ff;
  --tv2-overlay: rgba(0,0,0,0.72);
  --tv2-on-overlay: #ffffff;
  --tv2-ok-soft: #12291c;
  --tv2-ok-ink: #7fd4a3;
  --tv2-danger-soft: #3a1512;
  --tv2-danger-ink: #ff8a80;
  --tv2-shadow-workspace: 0 1px 2px rgba(0,0,0,0.5);
  --tv2-shadow-sticky: 0 -6px 16px -8px rgba(0,0,0,0.7);
  --tv2-coin: #e0a84a;
  --primary: var(--tv2-brand);
  --primary-foreground: var(--tv2-on-brand);
  --ring: var(--tv2-focus);
}

/* 视频页 Hero：保留标题节点和顺序，仅覆盖换人新版的局部外观。 */
.tv2.vhero { display: grid; gap: var(--tv2-space-5); padding: var(--tv2-space-2) 0 var(--tv2-space-6); }
.tv2 .vhero__txt { display: grid; gap: var(--tv2-space-4); justify-items: start; align-content: center; min-width: 0; }
.tv2 .vhero__title { width: 100%; min-width: 0; }
.tv2 .vhero__title .text-center { display: grid; gap: var(--tv2-space-4); justify-items: start; max-width: none; margin: 0; text-align: left; }
.tv2 .vhero__badge, .tv2 .vhero__title .bg-purple-100 { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin: 0; border-radius: var(--tv2-radius-pill); background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); font: 700 12px/16px var(--tv2-font-sans); letter-spacing: .06em; text-transform: uppercase; }
.tv2 .vhero__badge .ic { width: 14px; height: 14px; }
.tv2 .vhero__title .bg-purple-100::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5L18 18M6 18l2.5-2.5M15.5 8.5L18 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5L18 18M6 18l2.5-2.5M15.5 8.5L18 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.tv2.tv2-head .vhero__title .text-3xl { margin: 0; font: 700 32px/36px var(--tv2-font-display); letter-spacing: -.02em; color: var(--tv2-ink); text-align: left; }
.tv2.tv2-head .vhero__title .text-gray-500 { margin: 0; font-size: 17px; line-height: 26px; max-width: 34em; color: var(--tv2-ink-muted); text-align: left; }
.tv2 .vhero__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tv2 .vhero__chips .chip .ic { width: 15px; height: 15px; }
.tv2 .vhero__acts { display: flex; flex-wrap: wrap; gap: var(--tv2-space-3); margin-top: var(--tv2-space-1); width: 100%; }
.tv2 .vhero__acts .e-btn { gap: 8px; }
.tv2 .vhero__acts .e-btn--secondary .ic { fill: currentColor; stroke: none; }
.tv2 .vex { margin: 0; display: grid; gap: 8px; justify-items: center; justify-self: center; width: min(100%, 300px, calc(62vh * 9 / 16)); min-width: 0; }
.tv2.vhero--land .vex { width: 100%; justify-self: stretch; }
.tv2 .vfacade { position: relative; width: 100%; border-radius: var(--tv2-radius-lg); overflow: hidden; background: #2b3038; box-shadow: 0 2px 4px rgba(23,24,28,.08), 0 24px 48px -20px rgba(23,24,28,.45); }
.tv2 .vfacade__frame, .tv2 .vfacade__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #2b3038; border: 0; }
.tv2 .vex__tag { position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--tv2-radius-pill); background: var(--tv2-overlay); color: var(--tv2-on-overlay); font-size: 12px; line-height: 16px; font-weight: 700; pointer-events: none; }
.tv2 .vex__tag .ic { width: 13px; height: 13px; }
.tv2 .vfacade__play { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--tv2-overlay); color: var(--tv2-on-overlay); cursor: pointer; }
.tv2 .vfacade__play .ic { width: 28px; height: 28px; fill: currentColor; stroke: none; margin-left: 3px; }
.tv2 .vfacade__play:hover { background: rgba(0,0,0,.85); }
.tv2 .vfacade__play:focus-visible { outline: 2px solid var(--tv2-focus); outline-offset: 4px; }
.tv2 .vex__caption { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--tv2-ink-muted); }
.tv2 .vex__caption .ic { width: 14px; height: 14px; color: var(--tv2-brand-ink); }
@media (min-width: 768px) {
  .tv2.vhero { padding: var(--tv2-space-6) 40px; margin-bottom: var(--tv2-space-6); border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-lg); background: radial-gradient(120% 140% at 0% 0%, var(--tv2-brand-soft) 0%, var(--tv2-surface) 55%); }
  .tv2.tv2-head .vhero__title .text-3xl { font-size: 40px; line-height: 44px; }
  .tv2.tv2-head .vhero__title .text-gray-500 { font-size: 18px; line-height: 28px; }
}
@media (min-width: 1024px) {
  .tv2.vhero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 40px; }
  .tv2.tv2-head .vhero__title .text-3xl { font-size: 58px; line-height: 60px; }
  .tv2 .vex { justify-self: center; width: clamp(220px, min(22vw, calc((100vh - 340px) * 9 / 16)), 280px); }
  .tv2.vhero--land { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  /* 横版标题收小，沿用度量匹配的回退字体，减少网页字体加载时的换行变化。 */
  .tv2.tv2-head.vhero--land .vhero__title .text-3xl { font-size: 40px; line-height: 44px; }
  .tv2.vhero--solo { grid-template-columns: minmax(0, 1fr); }
}
.tv2.vhero--land .vhero__acts .e-btn { flex: 1 1 auto; }
@media (max-width: 767px) {
  .tv2 .vhero__acts .e-btn { flex: 1 1 160px; }
}

/* 原片弹窗：门户根节点也带作用域，关闭时卸载外观层和播放器。 */
.tv2.pv-dialog { width: min(780px, calc(100vw - 32px)); max-width: min(780px, calc(100vw - 32px)); padding: 0; gap: 0; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--tv2-surface); border-color: var(--tv2-line); border-radius: var(--tv2-radius-lg); }
.tv2 .pv { display: grid; grid-template-columns: minmax(0, 1fr); }
.tv2 .pv__media { position: relative; background: #0f1115; display: grid; place-items: center; }
.tv2 .pv__media .vfacade { border-radius: 0; box-shadow: none; }
.tv2 .pv--port .pv__media .vfacade { width: auto; height: min(56vh, 520px); max-width: 100%; }
.tv2 .pv--land .pv__media .vfacade { width: 100%; }
.tv2 .pv__info { padding: var(--tv2-space-5); display: grid; gap: var(--tv2-space-2); align-content: center; min-width: 0; }
.tv2 .pv__k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tv2-brand-ink); display: flex; align-items: center; gap: 6px; }
.tv2 .pv__k .ic { width: 14px; height: 14px; flex-shrink: 0; }
.tv2 .pv__title { margin: 0; font: 700 24px/28px var(--tv2-font-display); color: var(--tv2-ink); }
.tv2 .pv__description { margin: 0; font-size: 14px; line-height: 22px; color: var(--tv2-ink-muted); }
.tv2 .pv__next { margin: var(--tv2-space-2) 0 0; font-size: 13px; font-weight: 600; color: var(--tv2-ink); display: flex; align-items: center; gap: 6px; }
.tv2 .pv__next .ic { width: 16px; height: 16px; }
.tv2 .pv__info .e-btn { margin-top: var(--tv2-space-2); width: 100%; display: flex; }
.tv2 .pv__close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--tv2-surface); }
@media (min-width: 640px) {
  .tv2 .pv--port { grid-template-columns: auto minmax(0, 1fr); }
  .tv2 .pv--port .pv__media .vfacade { height: min(72vh, 560px); }
  .tv2 .pv__info { padding: var(--tv2-space-6) var(--tv2-space-5); }
}
@media (min-width: 768px) {
  .tv2 .pv--land { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.dark .tv2 .vfacade { box-shadow: 0 2px 4px rgba(0,0,0,.35), 0 24px 48px -20px rgba(0,0,0,.65); }
.dark .tv2 .pv__media .vfacade { box-shadow: none; }

/* 视频操作区与舞台，沿用亮暗主题令牌。 */
/* 视频工作台（第九版）：顶部 Hero 讲清主题，工作台只放操作区 */
.tv2 .vw { display: block; }


/* 主体：左边照片区（宽），右边核对和创建（窄） */
.tv2 .vw-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.tv2 .vw-main { padding: var(--tv2-space-5); display: grid; gap: var(--tv2-space-4); align-content: start; min-width: 0; }
.tv2 .vw-side { padding: var(--tv2-space-5); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tv2-space-4); align-content: start; background: var(--tv2-surface-sunk); border-top: 1px solid var(--tv2-line); min-width: 0; }
@media (min-width: 1024px) {
  .tv2 .vw-body { grid-template-columns: minmax(0, 1fr) clamp(300px, 35%, 340px); }
  .tv2 .vw-side { border-top: 0; border-left: 1px solid var(--tv2-line); padding-inline: 20px; }
}
/* 平板：右栏挪到下方并分成两列 */
@media (min-width: 768px) and (max-width: 1023px) {
  .tv2 .vw-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--tv2-space-5); }
  .tv2 .vw-side > .vsec { grid-column: 1 / -1; }
  .tv2 .vw-side > .vq, .tv2 .vw-side > .vtiers, .tv2 .vw-side > .vcons { grid-column: 1; align-self: start; }
  .tv2 .vw-side > .vsum { grid-column: 2; grid-row: 2; }
  .tv2 .vw-side > .vgo { grid-column: 2; grid-row: 3 / span 2; }
}
.tv2 .vsec { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tv2 .vsec__n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); font: 700 12px/26px var(--tv2-font-sans); text-align: center; }
.tv2 .vsec__t { font-size: 15px; line-height: 20px; font-weight: 700; }
.tv2 .vsec__aside { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--tv2-ink-subtle); text-align: right; }
.tv2 .vsec .linkbtn { margin-left: auto; white-space: nowrap; }
.tv2 .vsec .linkbtn .ic { width: 14px; height: 14px; }

/* 照片槽 */
.tv2 .vslots { display: grid; grid-template-columns: repeat(var(--tv2-slot-count, 3), minmax(0, 1fr)); gap: 16px; }
.tv2 .vslot { display: grid; gap: 8px; align-content: start; min-width: 0; }
.tv2 .vslots--1 { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--tv2-space-4); }
.tv2 .vslots--1 .vslot { width: min(100%, 240px); }
.tv2 .vslots--1 .vhint { width: 100%; }
@media (min-width: 480px) {
  .tv2 .vslots--1 { grid-template-columns: clamp(180px, 36%, 260px) minmax(0, 1fr); justify-items: stretch; align-items: start; column-gap: var(--tv2-space-5); }
  .tv2 .vslots--1 .vslot { width: auto; }
}
.tv2 .vslot__media { position: relative; }
.tv2 .vslot__box { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; margin: 0; overflow: hidden; border: 1.5px dashed var(--tv2-line-strong); border-radius: var(--tv2-radius-md); background: var(--tv2-surface-sunk); color: var(--tv2-ink); font: inherit; cursor: pointer; }
.tv2 .vslot__box:not(.is-filled):hover { border-color: var(--tv2-brand); }
.tv2 .vslot__box:not(.is-filled):hover .vslot__up { border-color: var(--tv2-brand); color: var(--tv2-brand-ink); }
.tv2 .vslot__box .role { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: grayscale(.2); }
.tv2 .vslot__cta { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; font-size: 14px; line-height: 18px; font-weight: 600; }
.tv2 .vslot__up { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--tv2-surface); border: 1px solid var(--tv2-line-strong); color: var(--tv2-ink); box-shadow: 0 2px 8px -4px rgba(0,0,0,.3); }
.tv2 .vslot__up .ic { width: 20px; height: 20px; }
.tv2 .vslot__cta-text { background: var(--tv2-surface); padding: 2px 8px; border-radius: var(--tv2-radius-pill); }
.tv2 .vslot__box.is-filled { border-style: solid; border-color: var(--tv2-line); cursor: default; background: var(--tv2-surface); }
.tv2 .vslot__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tv2 .vslot__box.is-missing { border: 2px solid var(--tv2-danger-ink); }
.tv2 .vslot__num { position: absolute; top: 8px; left: 8px; z-index: 2; height: 24px; min-width: 24px; padding: 0 7px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: var(--tv2-overlay); color: var(--tv2-on-overlay); font-size: 12px; font-weight: 700; pointer-events: none; }
.tv2 .vslot__num.is-ok { background: var(--tv2-ok-ink); color: var(--tv2-surface); }
.tv2 .vslot__num .ic { width: 13px; height: 13px; stroke-width: 3; }
.tv2 .vslot__rm { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--tv2-overlay); color: var(--tv2-on-overlay); cursor: pointer; }
.tv2 .vslot__rm .ic { width: 15px; height: 15px; }
.tv2 .vslot__rep { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; height: 34px; border: 0; border-radius: var(--tv2-radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--tv2-overlay); color: var(--tv2-on-overlay); font: 600 13px/18px var(--tv2-font-sans); cursor: pointer; white-space: nowrap; overflow: hidden; }
.tv2 .vslot__rep:hover, .tv2 .vslot__rm:hover { background: rgba(0,0,0,.85); }
.tv2 .vslot__rep .ic { width: 15px; height: 15px; }
.tv2 .vslot__lbl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tv2-ink-muted); text-align: center; }
/* 两个槽位之间的互换按钮，压在缝隙中间 */
.tv2 .vswap { position: absolute; top: 50%; right: -24px; z-index: 3; width: 32px; height: 32px; transform: translateY(-50%); border-radius: 50%; border: 1px solid var(--tv2-line-strong); background: var(--tv2-surface); color: var(--tv2-ink); display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 2px 8px -4px rgba(0,0,0,.35); }
.tv2 .vswap:hover:not(:disabled) { border-color: var(--tv2-brand); color: var(--tv2-brand-ink); }
.tv2 .vswap:disabled { color: var(--tv2-ink-subtle); cursor: default; box-shadow: none; }
.tv2 .vswap .ic { width: 15px; height: 15px; }
@media (max-width: 767px) {
  .tv2 .vslots { gap: 10px; }
  .tv2 .vswap { width: 26px; height: 26px; right: -18px; }
  .tv2 .vswap .ic { width: 13px; height: 13px; }
  .tv2 .vslot__up { width: 34px; height: 34px; }
  .tv2 .vslot__up .ic { width: 16px; height: 16px; }
  .tv2 .vslot__cta { font-size: 12px; gap: 6px; }
  .tv2 .vslot__cta-text { display: none; }
  .tv2 .vslot__num { top: 5px; left: 5px; height: 20px; min-width: 20px; padding: 0 5px; font-size: 11px; }
  .tv2 .vslot__rm { top: 4px; right: 4px; width: 26px; height: 26px; }
  .tv2 .vslot__rep { left: 5px; right: 5px; bottom: 5px; height: 28px; }
  .tv2 .vslot__rep .t { display: none; }
  .tv2 .vslot__lbl { font-size: 12px; line-height: 16px; }
  .tv2 .vsec__aside { display: none; }
}

/* 照片说明 */
.tv2 .vhint { display: grid; gap: 6px; margin: 0; padding: 10px 14px; border-radius: var(--tv2-radius-md); background: var(--tv2-surface-sunk); font-size: 13px; line-height: 19px; color: var(--tv2-ink-muted); }
.tv2 .vhint__row { margin: 0; display: flex; gap: 8px; }
.tv2 .vhint .ic { color: var(--tv2-brand-ink); margin-top: 1px; }
.tv2 .vhint__em { color: var(--tv2-ink); font-weight: 600; }

/* 清晰度：单档一行，多档三张卡 */
.tv2 .vq { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-md); background: var(--tv2-surface); font-size: 14px; line-height: 20px; }
.tv2 .vq__label { color: var(--tv2-ink-muted); }
.tv2 .vq__value { margin-left: auto; font-weight: 700; }
.tv2 .vtiers { display: grid; grid-template-columns: repeat(var(--tv2-tier-count), minmax(0, 1fr)); gap: 8px; margin: 0; padding: 8px 0 0; min-width: 0; }
.tv2 .vtier { position: relative; display: grid; gap: 2px; padding: 10px 10px 9px; border: 1px solid var(--tv2-line-strong); border-radius: var(--tv2-radius-md); background: var(--tv2-surface); cursor: pointer; min-width: 0; }
.tv2 .vtier__input { position: absolute; opacity: 0; pointer-events: none; }
.tv2 .vtier__label { font-size: 16px; line-height: 22px; }
.tv2 .vtier__p { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tv2-ink-muted); }
.tv2 .vtier__p .ic { width: 13px; height: 13px; }
.tv2 .vtier.is-on { border-color: var(--tv2-brand); box-shadow: 0 0 0 1px var(--tv2-brand); background: var(--tv2-brand-soft); }
.tv2 .vtier.is-on .vtier__p { color: var(--tv2-brand-ink); }
.tv2 .vtier:has(.vtier__input:focus-visible) { outline: 2px solid var(--tv2-brand); outline-offset: 2px; }
.tv2 .vtier.is-disabled { opacity: .6; cursor: default; }
.tv2 .vtier__best { position: absolute; top: -9px; right: 8px; height: 18px; padding: 0 6px; border-radius: var(--tv2-radius-pill); background: var(--tv2-brand); color: var(--tv2-on-brand); font: 700 10px/18px var(--tv2-font-sans); letter-spacing: .04em; text-transform: uppercase; }


/* 同意勾选 */
.tv2 .vcons { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--tv2-line); border-radius: var(--tv2-radius-md); background: var(--tv2-surface); font-size: 13px; line-height: 19px; cursor: pointer; }
.tv2 .vcons__input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--tv2-brand); cursor: pointer; }
.tv2 .vcons__terms { color: var(--tv2-brand-ink); font-weight: 600; }
.tv2 .vcons.is-err { border-color: var(--tv2-danger-ink); box-shadow: 0 0 0 1px var(--tv2-danger-ink); }

/* 结算 */
.tv2 .vsum { display: grid; gap: 6px; font-size: 14px; line-height: 20px; }
.tv2 .vsum__r { display: flex; align-items: center; justify-content: space-between; gap: var(--tv2-space-2); }
.tv2 .vsum__label { color: var(--tv2-ink-muted); white-space: nowrap; }
.tv2 .vsum__value { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.tv2 .vsum__r.tot { border-top: 1px solid var(--tv2-line); padding-top: 8px; margin-top: 2px; }
.tv2 .vsum__r .need { color: var(--tv2-danger-ink); }
.tv2 .vsum__r .linkbtn { font-size: 13px; text-align: right; }
.tv2 .vsum__note { margin: -2px 0 0; font-size: 12px; line-height: 16px; color: var(--tv2-ink-subtle); text-align: right; }
.tv2 .vgo { display: grid; gap: 8px; }
.tv2 .vgo .e-btn { width: 100%; padding-inline: 12px; gap: 8px; white-space: normal; height: auto; min-height: 52px; }
.tv2 .vgo .err { display: flex; gap: 6px; align-items: flex-start; }
.tv2 .vrefund { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--tv2-ink-muted); }
.tv2 .vrefund .ic { width: 14px; height: 14px; color: var(--tv2-ok-ink); }

/* 提交后的结果舞台 */
.tv2 .vstage { display: grid; gap: var(--tv2-space-5); justify-items: center; align-content: center; padding: var(--tv2-space-6) var(--tv2-space-5); min-height: 460px; background: var(--tv2-surface-sunk); }
@media (min-width: 768px) {
  .tv2 .vstage { grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 1fr); grid-template-areas: "l p r"; align-items: center; min-height: 600px; }
  .tv2 .vstage .vplayer { grid-area: p; }
  .tv2 .vstage__l { grid-area: l; justify-self: end; }
  .tv2 .vstage__r { grid-area: r; justify-self: start; }
}
.tv2 .vplayer { position: relative; width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: var(--tv2-radius-md); overflow: hidden; background: #2b3038; box-shadow: var(--tv2-shadow-workspace); }
.tv2 .vplayer__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tv2 .vplayer__tag { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--tv2-overlay); color: var(--tv2-on-overlay); padding: 3px 8px; border-radius: var(--tv2-radius-pill); pointer-events: none; }
.tv2 .vplayer__output { position: absolute; inset: 0; }
.tv2 .vplayer__output .relative { height: 100%; }
.tv2 .vplayer__output .w-full { width: 100%; height: 100%; object-fit: contain; }
.tv2 .vplayer__veil { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tv2-on-overlay); }
.tv2 .vplayer__veil.dim { background: var(--tv2-overlay); }
.tv2 .vplayer .spin { width: 30px; height: 30px; border-color: var(--tv2-on-overlay); border-right-color: transparent; }
.tv2 .vstage__r { display: grid; gap: var(--tv2-space-3); width: 100%; max-width: 260px; }
.tv2 .vstage__r .e-btn { width: 100%; }
.tv2 .vstage__r .chip { justify-self: start; }
.tv2 .vstage__acts { display: grid; gap: var(--tv2-space-2); }
.tv2 .vleave { margin: 0; display: grid; gap: 4px; justify-items: start; font-size: 13px; line-height: 19px; font-weight: 600; }
.tv2 .vleave .sep { display: none; }
.tv2 .vcast { display: grid; gap: 8px; justify-items: center; }
.tv2 .vcast__t { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tv2-ink-subtle); }
.tv2 .vcast__row { display: flex; gap: 8px; }
.tv2 .vcast__photo { width: 54px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; border: 1px solid var(--tv2-line); background: var(--tv2-surface); }
@media (min-width: 768px) { .tv2 .vcast__row { flex-direction: column; } }
@media (min-width: 768px) and (max-width: 1023px) {
  .tv2 .vstage { grid-template-columns: minmax(0, 300px) minmax(0, 260px); grid-template-areas: "p r" "p l"; justify-content: center; column-gap: var(--tv2-space-6); }
  .tv2 .vstage > .vplayer { grid-area: p; }
  .tv2 .vstage__r { grid-area: r; align-self: end; }
  .tv2 .vstage__l { grid-area: l; align-self: start; justify-self: start; justify-items: start; }
  .tv2 .vstage .vcast__row { flex-direction: row; }
}
@media (max-width: 767px) {
  .tv2 .vplayer { max-width: 240px; }
  .tv2 .vstage__r { max-width: 320px; order: 2; }
  .tv2 .vstage__l { order: 3; }
}
.tv2 .vstage.is-fail { min-height: 380px; }
.tv2 .vplayer.vplayer--land { aspect-ratio: 16 / 9; max-width: 100%; }
.tv2 .vstage.vstage--land { min-height: 420px; }
@media (min-width: 768px) {
  .tv2 .vstage.vstage--land { grid-template-columns: minmax(0, 720px) minmax(0, 240px); grid-template-areas: "p r" "p l"; justify-content: center; column-gap: var(--tv2-space-6); }
  .tv2 .vstage--land > .vplayer { grid-area: p; }
  .tv2 .vstage--land .vstage__r { grid-area: r; align-self: end; justify-self: start; }
  .tv2 .vstage--land .vstage__l { grid-area: l; align-self: start; justify-self: start; justify-items: start; }
  .tv2 .vstage--land .vcast__row { flex-direction: row; }
}
.tv2 .vfail { grid-column: 1 / -1; width: 100%; max-width: 440px; display: grid; gap: var(--tv2-space-3); justify-items: center; text-align: center; padding: var(--tv2-space-5); border-radius: var(--tv2-radius-lg); background: var(--tv2-surface); border: 1px solid var(--tv2-line); }
.tv2 .vfail__ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--tv2-danger-soft); color: var(--tv2-danger-ink); }
.tv2 .vfail__ic .ic { width: 22px; height: 22px; }
.tv2 .vfail__title { margin: 0; font: 700 20px/26px var(--tv2-font-display); }
.tv2 .vfail__hint { margin: 0; font-size: 14px; line-height: 20px; color: var(--tv2-ink-muted); }
.tv2 .vfail .e-hstack { gap: var(--tv2-space-2); flex-wrap: wrap; justify-content: center; }
.tv2 .steps3 { display: flex; gap: var(--tv2-space-2); }
.tv2 .step { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--tv2-ink-subtle); text-align: center; }
.tv2 .step__ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--tv2-line); background: var(--tv2-surface); }
.tv2 .step__ic .ic { width: 18px; height: 18px; }
.tv2 .step.is-done { color: var(--tv2-ok-ink); }
.tv2 .step.is-done .step__ic { border-color: var(--tv2-ok-ink); background: var(--tv2-ok-soft); }
.tv2 .step.is-now { color: var(--tv2-ink); }
.tv2 .step.is-now .step__ic { border-color: var(--tv2-brand); color: var(--tv2-brand-ink); animation: tv2-pulse 1.4s ease-in-out infinite; }

@media (max-width: 767px) {
  .tv2 .vw-main, .tv2 .vw-side { padding: var(--tv2-space-4); }
  .tv2 .vstage { padding: var(--tv2-space-5) var(--tv2-space-4); }
}

.tv2 .vw-body.is-hidden { display: none; }
.tv2 .vfacade:focus { outline: none; }
.tv2 .vslot__box:focus-visible, .tv2 .vslot__rep:focus-visible, .tv2 .vslot__rm:focus-visible, .tv2 .vswap:focus-visible, .tv2 .vcons__input:focus-visible, .tv2 .vorientation__input:focus-visible { outline: 2px solid var(--tv2-focus); outline-offset: 2px; }
.tv2 .vslot__box:disabled, .tv2 .vslot__rep:disabled, .tv2 .vslot__rm:disabled { cursor: default; opacity: .6; }
.tv2 .vorientation { display: flex; flex-wrap: wrap; gap: var(--tv2-space-3); }
.tv2 .vorientation__option { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tv2 .vorientation__input { accent-color: var(--tv2-brand); }
.tv2 .vw .e-sticky .e-btn { width: 100%; }
.tv2 .vplayer--error { padding: var(--tv2-space-4); display: grid; align-content: center; color: var(--tv2-ink); background: var(--tv2-surface); }
.tv2 .vstage__r { min-width: 0; }
.tv2 .vstage__r .e-btn { justify-content: center; }
.dark .tv2 .vplayer { box-shadow: var(--tv2-shadow-workspace); }
@media (min-width: 1024px) {
  .tv2 .tv2-main:has(.vw) { container-type: inline-size; container-name: tv2-video; }
  @container tv2-video (max-width: 899px) {
    .tv2 .vw-body { grid-template-columns: minmax(0, 1fr); }
    .tv2 .vw-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--tv2-space-5); border-left: 0; border-top: 1px solid var(--tv2-line); }
    .tv2 .vw-side .vsec { grid-column: 1 / -1; }
    .tv2 .vw-side .vq, .tv2 .vw-side .vtiers, .tv2 .vw-side .vcons, .tv2 .vw-side .vorientation { grid-column: 1; align-self: start; }
    .tv2 .vw-side .vsum { grid-column: 2; grid-row: 2; }
    .tv2 .vw-side .vgo { grid-column: 2; grid-row: 3 / span 3; }
    .tv2 .vstage { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); grid-template-areas: "p r" "p l"; min-height: 460px; }
    .tv2 .vstage .vplayer { grid-area: p; }
    .tv2 .vstage .vstage__r { grid-area: r; justify-self: start; }
    .tv2 .vstage .vstage__l { grid-area: l; justify-self: start; }
    .tv2 .vstage .vcast__row { flex-direction: row; }
    .tv2 .vstage--land { grid-template-columns: minmax(0, 1fr) minmax(0, 240px); }
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tv2 .vw-side .vorientation { grid-column: 1; }
  .tv2 .vw-side .vgo { grid-row: 3 / span 3; }
}
.tv2 .vw-main, .tv2 .vw-side, .tv2 .vslot__box, .tv2 .vslot__rm, .tv2 .vslot__rep, .tv2 .vplayer, .tv2 .vfail, .tv2 .vq, .tv2 .vcons { box-sizing: border-box; }
/* 完成态以播放器为中心，窄工作台将操作区和照片移到下方。 */
.tv2 .vstage.vstage--done { grid-template-columns: minmax(0, 1fr); grid-template-areas: "p" "r" "l"; align-items: center; }
.tv2 .vstage--done .vplayer { grid-area: p; place-self: center; }
.tv2 .vstage--done .vplayer__cover { object-fit: contain; }
.tv2 .vstage--done .vstage__l { grid-area: l; align-self: center; justify-self: center; justify-items: center; }
.tv2 .vstage--done .vstage__r { grid-area: r; align-self: center; justify-self: center; }
@media (min-width: 768px) {
  .tv2 .vstage.vstage--done { grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 1fr); grid-template-areas: "l p r"; }
  .tv2 .vstage.vstage--done.vstage--land { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); }
  .tv2 .vstage--done .vstage__l { justify-self: end; }
  .tv2 .vstage--done .vstage__r { justify-self: start; }
  .tv2 .vstage--done .e-btn { padding-inline: 12px; white-space: normal; height: auto; min-height: 52px; }
}
@media (min-width: 1024px) {
  @container tv2-video (max-width: 899px) {
    .tv2 .vstage.vstage--done, .tv2 .vstage.vstage--done.vstage--land { grid-template-columns: minmax(0, 1fr); grid-template-areas: "p" "r" "l"; }
    .tv2 .vstage--done .vstage__l, .tv2 .vstage--done .vstage__r { justify-self: center; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .tv2 .vstage .step.is-now .step__ic { animation: none; }
}

/* 视频页 Hero 模板切换条，复用分段选项和 chip 令牌 */
.tv2 .vswitch { display: flex; flex-wrap: wrap; gap: var(--tv2-space-2); min-width: 0; width: 100%; }
.tv2 .vswitch__item { box-sizing: border-box; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--tv2-line-strong); border-radius: var(--tv2-radius-pill); background: var(--tv2-surface); color: var(--tv2-ink); font: 600 13px/18px var(--tv2-font-sans); text-decoration: none; }
.tv2 .vswitch__item .ic { flex: 0 0 auto; width: 15px; height: 15px; }
.tv2 .vswitch__name { min-width: 0; overflow-wrap: anywhere; }
.tv2 .vswitch__count { color: var(--tv2-ink-muted); font-size: 12px; font-weight: 500; }
.tv2 .vswitch__item:hover { border-color: var(--tv2-brand); background: var(--tv2-surface-sunk); }
.tv2 .vswitch__item.is-on { border-color: var(--tv2-brand); box-shadow: 0 0 0 1px var(--tv2-brand); background: var(--tv2-brand-soft); color: var(--tv2-brand-ink); }
.tv2 .vswitch__item.is-on .vswitch__count { color: var(--tv2-brand-ink); }
.tv2 .vswitch__item:focus-visible { outline: 2px solid var(--tv2-focus); outline-offset: 2px; }

/* 视频生成的固定预计时间与提交区提示换行 */
.tv2 .veta { margin: 0; font-size: 13px; line-height: 19px; font-weight: 600; color: var(--tv2-ink); }
.tv2 .vgo .vrefund { min-width: 0; white-space: normal; }
.tv2 .vgo .vrefund .ic { flex-shrink: 0; }
.tv2 .vrefund--eta .ic { color: var(--tv2-ink-muted); }

/* 视频生成中的留页主句与保存次句，后置覆盖原有离开提示布局 */
.tv2 .vstay { margin: 0; font-size: 13px; line-height: 19px; font-weight: 600; color: var(--tv2-ink); }
.tv2 .vleave.small { margin: 0; display: block; justify-items: normal; font-size: 12px; line-height: 18px; font-weight: 400; color: var(--tv2-ink-muted); }
.tv2 .vleave .linkbtn { font-size: inherit; }
