:root {
    --bg: #eef8fb;
    --bg-soft: #f4fbff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --ink: #182334;
    --ink-soft: #3f4d63;
    --muted: #667085;
    --line: #dbe5ef;
    --line-soft: #d9e4f0;
    --panel: #ffffff;
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --yellow: #ffca3a;
    --coral: #ff6b6b;
    --blue: #3b82f6;
    --green: #22c55e;
    --violet: #8b5cf6;
    --shadow: 0 18px 45px rgba(24, 35, 52, 0.12);
    --shadow-strong: 0 24px 48px rgba(14, 23, 44, 0.2);
    --premium-border: rgba(15, 23, 42, 0.12);
    --arena-stripe: rgba(20, 184, 166, 0.08);
    --arena-gold-soft: rgba(255, 202, 58, 0.18);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
}

body {
    min-height: 100%;
    margin: 0;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.08) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(225deg, rgba(59, 130, 246, 0.06) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(180deg, #f6fdff 0%, #edf8fb 48%, #f7fbff 100%);
    color: var(--ink);
    background-attachment: fixed;
}

body.premium-shell {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.08) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(225deg, rgba(59, 130, 246, 0.06) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(180deg, #f8fdff 0%, #eef9f7 100%);
    color: var(--ink);
}

.premium-shell-home {
    align-items: center;
    position: relative;
    z-index: 1;
}

.premium-shell-home::after {
    content: "";
    position: absolute;
    left: clamp(-9rem, -5vw, -3rem);
    bottom: clamp(-9rem, -6vw, -5rem);
    width: min(20rem, 52vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 72%);
    pointer-events: none;
    z-index: -1;
}

.premium-shell-preview {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 255, 0.94));
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem;
    position: relative;
}

.premium-shell-preview::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border: 1px dashed rgba(59, 130, 246, 0.18);
    border-radius: 18px;
    pointer-events: none;
    opacity: 0.75;
}

.premium-dashboard {
    padding-top: 1.2rem;
    padding-bottom: 3.4rem;
}

.premium-level-banner {
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 38px rgba(15, 118, 110, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.44);
    overflow: hidden;
}

.premium-level-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 35%, rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.premium-stats-grid {
    gap: 0.75rem;
}

.premium-learning-card {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(251, 113, 133, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 40px rgba(20, 184, 166, 0.13);
}

.premium-learning-card::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px dashed rgba(20, 184, 166, 0.35);
    border-radius: 14px;
    pointer-events: none;
    opacity: 0.7;
}

.premium-settings-card {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.9));
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.premium-settings-card::after {
    content: "";
    position: absolute;
    width: 7rem;
    aspect-ratio: 1;
    border-radius: 50%;
    right: -1.7rem;
    bottom: -2rem;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 67%);
    opacity: 0.85;
    pointer-events: none;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
}

.premium-shell .hero-layout,
.premium-shell .app-page,
.premium-shell .narrow-page {
    position: relative;
}

.premium-shell .hero-layout::before,
.premium-shell .app-page::before,
.premium-shell .narrow-page::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0.22)),
        radial-gradient(circle at 95% 0%, rgba(255, 255, 255, 0.8), transparent 55%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    opacity: 0.8;
}

.premium-shell .hero-layout::before,
.premium-shell .app-page::before,
.premium-shell .narrow-page::before {
    z-index: 0;
}

.premium-shell .hero-layout > *,
.premium-shell .app-page > *,
.premium-shell .narrow-page > * {
    position: relative;
    z-index: 1;
}

.premium-shell .panel,
.premium-shell .arena-preview,
.premium-shell .game-root,
.premium-shell .reward-card,
.premium-shell .claim-card,
.premium-shell .skin-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.86));
    border: 1px solid var(--line-soft);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
}
.account-page .login-panel {
    max-width: 1040px;
}

.premium-auth-page {
    display: grid;
    place-items: center;
    padding-block: 1.6rem;
}

.premium-auth-page .login-panel {
    width: min(540px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 1.25rem;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 255, 0.92));
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.13);
    position: relative;
    overflow: hidden;
}

.premium-auth-page .login-panel::before {
    content: "";
    position: absolute;
    width: 8rem;
    aspect-ratio: 1;
    border-radius: 50%;
    right: -2.4rem;
    top: -2.4rem;
    background: radial-gradient(circle, rgba(255, 202, 58, 0.24), transparent 66%);
    pointer-events: none;
}

.premium-auth-page .panel-heading {
    gap: 0.95rem;
    margin-bottom: 1rem;
}

.premium-auth-page .icon-bubble {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.1rem;
}

.account-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.account-grid .stack-form {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1rem;
}

.premium-auth-page .stack-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(249, 252, 255, 0.9));
}

.premium-auth-card::after {
    content: "";
    position: absolute;
    width: 9rem;
    aspect-ratio: 1;
    border-radius: 50%;
    right: -2.6rem;
    bottom: -2.4rem;
    background: radial-gradient(circle, rgba(255, 202, 58, 0.3), transparent 64%);
    pointer-events: none;
}

.auth-welcome-page,
.auth-form-page {
    align-items: center;
    display: grid;
    min-height: 100svh;
    padding: 1rem;
}

.auth-welcome-hero,
.auth-form-card {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    width: min(100%, 960px);
}

.auth-welcome-hero {
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 252, 255, 0.96) 46%, rgba(240, 253, 250, 0.96) 100%),
        repeating-linear-gradient(45deg, rgba(20, 184, 166, 0.06) 0 10px, transparent 10px 20px);
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.auth-welcome-copy {
    background: linear-gradient(135deg, rgba(24, 35, 52, 0.98), rgba(15, 118, 110, 0.96));
    border-radius: 8px;
    color: #fff;
    min-height: 15rem;
    padding: clamp(1.2rem, 5vw, 2.6rem);
}

.auth-kicker {
    color: var(--yellow);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.auth-welcome-copy h1,
.auth-form-heading h1 {
    letter-spacing: 0;
    margin: 0;
}

.auth-welcome-copy h1 {
    font-size: clamp(2.2rem, 10vw, 4.6rem);
    line-height: 0.95;
}

.auth-welcome-copy p,
.auth-form-heading p {
    color: inherit;
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0.85rem 0 0;
    max-width: 38rem;
}

.auth-choice-grid {
    display: grid;
    gap: 0.8rem;
}

.auth-choice-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 0.9rem;
    grid-template-columns: auto 1fr;
    min-height: 7.5rem;
    padding: 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-choice-card:hover,
.auth-choice-card:focus-visible {
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
    transform: translateY(-2px);
}

.auth-choice-card strong {
    display: block;
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.05;
}

.auth-choice-card small {
    color: var(--ink-soft);
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.choice-icon {
    align-items: center;
    aspect-ratio: 1;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-grid;
    font-size: 1.8rem;
    justify-content: center;
    width: 3.6rem;
}

.primary-choice {
    border-color: rgba(20, 184, 166, 0.38);
}

.primary-choice .choice-icon {
    background: #e6fffa;
}

.secondary-choice {
    border-color: rgba(255, 202, 58, 0.55);
}

.secondary-choice .choice-icon {
    background: #fff7d6;
}

.auth-parent-link,
.auth-secondary-actions {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    padding: 0.9rem 1rem;
}

.auth-parent-link a,
.auth-secondary-actions a,
.back-link {
    color: var(--teal-dark);
    font-weight: 900;
}

.auth-form-card {
    background: rgba(255, 255, 255, 0.97);
    padding: 1rem;
    width: min(100%, 560px);
}

.auth-form-heading {
    background: linear-gradient(135deg, rgba(24, 35, 52, 0.98), rgba(59, 130, 246, 0.92));
    border-radius: 8px;
    color: #fff;
    margin-bottom: 1rem;
    padding: 1.1rem;
}

.auth-form-heading .auth-kicker {
    color: #fff0a8;
}

.back-link {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.auth-stack-form {
    display: grid;
    gap: 0.75rem;
}

.auth-stack-form label {
    font-weight: 900;
}

.auth-stack-form input {
    min-height: 3.35rem;
}

.field-hint {
    color: var(--muted);
    display: block;
    font-weight: 800;
    margin-top: -0.45rem;
}

.auth-submit {
    min-height: 3.6rem;
    width: 100%;
}

.auth-secondary-actions {
    margin-top: 1rem;
    justify-content: space-between;
}

.helper-strip {
    align-items: center;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
}

[data-notification-nav] {
    align-items: center;
    display: inline-flex;
    gap: 0.3rem;
}

[data-notification-count] {
    background: var(--coral);
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: inline-grid;
    font-size: 0.7rem;
    font-weight: 950;
    min-width: 1.25rem;
    padding: 0.05rem 0.28rem;
    place-items: center;
}

.nav-actions a.has-notifications {
    color: #be123c;
}

.kid-shell {
    padding-bottom: 8.9rem;
}

.kid-topbar {
    gap: 0.75rem;
}

.kid-topbar .player-pill {
    max-width: min(48vw, 20rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.arena-brand {
    gap: 0.58rem;
    min-width: 0;
}

.arena-brand > .brand-mark,
.arena-brand > span:not(.arena-logo) {
    display: none;
}

.arena-logo {
    align-items: center;
    display: inline-grid;
    gap: 0.5rem;
    grid-auto-flow: column;
    min-width: 0;
}

.arena-logo-mark {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
        #fff;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: grid;
    height: 3.1rem;
    overflow: hidden;
    place-items: center;
    width: 3.1rem;
}

.arena-logo-mark img {
    display: block;
    height: 100%;
    width: 100%;
}

.arena-logo-copy {
    display: grid;
    line-height: 1.05;
    min-width: 0;
}

.arena-logo-copy strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 1000;
    white-space: nowrap;
}

.arena-logo-copy small {
    color: var(--teal-dark);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-arena-logo {
    margin-bottom: 0.9rem;
}

.hero-arena-logo .arena-logo-mark {
    height: 4.4rem;
    width: 4.4rem;
}

.hero-arena-logo .arena-logo-copy strong {
    font-size: clamp(1.25rem, 5vw, 2rem);
}

.hero-arena-logo .arena-logo-copy small {
    font-size: 0.8rem;
}

.hero-title-clean + .spark-label,
.hero-title-clean + .spark-label + h1,
.hero-title-clean + .spark-label + h1 + .lead {
    display: none;
}

.home-page {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.08) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(225deg, rgba(59, 130, 246, 0.06) 25%, transparent 25%) 0 0 / 34px 34px,
        linear-gradient(180deg, #eefbff 0%, #f8fbff 52%, #eef8ff 100%);
}

.home-screen {
    display: grid;
    gap: 1.15rem;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 1.6rem) 0 2.4rem;
    width: min(1120px, calc(100% - 2rem));
}

.home-hero-card,
.home-skins-card,
.home-challenge-card {
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94);
    overflow: hidden;
    position: relative;
}

.home-hero-card {
    align-items: center;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 251, 255, 0.94) 48%, rgba(208, 244, 255, 0.9) 100%),
        repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 10px, transparent 10px 24px);
    display: grid;
    gap: 1rem;
    min-height: clamp(28rem, 58vw, 36rem);
    padding: clamp(1.1rem, 4vw, 2.2rem);
}

.home-hero-card::before {
    background:
        linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.16) 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 24px, transparent 24px 48px);
    bottom: -7rem;
    content: "";
    height: 16rem;
    left: -8%;
    position: absolute;
    right: -8%;
    transform: rotate(-4deg);
}

.home-hero-copy {
    max-width: 36rem;
    position: relative;
    z-index: 2;
}

.home-hero-logo {
    margin-bottom: 1.05rem;
}

.home-hero-logo .arena-logo-mark {
    border-radius: 18px;
    height: clamp(3.8rem, 10vw, 5.6rem);
    width: clamp(3.8rem, 10vw, 5.6rem);
}

.home-hero-logo .arena-logo-copy strong {
    font-size: clamp(1.4rem, 6vw, 3.1rem);
}

.home-hero-logo .arena-logo-copy small {
    color: var(--teal-dark);
    font-size: clamp(0.72rem, 2.2vw, 1.05rem);
}

.home-feature-row {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: clamp(0.8rem, 2.2vw, 1rem);
    font-weight: 850;
    column-gap: 0.95rem;
    row-gap: 0.45rem;
    margin: 0 0 1.35rem;
}

.home-feature-row span {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.home-feature-row span + span::before {
    display: none;
}

.home-feature-row span + span {
    border-left: 0;
    padding-left: 0;
}

.home-feature-row i {
    color: var(--yellow);
    font-style: normal;
}

.home-feature-row span:nth-child(2) i {
    color: #fb7185;
}

.home-feature-row span:nth-child(3) i {
    color: #8b5cf6;
}

.home-hero-copy h1 {
    font-size: clamp(2.45rem, 7vw, 4.8rem);
    line-height: 0.96;
    margin: 0 0 1.05rem;
}

.home-hero-copy h1 span,
.home-hero-copy h1 strong {
    display: block;
    white-space: nowrap;
}

.home-hero-copy h1 strong {
    background: linear-gradient(135deg, #0ea5e9, #2563eb 58%, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero-copy p {
    color: #56657a;
    font-size: clamp(1.05rem, 3vw, 1.45rem);
    font-weight: 650;
    line-height: 1.45;
    margin: 0;
    max-width: 32rem;
}

.home-hero-visual {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 17rem;
    position: relative;
    z-index: 2;
}

.home-hero-avatar {
    animation: heroLift 3.8s ease-in-out infinite;
    width: clamp(13.5rem, 43vw, 24rem);
}

.home-hero-sidekick {
    bottom: 1.1rem;
    left: clamp(0.4rem, 8vw, 3rem);
    position: absolute;
    width: clamp(4.8rem, 13vw, 7rem);
}

.home-trophy-ghost {
    bottom: 1.8rem;
    color: rgba(59, 130, 246, 0.16);
    display: grid;
    height: clamp(5rem, 15vw, 8rem);
    place-items: center;
    position: absolute;
    right: clamp(0.2rem, 7vw, 4rem);
    width: clamp(5rem, 15vw, 8rem);
}

.home-trophy-ghost svg {
    height: 100%;
    width: 100%;
}

.home-confetti {
    border-radius: 0.18rem;
    display: block;
    height: 0.8rem;
    position: absolute;
    transform: rotate(18deg);
    width: 0.8rem;
}

.home-confetti.c1 {
    background: #facc15;
    right: 24%;
    top: 13%;
}

.home-confetti.c2 {
    background: #fb7185;
    right: 9%;
    top: 26%;
}

.home-confetti.c3 {
    background: #38bdf8;
    right: 37%;
    top: 49%;
}

.home-entry-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: -2.15rem;
    position: relative;
    z-index: 4;
}

.home-entry-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: var(--ink);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: clamp(5.2rem, 13vw, 7rem);
    padding: clamp(0.65rem, 2.1vw, 1rem);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-entry-card:hover,
.home-entry-card:focus-visible {
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.2);
    transform: translateY(-3px);
}

