:root {
  --profile-surface: #ffffff;
  --profile-surface-alt: #f8fafc;
  --profile-surface-soft: #eff5fb;
  --profile-border: #dbe3ef;
  --profile-shadow: rgba(15, 23, 42, 0.08);
  --profile-text: #0f172a;
  --profile-text-muted: #475569;
  --profile-text-soft: #94a3b8;
  --profile-accent: #2563eb;
  --profile-accent-soft: rgba(37, 99, 235, 0.12);
  --profile-hero-accent: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.08));
}

body.dark-mode {
  --profile-surface: rgba(15, 23, 42, 0.94);
  --profile-surface-alt: rgba(20, 30, 48, 0.94);
  --profile-surface-soft: rgba(12, 20, 34, 0.96);
  --profile-border: rgba(148, 163, 184, 0.24);
  --profile-shadow: rgba(2, 6, 23, 0.28);
  --profile-text: #e5eefc;
  --profile-text-muted: #cbd5e1;
  --profile-text-soft: #94a3b8;
  --profile-accent: #7dd3fc;
  --profile-accent-soft: rgba(125, 211, 252, 0.14);
  --profile-hero-accent: linear-gradient(135deg, rgba(8, 47, 73, 0.46), rgba(15, 23, 42, 0.92));
}
.user-profile {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.72rem 0.72rem 1.25rem;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--profile-text);
}
.user-profile section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: none;
    color: inherit;
}
.user-profile__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(240px, 0.78fr);
    gap: 0.52rem;
    padding: 0.72rem 0.82rem;
    border-radius: 8px;
    border: 1px solid var(--profile-border);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28%),
        var(--profile-hero-accent),
        var(--profile-surface);
    box-shadow: 0 10px 18px var(--profile-shadow);
    color: var(--profile-text);
}
.user-profile__hero > div {
    min-width: 0;
}
.user-profile__glider-card {
    margin-top: 0.62rem;
    padding: 0.52rem 0.6rem;
    border-radius: 8px;
    background: var(--profile-surface-alt);
    border: 1px solid var(--profile-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.user-profile__glider-title {
    margin: 0.35rem 0;
    font-size: 1.25rem;
}
.user-profile__glider-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.95rem;
}
.user-profile__glider-list li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--profile-text-muted);
}
.user-profile__eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin: 0 0 0.4rem 0;
    color: var(--profile-accent);
    font-weight: 700;
}
.user-profile__title {
    font-size: clamp(1.75rem, 3.1vw, 2.45rem);
    margin: 0;
    line-height: 1.06;
    color: var(--profile-text);
}
.user-profile__handle {
    font-size: 1rem;
    color: var(--profile-text-muted);
}
.user-profile__nickname {
    font-size: 0.9rem;
    color: var(--profile-text-muted);
}
.user-profile__pilot-level {
    display: grid;
    grid-template-columns: minmax(160px, 0.46fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.62rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-surface-alt);
}
.user-profile__pilot-level strong {
    display: block;
    font-size: 1.5rem;
    color: var(--profile-accent);
}
.user-profile__pilot-level span,
.user-profile__pilot-level small {
    color: var(--profile-text-muted);
    font-weight: 600;
}
.user-profile__pilot-level-progress {
    display: grid;
    gap: 0.35rem;
}
.user-profile__meta {
    list-style: none;
    padding: 0;
    margin: 0.7rem 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
}
.user-profile__meta li {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--profile-text-muted);
}
.user-profile__meta a {
    color: var(--profile-text);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.22);
}
.user-profile__contests {
    margin-top: 0.8rem;
}
.user-profile__clubs {
    margin-top: 0.8rem;
}
.user-profile__club-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.45rem;
    margin: 0.45rem 0 0;
}
.user-profile__club-card {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    background: var(--profile-surface-alt);
}
.user-profile__club-card a,
.user-profile__club-card strong {
    color: var(--profile-text);
    font-weight: 700;
    text-decoration: none;
}
.user-profile__club-card span {
    display: block;
    color: var(--profile-text-muted);
    font-size: 0.86rem;
}
.user-profile__club-badge {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: 0.15rem 0.5rem;
    background: rgba(37, 99, 235, 0.14);
    color: var(--profile-accent);
    font-weight: 700;
    font-size: 0.78rem;
}
.user-profile__contest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.45rem 0 0 0;
}
.user-profile__contest-card {
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    padding: 0.52rem 0.6rem;
    background: var(--profile-surface-alt);
    color: var(--profile-text);
    text-decoration: none;
    min-width: 0;
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.user-profile__contest-card strong {
    font-size: 1rem;
}
.user-profile__contest-card span {
    font-size: 0.9rem;
    color: var(--profile-text-muted);
}
.user-profile__contest-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 16px 28px var(--profile-shadow);
}
.user-profile__contest-range {
    font-size: 0.85rem;
    color: var(--profile-text-muted);
}
.user-profile__contest-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    gap: 0.4rem;
    margin-top: 0.3rem;
    padding: 0.16rem 0.55rem;
    border-radius: 8px;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
}
.user-profile__contest-status--approved {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}
.user-profile__contest-status--pending {
    background: rgba(249, 115, 22, 0.18);
    color: #fb923c;
}
.user-profile__contest-status--other {
    background: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}
