/* billiards.css — billiards HUD (.bl-hud, owned by the renders): score, group and ball shelves, then status and shot clock. Dark glass identity (fg-* tokens, .rs-hud geometry). */

.bl-hud {
    position: absolute;
    top: calc(48px + env(safe-area-inset-top, 0px));
    left: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    color: #fff;
    font: 600 11px/1 var(--font-mono, monospace);
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
}
.bl-hud * { box-sizing: border-box; letter-spacing: 0; }
.bl-row { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; max-width: 100%; }
.bl-chip, .bl-shelf {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 32px;
    border-radius: 18px;
    background: rgba(17, 17, 17, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}
.bl-chip {
    padding: 0 12px;
    font: 600 11px var(--font-mono, monospace);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* the score chip yields width before any chip can leave the viewport */
.bl-score { flex: 0 1 auto; min-width: 0; display: block; line-height: 30px; }
/* an empty status or clock keeps its row height, so the table's fit never changes between turns */
.bl-off { visibility: hidden; }
.bl-amber { color: #ffd600; border-color: rgba(255, 214, 0, 0.5); }
.bl-red { color: #ff1744; border-color: rgba(255, 23, 68, 0.5); }
.bl-win { color: #00e676; border-color: rgba(0, 230, 118, 0.5); }
.bl-clock { border-color: rgba(124, 77, 255, 0.6); }
/* pool8 3D: what the table input drives (CUE purple, BALL green, CAMERA neutral) */
.bl-mode { border-left: 3px solid rgba(255, 255, 255, 0.4); }
.bl-mode-cue { border-left-color: #9579ff; }
.bl-mode-ball { border-left-color: #00e676; }
.bl-urgent { color: #ff1744; border-color: rgba(255, 23, 68, 0.5); }

.bl-shelf { gap: 3px; padding: 0 7px; }
.bl-shelf:empty { display: none; }
.bl-ball {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bl-c, #f3ecd9);
    box-shadow: inset -2px -3px 4px rgba(0, 0, 0, 0.35);
    color: #161616;
    font: 700 8px/16px Arial, Helvetica, sans-serif;
    font-style: normal;
    text-align: center;
}
.bl-ball.bl-stripe { background: linear-gradient(#f4f1e6 27%, var(--bl-c) 27% 73%, #f4f1e6 73%); }
.bl-ball.bl-new { animation: bl-pop 0.3s ease-out; }
.bl-more { font: 700 9px var(--font-mono, monospace); font-style: normal; color: rgba(255, 255, 255, 0.75); padding-left: 1px; }
@keyframes bl-pop { from { transform: scale(0.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bl-ball.bl-new { animation: none; } }

/* narrow screens: score and shelves on top, status and clock below */
@media (max-width: 519.98px) { .bl-hud { flex-direction: column; gap: 6px; } }
@media (max-width: 420px) {
    .bl-chip { padding: 0 10px; font-size: 10px; letter-spacing: 0; }
    .bl-shelf { gap: 2px; padding: 0 5px; }
    .bl-ball { width: 14px; height: 14px; line-height: 14px; font-size: 7px; }
}
@media (max-height: 450px) {
    .bl-hud { top: calc(44px + env(safe-area-inset-top, 0px)); }
    .bl-chip, .bl-shelf { height: 28px; }
    .bl-chip { font-size: 10px; }
    .bl-score { line-height: 26px; }
}
