/**
 * Project:     Apex Play
 * Author:      Trinity
 * Created:     2026-06-27
 * Description: Global stylesheet — uses CSS custom properties set by Theme::renderVars() on every page
 */

/* 2026-11-21 - Trinity - The icons (.ap-icon) live in one file both stylesheets import. */
@import url(apexicons.css);

/* Fallback values — overridden at runtime by Theme::renderVars() */
:root {
    --ap-bg:      #0d0d1a;
    --ap-card:    #1a1a2e;
    --ap-primary: #e94560;
    --ap-accent:  #00d4ff;
    --ap-text:    #ffffff;
    --ap-muted:   #8892a4;
}

body {
    background-color: var(--ap-bg);
    color: var(--ap-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────── */
.ap-navbar {
    background-color: var(--ap-card);
    border-bottom: 2px solid var(--ap-primary);
    padding: 0.75rem 0;
}

.ap-navbar .navbar-brand {
    color: var(--ap-primary) !important;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.ap-navbar .nav-link {
    color: var(--ap-muted) !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.15s ease;
}

.ap-navbar .nav-link:hover {
    color: var(--ap-text) !important;
}

.ap-navbar .btn-ap-primary {
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-ap-primary {
    background-color: var(--ap-primary);
    border: 2px solid var(--ap-primary);
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-ap-primary:hover {
    background-color: transparent;
    color: var(--ap-primary);
    text-decoration: none;
}

.btn-ap-outline {
    background-color: transparent;
    border: 2px solid var(--ap-primary);
    color: var(--ap-primary);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-ap-outline:hover {
    background-color: var(--ap-primary);
    color: #fff;
    text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────── */
.ap-hero {
    background: linear-gradient(135deg, var(--ap-card) 0%, var(--ap-bg) 60%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 90px 0 80px;
    text-align: center;
}

.ap-hero h1 {
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--ap-text);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.ap-hero h1 span {
    color: var(--ap-primary);
}

.ap-hero .ap-hero-sub {
    font-size: 1.15rem;
    color: var(--ap-muted);
    max-width: 580px;
    margin: 1.2rem auto 2.5rem;
    line-height: 1.6;
}

.ap-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Section ──────────────────────────────────────────── */
.ap-section {
    padding: 60px 0;
}

.ap-section-title {
    color: var(--ap-text);
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-left: 4px solid var(--ap-primary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

/* ── Cards ────────────────────────────────────────────── */
.ap-card {
    background-color: var(--ap-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: var(--ap-text);
    transition: transform 0.2s ease, border-color 0.2s ease;
    height: 100%;
}

.ap-card:hover {
    transform: translateY(-5px);
    border-color: var(--ap-primary);
}

.ap-card .ap-card-body {
    padding: 2rem;
    text-align: center;
}

.ap-card .ap-game-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: block;
}

.ap-card .ap-card-title {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ap-text);
    margin-bottom: 0.5rem;
}

.ap-card .ap-card-text {
    color: var(--ap-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ── Auth Forms ───────────────────────────────────────── */
.ap-form-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.ap-form-card {
    background-color: var(--ap-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
}

.ap-form-card h2 {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ap-text);
    margin-bottom: 0.25rem;
}

.ap-form-sub {
    color: var(--ap-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.ap-form-sub a {
    color: var(--ap-primary);
    text-decoration: none;
}

.ap-form-sub a:hover {
    text-decoration: underline;
}

.form-label {
    color: var(--ap-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.form-control {
    background-color: var(--ap-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--ap-text);
    border-radius: 4px;
    padding: 0.65rem 0.9rem;
}

.form-control:focus {
    background-color: var(--ap-bg);
    border-color: var(--ap-primary);
    color: var(--ap-text);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.12);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.18);
}

.ap-error {
    background-color: rgba(233,69,96,0.12);
    border: 1px solid var(--ap-primary);
    color: var(--ap-primary);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.ap-success {
    background-color: rgba(0,200,83,0.12);
    border: 1px solid #00c853;
    color: #00c853;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

/* 2026-07-29 - Trinity - Venue-device sign-in: the local account form is demoted behind a disclosure so a
   player meets "Sign in with Apex Play" first, while the venue owner keeps their route to admin/hub settings.
   The default marker is replaced with a caret so the toggle reads as ours, not as a raw <details>. */
.ap-owner-signin {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.25rem;
}

.ap-owner-signin summary {
    color: var(--ap-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.ap-owner-signin summary::-webkit-details-marker { display: none; }
.ap-owner-signin summary::after       { content: ' \25BE'; }
.ap-owner-signin[open] summary::after { content: ' \25B4'; }
.ap-owner-signin summary:hover        { color: var(--ap-text); }

.ap-owner-signin-body { margin-top: 1.25rem; }

/* Verify code input */
.ap-code-input {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-align: center;
}

/* ── Footer ───────────────────────────────────────────── */
.ap-footer {
    background-color: var(--ap-card);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--ap-muted);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    margin-top: auto;
}

/* ── Dashboard ────────────────────────────────────────── */
.ap-dashboard-header {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 2rem 0;
    margin-bottom: 2.5rem;
}

.ap-dashboard-header h1 {
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ap-stat-card {
    background-color: var(--ap-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.ap-stat-card .ap-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ap-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.ap-stat-card .ap-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ap-muted);
}

/* ── Player-view header (phone play screens — consistent across every game) ─── */
.ap-play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 0 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 1.25rem;
}

.ap-play-game {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ap-play-icon { font-size: 1.3em; line-height: 1; }

.ap-play-you {
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ap-muted);
    font-weight: 700;
    text-align: right;
}

.ap-play-host { color: var(--ap-accent); margin-left: 0.35rem; }

/* ── Controller home picker (sport cards → game cards) + control-panel reset progress bar ── */
.ctrl-picker-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ctrl-sport-card       { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; padding: 1.25rem 0.75rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: var(--ap-text); font-weight: 700; cursor: pointer; text-align: center; }
.ctrl-sport-card:hover { border-color: var(--ap-accent); }
.ctrl-soon             { opacity: 0.4; cursor: default; font-weight: 400; }
.ctrl-soon:hover       { border-color: rgba(255,255,255,0.12); }
.ctrl-game-card        { display: block; padding: 0.9rem 1rem; margin-bottom: 0.6rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; text-decoration: none; }
.ctrl-game-card:hover  { border-color: var(--ap-accent); }
.ctrl-progress         { height: 4px; margin: 0.7rem auto 0; max-width: 220px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.ctrl-progress-fill    { height: 100%; width: 0%; background: var(--ap-accent); border-radius: 2px; transition: width 0.3s linear; }

/* ── Utility helpers — replace inline styles (CLASSES ONLY, per CLAUDE.md § Frontend/CSS). Loaded on every
      page (apex.css is linked app-wide and on the TV), so these cover phone + kiosk + darts_main markup. ── */
.ap-text        { color: var(--ap-text); }
.ap-muted       { color: var(--ap-muted); }
.ap-accent      { color: var(--ap-accent); }
.ap-primary     { color: var(--ap-primary); }
.ap-hidden      { display: none !important; }   /* toggled by JS (ApexTV.show etc.) to hide/show views */
.ap-flex-1      { flex: 1; }
.ap-mono-code   { text-transform: uppercase; letter-spacing: 6px; }
.ap-eyebrow     { font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); }
.ap-controller-tag { margin-left: 0.85rem; font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ap-accent); }
/* 2026-07-10 - Trinity - Version readout pushed to the right of the controller header (platform version on
   home/setup, the live game's version on a game screen). Muted so it never competes with the controls. */
.ap-header-version { margin-left: auto; font-size: 0.7rem; letter-spacing: 1px; color: var(--ap-muted); opacity: 0.6; white-space: nowrap; }
.ap-footer-version { font-size: 0.7rem; opacity: 0.35; margin-top: 0.2rem; }
.ap-small-muted    { font-size: 0.85rem; color: var(--ap-muted); }
.ap-hint-sm        { color: var(--ap-muted); font-size: 0.82rem; margin-top: 0.75rem; }
.ap-form-hint      { color: var(--ap-muted); font-size: 0.8rem; margin-top: 1rem; }
/* 2026-07-13 - Trinity - Venue hub settings: inline monospace for URLs/tokens, and the hub-role status pill */
.ap-mono           { font-family: monospace; word-break: break-all; }
.ap-hub-status     { padding: 0.6rem 0.8rem; margin-bottom: 1rem; background: var(--ap-card); border-left: 3px solid var(--ap-muted); }
.ap-hub-status.on  { border-left-color: var(--ap-accent); }
/* 2026-07-13 - Trinity - Venue leaderboard */
.lb-block  { margin-bottom: 1.5rem; }
.lb-head   { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0.4rem 0.35rem; border-bottom: 1px solid var(--ap-primary); margin-bottom: 0.35rem; }
.lb-game   { font-weight: 700; color: var(--ap-text); }
.lb-unit   { font-size: 0.72rem; color: var(--ap-muted); text-transform: uppercase; letter-spacing: 1px; }
.lb-row    { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--ap-card); }
.lb-rank   { width: 1.7rem; text-align: center; font-weight: 700; color: var(--ap-muted); }
.lb-top .lb-rank { color: var(--ap-accent); }
.lb-name   { flex: 1; color: var(--ap-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-games  { font-size: 0.72rem; color: var(--ap-muted); }
.lb-rating { font-weight: 700; color: var(--ap-primary); min-width: 3rem; text-align: right; }
/* 2026-07-13 - Trinity - Competitions: leagues, standings, tournament brackets */
.btn-ap-mini    { display: inline-block; padding: 0.3rem 0.7rem; font-size: 0.8rem; border: 1px solid var(--ap-muted); border-radius: 6px; background: transparent; color: var(--ap-text); cursor: pointer; }
.btn-ap-mini:hover { border-color: var(--ap-primary); color: var(--ap-primary); }
.comp-h         { margin: 1rem 0 0.5rem; font-size: 1rem; color: var(--ap-text); }
.comp-item      { margin-bottom: 0.4rem; }
.comp-link      { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 0.6rem 0.8rem; background: var(--ap-card); border: 1px solid var(--ap-card); border-radius: 8px; color: var(--ap-text); cursor: pointer; }
.comp-link:hover { border-color: var(--ap-accent); }
.comp-name      { font-weight: 700; color: var(--ap-text); }
.comp-meta      { font-size: 0.78rem; color: var(--ap-muted); }
.comp-create    { margin-top: 0.6rem; }
.comp-item-row  { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.35rem 0.2rem; border-bottom: 1px solid var(--ap-card); }
.comp-standings { margin: 0.4rem 0; }
.comp-srow      { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.3rem; border-bottom: 1px solid var(--ap-card); }
.comp-shead     { color: var(--ap-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }
.comp-srank     { width: 1.5rem; text-align: center; color: var(--ap-muted); font-weight: 700; }
.comp-sname     { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-scol      { width: 2rem; text-align: center; color: var(--ap-muted); }
.comp-spts      { width: 2.5rem; text-align: right; font-weight: 700; color: var(--ap-primary); }
.brk-match      { border: 1px solid var(--ap-card); border-radius: 8px; padding: 0.4rem 0.6rem; margin-bottom: 0.5rem; }
.brk-side       { padding: 0.2rem 0; color: var(--ap-text); }
.brk-side.brk-win { font-weight: 700; color: var(--ap-accent); }
.brk-actions    { display: flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }
/* 2026-07-13 - Trinity - Sync health summary */
.sync-status    { display: flex; gap: 0.9rem; flex-wrap: wrap; margin: 0.6rem 0; }
.sync-stat      { font-size: 0.8rem; color: var(--ap-muted); }
.sync-num       { font-weight: 700; color: var(--ap-text); font-size: 1.1rem; margin-right: 0.2rem; }
.sync-warn .sync-num { color: var(--ap-primary); }
.ap-emoji-lg       { font-size: 2.5rem; margin-bottom: 0.25rem; }
.ap-btn-lg         { font-size: 1.1rem; padding: 1rem; }
.ap-btn-stack      { display: block; margin-bottom: 0.75rem; }
.ap-play-wrap      { max-width: 480px; padding-bottom: 2rem; }
.ap-divider-top    { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 1.5rem; padding-top: 1.25rem; }
.ap-kioskgo-title  { font-size: 1.8rem; font-weight: 900; letter-spacing: 2px; margin-bottom: 1rem; }
.ap-emoji-md       { font-size: 2rem; line-height: 1; }
.ap-note           { color: var(--ap-muted); font-size: 0.82rem; }
.ap-muted-sm       { color: var(--ap-muted); font-size: 0.8rem; }
.ap-code-accent    { color: var(--ap-accent); letter-spacing: 2px; }
.ap-row-divider    { border-bottom: 1px solid rgba(255,255,255,0.06); }
.ap-container-narrow { max-width: 520px; }
.ap-btn-sm         { font-size: 0.85rem; padding: 0.5rem; }
.ap-dim            { opacity: 0.7; }
.ap-mb-sm          { margin-bottom: 0.75rem; }
.btn-ap-primary:disabled, .btn-ap-outline:disabled { opacity: 0.4; cursor: not-allowed; }
/* Controller operator panel + bind screen */
.ctrl-join-code    { font-size: 2.2rem; font-weight: 900; letter-spacing: 6px; color: var(--ap-accent); }
.ctrl-join-qr      { display: inline-block; margin: 1rem 0; }
.ctrl-status-line  { font-size: 1.15rem; font-weight: 700; color: var(--ap-text); }
.ctrl-status-sub   { color: var(--ap-muted); font-size: 0.82rem; margin-top: 0.4rem; }
.ctrl-start-hint   { color: var(--ap-muted); font-size: 0.8rem; text-align: center; margin-bottom: 0.75rem; }
.ctrl-finished-note { color: var(--ap-muted); font-size: 0.8rem; margin-top: 0.9rem; }
.ctrl-reset-btn    { font-size: 0.8rem; padding: 0.4rem 1.3rem; opacity: 0.85; }
.ctrl-bind-code    { color: var(--ap-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.ctrl-game-desc    { color: var(--ap-muted); font-size: 0.82rem; margin-top: 0.15rem; }
/* HQ admin panel */
.adm-status-ok     { color: #00c853; font-weight: 700; }
.adm-status-warn   { color: var(--ap-accent); font-weight: 700; }
.adm-status-none   { color: var(--ap-muted); }
.adm-mono          { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--ap-muted); word-break: break-all; }
.adm-game-list     { display: flex; flex-direction: column; gap: 0.5rem; }
.adm-game-row      { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.9rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; }
.adm-price         { color: var(--ap-muted); font-size: 0.85rem; }
.adm-wrap          { max-width: 960px; }
/* 2026-07-17 - Trinity - Native date input on the dark theme: the calendar-picker icon is black by default
   (invisible + unclickable here), so invert it to make the picker usable. */
.adm-date::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.7; cursor: pointer; }
.adm-date::-webkit-calendar-picker-indicator:hover { opacity: 1; }
/* Host wizard */
.ap-btn-md         { font-size: 1rem; padding: 0.85rem; }
.ap-btn-back       { font-size: 0.9rem; padding: 0.7rem; opacity: 0.8; }
.ap-note-center    { color: var(--ap-muted); font-size: 0.8rem; text-align: center; margin-top: 1rem; }
.ap-locked         { opacity: 0.85; pointer-events: none; }
.ap-setting-desc   { color: var(--ap-muted); font-size: 0.78rem; margin-top: 0.35rem; }
.ap-radio-group    { display: flex; flex-direction: column; gap: 0.55rem; }
.ap-radio-option   { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; padding: 0.6rem 0.75rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; }
.ap-radio-input    { margin-top: 0.2rem; flex: none; }
.ap-radio-desc     { display: block; color: var(--ap-muted); font-size: 0.78rem; }
/* Reset screen */
.reset-emoji       { font-size: 2.5rem; margin-bottom: 0.5rem; }
.reset-code        { font-size: 2.2rem; font-weight: 900; color: var(--ap-accent); margin: 0.5rem 0; }
/* Dashboard stat tiles + recent-games list */
.dash-stat-row     { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dash-stat-tile    { min-width: 120px; text-align: center; padding: 0.75rem 1.25rem; border: 1px solid var(--ap-accent); border-radius: 12px; background: var(--ap-card); }
.dash-stat-label   { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); }
.dash-stat-value   { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.dash-stat-unit    { font-size: 0.7rem; color: var(--ap-muted); }
.dash-game-row     { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dash-badge        { font-weight: 800; font-size: 0.72rem; letter-spacing: 1px; padding: 0.12rem 0.5rem; border-radius: 4px; }
.dash-badge-won    { background: rgba(0,200,83,0.15); color: #00c853; }
.dash-badge-lost   { background: rgba(255,255,255,0.06); color: var(--ap-muted); }
/* 2026-07-31 - Trinity - A finished game with no captured row: the result is UNKNOWN, not a loss.
   WHY: quieter than 'lost' on purpose — it is an absence of data, so it should not read as an outcome. */
.dash-badge-unknown { background: rgba(255,255,255,0.03); color: var(--ap-muted); opacity: 0.75; }
.dash-game-sub     { color: var(--ap-muted); font-size: 0.78rem; margin-top: 0.25rem; }
.dash-game-score   { font-weight: 900; color: var(--ap-primary); font-size: 1.15rem; }
.dash-game-meta    { color: var(--ap-muted); font-size: 0.72rem; }
/* Shared small helpers + lobby */
.ap-container-wide { max-width: 680px; }
.ap-container-600  { max-width: 600px; }
.ap-hairline       { border-bottom: 1px solid rgba(255,255,255,0.05); }
.ap-btn-xs         { font-size: 0.8rem; padding: 0.4rem 1rem; }
.ap-muted-xs       { color: var(--ap-muted); font-size: 0.75rem; }
.ap-accent-xs      { color: var(--ap-accent); font-size: 0.75rem; }
.ap-fs-sm          { font-size: 0.85rem; }
.ap-icon-btn       { background: none; border: none; color: var(--ap-primary); font-size: 1.2rem; cursor: pointer; }
.lobby-sub-125     { color: var(--ap-muted); font-size: 0.85rem; margin-bottom: 1.25rem; }
.lobby-eyebrow     { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 0.75rem; }
.lobby-eyebrow-top { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); margin-top: 1.25rem; margin-bottom: 0.75rem; }
.lobby-check       { width: 20px; height: 20px; accent-color: var(--ap-primary); cursor: pointer; flex-shrink: 0; }
.lobby-check-label { font-weight: 700; color: var(--ap-text); cursor: pointer; margin: 0; flex: 1; }
.lobby-slot-code   { font-size: 1.5rem; font-weight: 900; letter-spacing: 4px; }
/* Shared bits reused by the play pages */
.ap-muted-tiny     { color: var(--ap-muted); font-size: 0.7rem; }
.ap-title-sm       { font-size: 0.9rem; }
.ap-spacer-sm      { height: 0.75rem; }
.ap-dim-half       { opacity: 0.5; }
.ap-btn-exit       { font-size: 0.8rem; border-color: rgba(255,255,255,0.15); color: var(--ap-muted); }
.ap-btn-lg9        { font-size: 1.1rem; padding: 0.9rem; }
/* Cricket player view (cricket_play.php) */
.cr-t1             { color: #00d4ff; }
.cr-t2             { color: var(--ap-primary); }
.cr-t1-xs          { color: #00d4ff; font-size: 0.65rem; }
.cr-t2-xs          { color: var(--ap-primary); font-size: 0.65rem; }
.cr-team-col       { flex: 1; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 0.75rem; }
.cr-team-name      { font-weight: 800; margin-bottom: 0.5rem; }
.cr-player-row     { padding: 0.2rem 0; font-weight: 600; }
.cr-unassigned     { margin-top: 0.75rem; color: var(--ap-muted); font-size: 0.85rem; }
.cr-team-btn       { padding: 0.7rem; border-radius: 6px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,0.15); background: none; color: var(--ap-text); }
.cr-team-btn.sel-0 { border-color: #00d4ff; background: rgba(0,212,255,0.15); }
.cr-team-btn.sel-1 { border-color: var(--ap-primary); background: rgba(233,69,96,0.15); }
.cr-code           { font-size: 1.8rem; font-weight: 900; letter-spacing: 3px; color: var(--ap-primary); }
.cr-fairness-label { font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-muted); }
.cr-headstart      { color: var(--ap-accent); font-size: 0.95rem; margin-top: 0.25rem; }
.cr-note-mt        { color: var(--ap-muted); font-size: 0.82rem; margin-top: 0.25rem; }
/* 2026-07-31 - Trinity - Unrated-player skill tiers in the cricket lobby (roadmap B4). Same shape as the
   x01 wizard's equivalent (.dp-hcap-row), sitting inside the Start Match form. */
.cr-tier-block     { text-align: left; margin-bottom: 0.85rem; }
.cr-tier-title     { font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 0.3rem; }
.cr-tier-note      { color: var(--ap-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.cr-tier-row       { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cr-btn-stack      { display: flex; flex-direction: column; gap: 0.6rem; }
.cr-big-score      { font-size: 3.5rem; font-weight: 900; color: var(--ap-primary); line-height: 1; }
.cr-solo-sub       { color: var(--ap-muted); margin: 0.5rem 0 1.25rem; }
.cr-result-score   { font-size: 1.6rem; font-weight: 800; }
.cr-banner-body    { text-align: center; padding: 0.6rem 0.9rem; }
.cr-waiting-line   { font-size: 1.05rem; font-weight: 800; }
.cr-score-row-body { padding: 0.4rem 0.75rem; text-align: left; }
.cr-runs-label     { color: var(--ap-muted); font-size: 0.65rem; letter-spacing: 2px; }
.cr-runs-big       { font-size: 1.7rem; font-weight: 900; color: var(--ap-primary); }
.cr-runs-md        { font-size: 1.5rem; }
.cr-wicket         { color: var(--ap-text); font-weight: 800; }
.cr-wicket-lg      { color: var(--ap-text); font-weight: 800; font-size: 0.98rem; }
.cr-marks          { color: var(--ap-accent); font-weight: 800; }
.cr-score-flex     { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.cr-mid-label      { font-weight: 400; color: var(--ap-muted); font-size: 0.8rem; }
.cr-chase          { text-align: center; color: var(--ap-muted); font-size: 0.78rem; margin-top: 0.3rem; }
.cr-pad-body       { padding: 0.85rem; }
.cr-rules-line     { font-size: 0.85rem; margin-bottom: 0.75rem; }
.cr-btn-close      { font-size: 0.85rem; border-color: var(--ap-muted); color: var(--ap-muted); }
/* More shared helpers */
.ap-dim-4          { opacity: 0.4; }
.ap-muted-72       { color: var(--ap-muted); font-size: 0.72rem; }
.ap-fs-95          { font-size: 0.95rem; }
.ap-fs-1r          { font-size: 1rem; }
/* Assassin player view (assassin_play.php) */
.an-player-row     { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.an-join-hint      { color: var(--ap-muted); font-size: 0.85rem; margin: 0 0 0.5rem; }
.an-code           { font-size: 1.7rem; font-weight: 900; letter-spacing: 4px; color: var(--ap-primary); }
.an-btn-lg         { font-size: 1.05rem; padding: 0.9rem; }
.an-note           { color: var(--ap-muted); font-size: 0.75rem; margin: 0.6rem 0 0; }
.an-trophy         { font-size: 2.5rem; margin-bottom: 0.4rem; }
.an-eyebrow3       { font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--ap-muted); }
.an-eyebrow-05     { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 0.5rem; }
.an-winner         { font-size: 1.8rem; font-weight: 900; color: var(--ap-primary); }
.an-result-line    { margin-top: 0.75rem; color: var(--ap-muted); font-size: 0.9rem; }
.an-home-link      { display: block; text-align: center; padding: 0.75rem; color: var(--ap-muted); font-size: 0.9rem; text-decoration: none; }
.an-label          { font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); }
.an-you            { font-size: 1.1rem; font-weight: 800; }
.an-lives          { font-size: 1.3rem; }
.an-target-card    { border: 1px solid var(--ap-primary); }
.an-target-name    { font-size: 1.7rem; font-weight: 900; color: var(--ap-primary); margin: 0.15rem 0; }
.an-target-note    { color: var(--ap-muted); font-size: 0.72rem; margin-top: 0.4rem; }
.an-your-throw     { color: var(--ap-accent); font-weight: 800; text-align: center; margin-bottom: 1rem; }
.an-standing-row   { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.an-name           { font-weight: 500; }
.an-name-current   { font-weight: 800; }
.an-throwing       { color: var(--ap-accent); font-size: 0.7rem; }
.an-feed-row       { font-size: 0.85rem; padding: 0.15rem 0; }
.an-heart          { color: var(--ap-primary); }
.an-heart-empty    { color: rgba(255,255,255,0.18); }
/* More shared helpers */
.ap-eyebrow-xs     { font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); }
.ap-btn-muted      { font-size: 0.85rem; border-color: var(--ap-muted); color: var(--ap-muted); }
.ap-muted-mb-sm    { color: var(--ap-muted); margin-bottom: 0.4rem; }
.ap-join-code      { font-size: 1.7rem; font-weight: 900; letter-spacing: 4px; color: var(--ap-primary); }
.ap-input-auto     { width: auto; min-width: 150px; }
.ap-trophy         { font-size: 2.5rem; margin-bottom: 0.5rem; }
/* Darts x01 player view (darts_play_body.php + x01pad.js) */
.dp-hero           { text-align: center; padding: 0.25rem 0 1rem; }
.dp-score          { font-size: 5rem; font-weight: 900; line-height: 1; color: var(--ap-primary); margin: 0.25rem 0; }
.dp-hcap-chip      { display: inline-block; margin-top: 0.5rem; padding: 0.2rem 0.7rem; border: 1px solid var(--ap-accent); border-radius: 999px; font-size: 0.72rem; color: var(--ap-accent); }
/* 2026-11-21 - Trinity - A head start still calibrating (under 3 games; HandicapBasis) */
.dp-hcap-calibrating { margin-left: 0.2rem; color: var(--ap-muted); font-style: italic; }
.dp-rules-btn      { background: none; border: 1px solid rgba(255,255,255,0.15); color: var(--ap-muted); padding: 0.35rem 1.1rem; border-radius: 4px; font-size: 0.78rem; cursor: pointer; letter-spacing: 1px; }
.dp-rules-body     { text-align: left; font-size: 0.86rem; line-height: 1.6; }
.dp-rules-title    { font-weight: 900; font-size: 1rem; margin-bottom: 1rem; color: var(--ap-primary); }
.dp-rules-head-first { font-weight: 700; color: var(--ap-accent); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.35rem; }
.dp-rules-head     { font-weight: 700; color: var(--ap-accent); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.35rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.06); }
.dp-rules-board    { max-width: 260px; margin: 0 auto 1rem; }
.dp-rules-list     { color: var(--ap-muted); padding-left: 1.2em; margin-bottom: 0.4rem; }
.dp-checkin-row    { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dp-waiting        { padding: 0.75rem 0; color: var(--ap-muted); font-size: 0.85rem; }
.dp-hcap-row       { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dp-hcap-hint      { color: var(--ap-muted); font-size: 0.8rem; margin-bottom: 1rem; }
.dp-hcap-sub       { display: block; font-size: 0.66rem; color: var(--ap-muted); font-weight: 400; }
.dp-rated          { color: var(--ap-accent); font-size: 0.85rem; white-space: nowrap; }
.dp-eyebrow3       { font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 0.25rem; }
.dp-eyebrow-2      { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 0.3rem; }
.dp-winner         { font-size: 1.8rem; font-weight: 900; color: var(--ap-primary); }
.dp-rating-new     { font-size: 1.6rem; font-weight: 900; color: var(--ap-accent); }
.dp-rating         { font-size: 1.5rem; font-weight: 900; }
.dp-rating-up      { color: #00c853; font-size: 0.85rem; }
.dp-rating-flat    { color: var(--ap-muted); font-size: 0.85rem; }
.dp-sub-note       { color: var(--ap-muted); font-size: 0.74rem; margin-top: 0.35rem; }
.dp-turn-ind       { text-align: center; margin-bottom: 1rem; font-size: 0.85rem; color: var(--ap-muted); }
.dp-section-head   { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 1rem; }
.dp-score-row      { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dp-name           { color: var(--ap-text); font-weight: 400; }
.dp-name-current   { color: var(--ap-text); font-weight: 700; }
.dp-player-score   { font-size: 1.3rem; font-weight: 900; color: var(--ap-primary); }
.dp-rules-showing  { font-size: 0.78rem; color: var(--ap-muted); margin-bottom: 0.75rem; text-align: center; }
.dp-co-wrap        { margin-bottom: 0.85rem; }
.dp-co-route       { color: var(--ap-accent); font-size: 0.98rem; font-weight: 800; }

/* ── Controller appliance layout ─────────────────────────────────────────────────────────────────────
   2026-07-09 - Trinity - A bound controller device is a dedicated operator appliance, not a browsing
   phone. Below the navbar (the header), the operator buttons fill the whole screen for big, thumb-friendly
   targets. Scoped to body.controller-device so normal phones/players are untouched. */
body.controller-device            { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.controller-device .ap-navbar { flex: 0 0 auto; }
body.controller-device .ap-footer { display: none; }               /* reclaim the marketing footer's space */

body.controller-device .ctrl-panel   { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
                                        padding-top: 1rem; padding-bottom: 1rem; }
body.controller-device .ctrl-head    { flex: 0 0 auto; margin-bottom: 0.5rem; }
body.controller-device .ctrl-info    { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
body.controller-device .ctrl-foot    { flex: 0 0 auto; margin-top: 0.75rem; text-align: center; }

/* The action region grows to fill everything left below the header/info. */
body.controller-device .ctrl-actions { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.6rem;
                                        min-height: 0; margin-top: 1rem; }
body.controller-device .ctrl-actions > form            { display: flex; margin: 0; }
body.controller-device .ctrl-actions > form > button   { width: 100%; }
/* Secondary (outline) actions: a comfortable fixed height. */
body.controller-device .ctrl-actions > form > .btn-ap-outline { min-height: 3.25rem; font-size: 1.15rem; font-weight: 700; }
/* The hero primary action fills the remaining space. */
body.controller-device .ctrl-actions > form.ctrl-primary-form         { flex: 1 1 auto; min-height: 4.5rem; }
body.controller-device .ctrl-actions > form.ctrl-primary-form > button{ height: 100%; font-size: clamp(1.5rem, 6vw, 2.4rem); font-weight: 800; }
/* A hint line sits between the buttons without stretching. */
body.controller-device .ctrl-actions > .ctrl-start-hint { flex: 0 0 auto; margin: 0.1rem 0; text-align: center; }

/* 2026-07-09 - Trinity - Controller as a scoring device: the game's pad fills the screen below the header;
   the current-thrower line sits above it and the operator actions demote to a compact bar beneath. */
body.controller-device .ctrl-scoring { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; gap: 0.6rem; }
body.controller-device .ctrl-thrower { flex: 0 0 auto; text-align: center; font-size: 1.15rem; }
body.controller-device .ctrl-pad     { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; }
body.controller-device .ctrl-op-bar  { flex: 0 0 auto; display: flex; gap: 0.5rem; }
body.controller-device .ctrl-op-bar > form               { flex: 1 1 0; margin: 0; }
body.controller-device .ctrl-op-bar > form > .ctrl-op-btn { width: 100%; min-height: 3rem; font-weight: 700; }

/* 2026-07-09 - Trinity - Controller pad fills the screen: drop the app's narrow-container width cap and
   enlarge the pad. Numbers mode's key grid stretches to fill (grid-auto-rows:1fr); Board mode's dartboard
   (square by nature) grows to the available height. */
body.controller-device .ctrl-panel { max-width: none; width: 100%; }
body.controller-device .ctrl-pad .x01pad          { height: 100%; }
body.controller-device .ctrl-pad .x01pad-board    { max-width: min(80vh, 100%); }
body.controller-device .ctrl-pad .x01pad-numpad   { flex: 1 1 auto; min-height: 0; }
body.controller-device .ctrl-pad .x01pad-nums     { flex: 1 1 auto; grid-auto-rows: 1fr; }
body.controller-device .ctrl-pad .x01pad-nums button,
body.controller-device .ctrl-pad .x01pad-bulls button { font-size: clamp(1.3rem, 3.2vw, 2.3rem); padding: 0; }
body.controller-device .ctrl-pad .x01pad-mult button  { font-size: clamp(1.05rem, 2.4vw, 1.6rem); }
body.controller-device .ctrl-pad .x01pad-mode         { font-size: 1rem; padding: 0.6rem; }
body.controller-device .ctrl-pad .x01pad-slot         { font-size: clamp(1rem, 2.4vw, 1.5rem); }

/* 2026-07-09 - Trinity - Cricket / Assassin pads on the controller: full width + touch-sized keys. */
body.controller-device .ctrl-pad .ckpad,
body.controller-device .ctrl-pad .apad { height: 100%; }
body.controller-device .ctrl-pad .ckpad button,
body.controller-device .ctrl-pad .apad button { min-height: 3.4rem; font-size: clamp(1.1rem, 2.8vw, 1.7rem); }
/* 2026-07-10 - Trinity - Killer pad on the controller: fills the width, touch-sized keys. */
body.controller-device .ctrl-pad .klpad { height: 100%; }
body.controller-device .ctrl-pad .klpad-target,
body.controller-device .ctrl-pad .klpad-mult-btn,
body.controller-device .ctrl-pad .klpad-bull,
body.controller-device .ctrl-pad .klpad-miss { min-height: 3.2rem; font-size: clamp(1.05rem, 2.6vw, 1.6rem); }

/* ── In-app confirmation sheet (common/js/apexconfirm.js) ────────────────────────────────────────────
   2026-07-29 - Trinity - Replaces native confirm(), which renders as an OS dialog: wrong theme, wrong
   place, and on a wall-mounted tablet its buttons land under a stray thumb. Opt in with data-confirm. */
.ap-confirm {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.ap-confirm-box {
    background: var(--ap-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--ap-primary);
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.25rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.ap-confirm-text {
    color: var(--ap-text);
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.ap-confirm-actions      { display: flex; gap: 0.75rem; }
.ap-confirm-actions > *  { flex: 1; min-height: 3rem; }

/* ── Rules CONTENT — shared by the TV overlay and the phone "How to Play" panel ──────────────────────
   2026-07-29 - Trinity - These classes were trapped in a <style> block inside darts_main.php, so the only
   thing that could render a game's rules was the TV. Each game module already builds its rules HTML with
   these classes (games/<slug>/tv.js -> spec.rules.sections), so lifting them into the app-wide sheet lets a
   phone render the exact same content — one source of rules for 13 games instead of hand-written copies.
   The TV-only overlay chrome + entrance animations stay in apextv.css. */
.rules-lead        { font-size: clamp(0.95rem,2.1vw,1.45rem); line-height: 1.7; color: var(--ap-muted); margin-bottom: clamp(0.5rem,1vw,0.9rem); flex-shrink: 0; }
.rules-lead strong { color: var(--ap-text); }
.rules-accent      { color: var(--ap-primary) !important; }
.rules-grid        { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(clamp(280px,28vw,500px), 1fr)); gap: clamp(0.65rem,1.3vw,1.1rem); align-content: stretch; }
.rules-box         { display: flex; flex-direction: column; background: var(--ap-card); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: clamp(1rem,2vw,1.75rem); }
.rules-box-wide    { grid-column: span 2; }
.rules-box-title   { font-size: clamp(0.85rem,1.7vw,1.25rem); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-accent); margin-bottom: 0.55rem; flex-shrink: 0; }
.rules-box-text    { flex: 1; font-size: clamp(1.3rem,2.5vw,1.95rem); line-height: 1.55; color: var(--ap-text); }
.rules-tip         { margin-top: 0.7rem; background: rgba(255,200,0,0.06); border-left: 3px solid var(--ap-accent); padding: 0.6rem 0.9rem; font-size: clamp(0.78rem,1.5vw,1rem); color: var(--ap-accent); border-radius: 0 4px 4px 0; flex-shrink: 0; }
.rules-grid-sm     { grid-template-columns: repeat(auto-fit, minmax(clamp(220px,20vw,340px), 1fr)); gap: clamp(0.5rem,1vw,0.9rem); }
.rules-box-sm      { padding: clamp(0.8rem,1.3vw,1.25rem); }
.rules-box-sm .rules-box-title { font-size: clamp(0.78rem,1.4vw,1.15rem); margin-bottom: 0.4rem; }
.rules-box-sm .rules-box-text  { font-size: clamp(1.15rem,2.1vw,1.7rem); line-height: 1.45; }
.rules-two-col     { display: flex; gap: clamp(1rem,2.5vw,2.5rem); flex: 1; min-height: 0; }
.rules-board-col   { flex: 0 0 clamp(320px,66vh,780px); align-self: center; }
.rules-text-col    { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rules-text-col-center { justify-content: center; }

/* Also used inside module rules HTML, so shared rather than TV-only (moved from apextv.css). */
.rules-grid-static { flex: 0 0 auto; }
.rules-inline-list { margin: 0; padding-left: 1.2em; line-height: 1.9; }
.tv-double-dot     { color: #00d4ff; }
.tv-triple-dot     { color: #e94560; }

/* The board decoration a module's applyBoard() adds. Shared: the phone panel mounts the same board. */
@keyframes rulesSegPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.rules-pulse       { animation: rulesSegPulse 1.9s ease-in-out infinite; }

/* ── Phone "How to Play" panel (common/includes/phone_rules.php) ─────────────────────────────────────
   2026-07-29 - Trinity - Renders a game module's OWN rules on the phone. The module HTML is written for a
   TV, so this scopes it back down: the two-column board layout stacks, the board stops demanding 320px of
   a 360px screen, and the TV's large clamp() minimums come back to phone reading sizes. */
.ph-rules-body     { text-align: left; }
.ph-rules-section  { padding-top: 0.9rem; margin-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.06); }
.ph-rules-section:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.ph-rules-title    { font-weight: 700; color: var(--ap-accent); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.6rem; }
.ph-rules-empty    { color: var(--ap-muted); font-size: 0.86rem; }

.ph-rules-body .rules-two-col   { flex-direction: column; gap: 0.9rem; }
.ph-rules-body .rules-board-col { flex: 0 0 auto; width: 100%; max-width: 240px; margin: 0 auto; }
.ph-rules-body .rules-grid      { grid-template-columns: 1fr; gap: 0.5rem; }
.ph-rules-body .rules-box       { padding: 0.7rem 0.85rem; }
.ph-rules-body .rules-box-wide  { grid-column: span 1; }
.ph-rules-body .rules-lead      { font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.6rem; }
.ph-rules-body .rules-box-title { font-size: 0.66rem; letter-spacing: 1.5px; margin-bottom: 0.3rem; }
.ph-rules-body .rules-box-text  { font-size: 0.88rem; line-height: 1.5; }
.ph-rules-body .rules-tip       { font-size: 0.78rem; padding: 0.5rem 0.7rem; }
.ph-rules-body ul, .ph-rules-body ol { padding-left: 1.2em; margin-bottom: 0.4rem; }

/* 2026-07-29 - Trinity - Shared rules-overlay control (common/includes/rules_control.php), used by the
   operator panel and the host phone. Its buttons are secondary chrome, so inside the controller appliance
   they stay compact instead of inheriting the full-height treatment .ctrl-actions gives its own children. */
.ap-rules-control { margin-bottom: 0.6rem; }
body.controller-device .ap-rules-control          { flex: 0 0 auto; }
body.controller-device .ap-rules-control form     { display: flex; margin: 0; }
body.controller-device .ap-rules-control button   { min-height: 2.75rem; font-size: 1rem; }
body.controller-device .ctrl-scoring .ap-rules-control { margin-bottom: 0; margin-top: 0.5rem; }

/* 2026-07-10 - Trinity - "New Games" upsell: installed-but-unlicensed games grouped in a card per sport. */
.ng-sport-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ap-accent); margin-bottom: 0.75rem; }
.ng-card        { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 0.6rem; }
.ng-card:last-child { margin-bottom: 0; }
.ng-card-title  { font-weight: 800; font-size: 1.05rem; color: var(--ap-text); }
.ng-card-obj    { font-size: 0.9rem; color: var(--ap-muted); margin-top: 0.25rem; line-height: 1.4; }
.ng-card-foot   { font-size: 0.78rem; color: var(--ap-accent); margin-top: 0.5rem; font-weight: 600; }

/* 2026-07-10 - Trinity - Killer entry pad (killerpad.js). Multiplier + number grid, per-target mark pips,
   and the double/treble bank-choice panel. Classes only; theme variables for colour/spacing/radii. */
.klpad            { display: flex; flex-direction: column; gap: 0.6rem; }
.klpad.busy       { opacity: 0.5; pointer-events: none; }
.klpad-head       { text-align: center; font-size: 0.8rem; letter-spacing: 1px; color: var(--ap-muted); }
.klpad-mult       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.klpad-mult-btn   { padding: 0.7rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    color: var(--ap-text); border-radius: 10px; font-weight: 800; font-size: 1.15rem; cursor: pointer;
                    -webkit-tap-highlight-color: transparent; }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.klpad-mult-btn.is-active { border-color: var(--ap-primary); background: var(--ap-primary); color: var(--ap-on-primary); }
.klpad-grid       { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.klpad-rings      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.klpad-rings-note { text-align: center; font-size: 0.72rem; color: var(--ap-muted); margin-top: 0.2rem; }
.klpad-target     { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.7rem 0.3rem;
                    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--ap-text);
                    border-radius: 10px; font-weight: 800; font-size: 1.1rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.klpad-target:active { transform: scale(0.97); }
.klpad-target.is-closed { border-color: var(--ap-accent); color: var(--ap-accent); background: rgba(255,200,0,0.08); }
.klpad-target-label { line-height: 1; }
.klpad-pips       { display: flex; gap: 3px; }
.klpad-pip        { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.klpad-pip.is-on  { background: var(--ap-accent); }
.klpad-bottom     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.klpad-bull       { padding: 0.7rem 0.3rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    color: var(--ap-text); border-radius: 10px; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.klpad-miss       { padding: 0.7rem 0.3rem; border: 1px dashed rgba(255,255,255,0.15); background: none;
                    color: var(--ap-muted); border-radius: 10px; font-weight: 700; cursor: pointer; }
.klpad-choice     { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.klpad-choice-btn { display: flex; flex-direction: column; gap: 0.3rem; align-items: center; padding: 1.3rem 0.6rem;
                    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--ap-text);
                    border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.klpad-choice-btn:active { transform: scale(0.98); border-color: var(--ap-primary); }
.klpad-choice-big { font-weight: 800; font-size: 1.35rem; }
.klpad-choice-sub { font-size: 0.8rem; color: var(--ap-muted); }
.klpad-undo       { width: 100%; background: none; border: 1px dashed rgba(255,255,255,0.15); color: var(--ap-muted);
                    border-radius: 10px; font-size: 0.95rem; padding: 0.7rem; cursor: pointer; }
.klpad-undo:hover { border-color: var(--ap-accent); color: var(--ap-accent); }

/* Killer phone view: compact "your card" chips above the pad. */
.kl-card-body  { padding: 0.7rem 0.9rem; }
.kl-your-card  { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.kl-chip       { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.5rem; border-radius: 8px;
                 background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; font-weight: 700; color: var(--ap-text); }
.kl-chip.is-closed { border-color: var(--ap-accent); color: var(--ap-accent); background: rgba(255,200,0,0.08); }
.kl-chip-m     { font-size: 0.72rem; color: var(--ap-muted); }
.kl-chip.is-closed .kl-chip-m { color: var(--ap-accent); }
.kl-pad-body   { padding: 0.8rem; }

/* 2026-07-22 - Trinity - Detonation phone pad (.dtpad-*): the current thrower aims at ONE site, so a few big
   buttons (how you hit it, or a miss) + a live ARM/DEFUSE readout. Classes only; theme variables throughout. */
.dt-card-body     { padding: 0.7rem 0.9rem; }
.dt-pad-body      { padding: 0.8rem; }
.dtpad            { display: flex; flex-direction: column; gap: 0.7rem; }
.dtpad.busy       { opacity: 0.5; pointer-events: none; }
.dtpad-head       { text-align: center; font-size: 1rem; font-weight: 800; letter-spacing: 0.5px; color: var(--ap-text); }
.dtpad-head.dtpad-attack  strong { color: #ff8a1e; }   /* attackers plant — orange */
.dtpad-head.dtpad-defense strong { color: #3b9dff; }   /* defenders defuse — blue */
.dtpad-progress   { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--ap-muted); }
.dtpad-grid       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.dtpad-btn        { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
                    min-height: 4.2rem; padding: 0.7rem 0.4rem; border: 1px solid rgba(255,255,255,0.15);
                    background: rgba(255,255,255,0.05); border-radius: 12px; color: var(--ap-text);
                    font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.dtpad-btn:active { transform: scale(0.97); }
.dtpad-btn-hot    { border-color: var(--ap-danger); background: rgba(233,69,96,0.12); color: var(--ap-danger); }
.dtpad-btn-miss   { grid-column: 1 / -1; min-height: 3rem; border-style: dashed; background: none; color: var(--ap-muted); font-size: 1rem; }
/* 2026-11-14 - Trinity - Fix last dart, under Miss; in the controller's game view the card names the site and the progress. */
.dtpad-btn-undo   { min-height: 2.6rem; border-style: dashed; background: none; color: var(--ap-muted); font-size: 0.95rem; }
.dtpad-sub        { font-size: 0.68rem; font-weight: 600; color: var(--ap-muted); letter-spacing: 0.3px; }
.dtpad-btn-hot .dtpad-sub { color: var(--ap-danger); }

/* 2026-07-22 - Trinity - Capture the Bull phone pad (.cbpad-*): the objective flips with the flag — grab the
   bull when you're not carrying, or run your home in when you are. Big buttons, classes only, theme vars. */
.cb-card-body     { padding: 0.7rem 0.9rem; }
.cb-pad-body      { padding: 0.8rem; }
.cbpad            { display: flex; flex-direction: column; gap: 0.7rem; }
.cbpad.busy       { opacity: 0.5; pointer-events: none; }
.cbpad-head       { text-align: center; font-size: 1rem; font-weight: 700; color: var(--ap-text); }
.cbpad-head strong { color: var(--ap-accent); }
.cbpad-grid       { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cbpad-btn        { flex: 1 1 40%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
                    min-height: 4rem; padding: 0.7rem 0.4rem; border: 1px solid rgba(255,255,255,0.15);
                    background: rgba(255,255,255,0.05); border-radius: 12px; color: var(--ap-text);
                    font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.cbpad-btn:active { transform: scale(0.97); }
.cbpad-btn-hot    { border-color: var(--ap-accent); background: rgba(255,200,0,0.12); color: var(--ap-accent); }
.cbpad-btn-miss   { flex: 1 1 100%; min-height: 3rem; border-style: dashed; background: none; color: var(--ap-muted); font-size: 1rem; }
/* 2026-11-14 - Trinity - Fix last dart, under Miss. */
.cbpad-btn-undo   { flex: 1 1 100%; min-height: 2.6rem; border-style: dashed; background: none; color: var(--ap-muted); font-size: 0.95rem; }
.cbpad-sub        { font-size: 0.68rem; font-weight: 600; color: var(--ap-muted); }
.cbpad-btn-hot .cbpad-sub { color: var(--ap-accent); }

/* 2026-07-22 - Trinity - Territories phone pad (.trpad-*): a full number pad — every number pushes its zone,
   so numbers are grouped and tinted by zone (LOW / MID / HIGH). Classes only, theme variables. */
.tr-card-body     { padding: 0.7rem 0.9rem; }
.tr-pad-body      { padding: 0.8rem; }
.trpad            { display: flex; flex-direction: column; gap: 0.55rem; }
.trpad.busy       { opacity: 0.5; pointer-events: none; }
.trpad-head       { text-align: center; font-size: 0.8rem; color: var(--ap-muted); }
.trpad-mults      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.trpad-mult       { padding: 0.65rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    border-radius: 10px; color: var(--ap-text); font-size: 1.1rem; font-weight: 800; cursor: pointer; }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.trpad-mult.is-active { border-color: var(--ap-primary); background: var(--ap-primary); color: var(--ap-on-primary); }
.trpad-zone       { display: flex; align-items: center; gap: 0.4rem; }
.trpad-zone-lbl   { flex: 0 0 3.1rem; font-size: 0.62rem; font-weight: 800; letter-spacing: 1px; text-align: center; color: var(--ap-muted); }
.trpad-zone-lbl.zone-low  { color: #00d4ff; }
.trpad-zone-lbl.zone-mid  { color: #ffc800; }
.trpad-zone-lbl.zone-high { color: #ff9838; }
.trpad-nums       { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.trpad-num        { padding: 0.5rem 0.2rem; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
                    border-radius: 8px; color: var(--ap-text); font-size: 0.95rem; font-weight: 800; cursor: pointer; }
.trpad-num:active { transform: scale(0.95); }
.trpad-num.zone-low  { border-color: rgba(0,212,255,0.4); }
.trpad-num.zone-mid  { border-color: rgba(255,200,0,0.35); }
.trpad-num.zone-high { border-color: rgba(255,152,56,0.4); }
.trpad-bottom     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; margin-top: 0.15rem; }
.trpad-bull       { padding: 0.6rem 0.2rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    border-radius: 10px; color: var(--ap-text); font-size: 0.95rem; font-weight: 800; cursor: pointer; }
.trpad-miss       { padding: 0.6rem 0.2rem; border: 1px dashed rgba(255,255,255,0.15); background: none;
                    border-radius: 10px; color: var(--ap-muted); font-size: 0.95rem; font-weight: 700; cursor: pointer; }
/* 2026-11-14 - Trinity - Territories' Fix last dart, under the pad. */
.trpad-undo        { width: 100%; margin-top: 0.5rem; padding: 0.6rem; border-radius: 12px; border: 1px dashed var(--ap-muted); background: none; color: var(--ap-muted); font-size: 0.95rem; }

/* 2026-07-22 - Trinity - Tiles phone pad (.tlpad-*): a plain full number pad — any number can be a tile.
   Classes only, theme variables. */
.tl-card-body     { padding: 0.7rem 0.9rem; }
.tl-pad-body      { padding: 0.8rem; }
.tlpad            { display: flex; flex-direction: column; gap: 0.55rem; }
.tlpad.busy       { opacity: 0.5; pointer-events: none; }
.tlpad-head       { text-align: center; font-size: 0.8rem; color: var(--ap-muted); }
.tlpad-mults      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.tlpad-mult       { padding: 0.65rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    border-radius: 10px; color: var(--ap-text); font-size: 1.1rem; font-weight: 800; cursor: pointer; }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.tlpad-mult.is-active { border-color: var(--ap-primary); background: var(--ap-primary); color: var(--ap-on-primary); }
.tlpad-nums       { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.tlpad-num        { padding: 0.6rem 0.2rem; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
                    border-radius: 8px; color: var(--ap-text); font-size: 1rem; font-weight: 800; cursor: pointer; }
.tlpad-num:active { transform: scale(0.95); }
.tlpad-bottom     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; margin-top: 0.15rem; }
.tlpad-bull       { padding: 0.6rem 0.2rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
                    border-radius: 10px; color: var(--ap-text); font-size: 0.95rem; font-weight: 800; cursor: pointer; }
.tlpad-miss       { padding: 0.6rem 0.2rem; border: 1px dashed rgba(255,255,255,0.15); background: none;
                    border-radius: 10px; color: var(--ap-muted); font-size: 0.95rem; font-weight: 700; cursor: pointer; }
/* 2026-11-14 - Trinity - Mysteries' Fix last dart, under the pad. */
.tlpad-undo { width: 100%; margin-top: 0.5rem; padding: 0.6rem; border-radius: 12px; border: 1px dashed var(--ap-muted); background: none; color: var(--ap-muted); font-size: 0.95rem; }

/* 2026-07-16 - Trinity - Shared number-target entry pad primitives (.hipad-* / .hi-*). Used by Halve It
   (halveitpad.js) and Shanghai (shanghaipad.js): single/double/treble of a number, a number grid, or the
   two bulls. Classes only; theme variables for colour/spacing/radii, matching the Killer pad idiom. */
.hipad          { display: flex; flex-direction: column; gap: 0.6rem; }
.hipad.busy     { opacity: 0.5; pointer-events: none; }
.hipad-head     { text-align: center; font-size: 0.85rem; letter-spacing: 0.5px; color: var(--ap-text); font-weight: 700; }
.hipad-meta     { text-align: center; font-size: 0.78rem; color: var(--ap-muted); }
/* 2026-11-16 - Trinity - Darts Golf's pad: what the last dart did, under where the ball is (games/golf/pad.js). */
.golfpad-said    { color: var(--ap-accent); font-weight: 700; font-size: 0.85rem; }
/* 2026-11-20 - Trinity - Stage 3: the club row, the golden-tee note and the mulligan button (games/golf/pad.js). */
.golfpad-clubs-label { text-align: center; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-muted); }
/* 2026-11-20 - Trinity - The club row looks nothing like the ring row: a framed panel in the theme's primary colour,
   rounded pill buttons with what each club does underneath. */
.golfpad-clubs     { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem; border-radius: 12px;
                     border: 1px solid color-mix(in srgb, var(--ap-primary) 45%, transparent);
                     background: color-mix(in srgb, var(--ap-primary) 8%, transparent); }
.golfpad-club-row  { display: flex; gap: 0.4rem; }
.golfpad-club      { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.45rem 0.3rem;
                     border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ap-primary) 55%, transparent);
                     background: none; color: var(--ap-text); font-weight: 800; cursor: pointer; }
.golfpad-club small { font-size: 0.68rem; font-weight: 600; color: var(--ap-muted); }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.golfpad-club.active { background: var(--ap-primary); border-color: var(--ap-primary); color: var(--ap-on-primary); }
/* 2026-11-21 - Trinity - The small line at full strength: #111 at 80% was 4.00:1 on dark_electric's primary. */
.golfpad-club.active small { color: var(--ap-on-primary); }
/* 2026-11-21 - Trinity - The golden tee in the accent, not the primary: primary text was 4.46:1 (dark_electric) and 2.86:1
   (bold_sport) on the card; the accent is 9.6:1 or better in every theme. */
.golfpad-golden  { text-align: center; font-weight: 800; font-size: 0.85rem; color: var(--ap-accent); }
.golfpad-mulligan { width: 100%; background: none; border: 1px solid var(--ap-accent); color: var(--ap-accent); border-radius: 8px;
                    font-size: 0.95rem; font-weight: 700; padding: 0.7rem; cursor: pointer; }
.hipad-visit    { color: var(--ap-accent); font-size: 1.05rem; }
.hipad-dart     { color: var(--ap-muted); }
.hipad-row3     { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.hipad-grid     { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
.hipad-bulls    { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.hipad-btn      { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.9rem 0.4rem;
                  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--ap-text);
                  border-radius: 10px; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hipad-btn:active { transform: scale(0.97); border-color: var(--ap-primary); }
.hipad-btn-sm   { padding: 0.75rem 0.2rem; }
.hipad-btn-big  { font-size: 1.3rem; line-height: 1; }
.hipad-btn-sm .hipad-btn-big { font-size: 1.1rem; }
.hipad-btn-sub  { font-size: 0.72rem; color: var(--ap-muted); font-weight: 600; }
.hipad-miss     { padding: 0.75rem 0.3rem; border: 1px dashed rgba(255,255,255,0.15); background: none;
                  color: var(--ap-muted); border-radius: 10px; font-weight: 700; cursor: pointer; }
.hipad-miss:active { transform: scale(0.98); }
.hipad-undo     { width: 100%; background: none; border: 1px dashed rgba(255,255,255,0.15); color: var(--ap-muted);
                  border-radius: 10px; font-size: 0.95rem; padding: 0.7rem; cursor: pointer; }
.hipad-undo:hover { border-color: var(--ap-accent); color: var(--ap-accent); }

/* Halve It phone view: the round-target header above the pad. */
.hi-card-body    { padding: 0.7rem 0.9rem; }
.hi-target       { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; margin-top: 0.6rem; }
.hi-target-label { font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-muted); }
.hi-target-value { font-size: 1.6rem; font-weight: 800; color: var(--ap-accent); }
.hi-pad-body     { padding: 0.8rem; }

/* Halve It / Shanghai pad on the controller: fills the width, touch-sized keys (mirrors the Killer override). */
body.controller-device .ctrl-pad .hipad { height: 100%; }
body.controller-device .ctrl-pad .hipad-btn,
body.controller-device .ctrl-pad .hipad-miss { min-height: 3.2rem; font-size: clamp(1.05rem, 2.6vw, 1.6rem); }

/* 2026-07-16 - Trinity - Shanghai S·D·T tracker (shanghaipad.js): three pips that light as you land the
   single / double / treble of the round's number; all three in one visit is a Shanghai (instant win). */
.sh-track         { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: 0.1rem 0; }
.sh-pip           { width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
                    border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); font-weight: 800; font-size: 0.9rem;
                    color: var(--ap-muted); }
.sh-pip.is-on     { border-color: var(--ap-accent); background: rgba(255,200,0,0.12); color: var(--ap-accent); }
.sh-track-label   { font-size: 0.72rem; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ap-muted); }
/* 2026-11-21 - Trinity - Text on the accent in the card colour: #111 on bold_sport's navy accent was 1.53:1; the card is 9.6:1 or better everywhere. */
.sh-track.is-shanghai .sh-pip       { border-color: var(--ap-accent); background: var(--ap-accent); color: var(--ap-card); }
.sh-track.is-shanghai .sh-track-label { color: var(--ap-accent); font-weight: 800; }

/* ── Gallows (hangman darts) — phone scoring pad + mini word status ─────────── */
.glp-pad { display: flex; flex-direction: column; gap: 0.9rem; }
.glp-pad.is-busy { opacity: 0.6; pointer-events: none; }
.glp-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.glp-tile {
    min-width: 1.9rem; height: 2.6rem; padding: 0 0.2rem; display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; font-weight: 800; color: #ffdf94; border-bottom: 3px solid #6b4e2e; border-radius: 3px;
}
.glp-tile.is-open { border-bottom-color: #e7b24a; }
.glp-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 0.6rem; font-size: 0.9rem; color: var(--ap-muted); }
.glp-gallows strong { color: #e7b24a; }
.glp-gallows.is-danger strong { color: #e0574f; }
.glp-clue { font-style: italic; flex-basis: 100%; text-align: center; }
.glp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; width: 100%; }
.glp-key {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem;
    min-width: 0; box-sizing: border-box;
    padding: 0.5rem 0.1rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 0.6rem;
    background: var(--ap-card); color: var(--ap-text); cursor: pointer; transition: all 0.15s ease;
}
.glp-key:active { transform: scale(0.94); }
.glp-letter { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.glp-num { font-size: 0.72rem; font-weight: 700; color: var(--ap-muted); }
.glp-key.is-hit  { border-color: #e7b24a; background: linear-gradient(180deg, #ffdf94, #e7b24a); }
.glp-key.is-hit .glp-letter, .glp-key.is-hit .glp-num { color: #1a1206; }
/* 2026-11-21 - Trinity - Only the struck-out letter fades, not the whole key. WHY: at 0.42 the number under it (what the
   player taps) fell to about 2.2:1; the large letter keeps 3.9:1 or better on the dark themes. */
.glp-key.is-miss { border-style: dashed; }
.glp-key.is-miss .glp-letter { opacity: 0.42; }
.glp-key.is-miss .glp-letter { text-decoration: line-through; }
.glp-special { display: flex; gap: 0.5rem; }
.glp-special .glp-key { flex: 1; flex-direction: column; padding: 0.55rem 0; }
.glp-special .glp-num { font-size: 1rem; font-weight: 800; color: var(--ap-text); }
.glp-sub { font-size: 0.66rem; color: var(--ap-muted); }
.glp-bull { border-color: rgba(0,212,255,0.4); }
.glp-miss { border-color: rgba(255,255,255,0.1); }
/* 2026-11-14 - Trinity - Fix last dart, under Bull and Miss; in the controller's game view the card shows the word. */
.glp-undo { width: 100%; padding: 0.6rem; border-radius: 12px; border: 1px dashed var(--ap-muted); background: none; color: var(--ap-muted); font-size: 0.95rem; }

.gl-word-mini { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0; }
.gl-tile-mini {
    min-width: 1.4rem; height: 1.9rem; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800; color: #ffdf94; border-bottom: 2px solid #6b4e2e; border-radius: 2px;
}
.gl-tile-mini.is-open { border-bottom-color: #e7b24a; }

/* Skip-turn button (shared, under the scoring pad / controller) */
.ap-skip-btn { margin-top: 0.6rem; }

/* ── Scoring pads + dartboard ────────────────────────────────────────────────────────────────────────
   2026-07-29 - Trinity - These rules used to be injected at RUNTIME from inside x01pad.js,
   cricketpad.js, assassinpad.js and dartboard.js — the most-used surface in the product styling
   itself outside the stylesheet map (CLAUDE.md § Frontend/CSS). Moved here verbatim; the pads keep
   their var(--ap-*, fallback) form so they still render if a theme variable is ever missing. */
/* ---- x01pad ---- */
.x01pad { display:flex; flex-direction:column; gap:0.6rem; }
.x01pad.busy { opacity:0.55; pointer-events:none; }
.x01pad-numbers-only .x01pad-modes, .x01pad-numbers-only .x01pad-board { display:none; }
.x01pad-modes { display:flex; gap:0.4rem; }
.x01pad-mode { flex:1; padding:0.45rem; border:1px solid rgba(255,255,255,0.15); background:none; color:var(--ap-muted,#888); border-radius:6px; font-weight:700; cursor:pointer; font-size:0.85rem; }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.x01pad-mode.active { background:var(--ap-primary,#e94560); border-color:var(--ap-primary,#e94560); color:var(--ap-on-primary); }
.x01pad-board { width:100%; max-width:340px; margin:0 auto; }
.x01pad-numpad { display:flex; flex-direction:column; gap:0.5rem; }
.x01pad-mult { display:flex; gap:0.4rem; }
.x01pad-mult button { flex:1; padding:0.6rem; border:1px solid rgba(255,255,255,0.15); background:none; color:var(--ap-text,#fff); border-radius:6px; font-weight:700; cursor:pointer; }
/* 2026-11-21 - Trinity - Text on the accent in the card colour: #111 on bold_sport's navy accent was 1.53:1; the card is 9.6:1 or better everywhere. */
.x01pad-mult button.active { background:var(--ap-accent,#ffc800); border-color:var(--ap-accent,#ffc800); color:var(--ap-card,#111); }
.x01pad-nums { display:grid; grid-template-columns:repeat(5,1fr); gap:0.4rem; }
.x01pad-bulls { display:grid; grid-template-columns:repeat(2,1fr); gap:0.4rem; }
.x01pad-nums button, .x01pad-bulls button { padding:0.75rem 0; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.04); color:var(--ap-text,#fff); border-radius:6px; font-weight:700; cursor:pointer; font-size:1.05rem; }
.x01pad-nums button:active, .x01pad-bulls button:active { border-color:var(--ap-primary,#e94560); }
.x01pad-foot { display:flex; gap:0.6rem; align-items:stretch; }
.x01pad-slots { flex:1; display:flex; gap:0.4rem; }
.x01pad-slot { flex:1; text-align:center; padding:0.6rem 0.25rem; border:1px solid rgba(255,255,255,0.12); border-radius:6px; font-weight:800; color:var(--ap-muted,#888); background:rgba(255,255,255,0.03); }
.x01pad-slot.filled { color:var(--ap-text,#fff); border-color:var(--ap-primary,#e94560); }
.x01pad-miss { flex:0 0 84px; border:1px solid rgba(255,255,255,0.15); background:none; color:var(--ap-muted,#888); border-radius:6px; font-weight:700; cursor:pointer; }
.x01pad-undo { width:100%; background:none; border:1px dashed rgba(255,255,255,0.2); color:var(--ap-muted,#888); border-radius:8px; font-size:0.95rem; padding:0.7rem; cursor:pointer; }
.x01pad-undo:hover { border-color:var(--ap-accent,#ffc800); color:var(--ap-accent,#ffc800); }

/* ---- cricketpad ---- */
.ckpad { display:flex; flex-direction:column; gap:0.7rem; }
.ckpad.busy { opacity:0.5; pointer-events:none; }
.ckpad-head { text-align:center; font-size:0.8rem; letter-spacing:1px; text-transform:uppercase; color:var(--ap-muted,#888); }
.ckpad-head strong { color:var(--ap-text,#fff); font-size:1.15rem; }
.ckpad-hint { text-align:center; font-size:0.8rem; color:var(--ap-muted,#888); }
.ckpad-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.6rem; }
.ckpad-nums { display:grid; grid-template-columns:repeat(3,1fr); gap:0.6rem; }
.ckpad button { padding:1.15rem 0.5rem; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.05);
    color:var(--ap-text,#fff); border-radius:12px; font-weight:800; font-size:1.2rem; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.ckpad button:active { transform:scale(0.97); border-color:var(--ap-primary,#e94560); }
.ckpad button:hover { border-color:var(--ap-primary,#e94560); }
.ckpad .ck-miss { background:none; color:var(--ap-muted,#888); }
.ckpad .ck-wide { width:100%; }
.ckpad .ck-undo { width:100%; background:none; border-style:dashed; color:var(--ap-muted,#888); font-size:0.95rem; padding:0.7rem; }
.ckpad .ck-undo:hover { border-color:var(--ap-accent,#ffc800); color:var(--ap-accent,#ffc800); }

/* ---- assassinpad ---- */
.apad { display:flex; flex-direction:column; gap:0.8rem; }
.apad.busy { opacity:0.5; pointer-events:none; }
.apad-head { text-align:center; font-size:0.85rem; color:var(--ap-muted,#888); }
.apad-head strong { color:var(--ap-text,#fff); }
.apad button { padding:0.85rem 0.3rem; border-radius:12px; font-weight:800; font-size:1.05rem; cursor:pointer; border:1px solid rgba(255,255,255,0.15);
    background:rgba(255,255,255,0.05); color:var(--ap-text,#fff); -webkit-tap-highlight-color:transparent; }
.apad button:active { transform:scale(0.97); border-color:var(--ap-primary,#e94560); }
/* 2026-11-14 - Trinity - A board pad (ring + number): the scorer enters the dart, the game judges the hit (hunted by clue). */
.apad-rings { display:grid; grid-template-columns:repeat(3,1fr); gap:0.5rem; }
.apad .apad-ring { padding:0.6rem 0.3rem; font-size:0.95rem; color:var(--ap-muted,#888); }
/* 2026-11-21 - Trinity - Dark text on the primary colour: white measured 2.24:1 (pitch_green), 2.86:1 (bold_sport) and 3.83:1 (dark_electric); #111 is 4.93:1 or better in all three. */
.apad .apad-ring.is-on { background:var(--ap-primary,#e94560); border-color:var(--ap-primary,#e94560); color:var(--ap-on-primary); }
.apad-nums { display:grid; grid-template-columns:repeat(5,1fr); gap:0.45rem; }
.apad-extra { display:grid; grid-template-columns:1fr 1fr 2fr; gap:0.45rem; }
.apad .apad-miss { background:none; color:var(--ap-muted,#888); }
.apad .apad-undo { background:none; border-style:dashed; color:var(--ap-muted,#888); font-size:0.95rem; padding:0.6rem; }
.apad .apad-undo:hover { border-color:var(--ap-accent,#ffc800); color:var(--ap-accent,#ffc800); }

/* ---- dartboard ---- */
@keyframes dbGlow {
    0%,100% { filter: drop-shadow(0 0 6px rgba(0,212,255,0.12)); }
    50%     { filter: drop-shadow(0 0 28px rgba(0,212,255,0.40)); }
}
.dartboard-svg.dartboard-glow { animation: dbGlow 6s ease-in-out infinite; }
@keyframes dbSegPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.dartboard-svg .dartboard-pulse { animation: dbSegPulse 2.2s ease-in-out infinite; }

/* ---- camera auto-scoring (vision) ---- */
/* 2026-08-01 - Trinity - Operator/config + demo surfaces for camera auto-scoring. Board markers are SVG,
   so they are sized in the DartsBoard 400x400 viewBox's units, not px. */

.vis-panel { background:var(--ap-card,#1a1a2e); border:1px solid rgba(255,255,255,0.08); border-radius:14px; padding:1rem 1.15rem; margin-bottom:1rem; }
.vis-panel h2 { font-size:1.05rem; font-weight:800; margin:0 0 0.75rem; }
.vis-panel h3 { font-size:0.9rem; font-weight:700; color:var(--ap-muted,#8892a4); margin:1rem 0 0.5rem; text-transform:uppercase; letter-spacing:0.04em; }

/* Capability badge — the one place a venue reads whether cameras are live */
.vis-badge { display:inline-flex; align-items:center; gap:0.45rem; padding:0.3rem 0.7rem; border-radius:999px; font-size:0.8rem; font-weight:700; border:1px solid transparent; }
.vis-badge::before { content:''; width:0.5rem; height:0.5rem; border-radius:50%; background:currentColor; }
.vis-badge-good { color:#48d17a; background:rgba(72,209,122,0.12); border-color:rgba(72,209,122,0.3); }
.vis-badge-warn { color:#f0b429; background:rgba(240,180,41,0.12); border-color:rgba(240,180,41,0.3); }
.vis-badge-bad  { color:var(--ap-primary,#e94560); background:rgba(233,69,96,0.12); border-color:rgba(233,69,96,0.3); }
.vis-badge-idle { color:var(--ap-muted,#8892a4); background:rgba(136,146,164,0.1); border-color:rgba(136,146,164,0.25); }

.vis-message { color:var(--ap-muted,#8892a4); font-size:0.9rem; margin:0.6rem 0 0; }

/* Board + overlay */
.vis-board-wrap { max-width:26rem; margin:0 auto; }
.vis-clickable { cursor:crosshair; }
.vis-marker-label { font-size:9px; font-weight:700; fill:var(--ap-text,#fff); paint-order:stroke; stroke:rgba(0,0,0,0.75); stroke-width:2px; }
.vis-marker-good  circle { fill:var(--ap-accent,#00d4ff); stroke:#fff; stroke-width:1.2; }
.vis-marker-unsure circle { fill:#f0b429; stroke:#fff; stroke-width:1.2; }
.vis-marker-ghost circle { fill:none; stroke:rgba(255,255,255,0.5); stroke-width:1; stroke-dasharray:2 2; }
.vis-marker-ghost .vis-marker-label { font-size:7px; fill:var(--ap-muted,#8892a4); }

/* Camera roster */
.vis-cams { display:grid; grid-template-columns:repeat(auto-fit,minmax(8rem,1fr)); gap:0.6rem; }
.vis-cam { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:10px; padding:0.65rem 0.75rem; }
.vis-cam-pos { font-weight:800; text-transform:capitalize; font-size:0.95rem; }
.vis-cam-note { font-size:0.75rem; color:var(--ap-muted,#8892a4); margin-top:0.2rem; }
.vis-cam-ok   { border-color:rgba(72,209,122,0.35); }
.vis-cam-bad  { border-color:rgba(233,69,96,0.35); }

/* Per-camera tuning (exposure, gain, focus, zoom …). Collapsed by default: it is a rarely-touched
   engineering panel on a page whose main job is calibration, and three cameras' worth of sliders open at
   once would bury the buttons an operator actually came for. */
.vis-tune { margin-top:0.75rem; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:10px; padding:0.5rem 0.75rem; }
.vis-tune-head { cursor:pointer; font-weight:700; font-size:0.9rem; text-transform:capitalize; padding:0.2rem 0; }
/* The camera rig's ASK — shown when a dart was detected but not confidently enough to score itself.
   Fixed rather than placed in the page: the play body is a live fragment replaced wholesale on every
   poll, and anything inside it would be destroyed mid-question.
   TOP-anchored, not bottom. Bottom is where every scoring pad lives, and the first version covered the
   controller's input buttons completely — the operator saw them vanish. The prompt must never sit over
   the thing it is asking about. */
.vis-ask { position:fixed; left:0; right:0; top:0; z-index:60; padding:0.6rem 0.75rem; pointer-events:none; }
.vis-ask-card { pointer-events:auto; max-width:26rem; margin:0 auto; background:var(--ap-card,#1a1a2e); border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:0.9rem 1rem; box-shadow:0 6px 24px rgba(0,0,0,0.45); }
.vis-ask-title { font-size:0.78rem; text-transform:uppercase; letter-spacing:0.05em; color:var(--ap-muted,#8892a4); font-weight:700; }
.vis-ask-code { font-size:2.4rem; font-weight:900; line-height:1.1; margin:0.1rem 0 0.15rem; }
.vis-ask-note { font-size:0.78rem; color:var(--ap-muted,#8892a4); margin-bottom:0.7rem; }
.vis-ask-actions { display:flex; gap:0.6rem; }
.vis-ask-actions > * { flex:1; }
/* 2026-10-24 - Trinity - A dart near a wire: one big button per code it could be, the camera's reading first. */
.vis-ask-choices { display:flex; gap:0.5rem; margin:0.35rem 0 0.2rem; }
.vis-ask-choice { flex:1; padding:0.7rem 0.2rem; font-size:1.6rem; font-weight:900; line-height:1.1; color:var(--ap-text); background:var(--ap-card); border:2px solid rgba(255,255,255,0.18); border-radius:10px; cursor:pointer; }
.vis-ask-choice.is-first { border-color:var(--ap-accent); }
.vis-ask-correct { margin-top:0.7rem; display:flex; flex-direction:column; gap:0.5rem; }
.vis-ask-label { font-size:0.8rem; color:var(--ap-muted,#8892a4); }
/* Uppercase because every score is (T20, D16, BULL) and a phone keyboard defaults to lower case. */
.vis-ask-input { width:100%; text-transform:uppercase; font-size:1.3rem; font-weight:800; text-align:center; padding:0.55rem; border-radius:10px; border:1px solid rgba(255,255,255,0.18); background:rgba(255,255,255,0.06); color:var(--ap-text,#fff); }
.vis-ask-status { font-size:0.78rem; color:var(--ap-accent,#f0a500); margin-top:0.5rem; min-height:1rem; }
/* 2026-10-23 - Trinity - The correction pad is a dartboard now (apex_assist.js): keep the card on screen. */
.vis-ask-card { max-height:calc(100vh - 1.2rem); overflow-y:auto; }
.vis-ask .ct-board { max-width:18rem; }
/* 2026-11-06 - Trinity - The visit pad docked on every game's play page and the controller (vision_assist.php):
   Camera Training's three boxes, hidden while there is nothing to submit. TOP-anchored like .vis-ask above, for
   the same reason: the game's own scoring pad lives at the bottom and must stay reachable mid-visit. */
.vis-visit { position:fixed; left:0; right:0; top:0; z-index:60; padding:calc(0.5rem + env(safe-area-inset-top, 0px)) 0.75rem 0.5rem; pointer-events:none; }
.vis-visit-card { pointer-events:auto; max-width:30rem; max-height:calc(100vh - 1.2rem); overflow-y:auto; margin:0 auto; background:var(--ap-card,#1a1a2e); border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:0.8rem 0.9rem; box-shadow:0 6px 24px rgba(0,0,0,0.45); }
.vis-visit .ct-board { max-width:18rem; margin:0 auto; }

/* Live view sits at the TOP of the tuning panel: the picture is the thing being judged, and putting it
   under the sliders would push it off a phone screen exactly when the operator is dragging one. */
.vis-tune-live { margin-top:0.6rem; padding-bottom:0.5rem; border-bottom:1px solid rgba(255,255,255,0.08); }
.vis-tune-live-toggle { display:inline-flex; align-items:center; gap:0.45rem; font-size:0.85rem; font-weight:700; cursor:pointer; }
.vis-live-img { display:block; width:100%; max-width:32rem; margin-top:0.5rem; border-radius:8px; border:1px solid rgba(255,255,255,0.12); }
.vis-tune-group { margin-top:0.75rem; }
.vis-tune-group-title { font-size:0.75rem; font-weight:700; color:var(--ap-muted,#8892a4); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:0.35rem; }
/* Label / control / read-out. The value column is fixed so the numbers form a straight edge instead of
   jittering left and right as the operator drags a slider. */
.vis-tune-row { display:grid; grid-template-columns:minmax(6rem,9rem) 1fr auto; align-items:center; gap:0.6rem; margin-bottom:0.3rem; }
.vis-tune-label { font-size:0.82rem; }
.vis-tune-input { width:100%; }
.vis-tune-range { accent-color:var(--ap-primary,#4a9eff); }
.vis-tune-value { font-size:0.8rem; font-variant-numeric:tabular-nums; min-width:3.5rem; text-align:right; color:var(--ap-muted,#8892a4); }
.vis-tune-hint { font-size:0.72rem; color:var(--ap-muted,#8892a4); margin:0 0 0.5rem; grid-column:1 / -1; }
.vis-tune-copy { display:flex; align-items:center; flex-wrap:wrap; gap:0.4rem; margin-top:0.9rem; padding-top:0.7rem; border-top:1px solid rgba(255,255,255,0.08); }
.vis-tune-copy-label { font-size:0.8rem; color:var(--ap-muted,#8892a4); }
.vis-tune-copy-btn { text-transform:capitalize; }
.vis-tune-actions { display:flex; align-items:center; gap:0.6rem; margin-top:0.9rem; flex-wrap:wrap; }
.vis-tune-status { font-size:0.8rem; color:var(--ap-muted,#8892a4); }
.vis-tune-status-ok   { color:rgba(72,209,122,0.95); }
.vis-tune-status-warn { color:var(--ap-accent,#f0a500); }
.vis-tune-status-bad  { color:var(--ap-danger,#e94560); }

@media (max-width:30rem) {
    /* On a phone at the board, a three-column row squeezes the slider to nothing. Stack instead. */
    .vis-tune-row { grid-template-columns:1fr auto; }
    .vis-tune-label { grid-column:1 / -1; }
}

/* Detection feed */
.vis-feed { list-style:none; margin:0; padding:0; max-height:18rem; overflow-y:auto; }
.vis-feed li { display:flex; align-items:center; gap:0.6rem; padding:0.45rem 0; border-bottom:1px solid rgba(255,255,255,0.06); font-size:0.85rem; }
.vis-feed li:last-child { border-bottom:none; }
.vis-feed-code { font-weight:800; min-width:3.5rem; }
.vis-feed-meta { color:var(--ap-muted,#8892a4); font-size:0.75rem; }
.vis-feed-out { margin-left:auto; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.05em; font-weight:700; }
.vis-out-auto      { color:#48d17a; }
.vis-out-confirmed { color:var(--ap-accent,#00d4ff); }
.vis-out-corrected { color:#f0b429; }
.vis-out-rejected  { color:var(--ap-primary,#e94560); }
.vis-out-pending   { color:var(--ap-muted,#8892a4); }

/* Confirm prompt — the phone's "was that T20?" */
.vis-confirm { background:var(--ap-card,#1a1a2e); border:2px solid #f0b429; border-radius:14px; padding:1rem; text-align:center; }
.vis-confirm-code { font-size:2.5rem; font-weight:900; line-height:1; margin:0.3rem 0 0.15rem; }
.vis-confirm-sub { color:var(--ap-muted,#8892a4); font-size:0.8rem; margin-bottom:0.85rem; }
.vis-confirm-btns { display:grid; grid-template-columns:repeat(3,1fr); gap:0.5rem; }
.vis-confirm-btns button { padding:0.85rem 0.4rem; border-radius:10px; font-weight:800; cursor:pointer; border:1px solid rgba(255,255,255,0.15); background:none; color:var(--ap-text,#fff); }
.vis-confirm-yes { background:#48d17a; border-color:#48d17a; color:#08210f; }

/* Demo/config controls */
.vis-controls { display:flex; flex-wrap:wrap; gap:0.75rem; align-items:center; }
.vis-control { display:flex; flex-direction:column; gap:0.25rem; font-size:0.75rem; color:var(--ap-muted,#8892a4); }
.vis-control input[type=range] { width:9rem; }
.vis-readout { font-family:'Consolas',monospace; font-size:0.8rem; color:var(--ap-muted,#8892a4); white-space:pre-wrap; }
.vis-stat-row { display:flex; flex-wrap:wrap; gap:1.25rem; }
.vis-stat { min-width:5rem; }
.vis-stat-val { font-size:1.4rem; font-weight:800; }
.vis-stat-key { font-size:0.7rem; color:var(--ap-muted,#8892a4); text-transform:uppercase; letter-spacing:0.05em; }

/* ---- camera calibration frames ---- */
/* 2026-08-01 - Trinity - Live stills from each camera, clicked to place the four calibration points.
   Pin coordinates are genuinely dynamic (they follow the click), so JS sets --pin-x/--pin-y custom
   properties and the positioning rule lives here rather than in a style attribute. */

/* 2026-08-03 - Trinity - ONE camera per row, as wide as the page allows. These were side by side, which
   made each still about a third of the width — far too small to place a click on a wire intersection with
   any accuracy, and that click IS the calibration. Stacked, each frame renders close to its captured
   1280px, so a pixel on screen is roughly a pixel of the frame. */
/* The calibration frames want the width; capped so it stays sane on an ultrawide monitor. */
.vis-page { max-width:1500px; margin:0 auto; }

/* 2026-10-23 - Trinity - The phone camera page (camera/phone.php): a spare phone streaming to the board. */
.pcam-page { max-width:640px; margin:0 auto; }
.pcam-status { display:flex; align-items:center; gap:0.75rem; margin-bottom:0.75rem; }
.pcam-rate { color:var(--ap-muted,#8892a4); font-size:0.85rem; }
.pcam-view { display:block; width:100%; max-height:55vh; object-fit:contain; background:#000; border-radius:10px; }
.pcam-control { display:flex; flex-direction:column; gap:0.35rem; width:100%; margin-bottom:1rem; }
.pcam-control input[type=range] { width:100%; }
.pcam-hidden { display:none; }

/* 2026-10-23 - Trinity - The game controller's camera panel (common/includes/camera_control.php): inline on
   the controller home, or a sheet over a game in progress. */
.camctl { display:flex; flex-direction:column; gap:0.6rem; text-align:left; }
.camctl-status { color:var(--ap-text); font-size:0.9rem; }
.camctl-row { display:flex; align-items:center; justify-content:space-between; gap:0.6rem; }
.camctl-label { font-weight:600; }
.camctl-toggle { display:inline-flex; gap:0.4rem; }
.camctl-toggle .camctl-active { border-color:var(--ap-primary); background:var(--ap-primary); color:var(--ap-text); }
.camctl-check { display:flex; align-items:center; gap:0.5rem; margin:0; }
/* 2026-10-27 - Trinity - .camctl-seconds: the dart timings, the same small number box. */
.camctl-turns, .camctl-seconds { width:4.2rem; padding:0.25rem 0.4rem; background:var(--ap-card); color:var(--ap-text); border:1px solid rgba(255,255,255,0.2); border-radius:6px; text-align:center; }
.camctl-qr { display:flex; flex-direction:column; align-items:center; gap:0.5rem; }
.camctl-qr-code { padding:0.6rem; background:#ffffff; border-radius:8px; }
.camctl-controls { display:flex; flex-direction:column; gap:0.5rem; }
.camctl-slider { display:flex; flex-direction:column; gap:0.3rem; width:100%; }
.camctl-slider input[type=range] { width:100%; }

/* 2026-10-23 - Trinity - The game controller: a top bar (who controls, ⚙ Settings), one camera line, and the
   Settings sheet (common/includes/controller_settings.php) over the home or a game in progress. */
.ctrl-topbar { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; margin-bottom:1rem; }
.ctrl-topbar .ap-hint-sm { margin-top:0; }
.ctrl-camera-line { display:block; width:100%; margin-top:1rem; padding:0.6rem 0.8rem; text-align:left; font-size:0.85rem; color:var(--ap-text); background:transparent; border:1px solid rgba(255,255,255,0.12); border-radius:8px; cursor:pointer; }
.ctrl-settings { position:fixed; inset:0; z-index:1050; display:flex; justify-content:center; background:var(--ap-bg); overflow-y:auto; }
.ctrl-settings-panel { width:100%; max-width:480px; padding:1rem 16px 2rem; }
.ctrl-settings-head { display:flex; align-items:center; gap:0.75rem; margin-bottom:1rem; }
.ctrl-settings-section { background:var(--ap-card); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:0.2rem 0.9rem; margin-bottom:0.6rem; }
.ctrl-settings-section > summary { padding:0.75rem 0; font-weight:700; cursor:pointer; }
.ctrl-settings-section[open] { padding-bottom:0.9rem; }

.vis-frames { display:grid; grid-template-columns:1fr; gap:1.4rem; margin-top:0.9rem; }
.vis-frame { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:0.6rem; }
.vis-frame.is-calibrated { border-color:rgba(72,209,122,0.45); }

.vis-frame-head { display:flex; align-items:baseline; justify-content:space-between; gap:0.5rem; margin-bottom:0.45rem; }
.vis-frame-step { font-size:0.75rem; color:#f0b429; font-weight:700; }
.vis-frame.is-calibrated .vis-frame-step { color:#48d17a; }

/* The shot holds the image and the pin layer in one positioned box, so pins sit in image space. */
.vis-frame-shot { position:relative; border-radius:8px; overflow:hidden; background:rgba(0,0,0,0.35); min-height:7rem; }
.vis-frame:not(.has-shot) .vis-frame-shot::after {
    content:'Press “Take fresh pictures”';
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    color:var(--ap-muted,#8892a4); font-size:0.8rem; text-align:center; padding:0.5rem;
}
.vis-frame-img { display:block; width:100%; height:auto; }
.vis-frame.has-shot .vis-frame-shot { cursor:crosshair; }
.vis-frame-pins { position:absolute; inset:0; pointer-events:none; }

.vis-pin {
    position:absolute; left:var(--pin-x,0); top:var(--pin-y,0); transform:translate(-50%,-50%);
    width:1.35rem; height:1.35rem; border-radius:50%;
    background:var(--ap-accent,#00d4ff); color:#04222b;
    font-size:0.72rem; font-weight:900; line-height:1.35rem; text-align:center;
    box-shadow:0 0 0 2px rgba(0,0,0,0.6);
}

/* 2026-08-12 - Trinity - Calibration magnifier. Pinned to a CORNER rather than trailing the cursor: a
   loupe that follows the pointer covers the very wire being aimed at, and a fixed panel lets the eye
   learn where to look. It flips to the opposite corner (.is-left) when the cursor comes near it, so it
   can never hide the target. --loupe-src/-size/-pos are written by JS on every pointer move: they are
   genuinely dynamic (which image, and where in it), which is exactly what custom properties are for.
   pointer-events:none so the magnifier can never swallow a click meant for the board. */
.vis-loupe {
    --vis-loupe-size:11rem;
    position:absolute; top:0.4rem; right:0.4rem; z-index:2;
    width:var(--vis-loupe-size); height:var(--vis-loupe-size);
    border-radius:10px; border:2px solid var(--ap-accent,#00d4ff);
    box-shadow:0 0.4rem 1rem rgba(0,0,0,0.55);
    background-color:#000;
    background-image:var(--loupe-src,none);
    background-size:var(--loupe-size,auto);
    background-position:var(--loupe-pos,0 0);
    background-repeat:no-repeat;
    /* True captured pixels, not a smoothed guess — a wire edge must stay a hard edge to be aimed at. */
    image-rendering:pixelated;
    pointer-events:none;
}
.vis-loupe.is-left { left:0.4rem; right:auto; }

/* Centre crosshair — where the click actually lands. Deliberately thin, with a dark outline so it reads
   against both the bright board and the black surround. */
.vis-loupe-cross { position:absolute; inset:0; }
.vis-loupe-cross::before,
.vis-loupe-cross::after {
    content:''; position:absolute; background:var(--ap-accent,#00d4ff);
    box-shadow:0 0 0 1px rgba(0,0,0,0.7);
}
.vis-loupe-cross::before { left:0; right:0; top:50%; height:1px; transform:translateY(-50%); }
.vis-loupe-cross::after  { top:0; bottom:0; left:50%; width:1px;  transform:translateX(-50%); }

/* 2026-08-12 - Trinity - Detection pictures: what each camera saw when it called a dart. Wide images
   (frame + difference mask side by side), so they get their own full-width rows rather than a grid. */
.vis-shots { display:flex; flex-direction:column; gap:0.75rem; }
.vis-shot { margin:0; }
.vis-shot-img {
    display:block; width:100%; height:auto; border-radius:8px;
    background:rgba(0,0,0,0.35); image-rendering:pixelated;
}
.vis-shot-cap { display:flex; flex-wrap:wrap; align-items:baseline; gap:0.4rem; margin-top:0.3rem;
                font-size:0.8rem; color:var(--ap-text,#e8edf5); }

.vis-frame-actions { display:flex; flex-wrap:wrap; gap:0.4rem; margin-top:0.5rem; }   /* 2026-10-23 - Trinity - wraps: Rotate joined the row */
.vis-frame-actions .btn { flex:1; font-size:0.75rem; }

/* ── Camera Training — phone (games/camtrain/play.php + common/js/camtrainpad.js) ── 2026-10-22 - Trinity ── */
.ct-target-lead  { font-size:0.8rem; letter-spacing:2px; text-transform:uppercase; color:var(--ap-muted); }
.ct-target       { font-size:2.2rem; font-weight:800; line-height:1.1; color:var(--ap-accent); }
.ct-progress     { font-size:0.85rem; color:var(--ap-muted); margin-top:0.25rem; }
.ct-watch        { display:flex; align-items:center; justify-content:center; gap:0.6rem; padding:0.6rem 0 0.9rem; }
.ct-watch-dot    { width:0.7rem; height:0.7rem; border-radius:50%; background:var(--ap-accent); animation:ct-pulse 1.4s ease-in-out infinite; }
.ct-watch-text   { font-weight:600; }
@keyframes ct-pulse { 0%, 100% { opacity:0.25; } 50% { opacity:1; } }
.ct-ask          { text-align:center; margin-bottom:0.8rem; }
.ct-ask-lead     { font-size:0.8rem; letter-spacing:2px; text-transform:uppercase; color:var(--ap-muted); }
.ct-ask-code     { font-size:2rem; font-weight:800; color:var(--ap-accent); }
.ct-actions      { display:flex; gap:0.5rem; margin-bottom:0.5rem; }
.ct-actions > *  { flex:1; }
.ct-pad-title    { font-weight:700; text-align:center; margin-bottom:0.5rem; }
.ct-rings        { display:flex; gap:0.4rem; margin-bottom:0.5rem; }
.ct-ring         { flex:1; padding:0.55rem 0; border-radius:0.5rem; font-weight:700; color:var(--ap-text);
                   background:var(--ap-card); border:1px solid rgba(255,255,255,0.15); }
.ct-ring.is-on   { color:var(--ap-bg); background:var(--ap-accent); border-color:var(--ap-accent); }
.ct-grid         { display:grid; grid-template-columns:repeat(5, 1fr); gap:0.35rem; margin-bottom:0.4rem; }
.ct-specials     { display:grid; grid-template-columns:repeat(3, 1fr); gap:0.35rem; margin-bottom:0.6rem; }
/* 2026-10-23 - Trinity - The answer pad's dartboard (camtrainpad.js), and "Missed board" on its own row under it. */
.ct-board        { margin:0.6rem auto; }
.ct-specials-single { grid-template-columns:1fr; }
/* 2026-10-23 - Trinity - Camera Training's visit pad: three boxes filled by the camera, fixed by tapping. */
.ct-visit-target { text-align:center; margin-bottom:0.5rem; }
.ct-boxes { display:grid; grid-template-columns:repeat(3, 1fr); gap:0.5rem; margin-bottom:0.5rem; }
.ct-box { display:flex; flex-direction:column; align-items:center; gap:0.15rem; padding:0.7rem 0.3rem; background:var(--ap-card); color:var(--ap-text); border:2px solid rgba(255,255,255,0.12); border-radius:10px; cursor:pointer; }
.ct-box.is-selected { border-color:var(--ap-accent); }
.ct-box.is-next { animation:ct-box-pulse 1.1s ease-in-out infinite; }
/* 2026-10-23 - Trinity - "Didn't throw" under a box the camera filled, and the Undo after it. */
.ct-box-wrap { display:flex; flex-direction:column; gap:0.25rem; }
/* 2026-10-24 - Trinity - A box read near a wire offers its neighbours under it; the one it will score as is lit. */
.ct-choices { display:flex; gap:0.25rem; }
.ct-choice { flex:1; padding:0.35rem 0; font-size:0.85rem; font-weight:800; color:var(--ap-text); background:var(--ap-card); border:1px solid rgba(255,255,255,0.15); border-radius:6px; cursor:pointer; }
.ct-choice.is-on { color:var(--ap-bg); background:var(--ap-accent); border-color:var(--ap-accent); }
.ct-didnt { background:none; border:none; padding:0.15rem; color:var(--ap-muted); font-size:0.72rem; text-decoration:underline; cursor:pointer; }
.ct-move { background:none; border:none; padding:0.15rem; color:var(--ap-accent); font-size:0.72rem; font-weight:700; cursor:pointer; }
@keyframes ct-box-pulse { 0%, 100% { border-color:rgba(255,255,255,0.12); box-shadow:none; } 50% { border-color:var(--ap-accent); box-shadow:0 0 12px var(--ap-accent); } }
@media (prefers-reduced-motion: reduce) { .ct-box.is-next { animation:none; border-color:var(--ap-accent); } }
.ct-box.is-changed .ct-box-code { color:var(--ap-primary); }
.ct-box.is-missed .ct-box-code { color:var(--ap-accent); }
.ct-box-code { font-size:1.6rem; font-weight:900; line-height:1.1; }
.ct-box-note { font-size:0.7rem; color:var(--ap-muted); min-height:0.9rem; }
/* 2026-11-09 - Trinity - Per-dart camera scoring: a scored box is locked and quieter; the next box's one-tap Score. */
/* 2026-11-21 - Trinity - Quieter by fading the dart's code only, and "scored" in the primary moved toward the text colour.
   WHY: fading the whole box took its note to 3.0:1 (dark_electric); now 5.9:1 or better in every theme. */
.ct-box.is-scored { cursor:default; border-color:color-mix(in srgb, var(--ap-primary) 45%, transparent); }
.ct-box.is-scored .ct-box-code { opacity:0.75; }
.ct-box.is-scored .ct-box-note { color:color-mix(in srgb, var(--ap-primary) 60%, var(--ap-text)); }
.ct-score { padding:0.4rem 0.3rem; font-size:0.85rem; }
/* 2026-10-24 - Trinity - The darts-out gate is closed (camtrainpad.js): "Take your darts out" + the Darts out button. */
.ct-retrieval { display:flex; align-items:center; gap:0.6rem; padding:0.6rem 0.8rem; margin-bottom:0.6rem; border:2px solid var(--ap-primary); border-radius:10px; background:var(--ap-card); }
.ct-retrieval-text { flex:1; font-size:0.85rem; font-weight:600; }
.ct-darts-out { flex:0 0 auto; }
/* 2026-11-08 - Trinity - "Answered on another phone": the visit pad emptied because another phone submitted it. */
.ct-notice { padding:0.6rem 0.8rem; margin-bottom:0.6rem; border-radius:10px; background:var(--ap-card); font-size:0.85rem; font-weight:600; text-align:center; }
.ct-visit-hint, .ct-thrown { font-size:0.8rem; color:var(--ap-muted); text-align:center; margin-bottom:0.6rem; }
.ct-submit { margin-top:0.4rem; }
.ct-num          { padding:0.7rem 0; border-radius:0.5rem; font-weight:700; color:var(--ap-text);
                   background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); }
.ct-num:active   { background:var(--ap-accent); color:var(--ap-bg); }
.ct-summary      { display:grid; grid-template-columns:1fr 1fr; gap:0.4rem 0.8rem; margin-bottom:0.6rem; text-align:left; }
.ct-summary-num  { font-size:1.4rem; font-weight:800; color:var(--ap-accent); }

/* 2026-10-27 - Trinity - The camera-problem card on the controller (common/includes/vision_problem.php): over the
   game, under the confirm sheet (1000) and Settings (1050), which it opens. */
.vprob         { position:fixed; inset:0; z-index:900; display:flex; align-items:center; justify-content:center;
                 padding:1rem 16px; background:rgba(0,0,0,0.7); overflow-y:auto; }
.vprob-panel   { width:100%; max-width:26rem; background:var(--ap-card); border:1px solid rgba(255,255,255,0.12);
                 border-top:3px solid var(--ap-primary); border-radius:14px; padding:1.25rem 1.1rem 1rem;
                 box-shadow:0 8px 32px rgba(0,0,0,0.5); }
.vprob-title   { font-size:1.25rem; font-weight:800; color:var(--ap-primary); margin-bottom:0.35rem; }
.vprob-why     { color:var(--ap-text); margin-bottom:0.9rem; }
.vprob-actions { display:flex; flex-direction:column; gap:0.55rem; }
.vprob-steps   { margin:0 0 0.4rem; padding-left:1.2rem; color:var(--ap-text); }
.vprob-steps li { margin-bottom:0.35rem; }
.vprob-status  { margin-top:0.75rem; min-height:1.2rem; color:var(--ap-accent); font-weight:700; }
.vprob-back    { position:fixed; left:0; right:0; bottom:0; z-index:890; display:flex; align-items:center;
                 justify-content:center; gap:0.75rem; padding:0.7rem 16px; background:var(--ap-card);
                 border-top:1px solid var(--ap-accent); color:var(--ap-text); }

/* ─── Karaoke (2026-11-08 - Trinity) — the singer's phone (games/karaoke/play.php) and the host's queue on the
       controller (common/js/karaokepad.js). The TV's own styles are in games/karaoke/tv.css. ─── */
.kq-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0;
          border-bottom: 1px solid rgba(255,255,255,0.08); }
.kq-row:last-child { border-bottom: 0; }
.kq-row-main { display: flex; flex-direction: column; min-width: 0; }
.kq-row-main strong { overflow-wrap: anywhere; }
.kq-where { font-size: 0.8rem; color: var(--ap-muted); }
.kq-now { font-size: 1.05rem; }
.kq-library { max-height: 55vh; overflow-y: auto; }
.kq-host-now { font-size: 1.05rem; margin-bottom: 0.6rem; }
.kq-host-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kq-host-message { margin-top: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--ap-card);
                   font-size: 0.85rem; }
.kq-host-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.kq-host-row.kq-pending .kq-row-main strong { color: var(--ap-accent); }
.kq-host-row.kq-held { opacity: 0.6; }
.kq-host-results { max-height: 40vh; overflow-y: auto; margin-bottom: 0.6rem; }
.kq-host-link { display: flex; gap: 0.5rem; }
.kq-host-link .form-control { flex: 1; }
/* HQ's karaoke review (admin/karaoke_review.php) */
.kq-review-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kq-review-meta { font-size: 0.85rem; color: var(--ap-muted); margin-bottom: 0.6rem; }
.kq-review-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; min-width: 9rem; }
.kq-review-reason { flex: 1 1 100%; }
.kq-review-broken { border-color: var(--ap-danger); color: var(--ap-danger); }
/* 2026-11-09 - Trinity - One row per song; a narrow screen scrolls the table sideways rather than squashing it. */
.kq-review-table-wrap { overflow-x: auto; }
.kq-review-table { min-width: 66rem; }
.kq-review-table td:nth-child(2), .kq-review-table td:nth-child(3) { min-width: 11rem; }
.kq-review-wrap { max-width: 1400px; }
.kq-review-year { width: 5.5rem; }
.kq-review-note { max-width: 14rem; }
/* My karaoke submissions on the dashboard */
.kq-submission { font-size: 0.8rem; white-space: nowrap; color: var(--ap-muted); }
.kq-submission-approved { color: var(--ap-accent); font-weight: 700; }
.kq-submission-rejected { color: var(--ap-danger); }
.kq-host-pick-song { font-weight: 700; color: var(--ap-accent); overflow-wrap: anywhere; }
.kq-publish { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.kq-review-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.kq-review-filter .form-control { flex: 1 1 18rem; }
.kq-superseded { color: var(--ap-muted); }

/* 2026-11-09 - Trinity - Photobooth: the posting phone (games/photobooth/post.php) and the host's wall pad (photoboothpad.js). */
.pb-notice { font-size: 1.05rem; line-height: 1.5; margin-bottom: 1rem; }
.pb-pick-button { display: block; text-align: center; cursor: pointer; }
.pb-preview { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: var(--ap-card); }
.pb-host-status { color: var(--ap-muted); margin-bottom: 0.6rem; }
.pb-host-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pb-host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.pb-host-photo { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.pb-host-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: var(--ap-card); }
.pb-host-caption { font-size: 0.85rem; overflow-wrap: anywhere; }
.pb-host-remove { align-self: flex-start; }
.pb-removing { opacity: 0.35; pointer-events: none; }
/* 2026-11-09 - Trinity - Photobooth A2: the frame choice on the phone, tonight's gallery and its large view, the admin page. */
.pb-frames { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.4rem; }
.pb-frame-choice { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 5.5rem;
                   padding: 0.35rem; border: 2px solid transparent; border-radius: 10px; background: transparent; color: var(--ap-text);
                   font-size: 0.78rem; cursor: pointer; }
.pb-frame-chosen { border-color: var(--ap-primary); }
.pb-frame-preview { width: 100%; height: 5rem; object-fit: contain; border-radius: 6px; }
/* 2026-11-11 - Trinity - Photobooth: the frame themes above the frames, one row that scrolls sideways. */
.pb-themes { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.5rem; }
.pb-theme-choice { flex: 0 0 auto; padding: 0.3rem 0.8rem; border: 1px solid var(--ap-muted); border-radius: 999px;
                   background: transparent; color: var(--ap-muted); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pb-theme-chosen { border-color: var(--ap-primary); color: var(--ap-text); background: var(--ap-card); }
.pb-host-background { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pb-host-background-picture { width: 7rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.pb-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.5rem; }
.pb-gallery-item { padding: 0; border: 0; background: var(--ap-card); border-radius: 8px; overflow: hidden; cursor: pointer; }
.pb-gallery-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pb-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
               gap: 0.8rem; padding: 1rem; background: rgba(0, 0, 0, 0.9); }
.pb-lightbox-photo { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 8px; }
.pb-lightbox-caption { color: #fff; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.pb-lightbox-buttons { display: flex; gap: 0.6rem; }
.pb-admin-day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.pb-admin-actions { display: flex; gap: 0.4rem; }
.pb-admin-frame { flex-direction: row; align-items: center; gap: 0.6rem; }
.pb-admin-frame img { width: 3.5rem; height: 3.5rem; object-fit: contain; border-radius: 6px; background: var(--ap-card); }
/* 2026-11-09 - Trinity - Photobooth: Download all's progress on tonight's gallery. */
.pb-progress { width: 100%; height: 0.8rem; accent-color: var(--ap-primary); }
.pb-progress-text { margin-top: 0.4rem; color: var(--ap-muted); font-size: 0.9rem; }
/* 2026-11-09 - Trinity - Score-then-fix camera boxes: scored, held "if right", not counted; an empty box that cannot take a dart yet. */
/* 2026-11-21 - Trinity - The primary moved toward the text colour: plain primary was 4.46:1 (dark_electric), 2.86:1 (bold_sport). */
.ct-box.ct-auto-scored .ct-box-note { color:color-mix(in srgb, var(--ap-primary) 60%, var(--ap-text)); }
.ct-box.ct-auto-held { border-style:dashed; border-color:var(--ap-accent); }
.ct-box.ct-auto-held .ct-box-code { opacity:0.7; }
/* 2026-11-21 - Trinity - "Not counted" fades the code only. WHY: the whole box at 0.45 took the note to about 2.3:1, and the
   box can still be tapped to fix it; the large code keeps 6.6:1 or better on the dark themes at 0.6. */
.ct-box.ct-auto-void .ct-box-code { opacity:0.6; }
.ct-box.is-idle { opacity:0.5; cursor:default; }

/* ── 2026-11-13 - Trinity - The player-first controller (Jacques: "the context of what's happening in the game is
   poor"). Around the unchanged scoring pad: the Now throwing card, a feedback line, the table and the Game menu,
   drawn by common/js/ctrlview.js from the module's controllerView(). ─────────────────────────────────────────── */
.ctrl-bar        { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.ctrl-game-line  { color: var(--ap-muted); font-size: 0.82rem; }
.ctrl-menu-btn   { background: transparent; border: 1px solid var(--ap-primary); color: var(--ap-primary); border-radius: 999px; padding: 0.2rem 0.85rem; font-size: 0.85rem; font-weight: 700; }
.ctrl-view       { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }

.ctrl-up         { background: var(--ap-card); border: 1px solid var(--ap-primary); border-radius: 16px; padding: 0.75rem 0.9rem;
                   box-shadow: 0 0 18px color-mix(in srgb, var(--ap-primary) 25%, transparent); }
.ctrl-up-top     { display: flex; justify-content: space-between; align-items: center; }
.ctrl-up-label   { color: var(--ap-muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.ctrl-up-role    { color: var(--ap-accent); font-size: 0.78rem; font-weight: 700; }
.ctrl-up-name    { color: var(--ap-text); font-size: 1.55rem; font-weight: 800; line-height: 1.15; margin-top: 0.1rem; }
.ctrl-up-figure  { display: flex; align-items: baseline; gap: 0.4rem; }
.ctrl-up-figure span  { color: var(--ap-primary); font-size: 2.6rem; font-weight: 900; line-height: 1; }
.ctrl-up-figure small { color: var(--ap-muted); font-size: 0.8rem; }
.ctrl-darts      { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.6rem; }
.ctrl-darts[hidden] { display: none; }   /* 2026-11-14 - Trinity - a game with no dart row on the card (Camera Training) */
.ctrl-dart       { flex: 1; text-align: center; padding: 0.45rem 0; border-radius: 9px; border: 1px dashed var(--ap-muted); color: var(--ap-muted); font-size: 0.75rem; }
.ctrl-dart.is-thrown { border-style: solid; border-color: var(--ap-text); color: var(--ap-text); font-weight: 800; font-size: 1rem; }
.ctrl-dart.is-next   { border-color: var(--ap-primary); color: var(--ap-primary); }
.ctrl-visit-total { min-width: 3.2rem; text-align: right; color: var(--ap-text); font-weight: 800; }
.ctrl-hint       { margin-top: 0.6rem; padding: 0.45rem 0.65rem; border-radius: 9px; font-size: 0.88rem; color: var(--ap-text);
                   background: color-mix(in srgb, var(--ap-text) 7%, transparent); }
.ctrl-hint.is-gold { background: color-mix(in srgb, var(--ap-accent) 18%, transparent); color: var(--ap-accent); font-weight: 700; }
.ctrl-hint.is-clue { background: color-mix(in srgb, var(--ap-accent) 18%, transparent); color: var(--ap-accent); font-weight: 800; font-size: 1.05rem; }

.ctrl-feedback   { text-align: center; font-size: 0.88rem; padding: 0.35rem 0.5rem; border-radius: 9px; color: var(--ap-muted); }
.ctrl-feedback.is-good { color: var(--ap-primary); }
.ctrl-feedback.is-gold { color: var(--ap-accent); font-weight: 700; background: color-mix(in srgb, var(--ap-accent) 12%, transparent); }
.ctrl-feedback.is-bad  { color: #fff; font-weight: 700; background: color-mix(in srgb, var(--ap-danger, #e5484d) 80%, transparent); }

.ctrl-between    { background: var(--ap-card); border: 1px solid var(--ap-accent); border-radius: 16px; padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: 0.6rem; }
.ctrl-between-title { color: var(--ap-accent); font-size: 1.3rem; font-weight: 800; }
.ctrl-between-sub   { color: var(--ap-muted); font-size: 0.88rem; }

/* The pad keeps its own size here (the card and table share the screen with it); its own visit slots and headline
   repeat what the card already shows. */
body.controller-device .ctrl-pad.ctrl-pad-in-view { flex: 0 0 auto; overflow: visible; }
/* 2026-11-15 - Trinity - ONE rule for every game: a pad marks its instruction or summary lines .ap-pad-intro, and the
   game view above already says the same, so they hide here. WHY: each game needed its own rule, and four (Killer,
   Territories, Mysteries, Tiles) never got one, so their pads repeated "Tap the multiplier, then the number" under
   the card. A pad's QUESTION (Killer: "Treble 20 - bank it as?") is never marked: it must stay. */
.ctrl-pad-in-view .ap-pad-intro { display: none; }
.ctrl-pad-in-view .x01pad-miss { flex: 1 1 auto; }

.ctrl-table      { margin-top: 0.6rem; }
.ctrl-table-head { color: var(--ap-muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.3rem; }
.ctrl-rows       { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ctrl-row        { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.45rem 0.65rem; border-radius: 10px;
                   background: var(--ap-card); border-left: 3px solid transparent; }
.ctrl-row.is-up   { border-left-color: var(--ap-primary); }
.ctrl-row.is-next { border-left-color: var(--ap-muted); }
.ctrl-row.is-won  { border-left-color: var(--ap-accent); }
.ctrl-row.is-out  { opacity: 0.45; }
/* 2026-11-15 - Trinity - A player who left the game (LeftSeat::markTable): dimmed, the subtitle says why. */
.ctrl-row.is-left { opacity: 0.55; border-left-style: dashed; }
.ctrl-row-name   { color: var(--ap-text); font-weight: 700; font-size: 0.92rem; }
.ctrl-row-sub    { color: var(--ap-muted); font-size: 0.75rem; }
.ctrl-row-value  { color: var(--ap-text); font-size: 1.35rem; font-weight: 900; }
.ctrl-row.is-up .ctrl-row-value { color: var(--ap-primary); }

.ctrl-sheet      { position: fixed; inset: 0; z-index: 1050; background: rgba(0, 0, 0, 0.55); display: none; align-items: flex-end; }
.ctrl-sheet.is-open { display: flex; }
.ctrl-sheet-card { width: 100%; max-height: 85vh; overflow-y: auto; background: var(--ap-card); border-radius: 18px 18px 0 0; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ctrl-sheet-card form { margin: 0; }
.ctrl-sheet-title { color: var(--ap-text); font-weight: 800; }
.ctrl-sheet-close { background: transparent; border: 0; color: var(--ap-muted); padding: 0.4rem; }
.ctrl-danger     { border-color: var(--ap-danger, #e5484d) !important; color: var(--ap-danger, #e5484d) !important; }

/* ── 2026-11-15 - Trinity - Network strip and Confirm / Fix (common/js/apexnet.js) ─────────────────────── */
.net-strip { position: fixed; left: 0; right: 0; top: 0; z-index: 2000; text-align: center; font-weight: 700; font-size: 0.95rem;
    padding: calc(env(safe-area-inset-top, 0px) + 0.5rem) max(16px, env(safe-area-inset-right, 0px)) 0.5rem max(16px, env(safe-area-inset-left, 0px));
    background: var(--ap-danger, #e5484d); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.net-strip.is-up { background: var(--ap-primary); }
.dart-hold { position: fixed; inset: 0; z-index: 1900; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(0,0,0,0.45); padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px); }
.dart-hold-card { width: 100%; max-width: 460px; background: var(--ap-card, #16202a); border: 1px solid var(--ap-border, rgba(255,255,255,0.12));
    border-radius: 16px; padding: 1rem 1rem 1.1rem; display: grid; gap: 0.7rem; text-align: center; }
.dart-hold-title { font-weight: 800; font-size: 1.05rem; color: var(--ap-text); }
.dart-hold-code { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--ap-accent); }
.dart-hold-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; }
.dart-hold-fill { height: 100%; width: 100%; background: var(--ap-primary); }
.dart-hold-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.dart-hold-actions button { min-height: 3rem; font-size: 1.05rem; }

/* 2026-11-15 - Trinity - "You're no longer in this game" over a play page (common/js/apexrematch.js). */
.ap-gone { position: fixed; inset: 0; z-index: 1950; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.7); padding: 16px; }
.ap-gone-card { width: 100%; max-width: 420px; background: var(--ap-card, #16202a); border-radius: 16px; padding: 1.4rem;
    display: grid; gap: 1rem; text-align: center; border: 1px solid var(--ap-border, rgba(255,255,255,0.12)); }
.ap-gone-title { font-size: 1.25rem; font-weight: 800; color: var(--ap-text); }

/* 2026-11-15 - Trinity - "Your turn" when a player's turn comes round (common/js/apexrematch.js). */
.ap-your-turn { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translateX(-50%); z-index: 1960;
    padding: 0.6rem 1.4rem; border-radius: 999px; background: var(--ap-primary); color: #fff; font-weight: 800; font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4); animation: ap-your-turn-in 0.25s ease-out; }
@keyframes ap-your-turn-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 2026-11-15 - Trinity - The controller's lobby seats: number, name, move up / remove, and Rename for a guest. */
.ctrl-seat { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; padding: 0.45rem 0; }
.ctrl-seat-number { color: var(--ap-muted); font-size: 0.85rem; min-width: 1.8rem; }
.ctrl-seat-name { color: var(--ap-text); overflow-wrap: anywhere; }
.ctrl-seat-actions { display: flex; gap: 0.35rem; }
.ctrl-seat-actions form { margin: 0; }
.ctrl-seat-btn { min-width: 2.6rem; min-height: 2.4rem; padding: 0.2rem 0.6rem; }
.ctrl-seat-rename { grid-column: 2 / -1; font-size: 0.85rem; color: var(--ap-muted); }
.ctrl-seat-rename summary { cursor: pointer; }
.ctrl-seat-rename-form { display: flex; gap: 0.4rem; margin-top: 0.4rem; }

/* 2026-11-15 - Trinity - The controller home's quiet "More games" link (core/controller.php). */
.ctrl-more-games { display: block; margin: 1rem auto 0; background: none; border: 0; color: var(--ap-muted); font-size: 0.9rem; text-decoration: underline; }
/* 2026-11-21 - Trinity - Game roulette on the controller: the Spin button and the pick it offers. */
.ctrl-spin { padding: 0.75rem 1rem; border-radius: 10px; border: 1px dashed var(--ap-accent); background: color-mix(in srgb, var(--ap-accent) 10%, transparent);
    color: var(--ap-text); font-weight: 700; }
.ctrl-spin:disabled { opacity: 0.6; }
.ctrl-spin-result { margin-bottom: 1rem; padding: 0.9rem; border-radius: 10px; border: 1px solid var(--ap-accent); background: var(--ap-card); }
.ctrl-spin-title { font-weight: 800; color: var(--ap-accent); margin-bottom: 0.6rem; text-align: center; }

/* 2026-11-15 - Trinity - "Leave game" at the foot of every play page (common/js/apexrematch.js). */
.ap-leave-game { display: block; margin: 1.5rem auto 0.5rem; padding: 0.5rem 1.2rem; background: none; color: var(--ap-muted);
    border: 1px solid var(--ap-border, rgba(255,255,255,0.15)); border-radius: 999px; font-size: 0.9rem; }
.ap-leave-game.is-armed { color: #fff; background: var(--ap-danger, #e5484d); border-color: transparent; }

/* 2026-11-15 - Trinity - "Ada has left the game" with a Skip button, pinned to the foot of a play page while that empty
   seat is up (common/js/apexrematch.js, LeftSeat), and the same note on the controller's pad (core/control_body.php). */
.ap-left-seat { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 1940;
    max-width: 480px; margin: 0 auto; display: grid; gap: 0.6rem; padding: 1rem; border-radius: 16px; text-align: center;
    background: var(--ap-card, #16202a); border: 1px solid var(--ap-border, rgba(255,255,255,0.12)); box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.ap-left-seat-text { font-weight: 700; color: var(--ap-text); }
.ap-left-seat-btn { width: 100%; min-height: 3rem; }
.ctrl-left-seat { display: grid; gap: 0.6rem; margin-bottom: 1rem; padding: 0.9rem; border-radius: 14px; text-align: center;
    background: var(--ap-card, #16202a); border: 1px solid var(--ap-border, rgba(255,255,255,0.12)); }
.ctrl-left-seat-text { font-weight: 700; color: var(--ap-text); }

/* ── 2026-11-21 - Trinity - Accessibility pass over the scoring pads (ux-roadmap B7): contrast, focus, screen readers ── */
/* The theme's own muted grey under a second name, so a pad can derive a stronger one from it.
   WHY: a custom property cannot refer to itself, and the pads need the theme's value to start from. */
:root { --ap-muted-theme: var(--ap-muted);
    /* 2026-11-21 - Trinity - Text on the primary colour (a selected toggle): dark, 4.93:1 or better on every theme. */
    --ap-on-primary: #111;
}
/* Pad hints, Miss, Fix last dart and sub-labels: the theme's muted grey moved a quarter of the way to the text colour.
   WHY: pitch_green's muted (#607d8b, the default theme) measured 3.72:1 on the card and 3.24:1 on a pad key, under the
   4.5:1 small text needs. Moving toward --ap-text raises it in light and dark themes alike (5.06:1 or better on a key in
   all three) and still reads as secondary. Scoped to the pads, so the TV and the rest of the app keep the theme's value. */
.x01pad, .ckpad, .apad, .klpad, .hipad, .dtpad, .cbpad, .trpad, .tlpad, .glp-pad, .ct-visit-pad {
    --ap-muted: color-mix(in srgb, var(--ap-muted-theme) 75%, var(--ap-text));
}
/* A keyboard focus ring on every pad button, in the accent (9.6:1 or better against the card in every theme).
   :focus-visible only, so a tap or a click never draws it. */
:is(.x01pad, .ckpad, .apad, .klpad, .hipad, .dtpad, .cbpad, .trpad, .tlpad, .glp-pad, .ct-visit-pad) button:focus-visible {
    outline: 3px solid var(--ap-accent);
    outline-offset: 2px;
}
/* The pads' polite live region ("Treble 20. 100 left."): read by screen readers, never seen. It sits beside the pad,
   not in it, because the pads redraw themselves after every dart. */
.ap-pad-announce {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* Camera boxes' one-tap ✓ Score and the visit's Submit / Done: dark text on the primary, as on the pad toggles above.
   WHY: .btn-ap-primary's white text is 2.24:1 on pitch_green's green. Not on hover, where the button turns transparent
   and its text takes the primary colour. */
.ct-visit-pad .btn-ap-primary:not(:hover) { color: var(--ap-on-primary); }
/* The fix pad's Done and the Darts out button (.btn-ap-outline): primary text moved toward the text colour, and dark text
   when hovered onto the primary. WHY: plain primary text was 4.46:1 (dark_electric) and 2.86:1 (bold_sport) on the card;
   now 5.9:1 or better. White on the hovered primary was 2.24:1 on pitch_green. */
.ct-visit-pad .btn-ap-outline:not(:hover) { color: color-mix(in srgb, var(--ap-primary) 60%, var(--ap-text)); }
.ct-visit-pad .btn-ap-outline:hover { color: var(--ap-on-primary); }

/* 2026-11-21 - Trinity - Badges on My account (docs/reference/badges-design.md): a shelf of medals coloured by tier;
   unearned ones are dimmed silhouettes with how to earn them. Colours from the theme. */
.badge-count { font-size: 0.8em; font-weight: 600; color: var(--ap-muted); margin-left: 0.4rem; }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.9rem; }
.badge-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; }
.badge-medal { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; border: 3px solid var(--tier-colour); color: var(--tier-colour);
    background: color-mix(in srgb, var(--tier-colour) 16%, var(--ap-card)); }
.badge-medal.tier-common    { --tier-colour: var(--ap-muted); }
.badge-medal.tier-rare      { --tier-colour: var(--ap-primary); }
.badge-medal.tier-epic      { --tier-colour: var(--ap-accent); }
.badge-medal.tier-legendary { --tier-colour: var(--ap-accent);
    background: radial-gradient(circle, color-mix(in srgb, var(--ap-accent) 40%, var(--ap-card)), var(--ap-card)); box-shadow: 0 0 0.8rem color-mix(in srgb, var(--ap-accent) 55%, transparent); }
.badge-name { font-weight: 700; font-size: 0.9rem; color: var(--ap-text); }
.badge-how { font-size: 0.75rem; line-height: 1.3; color: var(--ap-muted); }
.badge-tile.is-locked .badge-medal { --tier-colour: var(--ap-muted); opacity: 0.45; filter: grayscale(1); }
.badge-tile.is-locked .badge-name { color: var(--ap-muted); }
/* 2026-11-21 - Trinity - Badges phase 2: how rare a badge is at this venue. */
.badge-rarity { font-size: 0.7rem; font-weight: 600; color: var(--ap-primary); }
/* 2026-11-22 - Trinity - Badges Phase 3: a badge earned at another venue */
.badge-elsewhere { font-size: 0.7rem; font-style: italic; color: var(--ap-muted); }

/* 2026-11-22 - Trinity - The weekly venue challenge: the phone home's card and the Venue Hub's notes */
.challenge-card    { margin-top: 1rem; text-align: left; }
.challenge-kicker  { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ap-accent); }
.challenge-title   { font-size: 1.15rem; font-weight: 700; color: var(--ap-text); margin-top: 0.15rem; }
.challenge-meta    { font-size: 0.8rem; color: var(--ap-muted); margin-top: 0.2rem; }
.challenge-board   { margin: 0.75rem 0 0.25rem; padding-left: 1.4rem; }
.challenge-board li { padding: 0.2rem 0; color: var(--ap-text); }
.challenge-board li span { display: inline-block; min-width: 60%; }
.challenge-board li strong { color: var(--ap-primary); }
.challenge-empty   { margin: 0.75rem 0 0.25rem; color: var(--ap-muted); }
.challenge-hub-off { color: var(--ap-danger); }
.challenge-history { margin-top: 0.5rem; }
/* 2026-11-22 - Trinity - Venue Hub: one row per venue message (title, then the line under it) */
.venue-message-row { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid color-mix(in srgb, var(--ap-text, #fff) 8%, transparent); }
.venue-message-image { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; }
.venue-message-thumb { width: 6rem; height: 4rem; object-fit: cover; border-radius: 6px; }
.venue-message-remove { display: flex; align-items: center; gap: 0.4rem; color: var(--ap-muted); font-size: 0.85rem; }
.venue-message-file-label { display: block; margin: 0.5rem 0 0.25rem; }
/* 2026-11-22 - Trinity - My account: Rivals (PL-003) */
.rival-row { display: flex; align-items: baseline; gap: 0.8rem; padding: 0.45rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ap-text, #fff) 7%, transparent); }
.rival-row:last-child { border-bottom: 0; }
.rival-name { flex: 1; font-weight: 600; color: var(--ap-text); }
.rival-score { font-weight: 800; color: var(--ap-primary); }
.rival-games { min-width: 4.5rem; text-align: right; font-size: 0.8rem; color: var(--ap-muted); }

/* 2026-11-22 - Trinity - My account → Practice (Practice drills, GM-008): a card per routine with the last ten sessions as
   bars, each a height step 0-10 against the routine's best (a class, never a style). */
.practice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.practice-name { font-weight: 800; color: var(--ap-text); margin-bottom: 0.4rem; }
.practice-figures { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.8rem; color: var(--ap-muted); }
.practice-figures strong { font-size: 1.1rem; color: var(--ap-primary); }
.practice-bars { display: flex; align-items: flex-end; gap: 0.25rem; height: 3rem; margin-top: 0.8rem; }
.practice-bar { flex: 1; min-height: 3px; border-radius: 3px 3px 0 0; background: var(--ap-primary); opacity: 0.85; }
.practice-bar:last-child { opacity: 1; }
.practice-bar-0 { height: 4%; }   .practice-bar-1 { height: 10%; }  .practice-bar-2 { height: 20%; }
.practice-bar-3 { height: 30%; }  .practice-bar-4 { height: 40%; }  .practice-bar-5 { height: 50%; }
.practice-bar-6 { height: 60%; }  .practice-bar-7 { height: 70%; }  .practice-bar-8 { height: 80%; }
.practice-bar-9 { height: 90%; }  .practice-bar-10 { height: 100%; }

/* 2026-11-22 - Trinity - Billiards training (features/billiards/BL-001) on the phone: the drill drawn small, two big
   buttons (Made it / Missed), the set-up steps, and every drill by level and skill. The table drawing's own classes
   (cue-table, cue-ball-…) are in games/cuetraining/tv.css, which the page links. */
.cue-phone-drill   { display: flex; flex-direction: column; gap: 0.6rem; }
.cue-phone-level   { font-size: 0.72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ap-accent); }
.cue-phone-name    { font-size: 1.1rem; font-weight: 900; color: var(--ap-text); }
.cue-phone-passed  { font-size: 0.75rem; font-weight: 800; color: #39d353; }
.cue-phone-counts  { font-size: 0.85rem; color: var(--ap-muted); }
.cue-phone-counts strong { color: var(--ap-text); }
.cue-pad           { display: flex; flex-direction: column; gap: 0.6rem; }
.cue-pad-tally     { font-size: 0.95rem; color: var(--ap-muted); }
.cue-pad-tally strong { color: var(--ap-text); }
.cue-pad-buttons   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cue-pad-made,
.cue-pad-miss      { font: inherit; font-size: 1.1rem; font-weight: 900; border-radius: 14px; padding: 1.2rem 0.5rem; border: 0; cursor: pointer; }
.cue-pad-made      { background: #39d353; color: #06210f; }
.cue-pad-miss      { background: color-mix(in srgb, var(--ap-primary) 16%, transparent); color: var(--ap-primary);
                     border: 1px solid color-mix(in srgb, var(--ap-primary) 50%, transparent); }
.cue-pad-made:disabled,
.cue-pad-miss:disabled { opacity: 0.4; cursor: default; }
.cue-phone-setup summary,
.cue-level-list summary { cursor: pointer; font-weight: 800; color: var(--ap-text); padding: 0.4rem 0; }
.cue-phone-setup ol { margin: 0.2rem 0 0; padding-left: 1.3rem; font-size: 0.85rem; line-height: 1.4; color: var(--ap-text); }
.cue-level-list    { border-top: 1px solid color-mix(in srgb, var(--ap-text) 8%, transparent); }
.cue-skill-name    { margin: 0.6rem 0 0.25rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-muted); }
.cue-drill-item    { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
                     font: inherit; font-size: 0.92rem; color: var(--ap-text); background: transparent; border: 0;
                     border-radius: 10px; padding: 0.5rem 0.6rem; cursor: pointer; }
.cue-drill-item.is-current { background: color-mix(in srgb, var(--ap-accent) 14%, transparent); }
.cue-done          { font-size: 0.75rem; font-weight: 800; color: #39d353; }
.cue-next          { font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ap-accent); }
.cue-soon          { font-size: 0.72rem; font-weight: 700; color: var(--ap-muted); margin-left: 0.4rem; }

/* My account → Billiards training: per level, drills passed, and each skill's state. */
.cue-progress      { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.cue-progress-level { font-weight: 800; color: var(--ap-text); display: flex; justify-content: space-between; gap: 0.6rem; }
.cue-progress-count { font-size: 0.85rem; color: var(--ap-muted); margin: 0.2rem 0 0.5rem; }
.cue-progress-count strong { color: var(--ap-primary); font-size: 1.05rem; }
.cue-progress-skill { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.85rem; color: var(--ap-muted);
                      padding: 0.2rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ap-text) 6%, transparent); }
.cue-progress-skill.is-complete { color: var(--ap-text); }
.cue-progress-skill:last-child { border-bottom: 0; }
.cue-panel-table   { width: 100%; height: auto; display: block; border-radius: 8px; }
.cue-panel-list    { margin-top: 0.4rem; text-align: left; }

/* 2026-11-22 - Trinity - PF-002: the warning on the Venue Hub page and the controller's settings when a box has no venue hub. */
.ap-hub-warning    { margin: 0.6rem 0; padding: 0.7rem 0.9rem; border-radius: 10px; font-weight: 700; color: var(--ap-text);
                     background: color-mix(in srgb, var(--ap-primary) 18%, transparent); border: 1px solid color-mix(in srgb, var(--ap-primary) 55%, transparent); }
.ap-hub-interval   { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }
/* 2026-11-22 - Trinity - BL-003/BL-004: pool and snooker records on My account. */
.pool-record-row   { display: flex; justify-content: space-between; padding: 0.25rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ap-text) 6%, transparent); }
.pool-record-row:last-child { border-bottom: 0; }

/* 2026-11-22 - Trinity - VN-005: a chain challenge won, on My account. */
.chain-win-card    { border: 1px solid color-mix(in srgb, var(--ap-primary) 55%, transparent); }
.chain-win-row     { font-weight: 700; padding: 0.2rem 0; }

/* 2026-11-22 - Trinity - PF-003: the boxes a venue hub has heard from. */
.ap-hub-boxes      { list-style: none; margin: 0.2rem 0 0.8rem; padding: 0; }
.ap-hub-boxes li   { padding: 0.3rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ap-text) 8%, transparent); font-size: 0.9rem; }
.ap-hub-boxes li:last-child { border-bottom: 0; }

/* 2026-11-23 - Trinity - The owner area's insights (features/venue/VN-008): the venue and window picker, the figure tiles,
   and bars sized by common/js/apex_bars.js through --ins-share. */
.ins-pick        { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ins-pick select { flex: 1 1 10rem; }
.ins-tiles       { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.6rem; }
.ins-tiles .ap-stat-card  { padding: 1rem 0.5rem; }
.ins-tiles .ap-stat-value { font-size: 1.9rem; }
.ins-busiest     { font-size: 1.4rem; font-weight: 900; color: var(--ap-accent); margin: 0.25rem 0 0.5rem; }
.ins-bars        { display: flex; flex-direction: column; gap: 0.35rem; }
.ins-row         { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.ins-label       { color: var(--ap-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-track       { height: 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.ins-bar         { display: block; height: 100%; width: calc(var(--ins-share, 0) * 100%); border-radius: 999px; background: var(--ap-primary); }
.ins-value       { text-align: right; font-weight: 800; }
.ins-bars-days .ins-row { grid-template-columns: 6.5rem 1fr 2rem; font-size: 0.8rem; }
