.ticket-bar {
    position: fixed;
    right: 0.85rem;
    bottom: 0.85rem;
    left: 0.85rem;
    z-index: 7;
    width: min(calc(100% - 1.7rem), 40.3rem);
    margin: 0 auto;
}

.ticket-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 3.15rem;
    border: 1px solid #c8d3e2;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    background: #ffffff;
    color: #122033;
    text-align: left;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
}

.ticket-toggle span,
.ticket-toggle small {
    color: #66758d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticket-toggle small {
    border-radius: 8px;
    padding: 0.42rem 0.58rem;
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.ticket-bar.open .ticket-toggle small {
    background: #ffffff;
    color: #66758d;
    box-shadow: none;
}

.ticket-toggle:disabled {
    cursor: default;
    opacity: 0.68;
}

.ticket-toggle:disabled small {
    background: #94a3b8;
    color: #ffffff;
    box-shadow: none;
}

.ticket-toggle strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-message {
    position: fixed;
    right: 0.85rem;
    bottom: 4.35rem;
    left: 0.85rem;
    z-index: 5;
    width: min(calc(100% - 1.7rem), 40.3rem);
    margin: 0 auto;
    border: 1px solid #9ccdc8;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    background: #e8f6f3;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 900;
}

.ticket-drawer {
    position: fixed;
    right: 0.85rem;
    bottom: 4.45rem;
    left: 0.85rem;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    width: min(calc(100% - 1.7rem), 30rem);
    max-height: min(72vh, 34rem);
    overflow-y: auto;
    margin: 0 auto;
    border: 3px solid #0f766e;
    border-radius: 12px;
    padding: 0.75rem;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.38), 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.ticket-close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid #cbd7e6;
    border-radius: 6px;
    background: #ffffff;
    color: #526077;
    font-weight: 900;
}

.ticket-list {
    display: grid;
    gap: 0;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.ticket-list .eyebrow {
    padding: 0.55rem 0.65rem 0.35rem;
    background: #ffffff;
}

.ticket-grid-head,
.ticket-selection-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.05fr) minmax(2.7rem, 0.65fr) minmax(4.5rem, 1fr) 1.45rem;
    align-items: center;
    column-gap: 0.4rem;
}

.ticket-selection-two-row {
    display: grid;
    gap: 0.4rem;
    margin: 0.45rem 0.45rem 0;
    border: 1px solid #c9d8e8;
    border-radius: 0.65rem;
    padding: 0.55rem 0.6rem;
    background: #f8fbff;
    box-shadow: 0 1px 2px rgba(15, 35, 58, 0.05);
}

.ticket-leg-row {
    display: grid;
    align-items: end;
    gap: 0.55rem;
    min-width: 0;
}

.ticket-leg-primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 1.35rem;
}

.ticket-leg-secondary {
    grid-template-columns: minmax(3.5rem, 0.55fr) repeat(3, minmax(4.5rem, 1fr));
}

.straight-mode-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    margin: 0.25rem 0 0.35rem;
}

.straight-mode-toolbar button {
    width: 3.35rem;
    min-width: 3.35rem;
    min-height: 2.7rem;
    padding: 0.45rem 0.4rem;
    border: 1px solid #c3d0e2;
    border-radius: 0.55rem;
    background: #f8fafc;
    color: #10233f;
    font: inherit;
    font-weight: 950;
    white-space: nowrap;
}

.straight-mode-toolbar .to-win-button {
    width: 4.8rem;
    min-width: 4.8rem;
}

.straight-mode-toolbar button.active {
    border-color: #11857b;
    background: #11857b;
    color: #fff;
}

.ticket-leg-row > div {
    min-width: 0;
}

