* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes xpGrow {
    from { width: 0; }
}

@keyframes progressionShine {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

@keyframes leaderboardBarGrow {
    from { width: 0; }
    to { width: var(--leaderboard-bar); }
}

@property --ring-progress {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

body {
    background: #0d0d0d;
    color: #fff;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    animation: fadeIn 0.4s ease;
}

/* ── LAYOUT AUTH ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease both;
}

.logo {
    text-align: center;
    margin-bottom: 48px;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #e8517a;
    letter-spacing: 2px;
}

.logo p {
    color: #666;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 300;
}

/* ── NAVBAR ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: fadeIn 0.4s ease both;
}

.app-navbar {
    justify-content: flex-start;
    gap: 14px;
    z-index: 20;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: #e8517a;
    letter-spacing: 3px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #888;
    overflow: visible;
}

.nav-profile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 2px;
}

.nav-profile-search-toggle {
    display: none;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    color: #cfcfcf;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.nav-profile-search-toggle:hover,
.nav-profile-search-toggle:focus,
.nav-profile-search-toggle:focus-visible {
    border-color: rgba(232, 81, 122, 0.26);
    color: #f0a8bc;
    background: rgba(255,255,255,0.05);
}

.nav-profile-search-toggle span {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    font-size: 0;
    line-height: 0;
}

.nav-profile-search-toggle span::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.8px solid currentColor;
    border-radius: 999px;
}

.nav-profile-search-toggle span::after {
    content: "";
    position: absolute;
    right: -4px;
    bottom: -3px;
    width: 6px;
    height: 1.8px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: center;
}

.nav-profile-search-input {
    width: 94px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #f2eff1;
    font-size: 0.75rem;
    line-height: 1;
}

.nav-profile-search-input::placeholder {
    color: #6f6f6f;
}

.nav-profile-search-input:focus {
    border-color: rgba(232, 81, 122, 0.34);
    background: rgba(255,255,255,0.05);
}

.nav-user > span:first-of-type {
    display: none;
}

.nav-user-name {
    color: #f6f3f5;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
}

.nav-discord-btn,
.nav-discord-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
}

.nav-discord-btn {
    min-height: 26px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(88, 101, 242, 0.28);
    background: rgba(88, 101, 242, 0.12);
    color: #cdd4ff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-discord-btn:hover {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(88, 101, 242, 0.18);
    color: #eef0ff;
    transform: translateY(-1px);
}

.nav-discord-link {
    width: 15px;
    height: 15px;
    margin-right: -4px;
    opacity: 0.82;
    overflow: visible;
    z-index: 2;
}

.nav-discord-link:hover,
.nav-discord-link:focus,
.nav-discord-link:focus-visible {
    z-index: 1600;
}

.nav-discord-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(88, 101, 242, 0.12));
    transition: transform 0.18s ease, filter 0.18s ease;
}

.nav-discord-link:hover img,
.nav-discord-link:focus img,
.nav-discord-link:focus-visible img {
    transform: scale(1.04);
    filter: drop-shadow(0 5px 10px rgba(88, 101, 242, 0.18));
}

.nav-discord-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    width: max-content;
    max-width: min(280px, calc(100vw - 24px));
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(14, 14, 14, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    color: #cfcfcf;
    font-size: 0.74rem;
    line-height: 1.45;
    white-space: normal;
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1500;
}

.nav-discord-tooltip.is-align-left {
    left: 0;
    transform: translateY(-4px);
}

.nav-discord-tooltip.is-align-right {
    left: auto;
    right: 0;
    transform: translateY(-4px);
}

.nav-discord-tooltip.is-place-top {
    top: auto;
    bottom: calc(100% + 10px);
}

.nav-discord-link:hover .nav-discord-tooltip,
.nav-discord-link:focus .nav-discord-tooltip,
.nav-discord-link:focus-visible .nav-discord-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nav-discord-link:hover .nav-discord-tooltip.is-align-left,
.nav-discord-link:focus .nav-discord-tooltip.is-align-left,
.nav-discord-link:focus-visible .nav-discord-tooltip.is-align-left,
.nav-discord-link:hover .nav-discord-tooltip.is-align-right,
.nav-discord-link:focus .nav-discord-tooltip.is-align-right,
.nav-discord-link:focus-visible .nav-discord-tooltip.is-align-right {
    transform: translateY(0);
}

.btn-logout {
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: #e8517a;
    color: #e8517a;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: #d6d6d6;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-icon-btn span {
    font-size: 1.4rem;
    line-height: 1;
    transform: translateX(-1px);
}

.nav-icon-btn:hover {
    border-color: rgba(232, 81, 122, 0.34);
    color: #f0a8bc;
}

.nav-player {
    flex: 0 1 240px;
    min-width: 140px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.nav-player-top {
    width: min(100%, 168px);
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.nav-player-name {
    color: #f6f3f5;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

a.nav-player-name:hover {
    color: #e8517a;
}

.nav-player-level {
    color: #e8517a;
    min-width: 12px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.nav-progress-track {
    width: min(100%, 168px);
    min-width: 0;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}

.nav-progress-bar {
    height: 100%;
    min-width: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8517a, #f06e92);
    box-shadow: 0 0 18px rgba(232, 81, 122, 0.28);
    animation: xpGrow 0.9s ease 0.15s both;
    transform-origin: left center;
}

.nav-player-xp {
    color: #8b8b8b;
    width: 100%;
    font-size: 0.65rem;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    opacity: 0.9;
}

.btn-nav {
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.2s;
}

.btn-nav:hover {
    border-color: #e8517a;
    color: #e8517a;
}

.app-logout {
    margin-left: auto;
}

/* ── DASHBOARD WRAPPER ── */
.dashboard-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 40px;
}

/* ── CARD ── */
.card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease both;
}

.dashboard-wrapper .card {
    background: rgba(255,255,255,0.028);
    border-color: rgba(255,255,255,0.06);
}

/* ── PROFILE CARD ── */
.dashboard-mid-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 30px;
}

.profile-card {
    min-height: 132px;
    margin-bottom: 22px;
    padding: 24px 28px;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.lesson-hub-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 156px;
    margin-bottom: 0;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.028);
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.5s ease 0.16s both;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.lesson-hub-card:hover {
    transform: translateY(-2px);
    border-color: rgba(232, 81, 122, 0.22);
    box-shadow: 0 14px 34px rgba(232, 81, 122, 0.08);
}

.dashboard-mid-grid .lesson-hub-card {
    animation-delay: 0.12s;
}

