.telco-onboarding-shell {
    display: grid;
    gap: 28px;
    padding: 28px 0 70px
}

.telco-auth-wrap {
    align-items: center
}

.telco-state-card {
    padding: clamp(26px, 4vw, 56px);
    border-radius: 28px;
    background: linear-gradient(135deg, #061b12 0%, #0d3a27 58%, #175d3d 100%);
    color: #fff
}

.telco-state-card h1 {
    margin: 6px 0 14px;
    color: #fff;
    letter-spacing: .004em
}

.telco-state-card p {
    max-width: 720px;
    color: #d7eadf;
    line-height: 1.7
}

.telco-setup-card {
    position: relative
}

.telco-setup-quota {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 6px
}

.telco-setup-quota article {
    padding: 14px 16px;
    border: 1px solid var(--arena-line);
    border-radius: 18px;
    background: #f8fbf8
}

.telco-setup-quota span,
.telco-setup-quota em {
    display: block
}

.telco-setup-quota span {
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--arena-muted)
}

.telco-setup-quota strong {
    display: block;
    margin: 4px 0 3px;
    font-size: 1.8rem;
    line-height: 1
}

.telco-setup-quota em {
    font-style: normal;
    color: var(--arena-muted);
    font-size: .85rem
}

.telco-how-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr);
    gap: 34px;
    align-items: center;
    padding: clamp(28px, 5vw, 60px);
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(6, 27, 18, .96) 0%, rgba(13, 58, 39, .94) 60%, rgba(23, 93, 61, .92) 100%);
    color: #fff
}

.telco-how-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/assets/theme/arena-auth-pitch.webp') center/cover no-repeat;
    opacity: .13;
    mix-blend-mode: screen;
    pointer-events: none
}

.telco-how-hero>* {
    position: relative;
    z-index: 1
}

.telco-how-hero-copy h1 {
    margin: 6px 0 14px;
    color: #fff;
    letter-spacing: .004em
}

.telco-how-hero-copy p {
    max-width: 760px;
    color: #d7eadf;
    font-size: 1.05rem;
    line-height: 1.72
}

.telco-command-section,
.telco-tournaments-panel {
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid var(--arena-line);
    border-radius: 25px;
    background: #fff
}

.telco-command-section h2,
.telco-tournaments-panel h2 {
    margin: 5px 0 9px;
    letter-spacing: .004em;
    font-size: clamp(1.65rem, 2vw, 2.45rem)
}

.telco-command-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse
}

.telco-command-table th,
.telco-command-table td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--arena-line);
    text-align: left
}

.telco-command-table code {
    display: inline-flex;
    min-width: 96px;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 10px;
    background: #071b12;
    color: #d8ff6d;
    font-weight: 900
}

.command-try {
    display: inline-flex;
    white-space: nowrap;
    padding: 8px 13px;
    border-radius: 999px;
    background: #e8ffc1;
    color: #153c28;
    font-weight: 850
}

.telco-command-note {
    margin: 18px 0 0;
    color: var(--arena-muted)
}

.telco-tournament-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px
}

.telco-tournament-card {
    overflow: hidden;
    border: 1px solid var(--arena-line);
    border-radius: 22px;
    background: #fcfdfc;
    box-shadow: 0 16px 36px rgba(8, 22, 15, .06)
}

.telco-tournament-banner {
    height: 150px;
    background: center/cover no-repeat
}

.telco-tournament-body {
    display: grid;
    gap: 12px;
    padding: 18px
}

.telco-tournament-body h3 {
    margin: 0;
    color: var(--arena-ink);
    font-size: 1.2rem;
    letter-spacing: .004em
}

.telco-tournament-body p {
    margin: 0;
    color: var(--arena-muted);
    line-height: 1.65
}

.telco-tournament-meta {
    display: grid;
    gap: 6px;
    font-size: .86rem;
    color: #385544
}

.telco-tournament-empty {
    display: flex;
    align-items: stretch
}

.telco-tournament-empty .telco-tournament-body {
    width: 100%
}

.page-telco .auth-copy h1,
.page-telco .auth-card-head h2,
.page-telco h1,
.page-telco h2,
.page-telco h3 {
    letter-spacing: .004em
}

.page-telco .auth-card button,
.page-telco .button {
    border-radius: 999px
}

@media(max-width:980px) {
    .telco-how-hero {
        grid-template-columns: 1fr
    }

    .telco-tournament-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:760px) {
    .telco-setup-quota {
        grid-template-columns: 1fr
    }

    .telco-tournament-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:560px) {
    .telco-onboarding-shell {
        padding-top: 18px
    }

    .telco-state-card,
    .telco-how-hero,
    .telco-command-section,
    .telco-tournaments-panel {
        padding: 22px;
        border-radius: 20px
    }

    .telco-actions .button {
        width: 100%
    }
}

/* Arena 12.2: keep the Telco How to Play page inside the viewport on small screens. */
.page-telco {
    overflow-x: hidden
}

.page-telco .portal-shell,
.telco-onboarding-shell,
.telco-how-shell,
.telco-how-hero,
.telco-how-hero-copy,
.telco-command-section,
.telco-tournaments-panel,
.telco-tournament-grid,
.telco-tournament-card,
.table-wrap {
    min-width: 0;
    max-width: 100%
}

.telco-onboarding-shell,
.telco-how-shell {
    width: 100%
}

.telco-how-hero-copy p,
.telco-command-section p,
.telco-tournaments-panel p {
    overflow-wrap: anywhere
}

.telco-command-section .table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch
}

