/* ============================================================
   Play/Queue Page - Mobile Responsive Styles
   CCE Platform
   Two breakpoints: Tablet (≤1024px) and Mobile (≤600px)
   ============================================================ */

/* ============ Global Play Page Mobile Fixes ============ */
.play-page {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .public-main-content .play-page {
        padding-top: calc(0.5rem + 39px);
    }
}

@media (max-width: 600px) {
    .public-main-content .play-page {
        padding-top: calc(0.25rem + 39px);
    }
}

@media (max-width: 480px) {
    .public-main-content .play-page {
        padding-top: calc(0.25rem + 16px);
    }
}

@media (max-width: 360px) {
    .public-main-content .play-page {
        padding-top: calc(0.25rem + 12px);
    }
}

/* ==========================================================================
   Tablet (≤1024px)
   Layout shifts: single-column promo strip, hide rank & teammate slots,
   stack team formation, reposition queue stats, simplify modals.
   ========================================================================== */
@media (max-width: 1024px) {

    /* Hide scoring info tooltips on tablet and mobile */
    .play-scoring-info-container,
    .play-points-info-container,
    .promo-info-links-row {
        display: none !important;
    }

    .play-match-howto-link {
        font-size: 0.68rem;
    }

    .play-match-howto-icon {
        width: 16px;
        height: 16px;
        font-size: 0.58rem;
    }

    .play-tools-flyout--howto {
        width: min(920px, calc(100vw - 26px));
    }

    .play-howto-steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* ===== Promo Strip - two boxes side by side ===== */
    .promo-strip {
        grid-template-columns: 1fr 1fr;
        max-width: none;
        width: 100%;
        gap: 0.6rem;
        margin-bottom: 0.75rem;
        padding: 0 0.25rem;
    }

    /* Play page container */
    .play-page {
        padding: 0.5rem var(--space-sm) var(--space-md) var(--space-sm);
    }

    /* ===== Prioritize rank progress in two-card promo layouts ===== */
    .promo-box.rank-progress-box {
        display: flex !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        display: grid !important;
    }

    .promo-box.prize-pool-box {
        display: flex !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        display: grid !important;
    }

    .promo-box.prize-pool-box {
        display: none !important;
    }

    /* Keep lobby-band tier icons readable on mobile/tablet.
       Base mobile icon size is 16px, so 32px is a true 2x increase. */
    .promo-strip .map-comms-promo .rank-ladder-chip {
        width: 44px;
        height: 44px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip img {
        width: 32px;
        height: 32px;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment {
        margin-inline: -16px;
    }

    /* Slide nav dots */
    .promo-slide-nav {
        bottom: 0.28rem;
        right: 0.5rem;
        gap: 0.22rem;
    }

    .promo-slide-dot {
        width: 4px;
        height: 4px;
    }

    .promo-slide-dot.is-active {
        width: 13px;
        border-radius: 2px;
    }

    /* ===== Hide Solo Teammate Slots ===== */
    .teammate-slot {
        display: none !important;
    }

    /* Party teammate cards must remain visible on tablet/mobile. */
    .teammate-slot.party-slot.filled {
        display: flex !important;
        width: 208px;
        min-height: 256px;
        height: auto;
        flex: 0 0 auto;
        opacity: 1;
        border: 0;
        background: transparent;
    }

    .teammate-slot.party-slot.filled .party-teammate-card {
        width: 208px;
        min-height: 256px;
        margin: 0 auto 0.5rem;
    }

    /* Keep party controls usable when empty invite cards are hidden/collapsed. */
    .party-controls {
        align-self: center;
        justify-content: center;
        width: min(540px, 100%);
        max-width: calc(100% - 1rem);
        margin: 0 auto 0.75rem;
        gap: 0.45rem;
    }

    .party-controls .party-help {
        flex: 1 1 auto;
        max-width: 100%;
        text-align: center;
    }

    .party-controls .party-control-btn {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }

    .party-controls .party-invite-control-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 100%;
        min-height: 42px;
        font-family: 'Apex', sans-serif;
        font-size: 0.78rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        background: linear-gradient(135deg, rgba(244, 1, 43, 0.9), rgba(164, 0, 28, 0.92));
        border-color: rgba(255, 80, 100, 0.55);
        box-shadow: 0 8px 20px rgba(244, 1, 43, 0.22);
    }

    .party-controls .party-mobile-invite-control-btn,
    .party-controls .party-mobile-only-control-btn {
        display: none;
    }

    .promo-box {
        padding: 0.6rem 0.9rem;
        border-radius: 10px;
        min-height: 52px;
    }

    .map-comms-promo .promo-slide {
        border-radius: inherit;
    }

    .map-info-overlay {
        min-height: 52px;
        padding: 0.25rem 0.5rem 1.05rem;
    }

    .info-kicker {
        font-size: 0.52rem;
        letter-spacing: 0.7px;
    }

    .info-title {
        font-size: 0.76rem;
        letter-spacing: 0.7px;
    }

    .map-panel {
        margin-left: -13px;
        clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    }

    .map-panel:first-child {
        clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    }

    .map-panel:last-child {
        clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
    }

    .map-panel:only-child {
        margin-left: 0;
        clip-path: none;
    }

    .map-panel-name {
        bottom: 0.32rem;
        font-size: 0.46rem;
        letter-spacing: 0.35px;
    }

    .teammate-prefs-slide {
        gap: 0.45rem;
        padding: 0.45rem 0.7rem;
    }

    .prefs-icon-stack {
        grid-template-columns: 28px 26px;
        gap: 0.28rem;
        align-items: center;
    }

    .prefs-icon {
        border-radius: 50%;
    }

    .prefs-icon:first-child {
        width: 28px;
        height: 28px;
    }

    .prefs-icon:last-child {
        width: 26px;
        height: 26px;
    }

    .prefs-icon:first-child i {
        font-size: 0.7rem;
    }

    /* ── Teammate Preferences Controls Slide ── */
    .teammate-prefs-controls-slide {
        padding: 0.3rem 0.55rem;
        gap: 0.18rem;
    }

    .prefs-controls-row {
        gap: 0.4rem;
    }

    .prefs-switch-group {
        gap: 0.2rem;
    }

    .prefs-switch-label {
        font-size: 0.44rem;
    }

    .prefs-switch-toggle {
        width: 34px;
        height: 18px;
        border-radius: 9px;
    }

    .prefs-switch-thumb {
        width: 14px;
        height: 14px;
    }

    .prefs-switch-toggle.is-on .prefs-switch-thumb {
        transform: translateX(16px);
    }

    .prefs-strikes {
        gap: 0.18rem;
        padding-top: 0.12rem;
        min-height: 20px;
    }

    .prefs-strikes-label {
        font-size: 0.4rem;
    }

    .prefs-strike-dot {
        width: 8px;
        height: 8px;
        font-size: 0.22rem;
    }

    .prefs-strikes-info {
        width: 14px;
        height: 14px;
        font-size: 0.48rem;
    }

    .prefs-locked-overlay i {
        font-size: 0.6rem;
    }

    .prefs-locked-text {
        font-size: 0.42rem;
        letter-spacing: 0.5px;
    }

    .lang-flag-inline {
        width: 11px;
        height: 11px;
    }

    .teammate-prefs-controls-slide .rank-ladder-season-label {
        position: static;
        left: auto;
        max-width: 100%;
        text-align: center;
        margin-bottom: 0.06rem;
        margin-top: -0.08rem;
    }

    .prefs-switch-thumb {
        transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .prefs-copy .info-title {
        font-size: 0.64rem;
    }

    .prefs-copy p {
        margin-top: 0.18rem;
        font-size: 0.56rem;
        line-height: 1.2;
    }

    .legend-ban-reminder-slide {
        gap: 0.35rem 0.45rem;
        padding: 0.45rem 0.6rem;
    }

    .legend-ban-copy .info-title {
        font-size: 0.64rem;
    }

    .legend-ban-copy p {
        margin-top: 0.18rem;
        font-size: 0.54rem;
    }

    .legend-ban-preview {
        gap: 0.25rem;
        min-width: 72px;
    }

    .legend-ban-chip {
        width: 34px;
        height: 38px;
        border-radius: 8px;
    }

    .legend-ban-chip span {
        font-size: 0.34rem;
    }

    .legend-ban-empty-mark {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .legend-ban-promo-cta {
        min-height: 20px;
        font-size: 0.48rem;
    }

    /* ===== Premium Promo - horizontal row so Manage fits inline ===== */
    .promo-box.premium-promo {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.6rem;
        padding: 0.6rem 0.9rem;
    }

    .promo-box.premium-promo .promo-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .promo-box.premium-promo .promo-icon i {
        font-size: 0.85rem;
    }

    .promo-box.premium-promo .promo-content {
        flex: 1;
        min-width: 0;
    }

    .promo-box.premium-promo .promo-title {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        margin: 0;
        white-space: nowrap;
    }

    .promo-box.premium-promo .promo-subtitle {
        font-size: 0.6rem;
        color: rgba(255, 255, 255, 0.5);
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .upgrade-btn-mini {
        padding: 0.28rem 0.6rem;
        font-size: 0.6rem;
        border-radius: 5px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ===== Prize Pool - grid: title row, then [Standard] [$amount] [Premium] ===== */
    .promo-box.prize-pool-box {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        padding: 0.6rem 0.9rem;
        gap: 0.1rem 0.4rem;
        text-align: center;
    }

    .promo-box.prize-pool-box.promo-slider-box {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .promo-slider-box .promo-slide {
        grid-column: 1;
        grid-row: 1;
    }

    .promo-slider-box .promo-slide-prize {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        gap: 0.1rem 0.4rem;
        text-align: center;
    }

    .promo-slider-box .promo-slide-prize.prize-modern-slide {
        display: flex;
        align-items: stretch;
        justify-items: stretch;
        gap: 0.35rem;
        text-align: left;
        padding: 0;
    }

    .prize-modern-header {
        gap: 0.35rem;
    }

    .prize-modern-kicker {
        font-size: 0.52rem;
        letter-spacing: 0.55px;
    }

    .prize-modern-active {
        font-size: 0.45rem;
    }

    .prize-modern-grid {
        gap: 0.35rem;
    }

    .prize-modern-grid--single {
        grid-template-columns: minmax(0, 1fr);
    }

    .prize-modern-tile {
        min-height: 44px;
        padding: 0.42rem 0.45rem;
        gap: 0.12rem 0.32rem;
        border-radius: 8px;
    }

    .prize-modern-tile.premium-only {
        min-height: 54px;
        padding: 0.46rem 0.6rem;
        gap: 0.12rem 0.45rem;
    }

    .prize-modern-icon {
        width: 24px;
        height: 24px;
        border-radius: 7px;
        font-size: 0.68rem;
    }

    .prize-modern-tile.premium-only .prize-modern-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .prize-modern-label {
        font-size: 0.45rem;
        letter-spacing: 0.4px;
    }

    .prize-modern-amount {
        font-size: 0.88rem;
    }

    .prize-modern-tile.premium-only .prize-modern-amount {
        font-size: 1rem;
    }

    .promo-slide-premium {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.6rem;
    }

    .promo-slide-premium .promo-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .promo-slide-premium .promo-icon i {
        font-size: 0.85rem;
    }

    .promo-slide-premium .promo-content {
        flex: 1;
        min-width: 0;
    }

    .promo-slide-premium .promo-title {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        margin: 0;
        white-space: nowrap;
    }

    .promo-slide-premium .promo-subtitle {
        font-size: 0.6rem;
        color: rgba(255, 255, 255, 0.5);
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .promo-slide-shareplay {
        gap: 0.55rem;
        padding: 0.15rem 0.1rem;
    }

    .shareplay-promo-logo-wrap {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .shareplay-promo-logo {
        width: 25px;
        height: 25px;
        border-radius: 7px;
    }

    .shareplay-promo-eyebrow {
        display: none;
    }

    .shareplay-promo-title {
        margin-bottom: 0.12rem;
        font-size: 0.7rem;
        letter-spacing: 0.45px;
    }

    .shareplay-promo-subtitle {
        max-width: 100%;
        font-size: 0.56rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shareplay-promo-cta {
        padding: 0.3rem 0.48rem;
        border-radius: 7px;
        font-size: 0.5rem;
    }

    /* Row 1: "Weekly Prize Pool" - spans full width */
    .prize-pool-box .prize-header {
        grid-column: 1 / -1;
        grid-row: 1;
        font-family: 'URW Dock', sans-serif;
        font-size: 0.65rem;
        gap: 0;
        letter-spacing: 1.5px;
        white-space: nowrap;
        margin-bottom: 0.2rem;
        justify-content: center;
        font-weight: 700;
        line-height: 1;
        text-align: center;
    }

    .prize-pool-box .prize-header i {
        display: none;
    }

    /* Collapse the <br> so it renders on one line */
    .prize-pool-box .prize-header span {
        display: inline;
    }

    .prize-pool-box .prize-header span br {
        display: none;
    }

    /* Row 2 center: Dollar amount */
    .prize-pool-box .prize-amount {
        grid-column: 2;
        grid-row: 2;
        font-size: 1.3rem;
        margin: 0;
        line-height: 1;
    }

    /* Unwrap switches so children participate in the grid */
    .prize-pool-box .prize-pool-switches {
        display: contents;
    }

    /* Row 2 left: Standard button */
    .prize-pool-box .prize-switch-group.free-group {
        grid-column: 1;
        grid-row: 2;
    }

    /* Row 2 right: Premium button */
    .prize-pool-box .prize-switch-group.premium-group {
        grid-column: 3;
        grid-row: 2;
    }

    .prize-switch-group {
        border: none;
        border-radius: 4px;
        overflow: visible;
    }

    .prize-switch-group.free-group,
    .prize-switch-group.premium-group {
        border: none;
        box-shadow: none;
    }

    .prize-switch-group.free-group.active {
        border: none;
        box-shadow: none;
    }

    .prize-switch-group.premium-group.active {
        border: none;
        box-shadow: none;
    }

    /* Compact pill buttons with labels */
    .prize-switch-btn {
        min-width: unset;
        padding: 0.3rem 0.5rem;
        height: auto;
        font-size: 0.5rem;
        gap: 0.25rem;
        border-radius: 5px;
        font-weight: 700;
        line-height: 1;
    }

    .prize-switch-btn i {
        font-size: 0.5rem;
    }

    /* Show label text on tablet since we have more vertical space */
    .switch-label {
        display: inline;
    }

    /* Free pill — green */
    .prize-switch-btn.free {
        background: rgba(76, 175, 80, 0.12);
        color: rgba(76, 175, 80, 0.5);
    }

    .prize-switch-btn.free.active {
        background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
        color: #fff;
    }

    .prize-switch-btn.free.active i {
        color: #fff;
    }

    /* Premium pill — yellow */
    .prize-switch-btn.premium {
        background: rgba(255, 215, 0, 0.12);
        color: rgba(255, 215, 0, 0.5);
    }

    .prize-switch-btn.premium.active {
        background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
        color: #000;
    }

    .prize-switch-btn.premium.active i {
        color: #000;
        filter: none;
    }


    .promo-separator {
        margin: 15px auto;
    }

    /* ===== Team Formation - Player card only ===== */
    .team-formation {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        align-items: center;
        width: 300px;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Player card - fixed desktop dimensions */
    .player-card-main {
        width: 208px !important;
        max-width: 208px;
        height: 256px;
        min-height: auto;
        margin: 0 auto;
        margin-bottom: 0.5rem;
        overflow: visible;          /* allow tooltip to escape */
    }

    /* Clip the glow effect instead of the whole card */
    .player-card-glow {
        overflow: hidden;
    }

    /* ===== Player Card Styling ===== */
    .player-avatar {
        overflow: hidden;
    }

    .player-avatar img,
    .player-avatar .avatar-placeholder {
        width: 96px;
        height: 96px;
        min-width: 96px;
        min-height: 100%;
    }

    /* Premium badge — tight top-right corner */
    .premium-badge-card.premium-badge-corner {
        top: 6px;
        right: 6px;
    }

    /* Comms toggle (mic) — tight top-left corner */
    .comms-toggle-btn {
        top: 6px;
        left: 6px;
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .comms-language-selector {
        top: 6px;
        left: 40px;
    }

    .lang-toggle-btn {
        width: 28px;
        height: 28px;
    }

    /* Tooltip — pop above the button instead of to the right */
    .comms-toggle-btn::after {
        left: 50%;
        top: auto;
        bottom: calc(100% + 8px);
        transform: translateX(-50%) translateY(4px);
    }

    .comms-toggle-btn:hover::after {
        transform: translateX(-50%) translateY(0);
    }

    .player-name {
        font-size: 1.25rem;
    }

    .player-apex-name {
        font-size: 0.85rem;
    }

    .player-tags {
        gap: 0.3rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tag {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    /* ===== Bottom Stats Wrapper — floating bottom-right ===== */
    .bottom-stats-wrapper {
        bottom: var(--space-sm, 0.5rem);
        right: var(--space-sm, 0.5rem);
        max-width: calc(100% - 1rem);
        gap: 6px;
    }

    .queue-stats-panel {
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
    }

    .legend-ban-prefs-floating {
        padding: 0.4rem 0.75rem;
    }

    .queue-stat-item {
        min-width: auto;
        padding: 0.35rem 0.5rem;
    }

    /* ===== Queue Button - Fixed desktop dimensions ===== */
    .queue-btn {
        width: 208px;
        max-width: 208px;
        height: 66px;
        margin: 0 auto;
    }

    .queue-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 var(--space-sm);
    }

    /* ===== Team Cards Grid ===== */
    .team-cards {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .team-card {
        max-width: 100%;
    }

    /* ===== Match Main Area ===== */
    .match-main-area {
        padding: var(--space-md);
    }

    /* ===== Not Eligible State ===== */
    .play-not-eligible {
        min-height: 50vh;
        padding: var(--space-md);
    }

    .not-eligible-icon {
        width: 60px;
        height: 60px;
    }

    .not-eligible-icon i {
        font-size: 1.5rem;
    }

    .not-eligible-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .not-eligible-subtitle {
        font-size: 0.9rem;
    }

    .requirement-list {
        width: 100%;
        max-width: 100%;
    }

    .requirement-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .not-eligible-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .not-eligible-actions .action-btn {
        width: 100%;
        justify-content: center;
    }


    /* ===== Match Found State ===== */
    .play-match-found {
        padding: var(--space-md);
    }

    .match-found-timer {
        width: 120px;
        height: 120px;
    }

    .timer-value {
        font-size: 2.5rem;
    }

    .match-found-title {
        font-size: 1.75rem;
    }

    .match-found-subtitle {
        font-size: 0.9rem;
    }

    .accept-progress-container {
        width: 100%;
        max-width: 100%;
    }

    .match-found-actions {
        width: 100%;
    }

    .match-found-actions .action-btn {
        width: 100%;
        min-width: 100%;
    }

    .match-controls-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* ===== In Match State ===== */
    .play-in-match {
        padding: var(--space-md);
    }

    .match-info-bar {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .match-timer-display {
        width: 100%;
        justify-content: center;
    }

    /* ===== Modals ===== */
    .match-ended-modal,
    .cooldown-modal {
        width: 90%;
        max-width: 90%;
        padding: 2rem 1.5rem;
        margin: var(--space-md);
    }

    .match-ended-icon,
    .cooldown-icon {
        width: 60px;
        height: 60px;
    }

    .match-ended-icon i,
    .cooldown-icon i {
        font-size: 2rem;
    }

    .match-ended-modal h2,
    .cooldown-modal h2 {
        font-size: 1.25rem;
    }

    /* ===== All Ready State ===== */
    .all-ready-content {
        padding: var(--space-md);
    }

    .all-ready-icon {
        width: 80px;
        height: 80px;
    }

    .all-ready-icon i {
        font-size: 2.5rem;
    }

    .all-ready-title {
        font-size: 1.5rem;
    }

    .all-ready-subtitle {
        font-size: 1rem;
    }

    .all-ready-redirect {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    /* ===== Ban Prefs Floating - Tablet ===== */
    .ban-prefs-flyout {
        min-width: 320px;
        max-width: calc(100vw - 2rem);
    }

    .ban-prefs-bar-portrait {
        width: 30px;
        height: 30px;
        border-radius: 5px;
    }

    .ban-prefs-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ban-prefs-card {
        width: 48px;
    }

    .ban-prefs-card img {
        height: 44px;
    }

    .ban-prefs-class-column {
        flex-shrink: 0;
    }

    .ban-prefs-class-cards {
        grid-auto-columns: 48px;
    }
}

@media (max-width: 600px) {
    .play-match-howto-link {
        gap: 0.35rem;
        font-size: 0.61rem;
    }

    .play-match-howto-icon {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
    }

    .play-tools-flyout--howto {
        width: calc(100vw - 18px);
    }

    .play-howto-steps-grid {
        grid-template-columns: 1fr;
    }

    .play-howto-img {
        height: 150px;
    }
}

/* ==========================================================================
   Mobile (≤600px)
   Final compaction: tighter spacing, smaller fonts/icons, compact cards.
   ========================================================================== */
@media (max-width: 600px) {

    /* Page padding */
    .play-page {
        padding: 0.25rem var(--space-xs) var(--space-md) var(--space-xs);
    /* Swap mobile promo priority: show rank progress instead of the prize pool card */
    .promo-box.rank-progress-box {
        display: flex !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        display: grid !important;
    }

    .promo-box.prize-pool-box {
        display: none !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        min-height: 82px;
        padding: 0.42rem 0.58rem 0.4rem;
    }

    .rank-score-slide,
    .lobby-bands-slide {
        min-height: 64px;
    }

    .rank-score-slide {
        padding-top: 0.18rem;
        padding-bottom: 0.34rem;
    }

    .lobby-bands-slide {
        padding-top: 0.18rem;
        padding-bottom: 0.3rem;
    }

    .rank-progress-header {
        gap: 0.35rem;
    }

    .rank-score-slide .rank-progress-header {
        margin-bottom: 0.18rem;
    }

    .rank-ladder-season-label {
        top: calc(0.04rem - 8px);
        left: 0;
        max-width: 50%;
        font-size: 0.4rem;
        letter-spacing: 0.45px;
    }

    .rank-ladder-season-rankings-link {
        top: calc(0.04rem - 8px);
        right: 0;
        padding: 0.12rem 0.28rem;
        font-size: 0.38rem;
        letter-spacing: 0.32px;
    }

    .rank-score-slide .rank-badge-display .rank-tag {
        padding: 0.18rem 0.42rem;
        border-radius: 4px;
        font-size: 0.52rem;
        letter-spacing: 0.3px;
    }

    .points-display {
        gap: 0.18rem;
    }

    .points-display .current-points {
        font-size: 0.92rem;
    }

    .points-display .points-label {
        font-size: 0.5rem;
    }

    .rank-progress-bar {
        gap: 0.22rem;
    }

    .progress-track {
        height: 6px;
    }

    .progress-marker {
        width: 10px;
        height: 10px;
        border-width: 1.5px;
    }

    .progress-labels {
        font-size: 0.5rem;
    }

    .rank-ladder-track {
        padding: 0 0.12rem 0.04rem;
    }

    .rank-ladder-chip {
        width: 22px;
        height: 22px;
    }

    .rank-ladder-chip img {
        width: 16px;
        height: 16px;
    }

    .rank-ladder-segment {
        min-width: 10px;
        margin: 0 -7px;
    }

    .rank-mmr-tier-bar {
        padding: 0.16rem calc(0.12rem + 4%) 0.72rem;
    }

    .rank-mmr-tier-bar-track {
        margin: 0 -9px;
    }

    .rank-mmr-tier-bar-end {
        width: 20px;
        height: 20px;
    }

    .rank-mmr-tier-bar-end img {
        width: 18px;
        height: 18px;
    }

    .rank-mmr-tier-bar-label {
        top: calc(100% + 3px);
        font-size: 0.42rem;
    }

    .rank-mmr-fill-node {
        width: 5px;
        height: 5px;
    }

    .rank-mmr-fill-node-label {
        top: calc(100% + 4px);
        font-size: 0.42rem;
    }

    }

    .play-page .promo-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        align-items: stretch;
    }

    /* Card menu buttons — icon-only on mobile to fit narrow grid columns */
    .play-card-menu-btn {
        min-width: 0;
        padding: 0.35rem;
        height: 36px;
        width: 36px;
        gap: 0;
        border-radius: 8px;
    }

    .play-card-menu-btn i {
        font-size: 0.85rem;
        margin: 0;
    }

    /* Counteract play.css span { display: none } that hides icon wrappers */
    .legend-ban-btn-label,
    .teammate-prefs-btn-label {
        display: inline-flex !important;
    }

    /* Hide button text labels on mobile — icons are sufficient */
    .legend-ban-btn-label span,
    .teammate-prefs-btn-label span {
        display: none !important;
    }

    .legend-ban-btn-preview {
        display: none !important;
    }

    .teammate-prefs-btn-status {
        display: none !important;
    }

    /* Swap mobile promo priority: show rank progress instead of the prize pool card */
    .promo-box.rank-progress-box {
        display: flex !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        display: grid !important;
    }

    .promo-box.prize-pool-box {
        display: none !important;
    }

    .promo-box.rank-progress-box.promo-slider-box {
        min-height: 82px;
        padding: 0.42rem 0.58rem 0.4rem;
    }

    .rank-score-slide,
    .lobby-bands-slide {
        min-height: 64px;
    }

    .rank-score-slide {
        padding-top: 0.18rem;
        padding-bottom: 0.34rem;
    }

    .lobby-bands-slide {
        padding-top: 0.18rem;
        padding-bottom: 0.3rem;
    }

    .rank-progress-header {
        gap: 0.35rem;
    }

    .rank-score-slide .rank-progress-header {
        margin-bottom: 0.18rem;
    }

    .rank-ladder-season-label {
        top: calc(0.04rem - 8px);
        left: 0;
        max-width: 50%;
        font-size: 0.4rem;
        letter-spacing: 0.45px;
    }

    .rank-ladder-season-rankings-link {
        top: calc(0.04rem - 8px);
        right: 0;
        padding: 0.12rem 0.28rem;
        font-size: 0.38rem;
        letter-spacing: 0.32px;
    }

    .rank-score-slide .rank-badge-display .rank-tag {
        padding: 0.18rem 0.42rem;
        border-radius: 4px;
        font-size: 0.52rem;
        letter-spacing: 0.3px;
    }

    .points-display {
        gap: 0.18rem;
    }

    .points-display .current-points {
        font-size: 0.92rem;
    }

    .points-display .points-label {
        font-size: 0.5rem;
    }

    .rank-progress-bar {
        gap: 0.22rem;
    }

    .progress-track {
        height: 6px;
    }

    .progress-marker {
        width: 10px;
        height: 10px;
        border-width: 1.5px;
    }

    .progress-labels {
        font-size: 0.5rem;
    }

    .rank-ladder-track {
        padding: 0 0.12rem 0.04rem;
    }

    .rank-ladder-chip {
        width: 22px;
        height: 22px;
    }

    .rank-ladder-chip img {
        width: 16px;
        height: 16px;
    }

    .rank-ladder-segment {
        min-width: 10px;
        margin: 0 -7px;
    }

    .rank-mmr-tier-bar {
        padding: 0.16rem calc(0.12rem + 4%) 0.72rem;
    }

    .rank-mmr-tier-bar-track {
        margin: 0 -9px;
    }

    .rank-mmr-tier-bar-end {
        width: 20px;
        height: 20px;
    }

    .rank-mmr-tier-bar-end img {
        width: 18px;
        height: 18px;
    }

    .rank-mmr-tier-bar-label {
        top: calc(100% + 3px);
        font-size: 0.42rem;
    }

    .rank-mmr-fill-node {
        width: 5px;
        height: 5px;
    }

    .rank-mmr-fill-node-label {
        top: calc(100% + 4px);
        font-size: 0.42rem;
    }

    .party-controls {
        width: min(340px, 100%);
        max-width: calc(100% - 0.5rem);
        padding: 0.55rem;
        gap: 0.38rem;
        border-radius: 14px;
        margin-bottom: 0.65rem;
    }

    .party-controls .party-badge {
        padding: 0.36rem 0.62rem;
        font-size: 0.58rem;
    }

    .party-controls .party-help {
        flex: 1 1 100%;
        max-width: none;
        font-size: 0.64rem;
        line-height: 1.25;
    }

    .party-controls .party-control-btn {
        flex: 1 1 100%;
        min-height: 40px;
        padding: 0.52rem 0.7rem;
        font-size: 0.66rem;
    }

    .party-controls .party-mobile-invite-control-btn,
    .party-controls .party-mobile-only-control-btn {
        display: inline-flex;
    }

    /* ===== Promo Strip - tighter on small phones ===== */
    .promo-strip {
        padding: 0;
        gap: 0.35rem;
    }

    .promo-box {
        padding: 0.5rem 0.55rem;
        border-radius: 8px;
        min-height: 46px;
    }

    .map-info-overlay {
        min-height: 46px;
        padding: 0.2rem 0.4rem 0.9rem;
    }

    .info-kicker {
        font-size: 0.46rem;
        gap: 0.25rem;
    }

    .info-kicker i {
        font-size: 0.5rem;
    }

    .info-title {
        font-size: 0.64rem;
    }

    .map-panel-name {
        bottom: 0.24rem;
        font-size: 0.38rem;
    }

    .teammate-prefs-slide {
        gap: 0.3rem;
        padding: 0.4rem 0.55rem;
    }

    .prefs-icon-stack {
        grid-template-columns: repeat(2, 26px);
        gap: 0.22rem;
    }

    .prefs-icon {
        width: 26px;
        height: 26px;
        border-radius: 50%;
    }

    .prefs-icon i {
        font-size: 0.65rem;
    }

    .prefs-copy .info-title {
        font-size: 0.56rem;
    }

    .prefs-copy p {
        -webkit-line-clamp: 1;
        font-size: 0.48rem;
    }

    /* ── Teammate Preferences Controls Slide ── */
    .teammate-prefs-controls-slide {
        padding: 0.4rem 0.55rem 0.4rem;
        gap: 0.2rem;
    }

    .prefs-controls-row {
        gap: 0.4rem;
    }

    .prefs-switch-group {
        gap: 0.2rem;
        min-height: 18px;
    }

    .prefs-switch-label {
        font-size: 0.44rem;
    }

    .prefs-switch-toggle {
        width: 34px;
        height: 18px;
        border-radius: 9px;
    }

    .prefs-switch-thumb {
        width: 14px;
        height: 14px;
    }

    .prefs-switch-toggle.is-on .prefs-switch-thumb {
        transform: translateX(16px);
    }

    .prefs-strikes {
        gap: 0.2rem;
        min-height: 18px;
    }

    .prefs-strikes-label {
        font-size: 0.42rem;
    }

    .prefs-strike-dot {
        width: 8px;
        height: 8px;
        font-size: 0.22rem;
    }

    .prefs-strikes-info {
        width: 14px;
        height: 14px;
        font-size: 0.48rem;
    }

    .prefs-locked-overlay i {
        font-size: 0.6rem;
    }

    .prefs-locked-text {
        font-size: 0.42rem;
        letter-spacing: 0.5px;
    }

    .lang-flag-inline {
        width: 11px;
        height: 11px;
    }

    .teammate-prefs-controls-slide .rank-ladder-season-label {
        position: static;
        left: auto;
        max-width: 100%;
        text-align: center;
        margin-bottom: 0.06rem;
        margin-top: -0.08rem;
    }

    .prefs-switch-thumb {
        transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .legend-ban-reminder-slide {
        gap: 0.25rem 0.35rem;
        padding: 0.38rem 0.5rem;
    }

    .legend-ban-copy .info-title {
        font-size: 0.56rem;
    }

    .legend-ban-copy p {
        font-size: 0.46rem;
    }

    .legend-ban-preview {
        gap: 0.18rem;
        min-width: 60px;
    }

    .legend-ban-chip {
        width: 29px;
        height: 33px;
        border-radius: 7px;
    }

    .legend-ban-chip span {
        display: none;
    }

    .legend-ban-empty-mark {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .legend-ban-promo-cta {
        min-height: 18px;
        font-size: 0.42rem;
    }

    .promo-box.premium-promo {
        gap: 0.4rem;
        padding: 0.5rem 0.55rem;
    }

    .promo-box.premium-promo .promo-icon {
        width: 26px;
        height: 26px;
        border-radius: 6px;
    }

    .promo-box.premium-promo .promo-icon i {
        font-size: 0.7rem;
    }

    .promo-box.premium-promo .promo-title {
        font-size: 0.6rem;
    }

    .promo-box.premium-promo .promo-subtitle {
        display: block;
        font-size: 0.5rem;
    }

    .upgrade-btn-mini {
        padding: 0.22rem 0.45rem;
        font-size: 0.5rem;
    }

    .promo-box.prize-pool-box {
        padding: 0.5rem 0.55rem;
        gap: 0.1rem 0.3rem;
    }

    .promo-slider-box .promo-slide-prize {
        gap: 0.1rem 0.3rem;
    }

    .promo-slider-box .promo-slide-prize.prize-modern-slide {
        gap: 0.28rem;
    }

    .prize-modern-kicker {
        font-size: 0.45rem;
    }

    .prize-modern-active {
        display: none;
    }

    .prize-modern-grid {
        gap: 0.25rem;
    }

    .prize-modern-tile {
        min-height: 40px;
        padding: 0.34rem 0.35rem;
        gap: 0.1rem 0.25rem;
        border-radius: 7px;
    }

    .prize-modern-icon {
        width: 21px;
        height: 21px;
        border-radius: 6px;
        font-size: 0.58rem;
    }

    .prize-modern-label {
        font-size: 0.38rem;
        letter-spacing: 0.3px;
    }

    .prize-modern-amount {
        font-size: 0.72rem;
    }

    .promo-slide-premium {
        gap: 0.4rem;
    }

    .promo-slide-premium .promo-icon {
        width: 26px;
        height: 26px;
        border-radius: 6px;
    }

    .promo-slide-premium .promo-icon i {
        font-size: 0.7rem;
    }

    .promo-slide-premium .promo-title {
        font-size: 0.6rem;
    }

    .promo-slide-premium .promo-subtitle {
        display: block;
        font-size: 0.5rem;
    }

    .prize-pool-box .prize-header {
        font-size: 0.55rem;
        margin-bottom: 0.15rem;
    }

    .prize-pool-box .prize-header i {
        display: none;
    }

    .prize-pool-box .prize-header span {
        display: inline;
    }

    .prize-pool-box .prize-header span br {
        display: none;
    }

    .prize-pool-box .prize-amount {
        font-size: 1.1rem;
    }

    .prize-pool-box .prize-switch-btn {
        padding: 0.22rem 0.4rem;
        font-size: 0.45rem;
    }

    .prize-pool-box .prize-switch-btn i {
        font-size: 0.45rem;
    }

    /* Hide labels on small phones — icon-only switches */
    .prize-pool-box .switch-label {
        display: none;
    }

    /* ===== Player Card - fixed desktop dimensions ===== */
    .player-card-main {
        width: 208px !important;
        max-width: 208px;
        height: 256px;
        min-height: auto;
        overflow: visible;
    }

    .team-formation {
        width: 260px;
        max-width: 100%;
    }

    .player-avatar {
        overflow: hidden;
    }

    .player-avatar img,
    .player-avatar .avatar-placeholder {
        width: 96px;
        height: 96px;
        min-width: 96px;
        min-height: 96px;
    }

    /* Premium badge — tighter on small screens */
    .premium-badge-card.premium-badge-corner {
        top: 5px;
        right: 5px;
        padding: 3px 8px;
        font-size: 0.55rem;
    }

    /* Comms toggle — tighter on small screens */
    .comms-toggle-btn {
        top: 5px;
        left: 5px;
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }

    .comms-language-selector {
        top: 5px;
        left: 36px;
    }

    .player-name {
        font-size: 1rem;
    }

    .player-apex-name {
        font-size: 0.8rem;
    }

    /* ===== Queue Button - fixed desktop dimensions ===== */
    .queue-btn {
        width: 208px;
        max-width: 208px;
        height: 66px;
    }

    /* ===== Queue Stats - compact floating ===== */
    .bottom-stats-wrapper {
        bottom: 0.35rem;
        right: 0.35rem;
        gap: 4px;
    }

    .queue-stat-item {
        min-width: auto;
        padding: 0.3rem 0.45rem;
        font-size: 0.8rem;
    }

    .queue-stats-panel {
        padding: 0.35rem 0.6rem;
        gap: 0.35rem;
    }

    .legend-ban-prefs-floating {
        padding: 0.35rem 0.6rem;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* ===== Not Eligible - compact ===== */
    .not-eligible-title {
        font-size: 1.25rem;
    }

    .not-eligible-subtitle {
        font-size: 0.85rem;
    }

    .requirement-item {
        padding: 0.6rem 0.875rem;
        font-size: 0.8rem;
    }

    /* ===== Match Found - compact ===== */
    .match-found-timer {
        width: 100px;
        height: 100px;
    }

    .timer-value {
        font-size: 2rem;
    }

    .match-found-title {
        font-size: 1.5rem;
    }

    .match-found-actions .action-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* ===== Modals - compact ===== */
    .match-ended-modal,
    .cooldown-modal {
        padding: 1.5rem 1rem;
    }

    .match-ended-modal h2,
    .cooldown-modal h2 {
        font-size: 1.1rem;
    }

    /* ===== All Ready - compact ===== */
    .all-ready-icon {
        width: 60px;
        height: 60px;
    }

    .all-ready-icon i {
        font-size: 2rem;
    }

    .all-ready-title {
        font-size: 1.25rem;
    }

    .all-ready-subtitle {
        font-size: 0.9rem;
    }

    /* ===== Ban Prefs Floating - Mobile ===== */
    .ban-prefs-bar-portrait {
        width: 26px;
        height: 26px;
        border-radius: 4px;
    }

    .ban-prefs-bar-chevron {
        display: inline-block;
        font-size: 0.45rem;
        color: #666;
    }

    .ban-prefs-flyout {
        min-width: 0;
        width: calc(100vw - 2rem);
        max-width: 420px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 0.75rem 0.75rem;
    }

    /* Grid wraps like desktop — columns flow into rows */
    .ban-prefs-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        overflow: visible;
    }

    .ban-prefs-card {
        width: 48px;
    }

    .ban-prefs-card img {
        height: 44px;
    }

    .ban-prefs-card-name {
        display: none;
    }

    .ban-prefs-class-column {
        flex-shrink: 0;
    }

    .ban-prefs-class-cards {
        gap: 2px;
        grid-auto-columns: 48px;
    }

    .ban-prefs-class-label {
        font-size: 0.45rem;
        margin-bottom: 2px;
    }
}

/* ==========================================================================
   ★ MOBILE OVERHAUL — PRO PLAYER UX (≤600px)
   Appended last so it wins the cascade over legacy mobile rules above.
   Section rhythm:  LIVE QUEUE strip → Rank journey hero → Player card hero
                    → Quick-actions toolbar → Full-width Ready Up → Agenda
   ========================================================================== */

/* Compact live counters (queue + live matches): muted text line on the
   right of the status row above the player cards (Apex status on the left) */
.queue-status-line {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    font-size: 11px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.queue-status-line .qsl-item,
.queue-status-line .qsl-ssr,
.queue-status-line .qsl-alpine,
.queue-status-line .qsl-band {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.25rem;
}

.queue-status-line .qsl-band + .qsl-band::before {
    content: "·";
    color: rgba(255, 255, 255, 0.3);
}

.queue-status-line .qsl-sep {
    color: rgba(255, 255, 255, 0.3);
}

.queue-status-line .qsl-band-name {
    color: rgba(255, 255, 255, 0.6);
}

.queue-status-line .qsl-count {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.queue-status-line .qsl-live-dot {
    align-self: center;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f4012b;
    box-shadow: 0 0 6px rgba(244, 1, 43, 0.7);
    animation: qsl-live-pulse 1.8s ease-in-out infinite;
}

@keyframes qsl-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .queue-status-line .qsl-live-dot {
        animation: none;
    }
}

@media (max-width: 600px) {

    /* ---------- Canvas & motion ---------- */
    .play-page {
        /* Shared hero column: player card, status row, Ready Up and toolbar all align to it */
        --play-col: min(280px, 100%);
        padding: 0.6rem 0.65rem calc(var(--space-md) + 52px);
    }

    .promo-box:hover {
        transform: none;
    }

    /* Section rhythm: hero → sponsor strip → separator → banners → card */
    .play-ready-state .promo-strip {
        order: 0;
    }

    .play-ready-state .bottom-stats-wrapper {
        order: 1;
    }

    .play-ready-state .promo-separator {
        order: 2;
    }

    .play-ready-state .playsafe-banner-section {
        order: 3;
    }

    .play-ready-state .name-accuracy-notice {
        order: 4;
    }

    .play-ready-state .queue-main-area {
        order: 5;
    }

    /* =====================================================
       1. PROMO STRIP → stacked status strip + rank hero
       ===================================================== */
    .play-ready-state .promo-strip {
        display: flex !important;
        flex-direction: column;
        gap: 0.7rem;
        width: 100%;
        max-width: none;
        padding: 0;
        margin-bottom: 0.55rem;
    }

    /* ---- Live queue counters render as the compact .queue-status-line above the card ---- */

    /* ---- 1b. Rank journey hero (second) ---- */
    .promo-strip .map-comms-promo {
        order: 1;
        width: 100%;
        max-width: none;
        min-height: 104px;
        padding: 0.7rem 0.8rem 0.9rem;
        border-radius: 16px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
    }

    .promo-strip .map-comms-promo::before {
        content: 'Season Rank Journey';
        position: absolute;
        top: 0.6rem;
        left: 0.8rem;
        z-index: 3;
        font-family: 'Apex', sans-serif;
        font-size: 0.54rem;
        font-weight: 700;
        letter-spacing: 2px;
        line-height: 1;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        pointer-events: none;
    }

    .promo-strip .map-comms-promo .lobby-bands-slide {
        min-height: 84px;
        padding: 0.4rem 0.05rem 0.35rem;
    }

    .promo-strip .map-comms-promo .rank-ladder-track {
        padding: 0.3rem 0.05rem 0.5rem;
    }

    /* Tier name + MMR captions crowd each other on narrow screens —
       clean icon ladder with the YOU marker only */
    .promo-strip .map-comms-promo .rank-ladder-chip-label,
    .promo-strip .map-comms-promo .rank-ladder-chip-mmr {
        display: none;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip {
        width: 36px;
        height: 36px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip img {
        width: 28px;
        height: 28px;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment {
        min-width: 16px;
        height: 6px;
        margin: 0 -11px;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment-mmr {
        font-size: 0.5rem;
    }

    /* Re-surface the "YOU" marker on the player's current tier */
    .promo-strip .map-comms-promo .rank-ladder-chip.is-user-tier::after {
        content: 'YOU';
        display: block;
        position: absolute;
        bottom: -11px;
        left: 50%;
        transform: translateX(-50%);
        padding: 1px 5px;
        border-radius: 999px;
        background: rgba(244, 1, 43, 0.16);
        border: 1px solid rgba(244, 1, 43, 0.55);
        color: #ff8aa0;
        font-size: 0.42rem;
        font-weight: 800;
        letter-spacing: 0.5px;
        line-height: 1.4;
        white-space: nowrap;
        pointer-events: none;
        z-index: 5;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip.is-user-tier {
        transform: scale(1.16);
        z-index: 4;
    }

    /* ---- Separator rhythm ---- */
    .play-ready-state .promo-separator {
        margin: 0.35rem auto 0.9rem;
        max-width: 100%;
    }

    /* =====================================================
       2. STATUS BANNERS (cooldown / service / playsafe / name)
       ===================================================== */
    .service-unavailable-banner,
    .cooldown-banner {
        padding: 0.7rem 0.8rem;
        gap: 0.6rem;
        border-radius: 14px;
        margin-bottom: 0.75rem;
    }

    .banner-title {
        font-size: 0.85rem;
    }

    .banner-subtitle {
        font-size: 0.75rem;
    }

    .banner-refresh {
        width: 34px;
        height: 34px;
    }

    .cooldown-banner-icon {
        font-size: 1.15rem;
    }

    .cooldown-banner-title {
        font-size: 0.85rem;
    }

    .cooldown-banner-text {
        font-size: 0.78rem;
    }

    .cooldown-banner-timer {
        font-size: 1.15rem;
    }

    .playsafe-banner-section {
        padding: 0;
    }

    .playsafe-play-banner {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.55rem 0.6rem;
        margin: 0 0 0.75rem;
        padding: 0.7rem 0.8rem;
        border-radius: 14px;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
    }

    .playsafe-play-banner__body {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .playsafe-play-banner__text {
        white-space: normal;
        font-size: 0.82rem;
    }

    .playsafe-play-banner__actions {
        justify-content: flex-start;
    }

    .playsafe-play-banner__cta {
        align-self: flex-start;
    }

    .name-accuracy-notice {
        width: 100%;
        margin: 0 0 0.75rem;
        padding: 0.8rem 0.85rem;
        border-radius: 14px;
        gap: 0.75rem;
    }

    .name-accuracy-figure {
        max-width: 92px;
    }

    .name-accuracy-title {
        font-size: 0.82rem;
    }

    .name-accuracy-text {
        font-size: 0.78rem;
    }

    /* =====================================================
       3. PLAYER CARD HERO
       ===================================================== */
    .team-formation-wrapper {
        width: 100%;
        align-items: center;
    }

    .team-formation {
        width: 100%;
        gap: 0.6rem;
        margin-bottom: 0.8rem;
    }

    #teammate-preferences.player-card-main {
        width: var(--play-col) !important;
        max-width: var(--play-col);
        height: 304px;
        border-radius: 20px;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    }

    #teammate-preferences > .player-card-content {
        padding: 1rem 0.8rem 0.9rem;
    }

    #teammate-preferences .avatar-wrapper {
        margin: 0 auto 0.65rem;
    }

    #teammate-preferences .avatar-img,
    #teammate-preferences .avatar-placeholder {
        width: 88px;
        height: 88px;
        min-width: 88px;
        min-height: 88px;
    }

    #teammate-preferences .avatar-placeholder {
        font-size: 2.1rem;
    }

    #teammate-preferences .player-name {
        font-size: 1.3rem;
        margin: 0.2rem 0 0.15rem;
    }

    #teammate-preferences .player-apex-name {
        font-size: 0.88rem;
        margin-bottom: 0.4rem;
    }

    #teammate-preferences .mmr-circle-display {
        margin-top: 0.35rem;
    }

    /* ---- Party teammate cards → compact horizontal rows ---- */
    .teammate-slot.party-slot.filled {
        display: flex !important;
        width: 100%;
        max-width: 280px;
        min-height: 0;
        height: auto;
        flex: 0 0 auto;
        margin: 0 auto;
    }

    .teammate-slot.party-slot.filled .party-teammate-card {
        width: 100%;
        max-width: 280px;
        min-height: 0;
        height: auto;
        margin: 0 auto;
        border-radius: 14px;
        padding: 0.45rem 0.6rem;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    }

    .teammate-slot.party-slot.filled .party-teammate-card > .player-card-content {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "avatar name mmr"
            "avatar title mmr";
        align-items: center;
        justify-items: start;
        column-gap: 0.65rem;
        row-gap: 0.1rem;
        padding: 0.15rem 0.1rem;
        height: auto;
    }

    .teammate-slot.party-slot.filled .avatar-wrapper {
        grid-area: avatar;
        margin: 0;
    }

    .teammate-slot.party-slot.filled .avatar-img,
    .teammate-slot.party-slot.filled .avatar-placeholder {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        border-width: 1.5px;
    }

    .teammate-slot.party-slot.filled .avatar-placeholder {
        font-size: 1.15rem;
    }

    .teammate-slot.party-slot.filled .avatar-region-flag {
        width: 16px;
        height: 16px;
    }

    .teammate-slot.party-slot.filled .player-name {
        grid-area: name;
        margin: 0;
        text-align: left;
        font-size: 0.95rem;
        letter-spacing: 0.5px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .teammate-slot.party-slot.filled .player-title-display {
        grid-area: title;
        font-size: 0.6rem;
        margin: 0;
    }

    .teammate-slot.party-slot.filled .mmr-circle-display {
        grid-area: mmr;
        grid-row: 1 / 3;
        margin: 0;
        align-self: center;
        justify-self: end;
    }

    .teammate-slot.party-slot.filled .mmr-circle-row {
        transform: translateX(0);
    }

    .teammate-slot.party-slot.filled .mmr-circle-ring {
        width: 34px;
        height: 34px;
    }

    .teammate-slot.party-slot.filled .mmr-circle-inner {
        width: 30px;
        height: 30px;
    }

    .teammate-slot.party-slot.filled .mmr-circle-icon {
        width: 14px;
        height: 14px;
    }

    .teammate-slot.party-slot.filled .mmr-circle-label {
        display: none;
    }

    .teammate-slot.party-slot.filled .mmr-circle-value {
        font-size: 0.7rem;
    }

    .teammate-slot.party-slot.filled .pinned-stat-tiles {
        display: none;
    }

    .teammate-slot.party-slot.filled .party-kick-btn {
        top: 50%;
        right: 0.45rem;
        transform: translateY(-50%);
        width: 26px;
        height: 26px;
        align-items: center;
        justify-content: center;
    }

    /* =====================================================
       4. QUICK-ACTIONS TOOLBAR + FULL-WIDTH READY UP
       ===================================================== */
    .queue-button-area {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.55rem;
        width: 100%;
        max-width: var(--play-col);
        margin: 0 auto 0.85rem;
        justify-content: center;
    }

    /* Unwrap menu groups so the two actions share one toolbar row */
    .queue-button-area .play-card-menu-group--left,
    .queue-button-area .play-card-menu-group--right {
        display: contents;
    }

    .queue-button-area .play-card-menu-btn {
        flex: 0 1 calc(50% - 0.28rem);
        min-width: 0;
        width: auto;
        height: 62px;
        padding: 0.45rem 0.3rem;
        border-radius: 14px;
        flex-direction: column;
        gap: 0.32rem;
        background: linear-gradient(165deg, rgba(26, 26, 26, 0.96) 0%, rgba(13, 13, 13, 0.98) 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    }

    .queue-button-area .play-card-menu-btn i {
        font-size: 1rem;
        margin: 0;
    }

    .queue-button-area .legend-ban-btn-label,
    .queue-button-area .teammate-prefs-btn-label {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.32rem;
    }

    .queue-button-area .legend-ban-btn-label span,
    .queue-button-area .teammate-prefs-btn-label span {
        display: inline !important;
        font-size: 0.56rem;
        letter-spacing: 0.9px;
    }

    /* Queue Settings card — icon + label only (play.css hides every span of
       a quick-menu button at <=760px, so the label needs re-enabling) */
    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-label {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.32rem;
    }

    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-label span {
        display: inline !important;
        font-size: 0.56rem;
        letter-spacing: 0.9px;
    }

    /* One icon is enough on a phone card — drop the comms/auto-join chips */
    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-status {
        display: none !important;
    }

    /* "How to play" is removed from the mobile toolbar */
    .queue-button-area .play-scoring-info-container {
        display: none !important;
    }

    /* ---- Badge row matches the card width; hint is a one-line pill ---- */
    .queue-button-area > .play-pq-badge {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .queue-button-area > .party-queue-hint {
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
        flex-wrap: nowrap;
        gap: 0.3rem 0.45rem;
        padding: 0.45rem 0.8rem;
        border-radius: 999px;
        font-size: 0.62rem;
        white-space: nowrap;
        overflow: hidden;
    }

    .queue-button-area > .party-queue-hint > span {
        min-width: 0;
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .queue-button-area > .queue-btn {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    /* CTA hierarchy: Ready Up first, badge + party hint under it, toolbar last */
    .queue-button-area > .queue-btn {
        order: 1;
    }

    .queue-button-area > .play-pq-badge {
        order: 2;
    }

    .queue-button-area > .party-queue-hint {
        order: 3;
    }

    .queue-button-area .play-card-menu-btn,
    .queue-button-area .play-scoring-info-container {
        order: 4;
    }

    .queue-button-area > .queue-btn {
        height: 64px;
        border-radius: 14px;
        --queue-button-corner-cut: 15px;
    }

    .queue-button-area > .queue-btn .btn-text {
        font-size: 1.05rem;
        letter-spacing: 2px;
    }

    .queue-button-area > .queue-btn .btn-subtext {
        font-size: 0.72rem;
    }

    .queue-button-area > .play-pq-badge {
        display: flex;
        justify-content: center;
    }

    .queue-button-area > .party-queue-hint {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0.3rem 0.45rem;
        padding: 0.45rem 0.8rem;
        border-radius: 999px;
        font-size: 0.62rem;
        white-space: nowrap;
    }

    /* =====================================================
       5. AGENDA EMBED — removed on mobile
       ===================================================== */
    .play-agenda-embed {
        display: none !important;
    }

    /* =====================================================
       6. SPONSOR SLIDER — in-flow strip right after the rank hero
       (desktop keeps the fixed bottom-right corner box)
       ===================================================== */
    .play-ready-state .bottom-stats-wrapper {
        position: static;
        display: flex;
        order: 1;
        width: 100%;
        z-index: auto;
        margin-bottom: 0.55rem;
    }

    .bottom-stats-wrapper .prize-pool-box.promo-slider-box--corner {
        display: grid !important;
        width: 100%;
        min-height: 64px;
        border-radius: 14px;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    }

    .play-page .live-stream-widget {
        left: 10px;
        bottom: 10px;
    }

    .play-page .live-widget-expand,
    .play-page .live-widget-bar {
        width: 224px;
        max-width: calc(100vw - 24px);
    }

    .play-page .live-widget-bar {
        padding: 8px 11px;
        border-radius: 14px;
    }

    .play-page .live-widget-frame {
        height: 126px;
    }

    .play-page .live-widget-frame iframe {
        transform: scale(0.42);
    }

    /* =====================================================
       7. OTHER STATES — in-match, match found, not eligible
       ===================================================== */
    .play-in-match {
        padding: 0.75rem 0.6rem 1rem;
    }

    .play-in-match .match-main-area {
        padding: 0.5rem 0 0.6rem;
    }

    .play-in-match .team-formation {
        margin-bottom: 0.5rem;
    }

    .play-in-match .lobby-code-inline {
        width: 100%;
        max-width: 440px;
        flex-direction: column;
        gap: 0.55rem;
    }

    .play-in-match .lobby-code-box {
        width: 100%;
        height: 104px;
        border-radius: 16px;
    }

    .play-in-match .lobby-code-value .code {
        font-size: 2rem;
        letter-spacing: 5px;
    }

    .play-in-match .match-status-box {
        min-height: 52px;
        border-radius: 14px;
        padding: 0.55rem 1rem;
    }

    .play-match-found {
        min-height: 0;
        padding: 1.5rem 1rem 1rem;
    }

    .match-found-timer {
        width: 110px;
        height: 110px;
        margin-bottom: 1rem;
    }

    .match-found-title {
        font-size: 1.55rem;
        letter-spacing: 2px;
    }

    .match-found-subtitle {
        font-size: 0.92rem;
    }

    .accept-progress-container {
        max-width: 320px;
        margin-bottom: 1rem;
    }

    .match-found-actions .action-btn {
        min-width: min(300px, 100%);
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .accepted-hint {
        font-size: 0.8rem;
    }

    .play-not-eligible {
        min-height: 0;
        padding: 1.5rem 1rem 2rem;
    }

    .play-not-eligible .not-eligible-title {
        font-size: 1.35rem;
    }

    /* ---- Flyouts & modals polish ---- */
    .ban-prefs-flyout {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
        max-height: min(82vh, 720px);
        border-radius: 18px;
        padding: 0.9rem;
    }

    .play-tools-flyout {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px);
    }

    .play-signup-required-modal > .reset-modal-content {
        min-width: 0;
        width: calc(100vw - 28px);
        max-width: 400px;
        padding: 1.1rem;
    }

    .party-invite-flyout {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
    }
}

/* ==========================================================================
   ★ ULTRA-COMPACT (≤380px) — keeps the same rhythm on small phones
   ========================================================================== */
@media (max-width: 380px) {
    .promo-strip .map-comms-promo .rank-ladder-chip {
        width: 32px;
        height: 32px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip img {
        width: 25px;
        height: 25px;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment {
        min-width: 10px;
        margin: 0 -8px;
    }

    #teammate-preferences.player-card-main {
        height: 288px;
    }

    #teammate-preferences .avatar-img,
    #teammate-preferences .avatar-placeholder {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
    }

    .queue-button-area .play-card-menu-btn,
    .queue-button-area .play-match-howto-link {
        height: 58px;
    }

    .queue-button-area .legend-ban-btn-label span,
    .queue-button-area .teammate-prefs-btn-label span,
    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-label span,
    .queue-button-area .play-match-howto-link {
        font-size: 0.5rem;
    }

    .play-page .live-widget-expand,
    .play-page .live-widget-bar {
        width: 200px;
        max-width: calc(100vw - 24px);
    }

    .play-page .live-widget-frame {
        height: 113px;
    }

    .play-page .live-widget-frame iframe {
        transform: scale(0.375);
    }
}

/* ==========================================================================
   ★ TABLET POLISH (601–1024px) — single-column status + hero, consistent radii
   ========================================================================== */
@media (min-width: 601px) and (max-width: 1024px) {
    .play-ready-state .promo-strip {
        display: flex !important;
        flex-direction: column;
        gap: 0.7rem;
        width: min(640px, 100%);
        margin: 0 auto 0.6rem;
        padding: 0 0.25rem;
    }

    /* Hero column = tablet card width (overridden to 320px at 601–760px) */
    .play-page {
        --play-col: 240px;
    }

    .promo-strip .map-comms-promo {
        width: 100%;
        min-height: 112px;
        padding: 0.75rem 1rem 0.95rem;
        border-radius: 14px;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    }

    .promo-strip .map-comms-promo::before {
        content: 'Season Rank Journey';
        position: absolute;
        top: 0.6rem;
        left: 1rem;
        z-index: 3;
        font-family: 'Apex', sans-serif;
        font-size: 0.56rem;
        font-weight: 700;
        letter-spacing: 2px;
        line-height: 1;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        pointer-events: none;
    }

    .promo-strip .map-comms-promo .lobby-bands-slide {
        min-height: 92px;
        padding: 0.4rem 0.1rem 0.3rem;
    }

    .promo-strip .map-comms-promo .rank-ladder-track {
        padding: 1.1rem 0.1rem 0.2rem;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip {
        width: 40px;
        height: 40px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip img {
        width: 32px;
        height: 32px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip-label {
        font-size: 0.5rem;
        margin-bottom: 3px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip-mmr {
        font-size: 0.52rem;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment {
        min-width: 22px;
        height: 6px;
        margin: 0 -13px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip.is-user-tier {
        transform: scale(1.16);
        z-index: 4;
    }

    #teammate-preferences.player-card-main {
        width: 240px !important;
        max-width: 240px;
        height: 288px;
        border-radius: 18px;
    }

    #teammate-preferences .avatar-img,
    #teammate-preferences .avatar-placeholder {
        width: 84px;
        height: 84px;
        min-width: 84px;
        min-height: 84px;
    }

    .play-agenda-embed .agenda-view {
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* ==========================================================================
   ★ SMALL TABLET (601–760px) — one hero column: card, Ready Up, toolbar
   play.css shrinks the side menu buttons to 34px icon squares ≤760px, which
   leaves empty boxes squeezed beside Ready Up. Stack them like phones instead.
   ========================================================================== */
@media (min-width: 601px) and (max-width: 760px) {
    .play-page {
        --play-col: 320px;
    }

    .team-formation {
        width: 100%;
    }

    #teammate-preferences.player-card-main {
        width: var(--play-col) !important;
        max-width: var(--play-col);
        height: 304px;
    }

    .queue-button-area {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, var(--play-col));
        margin-inline: auto;
        column-gap: 0.55rem;
        row-gap: 0.55rem;
    }

    .queue-button-area > .queue-btn {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        max-width: none;
        height: 60px;
    }

    .queue-button-area > .play-pq-badge {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .queue-button-area > .party-queue-hint {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: center;
    }

    .queue-button-area .play-card-menu-group--left,
    .queue-button-area .play-card-menu-group--right {
        grid-row: 4;
        justify-self: stretch;
        width: 100%;
    }

    .queue-button-area .play-card-menu-group--left {
        grid-column: 1;
    }

    .queue-button-area .play-card-menu-group--right {
        grid-column: 2;
    }

    .queue-button-area .play-card-menu-btn {
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        height: 62px;
        padding: 0.45rem 0.3rem;
        gap: 0.32rem;
        border-radius: 14px;
    }

    .queue-button-area .play-card-menu-btn i {
        font-size: 1rem;
        margin: 0;
    }

    .queue-button-area .legend-ban-btn-label,
    .queue-button-area .teammate-prefs-btn-label {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.32rem;
    }

    .queue-button-area .legend-ban-btn-label span,
    .queue-button-area .teammate-prefs-btn-label span {
        display: inline !important;
        font-size: 0.56rem;
        letter-spacing: 0.9px;
    }

    /* Queue Settings card — icon + label only (play.css hides every span of
       a quick-menu button at <=760px, so the label needs re-enabling) */
    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-label {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.32rem;
    }

    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-label span {
        display: inline !important;
        font-size: 0.56rem;
        letter-spacing: 0.9px;
    }

    /* One icon is enough on a phone card — drop the comms/auto-join chips */
    .queue-button-area .play-card-menu-btn--queue-settings .queue-settings-btn-status {
        display: none !important;
    }
}

/* ==========================================================================
   ★ REFINEMENTS — touch feel, safe areas, ultra-narrow phones
   ========================================================================== */
@media (max-width: 600px) {
    /* Native-feel touch targets: no grey flash, no double-tap zoom delay */
    .queue-button-area .play-card-menu-btn,
    .queue-button-area .play-match-howto-link,
    .queue-button-area > .queue-btn,
    .queue-button-area .party-queue-hint__mobile-btn,
    .match-found-actions .action-btn,
    .not-eligible-actions .action-btn,
    .party-controls .party-control-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Notched phones: keep fixed widget and page bottom clear of the home bar */
    .play-page {
        padding-bottom: calc(var(--space-md) + 52px + env(safe-area-inset-bottom, 0px));
    }

    .play-page .live-stream-widget {
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 340px) {
    .promo-strip .map-comms-promo {
        min-height: 108px;
        padding: 0.7rem 0.65rem 0.85rem;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip {
        width: 28px;
        height: 28px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip img {
        width: 22px;
        height: 22px;
    }

    .promo-strip .map-comms-promo .rank-ladder-segment {
        min-width: 8px;
        margin: 0 -7px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip-label {
        font-size: 0.42rem;
        margin-bottom: 2px;
    }

    .promo-strip .map-comms-promo .rank-ladder-chip-mmr {
        font-size: 0.45rem;
    }
}

/* ==========================================================================
   EVENT CARD - tablet / phone (zone stacking is a container query in play.css)
   ========================================================================== */
@media (max-width: 1024px) {
    .play-stack {
        width: 100%;
        align-items: center;
    }

    .play-stack > .event-card {
        width: min(100%, 820px);
    }
}

@media (max-width: 600px) {
    .ec-event,
    .ec-side {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ec-event {
        min-height: 104px;
    }

    .ec-name {
        font-size: 22px;
    }

    .ec-stat {
        padding: 6px 8px;
    }

    .ec-value-wrap {
        height: 28px;
    }

    .ec-pips {
        gap: 4px;
    }

    .ec-caption {
        font-size: 10px;
    }

    .ec-cta {
        white-space: normal;
    }

    .rank-journey-overlay {
        padding: 12px;
    }

    .ban-prefs-flyout.rank-journey-flyout {
        padding: 1rem;
    }
}