.home-entry-card strong {
    display: grid;
    font-size: clamp(0.95rem, 2.8vw, 1.55rem);
    font-weight: 1000;
    line-height: 1.05;
}

.home-entry-card small {
    color: inherit;
    font-size: 0.78em;
    font-weight: 800;
}

.home-entry-card em {
    color: currentColor;
    font-style: normal;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    font-weight: 1000;
}

.entry-child {
    background:
        radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.34), transparent 24%),
        linear-gradient(135deg, #22d3ee, #2563eb);
    color: #fff;
}

.home-role-portrait,
.home-phone-icon {
    border: 4px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
    display: block;
    height: clamp(3rem, 8vw, 4.55rem);
    position: relative;
    width: clamp(3rem, 8vw, 4.55rem);
}

.home-role-portrait {
    background: linear-gradient(180deg, #ffe8c7, #ffbf8f);
    overflow: hidden;
}

.home-role-portrait::before {
    background: #0f172a;
    border-radius: 45% 45% 52% 52%;
    content: "";
    height: 42%;
    left: 18%;
    position: absolute;
    top: 8%;
    width: 64%;
}

.home-role-portrait::after {
    background:
        radial-gradient(circle, #0f172a 0 22%, transparent 24%) 33% 42% / 0.75rem 0.75rem no-repeat,
        radial-gradient(circle, #0f172a 0 22%, transparent 24%) 67% 42% / 0.75rem 0.75rem no-repeat,
        linear-gradient(#0f172a, #0f172a) 50% 66% / 1.1rem 0.16rem no-repeat;
    content: "";
    inset: 0;
    position: absolute;
}

.home-role-portrait i {
    background: #14b8a6;
    border-radius: 999px;
    bottom: -0.18rem;
    height: 36%;
    left: 12%;
    position: absolute;
    right: 12%;
}

.parent-face {
    background: linear-gradient(180deg, #ffd8c9, #f7a6a6);
}

.parent-face::before {
    background: #7c2d12;
    border-radius: 48% 48% 36% 36%;
    height: 54%;
    top: 4%;
}

.parent-face i {
    background: #fb7185;
}

.home-phone-icon {
    background:
        linear-gradient(180deg, #6ee7f9, #2563eb);
    border-radius: 18px;
}

.home-phone-icon::before {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 0.35rem;
    content: "";
    height: 8%;
    left: 36%;
    position: absolute;
    right: 36%;
    top: 10%;
}

.home-skins-card {
    align-items: center;
    background:
        radial-gradient(circle at 80% 22%, rgba(103, 232, 249, 0.22), transparent 26%),
        linear-gradient(135deg, #15105d 0%, #2f168f 45%, #1e3a8a 100%);
    color: #fff;
    display: grid;
    gap: 1rem;
    min-height: clamp(15rem, 36vw, 19rem);
    padding: clamp(1rem, 3vw, 1.55rem);
    padding-bottom: clamp(1.45rem, 3.6vw, 2.2rem);
}

.home-skins-card::before {
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 8px, transparent 8px 18px);
    bottom: 0;
    content: "";
    height: 0.55rem;
    left: 0;
    position: absolute;
    right: 0;
}

.home-skins-copy {
    position: relative;
    z-index: 2;
}

.home-pill {
    align-items: center;
    background: linear-gradient(135deg, #14b8a6, #38bdf8);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: clamp(0.72rem, 2vw, 0.92rem);
    font-weight: 1000;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    padding: 0.42rem 0.72rem;
    text-transform: uppercase;
}

.home-skins-card h2 {
    color: #fff;
    font-size: clamp(1.55rem, 5vw, 2.25rem);
    line-height: 1;
    margin: 0 0 0.6rem;
}

.home-skins-card h2 small {
    background: #facc15;
    border-radius: 999px;
    color: #7c2d12;
    display: inline-flex;
    font-size: 0.42em;
    margin-left: 0.35rem;
    padding: 0.24rem 0.42rem;
    vertical-align: middle;
}

.home-skins-card p {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.95rem, 2.3vw, 1.15rem);
    line-height: 1.5;
    max-width: 24rem;
}

.home-skin-path {
    align-items: center;
    display: flex;
    gap: 0.42rem;
    margin: 1.1rem 0 0.25rem;
    transform: translateY(-1.15rem);
}

.home-skin-path > div {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    display: grid;
    height: clamp(3.2rem, 9vw, 4.6rem);
    justify-items: center;
    position: relative;
    width: clamp(3.2rem, 9vw, 4.6rem);
}

.home-path-avatar {
    width: 82%;
}

.home-skin-path b {
    align-items: center;
    background: #22c55e;
    border: 2px solid #fff;
    border-radius: 999px;
    bottom: -0.2rem;
    color: #fff;
    display: inline-flex;
    font-size: 0.75rem;
    height: 1.35rem;
    justify-content: center;
    position: absolute;
    right: -0.2rem;
    width: 1.35rem;
}

.home-skin-path i {
    border-top: 3px dashed rgba(255, 255, 255, 0.48);
    width: clamp(1.2rem, 4vw, 2.3rem);
}

.home-skin-path .locked {
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 1000;
}

.home-rocket-wrap {
    min-height: 12rem;
    position: relative;
    z-index: 2;
}

.home-rocket-svg {
    animation: rocketCruise 4.2s ease-in-out infinite;
    display: block;
    margin: 0 auto;
    max-width: 27rem;
    width: min(100%, 25rem);
}

.home-challenge-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96)),
        repeating-linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0 8px, transparent 8px 20px);
    display: grid;
    justify-items: center;
    padding: clamp(1rem, 3vw, 1.4rem);
}

.challenge-pill {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    margin-bottom: 0.65rem;
}

.home-math-preview {
    align-items: center;
    color: #0f172a;
    display: grid;
    font-size: clamp(3.25rem, 14vw, 7.4rem);
    font-weight: 1000;
    gap: clamp(0.35rem, 2vw, 1.3rem);
    grid-auto-flow: column;
    line-height: 1;
}

.home-math-preview b {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-math-preview strong {
    color: #fb3f7f;
}

.home-challenge-stats {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.9rem 0;
    width: min(100%, 48rem);
}

.home-challenge-stats article {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(219, 229, 239, 0.96);
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.12rem 0.45rem;
    grid-template-columns: auto 1fr;
    min-height: 4.3rem;
    padding: 0.62rem;
}

.home-challenge-stats i {
    border-radius: 999px;
    display: block;
    grid-row: span 2;
    height: 2.35rem;
    width: 2.35rem;
}

.timer-dot { background: linear-gradient(135deg, #14b8a6, #67e8f9); }
.star-dot { background: linear-gradient(135deg, #facc15, #f97316); }
.streak-dot { background: linear-gradient(135deg, #fb7185, #f97316); }

.home-challenge-stats span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 850;
}

.home-challenge-stats strong {
    color: #1e293b;
    font-size: clamp(0.88rem, 2.4vw, 1.08rem);
    font-weight: 1000;
}

.home-progress-line {
    align-items: center;
    background: #e6edf5;
    border-radius: 999px;
    display: flex;
    height: 1.25rem;
    margin: 0.3rem 0 0.65rem;
    padding: 0.18rem;
    position: relative;
    width: min(100%, 48rem);
}

.home-progress-line span {
    background: linear-gradient(90deg, #22c55e, #facc15, #fb7185);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: 86%;
}

.home-progress-line b {
    align-items: center;
    background: #fff;
    border: 3px solid #facc15;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
    color: #f59e0b;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    position: absolute;
    right: 11%;
    width: 2rem;
}

.home-challenge-card p {
    color: #64748b;
    font-weight: 800;
    margin: 0;
    text-align: center;
}

.home-challenge-card p strong {
    color: #7c3aed;
}

.kid-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(0.6rem + env(safe-area-inset-bottom));
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    width: min(940px, calc(100% - 1rem));
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 255, 0.92)),
        #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.kid-bottom-nav a {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.12rem;
    min-height: 3.45rem;
    padding: 0.4rem 0.25rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    font-size: 0.73rem;
    font-weight: 900;
    text-align: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.kid-bottom-nav a:hover,
.kid-bottom-nav a:focus-visible,
.kid-bottom-nav a.has-notifications {
    border-color: rgba(20, 184, 166, 0.42);
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.13), rgba(255, 255, 255, 0.92));
    box-shadow: 0 10px 22px rgba(20, 184, 166, 0.16);
    transform: translateY(-2px);
}

.kid-bottom-nav .game-svg-icon {
    display: grid;
    place-items: center;
    width: 1.95rem;
    height: 1.95rem;
    padding: 0.24rem;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.45), transparent 28%),
        linear-gradient(145deg, rgba(20, 184, 166, 0.95), rgba(59, 130, 246, 0.95));
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16), inset 0 -3px 0 rgba(15, 23, 42, 0.13);
}

.kid-bottom-nav a:nth-child(1) .game-svg-icon { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.kid-bottom-nav a:nth-child(2) .game-svg-icon { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.kid-bottom-nav a:nth-child(3) .game-svg-icon { background: linear-gradient(145deg, #fb7185, #be123c); }
.kid-bottom-nav a:nth-child(4) .game-svg-icon { background: linear-gradient(145deg, #facc15, #f97316); }
.kid-bottom-nav a:nth-child(5) .game-svg-icon { background: linear-gradient(145deg, #2dd4bf, #0f766e); }
.kid-bottom-nav a:nth-child(6) .game-svg-icon { background: linear-gradient(145deg, #60a5fa, #1d4ed8); }
.kid-bottom-nav a:nth-child(7) .game-svg-icon { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.kid-bottom-nav a:nth-child(8) .game-svg-icon { background: linear-gradient(145deg, #94a3b8, #334155); }

.kid-bottom-nav strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kid-bottom-nav [data-notification-count] {
    position: absolute;
    top: 0.18rem;
    right: 0.35rem;
}

.kid-bottom-nav.grouped {
    align-items: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
    padding: 0.46rem;
}

.kid-nav-group {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.72)),
        #fff;
    border: 1px solid rgba(219, 229, 239, 0.9);
    border-radius: 16px;
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.28rem;
}

.kid-nav-group > span {
    color: #64748b;
    display: block;
    font-size: 0.58rem;
    font-weight: 1000;
    letter-spacing: 0.08em;
    line-height: 1;
    overflow: hidden;
    padding: 0.1rem 0.14rem 0;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.kid-nav-group > div {
    display: grid;
    gap: 0.24rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kid-bottom-nav.grouped a {
    gap: 0.08rem;
    min-height: 3.05rem;
    padding: 0.28rem 0.14rem;
    border-radius: 12px;
}

.kid-bottom-nav.grouped .game-svg-icon {
    height: 1.58rem;
    width: 1.58rem;
}

.kid-bottom-nav.grouped strong {
    font-size: 0.61rem;
    line-height: 1.05;
}

.kid-nav-group:nth-child(1) a:nth-child(1) .game-svg-icon { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.kid-nav-group:nth-child(1) a:nth-child(2) .game-svg-icon { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.kid-nav-group:nth-child(2) a:nth-child(1) .game-svg-icon { background: linear-gradient(145deg, #fb7185, #be123c); }
.kid-nav-group:nth-child(2) a:nth-child(2) .game-svg-icon { background: linear-gradient(145deg, #2dd4bf, #0f766e); }
.kid-nav-group:nth-child(3) a:nth-child(1) .game-svg-icon { background: linear-gradient(145deg, #facc15, #f97316); }
.kid-nav-group:nth-child(3) a:nth-child(2) .game-svg-icon { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.kid-nav-group:nth-child(4) a:nth-child(1) .game-svg-icon { background: linear-gradient(145deg, #60a5fa, #1d4ed8); }
.kid-nav-group:nth-child(4) a:nth-child(2) .game-svg-icon { background: linear-gradient(145deg, #94a3b8, #334155); }

.notification-list {
    display: grid;
    gap: 0.8rem;
}

.notification-card {
    align-items: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.notification-card.unread {
    background: linear-gradient(135deg, rgba(255, 202, 58, 0.2), rgba(20, 184, 166, 0.1)), #fff;
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.12);
}

.notification-card h3 {
    margin: 0.35rem 0 0.35rem;
}

.notification-card p {
    margin-bottom: 0.45rem;
}

.notification-card small {
    color: var(--muted);
    font-weight: 800;
}

.notification-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.notification-recipient-picker {
    display: grid;
    gap: 0.6rem;
}

.notification-recipient-picker details {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
}

.notification-recipient-picker summary {
    cursor: pointer;
    font-weight: 900;
}

.muted-link {
    color: #0f766e;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    text-decoration: none;
}

.muted-link:hover {
    text-decoration: underline;
}

.code-pill {
    background: #0f172a;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.75rem;
}

.code-pill.large {
    font-size: 1.65rem;
    margin: 0.5rem 0.75rem 0.5rem 0;
    padding: 0.55rem 1rem;
}

.game-avatar {
    --skin-main: #14b8a6;
    --skin-dark: #0f766e;
    --skin-light: #99f6e4;
    --skin-gem: #ffca3a;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    position: relative;
    width: 8.5rem;
}

.svg-game-avatar {
    filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.15));
}

.arena-avatar-svg,
.arena-sidekick-svg {
    display: block;
    height: 100%;
    overflow: visible;
    width: 100%;
}

.avatar-float {
    transform-origin: 80px 112px;
    animation: avatarFloatSvg 3.4s ease-in-out infinite;
}

.avatar-cape-svg {
    transform-origin: 80px 92px;
    animation: capeWaveSvg 2.8s ease-in-out infinite;
}

.avatar-spark-svg {
    transform-box: fill-box;
    transform-origin: center;
    animation: sparklePopSvg 1.9s ease-in-out infinite;
}

.avatar-spark-svg.spark-two {
    animation-delay: 0.55s;
}

.game-avatar span {
    position: absolute;
}

.avatar-aura {
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), transparent 18%),
        radial-gradient(circle, rgba(20, 184, 166, 0.24), transparent 68%);
    border-radius: 50%;
    inset: 0;
    opacity: 0.82;
    animation: avatarAura 2.8s ease-in-out infinite;
}

@supports (background: color-mix(in srgb, #fff 50%, transparent)) {
    .avatar-aura {
        background:
            radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), transparent 18%),
            radial-gradient(circle, color-mix(in srgb, var(--skin-light) 65%, transparent), transparent 68%);
    }
}

.avatar-shadow {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    bottom: 0.25rem;
    filter: blur(2px);
    height: 0.9rem;
    width: 5.9rem;
}

.avatar-head {
    background: linear-gradient(145deg, var(--skin-light), var(--skin-main));
    border: 0.25rem solid #fff;
    border-radius: 34% 34% 40% 40%;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.18);
    height: 4.85rem;
    top: 1.1rem;
    width: 5.4rem;
}

.avatar-head i {
    background:
        radial-gradient(circle, #fff 0 24%, transparent 25%) 24% 52% / 1.1rem 1.1rem no-repeat,
        radial-gradient(circle, #fff 0 24%, transparent 25%) 76% 52% / 1.1rem 1.1rem no-repeat;
    display: block;
    height: 100%;
    width: 100%;
}

.avatar-visor {
    background: rgba(15, 23, 42, 0.82);
    border: 0.18rem solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    height: 1.12rem;
    top: 3.05rem;
    width: 3.5rem;
}

.avatar-cheeks {
    background:
        radial-gradient(circle, rgba(251, 113, 133, 0.72) 0 42%, transparent 44%) left center / 1rem 1rem no-repeat,
        radial-gradient(circle, rgba(251, 113, 133, 0.72) 0 42%, transparent 44%) right center / 1rem 1rem no-repeat;
    height: 1rem;
    top: 3.8rem;
    width: 4.45rem;
}

.avatar-body {
    background: linear-gradient(145deg, var(--skin-main), var(--skin-dark));
    border: 0.25rem solid #fff;
    border-radius: 1.7rem 1.7rem 2rem 2rem;
    bottom: 0.8rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.16);
    height: 3.1rem;
    width: 5.8rem;
}

.avatar-cape {
    background: linear-gradient(145deg, rgba(255, 202, 58, 0.95), rgba(251, 113, 133, 0.9));
    border: 0.18rem solid rgba(255, 255, 255, 0.75);
    border-radius: 0.8rem 0.8rem 2.2rem 2.2rem;
    bottom: 0.75rem;
    height: 3.25rem;
    transform: translateX(1.85rem) rotate(-9deg);
    width: 2.45rem;
    z-index: -1;
}

.avatar-emblem {
    background: var(--skin-gem);
    border: 0.18rem solid #fff;
    border-radius: 50%;
    bottom: 1.7rem;
    box-shadow: 0 0.65rem 1.2rem rgba(15, 23, 42, 0.2);
    display: grid;
    font-size: 1.2rem;
    height: 2.2rem;
    place-items: center;
    width: 2.2rem;
}

.avatar-spark {
    background: var(--skin-gem);
    clip-path: polygon(50% 0, 64% 34%, 100% 36%, 71% 57%, 82% 100%, 50% 74%, 18% 100%, 29% 57%, 0 36%, 36% 34%);
    height: 1rem;
    opacity: 0.9;
    top: 1.05rem;
    width: 1rem;
    animation: sparklePop 1.8s ease-in-out infinite;
}

.avatar-spark-left {
    left: 0.95rem;
}

.avatar-spark-right {
    right: 0.8rem;
    top: 2rem;
    transform: scale(0.72);
    animation-delay: 0.55s;
}

.skin-turbo {
    --skin-main: #3b82f6;
    --skin-dark: #1d4ed8;
    --skin-light: #bfdbfe;
    --skin-gem: #ffca3a;
}

.skin-raketa {
    --skin-main: #fb7185;
    --skin-dark: #be123c;
    --skin-light: #ffe4e6;
    --skin-gem: #38bdf8;
}

.skin-majstor {
    --skin-main: #8b5cf6;
    --skin-dark: #6d28d9;
    --skin-light: #ddd6fe;
    --skin-gem: #22c55e;
}

.skin-kralj {
    --skin-main: #f59e0b;
    --skin-dark: #b45309;
    --skin-light: #fef3c7;
    --skin-gem: #a855f7;
}

.skin-legenda {
    --skin-main: #0f172a;
    --skin-dark: #020617;
    --skin-light: #67e8f9;
    --skin-gem: #facc15;
}

.hero-game-avatar {
    width: clamp(8.5rem, 28vw, 13.5rem);
}

.hero-game-avatar.compact {
    width: 7.5rem;
}

.battle-game-avatar {
    width: 5.8rem;
}

.skin-card-avatar {
    width: 5.4rem;
}

.tiny-game-avatar {
    width: 3.7rem;
}

.arena-sidekick {
    --side-main: #ffca3a;
    --side-dark: #f97316;
    --side-light: #fff7ad;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    position: relative;
    width: 5.9rem;
}

.svg-sidekick {
    filter: drop-shadow(0 12px 20px rgba(15, 23, 42, 0.14));
}

.sidekick-float {
    transform-origin: 66px 88px;
    animation: sidekickFloatSvg 2.6s ease-in-out infinite;
}

.sidekick-spark {
    transform-box: fill-box;
    transform-origin: center;
    animation: sparklePopSvg 1.7s ease-in-out infinite;
}

.arena-sidekick span {
    position: absolute;
}

.sidekick-shadow {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    bottom: 0.1rem;
    filter: blur(2px);
    height: 0.65rem;
    width: 4.4rem;
}

.sidekick-body {
    background: linear-gradient(145deg, var(--side-light), var(--side-main));
    border: 0.22rem solid #fff;
    border-radius: 44% 44% 38% 38%;
    box-shadow: 0 1rem 1.6rem rgba(15, 23, 42, 0.16), inset 0 -0.45rem 0 rgba(15, 23, 42, 0.12);
    height: 4.15rem;
    top: 0.65rem;
    width: 4.6rem;
    animation: sidekickFloat 2.1s ease-in-out infinite;
}

.sidekick-body i {
    background:
        radial-gradient(circle, #0f172a 0 23%, transparent 24%) 32% 48% / 1rem 1rem no-repeat,
        radial-gradient(circle, #0f172a 0 23%, transparent 24%) 68% 48% / 1rem 1rem no-repeat;
    display: block;
    height: 100%;
    width: 100%;
}

.sidekick-face {
    background: rgba(15, 23, 42, 0.86);
    border-radius: 999px;
    height: 0.34rem;
    top: 3.4rem;
    width: 1.55rem;
}

.sidekick-sign {
    align-items: center;
    background: #fff;
    border: 0.18rem solid var(--side-dark);
    border-radius: 999px;
    box-shadow: 0 0.55rem 1rem rgba(15, 23, 42, 0.16);
    color: var(--side-dark);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 1000;
    height: 1.7rem;
    justify-content: center;
    right: 0;
    top: 0.35rem;
    width: 2.35rem;
}

.sidekick-flag {
    background: linear-gradient(145deg, var(--teal), var(--blue));
    border: 0.16rem solid #fff;
    border-radius: 0.45rem 0.45rem 0.45rem 0;
    height: 1.25rem;
    left: 0.25rem;
    top: 0.95rem;
    transform: rotate(-12deg);
    width: 1.75rem;
}

.sidekick-blic { --side-main: #ffca3a; --side-dark: #f97316; --side-light: #fff7ad; }
.sidekick-turbo { --side-main: #60a5fa; --side-dark: #1d4ed8; --side-light: #dbeafe; }
.sidekick-raketa { --side-main: #fb7185; --side-dark: #be123c; --side-light: #ffe4e6; }
.sidekick-majstor { --side-main: #a78bfa; --side-dark: #6d28d9; --side-light: #ede9fe; }
.sidekick-kralj { --side-main: #f59e0b; --side-dark: #92400e; --side-light: #fef3c7; }
.sidekick-legenda { --side-main: #67e8f9; --side-dark: #0f172a; --side-light: #cffafe; }

.arena-sidekick.cheer .sidekick-body,
.arena-sidekick.celebrate .sidekick-body {
    animation: sidekickCheer 0.7s ease both;
}

.arena-sidekick.cheer .sidekick-float,
.arena-sidekick.celebrate .sidekick-float {
    animation: sidekickCheerSvg 0.72s ease both;
}

.arena-sidekick.celebrate .sidekick-sign {
    animation: sidekickSign 0.8s ease both;
}

.arena-sidekick.oops .sidekick-body {
    animation: sidekickOops 0.46s ease both;
}

.arena-sidekick.oops .sidekick-float {
    animation: sidekickOopsSvg 0.46s ease both;
}

.hero-sidekick {
    margin-left: -2.2rem;
    transform: translateY(1.4rem);
    width: 6.25rem;
}

.battle-sidekick {
    width: 4.9rem;
}

.result-sidekick,
.preview-sidekick,
.hub-sidekick {
    width: 5.25rem;
}

.hub-mascot-card {
    align-items: center;
    align-self: stretch;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 253, 250, 0.9)),
        #fff;
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-width: min(100%, 14rem);
    padding: 0.85rem;
}

.hub-game-avatar {
    width: 6.5rem;
}

.hub-mascot-card .hub-sidekick {
    margin-top: -2.2rem;
    margin-left: 4rem;
}

.hub-mascot-card strong {
    font-size: 0.9rem;
    font-weight: 950;
    text-align: center;
}

.level-banner {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(59, 130, 246, 0.94)),
        #0f766e;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(15, 118, 110, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.level-banner::after {
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.13) 0 8px, transparent 8px 16px);
    bottom: 0;
    content: "";
    height: 0.45rem;
    left: 0;
    position: absolute;
    right: 0;
}

.level-banner::before {
    content: "";
    position: absolute;
    width: 7rem;
    aspect-ratio: 1;
    border-radius: 999px;
    right: -2rem;
    top: -2rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 68%);
    filter: blur(8px);
    opacity: 0.7;
}

.level-banner h2,
.level-banner p {
    color: #fff;
    margin-bottom: 0.25rem;
}

.level-banner .status-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.level-banner.compact {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(20, 184, 166, 0.92));
}

.xp-panel {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem;
}

.xp-panel strong {
    font-size: 1.25rem;
}

.xp-panel small {
    color: rgba(255, 255, 255, 0.84);
    font-weight: 850;
}

.xp-bar {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    height: 0.85rem;
    overflow: hidden;
}

.xp-bar i {
    background: linear-gradient(90deg, #ffca3a, #22c55e, #fff);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0.4rem;
}

.xp-result-card .xp-bar {
    margin-top: 0.45rem;
}

.reward-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 1rem;
}

.reward-level-guide {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
    margin: 1rem 0;
}

.reward-level-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.reward-level-card span,
.reward-tier-pill {
    display: inline-flex;
    width: fit-content;
    border-radius: 8px;
    padding: 0.28rem 0.55rem;
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal-dark);
    font-size: 0.78rem;
    font-weight: 950;
}

.reward-level-head,
.reward-card-visual {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.reward-card-visual {
    align-items: flex-start;
}

.reward-level-card h2 {
    margin: 0;
}

.reward-level-card p {
    margin: 0;
}

.reward-level-card strong {
    color: var(--ink);
}

.reward-level-card small,
.reward-tier-hint {
    color: var(--muted);
    font-weight: 780;
}

.reward-tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
}

.reward-tier-pill small {
    color: inherit;
    font-size: 0.68rem;
}

.reward-tier-mala {
    border-color: rgba(20, 184, 166, 0.24);
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.14), #fff);
}

.reward-tier-mala .reward-tier-icon,
.reward-tier-mala .reward-card-icon {
    background: linear-gradient(145deg, #34d399, #0f766e);
}

.reward-tier-dobra {
    border-color: rgba(59, 130, 246, 0.22);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.13), #fff);
}

.reward-tier-dobra .reward-tier-icon,
.reward-tier-dobra .reward-card-icon {
    background: linear-gradient(145deg, #60a5fa, #1d4ed8);
}

.reward-tier-velika {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.16), #fff);
}

.reward-tier-velika .reward-tier-icon,
.reward-tier-velika .reward-card-icon {
    background: linear-gradient(145deg, #facc15, #ea580c);
}

.reward-tier-super {
    border-color: rgba(139, 92, 246, 0.26);
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.14), #fff);
}

.reward-tier-super .reward-tier-icon,
.reward-tier-super .reward-card-icon {
    background: linear-gradient(145deg, #a78bfa, #6d28d9);
}

.reward-tier-premium {
    border-color: rgba(251, 113, 133, 0.24);
    background: linear-gradient(145deg, rgba(251, 113, 133, 0.16), rgba(253, 224, 71, 0.14), #fff);
}

.reward-tier-premium .reward-tier-icon,
.reward-tier-premium .reward-card-icon {
    background: linear-gradient(145deg, #facc15, #fb7185 52%, #7c3aed);
}

.reward-card,
.claim-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1rem;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.reward-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 35%, rgba(255, 255, 255, 0.42) 45%, transparent 56%),
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.5), transparent 34%);
    opacity: 0.72;
    pointer-events: none;
}

.reward-card > *,
.claim-card > * {
    position: relative;
    z-index: 1;
}

.reward-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reward-meta span,
.status-pill {
    background: #fef3c7;
    border-radius: 999px;
    color: #92400e;
    display: inline-flex;
    font-weight: 800;
    padding: 0.35rem 0.7rem;
}

.status-pill {
    background: #e0f2fe;
    color: #075985;
}

.compact-form {
    gap: 0.55rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.mini-grid span {
    background: rgba(20, 184, 166, 0.1);
    border-radius: 14px;
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem;
}

.mini-grid strong {
    font-size: 1.1rem;
}

.mini-grid small {
    color: #64748b;
}

.claim-list {
    display: grid;
    gap: 0.75rem;
}

.friend-list,
.checkbox-list,
.participant-list {
    display: grid;
    gap: 0.7rem;
}

.friend-list {
    grid-template-columns: 1fr;
}

.friend-chip,
.check-card,
.participant-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
}

.friend-chip {
    grid-template-columns: auto 1fr auto;
}

.friend-chip .legacy-avatar-dot,
.participant-row .legacy-avatar-dot {
    background: var(--avatar, var(--teal));
    border-radius: 50%;
    height: 1rem;
    width: 1rem;
}

.friend-chip small,
.participant-row small {
    color: var(--muted);
    font-weight: 850;
}

.check-card {
    cursor: pointer;
    grid-template-columns: auto 1fr;
    min-height: 3rem;
}

.check-card input {
    min-height: 1.1rem;
    width: 1.1rem;
}

.challenge-card {
    align-content: start;
}

.challenge-prize {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem;
}

.progress-track,
.mini-progress {
    background: #e6edf5;
    border-radius: 999px;
    height: 0.95rem;
    overflow: hidden;
}

.progress-track span,
.mini-progress i {
    background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral));
    border-radius: inherit;
    display: block;
    height: 100%;
}

.participant-row {
    grid-template-columns: auto 1fr auto;
}

.participant-row .mini-progress {
    grid-column: 1 / -1;
    height: 0.55rem;
}

.claim-card {
    box-shadow: none;
    grid-template-columns: 1fr;
}

.feature-list,
.mistake-list {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.2rem;
}

.learning-plan-card {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(255, 183, 3, 0.16));
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 18px;
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0;
    padding: 1rem;
}

.learning-plan-card h2 {
    margin: 0;
}

.learning-plan-card p {
    margin: 0;
}

.mastery-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
}

.mastery-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 44px 1fr;
    padding: 0.75rem;
}

.mastery-row meter {
    grid-column: 1 / -1;
    height: 12px;
    width: 100%;
}

.mastery-row small {
    color: #64748b;
    font-weight: 800;
}

.account-edit-form {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}

button[disabled],
.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (min-width: 760px) {
    .account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .reward-level-guide {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .friend-list,
    .checkbox-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .claim-card {
        align-items: center;
        grid-template-columns: 1fr auto auto;
    }

    .mastery-row {
        grid-template-columns: 48px 120px 1fr 70px;
    }

    .mastery-row meter {
        grid-column: auto;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 9vw, 4.8rem);
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

p {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.required-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin-left: 0.25rem;
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.84)),
        rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(219, 229, 239, 0.9);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.context-back-button {
    display: inline-grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #dff6ff);
    box-shadow: 0 8px 18px rgba(15, 86, 148, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    touch-action: manipulation;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.context-back-button:hover {
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(15, 86, 148, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.context-back-button:active {
    transform: scale(0.95);
}

.context-back-button:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 3px;
}

.context-back-button > img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.context-back-button--topbar {
    position: static;
    order: -1;
}

.context-back-button--floating {
    position: fixed;
    z-index: 95;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 900;
    font-size: 1.05rem;
    white-space: nowrap;
}

.brand-mark,
.icon-bubble {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    background: linear-gradient(160deg, #fde047, #f97316);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}

.brand-mark::after,
.icon-bubble::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    pointer-events: none;
}

.game-svg-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-block;
    flex: 0 0 auto;
}

.bubble-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.mode-icon,
.reward-card-icon,
.reward-tier-icon {
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.44), transparent 28%),
        linear-gradient(145deg, var(--teal), var(--blue));
    box-shadow: inset 0 -5px 0 rgba(15, 23, 42, 0.16), 0 12px 24px rgba(15, 23, 42, 0.14);
}

.mode-icon {
    width: 3.1rem;
    height: 3.1rem;
    padding: 0.62rem;
}

.reward-card-icon {
    width: 4.2rem;
    height: 4.2rem;
    padding: 0.78rem;
}

.reward-tier-icon {
    width: 2.65rem;
    height: 2.65rem;
    padding: 0.52rem;
}

.reward-tier-mini-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
}

.nav-actions a,
.player-pill,
.parent-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.4rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.legacy-avatar-dot::before {
    content: "";
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: var(--avatar, var(--teal));
}

.profile-avatar {
    aspect-ratio: 1;
    background: var(--avatar, var(--teal));
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
    color: #fff;
    display: inline-grid;
    flex: 0 0 auto;
    font-size: 1.1rem;
    font-weight: 1000;
    height: 3rem;
    object-fit: cover;
    overflow: hidden;
    place-items: center;
    width: 3rem;
}

img.profile-avatar {
    display: inline-block;
}

.topbar-profile-photo {
    border-width: 2px;
    height: 2rem;
    width: 2rem;
}

.hero-profile-photo {
    height: 5.75rem;
    width: 5.75rem;
}

.child-card-photo {
    height: 3.5rem;
    width: 3.5rem;
}

.mini-profile-photo {
    border-width: 2px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    font-size: 0.85rem;
    height: 2.15rem;
    width: 2.15rem;
}

.profile-photo-panel,
.child-card-heading {
    align-items: center;
    display: flex;
    gap: 0.8rem;
}

.profile-photo-panel {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(203, 213, 225, 0.84);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    padding: 0.75rem;
}

.parent-photo-panel {
    max-width: 27rem;
}

.profile-upload-form {
    align-items: start;
    display: grid;
    gap: 0.45rem;
}

.profile-upload-form input[type="file"] {
    min-height: auto;
    padding: 0.55rem;
}

.hero-layout,
.app-page,
.narrow-page {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero-layout {
    min-height: calc(100vh - 1rem);
    display: grid;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.hero-copy {
    padding: 2rem 0 0;
}

.spark-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--teal-dark);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.84rem;
}

.lead {
    max-width: 42rem;
    font-size: 1.2rem;
}

.premium-hero {
    position: relative;
    padding: 2.8rem 0 2rem;
}

.premium-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.14), transparent 34%),
        repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.035) 0 8px, transparent 8px 18px);
    border-radius: 24px;
    opacity: 0.72;
    pointer-events: none;
    z-index: -1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 2.85rem;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%),
        #fff;
    color: var(--ink);
    font-weight: 900;
    box-shadow: 0 11px 24px rgba(24, 35, 52, 0.12), inset 0 -3px 0 rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
}

.btn.primary {
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.52), transparent 24%),
        linear-gradient(135deg, #20ead7 0%, #14b8a6 42%, #2563eb 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 15px 30px rgba(20, 184, 166, 0.28), inset 0 -5px 0 rgba(15, 23, 42, 0.14);
}

.btn.secondary {
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%),
        #fff;
    box-shadow: 0 11px 22px rgba(24, 35, 52, 0.09), inset 0 -3px 0 rgba(15, 23, 42, 0.04);
}

.btn.huge {
    min-height: 3.5rem;
    padding-inline: 1.25rem;
    font-size: 1.1rem;
}

.btn.tiny {
    min-height: 2.1rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.btn:hover::after {
    transform: translateX(120%);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
}

.btn:active {
    transform: translateY(0);
}

.arena-preview,
.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 229, 239, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.arena-preview {
    padding: 1.25rem;
    overflow: hidden;
}

.arena-preview::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 34%),
        repeating-linear-gradient(130deg, transparent 0 20px, rgba(20, 184, 166, 0.06) 20px 24px);
    opacity: 0.38;
    z-index: -1;
}

.panel {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trophy {
    font-size: 3.5rem;
    animation: floaty 2.8s ease-in-out infinite;
}

.big-task {
    margin: 1rem 0;
    font-size: clamp(3rem, 15vw, 7rem);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: 0;
    color: var(--ink);
    text-align: center;
    text-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.preview-row,
.game-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.preview-row span,
.game-hud span {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, #ffffff, #eefaf8),
        #eefaf8;
    border: 1px solid rgba(20, 184, 166, 0.16);
    color: var(--teal-dark);
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.track,
.race-track {
    height: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.track span,
.race-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral));
    transition: width 0.25s ease;
}

.narrow-page {
    max-width: 620px;
    padding: 2rem 0;
}

.app-page {
    padding: 1rem 0 3rem;
}

.panel {
    padding: 1rem;
}

.panel-heading {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
}

.premium-panel-heading,
.profile-hero {
    border-radius: 20px;
}

.panel-heading h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.premium-panel-heading {
    padding-bottom: 0.2rem;
}

.stack-form,
.form-grid {
    display: grid;
    gap: 0.9rem;
}

.form-grid {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 0.35rem;
    color: var(--ink);
    font-weight: 850;
}

input,
select,
textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.85rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(20, 184, 166, 0.22);
    border-color: var(--teal);
}

textarea {
    line-height: 1.45;
    resize: vertical;
}

.form-message {
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
    min-height: 0;
    padding: 0;
}

.form-message.error {
    background: #fff1f0;
    border: 1px solid rgba(180, 35, 24, 0.18);
    color: #b42318;
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
}

.form-message.success {
    background: #ecfdf3;
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: var(--teal-dark);
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
}

.profile-hero {
    display: grid;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.88)),
        repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 9px, transparent 9px 22px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    position: relative;
    overflow: hidden;
}

.encouragement-card {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(255, 183, 3, 0.14)),
        #fff;
    border: 1px solid rgba(20, 184, 166, 0.22);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.encouragement-card .section-heading {
    align-items: center;
}

.games-hub-page {
    display: grid;
    gap: 1rem;
}

.game-select-hero {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 253, 250, 0.9)),
        repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 9px, transparent 9px 22px);
}

.game-hub-grid {
    display: grid;
    gap: 1rem;
}

.game-module-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
        #fff;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: grid;
    gap: 0.85rem;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.game-module-card.active {
    border-color: rgba(20, 184, 166, 0.34);
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(255, 202, 58, 0.08)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.9)),
        #fff;
}

.game-module-card::before {
    background: linear-gradient(180deg, var(--teal), var(--blue));
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 0.42rem;
}

.game-module-card.planned {
    opacity: 0.78;
}

.game-module-head {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto 1fr;
}

.game-module-head .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
}