.dashboard-left-stack {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.dashboard-right-col {
    min-width: 0;
}

.dashboard-left-stack .lesson-hub-card {
    min-height: 0;
    padding: 16px 18px;
    gap: 13px;
}

.dashboard-left-stack .progress-ring {
    width: 50px;
    height: 50px;
    padding: 4px;
}

.dashboard-left-stack .lesson-hub-ring-inner {
    font-size: 0.76rem;
}

.dashboard-left-stack .lesson-hub-copy h3 {
    margin-top: 4px;
    font-size: 1.08rem;
}

.dashboard-left-stack .lesson-hub-copy p:last-child {
    margin-top: 4px;
    font-size: 0.84rem;
}

/* ── BOSS TEASER ── */
.boss-teaser-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    min-height: 0;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.028);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease 0.2s both;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.boss-teaser-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(19,19,19,0.9) 0%, rgba(19,19,19,0.78) 34%, rgba(19,19,19,0.54) 58%, rgba(19,19,19,0.72) 100%);
    pointer-events: none;
    z-index: 1;
}

.boss-teaser-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
    pointer-events: none;
    z-index: 2;
}

.boss-teaser-card:hover {
    transform: translateY(-2px);
    border-color: rgba(232, 81, 122, 0.22);
    box-shadow: 0 14px 34px rgba(232, 81, 122, 0.08);
}

.boss-teaser-card.is-active {
    border-color: rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.028);
    cursor: pointer;
    padding-right: 50px;
}

.boss-teaser-card.is-active:hover {
    border-color: rgba(232, 81, 122, 0.22);
    box-shadow: 0 14px 34px rgba(232, 81, 122, 0.08);
}

.boss-teaser-kicker.is-active {
    color: #e8517a;
}

.boss-teaser-hp {
    margin-top: 10px;
    display: grid;
    gap: 7px;
}

.boss-teaser-media {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.32;
    filter: saturate(1) contrast(1.08) brightness(0.95);
    pointer-events: none;
    z-index: 0;
}

.boss-teaser-hp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.68rem;
    color: #8f8f8f;
    text-transform: uppercase;
    letter-spacing: 1.1px;
}

.boss-teaser-hp-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.boss-teaser-hp-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff6b93 0%, #f58a58 100%);
    min-width: 6px;
    box-shadow: 0 0 16px rgba(232, 81, 122, 0.18);
    transition: width 0.6s ease;
}

.boss-teaser-copy {
    min-width: 0;
    position: relative;
    z-index: 3;
}

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

.boss-teaser-kicker {
    display: block;
    color: #8f8f8f;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.boss-teaser-health-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(232, 81, 122, 0.08);
    border: 1px solid rgba(232, 81, 122, 0.14);
    color: #f0a8bc;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.boss-teaser-copy h3 {
    margin-top: 3px;
    font-size: 1.08rem;
    font-weight: 600;
    color: #fff;
}

.boss-teaser-copy p {
    margin-top: 3px;
    font-size: 0.8rem;
    color: #8f8f8f;
    line-height: 1.4;
}

.boss-teaser-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8f8f8f;
    font-size: 1.3rem;
    line-height: 1;
    z-index: 3;
}

.streak-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.028);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease 0.2s both;
}

.streak-card-copy {
    min-width: 0;
}

.streak-card-copy-main {
    align-self: start;
}

