/* ==========================================================================
   旅游合同违约金与退费计算器 · 登机牌 + 撕票存根
   独立设计：航图浅蓝纸 + 海蓝 + 珊瑚，等宽字体承载金额
   ========================================================================== */

.tv-page {
  --tv-bg: #eef4f7;
  --tv-bg-2: #e5eef3;
  --tv-hero: #f4f9fb;
  --tv-card: #ffffff;
  --tv-paper: #f8fbfc;
  --tv-ink: #10222c;
  --tv-ink-2: #3f5763;
  --tv-ink-3: #7b8f99;
  --tv-line: #d6e3e9;
  --tv-line-2: #e7eef2;

  --tv-blue: #16628f;
  --tv-blue-deep: #0f4d72;
  --tv-blue-soft: #e4eff6;
  --tv-blue-line: #bcd8e7;
  --tv-coral: #dd6446;
  --tv-coral-deep: #bf5034;
  --tv-coral-soft: #fbe9e3;
  --tv-coral-line: #f1c9bc;
  --tv-teal: #1a7f74;
  --tv-teal-soft: #e2f2ee;
  --tv-teal-line: #b8ded6;

  --tv-shadow: 0 1px 2px rgba(16, 34, 44, .04), 0 18px 40px -30px rgba(16, 34, 44, .5);
  --tv-shadow-lift: 0 2px 4px rgba(16, 34, 44, .05), 0 30px 60px -34px rgba(16, 34, 44, .55);
  --tv-ring: rgba(22, 98, 143, .16);

  --tv-mono: "JetBrains Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  --tv-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  background:
    radial-gradient(880px 420px at 88% -6%, rgba(22, 98, 143, .1), transparent 62%),
    radial-gradient(720px 360px at 0% 4%, rgba(221, 100, 70, .06), transparent 58%),
    repeating-linear-gradient(90deg, rgba(22, 98, 143, .045) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(22, 98, 143, .035) 0 1px, transparent 1px 72px),
    var(--tv-bg);
  color: var(--tv-ink);
  font-family: var(--tv-sans);
  font-size: 15px;
  line-height: 1.72;
  padding: 0 0 78px;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] .tv-page {
  --tv-bg: #0b141a;
  --tv-bg-2: #0f1b22;
  --tv-hero: #101e26;
  --tv-card: #14222b;
  --tv-paper: #17262f;
  --tv-ink: #e6eff3;
  --tv-ink-2: #a7bac3;
  --tv-ink-3: #768b95;
  --tv-line: #263a45;
  --tv-line-2: #1e2f38;

  --tv-blue: #67b8dd;
  --tv-blue-deep: #1b6d94;
  --tv-blue-soft: #122a37;
  --tv-blue-line: #274a5d;
  --tv-coral: #ea8368;
  --tv-coral-deep: #b8553a;
  --tv-coral-soft: #2e1c17;
  --tv-coral-line: #4a2d25;
  --tv-teal: #5fc0ae;
  --tv-teal-soft: #112a26;
  --tv-teal-line: #214741;

  --tv-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 46px -30px rgba(0, 0, 0, .95);
  --tv-shadow-lift: 0 2px 4px rgba(0, 0, 0, .45), 0 30px 64px -36px rgba(0, 0, 0, 1);
  --tv-ring: rgba(103, 184, 221, .2);

  background:
    radial-gradient(880px 440px at 88% -6%, rgba(103, 184, 221, .08), transparent 60%),
    radial-gradient(720px 380px at 0% 4%, rgba(234, 131, 104, .05), transparent 58%),
    repeating-linear-gradient(90deg, rgba(103, 184, 221, .035) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(103, 184, 221, .028) 0 1px, transparent 1px 72px),
    var(--tv-bg);
  color: var(--tv-ink);
  color-scheme: dark;
}

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

.tv-page a { color: inherit; }
.tv-page ::selection { background: var(--tv-coral-soft); color: var(--tv-ink); }

