:root {
    --pc-ink: #132a25;
    --pc-green: #0d6b52;
    --pc-lime: #c7ff54;
    --pc-sand: #f4f0e7;
}

body {
    color: var(--pc-ink);
    background: #f7f8f6;
}

.login-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(199, 255, 84, .35), transparent 30%),
        linear-gradient(135deg, #102a24, #0d6b52);
}

.registration-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 5%, rgba(199, 255, 84, .28), transparent 28%),
        var(--pc-sand);
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: var(--pc-lime);
    color: var(--pc-ink);
    font-weight: 800;
    letter-spacing: -.06em;
}

.btn-primary {
    --bs-btn-bg: var(--pc-green);
    --bs-btn-border-color: var(--pc-green);
    --bs-btn-hover-bg: #095540;
    --bs-btn-hover-border-color: #095540;
}

.admin-page .navbar {
    background: var(--pc-ink);
}

.eyebrow {
    color: var(--pc-green);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.metric-card {
    display: flex;
    min-height: 128px;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    border: 1px solid #e5e9e5;
    border-radius: 18px;
    background: white;
}

.metric-card span {
    color: #6c757d;
    font-size: .9rem;
}

.metric-card strong {
    font-size: 2rem;
    line-height: 1;
}

.field-error {
    margin-top: .25rem;
    color: #b02a37;
    font-size: .8rem;
}

.verification-code {
    font-size: 1.6rem;
    letter-spacing: .35em;
    text-align: center;
}

.profile-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: .8rem 1rem;
}

.profile-grid dt {
    color: #6c757d;
    font-weight: 500;
}

.profile-grid dd {
    margin: 0;
    font-weight: 600;
}

.profile-hero-card {
    overflow: hidden;
    border: 1px solid #e2e8e4;
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 30px rgba(22, 42, 33, .08);
}

.profile-cover {
    position: relative;
    min-height: 250px;
    background-position: center;
    background-size: cover;
}

.profile-cover-default {
    background:
        radial-gradient(circle at 75% 20%, rgba(199, 255, 84, .55), transparent 28%),
        linear-gradient(135deg, var(--pc-ink), var(--pc-green));
}

.profile-cover-action {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.profile-identity {
    display: flex;
    min-height: 105px;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.5rem 1rem 1.5rem;
}

.profile-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    margin-top: -48px;
}

.profile-avatar {
    width: 132px;
    height: 132px;
    border: 5px solid white;
    border-radius: 50%;
    background: #eef3f0;
    box-shadow: 0 5px 18px rgba(22, 42, 33, .18);
    object-fit: cover;
}

.profile-avatar-placeholder {
    display: grid;
    place-items: center;
    background: var(--pc-lime);
    color: var(--pc-ink);
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-avatar-action {
    position: absolute;
    right: 0;
    bottom: 4px;
    display: grid;
    min-width: 44px;
    min-height: 32px;
    place-items: center;
    border: 3px solid white;
    border-radius: 999px;
    background: var(--pc-green);
    color: white;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
}

.profile-name-block {
    padding-top: 1rem;
}

.booking-list {
    display: grid;
    gap: .75rem;
}

.booking-item,
.block-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.booking-item:last-child,
.block-item:last-child {
    border-bottom: 0;
}

.booking-payment-item {
    align-items: flex-start;
}

.booking-payment-item > div {
    min-width: 0;
    flex: 1;
}

.payment-panel {
    padding: 1rem;
    border: 1px solid rgba(13, 107, 82, .22);
    border-radius: 14px;
    background: rgba(13, 107, 82, .06);
}

.payment-details {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: .25rem .75rem;
    font-size: .9rem;
}

.payment-details dt {
    color: #6c757d;
    font-weight: 500;
}

.payment-details dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.payment-qr {
    width: min(220px, 100%);
    padding: .5rem;
    border: 1px solid #dfe5e1;
    border-radius: 12px;
    background: white;
}

.reference-code {
    padding: .55rem .7rem;
    border-radius: 9px;
    background: #f2f4f3;
    font-size: .88rem;
}

.compact-booking-list {
    display: grid;
}

.compact-booking-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem .5rem;
    border-bottom: 1px solid #e9ecef;
    color: inherit;
}

