.tactical-vision {
  --tv-a: #2563eb;
  --tv-a-rgb: 37, 99, 235;
  --tv-b: #f0645a;
  --tv-b-rgb: 240, 100, 90;
  --tv-gk: #e8a81b;
  --tv-ref: #8258d6;
  color: #172033;
  font-size: 14px;
  width: 100%;
}

body:has(#tactical-vision-view:not(.hidden)) .main-content {
  max-width: none;
  padding-left: clamp(16px, 2vw, 30px);
  padding-right: clamp(16px, 2vw, 30px);
}

.tv-command {
  align-items: flex-end;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(30, 50, 75, .06);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 14px 16px;
}
.tv-source-title { display: grid; flex: 0 0 auto; gap: 3px; min-width: 150px; }
.tv-source-title strong { color: #172033; font-size: 16px; }
.tv-source-title small { color: #7b8798; font-size: 12px; }
.tv-source-controls { align-items: flex-end; display: flex; flex: 1; gap: 10px; justify-content: flex-end; min-width: 0; }
.tv-select-field { display: grid; flex: 0 1 360px; gap: 6px; min-width: 210px; }
.tv-select-field > span:first-child { color: #647084; font-size: 12px; font-weight: 700; }
.tv-select-field > span:last-child { align-items: center; background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 9px; display: flex; height: 42px; position: relative; }
.tv-select-field select { appearance: none; background: transparent; border: 0; color: #253247; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; height: 100%; line-height: 1.2; outline: 0; padding: 0 38px 0 12px; width: 100%; }
.tv-select-field select:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .16); }
.tv-select-field option { background: #fff; color: #253247; }
.tv-select-field svg { color: #718095; pointer-events: none; position: absolute; right: 11px; }
.tv-source-controls .button { border-radius: 9px; font-size: 13px; height: 42px; white-space: nowrap; }

.tv-loading,.tv-empty { align-items: center; background: #fff; border: 1px solid #e0e6ee; border-radius: 14px; color: #172033; display: flex; gap: 18px; justify-content: center; min-height: 190px; }
.tv-video-stage > .tv-empty { border: 0; border-radius: 0; inset: 0; min-height: 0; padding: 24px; position: absolute; z-index: 4; }
.tv-video-stage:has(.tv-empty:not(.hidden)) .tv-stage-hint { display: none; }
.tv-loading-ring { border: 2px solid #d9f0f2; border-radius: 50%; display: block; height: 52px; position: relative; width: 52px; }
.tv-loading-ring::before { animation: tv-spin 1.1s linear infinite; border: 3px solid transparent; border-right-color: var(--tv-a); border-top-color: var(--tv-a); border-radius: 50%; content: ""; inset: 5px; position: absolute; }
.tv-loading strong,.tv-empty h3 { display: block; font-size: 18px; margin-bottom: 6px; }
.tv-loading small,.tv-empty p { color: #6c798c; font-size: 13px; margin: 0; }
.tv-empty-mark { align-items: center; background: #eff6ff; border-radius: 18px; color: var(--tv-a); display: flex; font: 800 20px/1 ui-monospace,Consolas,monospace; height: 72px; justify-content: center; width: 72px; }

.tv-workspace {
  background: #f4f7fb;
  border: 1px solid #d9e1eb;
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(25, 45, 70, .12);
  overflow: hidden;
}
.tv-workspace-head { align-items: center; background: #fff; border-bottom: 1px solid #dfe6ef; display: flex; gap: 12px; justify-content: space-between; min-height: 58px; padding: 10px 14px 10px 18px; }
.tv-workspace-head > div:first-child { align-items: center; display: flex; flex: 1 1 auto; gap: 10px; min-width: 0; }
.tv-workspace-head > div:first-child > span { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; color: #1d4ed8; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 6px 9px; }
.tv-workspace-head strong { color: #172033; font-size: 16px; }
.tv-workspace-head small { color: #758195; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-head-actions { align-items: center; display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.tv-head-actions button { background: #f7f9fc; border: 1px solid #d9e1eb; border-radius: 8px; color: #344258; cursor: pointer; font-size: 12px; height: 36px; min-width: 38px; padding: 0 11px; }
.tv-head-actions button:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.tv-head-actions button:disabled { cursor: not-allowed; opacity: .4; }
.tv-export-video-action { min-width: 76px; white-space: nowrap; }
#tv-export-virtual-video { background: linear-gradient(135deg,#f1fbfb,#eef7ff); border-color: #b9dde2; color: #176b76; min-width: 132px; }
#tv-export-virtual-video:hover:not(:disabled) { background: linear-gradient(135deg,#e7fafa,#e7f2ff); border-color: #6bc4cf; color: #0b6571; }
.tv-export-video-action.is-exporting:disabled { animation: tv-export-pulse 1.5s ease-in-out infinite; background: linear-gradient(90deg,#e8f1ff,#f3fbff,#e8f1ff); background-size: 200% 100%; border-color: #78cbd5; color: #126e79; opacity: 1; }
.tv-save-state { color: #718095; font-size: 12px; margin-right: 4px; }
.tv-save-state.is-saving { color: #b77910; }
.tv-save-state.is-error { color: #c63d34; }

.tv-studio { display: grid; grid-template-columns: minmax(0,1fr) 330px; grid-template-rows: auto auto; margin: 0 auto 10px; transition: grid-template-columns .22s ease; width: calc(100% - 20px); }
.tv-studio.is-status-collapsed { grid-template-columns: minmax(0,1fr) 64px; }
.tv-video-column { display: contents; }
.tv-video-stage { aspect-ratio: var(--tv-video-aspect, 16 / 9); background: #111827; grid-column: 1; grid-row: 1; min-height: 0; overflow: hidden; position: relative; touch-action: none; user-select: none; width: 100%; }
.tv-video-stage video { display: block; height: 100%; object-fit: contain; width: 100%; }
.tv-video-stage canvas { cursor: crosshair; height: 100%; inset: 0; position: absolute; width: 100%; z-index: 3; }
.tv-video-stage canvas.has-hit { cursor: pointer; }
.tv-video-placeholder { align-items: center; background: #eef3f8; color: #64748b; display: flex; flex-direction: column; font-size: 13px; gap: 10px; inset: 0; justify-content: center; position: absolute; z-index: 2; }
.tv-video-placeholder svg { color: var(--tv-a); height: 44px; width: 44px; }
.tv-stage-hint { background: rgba(255,255,255,.92); border: 1px solid rgba(210,220,232,.95); border-radius: 999px; bottom: 14px; box-shadow: 0 8px 22px rgba(15,23,42,.16); color: #58667a; font-size: 12px; left: 50%; padding: 8px 14px; pointer-events: none; position: absolute; transform: translateX(-50%); white-space: nowrap; z-index: 5; }
.tv-stage-hint b { color: #172033; font-weight: 800; }

.tv-label-editor { background: #fff; border: 1px solid #d6dee8; border-radius: 12px; box-shadow: 0 16px 48px rgba(15,23,42,.25); color: #253247; left: 50%; padding: 14px; position: absolute; top: 50%; transform: translate(-50%,-50%); width: 240px; z-index: 8; }
.tv-label-editor label { color: #4f5d72; display: grid; font-size: 13px; font-weight: 700; gap: 7px; }
.tv-label-editor input { background: #f8fafc; border: 1px solid #ccd6e2; border-radius: 8px; color: #172033; font-size: 14px; height: 40px; outline: 0; padding: 0 10px; }
.tv-label-editor input:focus { border-color: var(--tv-a); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tv-label-editor > div { display: flex; gap: 7px; justify-content: flex-end; margin-top: 10px; }
.tv-label-editor button { background: #f4f7fb; border: 1px solid #d7e0ea; border-radius: 7px; color: #46546a; cursor: pointer; font-size: 12px; height: 34px; padding: 0 12px; }
#tv-label-save { background: var(--tv-a); border-color: var(--tv-a); color: #fff; font-weight: 800; }

.tv-player-controls { background: #fff; border-top: 1px solid #dfe6ef; grid-column: 1 / -1; grid-row: 2; padding: 10px 15px 12px; }
.tv-progress { appearance: none; background: transparent; cursor: pointer; display: block; height: 20px; margin: 0; width: 100%; }
.tv-progress::-webkit-slider-runnable-track { background: linear-gradient(90deg,var(--tv-a) 0 var(--tv-progress,0%),#dce4ee var(--tv-progress,0%) 100%); border-radius: 999px; height: 6px; }
.tv-progress::-webkit-slider-thumb { appearance: none; background: #fff; border: 3px solid var(--tv-a); border-radius: 50%; box-shadow: 0 2px 7px rgba(37,99,235,.28); height: 16px; margin-top: -5px; width: 16px; }
.tv-progress::-moz-range-track { background: #dce4ee; border-radius: 999px; height: 6px; }
.tv-progress::-moz-range-progress { background: var(--tv-a); border-radius: 999px; height: 6px; }
.tv-progress::-moz-range-thumb { background: #fff; border: 3px solid var(--tv-a); border-radius: 50%; height: 12px; width: 12px; }
.tv-control-row { align-items: center; display: flex; justify-content: space-between; margin-top: 6px; }
.tv-control-left,.tv-control-right { align-items: center; display: flex; gap: 7px; }
.tv-control-row button { background: #f7f9fc; border: 1px solid #dce3ec; border-radius: 8px; color: #344258; cursor: pointer; font-size: 12px; height: 36px; min-width: 38px; padding: 0 10px; }
.tv-control-row button:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.tv-control-row .tv-play { align-items: center; background: var(--tv-a); border-color: var(--tv-a); border-radius: 50%; color: #fff; display: flex; font-size: 13px; height: 40px; justify-content: center; padding-left: 10px; width: 40px; }
.tv-control-row strong { color: #4c5b70; font: 700 13px/1 ui-monospace,SFMono-Regular,Consolas,monospace; margin-left: 5px; }
#tv-volume { accent-color: var(--tv-a); width: 84px; }

.tv-status { background: #f7f9fc; border-left: 1px solid #dbe3ed; grid-column: 2; grid-row: 1; min-height: 0; min-width: 0; position: relative; }
.tv-status-toggle { align-items: center; background: #fff; border: 1px solid #cdd8e4; border-radius: 50%; box-shadow: 0 4px 12px rgba(15,23,42,.12); color: #526177; cursor: pointer; display: flex; font-size: 22px; height: 32px; justify-content: center; left: -16px; padding: 0 0 2px; position: absolute; top: 15px; transition: transform .2s; width: 32px; z-index: 6; }
.tv-studio.is-status-collapsed .tv-status-toggle { transform: rotate(180deg); }
.tv-status-content { inset: 0; overflow-y: auto; padding: 16px 14px 22px; position: absolute; scrollbar-color: #c2ceda transparent; scrollbar-width: thin; }
.tv-status-content > header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 13px; padding-left: 6px; }
.tv-status-content > header div { display: grid; gap: 3px; }
.tv-status-content > header small { color: #2563eb; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.tv-status-content > header strong { color: #172033; font-size: 17px; }
.tv-status-content > header > span { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; color: #1d4ed8; font-size: 10px; font-weight: 800; padding: 5px 7px; }
.tv-collapsed-possession { display: none; inset: 58px 0 auto; position: absolute; text-align: center; }
.tv-collapsed-possession span { align-items: center; color: #334155; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.tv-collapsed-possession span:first-child b { color: var(--tv-a); }
.tv-collapsed-possession span:last-child b { color: var(--tv-b); }
.tv-collapsed-possession b { font: 800 18px/1 ui-monospace,Consolas,monospace; }
.tv-collapsed-possession i { color: #718095; font-size: 11px; font-style: normal; font-weight: 700; }
.tv-studio.is-status-collapsed .tv-status-content { display: none; }
.tv-studio.is-status-collapsed .tv-collapsed-possession { display: block; }

.tv-status-section,.tv-advanced { background: #fff; border: 1px solid #dfe6ee; border-radius: 11px; margin-bottom: 10px; }
.tv-status-section { padding: 12px; }
.tv-section-title { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }
.tv-section-title span { color: #253247; font-size: 13px; font-weight: 800; }
.tv-section-title small { color: #7b8798; font-size: 11px; }
.tv-status-source-controls { display: grid; gap: 9px; }
.tv-source-panel .tv-select-field { display: grid; min-width: 0; width: 100%; }
.tv-source-panel .tv-select-field > span:last-child { height: 38px; }
.tv-source-panel .tv-source-select-field { gap: 0; }
.tv-source-panel .tv-select-field select { font-size: 12px; padding-left: 10px; }
.tv-source-actions { display: grid; gap: 7px; grid-template-columns: minmax(0,1.45fr) minmax(0,.75fr); }
.tv-source-actions .button { border-radius: 8px; font-size: 12px; height: 36px; min-width: 0; padding: 0 8px; white-space: nowrap; }
.tv-possession-score { display: grid; gap: 9px 14px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.tv-possession-score > div { align-items: baseline; display: flex; gap: 7px; min-width: 0; }
.tv-possession-score .team-b { justify-content: flex-end; text-align: right; }
.tv-possession-score > div span { color: #657287; flex: 0 1 auto; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-possession-score > div strong { flex: 0 0 auto; font: 800 19px/1 ui-monospace,Consolas,monospace; }
.tv-possession-score .team-a strong { color: var(--tv-a); }
.tv-possession-score .team-b strong { color: var(--tv-b); }
.tv-possession-score > i { background: rgba(var(--tv-b-rgb),.76); border-radius: 99px; display: block; grid-column: 1 / -1; height: 7px; overflow: hidden; position: relative; }
.tv-possession-score > i b { background: var(--tv-a); display: block; height: 100%; transition: width .5s cubic-bezier(.22,.75,.25,1); width: 50%; }
.tv-formation-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.tv-formation-grid > div { background: #f7f9fc; border: 1px solid #e0e6ee; border-radius: 8px; display: grid; gap: 4px; padding: 9px; }
.tv-formation-grid span { color: #657287; font-size: 11px; }
.tv-formation-grid strong { color: #172033; font: 800 18px/1.1 ui-monospace,Consolas,monospace; }
.tv-formation-grid small { color: #788598; font-size: 11px; line-height: 1.4; }
.tv-formation-grid small:empty { display: none; }
.tv-layers-panel { overflow: hidden; padding: 0; }
.tv-layers-panel > summary { align-items: center; cursor: pointer; display: grid; gap: 8px; grid-template-columns: 1fr auto auto; list-style: none; padding: 12px; }
.tv-layers-panel > summary::-webkit-details-marker { display: none; }
.tv-layers-panel > summary span { color: #253247; font-size: 13px; font-weight: 800; }
.tv-layers-panel > summary small { color: #7b8798; font-size: 11px; }
.tv-layers-panel > summary i { color: #718095; font-size: 20px; font-style: normal; line-height: 1; transition: transform .18s ease; }
.tv-layers-panel[open] > summary i { transform: rotate(90deg); }
.tv-layers-body { border-top: 1px solid #e2e8f0; padding: 10px 12px 12px; }
.tv-selected-list { display: grid; gap: 7px; }
.tv-layers-panel .tv-selected-list { max-height: 252px; overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; scrollbar-color: #c2ceda transparent; scrollbar-width: thin; }
.tv-selected-list > p,.tv-moment-list > p { color: #718095; font-size: 12px; line-height: 1.55; margin: 0; }
.tv-selected-item { align-items: center; background: #f7f9fc; border: 1px solid #e0e6ee; border-radius: 8px; display: flex; gap: 8px; padding: 8px; }
.tv-selected-item > i { border: 2px solid var(--track-color); border-radius: 50%; height: 13px; width: 13px; }
.tv-selected-item > span { display: grid; flex: 1; gap: 2px; min-width: 0; }
.tv-selected-item strong { color: #253247; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-selected-item small { color: #718095; font-size: 11px; }
.tv-selected-item button { background: transparent; border: 0; color: #718095; cursor: pointer; font-size: 16px; padding: 3px; }
.tv-space-metrics { display: grid; gap: 7px; grid-template-columns: repeat(2,1fr); margin-top: 9px; }
.tv-space-metrics:empty { display: none; }
.tv-space-metrics div { background: #f4f7fb; border-radius: 7px; display: grid; gap: 3px; padding: 8px; }
.tv-space-metrics span { color: #718095; font-size: 11px; }
.tv-space-metrics strong { color: #253247; font: 700 13px/1 ui-monospace,Consolas,monospace; }

.tv-advanced { overflow: hidden; }
.tv-advanced summary { align-items: center; color: #344258; cursor: pointer; display: flex; font-size: 13px; font-weight: 800; gap: 8px; list-style: none; padding: 12px; }
.tv-advanced summary svg:last-child { margin-left: auto; transition: transform .2s; }
.tv-advanced[open] summary svg:last-child { transform: rotate(180deg); }
.tv-advanced-body { border-top: 1px solid #e2e8f0; display: grid; gap: 13px; padding: 12px; }
.tv-team-overlay-tools { display: grid; gap: 7px; }
.tv-team-overlay-heading { align-items: flex-end; display: flex; justify-content: space-between; }
.tv-team-overlay-heading strong { color: #253247; font-size: 13px; }
.tv-team-overlay-heading small { color: #7b8798; font-size: 11px; text-align: right; }
.tv-team-overlay-grid { display: grid; gap: 5px; grid-template-columns: 1fr; }
.tv-team-tool { align-items: center; background: #f7f9fc; border: 1px solid #dfe6ee; border-radius: 8px; cursor: pointer; display: flex; gap: 7px; justify-content: space-between; min-height: 34px; min-width: 0; padding: 6px 8px; transition: background .16s,border-color .16s,box-shadow .16s; }
.tv-team-tool:hover { background: #fbfdff; }
.tv-team-tool.team-a:has(input:checked) { background: rgba(56,215,235,.08); border-color: rgba(56,215,235,.52); box-shadow: inset 3px 0 #38d7eb; }
.tv-team-tool.team-b:has(input:checked) { background: rgba(255,118,95,.08); border-color: rgba(255,118,95,.48); box-shadow: inset 3px 0 #ff765f; }
.tv-team-tool > span { min-width: 0; padding-left: 13px; position: relative; }
.tv-team-tool > span > i { background: #38d7eb; border-radius: 50%; box-shadow: 0 0 0 3px rgba(56,215,235,.12); height: 6px; left: 0; position: absolute; top: 5px; width: 6px; }
.tv-team-tool.team-b > span > i { background: #ff765f; box-shadow: 0 0 0 3px rgba(255,118,95,.12); }
.tv-team-tool strong { color: #344258; font-size: 12px; line-height: 1.25; white-space: normal; }
.tv-team-tool input { accent-color: var(--tv-a); flex: 0 0 auto; height: 16px; width: 16px; }
.tv-team-tool.team-b input { accent-color: var(--tv-b); }
.tv-switch-row,.tv-range-row,.tv-possession-start { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.tv-switch-row > span,.tv-possession-start > span { display: grid; gap: 3px; }
.tv-switch-row strong,.tv-possession-start strong { color: #344258; font-size: 12px; }
.tv-switch-row small,.tv-possession-start small { color: #718095; font-size: 11px; line-height: 1.45; }
.tv-switch-row input { accent-color: var(--tv-a); height: 16px; width: 16px; }
.tv-range-row { color: #526177; font-size: 12px; }
.tv-range-row select { background: #f7f9fc; border: 1px solid #d7e0ea; border-radius: 7px; color: #344258; height: 32px; }
.tv-possession-start > div { display: flex; gap: 5px; }
.tv-possession-start button { background: #f7f9fc; border: 1px solid #d7e0ea; border-radius: 7px; color: #526177; cursor: pointer; font-size: 11px; min-height: 32px; padding: 0 8px; }
.tv-action-grid { display: grid; gap: 7px; grid-template-columns: 1fr 1fr; }
.tv-action-grid button { background: #f7f9fc; border: 1px solid #d7e0ea; border-radius: 8px; color: #344258; cursor: pointer; font-size: 12px; min-height: 38px; padding: 7px; }
.tv-action-grid button:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.tv-compare-summary { background: #f4f7fb; border-radius: 8px; margin-top: 8px; padding: 9px; }
.tv-compare-summary span { color: #1d4ed8; font-size: 12px; font-weight: 800; }
.tv-compare-summary p { color: #667489; font-size: 11px; line-height: 1.55; margin: 5px 0 0; }
.tv-compare-clear { background: transparent; border: 0; color: #6b788c; cursor: pointer; display: block; font-size: 11px; margin: 6px 0 0 auto; padding: 2px 0; }
.tv-compare-clear:hover { color: #1d4ed8; }
.tv-compare-clear.hidden { display: none; }
.tv-moment-list { display: grid; gap: 7px; }
.tv-moment-item { align-items: center; background: #f7f9fc; border: 1px solid #e0e6ee; border-radius: 8px; display: grid; gap: 7px; grid-template-columns: 48px 1fr auto; padding: 8px; }
.tv-moment-item > button:first-child { background: #eff6ff; border: 0; border-radius: 6px; color: #1d4ed8; cursor: pointer; font: 700 11px/1 ui-monospace,Consolas,monospace; height: 30px; }
.tv-moment-item span { display: grid; gap: 3px; min-width: 0; }
.tv-moment-item strong { color: #344258; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-moment-item small { color: #758195; font-size: 11px; }
.tv-moment-item > div { align-items: center; display: flex; gap: 3px; }
.tv-moment-item > div button { background: transparent; border: 0; color: #6f7d90; cursor: pointer; font-size: 10px; padding: 4px; }
.tv-moment-item > div button:hover { color: #1d4ed8; }

body.tv-web-fullscreen { background: #eef2f7; overflow: hidden; }
body.tv-web-fullscreen .sidebar,body.tv-web-fullscreen .topbar { display: none; }
body.tv-web-fullscreen .app-shell { display: block; }
body.tv-web-fullscreen .main-content { height: 100vh; margin-left: 0; max-width: none; overflow: hidden; padding: 0; width: 100%; }
body.tv-web-fullscreen #tactical-vision-view { height: 100vh; }
body.tv-web-fullscreen #tactical-vision-view > .tv-command { display: none; }

.tv-workspace:fullscreen,body.tv-web-fullscreen .tv-workspace { background: #eef2f7; border: 0; border-radius: 0; display: flex; flex-direction: column; height: 100vh; overflow: auto; width: 100%; }
.tv-workspace:fullscreen > .match-chat-widget { position: fixed; z-index: 1250; }

#tv-overlay:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(87, 156, 240, 0.78);
  outline: 3px solid rgba(36, 99, 233, 0.28);
  outline-offset: 2px;
}
.tv-workspace:fullscreen .tv-studio,body.tv-web-fullscreen .tv-studio { flex: 0 0 auto; grid-template-rows: auto auto; margin: 0 auto; min-height: 0; width: min(100%, calc((100vh - 142px) * 1.7778 + 330px)); }
.tv-workspace:fullscreen .tv-studio.is-status-collapsed,body.tv-web-fullscreen .tv-studio.is-status-collapsed { width: min(100%, calc((100vh - 142px) * 1.7778 + 64px)); }
.tv-workspace:fullscreen .tv-video-stage,body.tv-web-fullscreen .tv-video-stage { aspect-ratio: var(--tv-video-aspect, 16 / 9); height: auto; min-height: 0; }
.tv-workspace:fullscreen .tv-status,body.tv-web-fullscreen .tv-status { min-height: 0; }

@media (max-width: 1180px) {
  .tv-command { align-items: stretch; flex-direction: column; gap: 10px; }
  .tv-source-title { display: none; }
  .tv-source-controls { justify-content: stretch; }
  .tv-studio { grid-template-columns: minmax(0,1fr) 300px; }
}

@media (max-width: 900px) {
  .tv-source-controls { align-items: stretch; flex-wrap: wrap; }
  .tv-select-field { flex: 1 1 230px; }
  .tv-studio,.tv-studio.is-status-collapsed { display: block; }
  .tv-video-column { display: block; }
  .tv-status { border-left: 0; border-top: 1px solid #dbe3ed; }
  .tv-status-toggle,.tv-collapsed-possession { display: none !important; }
  .tv-status-content,.tv-studio.is-status-collapsed .tv-status-content { display: block; max-height: none; padding: 14px; position: static; }
  .tv-control-row { align-items: flex-start; gap: 9px; }
  .tv-control-right { flex-wrap: wrap; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .tv-loading-ring::before { animation: none; }
  .tv-studio,.tv-possession-score > i b { transition: none; }
}

@keyframes tv-spin { to { transform: rotate(360deg); } }
@keyframes tv-export-pulse { 0%,100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