.streak-metrics {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.streak-metric {
    min-width: 62px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 13px;
    background: rgba(255,255,255,0.02);
    text-align: center;
}

.streak-metric.is-active {
    border-color: rgba(232, 81, 122, 0.26);
    background: rgba(232, 81, 122, 0.035);
}

.streak-metric span {
    display: block;
    color: #8f8f8f;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.streak-metric strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
}

.streak-metric.is-active strong {
    color: #ff6c97;
}

.streak-consecutive {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-self: start;
    min-width: 0;
    padding: 0;
    flex-wrap: wrap;
}

.streak-consecutive strong {
    color: #ff7a9f;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.streak-consecutive span {
    color: #8f8f8f;
    font-size: 0.76rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.streak-card-keys {
    padding-top: 2px;
    justify-content: flex-start;
}

.streak-flame {
    font-size: 0.95rem;
    line-height: 1;
    filter: saturate(1.05);
}

/* ── STREAK BADGE ── */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-bottom: 2px;
}

.streak-badge-flame {
    line-height: 1;
    filter: saturate(1.1);
    transition: transform 0.3s ease;
}

.streak-badge:hover .streak-badge-flame {
    transform: scale(1.15);
}

.streak-badge-count {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.streak-badge.milestone-1 .streak-badge-count {
    color: #ff9a5c;
}

.streak-badge.milestone-4 .streak-badge-count {
    color: #ff6b35;
}

.streak-badge.milestone-7 .streak-badge-count {
    color: #e84141;
}

.streak-badge.milestone-14 .streak-badge-count {
    color: #ffd700;
}

.streak-badge.milestone-14 .streak-badge-flame {
    animation: streak-blaze 1.2s ease-in-out infinite;
}

@keyframes streak-blaze {
    0%, 100% { transform: scale(1); filter: saturate(1.1) brightness(1); }
    50% { transform: scale(1.2); filter: saturate(1.5) brightness(1.2); }
}

.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    outline: none;
    overflow: visible;
    z-index: 2;
}

.info-icon:hover,
.info-icon:focus,
.info-icon:focus-within {
    z-index: 1600;
}

.info-icon-trigger {
    font-size: 0.7rem;
    color: #666;
    cursor: help;
    line-height: 1;
    transition: color 0.15s ease;
}

.info-icon:hover .info-icon-trigger,
.info-icon:focus .info-icon-trigger,
.info-icon:focus-within .info-icon-trigger {
    color: #e8517a;
}

.info-icon-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    width: min(220px, calc(100vw - 24px));
    padding: 9px 11px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(14, 14, 14, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    color: #b9b9b9;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-50%) translateY(4px);
    z-index: 1500;
}

.info-icon-tooltip.is-align-left {
    left: 0;
    transform: translateY(4px);
}

.info-icon-tooltip.is-align-right {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.info-icon-tooltip.is-place-bottom {
    bottom: auto;
    top: calc(100% + 8px);
}

.info-icon:hover .info-icon-tooltip,
.info-icon:focus .info-icon-tooltip,
.info-icon:focus-within .info-icon-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.info-icon:hover .info-icon-tooltip.is-align-left,
.info-icon:focus .info-icon-tooltip.is-align-left,
.info-icon:focus-within .info-icon-tooltip.is-align-left,
.info-icon:hover .info-icon-tooltip.is-align-right,
.info-icon:focus .info-icon-tooltip.is-align-right,
.info-icon:focus-within .info-icon-tooltip.is-align-right {
    transform: translateY(0);
}

.progress-ring {
    --ring-progress: 0%;
    width: 70px;
    height: 70px;
    padding: 5px;
    border-radius: 50%;
    background: conic-gradient(#e8517a var(--ring-progress), rgba(255,255,255,0.08) 0);
    transition: --ring-progress 0.95s ease 0.15s;
    flex-shrink: 0;
}

.lesson-hub-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
}

.lesson-hub-copy {
    min-width: 0;
    flex: 1;
}

.lesson-hub-kicker {
    color: #e8517a;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.lesson-hub-copy h3,
.lessons-header-copy h1 {
    margin-top: 6px;
    color: #fff;
    font-size: 1.4rem;
}

.lesson-hub-copy p,
.lessons-header-copy p {
    margin-top: 8px;
    color: #8f8f8f;
    line-height: 1.55;
}

.lesson-hub-arrow {
    color: #8f8f8f;
    font-size: 1.6rem;
    line-height: 1;
}

.progression-block {
    margin-top: 18px;
}

.progression-next-zone-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(232, 81, 122, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% 18%, rgba(232, 81, 122, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(232, 81, 122, 0.08), rgba(255,255,255,0.018) 48%),
        rgba(255,255,255,0.028);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.progression-next-block {
    margin-top: 20px;
}

.progression-next-zone-copy {
    min-width: 0;
}

.progression-next-zone-copy span {
    color: #e8517a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.progression-next-zone-copy h4 {
    margin-top: 5px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.15;
}

.progression-next-zone-copy p {
    display: block;
    margin-top: 8px;
    color: #8f8f8f;
    font-size: 0.84rem;
    line-height: 1.45;
}

.progression-next-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 18px;
    border: 1px solid rgba(232, 81, 122, 0.36);
    border-radius: 999px;
    background: #e8517a;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.progression-next-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(232, 81, 122, 0.18);
}

/* ── LEADERBOARD ── */
.weekly-leaderboard-card {
    margin-bottom: 0;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.dashboard-right-col .weekly-leaderboard-head {
    margin-bottom: 16px;
}

.dashboard-right-col .weekly-leaderboard-head h3 {
    font-size: 1.2rem;
}

.dashboard-right-col .weekly-leaderboard-featured {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    border-radius: 0;
    background: transparent;
}

.dashboard-right-col .weekly-leaderboard-featured-rank {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.dashboard-right-col .weekly-leaderboard-featured-score {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 0;
}

.dashboard-right-col .weekly-leaderboard-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px 0;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    background: transparent;
}

.dashboard-right-col .weekly-leaderboard-count {
    display: none;
}

.weekly-leaderboard-chart {
    display: grid;
    gap: 13px;
}

.weekly-leaderboard-panel.is-collapsed .leaderboard-chart-row:nth-child(n+5) {
    display: none;
}

.weekly-leaderboard-more {
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8f8f8f;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.18s ease;
}

.weekly-leaderboard-more:hover,
.weekly-leaderboard-more:focus,
.weekly-leaderboard-more:focus-visible {
    color: #f0a8bc;
}

.leaderboard-chart-row {
    --rank-accent: #e8517a;
    --rank-soft: rgba(232, 81, 122, 0.10);
    --rank-border: rgba(232, 81, 122, 0.28);
    --rank-end: #ff7aa2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "head xp"
        "track track";
    align-items: center;
    gap: 8px 14px;
}

.leaderboard-chart-row.is-rank-1 {
    --rank-accent: #d9ad4f;
    --rank-soft: rgba(217, 173, 79, 0.13);
    --rank-border: rgba(217, 173, 79, 0.34);
    --rank-end: #f1d58a;
}

.leaderboard-chart-row.is-rank-2 {
    --rank-accent: #b8c0cc;
    --rank-soft: rgba(184, 192, 204, 0.12);
    --rank-border: rgba(184, 192, 204, 0.30);
    --rank-end: #e0e5ec;
}

.leaderboard-chart-row.is-rank-3 {
    --rank-accent: #bd7a4a;
    --rank-soft: rgba(189, 122, 74, 0.13);
    --rank-border: rgba(189, 122, 74, 0.32);
    --rank-end: #dfac7c;
}

.leaderboard-chart-head {
    grid-area: head;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.leaderboard-chart-rank {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rank-border);
    border-radius: 9px;
    background: var(--rank-soft);
    color: var(--rank-accent);
    font-size: 0.72rem;
    font-weight: 800;
}

.leaderboard-chart-name {
    min-width: 0;
    color: #f5f1f3;
    font-size: 0.9rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-chart-link {
    min-width: 0;
    text-decoration: none;
}

.leaderboard-chart-link:hover .leaderboard-chart-name,
.leaderboard-chart-link:focus .leaderboard-chart-name,
.leaderboard-chart-link:focus-visible .leaderboard-chart-name {
    color: #f7bdcd;
}

.leaderboard-chart-count {
    color: #777;
    font-size: 0.72rem;
    white-space: nowrap;
}

.leaderboard-chart-xp {
    grid-area: xp;
    color: var(--rank-accent);
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
}

.leaderboard-chart-track {
    grid-area: track;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.055);
}

.leaderboard-chart-bar {
    width: var(--leaderboard-bar);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rank-accent), var(--rank-end));
    opacity: 0.92;
    animation: leaderboardBarGrow 0.8s ease 0.16s both;
}

.leaderboard-chart-row.is-current-user .leaderboard-chart-track {
    background: rgba(232, 81, 122, 0.10);
}

.weekly-leaderboard-card::before {
    content: none;
}

.weekly-leaderboard-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.weekly-leaderboard-kicker {
    color: #e8517a;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.weekly-leaderboard-head h3 {
    margin-top: 6px;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.1;
}

.weekly-leaderboard-period {
    color: #8f8f8f;
    font-size: 0.76rem;
    white-space: nowrap;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
}

.weekly-leaderboard-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.025);
}

