/* =========================================================
   Pigskin History Blitz
   style.css
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --hb-green-dark: #173b24;
    --hb-green: #23633a;
    --hb-green-light: #2f7d49;
    --hb-gold: #f4c542;
    --hb-gold-dark: #c79a20;
    --hb-red: #9f2d22;
    --hb-red-dark: #6f1f18;
    --hb-cream: #f6eddc;
    --hb-paper: #fff8e8;
    --hb-paper-dark: #ead8b4;
    --hb-ink: #1c1a17;
    --hb-muted: #6c6254;
    --hb-brown: #5a3824;
    --hb-brown-dark: #321d13;
    --hb-white: #ffffff;
    --hb-black: #111111;
    --hb-shadow: rgba(0, 0, 0, 0.28);
    --hb-soft-shadow: rgba(0, 0, 0, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--hb-ink);
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 35%), linear-gradient(135deg, #1b3d27 0%, #102318 45%, #0b160f 100%);
}

.hb-game-shell {
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.hb-hidden {
    display: none !important;
}

/* =========================================================
   Header
   ========================================================= */

.hb-header {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
}

.hb-brand-block,
.hb-player-panel,
.hb-intro-card,
.hb-scoreboard,
.hb-field-wrap,
.hb-status-panel,
.hb-table,
.hb-game-over-card,
.hb-leaderboard-panel {
    border: 3px solid var(--hb-brown-dark);
    box-shadow: 0 8px 18px var(--hb-shadow);
}

.hb-brand-block {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    color: var(--hb-cream);
    background: linear-gradient(rgba(34, 26, 18, 0.66), rgba(34, 26, 18, 0.66)), repeating-linear-gradient( 45deg, #6b3f24 0, #6b3f24 8px, #5a321c 8px, #5a321c 16px );
}

    .hb-brand-block::after {
        content: "";
        position: absolute;
        inset: 12px;
        border: 1px solid rgba(246, 237, 220, 0.34);
        pointer-events: none;
    }

.hb-kicker {
    margin: 0 0 8px;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hb-gold);
    font-weight: 700;
}

.hb-brand-block h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 0.96;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 3px 3px 0 var(--hb-black);
}

.hb-subtitle {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #fff4d9;
}

.hb-player-panel {
    padding: 22px;
    background: var(--hb-paper);
}

    .hb-player-panel label {
        display: block;
        margin-bottom: 8px;
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.82rem;
        letter-spacing: 0.08em;
        color: var(--hb-brown-dark);
    }

.hb-name-row {
    display: flex;
    gap: 8px;
}

#hbPlayerName {
    width: 100%;
    min-width: 0;
    padding: 12px 10px;
    border: 2px solid var(--hb-brown);
    background: #fffdf5;
    color: var(--hb-ink);
    font-size: 1rem;
    font-family: inherit;
}

#hbSaveNameBtn,
.hb-primary-btn,
.hb-secondary-btn {
    cursor: pointer;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#hbSaveNameBtn {
    padding: 12px 14px;
    color: var(--hb-cream);
    background: var(--hb-red);
    border: 2px solid var(--hb-red-dark);
}

    #hbSaveNameBtn:hover,
    .hb-primary-btn:hover,
    .hb-secondary-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
    }

    #hbSaveNameBtn:active,
    .hb-primary-btn:active,
    .hb-secondary-btn:active {
        transform: translateY(1px);
    }

/* =========================================================
   Intro
   ========================================================= */

.hb-intro-panel {
    margin-bottom: 20px;
}

.hb-intro-card {
    padding: 24px;
    background: linear-gradient(rgba(255, 248, 232, 0.94), rgba(255, 248, 232, 0.94)), repeating-linear-gradient( 0deg, transparent 0, transparent 24px, rgba(90, 56, 36, 0.06) 24px, rgba(90, 56, 36, 0.06) 25px );
}

    .hb-intro-card h2 {
        margin: 0 0 12px;
        font-size: 2rem;
        text-transform: uppercase;
    }

    .hb-intro-card p {
        max-width: 900px;
        margin: 0 0 12px;
        line-height: 1.55;
        font-size: 1.05rem;
    }

.hb-intro-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

    .hb-intro-rules div {
        padding: 14px;
        background: #fffdf5;
        border: 2px solid var(--hb-paper-dark);
        box-shadow: 3px 3px 0 rgba(90, 56, 36, 0.16);
    }

    .hb-intro-rules strong {
        display: block;
        margin-bottom: 5px;
        color: var(--hb-red-dark);
        text-transform: uppercase;
        font-size: 0.84rem;
    }

    .hb-intro-rules span {
        display: block;
        font-size: 0.95rem;
        line-height: 1.35;
    }