.game-module-icon {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.45), transparent 26%),
        linear-gradient(135deg, var(--teal), var(--blue));
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 16px;
    color: #fff;
    height: 3.6rem;
    padding: 0.72rem;
    width: 3.6rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16), inset 0 -4px 0 rgba(15, 23, 42, 0.12);
}

.game-module-stats {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-module-stats span {
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    display: grid;
    gap: 0.1rem;
    min-height: 4rem;
    padding: 0.65rem;
}

.game-module-stats strong {
    font-size: 1.25rem;
    font-weight: 1000;
}

.game-module-stats small {
    color: var(--muted);
    font-weight: 850;
}

.game-module-actions,
.module-link-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.module-link-strip a {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 999px;
    color: var(--teal-dark);
    font-size: 0.9rem;
    font-weight: 900;
    padding: 0.45rem 0.65rem;
}

.profile-hero::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.42);
    border-radius: 14px;
    pointer-events: none;
    opacity: 0.75;
}

.game-profile-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 253, 250, 0.92)),
        linear-gradient(45deg, rgba(255, 202, 58, 0.32), rgba(251, 113, 133, 0.22));
    overflow: hidden;
    position: relative;
}

.game-profile-hero::after {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    inset: 0;
    -webkit-mask-image: linear-gradient(120deg, transparent 0 20%, #000 56%, transparent 100%);
    mask-image: linear-gradient(120deg, transparent 0 20%, #000 56%, transparent 100%);
    opacity: 0.5;
    pointer-events: none;
    position: absolute;
}

.game-profile-hero > * {
    position: relative;
    z-index: 1;
}

.skin-stage {
    align-items: center;
    display: grid;
    gap: 0.7rem;
    justify-items: start;
    grid-template-columns: auto auto minmax(0, 1fr);
}

.skin-stage h2,
.skin-stage p {
    margin-bottom: 0.15rem;
}

.skin-stage small {
    color: var(--muted);
    font-weight: 850;
}

.skin-stage.compact {
    grid-template-columns: auto auto 1fr;
}

.profile-hero.compact h1 {
    font-size: clamp(2rem, 7vw, 3.4rem);
}

.stat-orbit {
    display: grid;
    place-items: center;
    justify-self: start;
    width: 8.5rem;
    min-height: 8.5rem;
    padding: 0.8rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-orbit::before {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border-radius: 50%;
    border: 1px dashed rgba(20, 184, 166, 0.28);
    opacity: 0.75;
}

.stat-orbit::after {
    content: "";
    position: absolute;
    width: 1.2rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 202, 58, 0.5), transparent);
    inset: auto 0.9rem 0.9rem auto;
    right: 0.75rem;
    bottom: 0.7rem;
}

.stat-orbit span {
    font-size: 1.5rem;
    font-weight: 1000;
}

.stat-orbit small {
    color: var(--muted);
    font-weight: 900;
}

.section-heading {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: space-between;
    margin: 1.4rem 0 0.7rem;
}

.section-heading h2 {
    margin: 0;
}

.skin-locker {
    margin: 1rem 0;
}

.skin-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

.skin-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(24, 35, 52, 0.08);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto 1fr;
    min-height: 8rem;
    overflow: hidden;
    padding: 0.8rem;
    position: relative;
}

