.roomLayout {
  height: calc(100vh - 136px);
  min-height: 500px;
}

.stagePanel {
  min-height: 0;
}

.streams {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.streamActions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 7px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.streamTile:hover .streamActions,
.streamTile:focus-within .streamActions,
.streamTile.focused .streamActions {
  opacity: 1;
  transform: none;
}

.streamTile:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.tileAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #ffffff38;
  border-radius: 8px;
  background: #07110de6;
  color: #fff;
  box-shadow: 0 7px 18px #0006;
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 800;
}

.tileAction:hover,
.tileAction:focus-visible {
  border-color: var(--lime);
  outline: none;
  background: var(--lime);
  color: var(--ink);
}

.tileAction:disabled {
  cursor: default;
  opacity: .42;
}

.streamSwitcher {
  position: absolute;
  z-index: 6;
  top: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}

.streamSwitcher[hidden] {
  display: none;
}

.streamCounter {
  min-width: 54px;
  padding: 8px 9px;
  border: 1px solid #ffffff2e;
  border-radius: 8px;
  background: #07110de6;
  color: #fff;
  text-align: center;
  font-size: 9px;
}

.streams.focusMode {
  display: block;
  padding: 12px;
}

.streams.focusMode .streamTile:not(.focused) {
  display: none;
}

.streams.focusMode .streamTile.focused {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.streams.focusMode .streamTile.focused video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.roomView.streamFocused .roomLayout {
  grid-template-columns: minmax(0,1fr) 350px;
}

.roomView.streamFocused .sidebar {
  display: block;
}

.soundNote {
  color: #526442 !important;
  font-weight: 700;
}

.soundStatus {
  padding: 6px 9px;
  border-radius: 999px;
  background: #493c24;
  color: #ffe7ab;
  font-size: 9px;
  white-space: nowrap;
}

.soundStatus[data-active="true"] {
  background: #29462e;
  color: #cfff46;
}

.streamTile:fullscreen,
.streamTile:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: #000;
}

.streamTile:fullscreen video,
.streamTile:-webkit-full-screen video {
  object-fit: contain;
}

.streamTile:fullscreen .streamActions,
.streamTile:-webkit-full-screen .streamActions {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .streamActions {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .roomLayout,
  .roomView.streamFocused .roomLayout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .stagePanel {
    height: min(72vh,720px);
    min-height: 420px;
  }

  .roomView.streamFocused .sidebar {
    order: 0;
  }
}

@media (max-width: 600px) {
  .stagePanel {
    height: min(70vh,600px);
    min-height: 340px;
  }

  .streamActions {
    top: 8px;
    right: 8px;
  }

  .streamSwitcher {
    top: 8px;
  }

  .tileAction {
    min-height: 32px;
    padding: 0 9px;
  }

  .tileAction .actionText {
    display: none;
  }
}
