/* ============================================================
   BE THE COURT
   BE SKILLFUL
   Version 1.1
   ============================================================ */


/* ============================================================
   WORDPRESS APP SHELL
   ============================================================ */

html,
body.besk-bethecourt-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #07090a !important;
}

body.besk-bethecourt-page {
    overflow-x: hidden;
}

body.besk-bethecourt-page header,
body.besk-bethecourt-page footer,
body.besk-bethecourt-page .site-header,
body.besk-bethecourt-page .site-footer,
body.besk-bethecourt-page .entry-header,
body.besk-bethecourt-page .page-header,
body.besk-bethecourt-page .entry-title,
body.besk-bethecourt-page .site-title,
body.besk-bethecourt-page .site-branding {
    display: none !important;
}

body.besk-bethecourt-page .site,
body.besk-bethecourt-page .site-content,
body.besk-bethecourt-page .content-area,
body.besk-bethecourt-page .site-main,
body.besk-bethecourt-page article,
body.besk-bethecourt-page .entry-content,
body.besk-bethecourt-page main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.besk-bethecourt-page .entry-content > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* ============================================================
   VARIABLES
   ============================================================ */

#bethecourt-app {

    --btc-orange: #ff6417;
    --btc-orange-light: #ff7c2b;

    --btc-black: #07090a;
    --btc-black-2: #0c0f11;

    --btc-panel: #111517;
    --btc-panel-2: #171c1f;
    --btc-panel-3: #202629;

    --btc-border: #343c40;

    --btc-white: #f8f8f5;
    --btc-gray: #aab1b5;
    --btc-gray-light: #d7dbdd;

    --btc-blue: #159ee4;
    --btc-green: #25a760;
    --btc-red: #d63740;
    --btc-purple: #9149ca;

    min-height: 100vh;
    min-height: 100dvh;

    width: 100%;

    background:
        radial-gradient(
            circle at 50% 110%,
            rgba(255,100,23,.17),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #07090a 0%,
            #0b0e10 100%
        );

    color: var(--btc-white);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* ============================================================
   RESET
   ============================================================ */

#bethecourt-app *,
#bethecourt-app *::before,
#bethecourt-app *::after {
    box-sizing: border-box;
}

#bethecourt-app button,
#bethecourt-app input,
#bethecourt-app select {
    font: inherit;
}

#bethecourt-app button {
    -webkit-tap-highlight-color: transparent;
}

#bethecourt-app img {
    max-width: 100%;
}


/* ============================================================
   APP
   ============================================================ */

.btc-app {
    width: min(100%, 760px);
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0 auto;

    padding:
        max(12px, env(safe-area-inset-top))
        14px
        max(18px, env(safe-area-inset-bottom));
}


/* ============================================================
   LOADING
   ============================================================ */

.btc-loading {
    min-height: 100vh;

    display: grid;
    place-items: center;

    color: white;

    background: #07090a;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-weight: 800;
}


/* ============================================================
   BRAND
   ============================================================ */

.btc-brand {
    text-align: center;

    padding: 4px 0 16px;

    border-bottom:
        1px solid var(--btc-border);

    margin-bottom: 18px;
}

.btc-logo {
    display: block;

    width: min(250px, 67vw);

    max-height: 88px;

    object-fit: contain;

    margin: 0 auto 8px;
}

.btc-brand-title {
    margin: 0;

    font-size:
        clamp(26px, 7vw, 43px);

    line-height: .95;

    letter-spacing: -.045em;

    font-weight: 950;

    font-style: italic;

    text-transform: uppercase;
}

.btc-brand-title span {
    color: var(--btc-orange);
}


/* ============================================================
   SCREEN
   ============================================================ */

.btc-screen {
    animation:
        btc-screen-in .18s ease;
}

