.profile-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    max-width: 760px;
    margin-inline: auto;
    margin-bottom: 32px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 44px rgba(24, 86, 163, 0.08);
}

.profile-card-photo {
    width: 148px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: var(--line);
    box-shadow: 0 12px 28px rgba(16, 59, 117, 0.12);
}

.profile-card-photo-placeholder {
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 56px;
    font-weight: 800;
}

.profile-card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.profile-card-main {
    display: grid;
    gap: 8px;
}

.profile-card-main h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
}

.profile-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.profile-card-about {
    max-width: 720px;
    margin: 6px 0 0;
}

.profile-card-action {
    flex: 0 0 auto;
}

.profile-page {
    padding-top: 18px;
}

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

.profile-sidebar,
.profile-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(24, 86, 163, 0.08);
}

.profile-sidebar {
    overflow: hidden;
}

.profile-hero {
    position: relative;
    min-height: 178px;
    padding-top: 56px;
}

.profile-cover {
    position: absolute;
    inset: 0 0 auto;
    height: 112px;
    background: linear-gradient(135deg, var(--brand-dark), #3d75c4);
}

.profile-edit-float {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(16, 59, 117, 0.18);
}

.profile-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    margin: 0 auto;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    object-fit: cover;
    font-size: 52px;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(16, 59, 117, 0.18);
}

.profile-sidebar-body {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    text-align: center;
}

.profile-sidebar-body h1 {
    margin: 0;
    font-size: 25px;
}

.profile-contact-list {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 14px;
}

.profile-contact-list p {
    margin: 0;
}

.profile-contact-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--brand);
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.profile-side-panel {
    margin: 0 18px 18px;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
}

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

.profile-detail-list div {
    display: grid;
    gap: 2px;
}

.profile-detail-list span {
    color: var(--muted);
    font-size: 12px;
}

.profile-detail-list strong {
    color: var(--text);
    font-size: 15px;
}

.profile-side-panel h2,
.profile-panel h2 {
    font-size: 18px;
}

.profile-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0 18px 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.profile-mini-stats div {
    display: grid;
    gap: 4px;
    padding: 14px;
    background: #fff;
}

.profile-mini-stats strong {
    color: var(--text);
    font-size: 24px;
}

.profile-mini-stats span {
    color: var(--muted);
    font-size: 12px;
}

.profile-tabs {
    display: flex;
    gap: 26px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.profile-tabs a {
    padding: 13px 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.profile-tabs a.active {
    border-bottom-color: var(--brand);
    color: var(--brand);
}

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

.profile-panel {
    padding: 22px;
}

.profile-coach-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background:
        radial-gradient(circle at 92% 10%, rgba(154, 38, 170, 0.14), rgba(154, 38, 170, 0) 36%),
        var(--panel);
}

.profile-coach-tools h2 {
    margin-bottom: 6px;
}

.profile-coach-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.profile-coach-tool-actions .button-link {
    min-width: 210px;
    font-weight: 900;
}

.profile-panel-wide {
    grid-column: 1 / -1;
}

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

.profile-summary-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-summary-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.98));
}

.profile-summary-card span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.profile-summary-card strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
}