.hb-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 22px;
    color: var(--hb-cream);
    background: var(--hb-red);
    border: 3px solid var(--hb-red-dark);
    box-shadow: 4px 4px 0 var(--hb-brown-dark);
}

.hb-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 22px;
    color: var(--hb-brown-dark);
    background: var(--hb-gold);
    border: 3px solid var(--hb-gold-dark);
    box-shadow: 4px 4px 0 var(--hb-brown-dark);
}

/* =========================================================
   Scoreboard
   ========================================================= */

.hb-scoreboard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: hidden;
    margin-bottom: 18px;
    background: var(--hb-black);
    color: var(--hb-gold);
    position: sticky;
    top: 0;
    z-index: 8000;
}

.hb-score-item {
    padding: 15px 12px;
    text-align: center;
    border-right: 1px solid rgba(244, 197, 66, 0.28);
    background: radial-gradient(circle at top, rgba(244, 197, 66, 0.12), transparent 62%), #111;
}

    .hb-score-item:last-child {
        border-right: 0;
    }

.hb-score-label {
    display: block;
    margin-bottom: 6px;
    color: #f7e8a0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hb-score-item strong {
    display: block;
    font-family: "Courier New", monospace;
    font-size: clamp(1.2rem, 3vw, 1.9rem);
    color: var(--hb-gold);
    text-shadow: 0 0 8px rgba(244, 197, 66, 0.45);
}

/* =========================================================
   Football Field
   ========================================================= */

.hb-field-wrap {
    margin-bottom: 18px;
    padding: 18px;
    background: #101b12;
}

.hb-field {
    position: relative;
    height: 96px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px) 0 0 / 10% 100%, repeating-linear-gradient( 90deg, #1e6b3a 0, #1e6b3a 9.5%, #185a31 9.5%, #185a31 10% );
}

    .hb-field::before,
    .hb-field::after {
        content: "END ZONE";
        position: absolute;
        top: 0;
        width: 8%;
        height: 100%;
        display: grid;
        place-items: center;
        color: rgba(255, 255, 255, 0.72);
        background: rgba(116, 24, 20, 0.72);
        font-family: Arial, Helvetica, sans-serif;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.18em;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        z-index: 1;
    }

    .hb-field::before {
        left: 0;
    }

    .hb-field::after {
        right: 0;
        transform: rotate(180deg);
    }

.hb-yard-marker {
    position: absolute;
    bottom: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 0.85rem;
    transform: translateX(-50%);
    z-index: 2;
    text-shadow: 1px 1px 2px #000;
}

.hb-yard-0 {
    left: 8%;
}

.hb-yard-25 {
    left: 29%;
}

.hb-yard-50 {
    left: 50%;
}

.hb-yard-75 {
    left: 71%;
}

.hb-yard-100 {
    left: 92%;
}

.hb-first-down-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    left: 34%;
    background: var(--hb-gold);
    box-shadow: 0 0 10px rgba(244, 197, 66, 0.8);
    z-index: 3;
    transition: left 0.35s ease;
}

.hb-ball-marker {
    position: absolute;
    left: 29%;
    top: 50%;
    width: 34px;
    height: 22px;
    background: #8a4b27;
    border: 2px solid #3b1f12;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.45);
    z-index: 4;
    transition: left 0.45s ease;
}

    .hb-ball-marker::before {
        content: "";
        position: absolute;
        left: 7px;
        right: 7px;
        top: 9px;
        height: 2px;
        background: rgba(255, 255, 255, 0.82);
    }

    .hb-ball-marker::after {
        content: "";
        position: absolute;
        left: 14px;
        top: 5px;
        width: 2px;
        height: 12px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: -4px 2px 0 rgba(255,255,255,0.82), 4px 2px 0 rgba(255,255,255,0.82);
    }

/* =========================================================
   Result / Status
   ========================================================= */

.hb-status-panel {
    margin-bottom: 18px;
    padding: 14px 18px;
    background: var(--hb-paper);
}

.hb-result-text {
    min-height: 28px;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
}

    .hb-result-text.hb-good {
        color: var(--hb-green-dark);
    }

    .hb-result-text.hb-bad {
        color: var(--hb-red-dark);
    }

    .hb-result-text.hb-big-result {
        animation: hbResultPop 0.5s ease;
    }

@keyframes hbResultPop {
    0% {
        transform: scale(0.92);
        opacity: 0.4;
    }

    60% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================================
   Card Table
   ========================================================= */

.hb-table {
    padding: 20px;
    margin-bottom: 22px;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 22%), linear-gradient(135deg, #6a3f26, #3b2114 68%, #28150d);
}

.hb-pile-row {
    display: grid;
    grid-template-columns: 170px 1fr 170px;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
}

.hb-pile,
.hb-set-info {
    min-height: 128px;
    border: 3px solid var(--hb-brown-dark);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.26);
}

