/* ════════════════════════════════════════════════════════════════════════
   Tour v3 — „Six things you stop doing by hand.“
   Die Bühne zeigt die echten PaneScale-Oberflächen im App-Thema „Graphite Dark“.
   ════════════════════════════════════════════════════════════════════════ */

.tv-wrap {
  max-width: 1440px;
}
.tv-tour {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 56px;
  margin-top: 8px;
}

/* ── Textspalte ─────────────────────────────────────────────────────────── */

.tv-st {
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  opacity: 0.3;
  transition: opacity 0.5s var(--ease);
}
.tv-st.is-active {
  opacity: 1;
}
.tv-st:first-child {
  min-height: 70vh;
  justify-content: flex-start;
  padding-top: 10vh;
}
.tv-num {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font: 500 13px var(--mono);
  color: var(--muted);
}
.tv-num .i {
  font-size: 16px;
  color: var(--b2);
}
.tv-num-bar {
  position: relative;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.tv-num-bar i {
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
}
.tv-num-of {
  color: var(--faint);
}
.tv-st h3 {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.tv-st > p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}
.tv-st .ticks li code {
  font: 500 0.86em var(--mono);
  color: var(--text);
}
.tv-st .link-arrow {
  margin-top: 24px;
}
.tv-inline {
  display: none;
}

/* ── Bühne ──────────────────────────────────────────────────────────────── */

.tv-stage {
  --tv-h: clamp(460px, calc(100vh - var(--header-h) - 214px), 620px);
  position: sticky;
  top: calc(var(--header-h) + 18px);
  align-self: start;
}
.tv-chapters {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tv-chapters::-webkit-scrollbar {
  display: none;
}
.tv-chapters button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px 9px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.25s, background 0.25s;
}
.tv-chapters button .mono {
  font-size: 11px;
  color: var(--faint);
}
.tv-chapters button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.tv-chapters button.is-on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.tv-chapters button i {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.tv-chapters button.is-on i {
  opacity: 1;
}

.tv-frame {
  position: relative;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 40%, rgba(110, 139, 255, 0.18));
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 30px 90px -40px rgba(77, 107, 255, 0.35);
}
.tv-frame::before {
  content: '';
  position: absolute;
  inset: -40px -30px;
  z-index: -1;
  background: radial-gradient(50% 60% at 70% 30%, rgba(77, 107, 255, 0.16), transparent 70%), radial-gradient(40% 50% at 20% 90%, rgba(69, 240, 201, 0.08), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ── App-Fenster (Graphite Dark) ────────────────────────────────────────── */

.tv-win {
  --a-bg: #09090b;
  --a-canvas: #0c0c0e;
  --a-surface: #111114;
  --a-raised: #18181c;
  --a-hover: rgba(255, 255, 255, 0.055);
  --a-text: #ededf0;
  --a-muted: #9b9ba6;
  --a-faint: #6c6c78;
  --a-line: rgba(255, 255, 255, 0.07);
  --a-line2: rgba(255, 255, 255, 0.11);
  --a-accent: #6e8bff;
  --a-ok: #3dd68c;
  --a-warn: #f5b83d;
  --a-err: #f26d6d;
  --a-info: #6ea8fe;
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--tv-h);
  border-radius: 13px;
  overflow: hidden;
  background: var(--a-bg);
  color: var(--a-text);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: -0.003em;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
}
.tv-win .i {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}
.tv-grow {
  flex: 1;
  min-width: 0;
}
.tv-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.tv-faint {
  color: var(--a-faint);
}
.tv-muted {
  color: var(--a-muted);
  margin: 4px 0 0;
}
.tv-small {
  font-size: 11px;
}
.tv-ell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tv-win .mono,
.tv-win code,
.tv-win pre {
  font-family: var(--mono);
  font-size: 0.92em;
}
.tv-ok {
  color: var(--a-ok);
}
.is-gone {
  display: none !important;
}

/* Titelleiste */
.tv-tb {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 4px 0 12px;
  background: var(--a-canvas);
  border-bottom: 1px solid var(--a-line);
}
.tv-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}
.tv-brand .mark {
  width: 16px;
  height: 16px;
}
.tv-modes {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--a-surface);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-modes span {
  padding: 3px 11px;
  border-radius: 6px;
  color: var(--a-muted);
  font-size: 11.5px;
  transition: background 0.35s, color 0.35s;
}
.tv-modes span.is-on {
  background: var(--a-raised);
  color: var(--a-text);
  box-shadow: 0 0 0 1px var(--a-line2);
}
.tv-cond {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  color: var(--a-muted);
  font-weight: 500;
  transition: background 0.35s, color 0.35s;
}
.tv-cond.is-on {
  color: var(--a-text);
  background: var(--a-hover);
}
.tv-cond.is-on .i {
  color: var(--a-accent);
}
.tv-conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--a-muted);
  font-size: 11.5px;
  white-space: nowrap;
}
.tv-conn i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a-ok);
  box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.14);
}
.tv-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 4px 0 8px;
  border-radius: 7px;
  background: var(--a-surface);
  box-shadow: inset 0 0 0 1px var(--a-line);
  color: var(--a-faint);
  font-size: 11.5px;
}
.tv-search kbd {
  font: 500 9.5px var(--mono);
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--a-raised);
  color: var(--a-muted);
}
.tv-wb {
  display: flex;
  color: var(--a-faint);
}
.tv-wb span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
}
.tv-wb .i {
  width: 12px;
  height: 12px;
}

.tv-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.tv-side {
  flex: none;
  width: 164px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px 10px;
  background: var(--a-canvas);
  border-right: 1px solid var(--a-line);
}
.tv-side-l {
  padding: 0 6px 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--a-faint);
}
.tv-side-i {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--a-muted);
}
.tv-side-i i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.tv-side-i span {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--a-faint);
}
.tv-side-i.is-on {
  color: var(--a-text);
  background: var(--a-hover);
}
.tv-meter {
  display: grid;
  gap: 5px;
  padding: 7px 6px;
  font-size: 10.5px;
}
.tv-meter .tv-row {
  gap: 5px;
}
.tv-mb {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tv-mb i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #d97757, #f0a37f);
}
.tv-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 6px 0;
  border-top: 1px solid var(--a-line);
  font-size: 11px;
}
.tv-user div {
  display: grid;
  line-height: 1.25;
}
.tv-av {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6e8bff, #9b5cff);
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
}