.tv-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 面包屑 ---------- */
.tv-crumb {
  padding: 20px 0 14px;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--tv-ink-3);
}
.tv-crumb a {
  color: var(--tv-ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.tv-crumb a:hover { color: var(--tv-blue); border-bottom-color: currentColor; }
.tv-crumb span { color: var(--tv-ink); }

/* ---------- 按钮 ---------- */
.tv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--tv-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s;
}
.tv-btn:active { transform: translateY(1px); }
.tv-btn:focus-visible { outline: 2px solid var(--tv-coral); outline-offset: 2px; }
.tv-btn:disabled { opacity: .62; cursor: progress; }

.tv-btn.solid {
  background: var(--tv-blue-deep);
  color: #fdfefe;
  box-shadow: 0 8px 18px -12px rgba(15, 77, 114, .9);
}
.tv-btn.solid:hover { background: var(--tv-blue); }
.tv-btn.solid.ai {
  background: var(--tv-coral-deep);
  box-shadow: 0 8px 18px -12px rgba(191, 80, 52, .95);
}
.tv-btn.solid.ai:hover { background: var(--tv-coral); }

.tv-btn.line {
  background: var(--tv-card);
  border-color: var(--tv-line);
  color: var(--tv-ink-2);
}
.tv-btn.line:hover {
  border-color: var(--tv-blue-line);
  color: var(--tv-blue);
  background: var(--tv-blue-soft);
}

.tv-btn.mini {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--tv-card);
  border-color: var(--tv-line);
  color: var(--tv-ink-2);
}
.tv-btn.mini:hover { border-color: var(--tv-coral-line); color: var(--tv-coral); }

:root[data-theme="dark"] .tv-btn.solid { color: #f2fbfe; }

/* ==========================================================================
   首屏
   ========================================================================== */
.tv-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 402px;
  gap: 32px;
  align-items: start;
  padding: 34px 30px 34px 36px;
  background: var(--tv-hero);
  border: 1px solid var(--tv-line);
  border-radius: 20px;
  box-shadow: var(--tv-shadow);
  overflow: hidden;
}
.tv-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tv-blue) 0 62%, var(--tv-coral) 62% 100%);
}
.tv-hero::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -120px;
  width: 460px;
  height: 460px;
  border: 1px dashed var(--tv-blue-line);
  border-radius: 50%;
  opacity: .5;
  pointer-events: none;
}

.tv-hero-copy { position: relative; z-index: 1; padding-top: 4px; }

.tv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tv-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tv-blue);
}
.tv-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--tv-coral);
}

.tv-hero h1 {
  margin: 12px 0 14px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.025em;
  color: var(--tv-ink);
}
.tv-hero h1 b {
  position: relative;
  color: var(--tv-blue);
  font-weight: 700;
}
.tv-hero h1 b::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 7px;
  background: var(--tv-coral-soft);
  z-index: -1;
}

.tv-sub {
  margin: 0;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.94;
  color: var(--tv-ink-2);
}
.tv-sub b { color: var(--tv-ink); font-weight: 600; }

.tv-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 22px;
}
.tv-hero-tags span {
  padding: 4px 11px;
  border: 1px dashed var(--tv-blue-line);
  border-radius: 999px;
  font-family: var(--tv-mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--tv-blue);
  background: var(--tv-card);
}

.tv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 登机牌 ---------- */
.tv-pass {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  background: var(--tv-card);
  border: 1px solid var(--tv-line);
  border-radius: 14px;
  box-shadow: var(--tv-shadow-lift);
  overflow: hidden;
}

.tv-pass-body { padding: 16px 18px 18px; }

.tv-pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--tv-line);
  font-family: var(--tv-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--tv-blue);
}
.tv-pass-top em {
  font-style: normal;
  color: var(--tv-ink-3);
  letter-spacing: .06em;
}

.tv-pass-key {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  padding: 13px 0 12px;
}
.tv-pass-key-cell span {
  display: block;
  font-size: 10.5px;
  color: var(--tv-ink-3);
  letter-spacing: .02em;
}
.tv-pass-key-cell b {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 2px;
  font-family: var(--tv-mono);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--tv-ink);
  letter-spacing: -.03em;
}
.tv-pass-key-cell b i { font-style: normal; }
.tv-pass-key-cell b em {
  font-style: normal;
  font-family: var(--tv-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--tv-ink-3);
}
.tv-pass-key-cell.right { text-align: right; }
.tv-pass-key-cell.right b {
  justify-content: flex-end;
  color: var(--tv-coral);
  font-size: 24px;
}

.tv-pass-plane {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tv-pass-plane::before,
.tv-pass-plane::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--tv-blue-line) 0 4px, transparent 4px 8px);
}
.tv-pass-plane i {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  color: var(--tv-blue);
}
.tv-pass-plane i::before { content: "✈"; }

