#root.tv-mode .shell { display: block; min-height: 0; }
#root.tv-mode :is(.sidebar, .topbar, .mobile-nav, .offline-banner) { display: none; }
#root.tv-mode .workspace { position: fixed; inset: 0; max-width: none; padding: 0; }

.tv-wall {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  height: 100%;
  padding: clamp(6px, 1vw, 16px);
  gap: clamp(6px, 1vw, 16px);
  background: #080d0a;
}
.tv-header, .tv-brand, .tv-actions { display: flex; align-items: center; gap: 10px; }
.tv-header { flex-wrap: wrap; }
.tv-brand .icon { color: var(--accent); }
.tv-brand h1 { font-size: clamp(1rem, 1.6vw, 1.45rem); }
.tv-count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.tv-actions { margin-left: auto; }
.tv-actions .btn { min-height: 38px; padding: 7px 10px; }
.tv-grid {
  display: grid;
  grid-template-columns: repeat(var(--tv-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--tv-rows, 1), minmax(0, 1fr));
  gap: clamp(2px, .5vw, 8px);
  min-height: 0;
  min-width: 0;
}
.tv-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0d1610;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 0;
  min-width: 0;
}
.tv-tile .player-mount, .tv-tile-button { position: absolute; inset: 0; }
.tv-tile camera-player video { object-fit: contain; }
.tv-tile[data-state="connecting"] video, .tv-tile[data-state="error"] video,
.tv-tile[data-state="paused"] video { opacity: 0; }
.tv-tile-button {
  display: flex;
  align-items: flex-end;
  text-align: left;
  width: 100%;
  min-width: 0;
  background: transparent;
  padding: 0;
}
.tv-tile-button:focus-visible { outline-offset: -3px; }
.tv-name {
  max-width: calc(100% - 27px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 3px 5px;
  background: #080d0adb;
  color: var(--text);
  font-size: clamp(.625rem, .74vw, 1rem);
  font-weight: 600;
}
.tv-sound {
  position: absolute;
  inset: auto 3px 3px auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--text);
  background: #080d0ae8;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.tv-sound .icon { width: 14px; height: 14px; }
.tv-sound[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.tv-camera-list { min-width: 0; border: 0; display: grid; gap: 8px; padding: 0; }
.tv-camera-list:disabled { opacity: .55; }
.tv-message {
  position: absolute;
  inset: 0 0 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2px 7px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(.625rem, .85vw, 1rem);
  pointer-events: none;
}
.tv-tile[data-state="live"] .tv-message { display: none; }
.tv-tile[data-state="error"] .tv-message { color: var(--danger); }
.tv-empty { position: absolute; inset: 45% 0 auto; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  .tv-header, .tv-brand, .tv-actions { gap: 6px; }
  .tv-actions .btn { font-size: .75rem; }
  .tv-name { padding: 2px 4px; }
}