@media(max-width:760px) {
    .telco-command-section .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent
    }

    .telco-command-section .table-wrap .telco-command-table {
        display: block;
        width: 100%;
        min-width: 0
    }

    .telco-command-table thead {
        display: none
    }

    .telco-command-table tbody {
        display: grid;
        width: 100%;
        gap: 12px
    }

    .telco-command-table tr {
        display: grid;
        width: 100%;
        min-width: 0;
        gap: 9px;
        padding: 17px;
        border: 1px solid var(--arena-line);
        border-radius: 16px;
        background: #f8fbf8
    }

    .telco-command-table td {
        display: grid;
        grid-template-columns: minmax(82px, .36fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere
    }

    .telco-command-table td::before {
        content: attr(data-label);
        padding-top: 3px;
        color: var(--arena-muted);
        font-size: .69rem;
        font-weight: 850;
        letter-spacing: .07em;
        text-transform: uppercase
    }

    .telco-command-table code {
        min-width: 0;
        width: max-content;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        overflow-wrap: anywhere
    }

    .telco-command-table .telco-command-action {
        margin-top: 3px
    }

    .telco-command-table .command-try {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center
    }
}

@media(max-width:560px) {
    .telco-how-hero {
        gap: 24px
    }

    .telco-how-hero-copy h1 {
        font-size: clamp(2.35rem, 12vw, 3.25rem);
        line-height: 1
    }

    .telco-how-hero-copy p {
        font-size: 1rem;
        line-height: 1.65
    }

    .telco-access-card {
        width: 100%
    }

    .telco-command-table td {
        grid-template-columns: 1fr;
        gap: 4px
    }

    .telco-command-table td::before {
        padding-top: 0
    }
}


/* Arena 12.4: Web Telco provider handoff / callback state. */
.telco-web-flow {
    min-height: 58vh;
    align-items: center
}

.telco-web-state-card {
    position: relative;
    display: grid;
    justify-items: start;
    max-width: 920px;
    margin: 34px auto;
    width: 100%;
    overflow: hidden
}

.telco-web-state-card h1 {
    max-width: 760px
}

.telco-web-status-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 4px 0 14px;
    border: 1px solid rgba(216, 255, 109, .34);
    border-radius: 50%;
    background: rgba(216, 255, 109, .12);
    color: #d8ff6d;
    font-size: 1.7rem;
    font-weight: 900
}

.telco-web-flow[data-telco-state="failed"] .telco-web-status-icon {
    border-color: rgba(255, 214, 145, .45);
    background: rgba(255, 214, 145, .12);
    color: #ffd691
}

.telco-web-reference {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    font-size: .84rem
}

.telco-web-reference span {
    color: #aac3b4
}

.telco-web-reference strong {
    color: #fff;
    letter-spacing: .05em
}

.telco-web-waiting {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(216, 255, 109, .12);
    color: #e8ffc1;
    font-weight: 800
}

.telco-web-waiting i {
    width: 10px;
    height: 10px;
    border: 2px solid #d8ff6d;
    border-right-color: transparent;
    border-radius: 50%;
    animation: arenaTelcoSpin .8s linear infinite
}

.telco-web-fallback {
    margin: 18px 0 0 !important;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .13);
    font-size: .9rem !important;
    color: #bcd0c4 !important
}

@keyframes arenaTelcoSpin {
    to {
        transform: rotate(360deg)
    }
}

@media(max-width:560px) {
    .telco-web-state-card {
        margin: 18px auto
    }

    .telco-web-reference {
        display: grid
    }

    .telco-web-waiting {
        width: 100%;
        justify-content: center;
        text-align: center
    }
}

/* Arena first-impression: a single, clean invitation for players who have not
   entered a match yet. Reuses the existing telco card + access-card styles so
   it stays in-family with the rest of the onboarding theme. */
.telco-first-match-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr);
    gap: 34px;
    align-items: center;
    padding: clamp(30px, 5vw, 62px);
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(6, 27, 18, .97) 0%, rgba(13, 58, 39, .95) 58%, rgba(23, 93, 61, .92) 100%);
    color: #fff
}

.telco-first-match-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/assets/theme/arena-auth-pitch.webp') center/cover no-repeat;
    opacity: .14;
    mix-blend-mode: screen;
    pointer-events: none
}

.telco-first-match-hero>* {
    position: relative;
    z-index: 1
}

.telco-first-match-copy h1 {
    margin: 6px 0 14px;
    color: #fff;
    letter-spacing: .004em
}

.telco-first-match-copy p {
    max-width: 700px;
    color: #d7eadf;
    font-size: 1.05rem;
    line-height: 1.72
}

.telco-first-match-hero .telco-access-card {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(216, 255, 109, .22)
}

@media(max-width:980px) {
    .telco-first-match-hero {
        grid-template-columns: 1fr
    }
}

@media(max-width:560px) {
    .telco-first-match-hero {
        padding: 26px;
        border-radius: 22px
    }

    .telco-first-match-copy h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
        line-height: 1
    }

    .telco-first-match-copy p {
        font-size: 1rem;
        line-height: 1.65
    }

    .telco-first-match-hero .telco-actions .button {
        width: 100%
    }
}

/* The confetti canvas sits as a non-interactive overlay filling the hero card
   and respects reduced-motion. It never blocks clicks on the CTA buttons. */
.telco-first-match-hero .telco-first-match-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: .9
}

.telco-first-match-hero .telco-first-match-confetti canvas {
    width: 100%;
    height: 100%;
    object-fit: contain
}

@media(prefers-reduced-motion:reduce) {
    .telco-first-match-confetti {
        display: none !important
    }
}

@media(max-width:560px) {
    .telco-first-match-hero .telco-first-match-confetti {
        opacity: .6
    }
}