/* Szenen stapeln sich in der Bühne */
.tv-screens {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--a-surface);
}
.tv-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), visibility 0.5s;
}
.tv-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Kopf einer Stage (← Titel …) */
.tv-sh {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--a-line);
  white-space: nowrap;
}
.tv-back {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--a-muted);
}
.tv-back .i {
  width: 14px;
  height: 14px;
}
.tv-back.is-arrow .i {
  transform: rotate(180deg);
}
.tv-sh-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tv-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--a-muted);
}
.tv-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--a-bg);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-seg > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  color: var(--a-muted);
  font-size: 11.5px;
}
.tv-seg > span.is-on {
  background: var(--a-raised);
  color: var(--a-text);
  box-shadow: 0 0 0 1px var(--a-line2);
}

/* Bausteine */
.tv-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--a-muted);
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.3s;
}
.tv-btn.b-primary {
  background: var(--a-accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 16px -8px rgba(110, 139, 255, 0.8);
}
.tv-btn.b-secondary {
  background: var(--a-raised);
  color: var(--a-text);
  box-shadow: 0 0 0 1px var(--a-line2);
}
.tv-btn.b-danger {
  background: rgba(242, 109, 109, 0.12);
  color: var(--a-err);
}
.tv-btn.is-act {
  color: var(--a-text);
  background: var(--a-hover);
}
.tv-btn.is-act .i {
  color: var(--a-accent);
}
.tv-btn.is-press {
  transform: scale(0.93);
  box-shadow: 0 0 0 4px rgba(110, 139, 255, 0.28);
}
.tv-btn.is-off {
  opacity: 0;
  pointer-events: none;
}
.tv-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--a-muted);
  background: rgba(255, 255, 255, 0.06);
}
.tv-chip.t-ok {
  color: var(--a-ok);
  background: rgba(61, 214, 140, 0.12);
}
.tv-chip.t-err {
  color: var(--a-err);
  background: rgba(242, 109, 109, 0.12);
}
.tv-chip.t-warn {
  color: var(--a-warn);
  background: rgba(245, 184, 61, 0.12);
}
.tv-chip.t-info {
  color: var(--a-info);
  background: rgba(110, 168, 254, 0.12);
}
.tv-chip.t-accent {
  color: var(--ink-accent);
  background: rgba(110, 139, 255, 0.15);
}
.tv-chip.is-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: tv-pulse 1.4s ease-in-out infinite;
}
@keyframes tv-pulse {
  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}
.tv-glyph {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
}
.tv-glyph i {
  position: absolute;
  inset: 4.5px;
  border-radius: 2px;
  background: var(--c);
}
.tv-card {
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-cardhead {
  margin-bottom: 8px;
}
.tv-cardhead .i {
  color: var(--a-muted);
}
.tv-note {
  margin: 7px 0 0;
  font-size: 10.5px;
  color: var(--a-faint);
}
.tv-empty {
  color: var(--a-faint);
  font-size: 11px;
  padding: 4px 0;
}
.tv-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--a-faint);
}
.tv-spin {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--a-accent);
  animation: tv-spin 0.8s linear infinite;
}
@keyframes tv-spin {
  to {
    transform: rotate(360deg);
  }
}
.tv-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--a-accent);
  animation: tv-blink 1s steps(1) infinite;
}
@keyframes tv-blink {
  50% {
    opacity: 0;
  }
}
.tv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.tv-actions.is-on {
  opacity: 1;
  transform: none;
}
.tv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0;
  color: var(--a-muted);
}
.tv-meta b {
  color: var(--a-text);
  font-weight: 600;
}
.tv-check {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--a-muted);
  font-size: 11.5px;
}
.tv-check i {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--a-accent);
  color: #fff;
}
.tv-check i .i {
  width: 10px;
  height: 10px;
}

/* Aufklappen ohne Sprung: 0fr → 1fr */
.tv-rv {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease), opacity 0.45s var(--ease);
}
.tv-rv > div {
  min-height: 0;
  overflow: hidden;
}
.tv-rv.is-on {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* Kamera */
.tv-sc {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tv-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 22px;
  will-change: transform;
}
.tv-livehead {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tv-brief {
  margin: 7px 0 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--a-text);
}
.tv-phase {
  margin-top: 6px;
}
.tv-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  transition: opacity 0.4s;
}
.tv-base.is-dim {
  opacity: 0.45;
}

/* Tabelle */
.tv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.tv-table th {
  padding: 0 8px 7px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--a-faint);
  white-space: nowrap;
  border-bottom: 1px solid var(--a-line);
}
.tv-table td {
  padding: 7px 8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--a-line);
  transition: background 0.4s, opacity 0.4s;
}
.tv-table tr:last-child td {
  border-bottom: 0;
}
.tv-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tv-table td.mono {
  font-size: 11px;
}
.tv-act {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--a-muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.tv-lanes tbody tr:not(.tv-subrow) td {
  border-bottom: 0;
  padding-bottom: 3px;
}
.tv-subrow td {
  padding-top: 0;
}
.tv-lanes tr.is-out td {
  opacity: 0.45;
}
.tv-lanes tr.is-win td {
  background: rgba(61, 214, 140, 0.06);
}
.tv-lanes tr.is-win + .tv-subrow td {
  background: rgba(61, 214, 140, 0.06);
}
.tv-wint {
  display: inline-flex;
  margin-left: 5px;
  color: var(--a-warn);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tv-wint.is-on {
  opacity: 1;
  transform: none;
}
.tv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tv-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font: 500 10px var(--mono);
  color: var(--a-faint);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--a-line);
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}
.tv-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.tv-pill[data-s='run'] {
  color: var(--a-info);
  box-shadow: inset 0 0 0 1px rgba(110, 168, 254, 0.35);
}
.tv-pill[data-s='run']::before {
  animation: tv-pulse 0.7s ease-in-out infinite;
  opacity: 1;
}
.tv-pill[data-s='ok'] {
  color: var(--a-ok);
  background: rgba(61, 214, 140, 0.09);
  box-shadow: none;
}
.tv-pill[data-s='err'] {
  color: var(--a-err);
  background: rgba(242, 109, 109, 0.12);
  box-shadow: inset 0 0 0 1px rgba(242, 109, 109, 0.4);
}
.tv-pill[data-s='ok']::before,
.tv-pill[data-s='err']::before {
  opacity: 1;
}

