:root {
  --bg: #0b0c0f;
  --panel: #15171c;
  --ink: #f2f3f0;
  --soft: rgba(242, 243, 240, 0.55);
  --line: rgba(242, 243, 240, 0.12);
  --accent: #8b7bff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.br { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); width: min(452px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(170deg, #1b1d24, var(--panel) 60%); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 36px 60px -36px rgba(0, 0, 0, 0.9); }

.br__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 2px; }
.br__title { display: grid; gap: 1px; }
.br__title strong { font-size: 15px; font-weight: 680; letter-spacing: -0.005em; white-space: nowrap; }
.br__sub { display: block; height: 15px; overflow: hidden; font-size: 11.5px; line-height: 15px; color: var(--soft); white-space: nowrap; }
.br__sub span { display: block; }
.br__clock { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--soft); opacity: 0.45; }
.br__clock svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.400; stroke-linecap: round; stroke-linejoin: round; }
.br__clock b { font-weight: 650; }
.br[data-state="rooms"] .br__clock { color: var(--ink); }

/* the floor: rooms and tiles are placed by the script, in pixels */
.br__floor { position: relative; height: min(228px, 44vh); margin-top: 12px; }
.br__room { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; align-items: center; height: 100%; padding: 7px 9px; border-radius: 16px; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px var(--line); text-align: left; opacity: 0; visibility: hidden; transition: box-shadow 0.25s, background-color 0.25s; }
.br[data-state="rooms"] .br__room { visibility: visible; }
.br__name { font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br__n { font-size: 11px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.br__room[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, rgba(0, 0, 0, 0.28)); box-shadow: inset 0 0 0 1.500px var(--accent); }
.br__room:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
@media (hover: hover) { .br__room:hover { background: rgba(255, 255, 255, 0.04); } .br__room[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--accent) 16%, rgba(0, 0, 0, 0.28)); } }

.br__tile { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; width: 80px; height: 80px; border-radius: 13px; background: linear-gradient(150deg, hsl(var(--h) 46% 46%), hsl(calc(var(--h) + 28) 42% 26%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 14px -8px rgba(0, 0, 0, 0.8); overflow: hidden; pointer-events: none; }
.br__tile b { font-size: clamp(13px, 4vh, 17px); font-weight: 700; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.94); }
.br__tile i { position: absolute; left: 6px; bottom: 5px; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, 0.4); font-style: normal; font-size: 9.5px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
/* when the rooms are narrow or the seats short: no name tags on the tiles, and the mark takes the place of the count */
.br__floor.is-short .br__tile i { opacity: 0; }
.br__tile i { transition: opacity 0.2s; }
.br__floor.is-narrow .br__room[aria-pressed="true"] .br__n { opacity: 0; }
.br__host { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 17px; border-radius: 6px; background: var(--accent); color: #0b0c0f; font-size: 9.5px; font-weight: 760; opacity: 0; pointer-events: none; }

.br__btn { position: relative; justify-self: center; width: min(236px, 100%); height: 46px; margin-top: 14px; border-radius: 23px; background: var(--ink); color: #0b0c0f; overflow: hidden; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 14px 22px -14px rgba(242, 243, 240, 0.5); }
.br__btn:focus-visible { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.br__in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px; }
.br__in svg { display: block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linejoin: round; }
.br__word { display: block; height: 20px; overflow: hidden; font-size: 14.5px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.br__word span { display: block; }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #0b0b0d; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (prefers-reduced-motion: reduce) { .br__room { transition: none; } }
