.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.topbar {
    align-items: center;
    margin-bottom: 12px;
}

.brand-lockup {
    min-height: 56px;
    align-items: center;
}

.header-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(21, 94, 239, 0.16));
}

.topbar-actions {
    justify-content: flex-end;
    gap: 10px;
}

.profile-btn {
    background: linear-gradient(135deg, rgba(21, 94, 239, 0.12) 0%, rgba(255, 255, 255, 0.96) 100%);
    color: var(--primary);
}

.screen-shell {
    overflow-x: clip;
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 402px;
    padding: 18px 20px 22px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.96), transparent 28%),
        linear-gradient(180deg, rgba(255, 248, 241, 0.98) 0%, rgba(243, 247, 255, 0.98) 56%, rgba(234, 243, 255, 0.96) 100%);
}

.hero-copy {
    display: block;
    margin-bottom: 6px;
}

.hero-brand {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 0.05em;
    font-family: 'DrukWide', "SF Pro Display", sans-serif;
    font-size: clamp(34px, 8vw, 46px);
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
}

.hero-brand-main {
    color: #111827;
}

.hero-brand-accent {
    color: var(--primary);
    text-shadow: 0 10px 24px rgba(21, 94, 239, 0.18);
}

.hero-visual {
    margin: 4px 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-progress {
    width: min(100%, 320px);
    margin-top: 2px;
}

.bear-tap-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: none;
    appearance: none;
    touch-action: manipulation;
}

.bear-frame {
    width: 262px;
    height: 262px;
}

.bear-frame::before {
    width: 238px;
    height: 238px;
}

.bear-frame::after {
    width: 214px;
    height: 214px;
}

.bear-img {
    width: 240px;
    height: 240px;
}

.bear-level-badge {
    min-width: 152px;
    max-width: calc(100% - 28px);
    padding: 8px 18px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bear-streak-pop {
    position: absolute;
    top: 8px;
    right: -4px;
    z-index: 4;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(21, 94, 239, 0.16);
    box-shadow: 0 16px 36px rgba(23, 32, 51, 0.14);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.bear-streak-pop.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.bear-tap-btn:focus-visible {
    outline: 3px solid rgba(21, 94, 239, 0.24);
    outline-offset: 6px;
    border-radius: 32px;
}

.bear-tap-btn.is-bumped .bear-img {
    animation: bear-pop 0.36s ease, bear-float 4.2s ease-in-out infinite;
}

@keyframes bear-pop {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.04);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.task-card {
    min-height: 132px;
    border: 1px solid rgba(21, 94, 239, 0.14);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.08);
}

.task-card .task-btn-title {
    margin-top: auto;
}

.priority-stack > *,
.secondary-stack > *,
.main-buttons-grid > *,
.coach-drill-grid > * {
    min-width: 0;
}

.main-buttons-grid,
.coach-drill-grid {
    align-items: stretch;
}

.section-title,
.task-btn-title,
.daily-title,
.mistake-word,
.drill-title {
    color: var(--text-main);
}

.subtitle,
.snapshot-note,
.daily-info span,
.drill-subtitle,
.support-note,
.support-tip p,
.mode-hero-note,
.progress-caption,
.focus-chip small,
.ticket-pill,
.ghost-btn {
    color: #445065;
}

.task-card .subtitle {
    font-weight: 700;
    color: var(--primary);
}

.daily-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 58px rgba(21, 94, 239, 0.28);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 30%),
        linear-gradient(140deg, #0f4de6 0%, #155eef 48%, #0b3ea8 100%);
}

.daily-card.is-loading,
.menu-btn.is-loading {
    opacity: 0.76;
    pointer-events: none;
}

.daily-card.is-loading .daily-status {
    background: rgba(255, 255, 255, 0.24);
}

.progress-caption {
    font-size: 13px;
    line-height: 1.4;
}

.ui-icon {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.ui-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ui-icon-fallback {
    display: none;
    font-size: 16px;
    line-height: 1;
}

.ui-icon.is-fallback .ui-icon-img {
    display: none;
}

.ui-icon.is-fallback .ui-icon-fallback {
    display: block;
}

.icon-btn .ui-icon {
    width: 19px;
    height: 19px;
}

.section-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
}

.section-icon .ui-icon {
    width: 24px;
    height: 24px;
}

.focus-chip .ui-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.coach-lock-icon .ui-icon {
    width: 24px;
    height: 24px;
}

.coach-lock-icon .ui-icon-fallback {
    font-size: 20px;
}

.daily-card::before,
.daily-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.daily-card::before {
    width: 168px;
    height: 168px;
    right: -54px;
    top: -42px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 72%);
}

.daily-card::after {
    width: 132px;
    height: 132px;
    left: -46px;
    bottom: -58px;
    background: radial-gradient(circle, rgba(10, 37, 99, 0.34), transparent 72%);
}

