/* ==========================================================================
   NBG Arena — Competitor Hub (premium redesign)
   ========================================================================== */

.arena-body {
    background:
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(79, 70, 229, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 50%, rgba(217, 119, 6, 0.08), transparent 50%),
        linear-gradient(180deg, #070b14 0%, #0c1222 40%, #0a0f1a 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

.arena-body.bg-pattern::before { display: none; }

.arena-main .fade-up,
.arena-body .fade-up {
    opacity: 1;
    transform: none;
}

.arena-nav {
    background: rgba(7, 11, 20, 0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.arena-nav .navbar-brand { color: #fff !important; }
.arena-nav .brand-accent { color: #86efac !important; }
.arena-nav .nav-link { color: rgba(255, 255, 255, 0.78) !important; }
.arena-nav .nav-link:hover { color: #fff !important; background: rgba(255, 255, 255, 0.06); border-radius: 8px; }

.arena-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.arena-main { padding-top: 1.25rem !important; padding-bottom: 3rem !important; }

/* ---- Subnav ---- */
.arena-subnav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.35rem;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
}

.arena-subnav::-webkit-scrollbar { display: none; }

.arena-subnav-link {
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: all 0.2s ease;
}

.arena-subnav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.arena-subnav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.55), rgba(67, 56, 202, 0.35));
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

/* ---- Play shell (subnav + mode tabs + game) ---- */
.play-shell {
    display: grid;
    gap: 0.85rem;
}

.play-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.35rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.play-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: all 0.2s ease;
}

.play-mode-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.play-mode-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.35), rgba(79, 70, 229, 0.35));
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2);
}

.play-mode-tab-icon {
    width: 1rem;
    height: 1rem;
}

.play-shell .game-container {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.results-trophy-icon-svg {
    width: 3rem;
    height: 3rem;
    color: #fde68a;
}

@media (max-width: 575.98px) {
    .play-mode-tab span { font-size: 0.75rem; }
}

/* ---- Page head ---- */
.arena-page-head {
    margin-bottom: 1.75rem;
}

.arena-page-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #86efac;
    margin-bottom: 0.35rem;
}

.arena-page-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    color: #fff;
}

.arena-page-subtitle {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.92rem;
}

/* ---- Hero dashboard ---- */
.arena-hero {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(217, 119, 6, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.arena-hero-glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 50%;
    height: 120%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.12), transparent 65%);
    pointer-events: none;
}

.arena-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: center;
}

.arena-hero-rating {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.arena-hero-rating span {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}

.arena-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.arena-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.arena-chip.gold {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

/* ---- Cards ---- */
.arena-panel {
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
}

.arena-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.arena-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.arena-panel-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #86efac;
    text-decoration: none;
}

.season-banner {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.season-banner-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fde68a;
}

.season-banner-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.season-banner-meta { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; }

.energy-meter-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.35rem;
}

.energy-meter-bar { display: flex; gap: 4px; margin-bottom: 0.35rem; }

.energy-pip {
    width: 10px;
    height: 22px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
}