.hb-pile {
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(255, 248, 232, 0.92);
}

.hb-pile-label {
    padding: 9px 10px;
    color: var(--hb-cream);
    background: var(--hb-brown-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hb-pile-stack {
    display: grid;
    place-items: center;
    margin: 14px auto;
    width: 86px;
    height: 70px;
    color: var(--hb-gold);
    background: linear-gradient(135deg, rgba(255,255,255,0.14), transparent), var(--hb-red-dark);
    border: 3px solid var(--hb-brown-dark);
    border-radius: 8px;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.24), -5px -5px 0 rgba(255,255,255,0.32);
    font-size: 1.6rem;
    font-weight: 900;
}

.hb-discard-stack {
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent), #4e4a43;
}

.hb-set-info {
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--hb-cream);
    background: linear-gradient(rgba(20, 44, 26, 0.82), rgba(20, 44, 26, 0.82)), repeating-linear-gradient(90deg, #235d38 0, #235d38 16px, #1b4c2d 16px, #1b4c2d 32px);
    text-align: center;
}

    .hb-set-info span {
        display: block;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.14em;
        color: #f7e8a0;
    }

    .hb-set-info strong {
        display: block;
        margin-top: 6px;
        font-size: 1.7rem;
        text-transform: uppercase;
    }

/* =========================================================
   Sections
   ========================================================= */

.hb-timeline-section,
.hb-hand-section {
    margin-top: 18px;
    padding: 18px;
    background: rgba(255, 248, 232, 0.92);
    border: 3px solid var(--hb-brown-dark);
    box-shadow: inset 0 0 0 2px rgba(90, 56, 36, 0.12);
}