.daily-title {
    color: #f8fbff;
    text-shadow: 0 8px 18px rgba(9, 30, 79, 0.18);
}

.daily-info span {
    color: rgba(244, 248, 255, 0.86);
}

.daily-timer,
.daily-status {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.task-card::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 16px;
    width: 54px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #155eef 0%, #7fa7ff 100%);
}

.task-card-4 {
    background:
        radial-gradient(circle at top right, rgba(74, 144, 255, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(247, 250, 255, 0.98) 0%, rgba(237, 244, 255, 0.98) 100%);
}

.task-card-4::before {
    background: radial-gradient(circle, rgba(21, 94, 239, 0.18), transparent 72%);
}

.task-card-4::after {
    background: linear-gradient(90deg, #155eef 0%, #8ab2ff 100%);
}

.task-card-9 {
    background:
        radial-gradient(circle at top right, rgba(13, 55, 150, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(241, 247, 255, 0.98) 0%, rgba(228, 237, 255, 0.98) 100%);
}

.task-card-9::before {
    background: radial-gradient(circle, rgba(15, 76, 218, 0.22), transparent 72%);
}

.task-card-9::after {
    background: linear-gradient(90deg, #0c44bf 0%, #155eef 100%);
}

.task-card-10 {
    background:
        radial-gradient(circle at top right, rgba(126, 58, 242, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(248, 244, 255, 0.98) 0%, rgba(239, 232, 255, 0.98) 100%);
}

.task-card-10::before {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.22), transparent 72%);
}

.task-card-10::after {
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
}

.task-card-11 {
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(241, 252, 244, 0.98) 0%, rgba(229, 248, 236, 0.98) 100%);
}

.task-card-11::before {
    background: radial-gradient(circle, rgba(22, 163, 74, 0.22), transparent 72%);
}

.task-card-11::after {
    background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}

.task-card-12 {
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 248, 239, 0.98) 0%, rgba(255, 241, 224, 0.98) 100%);
}

.task-card-12::before {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.22), transparent 72%);
}

.task-card-12::after {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.task-card-13 {
    background:
        radial-gradient(circle at top right, rgba(225, 29, 72, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 242, 246, 0.98) 0%, rgba(255, 232, 238, 0.98) 100%);
}

.task-card-13::before {
    background: radial-gradient(circle, rgba(225, 29, 72, 0.22), transparent 72%);
}

.task-card-13::after {
    background: linear-gradient(90deg, #e11d48 0%, #fb7185 100%);
}

.task-card-14 {
    background:
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(240, 251, 255, 0.98) 0%, rgba(226, 247, 253, 0.98) 100%);
}

.task-card-14::before {
    background: radial-gradient(circle, rgba(8, 145, 178, 0.22), transparent 72%);
}

.task-card-14::after {
    background: linear-gradient(90deg, #0891b2 0%, #22d3ee 100%);
}

.task-card .task-btn-title {
    color: #111827;
}

.task-card .subtitle {
    color: #155eef;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.coach-card.is-locked {
    background: linear-gradient(180deg, rgba(243, 244, 246, 0.98) 0%, rgba(234, 236, 240, 0.98) 100%);
    border-color: rgba(23, 32, 51, 0.10);
}

.coach-card.is-locked .section-title,
.coach-card.is-locked .coach-note,
.coach-card.is-locked .drill-title,
.coach-card.is-locked .drill-subtitle,
.coach-card.is-locked .drill-meta {
    color: #667085;
}

.focus-chip.locked {
    background: rgba(23, 32, 51, 0.06);
    border-color: rgba(23, 32, 51, 0.08);
    color: #667085;
}

.drill-card.locked {
    min-height: 140px;
    cursor: default;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.98) 0%, rgba(242, 244, 247, 0.98) 100%);
    border-style: dashed;
    pointer-events: none;
}

.coach-lock-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.coach-lock-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(23, 32, 51, 0.08);
    font-size: 22px;
}

.coach-lock-copy {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.45;
}