.skin-card.current {
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 18px 36px rgba(20, 184, 166, 0.16);
}

.skin-card.locked {
    filter: grayscale(0.85);
    opacity: 0.68;
}

.skin-card.locked::after {
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    color: #fff;
    content: "🔒";
    display: grid;
    font-size: 1rem;
    height: 2rem;
    place-items: center;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    width: 2rem;
}

.skin-state {
    color: var(--teal-dark);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 1000;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.skin-card h3 {
    margin: 0.1rem 0;
}

.skin-card p {
    color: var(--muted);
    font-weight: 750;
    margin-bottom: 0.25rem;
}

.skin-card small {
    color: #475569;
    font-weight: 850;
}

.skin-strip {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skin-token {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-height: 8rem;
    padding: 0.75rem;
    text-align: center;
}

.skin-token.locked {
    filter: grayscale(1);
    opacity: 0.62;
}

.skin-token span {
    font-weight: 950;
}

.skin-token small {
    color: var(--muted);
    font-weight: 800;
}

.arena-character-preview,
.game-character-strip {
    align-items: center;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 250, 255, 0.82)),
        rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto auto 1fr;
    margin-bottom: 1rem;
    padding: 0.8rem;
    overflow: hidden;
    position: relative;
}

.arena-character-preview::after,
.game-character-strip::after {
    background: repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.12) 0 10px, transparent 10px 20px);
    bottom: 0;
    content: "";
    height: 0.34rem;
    left: 0;
    position: absolute;
    right: 0;
}