.weekly-leaderboard-tab {
    min-height: 32px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #888;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.weekly-leaderboard-tab:hover,
.weekly-leaderboard-tab:focus,
.weekly-leaderboard-tab:focus-visible {
    color: #f1ccd7;
}

.weekly-leaderboard-tab.is-active {
    background: rgba(232, 81, 122, 0.12);
    color: #f6f0f2;
}

.weekly-leaderboard-tab:focus-visible {
    outline: 2px solid rgba(232, 81, 122, 0.48);
    outline-offset: 2px;
}

.weekly-leaderboard-panel {
    display: none;
}

.weekly-leaderboard-panel.is-active {
    display: block;
}

.weekly-leaderboard-panel-meta {
    margin-bottom: 14px;
}

.weekly-leaderboard-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.weekly-leaderboard-featured {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
}

.weekly-leaderboard-featured.is-current-user {
    border-color: rgba(255,255,255,0.07);
    box-shadow: none;
}

.weekly-leaderboard-featured-rank {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(232, 81, 122, 0.28);
    background: rgba(232, 81, 122, 0.10);
    color: #ff6c97;
    font-size: 0.95rem;
    font-weight: 800;
}

.weekly-leaderboard-featured-copy {
    min-width: 0;
}

.weekly-leaderboard-featured-label {
    display: none;
    color: #8f8f8f;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.weekly-leaderboard-featured-copy h4 {
    margin-top: 0;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-leaderboard-featured-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.weekly-leaderboard-featured-score strong {
    color: #e8517a;
    font-size: 1.08rem;
    line-height: 1;
}

.weekly-leaderboard-featured-score span {
    color: #9b9b9b;
    font-size: 0.72rem;
    white-space: nowrap;
}

.weekly-leaderboard-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    background: rgba(255,255,255,0.022);
}

.weekly-leaderboard-row.is-current-user {
    border-color: rgba(232, 81, 122, 0.16);
    background: transparent;
}

.weekly-leaderboard-rank {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
    color: #d8d8d8;
    font-size: 0.78rem;
    font-weight: 700;
}

.weekly-leaderboard-name {
    min-width: 0;
    color: #f5f1f3;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-leaderboard-count {
    color: #777;
    font-size: 0.78rem;
    white-space: nowrap;
}

.weekly-leaderboard-xp {
    color: #e8517a;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.weekly-leaderboard-empty {
    color: #8f8f8f;
    line-height: 1.6;
    padding: 16px 0 2px;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.profile-identity {
    min-width: 0;
}

.profile-actions-row {
    display: none;
}

.profile-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-name-link {
    text-decoration: none;
    color: inherit;
}

.profile-name-link:hover {
    color: #e8517a;
}

.profile-crown {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: 2px;
    animation: crown-float 3s ease-in-out infinite;
}

@keyframes crown-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.profile-identity {
    min-width: 0;
}

.profile-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
}

.profile-meta-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.level-label {
    color: #e8517a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discord-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(88, 101, 242, 0.28);
    background: rgba(88, 101, 242, 0.12);
    color: #cdd4ff;
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.discord-link-btn:hover {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(88, 101, 242, 0.18);
    color: #eef0ff;
    transform: translateY(-1px);
}

.discord-linked-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    opacity: 0.9;
}

.discord-linked-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(88, 101, 242, 0.12));
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.discord-linked-icon:hover img,
.discord-linked-icon:focus img,
.discord-linked-icon:focus-visible img {
    transform: scale(1.04);
    filter: drop-shadow(0 5px 10px rgba(88, 101, 242, 0.18));
}

.discord-linked-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    width: max-content;
    max-width: min(280px, calc(100vw - 64px));
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(14, 14, 14, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    color: #cfcfcf;
    font-size: 0.74rem;
    line-height: 1.45;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 16;
}

.discord-linked-icon:hover .discord-linked-tooltip,
.discord-linked-icon:focus .discord-linked-tooltip,
.discord-linked-icon:focus-visible .discord-linked-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.discord-link-note {
    display: none;
}

.discord-handle {
    color: #cdd4ff;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
}

.profile-title-row {
    margin-top: 4px;
}

.profile-title-row .profile-key-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.xp-info {
    font-size: 0.85rem;
    color: #555;
    text-align: right;
}

/* ── XP BAR ── */
.xp-bar-wrapper {
    margin-top: 18px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}

.xp-bar {
    background: linear-gradient(90deg, #e8517a, #f06e92);
    height: 100%;
    border-radius: 99px;
    min-width: 4px;
    animation: xpGrow 1s ease 0.5s both;
    transition: width 0.6s ease;
}

.profile-keys {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    padding-top: 2px;
}

.profile-key {
    position: relative;
    width: 52px;
    height: 52px;
    overflow: visible;
    outline: none;
    flex: 0 0 auto;
    z-index: 2;
}

.profile-key:hover,
.profile-key:focus,
.profile-key:focus-within {
    z-index: 1600;
}

.profile-key img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 5px 11px rgba(0, 0, 0, 0.28));
    opacity: 0.96;
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.profile-key:hover img,
.profile-key:focus-within img,
.profile-key:focus img {
    transform: scale(1.06);
    filter: drop-shadow(0 9px 20px rgba(232, 81, 122, 0.22));
}

.profile-key-overlay {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    width: min(220px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(14, 14, 14, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 1500;
}

.profile-key-overlay.is-place-left {
    left: auto;
    right: calc(100% + 12px);
}

.profile-key-overlay.is-place-bottom {
    top: calc(100% + 12px);
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-6px);
}

.profile-key-overlay.is-place-bottom.is-align-left {
    left: 0;
    transform: translateY(-6px);
}

.profile-key-overlay.is-place-bottom.is-align-right {
    left: auto;
    right: 0;
    transform: translateY(-6px);
}

.profile-key:hover .profile-key-overlay,
.profile-key:focus .profile-key-overlay,
.profile-key:focus-within .profile-key-overlay {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.profile-key:hover .profile-key-overlay.is-place-bottom,
.profile-key:focus .profile-key-overlay.is-place-bottom,
.profile-key:focus-within .profile-key-overlay.is-place-bottom,
.profile-key:hover .profile-key-overlay.is-place-bottom.is-align-left,
.profile-key:focus .profile-key-overlay.is-place-bottom.is-align-left,
.profile-key:focus-within .profile-key-overlay.is-place-bottom.is-align-left,
.profile-key:hover .profile-key-overlay.is-place-bottom.is-align-right,
.profile-key:focus .profile-key-overlay.is-place-bottom.is-align-right,
.profile-key:focus-within .profile-key-overlay.is-place-bottom.is-align-right {
    transform: translateY(0);
}

.profile-key-title {
    color: #f5f1f3;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.key-rarity-1 {
    color: #9a9a9a;
}

.key-rarity-2 {
    color: #f5f1f3;
}

.key-rarity-3 {
    color: #67d39a;
    text-shadow: 0 0 10px rgba(103, 211, 154, 0.14);
}

.key-rarity-4 {
    color: #67a8ff;
    text-shadow: 0 0 10px rgba(103, 168, 255, 0.16);
}

.key-rarity-5 {
    color: #b38cff;
    text-shadow: 0 0 12px rgba(179, 140, 255, 0.18);
}

.key-rarity-6 {
    color: #ffb25b;
    text-shadow: 0 0 12px rgba(255, 178, 91, 0.18);
}

.key-rarity-7 {
    background: linear-gradient(90deg, #ff5b7f 0%, #ffb25b 22%, #ffe27a 42%, #7de7b1 58%, #72b8ff 76%, #c18cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.profile-key-description {
    color: #b9b9b9;
    font-size: 0.69rem;
    line-height: 1.5;
}

.user-profiles-page {
    display: grid;
    gap: 20px;
}

.profile-search-results {
    display: grid;
    gap: 10px;
}

.profile-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    background: rgba(255,255,255,0.025);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.profile-search-result:hover,
.profile-search-result:focus,
.profile-search-result:focus-visible {
    border-color: rgba(232, 81, 122, 0.22);
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

.profile-search-result-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f5f1f3;
    font-weight: 600;
}

.profile-search-result-meta {
    color: #8c8c8c;
    font-size: 0.82rem;
    white-space: nowrap;
}

.profile-search-result-badge,
.public-profile-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(232, 81, 122, 0.16);
    background: rgba(232, 81, 122, 0.08);
    color: #ef9cb4;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.public-profile-card {
    display: grid;
    gap: 18px;
}

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

.public-profile-stat,
.public-profile-summary-card {
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
}

.public-profile-stat-label {
    display: block;
    color: #727272;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.public-profile-stat strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
}

.public-profile-stat p {
    margin-top: 4px;
    color: #8b8b8b;
    font-size: 0.78rem;
}

.badge-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.badge-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px 9px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.05);
    line-height: 1;
}