.coach-lock-hint {
    margin-top: auto;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

.mistakes-panel .snapshot-note {
    margin-bottom: 16px;
}

.mistakes-panel .scroll-list {
    min-height: 140px;
}

.mistake-row {
    gap: 14px;
}

.mistake-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

.mistake-word {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.mistake-date {
    font-size: 12px;
    color: #667085;
}

.mistake-count {
    flex: 0 0 auto;
    min-width: 44px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(21, 94, 239, 0.08);
    color: var(--primary-dark);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.mistake-empty {
    padding: 18px 0;
    color: #5b667a;
}

.profile-hero-card {
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 249, 243, 0.98) 0%, rgba(240, 246, 255, 0.98) 100%);
}

.profile-hero-top {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.profile-avatar-slot {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(21, 94, 239, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: inset 0 0 0 1px rgba(21, 94, 239, 0.08);
}

.profile-avatar-slot .avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
}

.profile-hero-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-league-chip,
.league-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(21, 94, 239, 0.10);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-name {
    margin: 0;
    font-size: 28px;
    line-height: 1.04;
    color: var(--text-main);
}

.profile-tagline {
    margin: 0;
    color: #445065;
    line-height: 1.5;
}

.profile-rank-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.profile-rank-card,
.profile-stat-card {
    min-width: 0;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(21, 94, 239, 0.10);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.profile-rank-card span,
.profile-stat-card span {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.profile-rank-card strong,
.profile-stat-card strong {
    display: block;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.05;
}

.profile-xp-box {
    margin-top: 4px;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-stat-grid .card {
    margin-bottom: 0;
}

.referral-card {
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(255, 251, 246, 0.98) 0%, rgba(240, 246, 255, 0.98) 100%);
}

.referral-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 16px;
}

.referral-stat-card {
    min-height: 92px;
}

.referral-share-box {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(21, 94, 239, 0.08);
}

.referral-code-wrap,
.referral-link-wrap,
.referral-copy {
    display: grid;
    gap: 4px;
}

.referral-code-label,
.referral-link-label {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.referral-code-value {
    color: var(--primary-dark);
    font-family: 'DrukWide', "SF Pro Display", sans-serif;
    font-size: 17px;
}

.referral-link-value {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.referral-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.referral-action-row .menu-btn,
.referral-action-row .ghost-btn {
    margin-bottom: 0;
}

.menu-btn.compact {
    min-height: 42px;
    padding: 12px 18px;
}

.referral-list-head {
    margin-top: 16px;
}

.referral-list {
    display: grid;
    gap: 12px;
}

.referral-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(23, 32, 51, 0.06);
}

.referral-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-avatar-wrap .avatar {
    width: 42px;
    height: 42px;
}

.referral-copy strong {
    color: var(--text-main);
}

.referral-copy span,
.referral-copy small {
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}

.referral-side {
    display: grid;
    justify-items: end;
    gap: 6px;
    flex: 0 0 auto;
}

.referral-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.referral-status.active {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.referral-status.joined {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

.referral-bonus {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}

.referral-empty {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px dashed rgba(21, 94, 239, 0.18);
}

.referral-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
}

.referral-empty p {
    margin: 0;
    color: #667085;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .referral-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .referral-action-row .menu-btn,
    .referral-action-row .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .referral-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .referral-side {
        width: 100%;
        justify-items: flex-start;
    }
}

.profile-session-list,
.leaderboard-rich-list {
    display: grid;
    gap: 12px;
}

.profile-session-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(23, 32, 51, 0.06);
}

.profile-session-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-session-title {
    color: var(--text-main);
    font-weight: 800;
}

.profile-session-meta,
.leaderboard-season-note {
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.profile-session-score {
    flex: 0 0 auto;
    min-width: 70px;
    text-align: right;
    font-weight: 800;
    color: var(--primary-dark);
}

.profile-achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.profile-achievement-card {
    min-height: 120px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 255, 0.94) 100%);
    border: 1px solid rgba(21, 94, 239, 0.10);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.06);
}

.profile-achievement-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(21, 94, 239, 0.10);
    font-size: 20px;
    margin-bottom: 10px;
}

.profile-achievement-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
}

.profile-achievement-copy {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.leaderboard-season-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(255, 248, 243, 0.98) 0%, rgba(240, 246, 255, 0.98) 100%);
}

.leaderboard-periods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.leaderboard-user-card {
    min-height: 126px;
    display: grid;
    gap: 14px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.96) 0%, rgba(21, 94, 239, 0.96) 100%);
    color: #ffffff;
}

.leaderboard-user-card .league-chip {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.leaderboard-user-card p {
    margin: 0;
}

.leaderboard-user-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.leaderboard-user-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.leaderboard-user-main .avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
}

.leaderboard-user-copy {
    min-width: 0;
}

.leaderboard-user-name {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.05;
}

.leaderboard-user-copy p,
.leaderboard-user-copy span,
.leaderboard-user-card .leaderboard-move,
.leaderboard-user-card .leaderboard-user-rank-label {
    color: rgba(255, 255, 255, 0.80);
}

.leaderboard-user-rank {
    text-align: right;
}

.leaderboard-user-rank-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.leaderboard-user-rank strong {
    font-size: 26px;
    color: #ffffff;
}

.leaderboard-user-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.leaderboard-user-stat {
    min-width: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.leaderboard-user-stat span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.76);
}