.arena-character-preview strong,
.game-character-strip strong {
    display: block;
    font-size: 1.15rem;
    margin: 0.25rem 0 0.1rem;
}

.arena-character-preview small,
.game-character-strip small {
    color: var(--muted);
    font-weight: 800;
}

.action-grid,
.summary-grid,
.three-column,
.two-column {
    display: grid;
    gap: 1rem;
}

.action-grid {
    grid-template-columns: 1fr;
    margin-bottom: 1rem;
}

.premium-mode-grid {
    margin-top: 0.25rem;
    grid-template-columns: 1fr;
}

.role-chooser {
    margin-top: 0.9rem;
    grid-template-columns: 1fr;
}

.mode-tile,
.metric-card {
    border: 1px solid rgba(219, 229, 239, 0.96);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
        var(--panel);
    box-shadow: 0 12px 26px rgba(24, 35, 52, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 0;
}

.metric-card > * {
    position: relative;
    z-index: 1;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.mode-tile {
    display: grid;
    gap: 0.35rem;
    min-height: 9rem;
    padding: 1rem;
    align-content: center;
    border-top-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mode-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.42rem;
    background: var(--teal);
}

.mode-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.36) 0%, transparent 40%, rgba(255, 255, 255, 0.16) 74%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.mode-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(20, 184, 166, 0.28);
}

.mode-tile:hover::after {
    transform: translateX(120%);
}

.mode-tile span {
    font-size: 2.1rem;
}

.mode-tile .mode-icon {
    margin-bottom: 0.2rem;
    border: 2px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18), inset 0 -4px 0 rgba(15, 23, 42, 0.12);
}

.mode-tile strong {
    font-size: 1.25rem;
}

.mode-tile small,
.metric-card small {
    color: var(--muted);
    font-weight: 750;
}

.mode-tile.play::before { background: var(--teal); }
.mode-tile.practice::before { background: var(--green); }
.mode-tile.division::before { background: #38bdf8; }
.mode-tile.duel::before { background: var(--coral); }
.mode-tile.app::before { background: var(--blue); }
.mode-tile.results::before { background: var(--yellow); }
.mode-tile.reward::before { background: var(--violet); }
.mode-tile.friends::before { background: var(--teal-dark); }

.mode-tile.play .mode-icon { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.mode-tile.practice .mode-icon { background: linear-gradient(145deg, #22c55e, #15803d); }
.mode-tile.division .mode-icon { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.mode-tile.duel .mode-icon { background: linear-gradient(145deg, #fb7185, #be123c); }
.mode-tile.app .mode-icon { background: linear-gradient(145deg, #60a5fa, #1d4ed8); }
.mode-tile.results .mode-icon { background: linear-gradient(145deg, #facc15, #f97316); }
.mode-tile.reward .mode-icon { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.mode-tile.friends .mode-icon { background: linear-gradient(145deg, #2dd4bf, #0f766e); }

.daily-limit-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.daily-limit-card.compact {
    grid-template-columns: 1fr;
}

.daily-limit-card article {
    display: grid;
    gap: 0.2rem;
    min-height: 5rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(56, 189, 248, 0.12)),
        #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.daily-limit-card span {
    color: var(--ink);
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    font-weight: 950;
    line-height: 1;
}

.daily-limit-card small {
    color: var(--ink);
    font-weight: 900;
}

.daily-limit-card em {
    color: var(--muted);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 750;
}

.speed-rule-card {
    align-items: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(250, 204, 21, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(37, 99, 235, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
    color: #fff;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto 1fr;
    margin: 1rem 0;
    overflow: hidden;
    padding: 0.95rem 1rem;
    position: relative;
}

.speed-rule-card::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    content: "";
    height: 100%;
    left: -45%;
    position: absolute;
    top: 0;
    transform: skewX(-18deg);
    width: 36%;
}

.speed-rule-card.is-active::after {
    animation: speedShine 3.4s ease-in-out infinite;
}

.speed-rule-card.compact {
    margin: 0.9rem 0;
}

.speed-rule-icon {
    align-items: center;
    background: linear-gradient(145deg, #facc15, #f97316);
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.26);
    color: #111827;
    display: inline-grid;
    height: 3.2rem;
    justify-items: center;
    width: 3.2rem;
}

.speed-rule-svg {
    height: 1.75rem;
    width: 1.75rem;
}

.speed-rule-card strong,
.speed-rule-card p {
    position: relative;
    z-index: 1;
}

.speed-rule-card strong {
    display: block;
    font-size: 1rem;
    font-weight: 950;
}

.speed-rule-card p {
    color: rgba(255, 255, 255, 0.83);
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0.15rem 0 0;
}

.summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0;
}

.metric-card {
    display: grid;
    gap: 0.25rem;
    min-height: 6.5rem;
    padding: 0.9rem;
    align-content: center;
}

.metric-card span {
    overflow-wrap: anywhere;
    font-size: clamp(1.3rem, 7vw, 2rem);
    font-weight: 1000;
}

.leader-list {
    display: grid;
    gap: 0.5rem;
    padding-left: 0;
    list-style: none;
}

.leader-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    min-height: 3rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.95));
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.leader-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.legacy-avatar-dot::before {
    width: 1rem;
    height: 1rem;
    margin-right: 0;
}

.settings-panel {
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    position: relative;
    overflow: hidden;
}

.settings-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(59, 130, 246, 0.05), rgba(255, 255, 255, 0));
    opacity: 0.8;
    pointer-events: none;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.7rem;
    font-weight: 850;
}

.toggle-row input {
    width: 1.15rem;
    min-height: 1.15rem;
}

.toggle-row.inline {
    align-self: end;
}

.game-page {
    max-width: 920px;
}

.game-root {
    display: grid;
    gap: 1rem;
    position: relative;
}

.premium-game-shell {
    border-radius: 22px;
    padding: 0.8rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.82)),
        repeating-linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0 9px, transparent 9px 22px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
}

.premium-game-shell::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border: 1px solid rgba(20, 184, 166, 0.16);
    border-radius: 18px;
    pointer-events: none;
    opacity: 0.7;
}

.game-setup h2 {
    margin: 1rem 0 0.5rem;
}

.mode-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    min-height: 2.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.chip.active,
.rapid-claim .active {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.13);
}

.table-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.table-picker label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
}

.table-picker label:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.1);
}

.table-picker input:checked {
    accent-color: var(--teal);
}

.table-picker input {
    width: 1rem;
    min-height: 1rem;
    margin-right: 0.35rem;
}

.game-screen {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    justify-self: center;
}

[hidden] {
    display: none !important;
}

.task-card {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    position: relative;
    overflow: hidden;
    padding: 1.1rem;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
        #fff;
    border: 1px solid rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.task-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.48;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.1), transparent 42%),
        repeating-linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0 8px, transparent 8px 18px);
    z-index: 0;
}

.task-card > * {
    position: relative;
    z-index: 1;
}

.answer-input {
    width: min(100%, 18rem);
    min-height: 4.3rem;
    text-align: center;
    font-size: 2.1rem;
    font-weight: 1000;
    border: 3px solid rgba(20, 184, 166, 0.48);
    border-radius: 18px;
    box-shadow: inset 0 3px 0 rgba(15, 23, 42, 0.04), 0 10px 20px rgba(20, 184, 166, 0.1);
}

.feedback {
    min-height: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 900;
}

.feedback.good {
    color: #087f5b;
}

.feedback.bad {
    color: #b54708;
}

.feedback.speed {
    color: #1d4ed8;
}

.task-card.answer-good {
    animation: answerPulse 0.34s ease;
    border-color: rgba(34, 197, 94, 0.6);
}

.task-card.answer-bad {
    animation: answerShake 0.34s ease;
    border-color: rgba(255, 107, 107, 0.55);
}

.game-effect-layer {
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    z-index: 200;
}

.points-pop {
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 1000;
    padding: 0.35rem 0.65rem;
    position: fixed;
    transform: translate(-50%, 0);
    animation: pointsPop 0.86s ease-out forwards;
}

.points-pop.gain {
    background: linear-gradient(135deg, var(--green), var(--teal));
}

.points-pop.loss {
    background: linear-gradient(135deg, #fb923c, var(--coral));
}

.reward-toast {
    background:
        linear-gradient(160deg, #ffffff, #f8faff),
        #fff;
    border: 2px solid rgba(20, 184, 166, 0.35);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.94);
    color: var(--ink);
    display: grid;
    gap: 0.1rem 0.65rem;
    grid-template-columns: auto 1fr;
    min-width: min(88vw, 20rem);
    opacity: 0;
    padding: 0.85rem 1rem;
    position: fixed;
    right: 1rem;
    top: 5rem;
    transform: translateY(-0.8rem) scale(0.96);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.reward-toast-emblem {
    grid-row: span 2;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 14px;
    background:
        radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.62), transparent 25%),
        linear-gradient(145deg, #facc15, #f97316);
    box-shadow: inset 0 -4px 0 rgba(15, 23, 42, 0.16), 0 8px 18px rgba(15, 23, 42, 0.15);
    position: relative;
}

.reward-toast-emblem::before {
    content: "";
    position: absolute;
    inset: 0.62rem;
    clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 82% 100%, 50% 72%, 18% 100%, 31% 56%, 0 35%, 38% 35%);
    background: #fff;
}

.reward-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reward-toast strong {
    color: var(--teal-dark);
    font-size: 1.05rem;
}

.reward-toast.level strong {
    color: var(--violet);
}

.reward-toast.level .reward-toast-emblem,
.reward-toast.premium .reward-toast-emblem {
    background: linear-gradient(145deg, #a78bfa, #facc15 52%, #fb7185);
}

.reward-toast.level,
.reward-toast.badge {
    border-color: rgba(250, 204, 21, 0.62);
}

.reward-toast.bonus strong,
.reward-toast.speed strong {
    color: #b45309;
}

.confetti-piece {
    height: 0.85rem;
    position: fixed;
    top: -1rem;
    width: 0.45rem;
    animation: confettiFall 1.5s ease-in forwards;
}

.confetti-piece.star {
    clip-path: polygon(50% 0, 64% 34%, 100% 36%, 71% 57%, 82% 100%, 50% 74%, 18% 100%, 29% 57%, 0 36%, 36% 34%);
    height: 1rem;
    width: 1rem;
}

.confetti-piece.coin {
    border-radius: 999px;
    height: 0.8rem;
    width: 0.8rem;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.keypad button {
    min-height: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%),
        #fff;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 1000;
    transition: transform 0.16s ease, box-shadow 0.2s ease;
    box-shadow: 0 11px 22px rgba(24, 35, 52, 0.1), inset 0 -4px 0 rgba(15, 23, 42, 0.05);
}

.keypad button[data-key="ok"] {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.44), transparent 24%),
        linear-gradient(135deg, var(--teal), var(--blue));
    color: #fff;
    box-shadow: 0 14px 26px rgba(20, 184, 166, 0.24), inset 0 -5px 0 rgba(15, 23, 42, 0.16);
}

.keypad button[data-key="clear"] {
    background:
        linear-gradient(180deg, #fff7df, #fff0d1),
        #fff0d1;
    color: #92400e;
}

.keypad button:active {
    transform: translateY(1px) scale(0.99);
}

.finish-panel {
    text-align: center;
}

.finish-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}

.finish-grid article {
    min-height: 5.5rem;
    padding: 0.8rem;
    border-radius: var(--radius);
    background: #f8fafc;
    border: 1px solid var(--line);
    transition: transform 0.2s ease;
}

.finish-grid article:hover {
    transform: translateY(-1px);
}

.finish-grid span {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.35rem;
    font-weight: 1000;
}

.finish-grid small {
    color: var(--muted);
    font-weight: 800;
}

.badge-animation {
    display: grid;
    gap: 0.25rem;
    margin: 1rem auto;
    width: min(100%, 24rem);
    padding: 1rem;
    border-radius: var(--radius);
    background: #fff7cc;
    border: 2px solid var(--yellow);
    animation: pop 0.45s ease;
}

.skin-unlock {
    align-items: center;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: auto 1fr;
    text-align: left;
    padding: 0.6rem;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(236, 252, 255, 0.9));
}

.skin-unlock strong {
    display: block;
    font-size: 1.15rem;
}

.skin-unlock span {
    color: #92400e;
    font-weight: 900;
}

.race-board {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.race-row {
    display: grid;
    grid-template-columns: 6.5rem 1fr 3.5rem;
    gap: 0.55rem;
    align-items: center;
}

.app-track span {
    background: linear-gradient(90deg, var(--coral), var(--violet));
}

.rapid-claim {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.table-progress,
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-badge,
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.45rem;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 900;
}

.table-badge.good {
    background: #dcfce7;
    border-color: #86efac;
}

.table-badge.ok {
    background: #fef9c3;
    border-color: #fde68a;
}

.table-badge.weak {
    background: #ffedd5;
    border-color: #fed7aa;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    padding: 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f5f9;
    color: #344054;
    font-size: 0.85rem;
}

td a {
    color: var(--teal-dark);
    font-weight: 900;
}

.edit-player-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

.mistake-list {
    display: grid;
    gap: 0.45rem;
    padding-left: 1.1rem;
    color: var(--ink);
    font-weight: 800;
}

.install-card {
    min-height: 100%;
}

.install-action-card {
    display: grid;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.install-action-card .btn {
    width: 100%;
}

body.install-page .app-page {
    padding-top: max(82px, calc(env(safe-area-inset-top) + 76px));
}

body.install-page .install-action-card {
    margin-top: 0;
    border: 2px solid rgba(72, 184, 240, .55);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(239, 250, 255, .96));
    box-shadow: 0 16px 36px rgba(10, 92, 157, .18);
}

body.install-page .install-action-card h1 {
    margin: 0 0 .35rem;
    color: #0753b8;
    font-size: clamp(1.7rem, 7vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: 0;
}

body.install-page .install-action-card h2 {
    margin-top: 0;
}

@media (min-width: 760px) {
    body.install-page .install-action-card {
        grid-template-columns: minmax(0, 1fr) minmax(230px, .38fr);
    }
}

.install-steps {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0 0;
    padding-left: 1.3rem;
    color: var(--ink);
    font-weight: 850;
}

.install-steps li {
    padding-left: 0.15rem;
}

[data-install-platform].active {
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 18px 46px rgba(20, 184, 166, 0.16);
}

.chart-row {
    display: flex;
    align-items: end;
    gap: 0.45rem;
    min-height: 13rem;
    padding: 1rem 0.25rem 0;
    overflow-x: auto;
}

.chart-bar {
    display: grid;
    grid-template-rows: 1fr auto auto auto;
    justify-items: center;
    align-items: end;
    min-width: 3.4rem;
    height: 12rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.bar-fill {
    display: block;
    width: 1.35rem;
    min-height: 0.5rem;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, var(--teal), var(--blue));
}

.chart-bar strong {
    color: var(--ink);
}

.chart-bar em {
    font-style: normal;
}

.admin-shell,
.admin-login-page {
    background:
        radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.16), transparent 22rem),
        radial-gradient(circle at 90% 8%, rgba(255, 202, 58, 0.2), transparent 20rem),
        #f8fafc;
}

