.public-topbar {
    min-height: 56px;
}

:root {
    --cm-mobile-nav-height: 64px;
}

.public-brand {
    text-decoration: none;
}

.public-brand .brand-copy {
    display: grid;
    gap: 1px;
}

.public-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.public-icon-button,
.public-balance,
.public-profile-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 19, 31, 0.78);
    color: #dce7f8;
    text-decoration: none;
}

.public-icon-button {
    position: relative;
    width: 42px;
}

.public-balance {
    position: relative;
    z-index: 5;
    gap: 8px;
    padding: 0 12px;
    color: #58a6ff;
    border-color: rgba(45, 126, 255, 0.82);
    background: rgba(3, 20, 47, 0.75);
    cursor: pointer;
}

.public-dot {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff3f68;
    box-shadow: 0 0 0 3px rgba(255, 63, 104, 0.15);
}

.public-notifications,
.public-profile-menu {
    position: relative;
}

.public-profile-button {
    gap: 10px;
    padding: 4px 10px 4px 5px;
    cursor: pointer;
}

.public-avatar,
.public-dropdown-avatar,
.spotlight-avatar {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #234477, #d04d7c);
    color: white;
    font-weight: 800;
}

.public-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
}

.public-avatar img,
.public-dropdown-avatar img,
.spotlight-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-copy {
    display: grid;
    line-height: 1.05;
    text-align: left;
}

.public-profile-copy small {
    color: #9fb0c7;
    margin-top: 3px;
}

.public-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    min-width: 210px;
    padding: 8px;
    border-radius: 12px;
    background: #121522;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

.public-dropdown-wide {
    width: min(360px, 88vw);
}

.public-notifications:hover .public-dropdown,
.public-notifications:focus-within .public-dropdown,
.public-profile-menu:hover .public-dropdown,
.public-profile-menu:focus-within .public-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.public-dropdown-item,
.public-dropdown-row,
.public-dropdown-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border-radius: 9px;
    border: 0;
    color: #dce7f8;
    background: transparent;
    text-align: left;
    text-decoration: none;
}

.public-dropdown-item:hover,
.public-dropdown-row:hover,
.public-dropdown-footer:hover {
    background: rgba(255, 255, 255, 0.06);
}

.public-dropdown-button {
    cursor: pointer;
    font: inherit;
}

.public-dropdown-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

.public-dropdown-row span:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.public-dropdown-row small {
    color: #8794a8;
    overflow-wrap: anywhere;
}

.public-dropdown-footer {
    justify-content: center;
    color: #8bbcff;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    margin-top: 4px;
}

.cm-line-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
}

.notifications-page-shell {
    width: min(820px, 100%);
    margin: 24px auto 70px;
}

.notifications-page-head {
    margin-bottom: 14px;
}

.notifications-page-head h1 {
    margin: 0;
    color: #fff;
    font-size: 1.45rem;
}

.notifications-list-panel {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #242431;
}

.notification-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #f2f6fb;
    text-decoration: none;
}

.notification-list-row:last-child {
    border-bottom: 0;
}

.notification-list-row:hover,
.notification-list-row.is-unread {
    background: rgba(38, 135, 255, 0.11);
}

.notification-list-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #151623;
    color: #fff;
    font-weight: 900;
}

.notification-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-list-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-list-copy strong {
    color: #fff;
}

.notification-list-copy small,
.notification-list-copy time,
.notifications-empty span {
    color: #aeb8c8;
}

.notifications-empty {
    display: grid;
    gap: 6px;
    padding: 34px 18px;
    color: #fff;
    text-align: center;
}

.cm-line-icon::before,
.cm-line-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.cm-line-icon-bell::before {
    width: 12px;
    height: 13px;
    left: 3px;
    top: 2px;
    border: 2px solid currentColor;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    border-bottom: 0;
}

.cm-line-icon-bell::after {
    width: 4px;
    height: 4px;
    left: 7px;
    bottom: 1px;
    border-radius: 999px;
    background: currentColor;
}