.user-profile__actions {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.user-profile__share {
    margin: 0.65rem 0 0.85rem;
    display: grid;
    gap: 0.4rem;
    padding: 0.48rem 0.56rem;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-surface-alt);
    box-shadow: 0 8px 16px var(--profile-shadow);
}
.user-profile__share .btn {
    align-self: flex-start;
}
.user-profile__share input {
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--profile-border);
    background: var(--profile-surface-alt);
    color: var(--profile-text);
}
.user-profile__topgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
    align-items: start;
}
.profile-category {
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    padding: 0.58rem;
    background: var(--profile-surface);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 0;
    box-shadow: 0 8px 16px var(--profile-shadow);
}
.profile-category header h3 {
    margin: 0 0 0.35rem 0;
}
.profile-category__empty,
.profile-category__error {
    background: var(--profile-surface-alt);
    color: var(--profile-text-muted);
    border-radius: 8px;
    padding: 0.62rem;
    font-size: 0.95rem;
}
.profile-category__error {
    background: #fff1f2;
    color: #b91c1c;
}
.profile-flights-table-wrapper {
    overflow-x: auto;
}
.profile-flights-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.profile-flights-table th,
.profile-flights-table td {
    font-size: 0.9rem;
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--profile-border);
}
.profile-flights-table th {
    font-weight: 600;
    color: var(--profile-text-muted);
    background: var(--profile-surface-alt);
    position: sticky;
    top: 0;
}
.profile-flight__date strong {
    display: block;
}
.profile-flight__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.profile-flight__links a {
    color: var(--profile-accent);
}
.profile-flight__route {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-flight__route img {
    width: 32px;
    height: 32px;
}
.profile-flight__muted {
    color: var(--profile-text-soft);
}
.profile-flights-table__actions {
    width: 70px;
    text-align: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0.44rem 0.82rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn i {
    font-size: 0.95rem;
}
.btn--primary {
    background: var(--profile-accent);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.16);
}
.btn--ghost {
    background: var(--profile-surface-alt);
    color: var(--profile-text);
    border-color: var(--profile-border);
}
.btn--icon {
    border-radius: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
    background: var(--profile-surface-alt);
    color: var(--profile-text);
}
.btn--copied {
    background: #22c55e;
    color: #fff;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.16);
}
.user-profile--error {
    max-width: 640px;
    margin: 3rem auto;
    text-align: center;
    padding: 1.1rem;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 10px;
    background: #fff1f2;
    color: #7f1d1d;
}
.user-profile--error h2 {
    margin-top: 0;
}
.profile-flights-table tbody tr:hover {
    background: var(--profile-surface-alt);
}
@media (max-width: 640px) {
    .user-profile__hero {
        padding: 0.95rem;
        grid-template-columns: 1fr;
    }
    .user-profile__actions {
        width: 100%;
        justify-content: stretch;
    }
    .user-profile__actions .btn,
    .user-profile__share .btn {
        width: 100%;
        justify-content: center;
        align-self: stretch;
    }
    .user-profile__pilot-level {
        grid-template-columns: 1fr;
    }
    .profile-flights-table {
        font-size: 0.85rem;
    }
}

@media (max-width: 820px) {
    .profile-flights-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .profile-flights-table thead {
        display: none;
    }

    .profile-flights-table tbody {
        display: grid;
        gap: 0.65rem;
    }

    .profile-flights-table tr {
        display: grid;
        gap: 0.55rem;
        padding: 0.7rem;
        border: 1px solid var(--profile-border);
        border-radius: 10px;
        background: var(--profile-surface-alt);
        box-shadow: 0 8px 16px var(--profile-shadow);
    }

    .profile-flights-table td {
        display: grid;
        gap: 0.2rem;
        padding: 0;
        border: 0;
    }

    .profile-flights-table td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--profile-text-muted);
    }

    .profile-flights-table__actions {
        width: auto;
        text-align: left;
    }

    .profile-flights-table__actions .btn--icon {
        width: 100%;
        border-radius: 10px;
    }

    .profile-flight__route {
        flex-wrap: wrap;
    }

    .user-profile__contest-card {
        min-width: 0;
    }
}
.profile-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.45rem;
    margin: 0.62rem 0 0.48rem;
}
.profile-tab {
    border: 1px solid var(--profile-border);
    background: var(--profile-surface);
    color: var(--profile-text);
    padding: 0.44rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    text-align: center;
}
.profile-tab:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}
.profile-tab.is-active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: #1d4ed8;
}
.profile-tab-panel {
    display: none;
}
.profile-tab-panel[hidden] {
    display: none !important;
}
.profile-tab-panel.is-active {
    display: block;
}
.user-profile__quests {
    margin-top: 0.5rem;
}
.profile-quests__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
    padding: 0.68rem;
    border: 1px solid var(--profile-border);
    border-radius: 10px;
    background: var(--profile-surface);
    box-shadow: 0 8px 16px var(--profile-shadow);
}
.profile-quests__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--profile-text-muted);
}
.profile-quests__level {
    margin: 0.2rem 0;
    font-size: 1.5rem;
}
.profile-quests__xp {
    margin: 0;
    color: var(--profile-text-muted);
    font-weight: 600;
}
.profile-quests__progress {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.profile-quests__bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: var(--profile-border);
    overflow: hidden;
}
.profile-quests__bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.profile-quests__hint {
    color: var(--profile-text-muted);
    margin: 0;
}
.profile-quests__status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}
.profile-quests__status summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--profile-text);
}
.profile-quests__status[open] {
    gap: 0.55rem;
}
.profile-quests__status--compact strong {
    font-size: 1.5rem;
    color: var(--profile-accent);
}
.profile-quests__status--compact small {
    color: var(--profile-text-muted);
    font-weight: 600;
}
.profile-quests__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--profile-border);
    background: var(--profile-surface-alt);
    font-weight: 700;
    color: var(--profile-text);
}
.profile-quests__badge.is-active {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}
.profile-quests__empty {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--profile-border);
    border-radius: 10px;
    color: var(--profile-text-muted);
    background: var(--profile-surface-soft);
}
.profile-quests__section {
    margin-top: 1rem;
}
.profile-quests__section-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 0.55rem;
}
.profile-quests__section-head h3 {
    margin: 0.1rem 0 0;
}
.profile-quests__section-head span {
    color: var(--profile-text-muted);
    font-weight: 700;
    white-space: nowrap;
}
.profile-quests__highest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.5rem;
}
.profile-quests__highest-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.68rem 0.75rem 0.72rem 2.55rem;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-surface);
}
.profile-quests__highest-card h3 {
    margin: 0.1rem 0;
    color: var(--profile-accent);
    font-size: 1rem;
}
.profile-quests__highest-card small {
    color: var(--profile-text-muted);
    font-weight: 700;
}
.profile-quests__check {
    position: absolute;
    top: 0.72rem;
    left: 0.72rem;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.75rem;
}
.profile-quests__open-list {
    display: grid;
    gap: 0.55rem;
}
.profile-quests__open-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-surface);
}
.profile-quests__bar--open {
    height: 9px;
}
.profile-quests__open-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--profile-text-muted);
    font-weight: 700;
}
.profile-quests__open-meta small {
    color: var(--profile-text-muted);
    text-align: right;
}