.admin-topbar .brand-mark {
    background: #dbeafe;
}

.admin-page .profile-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 58%, #ecfeff 100%);
}

.export-grid {
    margin: 1rem 0 0;
}

@keyframes floaty {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.45rem);
    }
}

@keyframes pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pointsPop {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.82);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -0.45rem) scale(1.08);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -3rem) scale(0.92);
    }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-1rem) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(105vh) rotate(540deg);
    }
}

@keyframes avatarAura {
    0%,
    100% {
        transform: scale(0.96);
    }
    50% {
        transform: scale(1.04);
    }
}

@keyframes sparklePop {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.72) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.08) rotate(18deg);
    }
}

@keyframes avatarFloatSvg {
    0%,
    100% {
        transform: translateY(0) rotate(-0.8deg);
    }
    50% {
        transform: translateY(-4px) rotate(0.8deg);
    }
}

@keyframes capeWaveSvg {
    0%,
    100% {
        transform: skewX(0deg) translateX(0);
    }
    50% {
        transform: skewX(-3deg) translateX(2px);
    }
}

@keyframes sparklePopSvg {
    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.75) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.08) rotate(16deg);
    }
}

@keyframes sidekickFloatSvg {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-4px) rotate(1.5deg);
    }
}

@keyframes sidekickCheerSvg {
    0%,
    100% {
        transform: translateY(0) rotate(0) scale(1);
    }
    34% {
        transform: translateY(-10px) rotate(-5deg) scale(1.05);
    }
    70% {
        transform: translateY(-2px) rotate(4deg) scale(1.02);
    }
}

@keyframes sidekickOopsSvg {
    0%,
    100% {
        transform: translateX(0) rotate(0);
    }
    32% {
        transform: translateX(-4px) rotate(-4deg);
    }
    68% {
        transform: translateX(3px) rotate(3deg);
    }
}

@keyframes sidekickFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-0.3rem) rotate(1deg);
    }
}

@keyframes sidekickCheer {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    28% {
        transform: translateY(-0.9rem) scale(1.08) rotate(-5deg);
    }
    62% {
        transform: translateY(-0.25rem) scale(1.02) rotate(4deg);
    }
}

@keyframes sidekickSign {
    0%,
    100% {
        transform: translateY(0) rotate(0);
    }
    45% {
        transform: translateY(-0.6rem) rotate(12deg) scale(1.12);
    }
}

@keyframes sidekickOops {
    0%,
    100% {
        transform: translateX(0);
    }
    34% {
        transform: translateX(-0.22rem) rotate(-4deg);
    }
    66% {
        transform: translateX(0.18rem) rotate(3deg);
    }
}

@keyframes answerPulse {
    0%,
    100% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.018);
    }
}

@keyframes answerShake {
    0%,
    100% {
        transform: translateX(0);
    }
    30% {
        transform: translateX(-0.35rem);
    }
    60% {
        transform: translateX(0.25rem);
    }
}

@keyframes speedShine {
    0% {
        left: -45%;
    }
    46%,
    100% {
        left: 118%;
    }
}

@keyframes heroLift {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-0.75rem) rotate(2deg);
    }
}

@keyframes rocketCruise {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-0.55rem) rotate(2deg);
    }
}