.cm-line-icon-money::before {
    inset: 3px 1px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.cm-line-icon-money::after {
    width: 5px;
    height: 5px;
    left: 6px;
    top: 6px;
    border-radius: 999px;
    border: 2px solid currentColor;
}

.cm-line-icon-home::before {
    width: 13px;
    height: 11px;
    left: 2px;
    bottom: 1px;
    border: 2px solid currentColor;
    border-top: 0;
}

.cm-line-icon-home::after {
    width: 12px;
    height: 12px;
    left: 3px;
    top: 0;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.cm-line-icon-user::before {
    width: 8px;
    height: 8px;
    left: 5px;
    top: 1px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.cm-line-icon-user::after {
    width: 14px;
    height: 8px;
    left: 2px;
    bottom: 1px;
    border: 2px solid currentColor;
    border-radius: 10px 10px 0 0;
}

.cm-line-icon-grid::before {
    width: 6px;
    height: 6px;
    left: 2px;
    top: 2px;
    border: 2px solid currentColor;
    border-radius: 2px;
    box-shadow:
        10px 0 0 -2px currentColor,
        0 10px 0 -2px currentColor,
        10px 10px 0 -2px currentColor;
}

.cm-line-icon-heart::before {
    width: 12px;
    height: 12px;
    left: 3px;
    top: 3px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    border-radius: 0 0 0 4px;
}

.cm-line-icon-mail::before {
    inset: 3px 1px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.cm-line-icon-mail::after {
    width: 11px;
    height: 11px;
    left: 3px;
    top: 2px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.cm-line-icon-search::before {
    width: 11px;
    height: 11px;
    left: 2px;
    top: 2px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.cm-line-icon-search::after {
    width: 8px;
    height: 2px;
    right: 2px;
    bottom: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: center;
}

.public-spotlight {
    margin-bottom: 24px;
}

.public-spotlight h2 {
    margin: 0 0 18px;
}

.spotlight-strip {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-height: 122px;
}

body.public-mode.home-page .content-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.home-spotlight-card {
    padding: 12px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-encounters-card {
    padding: 24px 0 0;
}

.home-spotlight-card .public-spotlight {
    margin: 0;
}

.home-spotlight-card .public-spotlight h2 {
    display: none;
}

.home-spotlight-card .spotlight-strip {
    align-items: center;
    gap: 14px;
    min-height: 74px;
    overflow-x: auto;
    padding: 6px 2px 8px;
}

.home-spotlight-card .spotlight-submit {
    width: 76px;
    gap: 6px;
}

.home-spotlight-card .spotlight-submit strong {
    max-width: 76px;
    overflow: hidden;
    color: #f7f9fd;
    font-size: 0.84rem;
    line-height: 1.12;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-spotlight-card .spotlight-avatar {
    width: 58px;
    height: 58px;
    box-shadow: 0 0 0 8px rgba(33, 75, 152, 0.32), 0 0 0 16px rgba(33, 75, 152, 0.12);
}

.home-spotlight-card .spotlight-plus {
    top: 12px;
    width: 22px;
    height: 22px;
    font-size: 1.15rem;
}

.home-spotlight-card .spotlight-label {
    bottom: 10px;
    font-size: 0.72rem;
}

.spotlight-submit {
    display: grid;
    justify-items: center;
    gap: 10px;
    color: #f2f6fb;
    text-decoration: none;
    width: 112px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.spotlight-avatar {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    box-shadow: 0 0 0 16px rgba(33, 75, 152, 0.42), 0 0 0 32px rgba(33, 75, 152, 0.18);
}

.spotlight-plus {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #4cb3ff;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
}

.spotlight-label {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    color: white;
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.public-mobile-nav {
    display: none;
}

@media (max-width: 860px) {
    .home-spotlight-card,
    .home-encounters-card {
        padding: 16px;
    }

    .home-encounters-card {
        padding-top: 22px;
    }

    .home-spotlight-card .public-spotlight {
        display: block;
    }

    .home-spotlight-card .spotlight-strip {
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    body.public-mode .public-shell {
        padding: 0 12px calc(var(--cm-mobile-nav-height) + 16px + env(safe-area-inset-bottom));
    }

    body.public-mode .public-topbar {
        position: sticky;
        top: 0;
        z-index: 35;
        min-height: 58px;
        padding: 8px 0;
        margin: 0;
        background: color-mix(in srgb, var(--navy) 78%, transparent);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        backdrop-filter: blur(16px);
    }

    body.public-mode .brand-mark {
        width: 34px;
        height: 34px;
    }

    body.public-mode .public-brand .brand-copy strong {
        font-size: 1rem;
    }

    .public-profile-copy {
        display: none;
    }

    .public-actions {
        gap: 8px;
    }

    .public-notifications .public-dropdown-wide {
        position: fixed;
        top: 68px;
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        width: auto;
        max-width: none;
        max-height: min(440px, calc(100vh - 92px - var(--cm-mobile-nav-height)));
        overflow-y: auto;
        transform: translateY(-4px);
    }

    .public-notifications:hover .public-dropdown-wide,
    .public-notifications:focus-within .public-dropdown-wide {
        transform: translateY(0);
    }

    .public-notifications .public-dropdown-row {
        align-items: flex-start;
    }

    .public-balance {
        padding: 0 9px;
    }

    .public-subnav {
        display: none;
    }

    .public-mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(var(--cm-mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
        background: #050710;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.38);
    }

    .public-mobile-nav a {
        position: relative;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        min-width: 0;
        border-radius: 10px;
        color: #f2f6fb;
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.1;
        text-align: center;
    }

    .public-mobile-nav .cm-line-icon {
        width: 20px;
        height: 20px;
    }

    .public-mobile-nav a.active,
    .public-mobile-nav a:hover {
        color: white;
        background: color-mix(in srgb, var(--accent) 30%, transparent);
    }

    .public-mobile-badge {
        position: absolute;
        top: 4px;
        right: 16%;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        color: white;
        background: var(--danger);
        font-size: 0.62rem;
        line-height: 1;
    }

    /* Reversible mobile nav experiment: remove public-mobile-nav-modern to restore the classic bar. */
    .public-mobile-nav-modern {
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(58px + env(safe-area-inset-bottom));
        padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 0;
        background: #02030a;
        box-shadow: none;
        backdrop-filter: none;
    }

    .public-mobile-nav-modern a {
        gap: 1px;
        border-radius: 0;
        color: #b8bfcc;
        transition: color 140ms ease, transform 140ms ease;
    }

    .public-mobile-nav-modern a .cm-line-icon {
        width: 25px;
        height: 25px;
    }

    .public-mobile-nav-modern a span:last-child {
        font-size: 0.67rem;
        letter-spacing: 0;
    }

    .public-mobile-nav-modern a.active,
    .public-mobile-nav-modern a:hover {
        color: #fff;
        background: transparent;
        box-shadow: none;
        transform: translateY(-1px);
    }

    .public-mobile-nav-modern a.active::before {
        content: "";
        position: absolute;
        top: 1px;
        left: 50%;
        width: 22px;
        height: 3px;
        border-radius: 999px;
        background: #fff;
        transform: translateX(-50%);
    }

    .public-mobile-nav-modern a.active .cm-line-icon,
    .public-mobile-nav-modern a:hover .cm-line-icon {
        color: #fff;
    }

    .public-mobile-nav-modern .public-mobile-badge {
        top: 3px;
        right: 18%;
        box-shadow: 0 0 0 3px #02030a;
    }
}

.core-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 20px;
}

.core-modal.is-open {
    display: grid;
}

.core-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 14, 0.72);
    backdrop-filter: blur(2px);
}

.core-modal-panel {
    position: relative;
    z-index: 1;
    width: min(500px, 94vw);
    border-radius: 8px;
    overflow: hidden;
    background: #20212b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.core-modal-header,
.core-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.12);
}

.core-modal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.core-modal-close {
    border: 0;
    background: transparent;
    color: #8c94a6;
    font-size: 1.8rem;
    cursor: pointer;
}

.core-modal-body {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.spotlight-photo-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.spotlight-photo-option input {
    position: absolute;
    opacity: 0;
}

.spotlight-photo-option span {
    display: block;
    width: 140px;
    height: 120px;
    overflow: hidden;
    border-radius: 4px;
    border: 3px solid transparent;
    background: #303140;
}

.spotlight-photo-option input:checked + span {
    border-color: #2687ff;
}

.spotlight-photo-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.core-field {
    display: grid;
    gap: 8px;
}

.core-field textarea {
    width: 100%;
    border: 0;
    border-radius: 4px;
    padding: 12px;
    color: #f4f6fb;
    background: #353647;
}

.core-field small {
    color: #a0a7b5;
}

.spotlight-price {
    color: #1ed331;
    font-weight: 800;
}