@keyframes btc-screen-in {

    from {
        opacity: .2;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.btc-heading {
    margin: 8px 0 17px;

    text-align: center;

    font-size: 17px;

    font-weight: 950;

    letter-spacing: .07em;

    text-transform: uppercase;
}

.btc-subheading {
    margin:
        -7px auto 18px;

    max-width: 540px;

    text-align: center;

    color: var(--btc-gray);

    line-height: 1.45;

    font-size: 14px;
}

.btc-muted {
    color: var(--btc-gray);

    font-size: 13px;

    line-height: 1.45;
}

.btc-center {
    text-align: center;
}


/* ============================================================
   PANELS
   ============================================================ */

.btc-panel {

    background:
        linear-gradient(
            180deg,
            var(--btc-panel-2),
            var(--btc-panel)
        );

    border:
        1px solid var(--btc-border);

    border-radius: 17px;

    padding: 17px;

    margin-bottom: 14px;

    box-shadow:
        0 14px 35px rgba(0,0,0,.2);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btc-button {

    appearance: none;

    border: 0;

    border-radius: 10px;

    min-height: 52px;

    padding: 11px 16px;

    background: var(--btc-panel-3);

    color: var(--btc-white);

    font-weight: 950;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        transform .08s ease,
        opacity .08s ease,
        border-color .08s ease;
}

.btc-button:active {
    transform: scale(.985);
}

.btc-button:disabled {
    opacity: .35;
    cursor: default;
}

.btc-button-primary {

    background:
        linear-gradient(
            180deg,
            var(--btc-orange-light),
            var(--btc-orange)
        );

    color: #090a0b;
}

.btc-button-outline {

    background: transparent;

    border:
        1px solid #50595e;
}

.btc-button-green {
    background: var(--btc-green);
}

.btc-button-red {
    background: #671c22;
}

.btc-button-blue {
    background: var(--btc-blue);
}

.btc-button-wide {
    width: 100%;
}

.btc-button-small {

    min-height: 43px;

    padding: 8px 10px;

    font-size: 11px;
}


/* ============================================================
   FORM
   ============================================================ */

.btc-label {

    display: block;

    margin-bottom: 7px;

    color: var(--btc-gray-light);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: .08em;

    text-transform: uppercase;
}

.btc-input {

    appearance: none;

    width: 100%;

    min-height: 50px;

    border:
        1px solid #4a5357;

    border-radius: 10px;

    padding: 10px 12px;

    background: #090c0e;

    color: white;

    outline: none;
}

.btc-input:focus {
    border-color: var(--btc-orange);
}

.btc-add-player {

    display: grid;

    grid-template-columns:
        minmax(0,1fr) auto;

    gap: 8px;
}


/* ============================================================
   LEVELS
   ============================================================ */

.btc-level-grid {

    display: grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap: 11px;
}

.btc-level {

    min-height: 126px;

    border:
        2px solid #454d51;

    border-radius: 14px;

    background: #111517;

    color: white;

    padding: 16px 10px;

    cursor: pointer;
}

.btc-level.active {

    border-color:
        var(--btc-orange);

    background:
        linear-gradient(
            145deg,
            #ff721f,
            #e94e0d
        );
}

.btc-level-name {

    display: block;

    font-size:
        clamp(20px,5vw,28px);

    font-weight: 950;

    text-transform: uppercase;
}

.btc-level-grade {

    display: block;

    margin-top: 7px;

    font-size: 13px;

    font-weight: 700;
}


/* ============================================================
   CHIPS
   ============================================================ */

.btc-chips {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.btc-chip {

    appearance: none;

    border:
        1px solid #4b5458;

    border-radius: 8px;

    background: #0e1214;

    color: white;

    padding: 9px 12px;

    cursor: pointer;

    font-size: 12px;

    font-weight: 900;

    text-transform: uppercase;
}

.btc-chip.active {

    border-color:
        var(--btc-orange);

    background:
        var(--btc-orange);

    color: #090a0b;
}


/* ============================================================
   PLAYER LIST
   ============================================================ */

.btc-player-list {

    display: grid;

    gap: 7px;

    margin-top: 12px;
}

.btc-player {

    display: grid;

    grid-template-columns:
        34px minmax(0,1fr) 36px;

    align-items: center;

    gap: 8px;

    min-height: 48px;

    padding: 6px 8px;

    background: #0b0e10;

    border:
        1px solid #292f32;

    border-radius: 9px;
}

.btc-player-number {

    color: var(--btc-orange);

    text-align: center;

    font-weight: 950;
}

.btc-player-name {

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-weight: 800;
}

.btc-player-remove {

    appearance: none;

    border: 0;

    background: transparent;

    color: #c2c7c9;

    font-size: 23px;

    cursor: pointer;
}

.btc-error {

    margin-top: 9px;

    color: #ff858d;

    font-size: 13px;
}


/* ============================================================
   RANDOMIZED ORDER
   ============================================================ */

.btc-order {

    display: grid;

    gap: 6px;
}

.btc-order-row {

    display: grid;

    grid-template-columns:
        40px minmax(0,1fr);

    align-items: center;

    gap: 10px;

    padding: 8px 4px;

    border-bottom:
        1px solid #292f32;
}

.btc-order-number {

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        var(--btc-orange);

    color: #08090a;

    font-weight: 950;
}


/* ============================================================
   GAME HEADER
   ============================================================ */

.btc-matchup {

    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        minmax(74px,.65fr)
        minmax(0,1fr);

    align-items: start;

    gap: 7px;

    margin-bottom: 9px;
}

.btc-role {

    min-width: 0;

    text-align: center;
}

.btc-role-tag {

    display: inline-block;

    min-width: 83px;

    padding: 5px 7px;

    border-radius: 6px;

    background: #3b4246;

    color: white;

    font-size: 9px;

    font-weight: 950;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.btc-role-tag.offense {

    background:
        var(--btc-orange);

    color: #08090a;
}

.btc-role-tag.ondeck {
    background: var(--btc-blue);
}

.btc-role-name {

    margin-top: 6px;

    overflow: hidden;

    text-overflow: ellipsis;

    font-size:
        clamp(17px,4.8vw,28px);

    font-weight: 950;

    text-transform: uppercase;
}

.btc-ondeck .btc-role-name {
    font-size: 14px;
}

.btc-role-score {

    margin-top: 3px;

    color: var(--btc-orange);

    font-size: 11px;

    font-weight: 900;
}

.btc-session-meta {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 15px;

    margin:
        0 0 13px;

    color: var(--btc-gray);

    font-size: 11px;
}


/* ============================================================
   PRIVATE REVEAL
   ============================================================ */

.btc-private {

    min-height: 390px;

    display: grid;

    place-items: center;

    text-align: center;
}

.btc-private-lock {

    font-size: 47px;

    margin-bottom: 12px;
}

.btc-private-title {

    margin: 0 0 8px;

    font-size: 28px;

    font-weight: 950;

    text-transform: uppercase;
}

.btc-private-copy {

    max-width: 350px;

    margin:
        0 auto 20px;

    color: #d2d6d8;

    line-height: 1.5;
}


/* ============================================================
   PRESSURE
   ============================================================ */

.btc-pressure {

    min-height: 420px;

    display: grid;

    place-items: center;

    text-align: center;

    border-color: #9d252c;

    background:
        radial-gradient(
            circle,
            rgba(211,39,49,.25),
            transparent 58%
        ),
        linear-gradient(
            180deg,
            #200b0d,
            #0d090a
        );
}

.btc-pressure-label {

    color: #ff424c;

    font-size: 16px;

    font-weight: 950;

    letter-spacing: .16em;
}

.btc-pressure-name {

    margin: 18px 0 10px;

    font-size:
        clamp(36px,9vw,58px);

    line-height: .9;

    font-weight: 950;

    text-transform: uppercase;
}

.btc-pressure-copy {

    max-width: 430px;

    margin:
        0 auto 23px;

    color: #ddd;

    line-height: 1.45;
}


/* ============================================================
   CHALLENGE CARD
   ============================================================ */

.btc-challenge {

    padding: 0;

    overflow: hidden;

    text-align: center;
}

.btc-category {

    padding: 8px;

    background: var(--btc-blue);

    color: white;

    font-size: 12px;

    font-weight: 950;

    letter-spacing: .1em;

    text-transform: uppercase;
}

.btc-category.attack {
    background: #177eb5;
}

.btc-category.create {
    background: var(--btc-purple);
}

.btc-category.finish {
    background: #218861;
}

.btc-category.score {
    background: #c45a1b;
}

.btc-challenge-content {
    padding: 21px 16px 17px;
}

.btc-start-location {

    color: #d7dcde;

    font-size: 17px;

    font-weight: 950;

    text-transform: uppercase;
}

.btc-objective {

    max-width: 620px;

    margin: 8px auto 12px;

    font-size:
        clamp(29px,7.3vw,45px);

    line-height: .98;

    font-weight: 950;

    text-transform: uppercase;
}

.btc-dribbles {

    color: #e1e4e5;

    font-size: 16px;

    font-weight: 900;

    text-transform: uppercase;
}


/* ============================================================
   COURT
   Proportional SVG basketball half court
   ============================================================ */

.btc-court-wrap {
    width: 100%;
    max-width: 560px;
    margin: 24px auto 8px;
}

.btc-court-svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 50 / 42;
    overflow: visible;
    border-radius: 10px;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.22));
}

.btc-court-floor {
    fill: #101619;
    stroke: rgba(255,255,255,.20);
    stroke-width: 2;
}

.btc-court-line {
    fill: none;
    stroke: rgba(255,255,255,.70);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btc-court-detail {
    fill: none;
    stroke: rgba(255,255,255,.38);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
}

.btc-court-dashed {
    stroke-dasharray: 7 7;
}

.btc-court-backboard-svg {
    stroke: rgba(255,255,255,.92);
    stroke-width: 4;
}

.btc-court-rim-svg {
    fill: none;
    stroke: var(--btc-orange);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.btc-court-paint-svg {
    fill: rgba(255,255,255,.015);
}

.btc-start-marker-glow {
    fill: rgba(255,100,23,.12);
    stroke: none;
}

.btc-start-marker-ring {
    fill: rgba(255,100,23,.15);
    stroke: var(--btc-orange);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.btc-start-marker-core {
    fill: var(--btc-orange);
    stroke: #fff;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.btc-court-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: rgba(255,255,255,.62);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.btc-court-key-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--btc-orange);
    box-shadow: 0 0 0 4px rgba(255,100,23,.14);
}


/* ============================================================
   EVOLVE / SPECIAL
   ============================================================ */

.btc-modifier {

    margin-top: 17px;

    padding-top: 15px;

    border-top:
        1px solid #394145;
}

.btc-modifier-label {

    color: var(--btc-blue);

    font-size: 11px;

    font-weight: 950;

    letter-spacing: .13em;
}

.btc-modifier-name {

    margin-top: 4px;

    font-size: 23px;

    font-weight: 950;

    text-transform: uppercase;
}

.btc-modifier-rule {

    max-width: 510px;

    margin:
        8px auto 0;

    color: #cbd0d2;

    font-size: 13px;

    line-height: 1.45;
}


/* ============================================================
   READY
   ============================================================ */

.btc-ready {

    min-height: 470px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;
}

.btc-ready-word {

    color: var(--btc-orange);

    font-size:
        clamp(65px,18vw,112px);

    line-height: .86;

    font-weight: 950;
}


/* ============================================================
   CLOCK
   ============================================================ */

.btc-clock-screen {

    min-height: 480px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;
}

.btc-clock {

    color: var(--btc-orange);

    font-size:
        clamp(155px,48vw,310px);

    line-height: .8;

    letter-spacing: -.08em;

    font-weight: 950;
}

.btc-clock.danger {
    color: #ff3843;
}

.btc-play-label {

    margin-top: 26px;

    font-size: 38px;

    font-weight: 950;

    text-transform: uppercase;
}


/* ============================================================
   RESULTS
   ============================================================ */

.btc-result-grid {

    display: grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap: 9px;
}

.btc-result-grid button {
    min-height: 67px;
}

.btc-result-grid .success,
.btc-result-grid .full {
    grid-column: 1 / -1;
}


/* ============================================================
   TABLE
   ============================================================ */

.btc-table {

    width: 100%;

    border-collapse: collapse;
}

.btc-table th,
.btc-table td {

    padding: 10px 7px;

    border-bottom:
        1px solid #2c3336;

    text-align: left;
}

.btc-table th {

    color: var(--btc-gray);

    font-size: 10px;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.btc-rank {

    width: 40px;

    color: var(--btc-orange);

    font-weight: 950;
}

.btc-points {

    text-align: right !important;

    font-weight: 950;
}


/* ============================================================
   ROTATION EDITOR
   ============================================================ */

.btc-rotation-row {

    display: grid;

    grid-template-columns:
        35px minmax(0,1fr) auto;

    align-items: center;

    gap: 7px;

    padding: 8px 0;

    border-bottom:
        1px solid #2b3235;
}

.btc-rotation-actions {

    display: flex;

    gap: 4px;
}

.btc-icon-button {

    appearance: none;

    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    border:
        1px solid #444d51;

    border-radius: 7px;

    background: #111517;

    color: white;

    cursor: pointer;
}


/* ============================================================
   FOOTER CONTROLS
   ============================================================ */

.btc-game-controls {

    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 7px;

    margin-top: 13px;
}


/* ============================================================
   SESSION COMPLETE
   ============================================================ */

.btc-winner {

    font-size: 25px;

    font-weight: 950;

    color: var(--btc-orange);
}


/* ============================================================
   PRIVACY
   ============================================================ */

.btc-privacy {

    margin-top: 13px;

    text-align: center;

    color: #7f888c;

    font-size: 10px;

    line-height: 1.4;
}

/* ============================================================
   MOBILE
   Dedicated courtside phone layout
   ============================================================ */

@media (max-width: 560px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    #bethecourt-app {
        width: 100%;
        max-width: 100%;
    }

    .btc-app {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        padding:
            max(10px, env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            max(18px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
        overflow-x: hidden;
    }

    .btc-screen {
        width: 100%;
        max-width: 100%;
    }

    .btc-brand {
        margin-bottom: 15px;
    }

    .btc-logo {
        width: min(225px, 68vw);
        max-width: 100%;
    }

    .btc-brand-title {
        font-size: clamp(30px, 9vw, 39px);
        line-height: .98;
        letter-spacing: -1px;
    }

    .btc-heading {
        font-size: clamp(22px, 7vw, 30px);
        line-height: 1.05;
    }

    .btc-subheading {
        font-size: 12px;
        line-height: 1.45;
    }

    .btc-panel {
        width: 100%;
        padding: 14px;
        border-radius: 12px;
    }

    .btc-label {
        font-size: 11px;
        letter-spacing: 1px;
    }

    /* Grade selection is now the primary level label. */
    .btc-level-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btc-level {
        min-height: 78px;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        touch-action: manipulation;
    }

    .btc-level-name,
    .btc-grade-only {
        display: block;
        width: 100%;
        font-size: clamp(24px, 7.5vw, 32px);
        line-height: 1;
        font-weight: 950;
        letter-spacing: .25px;
    }

    .btc-level-grade {
        font-size: 18px;
    }

    /* Inputs and setup controls need to be comfortable thumb targets. */
    .btc-input,
    .btc-add-player,
    .btc-button,
    .btc-category,
    .btc-chip {
        min-height: 46px;
        touch-action: manipulation;
    }

    .btc-input {
        font-size: 16px;
    }

    .btc-add-player,
    .btc-button {
        font-size: 13px;
    }

    .btc-chips {
        gap: 7px;
    }

    .btc-chip,
    .btc-category {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Keep matchup information readable without forcing names into tiny columns. */
    .btc-matchup {
        grid-template-columns:
            minmax(0, 1fr)
            72px
            minmax(0, 1fr);
        gap: 6px;
    }

    .btc-role {
        min-width: 0;
        padding-left: 6px;
        padding-right: 6px;
    }

    .btc-role-name {
        max-width: 100%;
        font-size: clamp(17px, 5.2vw, 22px);
        line-height: 1.05;
        overflow-wrap: anywhere;
    }

    .btc-ondeck .btc-role-name {
        font-size: clamp(11px, 3.4vw, 14px);
    }

    .btc-role-tag {
        min-width: 0;
        width: 100%;
        max-width: 76px;
        padding-left: 4px;
        padding-right: 4px;
        font-size: 8px;
    }

    .btc-role-score {
        font-size: 12px;
    }

    /* Private reveal and challenge are the focus during live training. */
    .btc-private,
    .btc-challenge,
    .btc-ready,
    .btc-clock-screen {
        width: 100%;
        max-width: 100%;
    }

    .btc-private {
        padding: 18px 14px;
    }

    .btc-private-title {
        font-size: clamp(22px, 7vw, 30px);
        line-height: 1.05;
    }

    .btc-private-copy {
        font-size: 13px;
        line-height: 1.45;
    }

    .btc-challenge {
        padding: 14px;
    }

    .btc-challenge-content {
        width: 100%;
        max-width: 100%;
    }

    .btc-objective {
        font-size: clamp(21px, 6.5vw, 28px);
        line-height: 1.08;
    }

    .btc-start-location,
    .btc-dribbles {
        font-size: 13px;
    }

    .btc-modifier,
    .btc-pressure {
        padding: 12px;
    }

    .btc-modifier-name,
    .btc-pressure-name {
        font-size: 17px;
    }

    .btc-modifier-rule,
    .btc-pressure-copy {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Preserve true court proportions and use nearly the full phone width. */
    .btc-court-wrap {
        width: calc(100% + 8px);
        max-width: none;
        margin: 16px -4px 0;
    }

    .btc-court-svg {
        display: block;
        width: 100%;
        height: auto;
        max-height: 52dvh;
        border-radius: 8px;
    }

    .btc-court-line {
        stroke-width: 1.75;
    }

    .btc-court-detail {
        stroke-width: 1.25;
    }

    .btc-court-caption {
        margin-top: 7px;
        font-size: 10px;
        line-height: 1.25;
        letter-spacing: .8px;
    }

    /* Live clock should be glanceable from arm's length. */
    .btc-clock {
        font-size: clamp(66px, 23vw, 104px);
        line-height: .9;
    }

    .btc-ready-word {
        font-size: clamp(44px, 15vw, 72px);
        line-height: .95;
    }

    /* Possession result buttons become large stacked targets. */
    .btc-result-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .btc-result-grid .success,
    .btc-result-grid .full {
        grid-column: auto;
    }

    .btc-result-grid .btc-button,
    .btc-button-wide {
        width: 100%;
        min-height: 52px;
        font-size: 14px;
    }

    /* Rotation and player-order controls remain usable with thumbs. */
    .btc-order-row,
    .btc-rotation-row {
        min-height: 48px;
    }

    .btc-icon-button {
        width: 42px;
        height: 42px;
        min-width: 42px;
        touch-action: manipulation;
    }

    .btc-player-remove {
        min-width: 40px;
        min-height: 40px;
    }

    /* Footer controls stay compact but are still proper tap targets. */
    .btc-game-controls {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .btc-game-controls .btc-button-small {
        width: 100%;
        min-height: 44px;
        font-size: 11px;
    }

    .btc-session-meta {
        gap: 6px;
        font-size: 10px;
    }

    .btc-table {
        font-size: 12px;
    }

    .btc-winner {
        font-size: clamp(25px, 8vw, 34px);
    }

    .btc-privacy {
        margin-top: 12px;
        padding-bottom: max(2px, env(safe-area-inset-bottom));
        font-size: 10px;
    }
}


/* ============================================================
   VERY SMALL PHONES
   ============================================================ */

@media (max-width: 380px) {

    .btc-app {
        padding-left: 8px;
        padding-right: 8px;
    }

    .btc-panel {
        padding: 12px;
    }

    .btc-brand-title {
        font-size: 29px;
    }

    .btc-level {
        min-height: 72px;
    }

    .btc-level-name,
    .btc-grade-only {
        font-size: 25px;
    }

    .btc-matchup {
        grid-template-columns:
            minmax(0, 1fr)
            62px
            minmax(0, 1fr);
        gap: 4px;
    }

    .btc-role-name {
        font-size: 16px;
    }

    .btc-ondeck .btc-role-name {
        font-size: 11px;
    }

    .btc-role-tag {
        font-size: 7px;
    }

    .btc-objective {
        font-size: 21px;
    }

    .btc-clock {
        font-size: 72px;
    }

    .btc-button-small {
        font-size: 10px;
    }
}

/* ============================================================
   MOBILE LIVE GAME - COMPACT SINGLE-SCREEN PASS
   Keeps setup comfortable; reclaims vertical space during play.
   ============================================================ */

@media (max-width: 560px) {

    /* Compact the persistent app branding. */
    .btc-brand {
        padding-top: 1px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .btc-brand-title {
        font-size: clamp(24px, 7vw, 30px);
        line-height: .95;
    }

    /* Tighten the matchup/status strip without sacrificing names. */
    .btc-matchup {
        margin-top: 4px;
        margin-bottom: 5px;
    }

    .btc-role {
        padding-top: 7px;
        padding-bottom: 6px;
    }

    .btc-role-tag {
        min-height: 30px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .btc-role-name {
        margin-top: 6px;
        margin-bottom: 3px;
    }

    .btc-role-score {
        margin-top: 2px;
    }

    .btc-session-meta {
        margin-top: 6px;
        margin-bottom: 7px;
        line-height: 1.15;
    }

    /* Reduce challenge-panel whitespace. */
    .btc-panel.btc-challenge {
        padding: 11px 12px 12px;
    }

    .btc-challenge .btc-category {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .btc-challenge-content {
        gap: 7px;
    }

    .btc-start-location {
        margin-top: 3px;
        margin-bottom: 4px;
        font-size: 16px;
        line-height: 1.05;
    }

    .btc-objective {
        margin-top: 4px;
        margin-bottom: 5px;
        font-size: clamp(24px, 7.2vw, 32px);
        line-height: 1.02;
    }

    .btc-dribbles {
        margin-top: 4px;
        margin-bottom: 6px;
        font-size: 16px;
        line-height: 1.05;
    }

    /* Slightly reduce the court footprint while preserving its 500:420 ratio. */
    .btc-court-wrap {
        width: 94%;
        margin: 8px auto 0;
    }

    .btc-court-svg {
        width: 100%;
        height: auto;
        max-height: 45dvh;
    }

    /* Preserve a large, easy courtside action target. */
    .btc-challenge .btc-button,
    .btc-challenge .btc-button-wide {
        min-height: 54px;
        margin-top: 9px;
        margin-bottom: 0;
    }
}


/* Extra vertical compression for shorter phone viewports,
   including browsers with large top/bottom chrome. */
@media (max-width: 560px) and (max-height: 800px) {

    .btc-brand {
        padding-bottom: 5px;
        margin-bottom: 7px;
    }

    .btc-brand-title {
        font-size: 23px;
    }

    .btc-role {
        padding-top: 5px;
        padding-bottom: 4px;
    }

    .btc-role-name {
        font-size: 16px;
    }

    .btc-session-meta {
        margin-top: 4px;
        margin-bottom: 5px;
    }

    .btc-panel.btc-challenge {
        padding-top: 9px;
    }

    .btc-challenge .btc-category {
        min-height: 38px;
        margin-bottom: 7px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .btc-start-location {
        font-size: 15px;
        margin-bottom: 3px;
    }

    .btc-objective {
        font-size: clamp(22px, 6.8vw, 29px);
        margin-top: 2px;
        margin-bottom: 3px;
    }

    .btc-dribbles {
        font-size: 15px;
        margin-top: 2px;
        margin-bottom: 4px;
    }

    .btc-court-wrap {
        width: 90%;
        margin-top: 6px;
    }

    .btc-court-svg {
        max-height: 42dvh;
    }
}
/* ============================================================
   VERSION 2.0 - LIVE GAME READABILITY
   ============================================================ */

.btc-challenge-clock {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin: 0 auto 8px;
    font-size: clamp(42px, 10vw, 64px);
    line-height: .9;
    font-weight: 1000;
    letter-spacing: -2px;
    color: #f59a23;
}

.btc-challenge-clock span {
    font-size: .28em;
    letter-spacing: .06em;
}

.btc-challenge-clock.danger {
    transform: scale(1.04);
}

.btc-pressure-inline,
.btc-called-shot {
    margin: 5px auto 2px;
    padding: 7px 10px;
    border: 1px solid rgba(245,154,35,.65);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 950;
    text-transform: uppercase;
}

.btc-pressure-inline span {
    display: inline-block;
    margin-left: 7px;
    color: #f59a23;
}

.btc-pressure-bonus {
    margin: 10px auto 0;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 1000;
    text-align: center;
    text-transform: uppercase;
    color: #f59a23;
    border: 1px solid rgba(245,154,35,.7);
}

.btc-evolve-announcement {
    color: #fff;
}

.btc-evolve-bonus {
    width: 100%;
    margin: 7px auto 3px;
    padding: 9px 10px;
    border: 2px solid #f59a23;
    border-radius: 10px;
    text-align: center;
}

.btc-evolve-bonus-label {
    font-size: 13px;
    line-height: 1;
    font-weight: 1000;
    letter-spacing: .04em;
    color: #f59a23;
}

.btc-evolve-bonus-name {
    margin-top: 5px;
    font-size: clamp(20px, 5.5vw, 28px);
    line-height: 1;
    font-weight: 1000;
    text-transform: uppercase;
}

.btc-evolve-bonus-rule {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 750;
}

.btc-live-challenge .btc-court-wrap,
.btc-challenge .btc-court-wrap {
    width: min(82%, 350px);
    margin-top: 5px;
}

.btc-live-challenge .btc-objective,
.btc-challenge .btc-objective {
    text-transform: uppercase;
}

@media (max-width: 560px) {
    .btc-challenge-clock {
        font-size: 40px;
        margin-bottom: 5px;
    }

    .btc-panel.btc-challenge {
        padding: 8px 10px 9px;
    }

    .btc-challenge .btc-category {
        min-height: 32px;
        padding-top: 6px;
        padding-bottom: 6px;
        margin-bottom: 5px;
    }

    .btc-challenge-content {
        gap: 4px;
    }

    .btc-start-location {
        margin: 1px 0 2px;
        font-size: 14px;
    }

    .btc-objective {
        margin: 2px 0;
        font-size: clamp(21px, 6.3vw, 28px);
        line-height: 1;
    }

    .btc-dribbles {
        margin: 2px 0 3px;
        font-size: 15px;
    }

    .btc-evolve-bonus {
        margin: 4px auto 2px;
        padding: 7px 8px;
    }

    .btc-evolve-bonus-label {
        font-size: 12px;
    }

    .btc-evolve-bonus-name {
        margin-top: 4px;
        font-size: 20px;
    }

    .btc-evolve-bonus-rule {
        margin-top: 3px;
        font-size: 12px;
    }

    .btc-pressure-inline,
    .btc-called-shot {
        margin-top: 3px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .btc-live-challenge .btc-court-wrap,
    .btc-challenge .btc-court-wrap {
        width: min(72%, 300px);
        margin-top: 4px;
    }

    #btc-got-it,
    #btc-possession-over {
        min-height: 50px;
        margin-top: 6px !important;
    }
}