@media (min-width: 680px) {
    .home-hero-card {
        grid-template-columns: minmax(0, 1.22fr) minmax(14rem, 0.78fr);
    }

    .home-skins-card {
        grid-template-columns: minmax(0, 0.92fr) minmax(18rem, 1fr);
    }

    .hero-layout {
        grid-template-columns: 1.05fr 0.95fr;
        padding: 3rem 0;
    }

    .profile-hero {
        grid-template-columns: 1fr auto;
        padding: 1.5rem;
    }

    .game-select-hero {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .skin-stage {
        grid-template-columns: auto auto minmax(12rem, 1fr);
    }

    .notification-card {
        grid-template-columns: 1fr auto;
    }

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

    .game-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-module-card.active {
        grid-column: span 2;
    }

    .game-module-head {
        grid-template-columns: auto 1fr auto;
    }

    .game-module-head .status-pill {
        grid-column: auto;
        justify-self: end;
    }

    .skin-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .level-banner {
        grid-template-columns: 1fr minmax(16rem, 0.55fr);
        padding: 1.15rem 1.25rem;
    }

    .panel {
        padding: 1.25rem;
    }

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

    .auth-welcome-hero {
        grid-template-columns: 1fr 0.92fr;
        padding: 1.2rem;
    }

    .auth-welcome-copy {
        align-content: center;
        display: grid;
        min-height: 26rem;
    }

    .auth-choice-grid {
        align-content: center;
    }

    .auth-parent-link {
        grid-column: 1 / -1;
    }

    .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column.wide {
        grid-template-columns: 1fr 1fr;
    }

    .three-column {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .table-picker {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .finish-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .edit-player-form {
        grid-template-columns: 1.2fr 0.8fr auto auto;
    }
}

@media (min-width: 980px) {
    .topbar {
        padding-inline: 1.5rem;
    }

    .kid-shell {
        padding-bottom: 6.2rem;
    }

    .kid-bottom-nav {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    .kid-bottom-nav.grouped {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .action-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .export-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .skin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .skin-strip {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .keypad {
        width: min(100%, 34rem);
        margin: 0 auto;
    }

    .auth-form-card {
        padding: 1.2rem;
    }
}

@media (max-width: 520px) {
    .kid-shell {
        padding-bottom: 10.7rem;
    }

    .kid-bottom-nav.grouped {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kid-bottom-nav.grouped a {
        min-height: 3.2rem;
    }

    .kid-bottom-nav.grouped .game-svg-icon {
        height: 1.72rem;
        width: 1.72rem;
    }

    .kid-bottom-nav.grouped strong {
        font-size: 0.66rem;
    }

    .kid-nav-group > span {
        font-size: 0.56rem;
    }

    .home-screen {
        gap: 0.9rem;
        width: min(100% - 1rem, 1120px);
    }

    .home-hero-card {
        min-height: 31rem;
        padding: 1rem;
    }

    .home-feature-row {
        gap: 0.45rem;
    }

    .home-feature-row span + span::before {
        display: none;
    }

    .home-feature-row span + span {
        border-left: 0;
        padding-left: 0;
    }

    .home-hero-visual {
        min-height: 12.8rem;
    }

    .home-hero-avatar {
        width: 12.8rem;
    }

    .home-entry-grid {
        gap: 0.48rem;
        margin-top: -1.25rem;
    }

    .home-entry-card {
        align-content: center;
        gap: 0.32rem;
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 6.35rem;
        padding: 0.56rem 0.32rem;
        text-align: center;
    }

    .home-entry-card em {
        display: none;
    }

    .home-entry-card strong {
        font-size: 0.86rem;
    }

    .home-role-portrait,
    .home-phone-icon {
        height: 2.85rem;
        width: 2.85rem;
    }

    .home-skins-card {
        padding: 1rem;
    }

    .home-rocket-wrap {
        min-height: 8.5rem;
    }

    .home-rocket-svg {
        max-width: 17rem;
    }

    .home-challenge-stats {
        gap: 0.45rem;
    }

    .home-challenge-stats article {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 5.1rem;
        text-align: center;
    }

    .home-challenge-stats i {
        grid-row: auto;
        height: 2rem;
        width: 2rem;
    }

    .nav-actions a {
        font-size: 0.86rem;
    }

    .brand > span:last-child:not(.arena-logo) {
        display: none;
    }

    .brand .arena-logo-copy {
        display: grid;
    }

    .arena-logo-mark {
        height: 2.65rem;
        width: 2.65rem;
    }

    .arena-logo-copy strong {
        font-size: 0.92rem;
    }

    .arena-logo-copy small {
        font-size: 0.62rem;
    }

    .race-row {
        grid-template-columns: 1fr;
    }

    .arena-character-preview,
    .game-character-strip {
        grid-template-columns: auto auto;
    }

    .arena-character-preview > div:not(.arena-sidekick),
    .game-character-strip > div:not(.arena-sidekick) {
        grid-column: 1 / -1;
    }

    .battle-game-avatar {
        width: 5.2rem;
    }

    .battle-sidekick {
        justify-self: end;
        width: 4.55rem;
    }

    .skin-stage,
    .skin-stage.compact {
        grid-template-columns: auto auto;
    }

    .skin-stage > div:not(.arena-sidekick) {
        grid-column: 1 / -1;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .daily-limit-card {
        grid-template-columns: 1fr;
    }

    .reward-toast {
        left: 1rem;
        right: 1rem;
        top: 4.35rem;
    }

    .kid-bottom-nav strong {
        font-size: 0.68rem;
    }

}

/* Responsive polish pass: stabilizes the game-like home screen and mobile play view. */
html,
body {
    overflow-x: hidden;
}

.home-screen,
.app-page,
.narrow-page {
    max-width: 100%;
}

.home-hero-card {
    min-height: 0;
}

.home-entry-grid {
    margin-top: 0;
}

.home-hero-copy h1 {
    max-width: 11.5ch;
}

.home-hero-copy h1 span,
.home-hero-copy h1 strong {
    display: block;
}

.home-challenge-card,
.home-skins-card,
.home-hero-card {
    isolation: isolate;
}

.home-math-preview {
    max-width: 100%;
}

@media (min-width: 680px) {
    .home-hero-card {
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.82fr);
        padding: 1.65rem;
    }

    .home-hero-copy h1 {
        font-size: 4rem;
    }

    .home-hero-copy p {
        font-size: 1.25rem;
    }

    .home-hero-logo .arena-logo-copy strong {
        font-size: 2.7rem;
    }

    .home-hero-visual {
        min-height: 20rem;
    }

    .home-hero-avatar {
        width: min(100%, 22rem);
    }

    .home-entry-card {
        min-height: 6.2rem;
    }

    .home-skins-card {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
    }
}

@media (min-width: 980px) {
    .home-screen {
        width: min(1160px, calc(100% - 2.5rem));
    }

    .home-hero-card {
        grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.88fr);
        padding: 2rem;
    }

    .home-hero-copy h1 {
        font-size: 4.55rem;
    }

    .home-hero-copy p {
        font-size: 1.38rem;
    }
}

@media (min-width: 680px) and (max-width: 979px) {
    .home-screen {
        width: min(100% - 1.5rem, 900px);
    }

    .home-hero-card {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.74fr);
        gap: 0.85rem;
    }

    .home-hero-copy h1 {
        font-size: 3.35rem;
    }

    .home-hero-copy p {
        font-size: 1.1rem;
    }

    .home-hero-avatar {
        width: min(100%, 18rem);
    }

    .home-hero-sidekick {
        width: 5rem;
    }

    .home-entry-card strong {
        font-size: 1.15rem;
    }

    .home-role-portrait,
    .home-phone-icon {
        height: 3.45rem;
        width: 3.45rem;
    }
}

@media (max-width: 679px) {
    body {
        background-attachment: scroll;
    }

    .home-screen {
        gap: 0.85rem;
        padding: 0.8rem 0 1.25rem;
        width: min(100% - 0.85rem, 42rem);
    }

    .home-hero-card,
    .home-skins-card,
    .home-challenge-card {
        border-radius: 22px;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94);
    }

    .home-hero-card {
        gap: 0.75rem;
        padding: 1rem;
    }

    .home-hero-card::before {
        bottom: -9rem;
        height: 14rem;
    }

    .home-hero-logo {
        gap: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .home-hero-logo .arena-logo-mark {
        height: 3.45rem;
        width: 3.45rem;
    }

    .home-hero-logo .arena-logo-copy strong {
        font-size: 1.45rem;
        line-height: 1;
    }

    .home-hero-logo .arena-logo-copy small {
        font-size: 0.68rem;
    }

    .home-feature-row {
        column-gap: 0.55rem;
        font-size: 0.78rem;
        margin-bottom: 0.85rem;
        row-gap: 0.35rem;
    }

    .home-hero-copy {
        max-width: none;
    }

    .home-hero-copy h1 {
        font-size: 2.4rem;
        line-height: 1.03;
        margin-bottom: 0.75rem;
        max-width: 11ch;
    }

    .home-hero-copy p {
        font-size: 1rem;
        line-height: 1.42;
        max-width: 26rem;
    }

    .home-hero-visual {
        min-height: 10.5rem;
    }

    .home-hero-avatar {
        width: 11.2rem;
    }

    .home-hero-sidekick {
        bottom: 0.35rem;
        left: 0.3rem;
        width: 4.35rem;
    }

    .home-trophy-ghost {
        bottom: 0.7rem;
        height: 4.8rem;
        right: 0.2rem;
        width: 4.8rem;
    }

    .home-entry-grid {
        gap: 0.62rem;
        grid-template-columns: 1fr;
    }

    .home-entry-card {
        border-radius: 18px;
        gap: 0.6rem;
        grid-template-columns: auto minmax(0, 1fr) auto;
        justify-items: stretch;
        min-height: 4.65rem;
        padding: 0.72rem 0.82rem;
        text-align: left;
    }

    .home-entry-card em {
        display: inline-flex;
        font-size: 1.35rem;
    }

    .home-entry-card strong {
        align-self: center;
        font-size: 1.05rem;
    }

    .home-role-portrait,
    .home-phone-icon {
        height: 3.1rem;
        width: 3.1rem;
    }

    .home-skins-card {
        gap: 0.75rem;
        min-height: 0;
        padding: 1rem;
    }

    .home-pill {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        margin-bottom: 0.55rem;
    }

    .home-skins-card h2 {
        font-size: 1.7rem;
        line-height: 1.05;
    }

    .home-skins-card h2 small {
        margin-left: 0.2rem;
    }

    .home-skins-card p {
        font-size: 0.98rem;
        margin-bottom: 0.35rem;
    }

    .home-skin-path {
        margin-top: 0.7rem;
        transform: none;
    }

    .home-skin-path > div {
        height: 3.35rem;
        width: 3.35rem;
    }

    .home-rocket-wrap {
        min-height: 7.25rem;
    }

    .home-rocket-svg {
        max-width: 13.75rem;
    }

    .home-challenge-card {
        padding: 1rem;
    }

    .home-math-preview {
        font-size: 3.35rem;
        gap: 0.35rem;
        line-height: 0.95;
    }

    .home-challenge-stats {
        gap: 0.5rem;
        grid-template-columns: 1fr;
        margin: 0.85rem 0;
    }

    .home-challenge-stats article {
        min-height: 3.8rem;
        padding: 0.55rem 0.7rem;
        text-align: left;
    }

    .home-challenge-stats i {
        height: 2rem;
        width: 2rem;
    }

    .home-progress-line {
        height: 1rem;
    }

    .home-progress-line b {
        height: 1.75rem;
        width: 1.75rem;
    }

    .home-challenge-card p {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .topbar {
        gap: 0.45rem;
        padding: 0.62rem 0.7rem;
    }

    .app-page,
    .narrow-page {
        width: min(100% - 0.85rem, 42rem);
    }

    .app-page {
        padding-top: 0.8rem;
    }

    .game-hud {
        display: grid;
        gap: 0.42rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .game-hud span {
        justify-content: center;
        min-height: 2.25rem;
        min-width: 0;
        padding: 0.45rem 0.3rem;
        text-align: center;
    }

    .big-task {
        font-size: 4.15rem;
        margin: 0.75rem 0;
    }

    .answer-input {
        font-size: 2rem;
        min-height: 4.05rem;
        width: 100%;
    }

    .keypad {
        gap: 0.42rem;
    }

    .keypad button {
        border-radius: 14px;
        font-size: 1.18rem;
        min-height: 3.55rem;
    }

    .auth-welcome-page,
    .auth-form-page {
        align-items: start;
        min-height: auto;
        padding: 0.85rem;
    }

    .auth-welcome-hero,
    .auth-form-card {
        border-radius: 22px;
        max-width: 100%;
        width: 100%;
    }

    .auth-welcome-hero {
        gap: 0.85rem;
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    .auth-welcome-copy {
        min-height: 0;
        min-width: 0;
        padding: 1.2rem;
    }

    .auth-welcome-copy h1 {
        font-size: 2.8rem;
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .auth-welcome-copy p,
    .auth-form-heading p {
        font-size: 0.98rem;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .auth-choice-grid,
    .auth-choice-card > span:not(.choice-icon) {
        min-width: 0;
    }

    .auth-choice-card {
        gap: 0.7rem;
        grid-template-columns: auto minmax(0, 1fr);
        padding: 0.85rem;
    }

    .auth-choice-card strong {
        font-size: 1.55rem;
    }

    .auth-choice-card small {
        font-size: 0.9rem;
        overflow-wrap: anywhere;
    }

    .choice-icon {
        font-size: 1.45rem;
        width: 3.35rem;
    }

    .auth-parent-link,
    .auth-secondary-actions {
        justify-content: center;
        text-align: center;
    }

    .auth-form-card {
        padding: 0.85rem;
    }

    .auth-form-heading {
        padding: 1rem;
    }
}

@media (min-width: 430px) and (max-width: 679px) {
    .home-entry-grid {
        grid-template-columns: 1fr;
    }

    .home-entry-card {
        align-content: initial;
        gap: 0.6rem;
        grid-template-columns: auto minmax(0, 1fr) auto;
        justify-items: stretch;
        min-height: 4.65rem;
        padding: 0.72rem 0.82rem;
        text-align: left;
    }

    .home-entry-card em {
        display: inline-flex;
    }

    .home-entry-card strong {
        font-size: 1.05rem;
    }
}

@media (max-width: 420px) {
    .home-hero-copy h1 {
        font-size: 2.15rem;
    }

    .home-hero-copy p {
        font-size: 0.95rem;
    }

    .home-math-preview {
        font-size: 2.9rem;
        gap: 0.25rem;
    }

    .kid-shell {
        padding-bottom: 8.7rem;
    }

    .kid-bottom-nav.grouped {
        gap: 0.28rem;
        padding: 0.34rem;
        width: min(100% - 0.65rem, 40rem);
    }

    .kid-nav-group {
        border-radius: 16px;
        gap: 0.2rem;
        padding: 0.28rem;
    }

    .kid-nav-group > span {
        font-size: 0.52rem;
        margin-bottom: 0.1rem;
    }

    .kid-bottom-nav.grouped a {
        border-radius: 12px;
        min-height: 2.72rem;
        padding: 0.18rem 0.1rem;
    }

    .kid-bottom-nav.grouped .game-svg-icon {
        height: 1.36rem;
        width: 1.36rem;
    }

    .kid-bottom-nav.grouped strong {
        font-size: 0.56rem;
        line-height: 1.02;
    }
}

/* Natural home/auth composition: calmer proportions and app-like rhythm. */
.home-screen {
    gap: 1rem;
}

.home-hero-card {
    align-items: center;
    background:
        radial-gradient(circle at 82% 22%, rgba(125, 211, 252, 0.22), transparent 30%),
        radial-gradient(circle at 12% 84%, rgba(45, 212, 191, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 251, 255, 0.98) 58%, rgba(226, 247, 255, 0.96) 100%);
}

.home-hero-card::before {
    opacity: 0.7;
}

.home-hero-copy h1 {
    max-width: 14ch;
}

.home-entry-card {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.home-skins-card,
.home-challenge-card {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

@media (min-width: 980px) {
    .home-screen {
        gap: 1rem;
        padding-top: 1.25rem;
        width: min(1080px, calc(100% - 2.5rem));
    }

    .home-hero-card {
        grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.78fr);
        min-height: 30rem;
        padding: 2rem 2.15rem;
    }

    .home-hero-logo {
        margin-bottom: 0.85rem;
    }

    .home-hero-logo .arena-logo-mark {
        height: 4.5rem;
        width: 4.5rem;
    }

    .home-hero-logo .arena-logo-copy strong {
        font-size: 2.4rem;
    }

    .home-feature-row {
        margin-bottom: 1.05rem;
    }

    .home-hero-copy h1 {
        font-size: 3.36rem;
        line-height: 1.04;
        margin-bottom: 0.9rem;
        max-width: none;
    }

    .home-hero-copy p {
        font-size: 1.18rem;
        max-width: 30rem;
    }

    .home-hero-visual {
        min-height: 18rem;
    }

    .home-hero-avatar {
        width: min(100%, 18.8rem);
    }

    .home-hero-sidekick {
        bottom: 0.6rem;
        left: 1.1rem;
        width: 4.85rem;
    }

    .home-trophy-ghost {
        bottom: 1.2rem;
        height: 6.2rem;
        right: 1.2rem;
        width: 6.2rem;
    }

    .home-entry-card {
        border-radius: 20px;
        min-height: 5.7rem;
        padding: 0.78rem 0.9rem;
    }

    .home-entry-card strong {
        font-size: 1.28rem;
    }

    .home-role-portrait,
    .home-phone-icon {
        height: 3.85rem;
        width: 3.85rem;
    }
}

@media (min-width: 680px) and (max-width: 979px) {
    .home-hero-card {
        grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.62fr);
        padding: 1.35rem;
    }

    .home-hero-copy h1 {
        font-size: 2.72rem;
        max-width: none;
    }

    .home-hero-avatar {
        width: min(100%, 15rem);
    }

    .home-hero-visual {
        min-height: 15rem;
    }
}

@media (max-width: 679px) {
    .home-screen {
        gap: 0.72rem;
        padding-top: 0.62rem;
        width: min(100% - 0.7rem, 40rem);
    }

    .home-hero-card {
        gap: 0.5rem;
        padding: 0.95rem;
        text-align: center;
    }

    .home-hero-card::before {
        bottom: -10.5rem;
        height: 14rem;
        opacity: 0.5;
    }

    .home-hero-logo {
        justify-content: center;
        margin-bottom: 0.55rem;
    }

    .home-hero-logo .arena-logo-mark {
        height: 3.15rem;
        width: 3.15rem;
    }

    .home-hero-logo .arena-logo-copy strong {
        font-size: 1.34rem;
    }

    .home-hero-logo .arena-logo-copy small {
        font-size: 0.62rem;
    }

    .home-feature-row {
        justify-content: center;
        margin-bottom: 0.62rem;
    }

    .home-hero-copy h1 {
        font-size: 1.92rem;
        line-height: 1.06;
        margin: 0 auto 0.55rem;
        max-width: 100%;
    }

    .home-hero-copy h1 span,
    .home-hero-copy h1 strong {
        display: block;
    }

    .home-hero-copy p {
        font-size: 0.96rem;
        line-height: 1.38;
        margin: 0 auto;
        max-width: 21rem;
    }

    .home-hero-visual {
        min-height: 8.6rem;
    }

    .home-hero-avatar {
        width: 9.6rem;
    }

    .home-hero-sidekick {
        bottom: 0.15rem;
        left: 1.1rem;
        width: 3.5rem;
    }

    .home-trophy-ghost {
        bottom: 0.3rem;
        height: 4rem;
        right: 0.9rem;
        width: 4rem;
    }

    .home-entry-grid {
        gap: 0.55rem;
    }

    .home-entry-card {
        border-radius: 16px;
        min-height: 4.25rem;
        padding: 0.62rem 0.74rem;
    }

    .home-entry-card strong {
        font-size: 1rem;
    }

    .home-role-portrait,
    .home-phone-icon {
        height: 2.75rem;
        width: 2.75rem;
    }

    .home-skins-card,
    .home-challenge-card {
        border-radius: 18px;
        padding: 0.9rem;
    }

    .home-skins-card h2 {
        font-size: 1.48rem;
    }

    .home-skins-card p {
        font-size: 0.92rem;
        line-height: 1.42;
    }

    .home-rocket-wrap {
        min-height: 6.3rem;
    }

    .home-rocket-svg {
        max-width: 12.4rem;
    }

    .home-math-preview {
        font-size: 2.72rem;
        gap: 0.25rem;
    }

    .home-challenge-stats article {
        min-height: 3.5rem;
    }

    .auth-welcome-page,
    .auth-form-page {
        padding: 0.7rem;
    }

    .auth-welcome-hero,
    .auth-form-card {
        border-radius: 18px;
    }

    .auth-welcome-copy {
        border-radius: 16px;
        padding: 1rem;
    }

    .auth-welcome-copy h1 {
        font-size: 2.28rem;
    }

    .auth-choice-card {
        border-radius: 16px;
        min-height: 5.4rem;
    }

    .auth-choice-card strong {
        font-size: 1.35rem;
    }
}

@media (max-width: 380px) {
    .home-hero-copy h1 {
        font-size: 1.78rem;
    }

    .home-feature-row {
        font-size: 0.72rem;
    }

    .home-entry-card {
        min-height: 4.05rem;
    }
}

/* Premium entry illustration refresh */
.home-entry-illustration {
    display: block;
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.18));
    height: clamp(3.15rem, 7.4vw, 4.65rem);
    overflow: visible;
    transform-origin: 50% 58%;
    transition: transform 0.18s ease, filter 0.18s ease;
    width: clamp(3.15rem, 7.4vw, 4.65rem);
}

.home-entry-card:hover .home-entry-illustration,
.home-entry-card:focus-visible .home-entry-illustration {
    filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.2));
    transform: translateY(-2px) scale(1.035);
}

.home-entry-card .icon-card-bg {
    stroke: rgba(255, 255, 255, 0.78);
    stroke-width: 2;
}

.entry-child .home-entry-illustration {
    filter: drop-shadow(0 14px 20px rgba(37, 99, 235, 0.25));
}

.entry-install .home-entry-illustration {
    filter: drop-shadow(0 14px 20px rgba(20, 184, 166, 0.2));
}

.battle-result-card span {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    line-height: 1.18;
}

@media (max-width: 679px) {
    .home-entry-illustration {
        height: 3.05rem;
        width: 3.05rem;
    }
}
/* Premium games hub refresh */
.arena-hub-hero {
    background:
        radial-gradient(circle at 82% 16%, rgba(125, 211, 252, 0.34), transparent 28%),
        radial-gradient(circle at 8% 86%, rgba(250, 204, 21, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 255, 0.94) 56%, rgba(232, 244, 255, 0.98));
    gap: 1rem;
}

.game-hero-copy h1 {
    font-size: clamp(2rem, 8vw, 4.15rem);
    letter-spacing: 0;
    line-height: 0.95;
    margin-bottom: 0.65rem;
    max-width: 12ch;
}

.game-hero-copy p {
    color: #475569;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.48;
    max-width: 42rem;
}

.arena-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.arena-hero-badges span,
.plan-focus-chip,
.module-mission-line,
.locked-world-note {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.arena-hero-badges span {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 950;
    padding: 0.48rem 0.68rem;
}

.arena-hero-badges .game-svg-icon,
.quick-mission-card .game-svg-icon,
.module-mission-line .game-svg-icon,
.locked-world-note .game-svg-icon,
.plan-focus-chip .game-svg-icon {
    flex: 0 0 auto;
    height: 1.08rem;
    width: 1.08rem;
}

.hero-mascot-card {
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.95), transparent 38%),
        linear-gradient(150deg, #eff6ff, #ecfeff 48%, #fff7ed);
    border-color: rgba(59, 130, 246, 0.18);
    overflow: hidden;
    position: relative;
}

.hero-mascot-card .mascot-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.32), transparent 66%);
    height: 12rem;
    inset: -4rem auto auto 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 12rem;
}

.hero-mascot-card > *:not(.mascot-glow) {
    position: relative;
    z-index: 1;
}

.hero-mascot-card small {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 850;
    text-align: center;
}

.hub-mission-panel {
    align-self: stretch;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(37, 99, 235, 0.9)),
        #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    color: #fff;
    display: grid;
    gap: 0.65rem;
    min-width: min(100%, 15rem);
    padding: 1rem;
}

.hub-mission-panel .status-pill {
    background: rgba(250, 204, 21, 0.18);
    color: #fef3c7;
    justify-self: start;
}

.hub-mission-panel strong {
    font-size: 1.15rem;
    line-height: 1.15;
}

.hub-mission-panel small {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.xp-bar.big {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    height: 0.82rem;
    overflow: hidden;
}

.xp-bar.big i {
    background: linear-gradient(90deg, #22c55e, #facc15, #fb7185);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0.5rem;
}

.arena-quick-actions {
    display: grid;
    gap: 0.72rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-mission-card {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
    color: #0f172a;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 5rem;
    padding: 0.85rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-mission-card:hover,
.quick-mission-card:focus-visible {
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.15);
    transform: translateY(-2px);
}

.quick-mission-card > .game-svg-icon {
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    border-radius: 14px;
    box-shadow: inset 0 -4px 0 rgba(15, 23, 42, 0.12);
    color: #fff;
    height: 3rem;
    padding: 0.7rem;
    width: 3rem;
}

.quick-mission-card.primary > .game-svg-icon {
    background: linear-gradient(135deg, #f97316, #ec4899);
}

.quick-mission-card strong {
    display: block;
    font-size: 1rem;
    font-weight: 1000;
    line-height: 1.1;
}

.quick-mission-card small {
    color: #64748b;
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    margin-top: 0.14rem;
}

.arena-plan-strip {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(59, 130, 246, 0.1)),
        rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.arena-plan-strip h2,
.arena-plan-strip p {
    margin: 0.2rem 0 0;
}

.arena-plan-strip p {
    color: #475569;
    font-weight: 750;
    line-height: 1.45;
}

.plan-focus-chip {
    background: rgba(15, 23, 42, 0.88);
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    justify-content: center;
    min-height: 4rem;
    padding: 0.75rem;
}

.game-module-card {
    isolation: isolate;
}

.game-module-card.active {
    background:
        radial-gradient(circle at 86% 12%, rgba(250, 204, 21, 0.26), transparent 26%),
        radial-gradient(circle at 10% 88%, rgba(45, 212, 191, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94));
}

.game-module-card.planned {
    background:
        linear-gradient(135deg, rgba(241, 245, 249, 0.98), rgba(239, 246, 255, 0.94));
    opacity: 1;
}

.module-world-tag {
    background: rgba(15, 23, 42, 0.86);
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 950;
    justify-self: start;
    padding: 0.38rem 0.58rem;
}

.module-mission-line {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.16);
    border-radius: 14px;
    color: #0f766e;
    font-weight: 900;
    line-height: 1.35;
    padding: 0.65rem;
}

.module-reward-ribbon {
    background: linear-gradient(90deg, #fef3c7, #ffedd5);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 12px;
    color: #92400e;
    font-size: 0.86rem;
    font-weight: 950;
    padding: 0.52rem 0.65rem;
}

.locked-world-note {
    background: rgba(15, 23, 42, 0.07);
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 14px;
    color: #475569;
    font-weight: 900;
    padding: 0.7rem;
}

@media (min-width: 780px) {
    .arena-plan-strip {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.45fr);
    }
}

@media (max-width: 679px) {
    .arena-hub-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        text-align: left;
    }

    .arena-hub-hero .game-hero-copy {
        grid-column: 1 / -1;
    }

    .hero-mascot-card,
    .hub-mission-panel {
        border-radius: 16px;
        min-width: 0;
        padding: 0.72rem;
    }

    .hero-mascot-card .hub-game-avatar {
        width: 4.6rem;
    }

    .hero-mascot-card .hub-sidekick {
        margin-left: 2.9rem;
        margin-top: -1.7rem;
        width: 3.35rem;
    }

    .hero-mascot-card strong {
        font-size: 0.78rem;
        line-height: 1.15;
    }

    .hero-mascot-card small {
        display: none;
    }

    .hub-mission-panel {
        align-content: center;
        gap: 0.5rem;
    }

    .hub-mission-panel strong {
        font-size: 0.88rem;
    }

    .hub-mission-panel small {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .game-hero-copy h1 {
        font-size: 2.18rem;
        max-width: 11ch;
    }

    .arena-hero-badges {
        gap: 0.45rem;
    }

    .arena-hero-badges span {
        font-size: 0.78rem;
        padding: 0.42rem 0.52rem;
    }

    .arena-quick-actions {
        grid-template-columns: 1fr;
    }

    .hub-mission-panel,
    .hero-mascot-card {
        min-width: 0;
    }
}
/* ADMIN-GAME-DIAGNOSTICS-001: read-only operational troubleshooting view. */
.admin-topbar .admin-brand-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: contain;
}

.admin-diagnostics-page {
    width: min(100%, 1480px);
    margin-inline: auto;
}

.admin-diagnostics-hero {
    min-height: 160px;
    align-items: center;
}

.diagnostic-live-mark,
.diagnostic-status {
    display: inline-flex;
    min-height: 32px;
    padding: 5px 10px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #b9dce9;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.diagnostic-live-mark {
    color: #075f57;
    background: #e6fbf6;
}

.diagnostic-live-mark i {
    width: 9px;
    height: 9px;
    background: #14b8a6;
    border-radius: 50%;
}

.diagnostic-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostic-summary-grid .metric-card {
    min-height: 116px;
    border-radius: 8px;
}

.diagnostic-summary-grid .metric-card.has-warning {
    border-color: #ff9a9a;
    background: #fff6f6;
}

.diagnostic-note,
.diagnostic-alert {
    padding: 14px 16px;
    color: #5d4800;
    background: #fff8cf;
    border: 1px solid #ebcb4d;
    border-radius: 8px;
}

.diagnostic-alert {
    margin-bottom: 18px;
    color: #79232b;
    background: #fff3f4;
    border-color: #ff9ca4;
}

.diagnostic-alert h3 {
    margin: 0 0 8px;
}

.diagnostic-alert ul {
    margin: 0;
    padding-left: 20px;
}

.diagnostic-filter-panel,
.diagnostic-session-list,
.diagnostic-answer-panel,
.diagnostic-finish-summary,
.diagnostic-detail-grid .panel {
    border-radius: 8px;
}

.diagnostic-section-title,
.diagnostic-session-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.diagnostic-section-title {
    margin-bottom: 16px;
}

.diagnostic-section-title h2,
.diagnostic-section-title h3,
.diagnostic-session-heading h2 {
    margin: 0;
}

.diagnostic-section-title > span {
    color: #557187;
    font-size: 12px;
    font-weight: 700;
}

.diagnostic-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, .8fr));
    align-items: end;
    gap: 12px;
}

.diagnostic-filters label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: #294a62;
    font-size: 12px;
    font-weight: 800;
}