.tv-pass-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px dashed var(--tv-line);
  padding-top: 11px;
}
.tv-pass-cells > div {
  padding: 0 10px;
  border-left: 1px dashed var(--tv-line);
}
.tv-pass-cells > div:first-child { padding-left: 0; border-left: 0; }
.tv-pass-cells > div:last-child { padding-right: 0; }
.tv-pass-cells span {
  display: block;
  font-size: 10px;
  color: var(--tv-ink-3);
}
.tv-pass-cells b {
  display: block;
  margin-top: 3px;
  font-family: var(--tv-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--tv-ink);
  white-space: nowrap;
}
.tv-pass-cells > div:first-child b { color: var(--tv-coral); }
.tv-pass-cells > div:last-child b { color: var(--tv-blue); }

.tv-pass-total {
  margin-top: 13px;
  padding: 11px 13px 12px;
  border: 1px dashed var(--tv-blue-line);
  border-radius: 10px;
  background: var(--tv-blue-soft);
}
.tv-pass-total > span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .02em;
  color: var(--tv-blue);
}
.tv-pass-total strong {
  display: block;
  margin-top: 3px;
  font-family: var(--tv-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.035em;
  color: var(--tv-ink);
  white-space: nowrap;
}
.tv-pass-total em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 10.5px;
  color: var(--tv-ink-3);
}
.tv-pass-total em b {
  font-family: var(--tv-mono);
  font-size: 11px;
  color: var(--tv-coral);
}

/* 撕票存根 */
.tv-pass-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  border-left: 2px dashed var(--tv-line);
  background:
    repeating-linear-gradient(-45deg, rgba(22, 98, 143, .05) 0 6px, transparent 6px 12px),
    var(--tv-paper);
}
.tv-pass-stub::before,
.tv-pass-stub::after {
  content: "";
  position: absolute;
  left: -7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--tv-hero);
  border: 1px solid var(--tv-line);
}
.tv-pass-stub::before { top: -7px; }
.tv-pass-stub::after { bottom: -7px; }

.tv-stub-label {
  font-family: var(--tv-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--tv-coral);
  transform: rotate(180deg);
  writing-mode: vertical-rl;
}
.tv-pass-stub b {
  font-family: var(--tv-mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--tv-ink);
}
.tv-barcode {
  display: block;
  width: 100%;
  height: 28px;
  background: repeating-linear-gradient(
    90deg,
    var(--tv-ink) 0 2px,
    transparent 2px 4px,
    var(--tv-ink) 4px 5px,
    transparent 5px 8px,
    var(--tv-ink) 8px 11px,
    transparent 11px 13px,
    var(--tv-ink) 13px 14px,
    transparent 14px 17px
  );
  opacity: .5;
}
.tv-pass-stub em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--tv-ink-3);
  white-space: nowrap;
}

/* ==========================================================================
   工作区
   ========================================================================== */
.tv-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 24px;
  margin-top: 26px;
  align-items: start;
}
.tv-col-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tv-block {
  background: var(--tv-card);
  border: 1px solid var(--tv-line);
  border-radius: 16px;
  box-shadow: var(--tv-shadow);
  overflow: hidden;
}
.tv-block-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 22px 13px;
}
.tv-no {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--tv-blue-line);
  border-radius: 8px;
  background: var(--tv-blue-soft);
  font-family: var(--tv-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--tv-blue);
}
.tv-block-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--tv-ink);
}
.tv-block-head p {
  margin: 1px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--tv-ink-3);
}
.tv-block-body {
  padding: 4px 22px 20px;
}

/* ---------- 表单 ---------- */
.tv-field-block { margin-bottom: 16px; }
.tv-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.tv-label label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tv-ink);
}
.tv-label span {
  font-size: 11.5px;
  color: var(--tv-ink-3);
  text-align: right;
}

.tv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tv-chips button {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--tv-line);
  border-radius: 8px;
  background: var(--tv-paper);
  font-family: var(--tv-sans);
  font-size: 13px;
  color: var(--tv-ink-2);
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.tv-chips button:hover { border-color: var(--tv-blue-line); color: var(--tv-blue); }
.tv-chips button.on {
  background: var(--tv-blue-deep);
  border-color: var(--tv-blue-deep);
  color: #fbfeff;
  font-weight: 500;
  box-shadow: 0 6px 14px -10px rgba(15, 77, 114, .9);
}