.compact-booking-item:last-child {
    border-bottom: 0;
}

.compact-booking-item:hover {
    border-radius: 12px;
    background: #f7f9f8;
}

.booking-date-box {
    display: grid;
    place-items: center;
    min-height: 58px;
    border-radius: 12px;
    background: rgba(13, 107, 82, .1);
    color: var(--pc-green);
}

.booking-date-box span {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.booking-date-box strong {
    font-size: 1.35rem;
    line-height: 1;
}

.booking-summary {
    display: grid;
    gap: .15rem;
}

.booking-summary span,
.booking-summary small {
    color: #6c757d;
}

.booking-list-status {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.booking-chevron {
    color: #8a9690;
    font-size: 1.8rem;
    line-height: 1;
}

.booking-detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: .7rem 1rem;
}

.booking-detail-grid dt {
    color: #6c757d;
    font-weight: 500;
}

.booking-detail-grid dd {
    margin: 0;
    font-weight: 600;
}

.order-queue-tabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}

.order-queue-tabs a {
    flex: 0 0 auto;
    padding: .55rem .85rem;
    border: 1px solid #dfe5e1;
    border-radius: 999px;
    background: white;
    color: #48544e;
    text-decoration: none;
    font-weight: 600;
}

.order-queue-tabs a.active {
    border-color: var(--pc-green);
    background: var(--pc-green);
    color: white;
}

.order-actions {
    min-width: 290px;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.event-card {
    overflow: hidden;
    border: 1px solid #e2e8e4;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(22, 42, 33, .06);
}

.event-cover {
    min-height: 150px;
    background: linear-gradient(135deg, var(--pc-ink), var(--pc-green));
    background-position: center;
    background-size: cover;
}

.event-hero {
    display: flex;
    min-height: 260px;
    align-items: end;
    padding: 2rem;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--pc-ink), var(--pc-green));
    background-position: center;
    background-size: cover;
    color: white;
}

.event-match-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.event-match-card:last-child {
    border-bottom: 0;
}

.event-feedback {
    padding: .75rem;
    border-radius: 12px;
    background: #f5f8f6;
}

.event-description {
    white-space: pre-line;
}

.event-qr {
    max-width: 280px;
}

.payment-amount {
    width: 105px;
}

.payment-method {
    width: 115px;
}

.court-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.choice-card,
.choice-pill,
.time-choice {
    position: relative;
    cursor: pointer;
}

.choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-content {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    padding: .85rem 1rem;
    border: 1px solid #dfe5e1;
    border-radius: 14px;
    background: white;
}

.choice-content small {
    margin-top: .2rem;
    color: #6c757d;
}