.profile-about-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.profile-about-block h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.profile-about-block p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.profile-chart-frame {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(244, 248, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.profile-rating-chart {
    display: block;
    width: 100%;
    height: auto;
}

.profile-chart-grid-line {
    stroke: rgba(94, 111, 145, 0.16);
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.profile-chart-axis-label {
    fill: var(--muted);
    font-size: 12px;
    text-anchor: end;
}

.profile-chart-area {
    fill: rgba(43, 88, 152, 0.08);
}

.profile-chart-line {
    fill: none;
    stroke: var(--brand);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-chart-point {
    fill: #fff;
    stroke: var(--brand);
    stroke-width: 2;
}

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

.profile-chart-meta div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.profile-chart-meta span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.profile-chart-meta strong {
    color: var(--text);
    font-size: 16px;
}

.profile-awards-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.profile-awards-total {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.profile-awards-total span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.profile-awards-total strong {
    font-size: 24px;
    line-height: 1;
}

.profile-awards-total-halls {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.98));
}

.profile-awards-total-gold {
    border-color: rgba(194, 154, 55, 0.22);
    background: linear-gradient(180deg, rgba(255, 248, 224, 0.96), rgba(255, 255, 255, 0.98));
}

.profile-awards-total-silver {
    border-color: rgba(133, 144, 164, 0.22);
    background: linear-gradient(180deg, rgba(243, 246, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.profile-awards-total-bronze {
    border-color: rgba(166, 94, 56, 0.22);
    background: linear-gradient(180deg, rgba(255, 242, 235, 0.96), rgba(255, 255, 255, 0.98));
}

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

.profile-award-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.98));
}

.profile-award-card h3 {
    margin: 0;
    font-size: 16px;
}

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

.profile-history-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.profile-history-item[open] {
    box-shadow: 0 10px 28px rgba(24, 86, 163, 0.08);
}

.profile-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.profile-history-summary::-webkit-details-marker {
    display: none;
}

.profile-history-summary > div {
    display: grid;
    gap: 4px;
}

.profile-history-summary strong {
    font-size: 15px;
}

.profile-history-summary span {
    color: var(--muted);
    font-size: 13px;
}

.profile-history-summary-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

.profile-history-summary-meta strong {
    font-size: 16px;
}

.profile-history-summary-meta span {
    color: var(--muted);
    font-size: 12px;
}

.profile-history-matches {
    display: grid;
    gap: 0;
    padding: 0 16px 14px;
}

.profile-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.profile-pagination a,
.profile-pagination span,
.profile-pagination strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: 14px;
}

.profile-pagination a {
    color: var(--accent);
    background: #fff;
    text-decoration: none;
}

.profile-pagination span {
    color: var(--muted);
    background: rgba(245, 247, 250, 0.85);
}

.profile-pagination strong {
    color: var(--text);
    background: rgba(238, 244, 251, 0.9);
}

.profile-medal-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.medal-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.medal-chip-gold {
    background: rgba(194, 154, 55, 0.12);
    color: #966d16;
}

.medal-chip-silver {
    background: rgba(133, 144, 164, 0.14);
    color: #59667a;
}

.medal-chip-bronze {
    background: rgba(166, 94, 56, 0.14);
    color: #8b4d29;
}

.profile-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.profile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-panel-head a {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

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

.profile-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.profile-list-row:first-child {
    border-top: 0;
}

.profile-list-row div {
    display: grid;
    gap: 3px;
}

.profile-list-row span {
    color: var(--muted);
    font-size: 14px;
}

.profile-list-row .form {
    margin: 0;
}

.profile-list-row button {
    min-height: 36px;
    padding: 7px 10px;
}

.profile-edit-form {
    max-width: 720px;
}

.profile-photo-field {
    display: grid;
    gap: 10px;
}

.profile-photo-preview {
    width: 128px;
    height: 128px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
}

@media (max-width: 760px) {
    .profile-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        max-width: none;
    }

    .profile-card-body {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .profile-card-main {
        justify-items: center;
    }

    .profile-card-meta {
        justify-content: center;
    }

    .profile-card-action {
        width: 100%;
    }

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

    .profile-tabs {
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 1px;
    }

    .profile-tabs a {
        flex: 0 0 auto;
    }

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

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

    .profile-coach-tool-actions {
        justify-content: stretch;
    }

    .profile-coach-tool-actions .button-link {
        width: 100%;
    }

    .profile-summary-grid,
    .profile-chart-meta {
        grid-template-columns: 1fr;
    }

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

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

    .profile-history-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-history-summary-meta {
        justify-items: start;
        text-align: left;
    }

    .profile-list-row .form,
    .profile-list-row button {
        width: 100%;
    }
}
.profile-award-card-head {
    display: grid;
    gap: 4px;
}

.profile-award-card-head h3 {
    margin: 0;
    font-size: 16px;
}

.profile-award-card-head .muted {
    font-size: 13px;
}

.profile-award-total {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.profile-medal-chips {
    justify-content: flex-start;
}