.hb-section-heading {
    margin-bottom: 14px;
    text-align: center;
}

    .hb-section-heading h2 {
        margin: 0;
        color: var(--hb-brown-dark);
        font-size: 1.55rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .hb-section-heading p {
        margin: 5px 0 0;
        color: var(--hb-muted);
        font-size: 0.95rem;
    }

/* =========================================================
   Timeline Lane Base
   ========================================================= */

.hb-timeline-lane {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 230px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 18px 12px;
    border: 3px dashed rgba(90, 56, 36, 0.42);
    background: linear-gradient(90deg, rgba(90, 56, 36, 0.08) 1px, transparent 1px) 0 0 / 48px 100%, #fffdf4;
    scroll-snap-type: x proximity;
}

    .hb-timeline-lane::-webkit-scrollbar {
        height: 12px;
    }

    .hb-timeline-lane::-webkit-scrollbar-track {
        background: #ead8b4;
    }

    .hb-timeline-lane::-webkit-scrollbar-thumb {
        background: var(--hb-brown);
        border: 2px solid #ead8b4;
    }

.hb-empty-message {
    width: 100%;
    display: grid;
    place-items: center;
    min-height: 90px;
    padding: 18px;
    color: var(--hb-muted);
    font-style: italic;
    text-align: center;
}

/* =========================================================
   Drop Slots Base
   ========================================================= */

.hb-drop-slot {
    flex: 0 0 72px;
    min-height: 185px;
    display: grid;
    place-items: center;
    align-self: stretch;
    border: 3px dashed rgba(35, 99, 58, 0.38);
    border-radius: 10px;
    color: rgba(35, 99, 58, 0.78);
    background: rgba(47, 125, 73, 0.08);
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    scroll-snap-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

    .hb-drop-slot::before {
        content: "Drop Here";
        padding: 8px;
    }

    .hb-drop-slot.hb-slot-active {
        background: rgba(244, 197, 66, 0.18);
        border-color: var(--hb-gold-dark);
        transform: scale(1.03);
    }

    .hb-drop-slot.hb-slot-correct {
        background: rgba(35, 99, 58, 0.22);
        border-color: var(--hb-green);
        animation: hbCorrectPulse 0.7s ease;
    }

    .hb-drop-slot.hb-slot-wrong {
        background: rgba(159, 45, 34, 0.18);
        border-color: var(--hb-red);
        animation: hbWrongShake 0.35s ease;
    }

@keyframes hbCorrectPulse {
    0% {
        box-shadow: 0 0 0 rgba(35, 99, 58, 0);
    }

    50% {
        box-shadow: 0 0 18px rgba(35, 99, 58, 0.45);
    }

    100% {
        box-shadow: 0 0 0 rgba(35, 99, 58, 0);
    }
}

@keyframes hbWrongShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* =========================================================
   Event Tiles
   ========================================================= */

.hb-event-tile {
    position: relative;
    flex: 0 0 205px;
    min-height: 185px;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 3px solid var(--hb-brown-dark);
    border-radius: 10px;
    background: linear-gradient(rgba(255, 248, 232, 0.96), rgba(255, 248, 232, 0.96)), repeating-linear-gradient( 0deg, transparent 0, transparent 21px, rgba(90, 56, 36, 0.08) 21px, rgba(90, 56, 36, 0.08) 22px );
    box-shadow: 5px 5px 0 rgba(0,0,0,0.24);
    scroll-snap-align: center;
}

    .hb-event-tile::before {
        content: "";
        position: absolute;
        inset: 7px;
        border: 1px solid rgba(90, 56, 36, 0.18);
        border-radius: 6px;
        pointer-events: none;
    }

    .hb-event-tile.hb-anchor-tile {
        background: linear-gradient(rgba(255, 242, 197, 0.96), rgba(255, 242, 197, 0.96)), repeating-linear-gradient( 0deg, transparent 0, transparent 21px, rgba(90, 56, 36, 0.08) 21px, rgba(90, 56, 36, 0.08) 22px );
    }

    .hb-event-tile.hb-current-card {
        flex: 0 0 min(620px, 100%);
        width: min(620px, 100%);
        min-height: 150px;
        max-height: none;
        cursor: grab;
        transform-origin: center;
        transition: transform 0.16s ease, box-shadow 0.16s ease;
    }

        .hb-event-tile.hb-current-card:hover {
            transform: translateY(-3px) rotate(-0.25deg);
            box-shadow: 7px 8px 0 rgba(0,0,0,0.26);
        }

        .hb-event-tile.hb-current-card:active {
            cursor: grabbing;
        }

    .hb-event-tile.hb-dragging {
        opacity: 0.58;
        transform: scale(0.96);
    }

.hb-card-topline {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.hb-card-label {
    display: inline-flex;
    align-items: center;
    max-width: 68%;
    padding: 4px 6px;
    color: var(--hb-cream);
    background: var(--hb-red);
    border: 1px solid var(--hb-red-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1.15;
    text-transform: uppercase;
}

.hb-card-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    color: var(--hb-brown-dark);
    background: var(--hb-gold);
    border: 1px solid var(--hb-gold-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.6rem;
    font-weight: 900;
    white-space: nowrap;
}

.hb-card-title {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: var(--hb-ink);
    font-size: 0.72rem;
    line-height: 1.12;
    font-weight: 900;
    display: block;
    overflow: visible;
    white-space: normal;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
}

.hb-event-tile.hb-current-card .hb-card-title {
    font-size: 0.9rem;
    line-height: 1.15;
}

.hb-card-meta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3px;
    margin-top: auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.56rem;
    line-height: 1.2;
    color: var(--hb-muted);
}

.hb-event-tile.hb-current-card .hb-card-meta {
    font-size: 0.62rem;
}

.hb-card-meta span {
    display: block;
}

.hb-card-source {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    margin-top: 6px;
    color: var(--hb-red-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.52rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
}

    .hb-card-source:hover {
        text-decoration: underline;
    }

/* =========================================================
   Hand Zone
   ========================================================= */

.hb-hand-section {
    display: none;
}

.hb-hand-zone {
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 18px;
    border: 3px dashed rgba(90, 56, 36, 0.42);
    background: radial-gradient(circle at center, rgba(244, 197, 66, 0.16), transparent 44%), #fffdf4;
}

    .hb-hand-zone .hb-empty-message {
        min-height: 130px;
    }

/* =========================================================
   Current Down Card Spotlight / Lightbox
   ========================================================= */

.hb-card-spotlight {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: grid;
    place-items: center;
    padding: 22px;
}

.hb-spotlight-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(244, 197, 66, 0.18), transparent 42%), rgba(10, 8, 5, 0.74);
    backdrop-filter: blur(3px);
}

.hb-spotlight-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    padding: 18px;
    background: linear-gradient(rgba(255, 248, 232, 0.98), rgba(255, 248, 232, 0.98)), repeating-linear-gradient( 0deg, transparent 0, transparent 24px, rgba(90, 56, 36, 0.06) 24px, rgba(90, 56, 36, 0.06) 25px );
    border: 4px solid var(--hb-brown-dark);
    box-shadow: 0 16px 46px rgba(0,0,0,0.58), 7px 7px 0 rgba(0,0,0,0.28);
}

.hb-spotlight-header {
    text-align: center;
    margin-bottom: 12px;
}

.hb-spotlight-kicker {
    margin: 0 0 5px;
    color: var(--hb-red-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hb-spotlight-header h2 {
    margin: 0;
    color: var(--hb-brown-dark);
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1;
    text-transform: uppercase;
}

.hb-spotlight-header p {
    margin: 8px auto 0;
    max-width: 620px;
    color: var(--hb-muted);
    line-height: 1.35;
    font-size: 0.9rem;
}

.hb-spotlight-card-wrap {
    display: grid;
    place-items: center;
    padding: 8px 0 14px;
}

    .hb-spotlight-card-wrap .hb-event-tile {
        flex: none;
        width: min(620px, 100%);
        min-height: 0;
        height: auto;
        max-height: none;
        padding: 16px;
        border-width: 4px;
        overflow: visible;
        box-shadow: 8px 8px 0 rgba(0,0,0,0.28);
    }

    .hb-spotlight-card-wrap .hb-card-label {
        max-width: 72%;
        padding: 5px 8px;
        font-size: 0.55rem;
    }

    .hb-spotlight-card-wrap .hb-card-date {
        padding: 5px 8px;
        font-size: 0.58rem;
    }

    .hb-spotlight-card-wrap .hb-card-title {
        display: block;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
        -webkit-line-clamp: unset;
        font-size: 0.95rem;
        line-height: 1.15;
        margin-top: 8px;
    }

    .hb-spotlight-card-wrap .hb-card-meta {
        margin-top: 16px;
        font-size: 0.62rem;
    }

.hb-spotlight-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hb-card-spotlight.hb-spotlight-fade {
    animation: hbSpotlightFadeOut 0.22s ease forwards;
}

@keyframes hbSpotlightFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* =========================================================
   Message Modal
   ========================================================= */

.hb-message-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 18px;
}

.hb-message-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 5, 0.58);
    backdrop-filter: blur(2px);
}

