:root {
    --site-header-color: #102f35;
    --site-header-background: var(--site-header-color);
    --ink: #17191c;
    --muted: #8d949b;
    --paper: #f4f5f7;
    --card: #ffffff;
    --line: rgba(23, 25, 28, 0.08);
    --shadow: 0 20px 60px rgba(38, 45, 52, 0.08);
    --shadow-strong: 0 26px 80px rgba(38, 45, 52, 0.14);
}

* { box-sizing: border-box; }
html {
    min-width: 320px;
    overflow-y: scroll;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    background: var(--site-header-color);
}
html::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 21;
    height: env(safe-area-inset-top, 0px);
    background: var(--site-header-color);
    pointer-events: none;
}
body {
    position: relative;
    isolation: isolate;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--site-header-color);
}

.infinite-scroll-sentinel {
    min-height: 1px;
}

.infinite-scroll-loader {
    min-height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.infinite-scroll-sentinel.is-loading .infinite-scroll-loader {
    display: flex;
}

.infinite-scroll-sentinel.is-complete {
    display: none;
}

.infinite-scroll-spinner {
    width: 19px;
    height: 19px;
    border: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: infinite-scroll-spin .72s linear infinite;
}

@keyframes infinite-scroll-spin {
    to {
        transform: rotate(1turn);
    }
}

@media (prefers-reduced-motion: reduce) {
    .infinite-scroll-spinner {
        animation-duration: 1.5s;
    }
}
body::after {
    content: "";
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.95), transparent 34%),
        linear-gradient(180deg, #f7f8fa 0%, var(--paper) 100%);
    pointer-events: none;
}
body.photo-modal-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

.site-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px;
    background: var(--site-header-background);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 16px 36px rgba(10, 23, 28, .18);
}
.site-topbar-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
}
.site-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}
.site-brand img {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
.site-brand span {
    overflow: hidden;
    font-size: 22px;
    font-weight: 880;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 780;
}
.site-back-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 780;
}
.site-nav a:hover,
.site-back-link:hover {
    background: rgba(255, 255, 255, .16);
}
.site-brand:focus-visible,
.site-nav a:focus-visible,
.site-back-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.28);
    outline-offset: 3px;
}

.portal-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: calc(92px + env(safe-area-inset-top, 0px)) 0 56px;
}

.topbar {
    min-height: 54px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding: 8px 10px 8px 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand-mark,
.quick-nav a,
.feature-card-link,
.card-link,
.map-peek,
.social-card {
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    font-size: clamp(22px, 2.1vw, 26px);
    font-weight: 850;
    line-height: 1.05;
}
.quick-nav { display: flex; gap: 8px; }
.quick-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 760;
}

.portal-layout-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 116px;
    gap: 18px;
    grid-auto-flow: row dense;
}

.portal-layout-block {
    min-width: 0;
    min-height: 0;
}

.profile-card,
.hello-card,
.social-card,
.map-peek,
.feature-card,
.photo-library-card,
.blog-latest-card,
.blog-empty-card,
.updates-panel,
.section-header-card,
.topbar {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.portal-block-header { min-height: 54px; }