.tv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}
.tv-grid.tight { margin-top: 15px; }

.tv-field { min-width: 0; }
.tv-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tv-ink-2);
}
.tv-field > label em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--tv-ink-3);
}

.tv-input {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--tv-line);
  border-radius: 9px;
  background: var(--tv-paper);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.tv-input:hover { border-color: var(--tv-blue-line); }
.tv-input:focus-within {
  border-color: var(--tv-blue);
  background: var(--tv-card);
  box-shadow: 0 0 0 3px var(--tv-ring);
}
.tv-input.is-bad {
  border-color: var(--tv-coral);
  background: var(--tv-coral-soft);
}
.tv-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--tv-mono);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--tv-ink);
  outline: none;
}
.tv-input input::placeholder { color: var(--tv-ink-3); font-weight: 400; }
.tv-input .pre {
  flex: 0 0 auto;
  font-family: var(--tv-mono);
  font-size: 13px;
  color: var(--tv-ink-3);
}
.tv-input .unit {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--tv-ink-3);
}
.tv-input.big input { font-size: 16px; }
.tv-input.big .pre { font-size: 14px; }
.tv-input.date input {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.tv-input.readonly {
  background: var(--tv-bg-2);
  border-style: dashed;
}
.tv-input.readonly input {
  color: var(--tv-ink-2);
  cursor: default;
}

/* ---------- 快速时点 ---------- */
.tv-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 15px;
  padding: 11px 14px;
  border: 1px dashed var(--tv-line);
  border-radius: 10px;
  background: var(--tv-paper);
}
.tv-quick > span {
  font-size: 11.5px;
  color: var(--tv-ink-3);
  white-space: nowrap;
}
.tv-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tv-quick-chips button {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--tv-line);
  border-radius: 999px;
  background: var(--tv-card);
  font-family: var(--tv-mono);
  font-size: 11.5px;
  color: var(--tv-ink-2);
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.tv-quick-chips button:hover {
  border-color: var(--tv-coral-line);
  color: var(--tv-coral);
}
.tv-quick-chips button.on {
  background: var(--tv-coral-soft);
  border-color: var(--tv-coral-line);
  color: var(--tv-coral-deep);
  font-weight: 600;
}
:root[data-theme="dark"] .tv-quick-chips button.on { color: var(--tv-coral); }

.tv-inline-tip {
  margin: 11px 0 0;
  padding-left: 14px;
  position: relative;
  font-size: 11.5px;
  line-height: 1.72;
  color: var(--tv-ink-3);
}
.tv-inline-tip::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tv-blue-line);
}
.tv-inline-tip.is-bad { color: var(--tv-coral); }
.tv-inline-tip.is-bad::before { background: var(--tv-coral); }

/* ---------- 档位尺 ---------- */
.tv-ruler {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  margin-bottom: 2px;
  border: 1px solid var(--tv-line);
  border-radius: 11px;
  background: var(--tv-paper);
  overflow: hidden;
}
.tv-ruler-cell {
  position: relative;
  padding: 13px 6px 11px;
  text-align: center;
  border-left: 1px dashed var(--tv-line);
}
.tv-ruler-cell:first-child { border-left: 0; }
.tv-ruler-cell span {
  display: block;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--tv-ink-3);
  white-space: nowrap;
}
.tv-ruler-cell b {
  display: block;
  margin-top: 3px;
  font-family: var(--tv-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--tv-ink-2);
}
.tv-ruler-cell.on {
  background: var(--tv-blue-soft);
  box-shadow: inset 0 3px 0 var(--tv-blue);
}
.tv-ruler-cell.on span { color: var(--tv-blue); }
.tv-ruler-cell.on b { color: var(--tv-blue); }

/* ---------- 比例脚注 ---------- */
.tv-rate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}
.tv-rate-foot > span {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--tv-ink-3);
}