.ticket-leg-row span {
    display: block;
    margin: 0 0 0.16rem;
    color: #66758d;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticket-leg-row strong {
    display: block;
    overflow: hidden;
    color: #122033;
    font-size: 0.72rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-selection-two-row .ticket-selection-remove {
    align-self: center;
}

.ticket-grid-head {
    border-top: 1px dashed #d8e1ec;
    border-bottom: 1px dashed #d8e1ec;
    padding: 0.35rem 0.45rem;
    background: #f8fafc;
    color: #66758d;
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticket-grid-head span,
.ticket-selection-grid > div {
    min-width: 0;
}

.ticket-grid-head span:nth-child(3),
.ticket-grid-head span:nth-child(4),
.ticket-selection-grid > div:nth-child(3),
.ticket-selection-grid > div:nth-child(4) {
    text-align: right;
}

.ticket-selection {
    border: 0;
    border-bottom: 1px dashed #d8e1ec;
    border-radius: 0;
    padding: 0.5rem 0.45rem;
    background: #ffffff;
}

.ticket-selection-grid {
    border: 0;
    border-bottom: 1px dashed #d8e1ec;
    border-radius: 0;
    padding: 0.5rem 0.45rem;
    background: #ffffff;
}

.ticket-selection:last-child {
    border-bottom: 0;
}

.ticket-selection strong,
.ticket-selection span,
.ticket-selection small {
    display: block;
}

.ticket-selection strong {
    font-weight: 900;
}

.ticket-selection-grid strong {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    color: #122033;
    font-size: 0.7rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-selection-main {
    min-width: 0;
}

.ticket-selection-main strong {
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-selection span {
    margin-top: 0.15rem;
    color: #66758d;
    font-size: 0.8rem;
    font-weight: 800;
}

.ticket-selection-grid span,
.ticket-selection-grid small {
    margin-top: 0.12rem;
    color: #66758d;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ticket-selection small {
    margin-top: 0.2rem;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 900;
}

.ticket-selection-wager strong {
    color: #334155;
}

.ticket-selection-stake-win strong {
    color: #0f766e;
}

.ticket-selection-stake-win {
    display: grid;
    grid-template-columns: minmax(2.5rem, 1fr) auto;
    align-items: center;
    gap: 0.18rem;
}

.ticket-selection-stake-win input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #8dbab5;
    border-radius: 5px;
    padding: 0.3rem 0.2rem;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.68rem;
    font-weight: 950;
    text-align: center;
}

.ticket-selection-stake-win small {
    margin: 0;
    color: #0f766e;
    font-size: 0.58rem;
    white-space: nowrap;
}

.straight-wager-entry {
    display: grid;
    grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
    align-items: end;
    gap: 0.2rem 0.35rem;
}

.straight-amount-cell,
.straight-calculated-field {
    display: grid;
    align-items: end;
    gap: 0.12rem;
    min-width: 0;
}

.straight-amount-cell input,
.straight-calculated-field input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #8dbab5;
    border-radius: 5px;
    padding: 0.3rem 0.2rem;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 950;
    text-align: center;
}

.straight-calculated-field input {
    border-color: #0f766e;
    background: #e5fbf7;
}

.straight-wager-entry label {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    color: #66758d;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.straight-wager-entry input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #8dbab5;
    border-radius: 5px;
    padding: 0.3rem 0.2rem;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 950;
    text-align: center;
}

.straight-wager-entry .straight-risk-field input {
    border-color: #0f766e;
    background: #e5fbf7;
}


.ticket-point-buy-row {
    display: grid;
    gap: 0.35rem;
    border-bottom: 1px dashed #d8e1ec;
    padding: 0.45rem;
    background: #f8fafc;
}

.ticket-point-buy-row label {
    display: grid;
    grid-template-columns: auto minmax(7rem, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.ticket-point-buy-row label > span {
    color: #66758d;
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticket-point-buy-row select {
    width: 100%;
    min-height: 2rem;
    border: 1px solid #cbd7e6;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    background: #ffffff;
    color: #12233f;
    font-size: 0.7rem;
    font-weight: 850;
}

.ticket-point-buy-row .teaser-point-grid {
    grid-template-columns: repeat(auto-fit, minmax(3.2rem, 1fr));
    gap: 0.3rem;
}

.ticket-point-buy-row .teaser-point {
    min-height: 2rem;
    padding: 0.3rem;
    font-size: 0.65rem;
}

.ticket-selection-remove {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #cbd7e6;
    border-radius: 999px;
    background: #ffffff;
    color: #66758d;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1;
}

.ticket-player-picker {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.5rem;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    padding: 0.65rem;
    background: #f8fafc;
}

.ticket-player-picker label {
    display: grid;
    gap: 0.25rem;
    color: #66758d;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ticket-player-picker input {
    width: 100%;
    border: 1px solid #cbd7e6;
    border-radius: 6px;
    padding: 0.48rem 0.55rem;
    color: #122033;
    font-size: 0.86rem;
    font-weight: 800;
}

.ticket-scan-player,
.ticket-player-list button {
    min-height: 2.25rem;
    border: 1px solid #cbd7e6;
    border-radius: 6px;
    background: #ffffff;
    color: #20304a;
    font-weight: 900;
}

.ticket-scan-player {
    justify-self: start;
    padding: 0 0.8rem;
}

.ticket-player-list {
    display: grid;
    gap: 0.35rem;
    max-height: 10.5rem;
    overflow: auto;
}

.ticket-player-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    text-align: left;
}

.ticket-player-list button:hover,
.ticket-player-list button:focus-visible {
    border-color: #0f766e;
    outline: none;
}

.ticket-player-list strong,
.ticket-player-list small {
    display: block;
}

.ticket-player-list small {
    margin-top: 0.1rem;
    color: #66758d;
    font-size: 0.72rem;
}

.stake-row {
    display: grid;
    grid-template-columns: minmax(4.5rem, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: end;
}

.stake-row.straight-stake-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stake-row label {
    color: #66758d;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.stake-row input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.2rem;
    border: 1px solid #cbd7e6;
    border-radius: 6px;
    padding: 0.45rem 0.35rem;
    color: #122033;
    font-weight: 900;
    text-align: center;
}

.stake-row button {
    min-height: 2.35rem;
    min-width: 0;
    border: 0;
    border-radius: 6px;
    padding: 0 0.85rem;
    background: #0f766e;
    color: #ffffff;
    font-weight: 900;
}

.stake-row .secondary-ticket-action {
    border: 1px solid #cbd7e6;
    background: #ffffff;
    color: #20304a;
}

@media (max-width: 430px) {
    .ticket-drawer {
        right: 0.45rem;
        left: 0.45rem;
        grid-template-columns: minmax(0, 1fr);
        width: calc(100% - 0.9rem);
        padding: 0.65rem;
    }

    .ticket-list {
        gap: 0;
        padding-right: 0;
    }

    .ticket-grid-head,
    .ticket-selection-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) 2.55rem minmax(5.5rem, 1.15fr) 1.25rem;
        column-gap: 0.3rem;
    }

    .ticket-selection-stake-win {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }

    .ticket-selection-stake-win input {
        min-width: 0;
        font-size: 0.72rem;
    }

    .ticket-selection-stake-win small {
        overflow: visible;
        text-align: center;
        white-space: nowrap;
    }

    .ticket-grid-head {
        padding: 0.32rem 0.35rem;
        font-size: 0.5rem;
        letter-spacing: 0.03em;
    }

    .ticket-selection-grid {
        padding: 0.42rem 0.35rem;
    }

    .ticket-selection-team strong {
        font-size: 0.74rem;
    }

    .ticket-selection-grid strong {
        font-size: 0.62rem;
    }

    .ticket-selection-grid span,
    .ticket-selection-grid small {
        font-size: 0.54rem;
    }

    .ticket-selection-remove {
        width: 1.15rem;
        height: 1.15rem;
        font-size: 0.66rem;
    }

    .stake-row {
        grid-template-columns: 4.2rem minmax(0, 1fr) minmax(0, 1fr);
    }

    .stake-row button {
        padding: 0 0.55rem;
    }
}

/* The /mobile page deliberately renders as a phone inside a wide desktop
   browser for product filming. Apply the compact ticket receipt rules to that
   phone canvas even though the outer browser viewport is wider than 430px. */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
    .mobile-web-frame .ticket-list {
        gap: 0;
        min-width: 0;
        padding-right: 0;
    }

    .mobile-web-frame .ticket-grid-head,
    .mobile-web-frame .ticket-selection-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) 2.55rem minmax(5.5rem, 1.15fr) 1.25rem;
        column-gap: 0.3rem;
    }

    .mobile-web-frame .ticket-selection-stake-win {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }

    .mobile-web-frame .ticket-selection-stake-win input {
        min-width: 0;
        font-size: 0.72rem;
    }

    .mobile-web-frame .ticket-selection-stake-win small {
        overflow: visible;
        text-align: center;
        white-space: nowrap;
    }

    .mobile-web-frame .ticket-grid-head {
        padding: 0.32rem 0.35rem;
        font-size: 0.5rem;
        letter-spacing: 0.03em;
    }

    .mobile-web-frame .ticket-selection-grid {
        padding: 0.42rem 0.35rem;
    }

    .mobile-web-frame .ticket-selection-team strong {
        font-size: 0.74rem;
    }

    .mobile-web-frame .ticket-selection-grid strong {
        font-size: 0.62rem;
    }

    .mobile-web-frame .ticket-selection-grid span,
    .mobile-web-frame .ticket-selection-grid small {
        font-size: 0.54rem;
    }

    .mobile-web-frame .ticket-selection-remove {
        width: 1.15rem;
        height: 1.15rem;
        font-size: 0.66rem;
    }

    .mobile-web-frame .stake-row {
        grid-template-columns: 4.2rem minmax(0, 1fr) minmax(0, 1fr);
    }

    .mobile-web-frame .stake-row.straight-stake-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-web-frame .stake-row button {
        padding: 0 0.55rem;
    }
}