.hb-message-box {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    padding: 24px;
    text-align: center;
    background: linear-gradient(rgba(255, 248, 232, 0.98), rgba(255, 248, 232, 0.98)), repeating-linear-gradient( 0deg, transparent 0, transparent 24px, rgba(90, 56, 36, 0.06) 24px, rgba(90, 56, 36, 0.06) 25px );
    border: 4px solid var(--hb-brown-dark);
    box-shadow: 0 16px 44px rgba(0,0,0,0.52), 6px 6px 0 rgba(0,0,0,0.28);
}

.hb-message-text {
    margin-bottom: 18px;
    color: var(--hb-brown-dark);
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 900;
}

.hb-message-box.hb-message-good {
    border-color: var(--hb-green-dark);
}

    .hb-message-box.hb-message-good .hb-message-text {
        color: var(--hb-green-dark);
    }

.hb-message-box.hb-message-bad {
    border-color: var(--hb-red-dark);
}

    .hb-message-box.hb-message-bad .hb-message-text {
        color: var(--hb-red-dark);
    }

/* =========================================================
   Game Over
   ========================================================= */

.hb-game-over-panel {
    margin-bottom: 22px;
}

.hb-game-over-card {
    padding: 24px;
    background: var(--hb-paper);
    text-align: center;
}

    .hb-game-over-card h2 {
        margin: 0 0 10px;
        color: var(--hb-red-dark);
        font-size: 2.2rem;
        text-transform: uppercase;
    }

    .hb-game-over-card p {
        margin: 0 auto 18px;
        max-width: 760px;
        line-height: 1.5;
    }

.hb-final-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

    .hb-final-stats div {
        padding: 14px;
        color: var(--hb-gold);
        background: var(--hb-black);
        border: 2px solid var(--hb-brown-dark);
    }

    .hb-final-stats span {
        display: block;
        color: #f7e8a0;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
    }

    .hb-final-stats strong {
        display: block;
        margin-top: 5px;
        font-family: "Courier New", monospace;
        font-size: 1.8rem;
    }

.hb-game-over-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================================
   Leaderboard
   ========================================================= */

.hb-leaderboard-panel {
    padding: 20px;
    background: var(--hb-paper);
}

.hb-leaderboard-list {
    display: grid;
    gap: 8px;
}

.hb-leaderboard-row {
    display: grid;
    grid-template-columns: 48px 1fr 90px 90px 90px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: #fffdf5;
    border: 2px solid var(--hb-paper-dark);
    font-family: Arial, Helvetica, sans-serif;
}

    .hb-leaderboard-row.hb-leaderboard-head {
        color: var(--hb-cream);
        background: var(--hb-brown-dark);
        border-color: var(--hb-brown-dark);
        font-size: 0.78rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

.hb-leaderboard-rank {
    font-weight: 900;
}

.hb-leaderboard-name {
    font-weight: 800;
}

.hb-leaderboard-score,
.hb-leaderboard-td,
.hb-leaderboard-fd {
    text-align: right;
    font-weight: 800;
}

/* =========================================================
   Desktop Fan Timeline Final Override
   ========================================================= */

#hbTimelineLane.hb-timeline-lane {
    display: flex !important;
    align-items: flex-end !important;
    gap: 0 !important;
    min-height: 285px !important;
    height: auto !important;
    padding: 28px 34px 40px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    position: relative !important;
    scroll-snap-type: none !important;
}