/* ---------- 两种口径 ---------- */
.tv-caliber {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tv-caliber-card {
  padding: 15px 16px 16px;
  border: 1px solid var(--tv-blue-line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--tv-blue-soft), transparent 72%), var(--tv-card);
}
.tv-caliber-card.alt {
  border-color: var(--tv-coral-line);
  background: linear-gradient(180deg, var(--tv-coral-soft), transparent 72%), var(--tv-card);
}
.tv-caliber-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--tv-blue);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: #fbfeff;
}
.tv-caliber-card.alt .tv-caliber-tag { background: var(--tv-coral-deep); color: #fff7f4; }
.tv-caliber-card h3 {
  margin: 8px 0 6px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--tv-ink);
}
.tv-caliber-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--tv-ink-2);
}
.tv-caliber-card p b { color: var(--tv-ink); font-weight: 600; }
.tv-caliber-num {
  display: block;
  margin-top: 9px;
  font-family: var(--tv-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--tv-blue);
}
.tv-caliber-card.alt .tv-caliber-num { color: var(--tv-coral); }

/* ---------- 方案判读 ---------- */
.tv-verdict {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px dashed var(--tv-line);
  border-left-width: 3px;
  border-radius: 9px;
  background: var(--tv-paper);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--tv-ink-2);
}
.tv-verdict b {
  font-family: var(--tv-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.tv-verdict.none { color: var(--tv-ink-3); }
.tv-verdict.low {
  border-color: var(--tv-coral-line);
  border-left-color: var(--tv-coral);
  background: var(--tv-coral-soft);
  color: var(--tv-ink-2);
}
.tv-verdict.low b { color: var(--tv-coral-deep); }
.tv-verdict.mid {
  border-color: var(--tv-blue-line);
  border-left-color: var(--tv-blue);
  background: var(--tv-blue-soft);
}
.tv-verdict.mid b { color: var(--tv-blue); }
.tv-verdict.high {
  border-color: var(--tv-teal-line);
  border-left-color: var(--tv-teal);
  background: var(--tv-teal-soft);
}
.tv-verdict.high b { color: var(--tv-teal); }
:root[data-theme="dark"] .tv-verdict.low b { color: var(--tv-coral); }

/* ---------- 表格 ---------- */
.tv-table-wrap {
  width: 100%;
  border: 1px solid var(--tv-line);
  border-radius: 11px;
  background: var(--tv-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tv-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tv-table th,
.tv-table td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--tv-line-2);
}
.tv-table th {
  background: var(--tv-blue-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--tv-blue);
  border-bottom-color: var(--tv-blue-line);
}
.tv-table th:first-child,
.tv-table td:first-child { text-align: left; }
.tv-table td {
  font-family: var(--tv-mono);
  letter-spacing: -.01em;
  color: var(--tv-ink-2);
}
.tv-table td:nth-child(2),
.tv-table td:nth-child(3) { font-family: var(--tv-sans); }
.tv-table tbody tr:last-child td { border-bottom: 0; }
.tv-table tbody tr.on td {
  background: var(--tv-coral-soft);
  color: var(--tv-ink);
  font-weight: 600;
}
.tv-table tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--tv-coral); color: var(--tv-coral-deep); }
.tv-table tbody tr.empty td {
  padding: 26px 14px;
  text-align: center;
  font-family: var(--tv-sans);
  font-size: 12px;
  line-height: 1.7;
  color: var(--tv-ink-3);
  white-space: normal;
}
:root[data-theme="dark"] .tv-table tbody tr.on td:first-child { color: var(--tv-coral); }

/* ---------- 批量 ---------- */
.tv-textarea {
  display: block;
  width: 100%;
  min-height: 116px;
  padding: 11px 13px;
  border: 1px solid var(--tv-line);
  border-radius: 9px;
  background: var(--tv-paper);
  font-family: var(--tv-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--tv-ink);
  resize: vertical;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.tv-textarea::placeholder { color: var(--tv-ink-3); }
.tv-textarea:focus {
  border-color: var(--tv-blue);
  background: var(--tv-card);
  box-shadow: 0 0 0 3px var(--tv-ring);
}

.tv-batch-format {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--tv-ink-3);
}

.tv-batch-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.tv-batch-count {
  margin-left: auto;
  font-family: var(--tv-mono);
  font-size: 11.5px;
  color: var(--tv-ink-3);
}

.tv-batch-err {
  display: none;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--tv-coral-line);
  border-left: 3px solid var(--tv-coral);
  border-radius: 8px;
  background: var(--tv-coral-soft);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--tv-ink-2);
}
.tv-batch-err.on { display: block; }
.tv-batch-err b { color: var(--tv-coral-deep); font-weight: 600; }
:root[data-theme="dark"] .tv-batch-err b { color: var(--tv-coral); }