.wager-confirm__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wager-confirm__header .eyebrow { margin: 0; }
.wager-confirm__close { display: grid; flex: 0 0 1.9rem; place-items: center; width: 1.9rem; height: 1.9rem; border: 1px solid #cbd7e6; border-radius: 6px; padding: 0; background: #fff; color: #526077; font-size: 0.85rem; font-weight: 900; cursor: pointer; }
.wager-confirm__close:hover { border-color: #b42318; color: #b42318; }
.wager-confirm__selection { display: grid; gap: 0.2rem; border-block: 1px solid #e2e8f0; padding: 0.8rem 0; }
.wager-confirm__selection strong { color: #122033; font-size: 1rem; }
.wager-confirm__selection span { color: #66758d; font-size: 0.82rem; font-weight: 800; }
.wager-confirm__selection small { color: #0f766e; font-size: 0.8rem; font-weight: 900; }
.wager-confirm__actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem; }
.wager-confirm__actions label { color: #66758d; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; }
.wager-confirm__actions input { display: block; width: 100%; height: 2.5rem; margin-top: 0.25rem; border: 1px solid #cbd7e6; border-radius: 6px; padding: 0.45rem 0.6rem; color: #122033; font-weight: 900; }
.wager-confirm__submit { height: 2.5rem; border: 0; border-radius: 6px; padding: 0 1rem; background: #0f766e; color: #fff; font-weight: 900; cursor: pointer; }
