/* The night's games: the race clock and countdown, the result cards, and Floor Fever's lanes. Same cream on
   near-black as the rest of the HUD (hud.css); nothing here takes the pointer except Floor Fever's own lanes. */
.games-hud {
    position: fixed;
    inset: 0;
    z-index: 12;
    pointer-events: none;
    color: var(--paper, #efe3c4);
    font-family: "Big Shoulders Text", "Oswald", sans-serif;
}

.run-bar {
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 8px 16px 7px;
    border-left: 3px solid var(--tungsten, #f2a541);
    border-radius: 2px;
    background: rgba(10, 9, 12, 0.84);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.07em;
    white-space: nowrap;
}
.run-bar[hidden], .run-count[hidden], .game-card[hidden], .fever[hidden] { display: none; }
.run-time {
    min-width: 6.2ch;
    font: 900 30px/1 "Big Shoulders Display", "Oswald", sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.run-gate { color: rgba(239, 227, 196, 0.72); }
.run-delta { min-width: 5ch; font-variant-numeric: tabular-nums; transition: opacity 0.4s; }
.run-delta.ahead { color: #a6d99c; }
.run-delta.behind { color: #ee8a72; }
.run-delta.gone { opacity: 0; }

.run-count {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%);
    font: 900 148px/1 "Big Shoulders Display", "Oswald", sans-serif;
    letter-spacing: 0.02em;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.65);
}
.run-count.go { color: var(--tungsten, #f2a541); }
.run-count.pop { animation: run-pop 0.9s ease-out both; }
@keyframes run-pop {
    0% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
    14% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.94); opacity: 0; }
}

.game-card {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 280px;
    max-width: min(92vw, 460px);
    padding: 16px 22px 15px;
    border-left: 4px solid var(--card, var(--tungsten, #f2a541));
    border-radius: 2px;
    background: rgba(10, 9, 12, 0.92);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
    animation: card-in 0.28s ease-out both;
}
@keyframes card-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%); } }
.game-card .kicker { color: var(--card, var(--tungsten, #f2a541)); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; }
.game-card h3 {
    margin: 2px 0 6px;
    font: 900 40px/1.02 "Big Shoulders Display", "Oswald", sans-serif;
    letter-spacing: 0.02em;
}
.game-card p { margin: 3px 0 0; font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: 0.04em; color: rgba(239, 227, 196, 0.86); }
.game-card p.strong { color: var(--paper, #efe3c4); font-weight: 700; }
.game-card p.foot { margin-top: 9px; font-size: 13px; color: rgba(239, 227, 196, 0.6); }

/* Floor Fever */
.fever {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 12;
    transform: translateX(-50%);
    width: min(92vw, 372px);
    pointer-events: none;
    font-family: "Big Shoulders Text", "Oswald", sans-serif;
}
.fever canvas {
    display: block;
    width: 100%;
    height: min(58vh, 470px);
    border-radius: 3px;
    pointer-events: auto;
    touch-action: none;
}
.fever p {
    margin: 6px 0 0;
    color: rgba(239, 227, 196, 0.7);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
}

@media (max-width: 720px) {
    .run-bar { top: 108px; gap: 10px; padding: 7px 12px 6px; font-size: 12px; }
    .run-time { font-size: 24px; }
    .run-count { font-size: 104px; }
    .game-card { top: 16%; min-width: 0; width: min(92vw, 420px); }
    .game-card h3 { font-size: 32px; }
    .fever { bottom: 96px; }
    .fever canvas { height: min(48vh, 400px); }
}

@media (prefers-reduced-motion: reduce) {
    .run-count.pop, .game-card { animation: none; }
}

.mobile-actions button[hidden] { display: none; }

/* A chase */
.heat-bar {
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px 14px;
    align-items: baseline;
    padding: 8px 16px 9px;
    border-left: 3px solid #e2483a;
    border-radius: 2px;
    background: rgba(18, 8, 9, 0.86);
    font-weight: 700;
    letter-spacing: 0.07em;
    white-space: nowrap;
}
.heat-bar[hidden], .ledger-panel[hidden] { display: none; }
.heat-title { font: 900 20px/1 "Big Shoulders Display", "Oswald", sans-serif; color: #ff8a7a; }
.heat-dist { font-size: 14px; color: rgba(239, 227, 196, 0.86); font-variant-numeric: tabular-nums; }
.heat-meter { grid-column: 1 / -1; height: 4px; background: rgba(239, 227, 196, 0.15); border-radius: 2px; overflow: hidden; }
.heat-meter i { display: block; height: 100%; width: 0; background: #a6d99c; transition: width 0.2s linear; }

/* The Night Ledger */
.ledger-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 70;
    transform: translate(-50%, -50%);
    width: min(94vw, 640px);
    max-height: min(86vh, 720px);
    overflow: auto;
    padding: 18px 22px 16px;
    border-left: 4px solid var(--tungsten, #f2a541);
    border-radius: 2px;
    background: rgba(10, 9, 12, 0.97);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    color: var(--paper, #efe3c4);
    font-family: "Big Shoulders Text", "Oswald", sans-serif;
}
.ledger-panel header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.ledger-panel h3 { margin: 0; font: 900 34px/1 "Big Shoulders Display", "Oswald", sans-serif; letter-spacing: 0.03em; }
.ledger-count { flex: 1; color: var(--tungsten, #f2a541); font-weight: 700; letter-spacing: 0.12em; }
.ledger-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.ledger-list li { display: grid; grid-template-columns: 20px 1fr; gap: 0 8px; padding: 6px 0; border-bottom: 1px solid rgba(239, 227, 196, 0.1); }
.ledger-list .tick { grid-row: span 2; color: #a6d99c; font-weight: 900; }
.ledger-list strong { font-size: 16px; letter-spacing: 0.05em; color: rgba(239, 227, 196, 0.62); }
.ledger-list li.done strong { color: var(--paper, #efe3c4); }
.ledger-list .hint { font-size: 13px; font-weight: 500; letter-spacing: 0.03em; color: rgba(239, 227, 196, 0.55); }
.ledger-foot { margin: 12px 0 0; font-size: 13px; color: rgba(239, 227, 196, 0.55); letter-spacing: 0.05em; }
@media (max-width: 720px) {
    .heat-bar { top: 108px; padding: 7px 12px 8px; }
    .heat-title { font-size: 17px; }
    .ledger-list { grid-template-columns: 1fr; }
}

/* Night Ledger stamps */
.ledger-stamps {
    position: absolute;
    left: 24px;
    bottom: 28px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}
.ledger-stamp {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0 14px;
    align-items: baseline;
    padding: 7px 14px 8px;
    border-left: 3px solid #a6d99c;
    border-radius: 2px;
    background: rgba(10, 9, 12, 0.88);
    animation: card-in 0.25s ease-out both;
    transition: opacity 0.6s;
}
.ledger-stamp.gone { opacity: 0; }
.ledger-stamp .kicker { grid-column: 1 / -1; color: #a6d99c; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }
.ledger-stamp strong { font: 900 19px/1.1 "Big Shoulders Display", "Oswald", sans-serif; letter-spacing: 0.03em; }
.ledger-stamp .pay { color: var(--tungsten, #f2a541); font-weight: 700; letter-spacing: 0.06em; }
@media (max-width: 720px) { .ledger-stamps { left: 16px; bottom: 214px; } }
@media (prefers-reduced-motion: reduce) { .ledger-stamp { animation: none; } }