.court-type {
    align-self: flex-start;
    margin-bottom: .45rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: rgba(13, 107, 82, .12);
    color: var(--pc-green);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.court-type.pickleball {
    background: rgba(255, 193, 7, .2);
    color: #8a6200;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.choice-pill span,
.time-choice span {
    display: grid;
    min-height: 46px;
    place-items: center;
    padding: .5rem;
    border: 1px solid #dfe5e1;
    border-radius: 12px;
    background: white;
    font-weight: 600;
}

.time-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .5rem;
    max-height: 270px;
    overflow-y: auto;
    padding: .15rem .25rem .15rem 0;
}

.choice-input:checked + .choice-content,
.choice-input:checked + span {
    border-color: var(--pc-green);
    background: rgba(13, 107, 82, .1);
    box-shadow: 0 0 0 2px rgba(13, 107, 82, .12);
    color: var(--pc-green);
}

.choice-card:hover .choice-content,
.choice-pill:hover span,
.time-choice:hover span {
    border-color: var(--pc-green);
}

@media (max-width: 991.98px) {
    .court-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .admin-page {
        padding-bottom: 74px;
    }

    .admin-page > .navbar .nav-link {
        display: none;
    }

    .court-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .time-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .compact-booking-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .booking-list-status {
        grid-column: 2;
        justify-content: space-between;
    }

    .booking-detail-grid {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .booking-detail-grid dd {
        margin-bottom: .7rem;
    }

    .profile-cover {
        min-height: 180px;
    }

    .profile-identity {
        align-items: flex-start;
        padding: 0 1rem 1rem;
    }

    .profile-avatar-wrap,
    .profile-avatar {
        width: 104px;
        height: 104px;
    }

    .profile-avatar-wrap {
        margin-top: -34px;
    }

    .profile-avatar-placeholder {
        font-size: 2.3rem;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    .event-match-card {
        grid-template-columns: 1fr;
    }

    .event-hero {
        min-height: 210px;
        padding: 1.25rem;
    }
}

.choice-input:focus-visible + span {
    outline: 2px solid var(--pc-green);
    outline-offset: 3px;
}

.playing-level-range {
    --thumb-size: 24px;
    --range-start: 0%;
    --range-end: 100%;
    position: relative;
    height: 52px;
}

.playing-level-track {
    position: absolute;
    inset: calc(50% - 3px) calc(var(--thumb-size) / 2) auto;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right,
        #dfe5e1 0 var(--range-start),
        var(--pc-green) var(--range-start) var(--range-end),
        #dfe5e1 var(--range-end) 100%);
}

.playing-level-range input {
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: var(--thumb-size);
    margin: auto 0;
    background: transparent;
    pointer-events: none;
}

.playing-level-range input::-webkit-slider-thumb {
    appearance: none;
    width: var(--thumb-size);
    height: var(--thumb-size);
    border: 2px solid var(--pc-green);
    border-radius: 50%;
    background: white;
    cursor: grab;
    pointer-events: auto;
}

.playing-level-range input::-moz-range-thumb {
    box-sizing: border-box;
    width: var(--thumb-size);
    height: var(--thumb-size);
    border: 2px solid var(--pc-green);
    border-radius: 50%;
    background: white;
    cursor: grab;
    pointer-events: auto;
}

.playing-level-range input:focus-visible {
    outline: 2px solid var(--pc-green);
    outline-offset: 2px;
    border-radius: 20px;
    z-index: 1;
}

.playing-level-range.is-equal #minLevel {
    transform: translateY(-12px);
}

.playing-level-range.is-equal #maxLevel {
    transform: translateY(12px);
}

.home-header {
    background: var(--pc-ink);
}

.home-brand-logo {
    width: 72px;
    height: 52px;
    border-radius: 6px;
    object-fit: contain;
}

.home-hero-logo {
    width: min(192px, 100%);
    height: auto;
    border-radius: 8px;
}

.home-pricing {
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 1.25rem;
    background: var(--pc-sand);
}

.home-account-menu {
    position: relative;
}

.home-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    list-style: none;
    background: var(--pc-lime);
    color: var(--pc-ink);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .26);
}

.home-account-menu[open] .home-avatar,
.home-avatar:hover {
    box-shadow: 0 0 0 2px var(--pc-lime);
}

.home-avatar::-webkit-details-marker {
    display: none;
}

.home-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-avatar:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

.home-account-panel {
    position: absolute;
    top: calc(100% + .75rem);
    right: 0;
    z-index: 10;
    width: min(18rem, calc(100vw - 1.5rem));
    padding: .375rem;
    border: 1px solid #dce7df;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 .75rem 2rem rgba(19, 42, 37, .19), 0 .125rem .375rem rgba(19, 42, 37, .08);
}

.home-account-panel::before {
    content: "";
    position: absolute;
    top: -.375rem;
    right: 1rem;
    width: .75rem;
    height: .75rem;
    border-top: 1px solid #dce7df;
    border-left: 1px solid #dce7df;
    background: white;
    transform: rotate(45deg);
}