body.dark-mode .user-profile__hero {
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.28);
}

body.dark-mode .user-profile__glider-card,
body.dark-mode .user-profile__club-card,
body.dark-mode .user-profile__contest-card,
body.dark-mode .user-profile__share,
body.dark-mode .profile-category,
body.dark-mode .profile-tab,
body.dark-mode .profile-quests__summary,
body.dark-mode .profile-quests__highest-card,
body.dark-mode .profile-quests__open-card,
body.dark-mode .quest-card,
body.dark-mode .profile-quests__empty {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-mode .btn--icon {
    background: rgba(30, 41, 59, 0.88);
}

body.dark-mode .btn--ghost {
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.22);
}

body.dark-mode .btn--primary {
    color: #f8fafc;
}

body.dark-mode .profile-category__error,
body.dark-mode .user-profile--error {
    background: rgba(127, 29, 29, 0.18);
    color: #fecaca;
}

body.dark-mode .profile-quests__badge.is-active {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(74, 222, 128, 0.32);
    color: #86efac;
}

body.dark-mode .user-profile__meta a,
body.dark-mode .profile-flight__links a {
    color: #93c5fd;
}

body.dark-mode .user-profile__contest-card span,
body.dark-mode .user-profile__club-card span,
body.dark-mode .user-profile__contest-range,
body.dark-mode .profile-quests__xp,
body.dark-mode .profile-quests__hint,
body.dark-mode .quest-card__meta,
body.dark-mode .quest-card__eyebrow,
body.dark-mode .user-profile__handle,
body.dark-mode .user-profile__nickname,
body.dark-mode .user-profile__meta li,
body.dark-mode .user-profile__glider-list li {
    color: var(--profile-text-muted);
}