.leaderboard-user-stat strong {
    color: #ffffff;
    font-size: 18px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 255, 0.94) 100%);
    border: 1px solid rgba(21, 94, 239, 0.10);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.05);
}

.leaderboard-row.is-self {
    border-color: rgba(21, 94, 239, 0.24);
    box-shadow: 0 22px 38px rgba(21, 94, 239, 0.12);
}

.leaderboard-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.leaderboard-position {
    width: 34px;
    text-align: center;
    font-family: 'DrukWide', "SF Pro Display", sans-serif;
    color: var(--primary);
    font-size: 12px;
}

.leaderboard-avatar-wrap .avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.leaderboard-player-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.leaderboard-player-name {
    color: var(--text-main);
    font-weight: 800;
}

.leaderboard-player-meta {
    color: #667085;
    font-size: 12px;
}

.leaderboard-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.streak-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
    font-size: 11px;
    font-weight: 800;
}

.leaderboard-points {
    flex: 0 0 auto;
    min-width: 88px;
    text-align: right;
}

.leaderboard-points strong {
    display: block;
    color: var(--text-main);
    font-size: 18px;
}

.leaderboard-points span {
    color: #667085;
    font-size: 12px;
}

.leaderboard-rich-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 255, 0.96) 100%);
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.onboarding-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-card {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 22px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 249, 243, 0.99) 0%, rgba(242, 247, 255, 0.98) 100%);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.onboarding-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.onboarding-bear {
    width: 96px;
    height: 96px;
    object-fit: contain;
    animation: bear-float 4.2s ease-in-out infinite;
}

.onboarding-copy {
    margin: 0 0 16px;
    color: #475467;
    line-height: 1.5;
}

.onboarding-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.onboarding-choice {
    min-height: 132px;
    padding: 16px;
    text-align: left;
    border-radius: 24px;
    border: 1px solid rgba(21, 94, 239, 0.10);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
    cursor: pointer;
}

.onboarding-choice.wide {
    grid-column: 1 / -1;
}

.onboarding-choice strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 18px;
}

.onboarding-choice span {
    color: #667085;
    line-height: 1.45;
}

.onboarding-error {
    min-height: 18px;
    margin-top: 12px;
}

@media (max-width: 380px) {
    .hero-brand {
        font-size: 28px;
    }

    .bear-frame {
        width: 218px;
        height: 218px;
    }

    .bear-frame::before {
        width: 198px;
        height: 198px;
    }

    .bear-frame::after {
        width: 180px;
        height: 180px;
    }

    .bear-img {
        width: 198px;
        height: 198px;
    }

    .bear-streak-pop {
        right: 8px;
    }

    .profile-hero-top,
    .leaderboard-user-head,
    .onboarding-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-rank-strip,
    .profile-stat-grid,
    .leaderboard-user-stats,
    .onboarding-choice-grid,
    .profile-achievement-grid {
        grid-template-columns: 1fr;
    }
}

/* Final task grid alignment */
.main-buttons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
}

.main-buttons-grid > * {
    grid-column: auto !important;
}

.task-card {
    min-height: 138px !important;
    padding: 20px 16px 18px !important;
    display: grid !important;
    grid-template-rows: 1fr auto;
    justify-items: center !important;
    align-items: center !important;
    align-content: center !important;
    gap: 10px !important;
    text-align: center !important;
}

.task-card::after {
    left: 18px !important;
    top: 14px !important;
    width: 44px !important;
    height: 5px !important;
}

.task-card .task-btn-title {
    margin: 0 !important;
}

.task-btn-number {
    width: 100%;
    display: block;
    margin: 0 auto !important;
    font-size: clamp(34px, 8vw, 52px) !important;
    line-height: 0.86 !important;
    letter-spacing: 0.08em !important;
    text-align: center !important;
    transform: scaleX(1.22) !important;
    transform-origin: center center !important;
}

.task-card .subtitle {
    width: 100%;
    max-width: 150px;
    margin: 0 auto !important;
    color: #31538f !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.14 !important;
    letter-spacing: 0.12em !important;
    text-align: center !important;
    text-transform: uppercase !important;
    text-wrap: balance;
}

.task-card .subtitle-multiline {
    max-width: 134px;
}

@media (max-width: 420px) {
    .main-buttons-grid {
        gap: 12px !important;
    }

    .task-card {
        min-height: 126px !important;
        padding: 18px 14px 16px !important;
        border-radius: 28px !important;
    }

    .task-btn-number {
        font-size: clamp(30px, 10vw, 44px) !important;
        letter-spacing: 0.06em !important;
        transform: scaleX(1.18) !important;
    }

    .task-card .subtitle {
        max-width: 126px;
        font-size: 10px !important;
        letter-spacing: 0.08em !important;
    }

    .task-card .subtitle-multiline {
        max-width: 118px;
    }
}