#hbTimelineLane .hb-drop-slot {
    position: relative !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    min-width: 20px !important;
    min-height: 230px !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: transparent !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    overflow: visible !important;
    z-index: 300 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

    #hbTimelineLane .hb-drop-slot::before {
        content: "" !important;
        display: block !important;
        width: 4px !important;
        height: 100% !important;
        min-height: 230px !important;
        border-radius: 999px !important;
        background: rgba(35, 99, 58, 0.35) !important;
        border: 1px solid rgba(35, 99, 58, 0.22) !important;
        box-shadow: inset 0 0 0 1px rgba(35, 99, 58, 0.16) !important;
        transition: all 0.18s ease !important;
    }

    #hbTimelineLane .hb-drop-slot::after {
        content: "DROP" !important;
        position: absolute !important;
        top: -18px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 0.48rem !important;
        font-weight: 900 !important;
        letter-spacing: 0.08em !important;
        color: var(--hb-green-dark) !important;
        opacity: 0 !important;
        transition: opacity 0.18s ease !important;
        pointer-events: none !important;
    }

    #hbTimelineLane .hb-drop-slot:hover::before,
    #hbTimelineLane .hb-drop-slot.hb-slot-active::before {
        width: 6px !important;
        background: var(--hb-gold) !important;
        box-shadow: 0 0 12px rgba(244, 197, 66, 0.7) !important;
    }

    #hbTimelineLane .hb-drop-slot:hover::after,
    #hbTimelineLane .hb-drop-slot.hb-slot-active::after {
        opacity: 1 !important;
    }

#hbTimelineLane > .hb-event-tile {
    position: relative !important;
    flex: 0 0 250px !important;
    width: 250px !important;
    min-width: 250px !important;
    min-height: 220px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 12px !important;
    margin-left: -118px !important;
    transform-origin: center bottom !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, margin-left 0.18s ease !important;
    z-index: 10 !important;
}

#hbTimelineLane > .hb-drop-slot:first-child + .hb-event-tile {
    margin-left: -18px !important;
}

#hbTimelineLane > .hb-event-tile:hover {
    z-index: 900 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.28) !important;
}

#hbTimelineLane .hb-card-title {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    font-size: 0.75rem !important;
    line-height: 1.12 !important;
}

#hbTimelineLane .hb-card-label {
    font-size: 0.45rem !important;
    line-height: 1.1 !important;
}

#hbTimelineLane .hb-card-date {
    font-size: 0.5rem !important;
}

#hbTimelineLane .hb-card-meta {
    font-size: 0.54rem !important;
    line-height: 1.2 !important;
}

/* =========================================================
   Responsive Tablet
   ========================================================= */

@media (max-width: 940px) {
    .hb-header {
        grid-template-columns: 1fr;
    }

    .hb-intro-rules {
        grid-template-columns: 1fr;
    }

    .hb-scoreboard {
        grid-template-columns: repeat(3, 1fr);
    }

    .hb-score-item:nth-child(3) {
        border-right: 0;
    }

    .hb-score-item:nth-child(4),
    .hb-score-item:nth-child(5) {
        border-top: 1px solid rgba(244, 197, 66, 0.28);
    }

    .hb-pile-row {
        grid-template-columns: 1fr 1fr;
    }

    .hb-set-info {
        grid-column: 1 / -1;
        min-height: 92px;
        order: -1;
    }
}

/* =========================================================
   Final Mobile Fix
   ========================================================= */