.energy-pip.full {
    background: linear-gradient(180deg, #fde68a, #d97706);
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

.energy-meter-count { font-size: 0.78rem; font-weight: 700; color: rgba(255, 255, 255, 0.65); }

/* ---- Mode cards ---- */
.mode-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.mode-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.mode-daily .mode-card-icon { background: rgba(217, 119, 6, 0.2); }
.mode-ranked .mode-card-icon { background: rgba(79, 70, 229, 0.25); }
.mode-practice .mode-card-icon { background: rgba(100, 116, 139, 0.25); }

.mode-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.mode-card p { color: rgba(255, 255, 255, 0.55); font-size: 0.88rem; line-height: 1.55; }

.mode-card-list {
    margin: 0.75rem 0 1rem;
    padding-left: 1.1rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.mode-card-list a { color: #86efac; }

/* ---- Arena dashboard ---- */
.arena-dashboard {
    display: grid;
    gap: 1.25rem;
}

.arena-dashboard-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.15rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.arena-dashboard-lead {
    margin: 0 0 1rem;
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.92rem;
}

.arena-dashboard-alert {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.24);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
}

.arena-dashboard-alert a { color: #fde68a; font-weight: 700; }

.arena-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 1rem;
    align-items: start;
}

.arena-dashboard-main,
.arena-dashboard-sidebar {
    display: grid;
    gap: 1rem;
    align-content: start;
}

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

.mode-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.08) center / 1.35rem no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-card-icon--daily {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fde68a' stroke-width='1.5'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E");
}

.mode-card-icon--ranked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386efac' stroke-width='1.5'%3E%3Cpath d='M13 2L8 13h4l-1 9 7-11h-4l-1-9z'/%3E%3C/svg%3E");
}

.mode-card-icon--practice {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='1.5'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='M8 10h8M8 14h5'/%3E%3C/svg%3E");
}

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

.dashboard-badge-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-badge-card .badge-medallion {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.dashboard-badge-card .badge-svg {
    width: 1.35rem;
    height: 1.35rem;
}

.dashboard-badge-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.dashboard-badge-copy strong {
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.25;
}

.dashboard-badge-copy span {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
    line-height: 1.45;
}

.dashboard-badge-copy time {
    color: #fde68a;
    font-size: 0.68rem;
    font-weight: 700;
}

.arena-sidebar-card {
    padding: 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.arena-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.arena-sidebar-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.arena-sidebar-copy {
    display: block;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.82rem;
    line-height: 1.5;
}

.arena-sidebar-bracket { margin-bottom: 0.85rem; }

.arena-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.arena-stat {
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.arena-stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.arena-stat-value {
    display: block;
    margin-top: 0.2rem;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.1;
}

.arena-pool-list { display: grid; gap: 0.65rem; }

.arena-pool-item {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.arena-pool-tag {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86efac;
}

.arena-pool-item strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
}

.arena-pool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
}

.arena-badge-progress .achievement-summary {
    margin-bottom: 0;
    background: transparent;
    border: 0;
    padding: 0;
}

.arena-finals-callout {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.arena-finals-callout.is-qualified {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.24);
}

.arena-finals-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.arena-finals-callout strong {
    display: block;
    color: #fff;
    font-size: 0.88rem;
}

.arena-finals-callout p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
    line-height: 1.45;
}

.arena-finals-progress {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.arena-finals-progress li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.76rem;
}

.arena-finals-progress strong {
    color: #fff;
    font-size: 0.76rem;
}

.age-bracket-pill-label { font-weight: 800; }

@media (max-width: 991.98px) {
    .arena-dashboard-grid { grid-template-columns: 1fr; }
    .mode-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .arena-hero-grid { grid-template-columns: 1fr; }
}

.dashboard-card {
    padding: 1.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-card h5 { color: #fff; font-weight: 800; }

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

.mini-stat {
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-stat .label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.mini-stat .value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-top: 0.15rem;
}

/* ---- Achievements (legacy dashboard widgets) ---- */
.achievement-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.achievement-summary-ring {
    --pct: 0%;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: conic-gradient(#fde68a var(--pct), rgba(255,255,255,0.08) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
}

.achievement-summary-ring::before {
    content: '';
    position: absolute;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #0c1222;
}

.achievement-summary-ring span {
    position: relative;
    z-index: 1;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.achievement-card {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.achievement-card.unlocked {
    border-color: rgba(251, 191, 36, 0.28);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(255, 255, 255, 0.02));
}

.achievement-card.locked { opacity: 0.55; filter: grayscale(0.4); }

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

.achievement-icon {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.achievement-card.unlocked .achievement-icon {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
}

.achievement-body { flex: 1; min-width: 0; }

.achievement-body h5 { color: #fff; font-weight: 800; font-size: 0.95rem; }

.achievement-body p { color: rgba(255, 255, 255, 0.5); font-size: 0.82rem; }

.achievement-date {
    margin-top: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fde68a;
}

.achievement-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.btn-arena-ghost {
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.btn-arena-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ---- Achievement unlock toast ---- */
.achievement-unlock-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.achievement-unlock-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(34, 197, 94, 0.35);
    animation: arena-pop-in 0.45s ease;
}

@keyframes arena-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.achievement-unlock-card .icon { font-size: 1.75rem; }
.achievement-unlock-card strong { display: block; color: #fff; font-size: 0.92rem; }
.achievement-unlock-card small { color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }

/* ---- Pools hub ---- */
.pools-hub {
    display: grid;
    gap: 1rem;
    min-height: calc(100vh - 11rem);
}

.pools-hero {
    padding: 1.35rem 1.5rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 52%),
        linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(255, 255, 255, 0.03) 55%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pools-hero-label,
.pools-section-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86efac;
}

.pools-hero-title {
    margin: 0.35rem 0 0.65rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 1.95rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.pools-hero-text {
    margin: 0 0 1rem;
    max-width: 40rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    line-height: 1.6;
}

.pools-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.pools-stat-pill {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pools-stat-pill strong {
    font-size: 1rem;
    color: #fff;
}

.pools-stat-pill span {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.pools-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.pools-sidebar {
    display: grid;
    gap: 0.85rem;
    position: sticky;
    top: 5.5rem;
}

.pools-sidebar-card {
    padding: 1.1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pools-join-card {
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 60%),
        rgba(255, 255, 255, 0.04);
    border-color: rgba(129, 140, 248, 0.22);
}

.pools-sidebar-head {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pools-sidebar-head h2 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.pools-sidebar-head p {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.45;
}

.pools-sidebar-icon-svg {
    width: 1.35rem;
    height: 1.35rem;
    color: #c4b5fd;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.pools-join-form,
.pools-create-form {
    display: grid;
    gap: 0.55rem;
}

.pools-code-input {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.pools-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}

.pools-tips-card h3 {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
}

.pools-tips-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    line-height: 1.55;
}

.pools-main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.pools-section {
    padding: 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pools-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pools-section-title {
    margin: 0.25rem 0 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}

.pools-section-meta {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}

.pool-grid-discover {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.pool-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.pool-preview-grid.has-live-pools {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.pool-preview-card {
    display: flex;
    flex-direction: column;
    min-height: 240px;
    padding: 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.pool-preview-card.is-ready {
    border-color: rgba(134, 239, 172, 0.28);
    background: rgba(34, 197, 94, 0.04);
}

.pool-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pool-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.55);
}

.pool-preview-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pool-preview-badge {
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.pool-preview-card.is-ready .pool-preview-badge {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

.pool-preview-title {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
}

.pool-preview-desc {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.42);
}

.pool-preview-skeleton {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.pool-preview-skeleton-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pool-preview-skeleton-row span {
    display: block;
    height: 0.45rem;
    width: 55%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.pool-preview-skeleton-row em {
    font-style: normal;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.28);
}

.pool-preview-note {
    margin-top: auto;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.45;
}

.pool-card {
    position: relative;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pool-card-live:hover,
.pool-card-discover:hover {
    transform: translateY(-2px);
    border-color: rgba(134, 239, 172, 0.22);
}

.pool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.pool-card-type {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86efac;
}

.pool-card-owner {
    font-size: 0.62rem;
    font-weight: 800;
    color: #fde68a;
    text-transform: uppercase;
}

.pool-card-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}

.pool-card-desc {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.45;
}

.pool-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.pool-card-stats-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pool-card-stat {
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.pool-card-stat span {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.38);
}

.pool-card-stat strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.92rem;
    color: #fff;
}

.pool-card-stat.is-you strong { color: #fde68a; }

.pool-card-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.pool-card-code span {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
}

.pool-card-code code {
    font-size: 0.82rem;
    font-weight: 800;
    color: #e9d5ff;
    letter-spacing: 0.06em;
}

.pool-card-leaders-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.pool-leader-row {
    display: grid;
    grid-template-columns: 1.5rem 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0;
    font-size: 0.78rem;
}

.pool-leader-rank {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 800;
}

.pool-leader-avatar,
.pool-leader-row .avatar-placeholder {
    width: 1.75rem;
    height: 1.75rem;
}

.pool-leader-name {
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pool-leader-pts {
    color: #fde68a;
    font-weight: 800;
}

.pool-card-empty-note {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.45;
}

.pool-discover-rank {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
}

.pools-discover-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1rem;
    align-items: stretch;
}

.pool-discover-skeleton {
    list-style: none;
    margin: 0;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.55rem;
}

.pool-discover-skeleton-row {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) 3.5rem;
    align-items: center;
    gap: 0.65rem;
}

.pool-discover-skeleton-rank {
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.25);
}

.pool-discover-skeleton-name,
.pool-discover-skeleton-score {
    display: block;
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.pool-discover-skeleton-score { width: 100%; }

.pools-discover-empty-copy .records-pending {
    height: 100%;
    margin: 0;
}

.pools-records-pending.records-pending-compact {
    padding: 1rem;
    border-radius: 14px;
}

.pool-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.pool-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pool-meta-icon-svg {
    width: 0.95rem;
    height: 0.95rem;
}

@media (max-width: 991.98px) {
    .pools-layout { grid-template-columns: 1fr; }
    .pools-sidebar { position: static; }
    .pools-discover-empty { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .pools-hub { min-height: 0; }
    .pool-card-stats { grid-template-columns: 1fr 1fr; }
    .pool-card-stats .pool-card-stat:last-child { grid-column: 1 / -1; }
    .pool-preview-grid,
    .pool-grid { grid-template-columns: 1fr; }
}

/* ---- Pools (legacy aliases) ---- */
.pool-join-panel {
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.25);
    margin-bottom: 1.5rem;
}

/* ---- Game / results ---- */
.game-container { max-width: 720px; margin: 0 auto; }

.question-card {
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.results-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(79, 70, 229, 0.15), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.results-trophy { font-size: 3rem; margin-bottom: 0.5rem; }

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.result-box {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.result-box .value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

.result-box .label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.15rem;
}

.result-box.span-2 { grid-column: span 2; }

.rating-change.positive { color: #86efac !important; }
.rating-change.negative { color: #f87171 !important; }

/* ---- Share card (hidden render target) ---- */
.share-card-render {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 540px;
    pointer-events: none;
    z-index: -1;
}

.share-card {
    width: 540px;
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(145deg, #0c1222, #1e1b4b 45%, #0c1222);
    border: 3px solid rgba(251, 191, 36, 0.45);
    color: #fff;
    font-family: system-ui, sans-serif;
}

.share-card-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.share-card-brand mark {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-card-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.35rem;
}

.share-card-user { color: #fde68a; font-weight: 700; }

.share-card-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-card-profile-copy { min-width: 0; }

.share-card-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.share-card-avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #059669);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.share-card-name {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.share-card-subtitle {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

.share-card-user { margin-bottom: 0; }

.share-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-card-stat {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.share-card-stat strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1;
    color: #fff;
}

.share-card-stat span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.share-card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

/* ---- Stats export ---- */
.stats-export-panel {
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.stats-export-panel h6 { color: #fff; font-weight: 800; }

#stats-pdf-source {
    padding: 1.5rem;
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
}

.finals-status {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.finals-status-icon { font-size: 1.5rem; }

/* ---- Badge showcase (/arena/achievements) ---- */
.badges-showcase { display: grid; gap: 1.25rem; }

.badges-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 55%),
        linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badges-hero-label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(253, 230, 138, 0.85);
}

.badges-hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
}

.badges-hero-text {
    margin: 0 0 1rem;
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.92rem;
    line-height: 1.55;
}

.badges-hero-stats { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.badges-stat-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 5.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badges-stat-pill strong {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.badges-stat-pill span {
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badges-stat-pill.is-unlocked { border-color: rgba(34, 197, 94, 0.28); }
.badges-stat-pill.is-locked { border-color: rgba(148, 163, 184, 0.22); }

.badges-progress-ring {
    --pct: 0%;
    position: relative;
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    background: conic-gradient(#fde68a var(--pct), rgba(255, 255, 255, 0.08) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.12);
}

.badges-progress-ring::before {
    content: '';
    position: absolute;
    inset: 0.55rem;
    border-radius: 50%;
    background: #0c1222;
}

.badges-progress-ring-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badges-progress-ring-inner strong {
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
}

.badges-progress-ring-inner span {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badges-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.badges-filter {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badges-filter:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.badges-filter.is-active {
    color: #fff;
    border-color: rgba(129, 140, 248, 0.45);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.55), rgba(67, 56, 202, 0.35));
}

.badges-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.badge-tile {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.badge-tile.is-hidden { display: none; }

.badge-tile:hover { transform: translateY(-3px); }

.badge-tile.is-unlocked {
    border-color: rgba(251, 191, 36, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.badge-tile.is-locked {
    opacity: 0.72;
}

.badge-tile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.badge-status {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-tile.is-unlocked .badge-status {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.badge-tile.is-locked .badge-status {
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-medallion {
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.badge-medallion.is-unlocked { filter: none; }
.badge-medallion.is-locked { filter: grayscale(0.35) saturate(0.65); opacity: 0.85; }

.badge-medallion--starter { background: linear-gradient(135deg, #6366f1, #4338ca); }
.badge-medallion--skill { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.badge-medallion--streak { background: linear-gradient(135deg, #f97316, #ea580c); }
.badge-medallion--grind { background: linear-gradient(135deg, #64748b, #475569); }
.badge-medallion--rank { background: linear-gradient(135deg, #eab308, #ca8a04); }
.badge-medallion--daily { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.badge-medallion--tournament { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.badge-medallion--legend { background: linear-gradient(135deg, #f59e0b, #b45309); }

.badge-svg { width: 1.65rem; height: 1.65rem; display: block; }

.badge-tile-body { flex: 1; min-width: 0; }

.badge-tile-body h3 {
    margin: 0 0 0.35rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.badge-tile-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.82rem;
    line-height: 1.5;
}

.badge-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.badge-tile-footer time {
    color: rgba(253, 230, 138, 0.85);
    font-size: 0.68rem;
    font-weight: 700;
}

.badge-lock-note {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}

.btn-badge-share {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
}

.btn-badge-share:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.unlock-toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.unlock-toast-icon .badge-svg { width: 1.25rem; height: 1.25rem; }

.badge-initial {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
}

@media (max-width: 767.98px) {
    .badges-hero { grid-template-columns: 1fr; }
    .badges-progress-ring { justify-self: start; }
    .badge-tile-footer { flex-direction: column; align-items: flex-start; }
    .arena-hero-grid { grid-template-columns: 1fr; }
    .achievement-grid { grid-template-columns: 1fr; }
    .pool-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .achievement-unlock-card { animation: none; }
    .mode-card:hover { transform: none; }
    .challenges-feature:hover { transform: none; }
}

/* ---- Challenges hub ---- */
.challenges-hub {
    display: grid;
    gap: 1.25rem;
}

.challenges-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.1), transparent 50%),
        linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(255, 255, 255, 0.03) 50%, rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenges-hero-label,
.challenges-board-label,
.challenges-feature-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fde68a;
}

.challenges-hero-title {
    margin: 0.35rem 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.challenges-hero-text {
    margin: 0 0 1rem;
    max-width: 38rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
    line-height: 1.6;
}

.challenges-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.challenges-stat-pill {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenges-stat-pill strong {
    font-size: 1rem;
    color: #fff;
    line-height: 1;
}

.challenges-stat-pill span {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 700;
}

.challenges-stat-pill.is-live {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.08);
}

.challenges-stat-pill.is-live strong { color: #86efac; }

.challenges-stat-pill.is-done {
    border-color: rgba(129, 140, 248, 0.28);
    background: rgba(79, 70, 229, 0.12);
}

.challenges-hero-aside {
    display: flex;
    align-items: stretch;
}

.challenges-energy-card {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenges-energy-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.65rem;
}

.challenges-energy-count {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.62);
}

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

.challenges-feature {
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.challenges-feature:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.challenges-feature-daily {
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.12), transparent 55%),
        rgba(255, 255, 255, 0.04);
}

.challenges-feature-weekly {
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 55%),
        rgba(255, 255, 255, 0.04);
}

.challenges-feature-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.challenges-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.challenges-feature-daily .challenges-feature-icon { color: #fde68a; }
.challenges-feature-weekly .challenges-feature-icon { color: #c4b5fd; }

.challenges-feature-icon-svg {
    width: 1.5rem;
    height: 1.5rem;
}

.challenges-feature-head > div:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.challenges-feature-status {
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.challenges-feature-status.is-live {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.challenges-feature-status.is-done {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.challenges-feature-status.is-weekly {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.24);
}

.challenges-feature-title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.challenges-feature-desc,
.challenges-feature-note {
    margin: 0 0 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    line-height: 1.55;
}

.challenges-feature-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    line-height: 1.55;
}

.challenges-feature-list strong { color: rgba(255, 255, 255, 0.82); }

.challenges-result-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenges-result-strip > div {
    display: grid;
    gap: 0.15rem;
}

.challenges-result-strip span {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.42);
}

.challenges-result-strip strong {
    font-size: 1.05rem;
    color: #fff;
}

.challenges-result-bonus {
    align-self: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fde68a;
    background: rgba(217, 119, 6, 0.14);
    border: 1px solid rgba(217, 119, 6, 0.28);
}

.challenges-feature-action {
    margin-top: auto;
    padding-top: 0.35rem;
}

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

.challenges-board {
    padding: 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenges-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.challenges-board-title {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.challenges-board-meta {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
}

.challenges-board-empty {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 2rem 1rem;
    text-align: center;
}

.challenges-board-empty-icon {
    width: 2rem;
    height: 2rem;
    color: rgba(255, 255, 255, 0.28);
}

.challenges-board-empty p {
    margin: 0;
    max-width: 18rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.88rem;
}

.challenges-leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.challenges-leaderboard-row {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.challenges-leaderboard-row.rank-gold {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.12), rgba(255, 255, 255, 0.02));
    border-color: rgba(217, 119, 6, 0.18);
}

.challenges-leaderboard-row.rank-silver {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.12), rgba(255, 255, 255, 0.02));
    border-color: rgba(148, 163, 184, 0.16);
}

.challenges-leaderboard-row.rank-bronze {
    background: linear-gradient(90deg, rgba(180, 83, 9, 0.12), rgba(255, 255, 255, 0.02));
    border-color: rgba(180, 83, 9, 0.16);
}

.challenges-leaderboard-row.is-you {
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.12);
}

.challenges-rank {
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.challenges-leaderboard-row.rank-gold .challenges-rank { color: #fde68a; }
.challenges-leaderboard-row.rank-silver .challenges-rank { color: #cbd5e1; }
.challenges-leaderboard-row.rank-bronze .challenges-rank { color: #fdba74; }

.challenges-player {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.challenges-player-avatar,
.challenges-player .avatar-placeholder {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.challenges-player strong {
    display: block;
    font-size: 0.88rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challenges-player span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challenges-score {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fde68a;
    white-space: nowrap;
}

.challenges-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding-top: 0.25rem;
}

.challenges-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.challenges-footer-link:hover { color: #fde68a; }

.challenges-footer-icon {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 991.98px) {
    .challenges-hero { grid-template-columns: 1fr; }
    .challenges-feature-grid,
    .challenges-boards { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .challenges-hero { padding: 1.15rem; }
    .challenges-leaderboard-row { grid-template-columns: 1.75rem minmax(0, 1fr) auto; }
}

/* ---- Profile page ---- */
.profile-page {
    display: grid;
    gap: 1.25rem;
}

.profile-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 55%),
        linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(255, 255, 255, 0.03) 55%, rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.profile-hero-glow {
    position: absolute;
    inset: -30% -10% auto auto;
    width: 45%;
    height: 140%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.18), transparent 70%);
    pointer-events: none;
}

.profile-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
}

.profile-hero-identity {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.profile-hero-avatar {
    flex-shrink: 0;
    padding: 4px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.65), rgba(79, 70, 229, 0.55));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.profile-hero-avatar-img,
.profile-hero-avatar .profile-avatar,
.profile-hero-avatar .user-avatar-img,
.profile-hero-avatar .avatar-placeholder {
    width: 7rem;
    height: 7rem;
    border-radius: 20px;
    font-size: 2.25rem;
}

.profile-hero-copy { min-width: 0; }

.profile-hero-eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #86efac;
}

.profile-hero-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.profile-hero-handle {
    margin: 0.25rem 0 0.75rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.92rem;
    font-weight: 600;
}

.profile-hero-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.profile-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
    gap: 0.65rem;
}

.profile-meta-stat {
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-meta-stat.span-2 { grid-column: span 2; }

.profile-meta-stat strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.2;
}

.profile-meta-stat span {
    display: block;
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-size: 0.88rem;
    font-weight: 600;
}

.profile-alert-info {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(129, 140, 248, 0.35);
    color: #c7d2fe;
}

.arena-feed-preview {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.arena-feed-preview li {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.45;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-security-form { margin-top: 0.5rem; }

.profile-main-full { grid-column: 1 / -1; }

.profile-aside,
.profile-main {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.profile-card {
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-head { margin-bottom: 1rem; }

.profile-card-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.profile-card-head p {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.82rem;
    line-height: 1.45;
}

.profile-photo-drop {
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-photo-drop:hover,
.profile-photo-drop:focus-within {
    border-color: rgba(129, 140, 248, 0.45);
    background: rgba(79, 70, 229, 0.08);
}

.profile-photo-upload {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    margin: 0;
    cursor: pointer;
}

.profile-photo-upload-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.45), rgba(5, 150, 105, 0.35));
    color: #fff;
    flex-shrink: 0;
}

.profile-photo-upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.profile-photo-upload-text strong { color: #fff; font-size: 0.88rem; }

.profile-photo-upload-text small { color: rgba(255, 255, 255, 0.42); }

.profile-photo-remove {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.profile-photo-remove:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.08); }

.profile-tip-list {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.8rem;
    line-height: 1.55;
}

.profile-tip-list li + li { margin-top: 0.45rem; }

.profile-fields {
    display: grid;
    gap: 1rem;
}

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

.profile-field { display: grid; gap: 0.4rem; }

.profile-field.span-2 { grid-column: span 2; }

.profile-field-highlight {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.18);
}

.profile-field label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.profile-required {
    margin-left: 0.35rem;
    color: #fde68a;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
}

.profile-optional {
    margin-left: 0.35rem;
    color: rgba(255, 255, 255, 0.32);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
    font-weight: 600;
}

.profile-input {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-input:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.profile-input.is-readonly {
    opacity: 0.65;
    cursor: not-allowed;
}

.profile-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff88' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}

.profile-field-hint {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.72rem;
    line-height: 1.4;
}

.profile-bracket-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.profile-inline-link {
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.profile-inline-link:hover { color: #fff; }

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-actions-note {
    margin: 0;
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.78rem;
    line-height: 1.45;
}

.profile-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.profile-save-btn {
    min-width: 10rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .profile-hero-inner { grid-template-columns: 1fr; }
    .profile-hero-meta { grid-template-columns: repeat(2, 1fr); }
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .profile-hero-identity { flex-direction: column; align-items: flex-start; }
    .profile-fields-2 { grid-template-columns: 1fr; }
    .profile-field.span-2 { grid-column: auto; }
    .profile-actions { flex-direction: column; align-items: stretch; }
    .profile-actions-buttons { width: 100%; flex-direction: column; }
    .profile-save-btn { width: 100%; }
}

/* ---- Social feed + follows (phase 8) ---- */
.social-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

.social-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.social-feed-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-feed-avatar.is-self .avatar-placeholder,
.social-feed-avatar.is-self .user-avatar-img {
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.45);
}

.social-feed-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.social-feed-name {
    font-weight: 800;
    color: #f8fafc;
    text-decoration: none;
}

.social-feed-name:hover { color: #fde68a; }

.social-feed-head time {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.social-feed-message {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.social-feed-actions {
    margin-top: 0.75rem;
    text-align: center;
}

.social-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-panel {
    padding: 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-panel h2 {
    font-size: 1rem;
    margin-bottom: 0.85rem;
}

.social-panel-highlight {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(79, 70, 229, 0.1));
    border-color: rgba(217, 119, 6, 0.25);
}

.social-suggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-suggest-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.social-suggest-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.social-suggest-link strong {
    display: block;
    font-size: 0.92rem;
}

.social-suggest-link small {
    display: block;
    color: rgba(255, 255, 255, 0.45);
}

.social-suggest-note {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.55);
}

.social-suggest-card {
    padding: 1.15rem;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.14), rgba(5, 150, 105, 0.08));
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

.social-suggest-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    color: #fde68a;
}

.social-suggest-card-icon-svg {
    width: 26px;
    height: 26px;
}

.social-suggest-card h3 {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
}

.social-suggest-card p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.68);
}

.social-suggest-card-meta {
    margin-top: 0.75rem !important;
    font-size: 0.84rem !important;
    color: rgba(255, 255, 255, 0.55) !important;
}

.social-suggest-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.social-empty h2 {
    font-size: 1.25rem;
}

.js-follow-toggle.is-following {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
}

.upgrade-page { max-width: 720px; }

.upgrade-grid {
    display: grid;
    gap: 1rem;
}

.upgrade-plan {
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.upgrade-plan-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.upgrade-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: #fde68a;
}

.upgrade-plan-perks {
    margin: 1rem 0 1.25rem;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
}

.upgrade-status {
    padding: 2rem 1.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(79, 70, 229, 0.12));
    border: 1px solid rgba(217, 119, 6, 0.28);
}

.upgrade-status-badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.18);
    color: #fde68a;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.upgrade-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

@media (max-width: 991.98px) {
    .social-layout { grid-template-columns: 1fr; }
}
