:root { font-family: Segoe UI, system-ui, sans-serif; color: #1b1b1b; background: #f4f5f7; }
* { box-sizing: border-box; }
body { margin: 0; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 0.75rem 1rem; background: #fff; border-bottom: 1px solid #d9d9d9; }
nav { display: flex; flex: 1; flex-wrap: wrap; gap: 0.85rem; }
nav a { color: #0b5cab; text-decoration: none; min-height: 2.5rem; display: inline-flex; align-items: center; }
.page { padding: 1rem; max-width: 1400px; margin: 0 auto; }
.grid, .room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.85rem; }
.card, .scene-shelf { background: #fff; border: 1px solid #d9d9d9; border-radius: 10px; padding: 1rem; }
.room-card { display: grid; align-content: start; gap: 0.9rem; }
.room-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.room-head h2, .scene-shelf h2 { margin: 0; font-size: 1.15rem; }
.room-section { border-top: 1px solid #ececec; padding-top: 0.65rem; }
.room-section h3 { margin: 0 0 0.55rem; font-size: 0.95rem; }
.entity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 0.45rem; }
.entity-tile { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.6rem; background: #f7f8fa; border-radius: 8px; }
.entity-tile span { overflow: hidden; text-overflow: ellipsis; }
.controls { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.4rem; }
.control { min-height: 2.65rem; min-width: 7rem; }
.control:disabled { cursor: not-allowed; opacity: 0.62; }
.room-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; border-top: 1px solid #ececec; padding-top: 0.75rem; }
.scene-shelf { margin-bottom: 0.85rem; }
.offline-card { max-width: 720px; }
.muted { color: #5c5c5c; font-size: 0.9rem; }
h1 { font-size: 1.45rem; margin: 0 0 0.75rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #ececec; font-size: 0.92rem; }
input, button, select { font: inherit; padding: 0.5rem 0.65rem; min-height: 2.5rem; }
button { touch-action: manipulation; }
.ok { color: #0b7a0b; }
.bad { color: #a32020; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0; }
@media (pointer: coarse) {
  .bar { padding: 0.85rem 1rem; }
  nav a { min-height: 3rem; padding: 0 0.2rem; }
  input, button, select { min-height: 3rem; }
  .entity-tile { min-height: 3rem; align-items: center; }
}
@media (max-width: 720px) {
  .page { padding: 0.75rem; }
  .grid, .room-grid { grid-template-columns: 1fr; }
  .room-controls { grid-template-columns: 1fr; }
  .bar strong { width: 100%; }
}