.tv-block-body > .tv-table-wrap { margin-top: 14px; }

/* ==========================================================================
   右侧结算单
   ========================================================================== */
.tv-slip {
  position: sticky;
  top: 88px;
  padding: 0 20px 20px;
  background: var(--tv-card);
  border: 1px solid var(--tv-line);
  border-radius: 16px;
  box-shadow: var(--tv-shadow-lift);
  overflow: hidden;
}

.tv-slip-head {
  margin: 0 -20px 4px;
  padding: 19px 20px 17px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 7px, transparent 7px 14px),
    linear-gradient(135deg, var(--tv-blue) 0%, var(--tv-blue-deep) 100%);
  color: #fbfeff;
}
:root[data-theme="dark"] .tv-slip-head {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 7px, transparent 7px 14px),
    linear-gradient(135deg, #1b6d94 0%, #124d6b 100%);
  color: #f2fbfe;
}
.tv-slip-head > span {
  display: block;
  font-family: var(--tv-mono);
  font-size: 9px;
  letter-spacing: .2em;
  opacity: .72;
}
.tv-slip-head h2 {
  margin: 4px 0 3px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}
.tv-slip-head em {
  display: block;
  font-style: normal;
  font-size: 11px;
  line-height: 1.6;
  opacity: .8;
}

.tv-rows {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.tv-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8.5px 0;
  border-bottom: 1px dashed var(--tv-line-2);
}
.tv-rows li:last-child { border-bottom: 0; }
.tv-rows span {
  font-size: 12px;
  line-height: 1.6;
  color: var(--tv-ink-2);
}
.tv-rows span i {
  font-style: normal;
  font-family: var(--tv-mono);
  font-size: 11px;
  color: var(--tv-blue);
}
.tv-rows b.v {
  flex: 0 0 auto;
  font-family: var(--tv-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--tv-ink);
}
.tv-rows b.v.minus { color: var(--tv-coral); }
.tv-rows li.sum { background: var(--tv-paper); margin: 0 -20px; padding: 8.5px 20px; }
.tv-rows li.sum span { font-weight: 600; color: var(--tv-ink); }
.tv-rows li.sum b.v { font-weight: 700; color: var(--tv-blue); }

.tv-slip-total {
  margin-top: 14px;
  padding: 13px 14px 12px;
  border: 1px dashed var(--tv-blue-line);
  border-radius: 11px;
  background: var(--tv-blue-soft);
}
.tv-slip-total > span {
  display: block;
  font-size: 10.5px;
  color: var(--tv-blue);
}
.tv-total-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}
.tv-total-num b {
  font-family: var(--tv-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--tv-ink);
  white-space: nowrap;
}
.tv-total-num i {
  font-style: normal;
  font-size: 12px;
  color: var(--tv-ink-3);
}
.tv-total-band {
  position: relative;
  height: 6px;
  margin: 10px 0 7px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, var(--tv-blue-line) 0 3px, transparent 3px 6px),
    var(--tv-card);
  overflow: hidden;
}
.tv-total-band i {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--tv-coral), var(--tv-blue));
}
.tv-total-note {
  font-family: var(--tv-mono);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: -.01em;
  color: var(--tv-ink-3);
  word-break: break-all;
}

.tv-slip-mid {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 10px;
  padding: 10px 13px;
  border: 1px dashed var(--tv-coral-line);
  border-radius: 10px;
  background: var(--tv-coral-soft);
}
.tv-slip-mid > span {
  font-size: 11px;
  color: var(--tv-ink-2);
}
.tv-slip-mid > b {
  margin-left: auto;
  font-family: var(--tv-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--tv-coral-deep);
}
.tv-slip-mid em {
  flex: 1 1 100%;
  font-style: normal;
  font-size: 10.5px;
  color: var(--tv-ink-3);
}
.tv-slip-mid em i {
  font-style: normal;
  font-family: var(--tv-mono);
  color: var(--tv-ink-2);
}
:root[data-theme="dark"] .tv-slip-mid > b { color: var(--tv-coral); }

.tv-hint {
  margin: 11px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--tv-ink-3);
}

.tv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tv-actions .tv-btn {
  flex: 1 1 46%;
  height: 40px;
  padding: 0 8px;
  font-size: 13px;
}
.tv-actions .tv-btn.solid { flex: 1 1 100%; }