.badge-cell-gold {
    border-color: rgba(217, 173, 79, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 242, 184, 0.08);
}

.badge-cell-silver {
    border-color: rgba(184, 192, 204, 0.22);
    box-shadow: inset 0 1px 0 rgba(247, 250, 255, 0.08);
}

.badge-cell-bronze {
    border-color: rgba(189, 122, 74, 0.22);
    box-shadow: inset 0 1px 0 rgba(244, 208, 174, 0.08);
}

.badge-icon {
    width: 34px;
    height: 34px;
    display: block;
}

.badge-tier-label {
    color: #8f8f8f;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.badge-cell strong {
    display: block !important;
    margin-top: 0 !important;
    font-size: 1.02rem !important;
    color: #fff;
}

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

.public-profile-summary-card h3 {
    color: #fff;
    font-size: 1.02rem;
    line-height: 1.2;
}

.public-profile-summary-copy {
    margin-top: 8px;
    color: #8b8b8b;
    line-height: 1.55;
}

.public-profile-keys-section {
    display: grid;
    gap: 12px;
}

.discord-link-page {
    max-width: 860px;
}

.discord-link-card {
    max-width: 720px;
    margin: 0 auto;
}

.discord-link-kicker {
    color: #5865f2;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.discord-link-card h1 {
    margin-top: 10px;
    font-size: 2rem;
    color: #fff;
}

.discord-link-intro {
    margin-top: 12px;
    color: #9a9a9a;
    line-height: 1.65;
    max-width: 54ch;
}

.discord-link-status {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.discord-link-status.is-linked {
    border-color: rgba(103, 211, 154, 0.22);
    background: rgba(103, 211, 154, 0.08);
}

.discord-link-status.is-pending {
    border-color: rgba(88, 101, 242, 0.2);
    background: rgba(88, 101, 242, 0.08);
}

.discord-link-status-label {
    color: #d9d9d9;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.discord-link-status-value {
    margin-top: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
}

.discord-link-code-wrap {
    margin-top: 22px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.22);
}

.discord-link-join-card {
    margin-top: 18px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(88, 101, 242, 0.16);
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.09), rgba(88, 101, 242, 0.05));
}

.discord-link-join-label {
    color: #cfd5ff;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.discord-link-join-copy {
    margin-top: 8px;
    color: #d7daf2;
    line-height: 1.6;
    max-width: 54ch;
}

.discord-link-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 240px;
    margin-top: 16px;
    text-decoration: none;
    background: #5865f2;
}

.discord-link-join-btn:hover {
    opacity: 1;
    background: #6a75f5;
}

.discord-link-code-label {
    color: #8f8f8f;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.discord-link-code {
    margin-top: 12px;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.2;
}

.discord-link-command {
    margin-top: 12px;
    color: #9a9a9a;
    font-size: 0.88rem;
    line-height: 1.55;
}

.discord-link-command code,
.discord-link-steps code {
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(255,255,255,0.06);
    color: #dfe2ff;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95em;
}

.discord-link-steps {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.discord-link-steps p {
    color: #c9c9c9;
    line-height: 1.65;
}

.discord-link-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.discord-link-actions .btn {
    width: auto;
    min-width: 220px;
    margin-top: 0;
}

.discord-link-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ── SECTION TITLE ── */
.section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2.2px;
    color: #555;
    margin-bottom: 14px;
    animation: fadeIn 0.5s ease 0.2s both;
}

/* ── ZONES GRID ── */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* ── ZONE CARD ── */
.zone-card {
    background: rgba(255,255,255,0.028);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.055);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease both;
}

/* Délai en cascade pour chaque card */
.zone-card:nth-child(1) { animation-delay: 0.2s; }
.zone-card:nth-child(2) { animation-delay: 0.35s; }
.zone-card:nth-child(3) { animation-delay: 0.5s; }
.zone-card:nth-child(4) { animation-delay: 0.65s; }
.zone-card:nth-child(5) { animation-delay: 0.8s; }
.zone-card:nth-child(6) { animation-delay: 0.95s; }

.zone-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.zone-card.locked {
    opacity: 0.5;
}

/* ── IMAGE ZONE ── */
.zone-card-image {
    position: relative;
    width: 100%;
    height: 176px;
    overflow: hidden;
    flex-shrink: 0;
}

.zone-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.zone-card:hover:not(.locked) .zone-card-image img {
    transform: scale(1.04);
}

.zone-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.zone-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* ── BODY ZONE CARD ── */
.zone-card-body {
    padding: 1.2rem 1.35rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.zone-card-label {
    color: #e8517a;
    font-size: 0.78rem;
    font-style: italic;
    margin: 0;
}

.zone-card-title {
    color: #ffffff;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0;
}

.zone-card-desc {
    color: #777;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 4px 0 10px;
    flex: 1;
}

.zone-progress {
    margin: 2px 0 12px;
}

.zone-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.zone-progress-label {
    color: #868686;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
}

.zone-progress-value {
    color: #d8d8d8;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.zone-progress-track {
    height: 5px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}

.zone-progress-bar {
    height: 100%;
    min-width: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8517a, #f06e92);
    box-shadow: 0 0 18px rgba(232, 81, 122, 0.22);
    animation: xpGrow 0.9s ease 0.2s both;
    transform-origin: left center;
}

.lessons-page {
    padding-top: 32px;
}

.lessons-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.lessons-zones {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lesson-zone {
    padding: 0;
    overflow: hidden;
}

.lesson-zone-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    cursor: pointer;
    text-align: left;
}

.lesson-zone-toggle-copy {
    min-width: 0;
}

.lesson-zone-toggle-copy h2 {
    margin-top: 8px;
    color: #fff;
    font-size: 1.28rem;
}

.lesson-zone-meta {
    margin-top: 8px;
    color: #8f8f8f;
    line-height: 1.5;
}

.lesson-zone-toggle-side {
    min-width: 210px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.lesson-zone-progress {
    flex: 1;
}

.lesson-zone-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.lesson-zone-progress-label {
    color: #868686;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
}

.lesson-zone-progress-value {
    color: #d8d8d8;
    font-size: 0.78rem;
    font-weight: 600;
}

.lesson-zone-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255,255,255,0.58);
    border-bottom: 2px solid rgba(255,255,255,0.58);
    transform: rotate(45deg);
    transition: transform 0.22s ease;
    flex: 0 0 auto;
}

