.bh-beta-display{
  --bh-bg:var(--bhoa-bg, #080808);
  --bh-panel:var(--bhoa-surface, #0f0f0f);
  --bh-panel2:var(--bhoa-surface-2, #141414);
  --bh-text:var(--bhoa-text, #f0ede8);
  --bh-muted:var(--bhoa-text-3, #666666);
  --bh-border:var(--bhoa-border, rgba(255,255,255,.06));
  --bh-accent:var(--bhoa-accent, #c0392b);
  --z-flash:100;
  padding:clamp(8px, 1.5vw, 20px);
  background:var(--bh-bg);
  color:var(--bh-text);
  min-height:100vh;
  border:0;
  border-radius:0;
  box-shadow:none;
  font-family:"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing:antialiased;
}
.bh-beta-display *,
.bh-beta-display *::before,
.bh-beta-display *::after{
  box-sizing:border-box;
}

.bh-display-groups{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(6px, 1vw, 14px);
  height:calc(100vh - 120px);
}

.bh-display-group{
  border:2px solid var(--bh-border);
  border-radius:0;
  background:var(--bh-panel);
  box-shadow:none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.bh-display-group>header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:clamp(8px, 1.2vw, 16px) clamp(10px, 1.5vw, 18px);
  font-weight:700;
  font-size:clamp(14px, 1.8vw, 22px);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--bh-accent);
  background:var(--bh-surface-2, rgba(0,0,0,.03));
  border-bottom:2px solid var(--bh-border);
  flex-shrink:0;
}

.bh-display-group>header small{
  color:var(--bh-muted);
  font-weight:700;
  font-size:clamp(14px, 1.6vw, 20px);
  opacity:1;
}

.bh-display-group-list{
  display:grid;
  gap:clamp(6px, 0.8vw, 10px);
  padding:clamp(6px, 1vw, 12px);
  overflow-y:auto;
  flex:1;
  min-height:0;
  align-content:start;
}

.bh-display-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:clamp(4px, 0.6vw, 8px);
  padding:clamp(8px, 1vw, 14px) clamp(10px, 1.2vw, 16px);
  background:var(--bh-panel);
  border:2px solid var(--bh-border);
  border-left:3px solid rgba(192,57,43,.25);
  border-radius:0;
  transition:border-color .15s;
}

.bh-display-row strong{
  font-size:clamp(16px, 2vw, 24px);
  font-weight:700;
}
.bh-display-code{
  font-size:clamp(18px, 2.4vw, 30px) !important;
  letter-spacing:.04em;
  color:var(--bh-accent);
  font-weight:900;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}

.bh-display-row span{
  font-weight:700;
  justify-self:end;
  color:var(--bh-accent);
  font-size:clamp(14px, 1.6vw, 20px);
}

.bh-display-row small{
  opacity:.9;
  font-size:clamp(11px, 1.2vw, 16px);
  grid-column:1/-1;
  color:var(--bh-muted);
}

.bh-display-pickup{
  color:var(--bh-accent);
  font-size:clamp(13px, 1.4vw, 18px);
}

.bh-display-row div{
  grid-column:1/-1;
  opacity:.92;
  font-size:clamp(14px, 1.6vw, 20px);
  color:var(--bh-muted);
  line-height:1.4;
}

.bh-beta-display .bh-empty{
  padding:clamp(12px, 2vw, 24px);
  opacity:.7;
  text-align:center;
  border:2px dashed rgba(192,57,43,.25);
  border-radius:0;
  color:var(--bh-muted);
  font-size:clamp(14px, 1.4vw, 18px);
}

/* ── Display toolbar ──────────────────────────────────────────────────── */
.bh-display-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--bh-border);
}
.bh-display-toolbar h2{
  margin:0;
  font-size:clamp(14px, 1.8vw, 22px);
  font-weight:700;
  color:var(--bh-accent);
  letter-spacing:.06em;
  text-transform:uppercase;
}
.bh-display-back{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 18px;
  border:2px solid var(--bh-border);
  border-radius:0;
  background:transparent;
  color:var(--bh-muted);
  font-size:clamp(12px, 1.2vw, 16px);
  font-weight:700;
  font-family:inherit;
  text-transform:uppercase;
  letter-spacing:.08em;
  cursor:pointer;
  transition:border-color .15s,color .15s;
  text-decoration:none;
  white-space:nowrap;
  min-height:48px;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.bh-display-back:hover{
  border-color:var(--bh-accent);
  color:var(--bh-accent);
}
.bh-display-back::before{
  content:'\2190';
  font-size:16px;
}

/* ── Station filter bar ───────────────────────────────────────────────── */
.bh-display-station-filter{
  display:flex;
  gap:clamp(6px, 1vw, 12px);
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--bh-border);
  flex-wrap:wrap;
}
.bh-display-station-btn{
  padding:clamp(8px, 1vw, 14px) clamp(16px, 2.5vw, 32px);
  border:2px solid var(--bh-border);
  border-radius:0;
  background:transparent;
  color:var(--bh-muted);
  font-size:clamp(14px, 1.8vw, 22px);
  font-weight:900;
  font-family:inherit;
  letter-spacing:.1em;
  text-transform:uppercase;
  cursor:pointer;
  transition:border-color .15s,color .15s;
  min-height:48px;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.bh-display-station-btn:hover{
  border-color:var(--bh-accent);
  color:var(--bh-accent);
}
.bh-display-station-btn.is-active{
  background:transparent;
  border-color:var(--bh-accent);
  color:var(--bh-accent);
  box-shadow:3px 3px 0 rgba(192,57,43,.4);
}

/* ── Timer urgency colors ─────────────────────────────────────────────── */
.bh-display-timer{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-weight:700;
  font-size:clamp(12px, 1.4vw, 18px);
}
.bh-display-row.is-ok .bh-display-timer{ color:var(--bh-muted); }
.bh-display-row.is-warn .bh-display-timer{ color:#c87a00; font-weight:900; }
.bh-display-row.is-warn{ border-color:rgba(200,122,0,.25); border-left-color:#c87a00; border-left-width:4px; background:transparent; }
.bh-display-row.is-hot .bh-display-timer{ color:#c0392b; font-weight:900; }
.bh-display-row.is-hot{ border-color:rgba(192,57,43,.3); border-left-color:#c0392b; border-left-width:4px; background:transparent; }
.bh-display-row.is-critical .bh-display-timer{ color:#fff; font-weight:900; }
.bh-display-row.is-critical{
  border:2px solid #c0392b; border-left:4px solid #ff4444;
  background:#c0392b;
  color:#fff; animation:bh-display-pulse 1s ease-in-out infinite;
  box-shadow:3px 3px 0 rgba(0,0,0,.6);
}
.bh-display-row.is-critical .bh-display-code{ color:#fff; }
.bh-display-row.is-critical div{ color:rgba(255,255,255,.9); }
@keyframes bh-display-pulse{
  0%,100%{ opacity:1; }
  50%{ opacity:.85; }
}

/* ── Keyboard selection ───────────────────────────────────────────────── */
.bh-display-row.is-selected{
  outline:3px solid var(--bh-accent);
  outline-offset:2px;
  box-shadow:4px 4px 0 rgba(192,57,43,.5);
}

/* ── Sound flash indicator ────────────────────────────────────────────── */
.bh-display-sound-flash{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:var(--bh-accent);
  opacity:0;
  z-index:var(--z-flash);
  pointer-events:none;
  transition:opacity .1s;
}
.bh-display-sound-flash.is-active{
  opacity:1;
  animation:bhDisplayFlash .6s ease-out;
}
@keyframes bhDisplayFlash{
  0%{ opacity:1; }
  100%{ opacity:0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   KDS RESPONSIVE — Landscape-first for wall mount and tablets
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Portrait tablet (max-width 768px landscape or portrait) ─────────── */
@media (max-width:768px){
  .bh-beta-display{
    padding:6px;
  }
  .bh-display-groups{
    grid-template-columns:1fr;
    height:auto;
    gap:8px;
  }
  .bh-display-group-list{
    max-height:50vh;
  }
}

/* ── Tablet portrait (769-1024px) — horizontal scroll or stacked ─────── */
@media (min-width:769px) and (max-width:1024px){
  .bh-display-groups{
    grid-template-columns:repeat(3,minmax(0,1fr));
    height:calc(100vh - 110px);
    gap:8px;
  }
  .bh-display-group>header{
    font-size:14px;
    padding:10px 12px;
  }
  .bh-display-group>header small{
    font-size:14px;
  }
  .bh-display-row strong{
    font-size:16px;
  }
  .bh-display-code{
    font-size:18px !important;
  }
  .bh-display-row div{
    font-size:14px;
  }
}

/* ── Large landscape tablet / wall-mounted screen (1025px+) ──────────── */
@media (min-width:1025px){
  .bh-display-groups{
    grid-template-columns:repeat(3,minmax(0,1fr));
    height:calc(100vh - 100px);
  }
}

/* ── Very large wall mount (1600px+) — bigger everything ─────────────── */
@media (min-width:1600px){
  .bh-display-group>header{
    font-size:24px;
    padding:16px 20px;
  }
  .bh-display-group>header small{
    font-size:22px;
  }
  .bh-display-code{
    font-size:32px !important;
  }
  .bh-display-row strong{
    font-size:26px;
  }
  .bh-display-row div{
    font-size:22px;
  }
  .bh-display-row small{
    font-size:16px;
  }
  .bh-display-station-btn{
    font-size:24px;
    padding:14px 36px;
    min-height:56px;
  }
}

/* ── Portrait orientation override — stack columns ───────────────────── */
@media (orientation:portrait) and (max-width:1024px){
  .bh-display-groups{
    grid-template-columns:1fr;
    height:auto;
  }
  .bh-display-group-list{
    max-height:40vh;
  }
}
