.profile-page {
    max-width: 1140px;
    padding-block: clamp(20px, 4vw, 44px);
    overflow-wrap: anywhere;
}
.profile-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; }
.profile-topbar > a:last-child, .profile-trail { color: var(--muted); font-size: .9rem; font-weight: 650; }
.profile-topbar a:hover, .profile-trail a:hover { color: var(--lime); }
.profile-trail { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px; }
.profile-trail a + a::before { content: "/" / ""; color: var(--muted); margin-right: 14px; }

.profile-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 30px);
    overflow: hidden;
    min-height: 180px;
    margin: 0 0 16px;
    padding: clamp(18px, 4vw, 38px);
    border: 1px solid #455440;
    border-radius: 16px;
    background: linear-gradient(110deg, #263729, #162026 68%);
    color: #f7f8f9;
}
.profile-hero::after {
    position: absolute;
    z-index: -1;
    width: 280px;
    aspect-ratio: 1;
    top: 50%;
    right: -90px;
    transform: translateY(-50%);
    border: 1px solid #febd0926;
    border-radius: 50%;
    box-shadow: 0 0 0 24px #febd0912, 0 0 0 48px #febd090a;
    content: "";
    pointer-events: none;
}
.profile-identity { min-width: 0; }
.profile-identity .page-title { margin-block: 5px 7px; }
.profile-identity p { margin: 0; color: #c8d4d3; }
.profile-identity time { white-space: nowrap; }
.profile-identity .profile-kicker { color: #febd09; font-size: .75rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.profile-identity a { color: #febd09; font-weight: 700; }
.profile-identity a:hover { text-decoration: underline; }
.profile-emblem {
    display: grid;
    flex: none;
    place-items: center;
    width: clamp(62px, 13vw, 108px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #64784e;
    border-radius: 15px;
    background: #101b20;
    color: #febd09;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
}
.profile-emblem img { width: 100%; height: 100%; padding: 10%; object-fit: contain; }
.profile-portrait img { padding: 0; object-fit: cover; }
.profile-initial { background: #febd09; color: #24102f; }

.profile-facts, .profile-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 12px;
    margin: 0 0 16px;
}
.profile-columns { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.profile-facts > div, .profile-panel, .profile-page form.profile-panel {
    padding: clamp(14px, 2.5vw, 22px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.profile-facts dt, .profile-muted { color: var(--muted); font-size: .88rem; }
.profile-facts dd { margin: 4px 0 0; font-size: clamp(1.1rem, 2.2vw, 1.45rem); font-weight: 750; }
.profile-panel { margin: 0 0 14px; }
.profile-panel > h1 { margin: 0; }
.profile-panel p:last-child { margin-bottom: 0; }
.profile-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-section-heading h2 { margin: 0; font-size: 1.1rem; }
.profile-section-heading > span, .profile-fixtures time { color: var(--muted); font-size: .83rem; }
.profile-roster, .profile-fixtures { margin: 0; padding: 0; list-style: none; }
.profile-roster a, .profile-fixtures li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.profile-roster li:last-child a, .profile-fixtures li:last-child { border-bottom: 0; }
.profile-roster a:hover, .profile-roster a > span:last-child, .profile-fixtures strong { color: var(--lime); }
.profile-roster small { display: block; margin-top: 2px; color: var(--muted); }
.profile-number { display: grid; place-items: center; min-width: 35px; min-height: 35px; padding-inline: 5px; border-radius: 6px; background: var(--bg); color: var(--lime); font-weight: 800; }
.profile-fixtures li { font-size: .88rem; }
.profile-fixtures strong { white-space: nowrap; }
.profile-bio { margin: 12px 0 0; line-height: 1.6; white-space: pre-wrap; }

.profile-page .account-forms > form { margin: 0; }
.profile-page form:not(.profile-panel) { margin: 14px 0 0; padding: 0; border: 0; }
.profile-page input:not([type="checkbox"]), .profile-page button { min-height: 42px; }
.profile-page input, .profile-page textarea { font-weight: 400; }
.profile-page input[type="checkbox"] { accent-color: var(--lime); }
.profile-page .profile-secondary { background: var(--bg); color: var(--text); }
.profile-page p[role="alert"], .profile-page p[role="status"] { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.profile-page p[role="alert"] { border-color: #a75d52; color: #ffbcaf; }
.profile-page p[role="status"] { color: var(--lime); }
.profile-page .profile-identity a { color: #febd09; }
.profile-bonus { padding: 5px 10px; border-radius: 20px; background: #febd09; color: #24102f !important; font-weight: 750; }
.profile-page .profile-verified { color: var(--text); }
.profile-page .account-email-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.account-email-form label { flex: 1 1 260px; min-width: 0; margin: 0; }
.account-email-form button { max-width: 100%; white-space: normal; }
.account-email-form > small { flex-basis: 100%; }
.team-autocomplete { position: relative; margin-block: 12px; }
.team-autocomplete > label { margin-bottom: 6px; }
.team-autocomplete > input { width: 100%; }
.team-autocomplete > small { display: block; margin-top: 6px; line-height: 1.5; }
.team-suggestions { position: relative; z-index: 2; max-height: 260px; overflow-y: auto; overscroll-behavior-y: contain; touch-action: pan-y; margin: 8px 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 8px 24px #0003; }
.team-suggestions [role="option"] { padding: 11px 12px; min-height: 44px; border-radius: 5px; cursor: pointer; font-weight: 500; }
.team-suggestions [role="option"]:hover, .team-suggestions [aria-selected="true"] { background: #febd09; color: #24102f; }
.profile-page [hidden] { display: none; }
.profile-completion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.profile-completion-grid > section { min-width: 0; scroll-margin-top: 18px; }
.profile-avatar img { padding: 0; object-fit: cover; }
.profile-page .profile-avatar { background: var(--panel); border-color: var(--line); }
.avatar-preview { width: 108px; height: 108px; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; }
.profile-page input[type="file"] { max-width: 100%; font-size: .85rem; }
.favorite-team-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.profile-page .favorite-team-actions button { white-space: normal; }
.profile-page .team-autocomplete { margin-block: 0; }
.profile-completion-grid .profile-bonus { white-space: normal; text-align: center; }
#profile-photo, #favorite-team-panel { scroll-margin-top: 20px; }
.profile-page.banner-editor .profile-hero .page-title { color: #fff9f2; }
.profile-page.banner-editor a, .profile-page.banner-editor p[role="status"] { color: var(--nav); }
.profile-page.banner-editor .profile-hero a { color: #fff9f2; }
.profile-page.banner-editor p[role="alert"] { color: #9e2318; }

@media (max-width: 690px) {
    .profile-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .profile-completion-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .profile-hero { min-height: 145px; }
}