.lesson-zone.is-open .lesson-zone-chevron {
    transform: rotate(225deg);
}

.lesson-zone-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 28px 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
    transition: max-height 0.28s ease, opacity 0.22s ease;
}

.lesson-zone.is-open .lesson-zone-body {
    opacity: 1;
}

.lesson-zone-empty {
    padding-top: 18px;
    color: #8d8d8d;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-top: 18px;
}

.lesson-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lesson-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.lesson-card-zone {
    color: #e8517a;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.lesson-card h3 {
    font-size: 1.18rem;
    color: #fff;
}

.lesson-card-state {
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}

.lesson-card-state.is-done {
    color: #67d39a;
    background: rgba(103, 211, 154, 0.12);
}

.lesson-card-state.is-current {
    color: #f0a8bc;
    background: rgba(232, 81, 122, 0.14);
}

.lesson-card-desc {
    margin-top: 12px;
    color: #8d8d8d;
    line-height: 1.6;
}

.lesson-read-btn {
    width: auto;
    min-width: 160px;
    max-width: 190px;
    margin-top: 2px;
    margin-right: auto;
    padding: 0.72rem 1.15rem;
    font-size: 0.88rem;
}

.lessons-empty {
    color: #8d8d8d;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.confirm-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(8px);
}

.confirm-modal-dialog {
    position: relative;
    width: min(100%, 720px);
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.035)), rgba(19, 19, 19, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.confirm-modal-kicker {
    color: #e8517a;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.lesson-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.lesson-modal-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    color: #d8d8d8;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.lesson-modal-body {
    margin-top: 18px;
    max-height: min(62vh, 560px);
    overflow-y: auto;
    padding-right: 6px;
}

.lesson-modal-text {
    color: #cfcfcf;
    font-size: 0.97rem;
    line-height: 1.8;
}

.markdown-content > * + * {
    margin-top: 14px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: #ffffff;
    line-height: 1.2;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.24rem; }
.markdown-content h3 { font-size: 1.05rem; }

.markdown-content p,
.markdown-content li,
.markdown-content blockquote {
    color: #cfcfcf;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.3rem;
}

.markdown-content li + li {
    margin-top: 6px;
}

.markdown-content blockquote {
    padding-left: 14px;
    border-left: 2px solid rgba(232, 81, 122, 0.38);
    color: #dfb6c4;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.markdown-content strong {
    color: #fff;
    font-weight: 700;
}

.markdown-content em {
    color: #f0c3d0;
    font-style: italic;
}

.markdown-content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #f6d1db;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92em;
}

.markdown-content a {
    color: #f0a8bc;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── BOUTON ZONE ── */
.btn-zone-main {
    display: block;
    width: 100%;
    padding: 0.74rem;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: auto;
}

.btn-zone-main:hover {
    background: #e8e8e8;
}

.btn-zone-main:active {
    transform: scale(0.98);
}

.btn-zone-main.disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
}

.zone-lock-hint {
    display: block;
    margin-top: 3px;
    color: #8f8f8f;
    font-size: 0.72rem;
    font-weight: 500;
}

/* ── FORMULAIRES ── */
.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-hint {
    margin-top: 7px;
    color: #777;
    font-size: 0.78rem;
    line-height: 1.45;
}

input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}