/* Urteil */
.tv-verdict > .tv-row .i {
  color: var(--a-warn);
}
.tv-gates {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}
.tv-gh,
.tv-gr {
  display: grid;
  grid-template-columns: 24px minmax(90px, 150px) repeat(5, 26px) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.tv-gh span {
  font: 500 9.5px var(--mono);
  color: var(--a-faint);
  text-align: center;
}
.tv-gr {
  padding: 4px 0;
}
.tv-gr > span:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.tv-cell {
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--a-line);
  transition: background 0.3s, box-shadow 0.3s, transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tv-cell[data-s] {
  transform: scale(1.06);
}
.tv-cell[data-s='ok'] {
  background: rgba(61, 214, 140, 0.55);
  box-shadow: 0 0 10px -2px rgba(61, 214, 140, 0.6);
}
.tv-cell[data-s='err'] {
  background: rgba(242, 109, 109, 0.75);
  box-shadow: 0 0 12px -2px rgba(242, 109, 109, 0.8);
}
.tv-rank {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}
.tv-rk {
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.tv-rk.is-on {
  opacity: 1;
  transform: none;
}
.tv-rk-n {
  font: 600 10px var(--mono);
  color: var(--a-accent);
}
.tv-rk.is-win {
  display: flex;
  background: rgba(61, 214, 140, 0.08);
  box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.25);
}
.tv-rk.is-win .i {
  color: var(--a-warn);
}
.tv-rcheck {
  margin-top: 4px;
}
.tv-rcheck code {
  color: var(--a-faint);
}
.tv-rcheck[data-s='run'] .tv-dot {
  background: var(--a-info);
  animation: tv-pulse 0.7s infinite;
}
.tv-rcheck[data-s='ok'] .tv-dot {
  background: var(--a-ok);
}
.tv-receipt {
  box-shadow: 0 0 0 1px rgba(61, 214, 140, 0.25);
}

/* Dialog + Toast */
.tv-modal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 6, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.tv-modal.is-on {
  opacity: 1;
  visibility: visible;
}
.tv-dlg {
  width: min(330px, 86%);
  padding: 16px;
  border-radius: 12px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line2), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}
.tv-modal.is-on .tv-dlg {
  transform: none;
}
.tv-dlg b {
  font-size: 13.5px;
}
.tv-dlg p {
  margin: 8px 0 14px;
  color: var(--a-muted);
}
.tv-dlg-a {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.tv-toast {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, 80%);
  padding: 9px 12px;
  border-radius: 10px;
  background: #1f1f24;
  box-shadow: 0 0 0 1px var(--a-line2), 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}
.tv-toast-ic {
  display: grid;
  color: var(--a-ok);
}
.tv-toast[data-tone='err'] .tv-toast-ic {
  color: var(--a-err);
}
.tv-toast[data-tone='err'] {
  box-shadow: 0 0 0 1px rgba(242, 109, 109, 0.35), 0 18px 40px -16px rgba(0, 0, 0, 0.9);
}
.tv-rwhy {
  display: none;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  color: #ffc9c9;
  background: rgba(242, 109, 109, 0.09);
}
.tv-rwhy.is-on {
  display: flex;
  animation: tv-in 0.35s var(--ease);
}
.tv-rwhy b {
  font-family: var(--mono);
  font-weight: 500;
}
.tv-toast.is-on {
  opacity: 1;
  transform: none;
}

/* ── 02 Rewind ─────────────────────────────────────────────────────────── */