.diagnostic-filters input,
.diagnostic-filters select {
    width: 100%;
    min-height: 44px;
}

.diagnostic-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.diagnostic-session-heading {
    margin: 2px 0 18px;
    padding: 14px 0;
    border-bottom: 1px solid #cce4ed;
}

.diagnostic-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.diagnostic-facts dl,
.diagnostic-finish-summary dl {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #d9e9ef;
}

.diagnostic-facts dl > div,
.diagnostic-finish-summary dl > div {
    min-width: 0;
    padding: 11px 8px;
    border-bottom: 1px solid #d9e9ef;
}

.diagnostic-facts dt,
.diagnostic-finish-summary dt {
    color: #597487;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.diagnostic-facts dd,
.diagnostic-finish-summary dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #0c315d;
    font-size: 14px;
    font-weight: 800;
}

.diagnostic-finish-summary {
    margin-top: 16px;
}

.diagnostic-finish-summary dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostic-answer-panel {
    margin-top: 16px;
}

.diagnostic-table-wrap {
    max-width: 100%;
    border: 1px solid #cee4ec;
    border-radius: 8px;
}

.diagnostic-table-wrap table {
    min-width: 1120px;
}

.diagnostic-table-wrap th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #294a62;
    background: #eff8fb;
}

.diagnostic-table-wrap code,
.diagnostic-facts code {
    font-size: 11px;
}

.diagnostic-status.is-ok {
    color: #075f57;
    background: #e6fbf6;
    border-color: #75d8c8;
}

.diagnostic-status.is-warning {
    color: #8b222c;
    background: #fff1f2;
    border-color: #ff9aa3;
}

.diagnostic-status.is-neutral {
    color: #536b7e;
    background: #f1f6f8;
    border-color: #cfdee5;
}

.diagnostic-table-wrap tr.has-diagnostic-issue > td {
    background: #fff7f7;
}

.diagnostic-table-wrap .diagnostic-issue-row td {
    color: #7c2630;
    background: #ffecee;
    border-top: 0;
    font-size: 12px;
}

@media (max-width: 1050px) {
    .diagnostic-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnostic-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnostic-filters label:first-child {
        grid-column: 1 / -1;
    }

    .diagnostic-finish-summary dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .admin-diagnostics-page {
        padding-inline: 10px;
    }

    .diagnostic-section-title,
    .diagnostic-session-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .diagnostic-filters,
    .diagnostic-detail-grid,
    .diagnostic-facts dl,
    .diagnostic-finish-summary dl {
        grid-template-columns: 1fr;
    }

    .diagnostic-filters label:first-child {
        grid-column: auto;
    }
}

/* GLOBAL-BACK-CONTROL-20260803: one visible back control across every application surface. */
body .arena-back-button,
body .context-back-button,
body .ra-profile-reference__back,
.robo-arena .ra-live-game-screen .ra-game-back.arena-back-button {
    position: fixed !important;
    z-index: 1000 !important;
    top: max(14px, calc(env(safe-area-inset-top) + 10px)) !important;
    left: max(14px, calc(env(safe-area-inset-left) + 10px)) !important;
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    padding: 0 !important;
    place-items: center !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
    filter: none !important;
    touch-action: manipulation !important;
    transition: transform .16s ease, filter .16s ease !important;
}

body .arena-back-button:hover,
body .context-back-button:hover,
body .ra-profile-reference__back:hover,
.robo-arena .ra-live-game-screen .ra-game-back.arena-back-button:hover {
    transform: translateY(-2px) scale(1.04) !important;
    filter: brightness(1.04) !important;
}

body .arena-back-button:active,
body .context-back-button:active,
body .ra-profile-reference__back:active,
.robo-arena .ra-live-game-screen .ra-game-back.arena-back-button:active {
    transform: translateY(2px) scale(.96) !important;
}

body .arena-back-button:focus-visible,
body .context-back-button:focus-visible,
body .ra-profile-reference__back:focus-visible,
.robo-arena .ra-live-game-screen .ra-game-back.arena-back-button:focus-visible {
    outline: 4px solid #ffd43b !important;
    outline-offset: 3px !important;
}

body .arena-back-button > img,
body .context-back-button > img,
body .ra-profile-reference__back > img,
.robo-arena .ra-live-game-screen .ra-game-back.arena-back-button > img {
    display: block !important;
    width: 57px !important;
    height: 52px !important;
    object-fit: contain !important;
    filter: none !important;
}

/* ADMIN-PARENT-DIAGNOSTICS-001: parent accounts, onboarding and ownership trace. */
.parent-diagnostic-filters {
    grid-template-columns: minmax(260px, 1.4fr) minmax(220px, .8fr);
}

.parent-diagnostic-attention {
    margin-bottom: 18px;
}

.parent-diagnostic-attention strong {
    display: block;
    margin-bottom: 6px;
}

.parent-diagnostic-attention ul {
    margin: 0;
    padding-left: 20px;
}

.parent-diagnostic-heading p:last-child {
    margin: 5px 0 0;
}

.parent-diagnostic-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    border-radius: 8px;
}

.parent-diagnostic-actions h3,
.parent-diagnostic-actions p {
    margin: 0;
}

.parent-diagnostic-actions p:last-child {
    margin-top: 6px;
}

.parent-diagnostic-action-buttons,
.parent-diagnostic-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.parent-diagnostic-action-buttons form {
    margin: 0;
}

.parent-diagnostic-links a {
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #b9dce9;
    border-radius: 8px;
    background: #f4fbfd;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .admin-topbar {
        align-items: flex-start;
    }

    .admin-topbar .nav-actions {
        max-width: calc(100vw - 88px);
    }

    .admin-topbar .nav-actions a {
        min-height: 44px;
    }

    .parent-diagnostic-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .parent-diagnostic-filters {
        grid-template-columns: 1fr;
    }

    .parent-diagnostic-action-buttons,
    .parent-diagnostic-action-buttons form,
    .parent-diagnostic-action-buttons .btn {
        width: 100%;
    }
}

/* CANONICAL-TRANSPARENT-BACK-RULE-20260811 */
html body .arena-back-button,
html body .context-back-button,
html body .install-reference-back,
html body .teacher-register-reference-back,
html body .teacher-signin-reference-back,
html body .child-profile-topbar-button[aria-label*="Natrag"] {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

html body .arena-back-button:hover,
html body .context-back-button:hover,
html body .install-reference-back:hover,
html body .teacher-register-reference-back:hover,
html body .teacher-signin-reference-back:hover,
html body .child-profile-topbar-button[aria-label*="Natrag"]:hover,
html body .arena-back-button:active,
html body .context-back-button:active,
html body .install-reference-back:active,
html body .teacher-register-reference-back:active,
html body .teacher-signin-reference-back:active,
html body .child-profile-topbar-button[aria-label*="Natrag"]:active {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

html body .arena-back-button > img,
html body .context-back-button > img,
html body .install-reference-back > img,
html body .teacher-register-reference-back > img,
html body .teacher-signin-reference-back > img,
html body .child-profile-topbar-button[aria-label*="Natrag"] > img {
    display: block !important;
    max-width: none !important;
    object-fit: contain !important;
    background: transparent !important;
    filter: none !important;
}