input:focus { border-color: #e8517a; }

/* ── BOUTONS ── */
.btn {
    width: 100%;
    background: #e8517a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover { opacity: 0.85; }

.btn:active { transform: scale(0.99); }

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}

.btn-ghost:hover {
    border-color: #e8517a;
    color: #e8517a;
    opacity: 1;
}

/* ── ALERTES ── */
.error {
    background: rgba(255, 80, 80, 0.1);
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease both;
}

.success {
    background: rgba(80, 200, 120, 0.1);
    border: 1px solid rgba(80, 200, 120, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #50c878;
    font-size: 0.85rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease both;
}

/* ── LIENS AUTH ── */
.auth-link {
    text-align: center;
    margin-top: 24px;
    color: #555;
    font-size: 0.85rem;
}

.auth-link a {
    color: #e8517a;
    text-decoration: none;
}

.auth-link a:hover { text-decoration: underline; }

/* ── TABS ── */
.tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease 0.15s both;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 7px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tab:hover { color: #fff; }

.tab.active {
    background: rgba(232, 81, 122, 0.15);
    color: #e8517a;
    font-weight: 500;
}

/* ── QUEST CARD ── */
.quest-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #fff;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    animation: fadeInUp 0.4s ease both;
}

.quest-card:nth-child(1) { animation-delay: 0.1s; }
.quest-card:nth-child(2) { animation-delay: 0.2s; }
.quest-card:nth-child(3) { animation-delay: 0.3s; }
.quest-card:nth-child(4) { animation-delay: 0.4s; }
.quest-card:nth-child(5) { animation-delay: 0.5s; }

.quest-card:hover {
    border-color: rgba(232, 81, 122, 0.4);
    background: rgba(232, 81, 122, 0.05);
    transform: translateX(4px);
}

.quest-card.completed { opacity: 0.4; }

.quest-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.quest-meta {
    font-size: 0.78rem;
    color: #555;
    margin-top: 4px;
}

.quest-xp {
    font-size: 0.85rem;
    color: #e8517a;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .zones-grid { grid-template-columns: repeat(2, 1fr); }
    .lessons-grid { grid-template-columns: 1fr; }
    .public-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .public-profile-summary-grid {
        grid-template-columns: 1fr;
    }
    .profile-keys {
        gap: 5px;
    }
    .profile-key {
        width: 56px;
        height: 56px;
    }
    .lesson-zone-toggle {
        flex-direction: column;
        align-items: flex-start;
    }
    .lesson-zone-toggle-side {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .navbar { padding: 14px 16px; }
    .dashboard-wrapper { padding: 24px 16px; }
    .zones-grid { grid-template-columns: 1fr; }
    .nav-profile-search-input {
        width: 82px;
        padding: 7px 9px;
        font-size: 0.7rem;
    }
    .profile-search-result {
        align-items: flex-start;
        flex-direction: column;
    }
    .public-profile-stats {
        grid-template-columns: 1fr 1fr;
    }
    .profile-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .profile-name-row {
        gap: 10px;
    }
    .profile-meta-row {
        gap: 8px;
    }
    .discord-linked-icon {
        width: 15px;
        height: 15px;
        margin-right: -7px;
    }
    .discord-linked-tooltip {
        left: 0;
        top: calc(100% + 8px);
        width: min(240px, calc(100vw - 40px));
        white-space: normal;
        transform: translateY(-6px);
    }
    .discord-linked-icon:hover .discord-linked-tooltip,
    .discord-linked-icon:focus .discord-linked-tooltip,
    .discord-linked-icon:focus-visible .discord-linked-tooltip {
        transform: translateY(0);
    }
    .app-navbar {
        gap: 10px;
        padding: 10px 12px;
    }
    .nav-player {
        flex-basis: 132px;
        min-width: 132px;
        max-width: 132px;
        gap: 2px;
    }
    .nav-player-top {
        align-items: flex-end;
    }
    .nav-player-name {
        font-size: 0.9rem;
    }
    .nav-player-level {
        min-width: 10px;
        font-size: 0.8rem;
        line-height: 1;
        position: relative;
        top: 1px;
    }
    .nav-progress-track {
        width: min(100%, 96px);
        min-width: 40px;
        height: 6px;
    }
    .nav-player-xp {
        font-size: 0.54rem;
    }
    .nav-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        margin-top: 1px;
    }
    .btn-nav {
        padding: 8px 10px;
        font-size: 0.74rem;
    }
    .profile-keys {
        gap: 5px;
    }
    .profile-key {
        width: 48px;
        height: 48px;
    }
    .profile-key-overlay {
        top: calc(100% + 10px);
        left: 50%;
        right: auto;
        width: min(220px, calc(100vw - 48px));
        transform: translateX(-50%) translateY(-6px);
    }
    .profile-key:hover .profile-key-overlay,
    .profile-key:focus .profile-key-overlay,
    .profile-key:focus-within .profile-key-overlay {
        transform: translateX(-50%) translateY(0);
    }
    .lesson-hub-card {
        padding: 18px;
        gap: 14px;
    }
    .streak-card {
        gap: 10px;
    }
    .streak-consecutive {
        justify-self: start;
        min-width: 0;
    }
    .dashboard-mid-grid {
        gap: 12px;
        grid-template-columns: 1fr;
    }
    .dashboard-left-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-left-stack .lesson-hub-card,
    .dashboard-left-stack .streak-card,
    .dashboard-left-stack .boss-teaser-card {
        min-height: 118px;
    }
    .dashboard-left-stack .lesson-hub-card {
        align-items: flex-start;
        gap: 9px;
    }
    .dashboard-left-stack .lesson-hub-arrow {
        display: none;
    }
    .dashboard-left-stack .lesson-hub-kicker {
        font-size: 0.62rem;
        letter-spacing: 1.2px;
    }
    .dashboard-left-stack .lesson-hub-copy h3 {
        font-size: 0.98rem;
    }
    .dashboard-left-stack .lesson-hub-copy p:last-child {
        font-size: 0.74rem;
        line-height: 1.25;
    }
    .dashboard-left-stack .progress-ring {
        width: 42px;
        height: 42px;
        padding: 3px;
    }
    .dashboard-left-stack .lesson-hub-ring-inner {
        font-size: 0.66rem;
    }
    .dashboard-left-stack .streak-card {
        padding: 14px;
        align-content: start;
    }
    .dashboard-left-stack .streak-consecutive {
        gap: 5px;
    }
    .dashboard-left-stack .streak-consecutive strong {
        font-size: 1rem;
    }
    .dashboard-left-stack .streak-consecutive span:not(.streak-flame) {
        font-size: 0.66rem;
        line-height: 1.25;
    }
    .dashboard-left-stack .streak-card-keys {
        display: grid;
        grid-template-columns: repeat(4, 22px);
        gap: 7px;
        padding-top: 2px;
    }
    .dashboard-left-stack .streak-card-keys .profile-key {
        width: 22px;
        height: 22px;
    }
    .dashboard-right-col {
        min-width: 0;
    }
    .info-icon-tooltip {
        left: 50%;
        right: auto;
        bottom: calc(100% + 8px);
        width: min(220px, calc(100vw - 40px));
        transform: translateX(-50%) translateY(4px);
    }
    .info-icon:hover .info-icon-tooltip,
    .info-icon:focus .info-icon-tooltip,
    .info-icon:focus-within .info-icon-tooltip {
        transform: translateX(-50%) translateY(0);
    }
    .progression-next-zone-card {
        grid-template-columns: 1fr;
    }
    .progression-next-link {
        width: 100%;
    }
    .weekly-leaderboard-card {
        padding: 20px;
    }
    .weekly-leaderboard-head {
        flex-direction: column;
        gap: 8px;
    }
    .weekly-leaderboard-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }
    .weekly-leaderboard-tab {
        min-width: 0;
        padding: 0 8px;
    }
    .weekly-leaderboard-featured {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }
    .weekly-leaderboard-featured-rank {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .weekly-leaderboard-featured-score {
        grid-column: 1 / -1;
        align-items: flex-start;
        padding-top: 4px;
    }
    .dashboard-right-col .weekly-leaderboard-featured-score {
        flex-direction: column;
        align-items: flex-start;
    }
    .weekly-leaderboard-featured-score strong {
        font-size: 1.12rem;
    }
    .weekly-leaderboard-row {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 10px;
    }
    .weekly-leaderboard-count {
        display: none;
    }
    .discord-link-card h1 {
        font-size: 1.6rem;
    }
    .discord-link-code {
        letter-spacing: 0.12em;
    }
    .discord-link-actions .btn {
        width: 100%;
        min-width: 0;
    }
    .progress-ring {
        width: 60px;
        height: 60px;
    }
    .lesson-hub-copy h3,
    .lessons-header-copy h1 {
        font-size: 1.2rem;
    }
    .lessons-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lesson-zone-toggle {
        padding: 20px;
        gap: 16px;
    }
    .lesson-zone-body {
        padding: 0 20px 20px;
    }
    .lesson-zone-toggle-side {
        gap: 14px;
    }
    .lesson-read-btn {
        width: 100%;
        max-width: none;
    }
    .confirm-modal {
        padding: 16px;
    }
    .confirm-modal-dialog {
        padding: 22px 18px 18px;
        border-radius: 18px;
}
}

/* ── PREMIUM STATUS ── */
.premium-status {
    margin-top: 12px;
}

.premium-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.premium-inactive {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.premium-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.premium-active .premium-status-badge {
    background: rgba(232, 81, 122, 0.15);
    color: #e8517a;
}

.premium-inactive .premium-status-badge {
    background: rgba(114, 114, 114, 0.15);
    color: #8b8b8b;
}

.premium-status p {
    color: #8b8b8b;
    font-size: 0.85rem;
}

/* ── RESPONSIVE 500px ── */
@media (max-width: 500px) {
    .dashboard-wrapper {
        padding: 18px 12px 32px;
    }
    .public-profile-stats {
        grid-template-columns: 1fr;
    }
    .profile-card {
        padding: 18px 16px;
        margin-bottom: 14px;
    }
    .profile-header h2 {
        font-size: 1.2rem;
    }
    .xp-info {
        font-size: 0.78rem;
    }
    .dashboard-mid-grid {
        gap: 8px;
    }
    .dashboard-left-stack {
        gap: 8px;
    }
    .dashboard-left-stack .lesson-hub-card {
        padding: 12px 14px;
        gap: 10px;
        min-height: 0;
    }
    .dashboard-left-stack .boss-teaser-card {
        padding: 14px;
        gap: 10px;
    }
    .dashboard-left-stack .boss-teaser-card.is-active {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .boss-teaser-arrow {
        display: none;
    }
    .boss-teaser-head,
    .boss-teaser-hp-meta {
        gap: 8px;
    }
    .boss-teaser-hp-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-left-stack .progress-ring {
        width: 42px;
        height: 42px;
        padding: 3px;
    }
    .dashboard-left-stack .lesson-hub-ring-inner {
        font-size: 0.68rem;
    }
    .dashboard-left-stack .lesson-hub-copy h3 {
        font-size: 0.92rem;
        margin-top: 2px;
    }
    .dashboard-left-stack .lesson-hub-copy p:last-child {
        font-size: 0.74rem;
        margin-top: 2px;
    }
    .lesson-hub-kicker {
        font-size: 0.65rem;
        letter-spacing: 1.4px;
    }
    .lesson-hub-arrow {
        font-size: 1.2rem;
    }
    .streak-card {
        padding: 10px 12px;
        gap: 8px;
    }
    .streak-consecutive strong {
        font-size: 1.1rem;
    }
    .streak-consecutive span {
        font-size: 0.68rem;
    }
    .profile-keys {
        gap: 4px;
    }
    .profile-key {
        width: 40px;
        height: 40px;
    }
    .profile-key-overlay {
        width: min(180px, calc(100vw - 48px));
        padding: 10px;
    }
    .profile-key-title {
        font-size: 0.7rem;
    }
    .profile-key-description {
        font-size: 0.62rem;
    }
    .weekly-leaderboard-card {
        padding: 14px;
    }
    .weekly-leaderboard-head {
        margin-bottom: 12px;
    }
    .weekly-leaderboard-kicker {
        font-size: 0.65rem;
        letter-spacing: 1.4px;
    }
    .dashboard-right-col .weekly-leaderboard-head h3 {
        font-size: 1rem;
    }
    .weekly-leaderboard-period {
        font-size: 0.64rem;
        padding: 5px 8px;
    }
    .weekly-leaderboard-chart {
        gap: 10px;
    }
    .leaderboard-chart-head {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 7px;
    }
    .leaderboard-chart-rank {
        width: 20px;
        height: 20px;
        font-size: 0.62rem;
        border-radius: 7px;
    }
    .leaderboard-chart-name {
        font-size: 0.78rem;
    }
    .leaderboard-chart-count {
        display: none;
    }
    .leaderboard-chart-xp {
        font-size: 0.78rem;
    }
    .leaderboard-chart-track {
        height: 6px;
    }
    .progression-next-zone-card {
        padding: 10px;
        gap: 8px;
    }
    .progression-split-grid {
        gap: 10px;
    }
    .progression-next-zone-copy h4 {
        font-size: 0.88rem;
    }
    .progression-next-zone-copy p {
        font-size: 0.76rem;
        margin-top: 5px;
    }
    .progression-next-zone-copy span {
        font-size: 0.66rem;
        letter-spacing: 1px;
    }
    .progression-next-link {
        font-size: 0.78rem;
        padding: 7px 14px;
        min-height: 32px;
    }
}

/* ── RESPONSIVE 400px ── */
@media (max-width: 400px) {
    .dashboard-wrapper {
        padding: 14px 10px 24px;
    }
    .profile-card {
        padding: 14px 12px;
    }
    .profile-header h2 {
        font-size: 1.08rem;
    }
    .profile-meta-row {
        margin-top: 5px;
    }
    .level-label {
        font-size: 0.72rem;
    }
    .xp-info {
        font-size: 0.7rem;
    }
    .dashboard-mid-grid {
        gap: 6px;
    }
    .dashboard-left-stack {
        gap: 6px;
    }
    .dashboard-left-stack .lesson-hub-card {
        padding: 10px 10px;
        gap: 8px;
    }
    .dashboard-left-stack .boss-teaser-card {
        padding: 12px;
    }
    .dashboard-left-stack .progress-ring {
        width: 34px;
        height: 34px;
        padding: 2px;
    }
    .dashboard-left-stack .lesson-hub-ring-inner {
        font-size: 0.6rem;
    }
    .dashboard-left-stack .lesson-hub-copy h3 {
        font-size: 0.82rem;
    }
    .dashboard-left-stack .lesson-hub-copy p:last-child {
        font-size: 0.66rem;
    }
    .streak-card {
        padding: 8px 10px;
    }
    .streak-consecutive strong {
        font-size: 0.95rem;
    }
    .streak-consecutive span {
        font-size: 0.6rem;
    }
    .profile-key {
        width: 34px;
        height: 34px;
    }
    .weekly-leaderboard-card {
        padding: 10px;
    }
    .weekly-leaderboard-head {
        margin-bottom: 8px;
    }
    .dashboard-right-col .weekly-leaderboard-head h3 {
        font-size: 0.88rem;
        margin-top: 3px;
    }
    .weekly-leaderboard-period {
        font-size: 0.6rem;
        padding: 3px 7px;
    }
    .leaderboard-chart-row {
        gap: 4px 10px;
    }
    .leaderboard-chart-head {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 5px;
    }
    .leaderboard-chart-rank {
        width: 17px;
        height: 17px;
        font-size: 0.55rem;
        border-radius: 6px;
    }
    .leaderboard-chart-name {
        font-size: 0.7rem;
    }
    .leaderboard-chart-xp {
        font-size: 0.7rem;
    }
    .leaderboard-chart-track {
        height: 5px;
    }
    .section-title {
        font-size: 0.65rem;
        margin-bottom: 10px;
    }
    .zones-grid {
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .nav-profile-search {
        margin-right: 0;
        gap: 0;
        z-index: 35;
    }

    .nav-profile-search-toggle {
        display: inline-flex;
    }

    .nav-profile-search-input {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        width: 0;
        padding-left: 0;
        padding-right: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-4px);
        transition:
            width 0.22s ease,
            opacity 0.18s ease,
            padding 0.22s ease,
            border-color 0.18s ease,
            background 0.18s ease,
            box-shadow 0.18s ease;
        box-shadow: 0 10px 28px rgba(0,0,0,0);
    }

    .nav-profile-search.is-open .nav-profile-search-input,
    .nav-profile-search:focus-within .nav-profile-search-input {
        width: min(220px, calc(100vw - 24px));
        padding-left: 11px;
        padding-right: 11px;
        opacity: 1;
        pointer-events: auto;
        box-shadow: 0 10px 28px rgba(0,0,0,0.28);
        transform: translateY(0);
    }
}