.tv-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.tv-chat {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--a-line);
  background: var(--a-surface);
}
.tv-chat::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 40px;
  z-index: 1;
  background: linear-gradient(var(--a-surface), transparent);
  pointer-events: none;
}
.tv-chat-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px;
}
.tv-msg {
  padding: 2px 0;
}
.tv-msg p {
  margin: 4px 0 0;
  min-height: 1em;
}
.tv-msg.is-you p {
  margin-left: auto;
  max-width: 88%;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 10px 10px 3px 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-msg-who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11.5px;
}
.tv-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font: 10.5px var(--mono);
  color: var(--a-muted);
  transition: max-height 0.35s var(--ease), opacity 0.35s, margin 0.35s;
}
.tv-tool.is-on {
  max-height: 20px;
  opacity: 1;
  margin-top: 2px;
}
.tv-tool .i {
  width: 11px;
  height: 11px;
  color: var(--a-faint);
}
.tv-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--a-faint);
  opacity: 0;
  transition: opacity 0.35s;
}
.tv-msg-meta.is-on {
  opacity: 1;
}
.tv-msg-meta .tv-btn {
  height: 21px;
  padding: 0 7px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.035);
}
.tv-approve {
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(110, 139, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.28);
}
.tv-approve p {
  margin: 4px 0 8px;
  color: var(--a-muted);
}
.tv-approve .i {
  color: var(--a-accent);
}
.tv-approve [data-k='apd'] {
  display: none;
}
.tv-approve [data-k='apd'].is-on {
  display: block;
}
.tv-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}
.tv-cp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--a-line);
}
.tv-cp .mono {
  font-size: 10.5px;
}
.tv-cp > span:last-child {
  margin-left: auto;
}
.tv-editor {
  padding: 0;
  overflow: hidden;
}
.tv-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--a-line);
  background: rgba(0, 0, 0, 0.15);
}
.tv-tabs > span[data-k^='tab'] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  font: 10.5px var(--mono);
  color: var(--a-faint);
  border-bottom: 1.5px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.tv-tabs > span.is-on {
  color: var(--a-text);
  border-color: var(--a-accent);
}
.tv-tabs [data-k='saved'] {
  color: var(--a-warn);
  opacity: 0;
  transition: opacity 0.3s;
}
.tv-tabs [data-k='saved'].is-on {
  opacity: 1;
}
.tv-code {
  display: none;
  margin: 0;
  padding: 10px 12px;
  font-size: 10.5px !important;
  line-height: 1.65;
  color: #c9cad3;
  white-space: pre;
  overflow: hidden;
}
.tv-code.is-on {
  display: block;
}
.c-k {
  color: #c792ea;
}
.c-s {
  color: #a5d6a7;
}
.c-c {
  color: #7f8496;
}
.c-c.is-you {
  color: #f5c97a;
  background: rgba(245, 184, 61, 0.08);
}
.tv-code .is-chg {
  color: #9db0ff;
  background: rgba(110, 139, 255, 0.14);
  border-radius: 3px;
}
.tv-rwh,
.tv-rwr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px 62px auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.tv-rwh {
  font-size: 10px;
  color: var(--a-faint);
  border-bottom: 1px solid var(--a-line);
}
.tv-rwr {
  border-bottom: 1px solid var(--a-line);
  font-size: 10.5px;
  transition: background 0.3s;
}
.tv-rwr:last-child {
  border-bottom: 0;
}
.tv-rwr .mono {
  font-size: 10px;
}
.tv-rwr[data-s='run'] {
  background: linear-gradient(90deg, transparent, rgba(110, 168, 254, 0.1), transparent);
  background-size: 200% 100%;
  animation: tv-scan 0.6s linear infinite;
}
@keyframes tv-scan {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.tv-rwr[data-s='err'] [data-k^='rwd'] {
  color: var(--a-err);
}
.tv-rwr[data-s='ok'] [data-k^='rwd'] {
  color: var(--a-ok);
}

/* ── 03 Point & Fix ────────────────────────────────────────────────────── */

.tv-pf {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.tv-browser {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--a-line);
}
.tv-url {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-bottom: 1px solid var(--a-line);
  color: var(--a-muted);
  font: 10.5px var(--mono);
}
.tv-url span {
  flex: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--a-bg);
}
.tv-url i {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--a-accent);
  box-shadow: 0 0 8px var(--a-accent);
}
.tv-site {
  flex: 1;
  padding: 14px 16px;
  background: #f7f7fa;
  color: #16161c;
  font-family: var(--font);
  transition: opacity 0.2s;
}
.tv-site.is-reload {
  opacity: 0.35;
}
.tv-site-nav {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 11px;
  color: #5d6070;
}
.tv-site-nav b {
  margin-right: auto;
  color: #16161c;
}
.tv-site-h {
  margin: 16px 0 12px;
  font-size: 17px;
  letter-spacing: -0.025em;
  color: #111;
  width: fit-content;
}
.tv-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tv-plan {
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #e4e5ec, 0 6px 16px -10px rgba(0, 0, 0, 0.25);
}
.tv-plan h4 {
  margin: 0;
  font-size: 12px;
  color: #444;
}
.tv-price {
  margin: 2px 0 6px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.tv-price small {
  font-size: 11px;
  font-weight: 400;
  color: #777;
}
.tv-plan ul {
  margin: 0 0 12px;
  padding: 0 0 0 14px;
  font-size: 10.5px;
  color: #555;
}
.tv-cta {
  display: block;
  padding: 8px 0;
  border-radius: 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #1463ff;
  transition: all 0.45s var(--ease);
}
.tv-cta.is-ghost {
  display: inline-block;
  padding: 6px 4px;
  color: #b4b9c6;
  background: transparent;
  text-align: left;
  font-weight: 500;
}
.tv-cta.is-ghost.is-fixed {
  display: block;
  padding: 8px 0;
  color: #fff;
  background: #1463ff;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.22);
}
.tv-hl {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  border: 1.5px dashed #6e8bff;
  border-radius: 6px;
  background: rgba(110, 139, 255, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease), opacity 0.25s;
}
.tv-hl.is-on {
  opacity: 1;
}
.tv-hl.is-sel {
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(110, 139, 255, 0.25);
}
.tv-hl span {
  position: absolute;
  right: -1px;
  bottom: calc(100% + 4px);
  padding: 2px 6px;
  border-radius: 5px;
  background: #6e8bff;
  color: #fff;
  font: 500 9.5px var(--mono);
  white-space: nowrap;
}
.tv-pfp {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background: var(--a-canvas);
}
.tv-pfs {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.tv-pfs.is-on {
  display: flex;
  animation: tv-in 0.4s var(--ease);
}
@keyframes tv-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
[data-k='sPick'].is-on {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 10px;
  background: rgba(110, 139, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.25);
}
.tv-pulse {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--a-accent);
  box-shadow: 0 0 0 0 rgba(110, 139, 255, 0.6);
  animation: tv-ring 1.4s ease-out infinite;
}
@keyframes tv-ring {
  to {
    box-shadow: 0 0 0 12px rgba(110, 139, 255, 0);
  }
}
.tv-el {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-el code {
  color: #9db0ff;
}
.tv-el-text {
  margin: 3px 0;
}
.tv-el .mono {
  font-size: 10px;
}
.tv-k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-faint);
}
.tv-cands {
  display: grid;
  gap: 4px;
}
.tv-cand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--a-line);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.tv-cand.is-in {
  opacity: 1;
  transform: none;
}
.tv-cand .mono {
  font-size: 10.5px;
}
.tv-cand.is-on {
  background: rgba(110, 139, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.4);
}
.tv-radio {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--a-faint);
}
.tv-cand.is-on .tv-radio {
  box-shadow: inset 0 0 0 3.5px var(--a-accent);
}
.tv-ta {
  min-height: 46px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--a-bg);
  box-shadow: inset 0 0 0 1px var(--a-line2);
}
.tv-select {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-runbox {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-runbox [data-k='act'] {
  font-family: var(--mono);
  font-size: 10.5px;
}
.tv-diff {
  border-radius: 8px;
  overflow: hidden;
  background: var(--a-bg);
  box-shadow: 0 0 0 1px var(--a-line);
  font: 10px/1.6 var(--mono);
}
.tv-diff > div {
  padding: 0 9px;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tv-diff-f {
  padding: 4px 9px !important;
  color: var(--a-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--a-line);
}
.d-h {
  color: #8aa0d8;
}
.d-c {
  color: var(--a-faint);
}
.d-d {
  color: #ffb4b4;
  background: rgba(242, 109, 109, 0.12);
}
.d-a {
  color: #a8f0c8;
  background: rgba(61, 214, 140, 0.11);
}
.tv-refine {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 10px;
  border-radius: 8px;
  background: var(--a-bg);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-refine > span {
  flex: 1;
}

/* ── 04 Guardian ───────────────────────────────────────────────────────── */

.tv-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tv-kpi {
  display: grid;
  gap: 1px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-kpi span {
  font-size: 10.5px;
  color: var(--a-faint);
}
.tv-kpi b {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tv-kpi small {
  font-size: 10px;
  color: var(--a-faint);
  line-height: 1.3;
}
.tv-usage td .tv-ubar {
  display: block;
  height: 3px;
  margin-top: 4px;
  margin-left: auto;
  width: 90px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.tv-ubar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--a-accent);
  transition: background 0.4s;
}
.tv-ubar i.is-hot {
  background: var(--a-warn);
}
.tv-ubar i.is-full {
  background: var(--a-err);
}
.tv-usage tr.is-alert td {
  background: rgba(242, 109, 109, 0.06);
}
.tv-usage td .i {
  vertical-align: -0.15em;
  display: inline-block;
}
.tv-usage td {
  white-space: nowrap;
}
.tv-g2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.tv-g2 > .tv-col {
  padding: 0;
  overflow: visible;
}
.tv-term {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 128px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #050506;
  box-shadow: inset 0 0 0 1px var(--a-line);
  font: 10.5px/1.6 var(--mono);
  overflow: hidden;
}
.tv-term > div {
  display: none;
  white-space: nowrap;
}
.tv-term > div.is-on {
  display: block;
  animation: tv-in 0.3s var(--ease);
}
.ln-cmd {
  color: #d7d8e0;
}
.ln-err {
  color: var(--a-err);
}
.ln-warn {
  color: var(--a-warn);
}
.ln-dim {
  color: var(--a-faint);
}
.ln-ok {
  color: var(--a-ok);
}
.tv-spark {
  margin-top: 8px;
  font-size: 10px;
}
.tv-spark svg {
  width: 100%;
  height: 56px;
  margin-bottom: 2px;
}
.tv-thr {
  stroke: var(--a-err);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}
.tv-sp {
  fill: none;
  stroke: var(--a-accent);
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(110, 139, 255, 0.6));
}
.tv-rule {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  color: var(--a-muted);
  transition: background 0.3s;
}
.tv-rule[data-s='fired'] {
  color: var(--a-text);
  background: rgba(245, 184, 61, 0.07);
  border-radius: 6px;
}
.tv-rule .tv-chip {
  height: 18px;
  font-size: 10px;
}
.tv-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--a-line);
  font-size: 10.5px;
}
.tv-alert .mono {
  color: var(--a-warn);
  font-size: 10px;
}
.tv-alert.is-err .mono {
  color: var(--a-err);
}

/* ── 05 Handoff ────────────────────────────────────────────────────────── */

.tv-split-ho {
  flex: none;
  height: calc(var(--tv-h) - 222px);
  min-height: 250px;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tv-split-ho > .tv-col {
  padding: 0;
}
.tv-tl {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tv-tl-in {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 34px);
  mask-image: linear-gradient(transparent, #000 34px);
}
.tv-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
}
.tv-step-ic {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--a-muted);
}
.tv-step-ic .i {
  width: 12px;
  height: 12px;
}
.tv-step.is-fail .tv-step-ic {
  color: var(--a-err);
  background: rgba(242, 109, 109, 0.12);
}
.tv-step.is-ok .tv-step-ic {
  color: var(--a-ok);
  background: rgba(61, 214, 140, 0.12);
}
.tv-step.is-ho .tv-step-ic {
  color: #fff;
  background: linear-gradient(135deg, #d97757, #5b8def);
  box-shadow: 0 0 14px -2px rgba(91, 141, 239, 0.7);
}
.tv-step-t {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 500;
  padding-top: 3px;
}
.tv-step-t .mono {
  font-size: 10px;
  font-weight: 400;
}
.tv-step-d {
  color: var(--a-faint);
  font-size: 10.5px;
}
.tv-file {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 10.5px;
}
.tv-fs {
  font: 600 9.5px var(--mono);
  text-align: center;
  border-radius: 4px;
}
.tv-fs-M {
  color: var(--a-warn);
}
.tv-fs-A {
  color: var(--a-ok);
}
.tv-prompt {
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}
.tv-prompt::-webkit-scrollbar {
  display: none;
}
.tv-ps {
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  opacity: 0.35;
  transition: opacity 0.4s, background 0.4s, box-shadow 0.4s;
}
.tv-ps.is-in {
  opacity: 0.75;
}
.tv-ps.is-hl {
  opacity: 1;
  background: rgba(110, 139, 255, 0.08);
  box-shadow: inset 2px 0 0 var(--a-accent);
}
.tv-ps-h {
  font: 600 9.5px var(--mono);
  letter-spacing: 0.04em;
  color: #9db0ff;
}
.tv-ps pre {
  margin: 3px 0 0;
  white-space: pre-wrap;
  font-size: 10px !important;
  line-height: 1.5;
  color: #c9cad3;
}
.tv-final {
  box-shadow: 0 0 0 1px rgba(61, 214, 140, 0.28);
}
.tv-final > .tv-row .i {
  color: var(--a-ok);
}

/* ── 06 Autopilot ──────────────────────────────────────────────────────── */

.tv-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line);
}
.tv-clock b {
  font: 600 18px var(--mono);
  letter-spacing: -0.02em;
}
.tv-clock [data-k='moon'] {
  display: grid;
  color: #b9c4ff;
}
.tv-clock [data-k='moon'].is-sun {
  color: var(--a-warn);
}
.tv-night {
  display: grid;
  gap: 4px;
}
.tv-night-track {
  position: relative;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(110, 139, 255, 0.07), rgba(155, 92, 255, 0.05) 60%, rgba(245, 184, 61, 0.08));
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-nb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 3px;
  background: var(--a-faint);
}
.tv-nb[data-s='run'] {
  background: repeating-linear-gradient(-45deg, var(--a-accent) 0 4px, #8ea4ff 4px 8px);
  background-size: 11px 11px;
  animation: tv-stripes 0.6s linear infinite;
}
@keyframes tv-stripes {
  to {
    background-position: 11px 0;
  }
}
.tv-nb[data-s='ready'] {
  background: var(--a-ok);
}
.tv-nb[data-s='review'] {
  background: var(--a-warn);
}
.tv-nb[data-s='failed'] {
  background: var(--a-err);
}
.tv-now {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
.tv-night-h {
  display: flex;
  justify-content: space-between;
  font: 9.5px var(--mono);
  color: var(--a-faint);
}
.tv-pre {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
}
.tv-prer {
  display: grid;
  grid-template-columns: 8px auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  font-size: 10.5px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.tv-prer.is-in {
  opacity: 1;
  transform: none;
}
.tv-dot.d-ok {
  background: var(--a-ok);
}
.tv-dot.d-warn {
  background: var(--a-warn);
}
.tv-task {
  transition: opacity 0.4s, box-shadow 0.4s;
}
.tv-task.is-dim {
  opacity: 0.5;
}
.tv-task.is-active {
  box-shadow: 0 0 0 1px rgba(110, 139, 255, 0.45), 0 10px 30px -18px rgba(110, 139, 255, 0.7);
}
.tv-src {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 1px 6px;
  border-radius: 5px;
  font: 500 10px var(--mono);
  color: var(--a-muted);
  background: rgba(255, 255, 255, 0.05);
}
.tv-src .i {
  width: 11px;
  height: 11px;
}
.tv-att {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-att .tv-row > span:last-child {
  margin-left: auto;
}
.tv-att-r {
  display: none;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--a-muted);
}
.tv-att-r.is-on {
  display: flex;
  animation: tv-in 0.35s var(--ease);
}
.tv-task-f {
  margin-top: 8px;
}
.tv-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 4px;
}
.tv-counts > div {
  display: grid;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.tv-counts b {
  font-size: 18px;
  font-weight: 600;
}
.tv-counts span {
  font-size: 10px;
  color: var(--a-faint);
}
.tv-counts .c-ok b {
  color: var(--a-ok);
}
.tv-counts .c-warn b {
  color: var(--a-warn);
}
.tv-report {
  box-shadow: 0 0 0 1px rgba(245, 184, 61, 0.25);
}
.tv-report > .tv-row .i {
  color: var(--a-warn);
}

/* ── Erklär-Ebene: Lichtkegel, Blase, Cursor ──────────────────────────── */

.tv-spot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  border-radius: 9px;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 0 6px rgba(110, 139, 255, 0.22), 0 0 0 4000px rgba(5, 5, 8, 0.38);
  opacity: 0;
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease), opacity 0.4s;
}
.tv-spot.is-on {
  opacity: 1;
}
.tv-bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 9px;
  width: max-content;
  max-width: min(290px, 70%);
  padding: 10px 13px 10px 10px;
  border-radius: 12px;
  background: rgba(250, 250, 253, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7) inset, 0 18px 40px -14px rgba(0, 0, 0, 0.75);
  color: #16161c;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -0.005em;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.35s;
}
.tv-bubble.is-on {
  opacity: 1;
}
.tv-bubble-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1463ff;
  color: #fff;
  font-size: 10px;
  font-weight: 650;
}
.tv-cursor {
  position: absolute;
  left: -3px;
  top: -2px;
  z-index: 8;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  transition: opacity 0.3s;
}
.tv-cursor.is-on {
  opacity: 1;
}
.tv-cursor.is-click::after {
  content: '';
}