/* ==========================================================================
   AI
   ========================================================================== */
.tv-ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding: 22px 24px;
  border: 1px solid var(--tv-line);
  border-radius: 16px;
  background:
    repeating-linear-gradient(-45deg, rgba(22, 98, 143, .035) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, var(--tv-blue-soft), transparent 70%),
    var(--tv-card);
  box-shadow: var(--tv-shadow);
}
.tv-ai-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.tv-ai-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tv-coral-deep);
  font-family: var(--tv-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff7f4;
}
.tv-ai-copy h2 {
  margin: 0 0 4px;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--tv-ink);
}
.tv-ai-copy p {
  margin: 0;
  max-width: 720px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--tv-ink-2);
}
.tv-ai > .tv-btn { height: 44px; padding: 0 20px; }

.tv-ai-status {
  display: none;
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--tv-blue-line);
  font-size: 13px;
  line-height: 1.86;
  color: var(--tv-ink-2);
}
.tv-ai-status.on { display: block; }
.tv-ai-status.is-loading { color: var(--tv-ink-3); }
.tv-ai-status.is-error { color: var(--tv-coral); }
.tv-ai-status .ai-title {
  display: block;
  margin: 11px 0 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--tv-blue);
}
.tv-ai-status .ai-title:first-child { margin-top: 0; }
.tv-ai-status p { margin: 0 0 6px; }
.tv-ai-status p:last-child { margin-bottom: 0; }

/* ==========================================================================
   文档
   ========================================================================== */
.tv-docs {
  margin-top: 30px;
  padding: 0 2px;
}
.tv-docs-head h2 {
  margin: 10px 0 10px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--tv-ink);
}
.tv-docs-head p {
  margin: 0;
  max-width: 900px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--tv-ink-2);
}

.tv-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.tv-doc {
  padding: 20px 22px 21px;
  background: var(--tv-card);
  border: 1px solid var(--tv-line);
  border-radius: 14px;
  box-shadow: var(--tv-shadow);
}
.tv-doc.wide { grid-column: 1 / -1; }
.tv-doc h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--tv-ink);
}
.tv-doc h3::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 2px;
  background: var(--tv-coral);
}
.tv-doc p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--tv-ink-2);
}
.tv-doc p:last-child { margin-bottom: 0; }
.tv-doc p b { color: var(--tv-ink); font-weight: 600; }
.tv-doc ul {
  margin: 8px 0 10px;
  padding-left: 18px;
}
.tv-doc li {
  margin: 4px 0;
  font-size: 12.5px;
  line-height: 1.82;
  color: var(--tv-ink-2);
}
.tv-doc li::marker { color: var(--tv-coral); }

.tv-doc-table {
  margin: 10px 0 12px;
  border: 1px solid var(--tv-line);
  border-radius: 10px;
  overflow-x: auto;
}
.tv-doc-table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tv-doc-table th,
.tv-doc-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--tv-line-2);
  text-align: left;
}
.tv-doc-table th {
  background: var(--tv-blue-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--tv-blue);
  white-space: nowrap;
}
.tv-doc-table td {
  color: var(--tv-ink-2);
}
.tv-doc-table td:nth-child(2),
.tv-doc-table td:nth-child(3) {
  font-family: var(--tv-mono);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.tv-doc-table tbody tr:last-child td { border-bottom: 0; }

.tv-faq { border-top: 1px dashed var(--tv-line); }
.tv-faq details {
  border-bottom: 1px dashed var(--tv-line);
  padding: 11px 2px;
}
.tv-faq summary {
  position: relative;
  padding-left: 21px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--tv-ink);
  list-style: none;
  cursor: pointer;
}
.tv-faq summary::-webkit-details-marker { display: none; }
.tv-faq summary::before {
  content: "+";
  position: absolute;
  left: 2px;
  top: 0;
  font-family: var(--tv-mono);
  font-size: 14px;
  color: var(--tv-coral);
}
.tv-faq details[open] summary { color: var(--tv-blue); }
.tv-faq details[open] summary::before { content: "–"; }
.tv-faq-body {
  padding: 7px 2px 2px 21px;
  font-size: 12.5px;
  line-height: 1.88;
  color: var(--tv-ink-2);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .tv-wrap { padding: 0 20px; }
  .tv-hero {
    grid-template-columns: minmax(0, 1fr) 356px;
    gap: 26px;
    padding: 30px 26px 30px 30px;
  }
  .tv-hero h1 { font-size: 36px; }
  .tv-work { grid-template-columns: minmax(0, 1fr) 348px; gap: 22px; }
  .tv-pass-total strong { font-size: 16px; }
  .tv-total-num b { font-size: 17px; }
  .tv-rows b.v { font-size: 12px; }
}