@media (max-width: 700px) {

    body {
        overflow-x: hidden;
    }

    .hb-game-shell {
        width: 100% !important;
        padding: 0 6px 32px !important;
    }

    .hb-header {
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .hb-brand-block,
    .hb-player-panel,
    .hb-intro-card,
    .hb-table,
    .hb-leaderboard-panel,
    .hb-game-over-card {
        border-width: 2px !important;
    }

    .hb-brand-block {
        padding: 16px 12px !important;
    }

        .hb-brand-block h1 {
            font-size: 2rem !important;
        }

    .hb-subtitle {
        font-size: 0.88rem !important;
    }

    .hb-player-panel {
        padding: 12px !important;
    }

    .hb-name-row {
        flex-direction: column !important;
    }

    #hbSaveNameBtn {
        width: 100% !important;
    }

    #hbScoreboard,
    .hb-scoreboard {
        position: sticky !important;
        top: 0 !important;
        z-index: 8000 !important;
        grid-template-columns: repeat(2, 1fr) !important;
        margin-bottom: 8px !important;
    }

    .hb-score-item {
        padding: 8px 4px !important;
        min-height: 72px !important;
        border-top: 1px solid rgba(244, 197, 66, 0.28) !important;
    }

        .hb-score-item:nth-child(1),
        .hb-score-item:nth-child(2) {
            border-top: 0 !important;
        }

        .hb-score-item:nth-child(2),
        .hb-score-item:nth-child(4) {
            border-right: 0 !important;
        }

        .hb-score-item:nth-child(3) {
            border-right: 1px solid rgba(244, 197, 66, 0.28) !important;
        }

        .hb-score-item:nth-child(5) {
            grid-column: 1 / -1 !important;
            border-right: 0 !important;
        }

    .hb-score-label {
        font-size: 0.58rem !important;
        letter-spacing: 0.14em !important;
        margin-bottom: 4px !important;
    }

    .hb-score-item strong {
        font-size: 1.05rem !important;
    }

    .hb-field-wrap {
        padding: 8px !important;
        margin-bottom: 10px !important;
    }

    .hb-field {
        height: 62px !important;
    }

    .hb-yard-marker {
        font-size: 0.62rem !important;
    }

    .hb-ball-marker {
        width: 28px !important;
        height: 18px !important;
    }

    .hb-status-panel {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .hb-result-text {
        font-size: 0.88rem !important;
    }

    .hb-table {
        padding: 8px !important;
    }

    .hb-pile-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .hb-set-info {
        grid-column: 1 / -1 !important;
        min-height: 70px !important;
        order: -1 !important;
        padding: 10px !important;
    }

        .hb-set-info strong {
            font-size: 1.15rem !important;
        }

    .hb-pile {
        min-height: 86px !important;
    }

    .hb-pile-label {
        padding: 6px !important;
        font-size: 0.62rem !important;
    }

    .hb-pile-stack {
        width: 58px !important;
        height: 46px !important;
        font-size: 1rem !important;
        margin: 10px auto !important;
    }

    .hb-hand-section {
        display: none !important;
    }

    .hb-timeline-section {
        padding: 8px !important;
        margin-top: 8px !important;
        overflow: visible !important;
    }

    .hb-section-heading {
        margin-bottom: 8px !important;
    }

        .hb-section-heading h2 {
            font-size: 1.45rem !important;
            line-height: 1 !important;
        }

        .hb-section-heading p {
            font-size: 0.82rem !important;
            line-height: 1.2 !important;
            max-width: 300px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }

    #hbTimelineLane.hb-timeline-lane {
        display: flex !important;
        align-items: flex-start !important;
        gap: 0 !important;
        width: 100% !important;
        min-height: 245px !important;
        height: auto !important;
        padding: 18px 12px 22px !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: none !important;
    }

    #hbTimelineLane .hb-drop-slot {
        flex: 0 0 24px !important;
        width: 24px !important;
        min-width: 24px !important;
        min-height: 205px !important;
        height: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: transparent !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: center !important;
        position: relative !important;
        z-index: 100 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

        #hbTimelineLane .hb-drop-slot::before {
            content: "" !important;
            display: block !important;
            width: 5px !important;
            height: 100% !important;
            min-height: 205px !important;
            border-radius: 999px !important;
            background: rgba(35, 99, 58, 0.42) !important;
            border: 1px solid rgba(35, 99, 58, 0.28) !important;
            box-shadow: none !important;
        }

        #hbTimelineLane .hb-drop-slot::after {
            content: "TAP" !important;
            position: absolute !important;
            top: -14px !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            color: var(--hb-green-dark) !important;
            font-size: 0.42rem !important;
            font-weight: 900 !important;
            letter-spacing: 0.08em !important;
            opacity: 1 !important;
        }

        #hbTimelineLane .hb-drop-slot.hb-slot-active::before,
        #hbTimelineLane .hb-drop-slot:hover::before {
            width: 7px !important;
            background: var(--hb-gold) !important;
            box-shadow: 0 0 10px rgba(244, 197, 66, 0.75) !important;
        }

    #hbTimelineLane > .hb-event-tile {
        flex: 0 0 178px !important;
        width: 178px !important;
        min-width: 178px !important;
        min-height: 205px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 8px !important;
        margin-left: -42px !important;
        transform-origin: center bottom !important;
        box-shadow: 4px 4px 0 rgba(0,0,0,0.24) !important;
    }

    #hbTimelineLane > .hb-drop-slot:first-child + .hb-event-tile {
        margin-left: 0 !important;
    }

    #hbTimelineLane .hb-card-topline {
        gap: 4px !important;
        margin-bottom: 6px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    #hbTimelineLane .hb-card-label {
        max-width: 100% !important;
        font-size: 0.42rem !important;
        line-height: 1.08 !important;
        padding: 3px 5px !important;
    }

    #hbTimelineLane .hb-card-date {
        font-size: 0.45rem !important;
        padding: 3px 5px !important;
    }

    #hbTimelineLane .hb-card-title {
        display: block !important;
        overflow: visible !important;
        white-space: normal !important;
        -webkit-line-clamp: unset !important;
        font-size: 0.58rem !important;
        line-height: 1.08 !important;
        margin-bottom: 6px !important;
    }

    #hbTimelineLane .hb-card-meta {
        font-size: 0.46rem !important;
        line-height: 1.15 !important;
    }

    #hbTimelineLane .hb-card-source {
        font-size: 0.44rem !important;
        margin-top: 5px !important;
    }

    .hb-card-spotlight {
        padding: 8px !important;
        align-items: start !important;
        overflow-y: auto !important;
    }

    .hb-spotlight-panel {
        width: 100% !important;
        margin-top: 8px !important;
        padding: 12px !important;
        border-width: 3px !important;
        max-height: none !important;
    }

    .hb-spotlight-header h2 {
        font-size: 1.35rem !important;
    }

    .hb-spotlight-header p {
        font-size: 0.76rem !important;
    }

    .hb-spotlight-card-wrap .hb-event-tile {
        width: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 12px !important;
    }

    .hb-spotlight-card-wrap .hb-card-topline {
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .hb-spotlight-card-wrap .hb-card-label {
        max-width: 68% !important;
        font-size: 0.52rem !important;
        padding: 4px 6px !important;
    }

    .hb-spotlight-card-wrap .hb-card-date {
        font-size: 0.56rem !important;
        padding: 4px 6px !important;
    }

    .hb-spotlight-card-wrap .hb-card-title {
        font-size: 0.9rem !important;
        line-height: 1.15 !important;
    }

    .hb-spotlight-card-wrap .hb-card-meta {
        margin-top: 10px !important;
        font-size: 0.62rem !important;
    }

    .hb-spotlight-actions .hb-secondary-btn,
    .hb-message-box .hb-primary-btn {
        width: 100% !important;
    }

    .hb-message-box {
        padding: 18px 14px !important;
        border-width: 3px !important;
    }

    .hb-message-text {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }

    .hb-final-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hb-leaderboard-row {
        grid-template-columns: 38px 1fr 70px !important;
    }

        .hb-leaderboard-row span:nth-child(4),
        .hb-leaderboard-row span:nth-child(5) {
            display: none !important;
        }
}

