.boardhead { flex-wrap: wrap; }
.room-view-error { padding: .65rem 1rem; color: #8b3429; }
.room-board-meta { flex: 1; min-width: 0; text-align: right; }
.room-view-switch, .room-camera-buttons { display: flex; align-items: center; }
.room-view-switch {
  gap: 2px; margin-left: .25rem; padding: 3px;
  background: #f0efe7; border: 1px solid var(--border); border-radius: 9px;
}
.room-view-switch button {
  padding: .38rem .72rem; min-height: 34px; border-radius: 6px; color: var(--ink);
  font-size: .92rem; font-weight: 650; line-height: 1.1;
}
.room-view-switch button[aria-pressed="true"] { color: white; background: var(--tk-leaf); }
.room-view-switch button:not([aria-pressed="true"]):hover { background: #e2e5da; }
.board.room-in-3d { padding: 0; background: #f3efe7; }
#room3dCanvas {
  display: block; width: 100%; height: clamp(350px, 55vh, 620px);
  touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
#room3dCanvas:active { cursor: grabbing; }
#room3dCanvas:focus-visible { outline-offset: -4px; }
.room-camera {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .28rem .7rem;
  padding: .42rem .84rem; background: #fbf9f3; border-bottom: 1px solid var(--border);
}
.room-camera-hint { color: var(--muted); font-size: .82rem; }
.room-camera-buttons { gap: 2px; }
.room-camera-buttons button {
  display: grid; place-items: center; min-width: 34px; height: 34px;
  color: var(--ink); border-radius: 6px;
}
.room-camera-buttons button:hover { background: #e9ebe0; }
.room-camera-buttons button[data-camera="zoom-out"], .room-camera-buttons button[data-camera="reset"] {
  margin-left: 4px; box-shadow: -5px 0 0 -4px var(--border);
}
.room-camera-buttons svg { width: 1rem; height: 1rem; }
@media(max-width:880px) {
  #room3dCanvas { height: 390px; }
}
@media(max-width:710px) {
  .room-camera-buttons { margin-left: auto; }
  .room-camera-buttons button { min-width: 36px; height: 38px; }
  #room3dCanvas { height: clamp(270px, 78vw, 430px); }
}
@media(max-width:480px) {
  .boardhead { gap: .35rem .5rem; }
  .room-board-meta { text-align: left; order: 1; flex: 1 0 100%; }
  .room-view-switch { margin-left: auto; }
  .room-camera { justify-content: center; padding: .4rem; gap: .22rem; }
  .room-camera-hint { width: 100%; text-align: center; }
  .room-camera-buttons { margin-left: 0; }
  #room3dCanvas { height: clamp(270px, 78vw, 360px); }
}
@media(forced-colors:active) {
  .room-view-switch button[aria-pressed="true"] { outline: 2px solid ButtonText; }
}