body.dark-mode .user-profile__share input,
body.dark-mode .profile-flights-table th,
body.dark-mode .profile-flights-table tbody tr:hover,
body.dark-mode .quest-card__badge {
    background: rgba(20, 30, 48, 0.96);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--profile-text);
}

@media (max-width: 960px) {
    .user-profile__hero {
        grid-template-columns: 1fr;
    }

    .profile-quests__summary {
        grid-template-columns: 1fr;
    }
}
.profile-quests__list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}
.quest-card {
    border: 1px solid var(--profile-border);
    border-radius: 10px;
    padding: 0.82rem 0.92rem;
    background: var(--profile-surface);
}
.quest-card__header {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}
.quest-card__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--profile-text-muted);
}
.quest-card__eyebrow--icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.quest-card__eyebrow--icon img {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}
.quest-card h3 {
    margin: 0.15rem 0 0;
}
.quest-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--profile-border);
    background: var(--profile-surface-alt);
    font-weight: 700;
    color: var(--profile-text);
}
.quest-card__meta {
    margin: 0.4rem 0;
    color: var(--profile-text-muted);
}
.quest-card__progress-label {
    margin: 0.25rem 0;
    font-weight: 600;
}
.quest-card__progress {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.quest-card__progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--profile-border);
    overflow: hidden;
}
.quest-card__progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.quest-card--completed .quest-card__progress-fill {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.quest-card--expired .quest-card__progress-fill,
.quest-card--failed .quest-card__progress-fill {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

@media (max-width: 960px) {
    .user-profile {
        padding: 1rem 0.78rem 2rem;
    }

    .user-profile__hero {
        grid-template-columns: 1fr;
        padding: 0.9rem;
    }

    .user-profile__actions {
        justify-content: flex-start;
    }

    .user-profile__share input {
        width: 100%;
    }

    .user-profile__meta,
    .user-profile__glider-list {
        gap: 0.7rem 1rem;
    }

    .user-profile__topgrid,
    .profile-quests__summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .profile-quests__summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .user-profile {
        padding: 1.15rem 0.75rem 2.15rem;
    }

    .user-profile__hero {
        gap: 1rem;
        padding: 0.8rem;
    }

    .user-profile__title {
        font-size: clamp(1.65rem, 9vw, 2.35rem);
    }

    .user-profile__contest-list,
    .user-profile__club-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .user-profile__share {
        margin-bottom: 1rem;
    }

    .user-profile__glider-card {
        padding: 0.8rem;
    }

    .user-profile__meta,
    .user-profile__glider-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-category {
        min-height: 0;
        padding: 1rem;
    }

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

    .profile-tab {
        min-height: 44px;
    }

    .profile-quests__summary,
    .profile-quests__list,
    .profile-quests__highest-grid,
    .profile-quests__open-list {
        gap: 0.75rem;
    }

    .profile-quests__section-head,
    .profile-quests__open-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .quest-card__header {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .user-profile__hero {
        padding: 0.9rem;
        border-radius: 10px;
    }

    .user-profile__title {
        line-height: 1.05;
    }

    .user-profile__glider-title {
        font-size: 1.2rem;
    }

    .profile-tab {
        padding: 0.65rem 0.8rem;
    }

    .profile-tabs {
        grid-template-columns: 1fr;
    }
}

/* Compact public profile shell */
.user-profile {
    max-width: 1240px;
    padding: 0.42rem 0.68rem 0.92rem;
}

.user-profile__hero {
    gap: 0.42rem;
    padding: 0.62rem 0.72rem;
    border-radius: 6px;
    box-shadow: 0 10px 20px var(--profile-shadow);
}

.user-profile__title {
    font-size: clamp(1.55rem, 2.6vw, 2.2rem);
}

.user-profile__meta {
    margin-top: 0.55rem;
    gap: 0.35rem 0.72rem;
}

.user-profile__contests,
.user-profile__glider-card {
    margin-top: 0.58rem;
}

.user-profile__contest-list {
    gap: 0.38rem;
    margin-top: 0.38rem;
}

.user-profile__contest-card,
.user-profile__glider-card,
.user-profile__share,
.profile-category,
.profile-tab,
.profile-quests__summary,
.quest-card,
.profile-quests__empty,
.quest-card__badge,
.profile-quests__badge {
    border-radius: 8px;
}

.user-profile__contest-card,
.user-profile__glider-card,
.user-profile__share,
.profile-category,
.quest-card {
    box-shadow: 0 8px 18px var(--profile-shadow);
}

.user-profile__contest-card,
.user-profile__glider-card {
    padding: 0.48rem 0.56rem;
}

.user-profile__share {
    margin: 0.52rem 0 0.72rem;
    padding: 0.45rem 0.52rem;
}

.profile-tabs {
    gap: 0.45rem;
    margin-bottom: 0.62rem;
}

.profile-category {
    padding: 0.8rem 0.9rem;
}

.profile-quests__summary,
.profile-quests__list {
    gap: 0.72rem;
}

body.dark-mode .user-profile__hero {
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.26);
}

body.dark-mode .user-profile__contest-card,
body.dark-mode .user-profile__glider-card,
body.dark-mode .user-profile__share,
body.dark-mode .profile-category,
body.dark-mode .quest-card {
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
}

@media (max-width: 960px) {
    .user-profile {
        padding: 0.7rem 0.72rem 1.2rem;
    }

    .user-profile__hero {
        padding: 0.72rem;
    }

    .profile-category {
        padding: 0.9rem;
    }
}

@media (max-width: 640px) {
    .user-profile {
        padding: 0.76rem 0.62rem 1.15rem;
    }

    .user-profile__hero {
        gap: 0.72rem;
        padding: 0.68rem;
        border-radius: 8px;
    }

    .user-profile__share {
        margin-bottom: 0.72rem;
    }
}