@media (max-width: 440px) {
    .hb-brand-block h1 {
        font-size: 1.7rem !important;
    }

    .hb-score-item strong {
        font-size: 0.95rem !important;
    }

    .hb-spotlight-header h2 {
        font-size: 1.25rem !important;
    }

    .hb-final-stats {
        grid-template-columns: 1fr !important;
    }
}
/* =========================================================
   MOBILE FIX: Show current down card again
   ========================================================= */

@media (max-width: 700px) {
    .hb-hand-section {
        display: block !important;
        padding: 8px !important;
        margin-top: 10px !important;
    }

    .hb-hand-zone {
        min-height: 0 !important;
        padding: 10px !important;
        overflow: visible !important;
    }

        .hb-hand-zone .hb-event-tile,
        .hb-hand-zone .hb-current-card {
            width: 100% !important;
            flex: 0 0 100% !important;
            min-width: 0 !important;
            min-height: 150px !important;
            max-height: none !important;
            overflow: visible !important;
            padding: 10px !important;
        }

        .hb-hand-zone .hb-card-topline {
            flex-direction: row !important;
            align-items: flex-start !important;
        }

        .hb-hand-zone .hb-card-label {
            max-width: 68% !important;
            font-size: 0.52rem !important;
            padding: 4px 6px !important;
        }

        .hb-hand-zone .hb-card-date {
            font-size: 0.56rem !important;
            padding: 4px 6px !important;
        }

        .hb-hand-zone .hb-card-title {
            font-size: 0.9rem !important;
            line-height: 1.15 !important;
            overflow: visible !important;
            white-space: normal !important;
            -webkit-line-clamp: unset !important;
        }

        .hb-hand-zone .hb-card-meta {
            font-size: 0.62rem !important;
            line-height: 1.2 !important;
        }
}