.home-account-identity {
    position: relative;
    margin-bottom: .375rem;
    padding: .875rem 1rem;
    border-radius: .75rem;
    background: #edf7ef;
    color: var(--pc-ink);
    overflow-wrap: anywhere;
}

.home-account-panel .dropdown-item {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: .625rem 1rem;
    border-radius: .625rem;
    color: var(--pc-ink);
    font-size: .9375rem;
    font-weight: 600;
}

.home-account-panel a.dropdown-item::after {
    content: "";
    width: .4rem;
    height: .4rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    opacity: .55;
    transform: rotate(45deg);
}

.home-account-panel .dropdown-item:hover,
.home-account-panel .dropdown-item:focus-visible {
    background: #edf7ef;
    color: var(--pc-green);
}

.home-account-panel .dropdown-item:focus-visible {
    outline: 2px solid var(--pc-green);
    outline-offset: -2px;
}

.home-account-logout {
    margin-top: .375rem;
    padding-top: .375rem;
    border-top: 1px solid #e5ebe6;
}

.home-account-logout .dropdown-item {
    color: #a52c38;
}

.home-account-logout .dropdown-item:hover,
.home-account-logout .dropdown-item:focus-visible {
    background: #fff0f1;
    color: #a52c38;
}

.home-match-group {
    --match-accent: #136445;
    --match-surface: #edf7ef;
    --match-border: #c5dfcd;
    --match-action: #dcefe2;
    padding: 1rem;
    border: 1px solid var(--match-border);
    border-radius: 1rem;
    background: var(--match-surface);
}

.home-match-group-pickleball {
    --match-accent: #245290;
    --match-surface: #edf4fc;
    --match-border: #c9dbf0;
    --match-action: #ddeafa;
}

.home-match-group-title {
    color: var(--match-accent);
}

.home-match-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(13rem, 70vw, 16rem);
    gap: .875rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: .25rem .25rem .75rem;
    scrollbar-color: var(--match-border) transparent;
}

.home-match-strip > li {
    scroll-snap-align: start;
}

.home-match-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    min-height: 9rem;
    padding: 1rem 1.125rem;
    border: 1px solid var(--match-border, #dfe5e1);
    border-radius: 1rem;
    background: white;
    color: var(--pc-ink);
    text-decoration: none;
}

.home-match-card:hover {
    border-color: var(--match-accent, var(--pc-green));
}

.home-match-card:focus-visible,
.home-match-strip:focus-visible {
    outline: 2px solid var(--match-accent, var(--pc-green));
    outline-offset: 2px;
}

.home-match-sport {
    margin-bottom: .5rem;
    color: var(--match-accent, var(--pc-green));
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.home-match-level {
    margin-top: auto;
    padding-top: .65rem;
    color: var(--match-accent, var(--pc-green));
    font-size: .875rem;
    font-weight: 600;
}

.home-match-date {
    font-size: 1.125rem;
}

.home-match-time {
    color: #475750;
    font-size: .9375rem;
    font-variant-numeric: tabular-nums;
}

.home-match-players {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: .75rem 0 .25rem;
}

.home-match-avatar {
    position: relative;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--match-action, #e6f2e9);
    color: var(--match-accent, var(--pc-green));
    font-size: .8125rem;
    font-weight: 700;
}

.home-match-avatar-empty {
    border: 1px dashed var(--match-accent, var(--pc-green));
    background: transparent;
}

.home-match-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-match-see-all {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--match-action);
    color: var(--match-accent);
    font-weight: 700;
}

.player-page {
    --player-topbar-height: calc(4.25rem + env(safe-area-inset-top));
    --player-tabbar-height: calc(4rem + env(safe-area-inset-bottom));
    padding-top: var(--player-topbar-height);
    padding-bottom: var(--player-tabbar-height);
}

.player-topbar {
    position: fixed;
    z-index: 1031;
    inset: 0 0 auto;
    min-height: var(--player-topbar-height);
    padding-top: calc(.5rem + env(safe-area-inset-top));
}