/* ── Zeitleiste ────────────────────────────────────────────────────────── */

.tv-bars {
  position: relative;
  height: 50px;
  margin-top: 12px;
}
.tv-bars .tv-bar {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.tv-bars .tv-bar.is-active {
  opacity: 1;
  visibility: visible;
}
.tv-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tv-play,
.tv-restart {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.2s;
}
.tv-restart {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.tv-play:hover,
.tv-restart:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.tv-play .i {
  width: 13px;
  height: 13px;
}
.tv-play .i + .i,
.tv-bar.is-paused .tv-play .i:first-child {
  display: none;
}
.tv-bar.is-paused .tv-play .i + .i {
  display: block;
}
.tv-track {
  position: relative;
  flex: 1;
  height: 44px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.tv-track:focus-visible .tv-track-bg {
  box-shadow: 0 0 0 3px rgba(110, 139, 255, 0.4);
}
.tv-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.tv-fill {
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
}
.tv-knob {
  position: absolute;
  top: 15px;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(110, 139, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}
.tv-bar.is-drag .tv-knob,
.tv-track:hover .tv-knob {
  transform: scale(1.2);
}
.tv-ph {
  position: absolute;
  top: 0;
  width: var(--w);
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.tv-ph:first-child {
  border-left: 0;
}
.tv-ph b {
  position: absolute;
  left: 6px;
  right: 2px;
  top: 25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  transition: color 0.3s;
}
.tv-ph.is-past b {
  color: var(--muted);
}
.tv-ph.is-cur b {
  color: var(--text);
}
.tv-time {
  flex: none;
  width: 34px;
  padding-top: 7px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
}
.tv-honest {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--faint);
}
.tv-honest .i {
  width: 13px;
  height: 13px;
}

/* ── Enge Bühne: Spalten sparen ────────────────────────────────────────── */

@container (max-width: 760px) {
  .tv-table th:nth-child(6),
  .tv-table td:nth-child(6) {
    display: none;
  }
  .tv-usage th:nth-child(4),
  .tv-usage td:nth-child(4) {
    display: none;
  }
}
@container (max-width: 640px) {
  .tv-lanes th:nth-child(1),
  .tv-lanes td:nth-child(1):not([colspan]),
  .tv-lanes th:nth-child(7),
  .tv-lanes td:nth-child(7) {
    display: none;
  }
  .tv-usage th:nth-child(2),
  .tv-usage td:nth-child(2) {
    display: none;
  }
  .tv-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tv-kpi small {
    display: none;
  }
  .tv-seg > span:not(.is-on) {
    display: none;
  }
  .tv-sh .tv-conn,
  .tv-sh .tv-btn.b-ghost:last-child {
    display: none;
  }
  .tv-split,
  .tv-pf {
    grid-template-columns: minmax(0, 1fr);
  }
  .tv-split > .tv-col,
  .tv-pf > .tv-pfp {
    display: none;
  }
  .tv-g2,
  .tv-pre {
    grid-template-columns: minmax(0, 1fr);
  }
  .tv-split-ho {
    grid-template-columns: minmax(0, 1fr);
  }
  .tv-split-ho > .tv-col {
    display: none;
  }
  .tv-gh,
  .tv-gr {
    grid-template-columns: 22px minmax(60px, 90px) repeat(5, 18px) minmax(0, 1fr);
  }
  .tv-gr > span:last-child .tv-faint {
    display: none;
  }
  .tv-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tv-clock b {
    font-size: 14px;
  }
  .tv-livehead {
    flex-direction: column;
    gap: 8px;
  }
  .tv-livehead > .tv-grow {
    width: 100%;
  }
}
/* Auf schmalen Szenen zeigt Point & Fix die Vorschau, sobald gewählt das Panel */
@container (max-width: 640px) {
  .tv-pf {
    grid-template-rows: minmax(0, 1fr) minmax(0, 1.1fr);
  }
  .tv-pf > .tv-pfp {
    display: block;
    border-top: 1px solid var(--a-line);
  }
  .tv-pf > .tv-browser {
    border-right: 0;
  }
  .tv-split > .tv-col {
    display: flex;
    border-top: 1px solid var(--a-line);
  }
  .tv-split {
    grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  .tv-split > .tv-col > .tv-cps {
    display: none;
  }
  .tv-chat {
    border-right: 0;
  }
}

@media (max-width: 1200px) {
  .tv-side {
    display: none;
  }
  .tv-tour {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 40px;
  }
}
@media (max-width: 1080px) {
  .tv-search,
  .tv-tb .tv-conn {
    display: none;
  }
}

/* ── Mobil: jedes Kapitel bekommt sein eigenes Fenster ─────────────────── */

@media (max-width: 960px) {
  .tv-tour {
    display: block;
  }
  .tv-stage {
    display: none;
  }
  .tv-st,
  .tv-st:first-child {
    min-height: 0;
    padding: 34px 0;
    opacity: 1;
  }
  .tv-st + .tv-st {
    border-top: 1px solid var(--line);
  }
  .tv-inline {
    display: block;
    margin-top: 26px;
  }
  .tv-mini {
    --tv-h: 470px;
  }
  .tv-mini .tv-win {
    height: var(--tv-h);
  }
  .tv-mini .tv-modes,
  .tv-mini .tv-side {
    display: none;
  }
  .tv-mini .tv-bar {
    margin-top: 12px;
    height: 50px;
  }
  .tv-mini .tv-scene {
    transform: none;
  }
}
@media (max-width: 560px) {
  .tv-mini {
    --tv-h: 430px;
  }
  .tv-win {
    font-size: 11.5px;
  }
  .tv-content {
    padding: 12px 12px 18px;
  }
  .tv-brief {
    font-size: 14px;
  }
  .tv-ph b {
    font-size: 0;
  }
  .tv-ph.is-cur b {
    font-size: 11px;
    overflow: visible;
    right: auto;
  }
  .tv-bubble {
    max-width: 82%;
    font-size: 11.5px;
  }
  .tv-tb .tv-cond {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tv-scene,
  .tv-rv,
  .tv-spot,
  .tv-bubble,
  .tv-hl {
    transition: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Tour v5 — gepinnte Bühne: links die Kapitelliste (aktives Kapitel klappt auf), rechts EIN App-Fenster auf farbigem
   Grund, darin eine Kamera, die auf die erklärte Stelle zoomt. assets/js/tour.js („Bühne v5“) steuert Kamera,
   Kapitel und die leuchtende Fuge beim Wechsel.
   ════════════════════════════════════════════════════════════════════════ */

.tv-tour {
  display: block;
}
.tv-pin {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
  gap: 56px;
}
.tv-tour.is-deck {
  height: calc(100vh - var(--header-h) + var(--n, 6) * 75vh);
}
.tv-tour.is-deck .tv-pin {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  align-items: center;
}
.tv-tour.is-deck .tv-steps {
  display: flex;
  flex-direction: column;
}
.tv-tour.is-deck .tv-st,
.tv-tour.is-deck .tv-st:first-child {
  display: block;
  min-height: 0;
  padding: 0;
  opacity: 1;
}
.tv-tour.is-deck .tv-num {
  display: none;
}
.t5-in > p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}
.t5-row {
  display: none;
}
.tv-tour.is-deck .t5-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--faint);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s;
}
.tv-tour.is-deck .tv-st:last-child {
  border-bottom: 1px solid var(--line);
}
.t5-row .mono {
  font-size: 12px;
  color: inherit;
}
.t5-row b {
  font-weight: 560;
  letter-spacing: -0.01em;
}
.t5-row:hover {
  color: var(--muted);
}
.tv-st.is-active .t5-row {
  color: var(--text);
}
.tv-st.is-active .t5-row .mono {
  color: rgb(var(--tc, 77, 107, 255));
}
.t5-pb {
  position: relative;
  width: 72px;
  height: 2px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line-2);
  opacity: 0;
  transition: opacity 0.3s;
}
.t5-pb i {
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
}
.tv-st.is-active .t5-pb {
  opacity: 1;
}
.tv-tour.is-deck .t5-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.tv-tour.is-deck .tv-st.is-active .t5-body {
  grid-template-rows: 1fr;
}
.t5-in {
  min-height: 0;
}
.tv-tour.is-deck .t5-in {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}
.tv-tour.is-deck .tv-st.is-active .t5-in {
  opacity: 1;
  transition: opacity 0.45s 0.12s;
}
.tv-tour.is-deck .t5-in h3 {
  font-size: clamp(1.5rem, 2.1vw, 1.95rem);
}
.tv-tour.is-deck .t5-in > p {
  margin-top: 12px;
  font-size: 15px;
}
.tv-tour.is-deck .t5-in .link-arrow {
  margin: 16px 0 20px;
}

/* Bühne: ein Fenster auf farbigem Grund, Kamera darin */
.tv-tour.is-deck .tv-stage {
  --tv-h: clamp(440px, calc(100vh - var(--header-h) - 150px), 690px);
  position: relative;
  top: auto;
}
.t5-vp {
  position: relative;
  height: var(--tv-h);
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  background: #07080c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 100px -50px rgba(0, 0, 0, 0.9), 0 30px 90px -50px rgba(var(--tc, 77, 107, 255), 0.4);
}
.t5-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 70% at 22% -5%, rgba(var(--tc, 77, 107, 255), 0.32), transparent 70%),
    radial-gradient(60% 60% at 105% 105%, rgba(var(--tc, 77, 107, 255), 0.2), transparent 70%),
    linear-gradient(180deg, #0c0e16, #07080b);
}
.t5-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(80% 80% at 50% 40%, #000, transparent);
}
.t5-cam {
  position: absolute;
  inset: 24px 24px 24px 24px;
  transform-origin: 0 0;
  will-change: transform;
}
.t5-cam .tv-frame {
  height: 100%;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.t5-cam .tv-frame::before {
  display: none;
}
.t5-cam .tv-win {
  height: 100%;
}
.tv-tour.is-deck .tv-scene {
  opacity: 1;
  transform: none;
  transition: none;
}
.t5-seam {
  position: absolute;
  left: -2px;
  right: -2px;
  z-index: 5;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, #45f0c9 12%, #38b6ff 42%, #4d6bff 70%, #9b5cff 88%, transparent);
  box-shadow: 0 0 16px 3px rgba(var(--tc, 77, 107, 255), 0.6), 0 0 70px 14px rgba(var(--tc, 77, 107, 255), 0.22);
  opacity: 0;
  pointer-events: none;
}
.t5-seam.is-on {
  opacity: 1;
}
.tv-tour.is-deck .tv-bars {
  margin-top: 14px;
}
.tv-tour.is-deck .tv-honest {
  margin-top: 6px;
}

/* ── Code-Raster der App (Lanes, Übergabe) ─────────────────────────────── */

.tv-cg {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--a-canvas);
}
.tv-cg-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  font-size: 11.5px;
}
.tv-cgrid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}
.tv-cgrid.is-2 {
  grid-template-rows: 1fr;
}
.tv-pn {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0a0d;
  box-shadow: inset 0 0 0 1px var(--a-line);
  transition: box-shadow 0.35s;
}
.tv-pn.is-work {
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.3);
}
.tv-pn.needs-you {
  box-shadow: inset 0 0 0 1px rgba(245, 184, 61, 0.65), 0 0 0 3px rgba(245, 184, 61, 0.1);
}
.tv-pn.is-fresh,
.tv-pn.is-hl {
  box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.55);
}
.tv-pn-h {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 6px 0 9px;
  border-bottom: 1px solid var(--a-line);
  background: var(--a-surface);
  font-size: 11px;
  white-space: nowrap;
}
.tv-pn-h b {
  font-weight: 600;
  transition: color 0.3s;
}
.tv-pn-h b.is-pop {
  color: #b9c6ff;
}
.tv-pn-h .tv-faint {
  min-width: 0;
  font-size: 10.5px;
}
.tv-pn-st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--a-muted);
}
.tv-pd {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a-faint);
}
.tv-pd.d-work {
  background: var(--a-info);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.14);
  animation: tv-pdp 1.2s ease-in-out infinite;
}
.tv-pd.d-wait {
  background: var(--a-warn);
  box-shadow: 0 0 0 3px rgba(245, 184, 61, 0.16);
}
.tv-pd.d-idle {
  background: var(--a-ok);
}
@keyframes tv-pdp {
  50% {
    opacity: 0.4;
  }
}
.tv-lane {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10.5px;
  color: #b9c6ff;
  background: rgba(110, 139, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.3);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.tv-lane.is-plain {
  color: var(--a-muted);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-lane.is-pop {
  transform: scale(1.1);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.65), 0 0 16px rgba(110, 139, 255, 0.5);
}
.tv-pn-m,
.tv-pn-sh {
  display: grid;
  place-items: center;
  width: 22px;
  height: 20px;
  border-radius: 5px;
  color: var(--a-muted);
}
.tv-pn-sh {
  width: 16px;
}
.tv-pn-m.is-press {
  color: var(--a-text);
  background: var(--a-hover);
}
.tv-pn-b {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  padding: 8px 10px;
  overflow: hidden;
  font: 10.5px/1.5 var(--mono);
  color: #cfd2da;
}
.tv-ln {
  display: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tv-ln.is-on {
  display: block;
  animation: tv-lnin 0.25s ease-out;
}
@keyframes tv-lnin {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}
.tv-ln.l-you,
.tv-ln.l-say {
  margin-top: 4px;
  color: #eceef3;
}
.tv-ln.l-tool {
  color: #e2e5ec;
}
.tv-ln.l-out {
  color: var(--a-faint);
}
.tv-ln.l-diff {
  color: #8fd6a8;
}
.tv-ln.l-ok {
  color: var(--a-ok);
}
.tv-ln.l-warn {
  color: var(--a-warn);
}
.tv-ln.l-sys {
  color: #d99a7a;
}
.tv-ln.l-ps {
  color: #a9b8ff;
}
.tv-ln .g {
  color: var(--a-ok);
}
.tv-ln .r {
  color: var(--a-err);
}
.tv-pn-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--a-faint);
}
.tv-pn-empty.is-gone {
  display: none;
}
.tv-pn-in {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.tv-pn-in.is-on {
  display: flex;
  animation: tv-pnin 0.45s var(--ease);
}
@keyframes tv-pnin {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

/* Picker „Add pane“ mit Schalter „Isolated worktree“ (modes/code/picker.ts) und Pane-Menü (pane.ts) */
.tv-pick,
.tv-menu {
  position: absolute;
  z-index: 5;
  padding: 6px;
  border-radius: 10px;
  background: var(--a-raised);
  box-shadow: 0 0 0 1px var(--a-line2), 0 24px 50px -16px rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.22s, transform 0.25s var(--ease), visibility 0.22s;
}
.tv-pick.is-on,
.tv-menu.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.tv-pick {
  left: 22px;
  top: 52px;
  width: 292px;
}
.tv-pick-h {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 4px;
  font-size: 12px;
}
.tv-pick-s {
  padding: 7px 8px 3px;
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--a-faint);
}
.tv-pick-r {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  transition: background 0.2s;
}
.tv-pick-r > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tv-pick-r small,
.tv-pick-f small {
  font-size: 10px;
  color: var(--a-faint);
}
.tv-pick-r > .i {
  color: var(--a-faint);
}
.tv-pick-r.is-hl {
  background: var(--a-hover);
}
.tv-pick-a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
  color: var(--a-muted);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-pick-f {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 6px;
  padding: 9px 8px 6px;
  border-top: 1px solid var(--a-line);
}
.tv-pick-f > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
  line-height: 1.4;
}
.tv-tog {
  flex: none;
  position: relative;
  width: 28px;
  height: 16px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.25s;
}
.tv-tog i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s var(--ease);
}
.tv-tog.is-on {
  background: var(--a-accent);
}
.tv-tog.is-on i {
  transform: translateX(12px);
}
.tv-menu {
  top: 74px;
  left: calc(50% - 232px);
  width: 226px;
  padding: 5px;
  font-size: 11.5px;
  transform-origin: top right;
}
.tv-menu > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.tv-menu > span .i {
  color: var(--a-muted);
}
.tv-menu > span.is-hl {
  background: var(--a-hover);
}
.tv-menu kbd {
  margin-left: auto;
  font: 10px var(--mono);
  color: var(--a-faint);
}
.tv-menu .is-dis {
  opacity: 0.45;
}
.tv-menu .is-danger,
.tv-menu .is-danger .i {
  color: var(--a-err);
}
.tv-menu hr {
  height: 1px;
  margin: 4px 2px;
  border: 0;
  background: var(--a-line);
}