@media (max-width: 1080px) {
  .tv-hero { grid-template-columns: minmax(0, 1fr); }
  .tv-pass { max-width: 460px; margin-top: 2px; }
  .tv-work { grid-template-columns: minmax(0, 1fr); }
  .tv-slip { position: static; }
}

@media (max-width: 900px) {
  .tv-docs-grid { grid-template-columns: minmax(0, 1fr); }
  .tv-doc.wide { grid-column: auto; }
  .tv-block-head { padding: 16px 18px 11px; }
  .tv-block-body { padding: 4px 18px 18px; }
  .tv-ai { grid-template-columns: minmax(0, 1fr); }
  .tv-ai > .tv-btn { width: 100%; }
}

@media (max-width: 620px) {
  .tv-wrap { padding: 0 14px; }
  .tv-hero { padding: 24px 18px 24px 20px; gap: 20px; }
  .tv-hero h1 { font-size: 30px; }
  .tv-sub { font-size: 13.5px; line-height: 1.9; }
  .tv-hero-actions .tv-btn { flex: 1 1 auto; }

  .tv-pass {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }
  .tv-pass-stub {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-left: 0;
    border-top: 2px dashed var(--tv-line);
  }
  .tv-pass-stub::before,
  .tv-pass-stub::after { display: none; }
  .tv-stub-label {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: .16em;
  }
  .tv-pass-stub b { font-size: 13px; }
  .tv-barcode { flex: 1 1 auto; width: auto; height: 22px; }
  .tv-pass-stub em { display: none; }

  .tv-pass-cells span { font-size: 9.5px; }
  .tv-pass-cells b { font-size: 11.5px; }
  .tv-pass-total strong { font-size: 15.5px; }

  .tv-grid { grid-template-columns: minmax(0, 1fr); }
  .tv-label { display: block; }
  .tv-label span { display: block; text-align: left; margin-top: 2px; }
  .tv-caliber { grid-template-columns: minmax(0, 1fr); }
  .tv-ruler-cell { padding: 10px 4px 9px; }
  .tv-ruler-cell span { font-size: 9.5px; }
  .tv-ruler-cell b { font-size: 12px; }
  .tv-block-head h2 { font-size: 16px; }
  .tv-batch-bar .tv-btn { flex: 1 1 auto; }
  .tv-batch-count { margin-left: 0; width: 100%; }
  .tv-actions .tv-btn { flex: 1 1 45%; }
  .tv-ai { padding: 18px 16px; }
  .tv-ai-copy { gap: 11px; }
  .tv-ai-copy h2 { font-size: 16px; }
  .tv-docs-head h2 { font-size: 20px; }
  .tv-doc { padding: 17px 16px 18px; }
  .tv-faq-body { padding-left: 6px; }
}

@media (max-width: 420px) {
  .tv-crumb { font-size: 11.5px; }
  .tv-hero h1 { font-size: 27px; }
  .tv-eyebrow { font-size: 9.5px; letter-spacing: .14em; }
  .tv-hero-tags span { font-size: 10px; padding: 3px 9px; }
  .tv-pass-key { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .tv-pass-key-cell b { font-size: 23px; }
  .tv-pass-key-cell.right b { font-size: 19px; }
  .tv-pass-cells > div { padding: 0 7px; }
  .tv-pass-cells b { font-size: 10.5px; }
  .tv-pass-total strong { font-size: 14px; letter-spacing: -.045em; }
  .tv-total-num b { font-size: 16px; }
  .tv-slip { padding: 0 15px 16px; }
  .tv-slip-head { margin: 0 -15px 4px; padding: 16px 15px 14px; }
  .tv-rows li.sum { margin: 0 -15px; padding: 8.5px 15px; }
  .tv-actions .tv-btn { flex: 1 1 100%; }
  .tv-caliber-num { font-size: 17px; }
  .tv-slip-mid > b { font-size: 17px; }
}