.player-tabs {
    position: fixed;
    z-index: 1030;
    inset: auto 0 0;
    min-height: var(--player-tabbar-height);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #dfe5e1;
    background: white;
    box-shadow: 0 -4px 18px rgba(22, 42, 33, .08);
}

.player-tabs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-inline: 0;
}

.player-tabs-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(4rem - 1px);
    gap: .125rem;
    padding: .25rem;
    color: #475750;
    text-align: center;
    text-decoration: none;
}

.player-tabs-grid small {
    font-size: .6875rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.player-tabs-grid a:hover,
.player-tabs-grid a[aria-current="page"] {
    color: var(--pc-green);
    background: #eaf5ee;
}

.player-tabs-grid a:focus-visible {
    outline: 2px solid var(--pc-green);
    outline-offset: -3px;
}

.booking-shortcut-icon {
    position: relative;
    display: block;
    width: 1.75rem;
    height: 1.5rem;
    border: 2px solid currentColor;
    border-radius: .25rem;
}

.booking-shortcut-icon::before,
.booking-shortcut-icon::after {
    content: "";
    position: absolute;
}

.booking-shortcut-court::before {
    inset: 0 50% 0 auto;
    border-left: 2px solid currentColor;
}

.booking-shortcut-court::after {
    inset: 50% 0 auto;
    border-top: 2px solid currentColor;
}

.booking-shortcut-calendar::before {
    inset: .3rem 0 auto;
    border-top: 2px solid currentColor;
}

.booking-shortcut-calendar::after {
    top: .55rem;
    left: .53rem;
    width: .37rem;
    height: .55rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.match-back {
    flex-shrink: 0;
}

.match-detail-summary,
.match-detail-roster {
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #e0e9e2;
    border-radius: 1rem;
}

.match-detail-summary {
    background: #edf7ef;
}

.match-detail-roster {
    background: white;
}

.match-detail-level {
    display: inline-block;
    margin-top: .75rem;
    padding: .25rem .625rem;
    border-radius: 1rem;
    background: #dcefe2;
    color: var(--pc-green);
    font-size: .875rem;
    font-weight: 600;
}

.match-player-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem .375rem;
    max-width: 32rem;
}

.match-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .375rem;
    text-align: center;
}

.match-player-avatar {
    position: relative;
    display: grid;
    width: min(3.5rem, 100%);
    aspect-ratio: 1;
    overflow: hidden;
    place-items: center;
    border-radius: 50%;
    background: #dcefe2;
    color: var(--pc-green);
    font-size: 1.125rem;
    font-weight: 700;
}