/* Große Dialoge: Worktree abschließen, Übergabe */
.tv-modal.is-top {
  z-index: 8;
}
.tv-lg {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(580px, 92%);
  max-height: 94%;
  overflow: hidden;
}
.tv-lg-h {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tv-lg-h > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tv-lg-h .tv-faint {
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-lg-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #b9c6ff;
  background: rgba(110, 139, 255, 0.14);
}
.tv-lg-files {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--a-surface);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tv-opt {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--a-surface);
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.tv-opt.is-pick {
  background: rgba(110, 139, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(110, 139, 255, 0.55);
}
.tv-dlg .tv-opt b {
  font-size: 12px;
}
.tv-dlg .tv-opt p {
  margin: 4px 0 8px;
  font-size: 10.5px;
  line-height: 1.45;
}
.tv-seg.is-sm {
  font-size: 10px;
}
.tv-fl {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--a-faint);
}
.tv-brief-pre {
  max-height: 168px;
  margin: 0;
  padding: 9px 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0a0d;
  box-shadow: inset 0 0 0 1px var(--a-line);
  font: 10px/1.5 var(--mono);
  color: #c9ccd4;
  white-space: pre-wrap;
}

@media (max-width: 1200px) {
  .tv-pin {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 40px;
  }
}
@media (max-width: 960px) {
  .tv-pin {
    display: block;
  }
}
@media (max-width: 760px) {
  .tv-cgrid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(0, 1fr);
  }
  .tv-cgrid > .tv-pn:nth-child(n + 3) {
    display: none;
  }
  .tv-opts {
    grid-template-columns: 1fr;
  }
  .tv-opt p {
    display: none;
  }
  .tv-menu {
    left: auto;
    right: 14px;
  }
}


/* Erklär-Blase und Cursor auch über Dialogen (Lanes, Übergabe) */
.tv-spot {
  z-index: 9;
}
.tv-bubble {
  z-index: 10;
}
.tv-cursor {
  z-index: 11;
}
.tv-opts {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
}
.tv-opt .tv-seg span {
  white-space: nowrap;
}
@media (max-width: 560px) {
  .tv-cg-bar .tv-seg,
  .tv-cg-bar .tv-btn:not(.b-secondary) {
    display: none;
  }
  .tv-cg-bar b {
    white-space: nowrap;
  }
}

/* v5: Bühne mittig zur Kapitelliste; breiterer Merge-Teil im Dialog „Finish worktree“ */
.tv-tour.is-deck .tv-stage {
  align-self: center;
}
.tv-lg {
  width: min(660px, 94%);
}
.tv-opts {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr);
}
.tv-tour.is-deck .tv-bar {
  transition: none;
}