.match-player-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-player-name {
    font-size: .875rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.match-player-empty .match-player-avatar {
    border: 1px dashed #81968a;
    background: #f7faf8;
}

.match-player-empty .match-player-name {
    color: #52635a;
}

.privacy-policy {
    max-width: 46rem;
    line-height: 1.65;
}

.player-profile-content {
    max-width: 68rem;
}

.player-profile-content .profile-cover {
    min-height: clamp(9rem, 24vw, 14rem);
}

.player-profile-content .profile-cover-default {
    background:
        linear-gradient(90deg, transparent 49.8%, #d9f5e34d 49.8% 50.2%, transparent 50.2%),
        linear-gradient(0deg, transparent 27%, #d9f5e34d 27% 28%, transparent 28% 72%, #d9f5e34d 72% 73%, transparent 73%),
        radial-gradient(ellipse at top right, #488d68, transparent 66%),
        linear-gradient(120deg, #142e28, #1a654d);
}

.profile-name-block {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-display-name {
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 750;
    letter-spacing: -.025em;
}

.profile-level-card {
    --level-accent: #14593e;
    --level-bg: #edf7ef;
    --level-border: #c4dfcb;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid var(--level-border);
    border-radius: 1rem;
    background: var(--level-bg);
    color: var(--level-accent);
}

.profile-level-card-pickleball {
    --level-accent: #244f85;
    --level-bg: #edf4fc;
    --level-border: #c9dcf1;
}

.profile-level-sport {
    margin-bottom: .4rem;
    font-size: .9375rem;
    font-weight: 700;
}

.profile-level-value {
    margin-bottom: 1rem;
    color: var(--pc-ink);
    font-size: clamp(1.5rem, 3.6vw, 2rem);
    font-weight: 750;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}

.profile-level-unset {
    font-size: 1.375rem;
}

.profile-level-action {
    --bs-btn-color: var(--level-accent);
    --bs-btn-bg: white;
    --bs-btn-border-color: var(--level-border);
    --bs-btn-hover-bg: var(--level-accent);
    --bs-btn-hover-color: white;
    --bs-btn-hover-border-color: var(--level-accent);
    margin-top: auto;
    font-weight: 600;
    border-radius: .65rem;
}

.profile-panel {
    border: 1px solid #dfe8e1;
    border-radius: 1rem;
    box-shadow: 0 4px 16px #162a210a;
}

.profile-facts {
    grid-template-columns: minmax(5rem, 30%) minmax(0, 1fr);
    padding: 1rem;
    border-radius: .75rem;
    background: #f6f9f6;
}

.profile-panel .profile-grid dd {
    overflow-wrap: anywhere;
}

.home-match-card { position: relative; }
.home-match-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.home-match-open:focus-visible { outline: 3px solid var(--match-accent, var(--pc-green)); outline-offset: 3px; }
.player-profile-link { text-decoration: none; }
.home-match-avatar.player-profile-link { z-index: 2; }
.player-profile-link:focus-visible { outline: 3px solid var(--pc-green); outline-offset: 3px; }
.player-profile-link:hover { box-shadow: 0 0 0 3px #69ac8870; }
.public-player-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.public-player-empty { padding: 2rem 1.5rem; border: 1px dashed #bdcfc3; border-radius: 1rem; background: #f6faf7; text-align: center; }

.profile-avatar-preview-trigger { display: block; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: zoom-in; }
.profile-avatar-preview-trigger:focus-visible { outline: 3px solid var(--pc-green); outline-offset: 4px; }
.avatar-preview-open { overflow: hidden; }
.avatar-preview { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 4.5rem 1rem 1.5rem; border: 0; background: transparent; overflow: auto; overscroll-behavior: contain; }
.avatar-preview[open] { display: flex; align-items: center; justify-content: center; }
.avatar-preview::backdrop { background: rgba(6, 18, 14, .94); }
.avatar-preview-image { display: block; max-width: min(100%, 50rem); max-height: calc(100dvh - 6rem); object-fit: contain; border-radius: .75rem; }
.avatar-preview-image[hidden] { display: none; }
.avatar-preview-close { position: absolute; top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid #ffffff70; border-radius: 50%; background: #ffffff20; color: white; font-size: 2rem; line-height: 1; }
.avatar-preview-close:focus-visible { outline: 3px solid white; outline-offset: 3px; }

.booking-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.booking-badges .booking-type, .booking-badges .booking-expired, .booking-badges .booking-cancelled { display: inline-flex; align-items: center; gap: .3rem; width: fit-content; padding: .25rem .6rem; border: 1px solid; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.2; }
.booking-badges svg { width: .875rem; height: .875rem; flex: 0 0 auto; }
.booking-badges .booking-type-private { color: #604193; background: #f2ebfa; border-color: #ddcfef; }
.booking-badges .booking-type-friendly { color: #245b96; background: #eaf3ff; border-color: #c9ddf3; }
.booking-badges .booking-type-public { color: #166044; background: #e9f6ee; border-color: #bedfc9; }
.booking-badges .booking-expired { color: #505e58; background: #edf0ee; border-color: #cdd5d0; }
.booking-badges .booking-cancelled { color: #9a3543; background: #fff0f2; border-color: #f0cbd1; }
.booking-item-expired { background: #f7f9f8; }
.booking-item-expired .booking-date-box { background: #e8edeb; color: #56665e; }

.booking-badges .booking-type span { color: inherit; }
