:root {
    --bg: #f5efe5;
    --bg-soft: rgba(255, 248, 240, 0.7);
    --surface: rgba(255, 252, 247, 0.82);
    --surface-strong: rgba(255, 252, 247, 0.95);
    --surface-dark: #1f2831;
    --text: #1f2430;
    --text-soft: #5f6570;
    --brand: #a6352b;
    --brand-dark: #7b271f;
    --accent: #d9a441;
    --border: rgba(31, 36, 48, 0.12);
    --shadow: 0 24px 64px rgba(39, 26, 13, 0.16);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shell: min(1180px, calc(100vw - 2rem));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(217, 164, 65, 0.22), transparent 32%),
        radial-gradient(circle at top right, rgba(166, 53, 43, 0.18), transparent 30%),
        linear-gradient(180deg, #fbf6ee 0%, #f4ede3 52%, #efe4d5 100%);
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

.page-chrome {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 12%, rgba(217, 164, 65, 0.15), transparent 24%),
        radial-gradient(circle at 82% 0%, rgba(166, 53, 43, 0.11), transparent 18%);
    z-index: -1;
}

.site-shell {
    width: var(--shell);
    margin: 0 auto;
}

.page-shell {
    padding: 1.2rem 0 4.5rem;
}

.section {
    padding: 1.4rem 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(251, 246, 238, 0.75);
    border-bottom: 1px solid rgba(31, 36, 48, 0.08);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(166, 53, 43, 0.12), rgba(217, 164, 65, 0.15));
    border: 1px solid rgba(166, 53, 43, 0.08);
    box-shadow: 0 18px 36px rgba(166, 53, 43, 0.08);
}

.brand-mark img {
    width: 36px;
    height: 36px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-copy strong {
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.brand-copy small {
    color: var(--text-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link,
.nav-cta {
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    color: var(--text-soft);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-cta:hover,
.nav-link.is-active {
    transform: translateY(-1px);
    color: var(--text);
    background: rgba(255, 255, 255, 0.62);
}

.nav-cta {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 18px 32px rgba(123, 39, 31, 0.22);
}

.nav-cta:hover {
    color: white;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.nav-toggle {
    display: none;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(31, 36, 48, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.flash {
    width: var(--shell);
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    box-shadow: 0 12px 34px rgba(31, 36, 48, 0.06);
}

.flash p {
    margin: 0;
}

.flash-success {
    border-color: rgba(56, 138, 85, 0.3);
    background: rgba(232, 249, 238, 0.95);
}

.flash-error {
    border-color: rgba(166, 53, 43, 0.28);
    background: rgba(255, 240, 237, 0.95);
}

.flash-info {
    border-color: rgba(60, 96, 160, 0.25);
    background: rgba(239, 246, 255, 0.95);
}

.hero {
    padding: 2.4rem 0 1rem;
}

.hero-stage {
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 300px);
    gap: 1.1rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

.hero-copy,
.hero-brand-card,
.hero-radar,
.panel,
.stat-card,
.trip-card,
.member-card,
.list-card {
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-side {
    width: 100%;
    display: grid;
    align-content: start;
    gap: 1rem;
}

.hero-copy {
    width: 100%;
    padding: 3rem 2.8rem 2.7rem;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -70px -110px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 164, 65, 0.35), transparent 72%);
}

.hero-brand-card {
    padding: 1.15rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-brand-card::after {
    content: "";
    position: absolute;
    inset: auto -26px -34px auto;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 164, 65, 0.16), transparent 72%);
    pointer-events: none;
}

.hero-side-copy {
    display: grid;
    gap: 0.55rem;
    max-width: 18rem;
    margin: 0 auto;
}

.hero-side-copy .eyebrow {
    justify-self: center;
}

.hero-side-copy strong {
    font-family: "Fraunces", serif;
    font-size: 1.38rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-side-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.hero-mark {
    position: relative;
    justify-self: center;
    width: clamp(128px, 14vw, 156px);
    aspect-ratio: 1;
    padding: 1rem;
    margin: 0.1rem auto 0.2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28), transparent 34%),
        linear-gradient(145deg, rgba(166, 53, 43, 0.96), rgba(123, 39, 31, 1));
    border: 1px solid rgba(123, 39, 31, 0.2);
    box-shadow: 0 28px 52px rgba(123, 39, 31, 0.24);
    overflow: visible;
}

.hero-mark::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-mark::after {
    content: "";
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 53, 43, 0.18) 0%, rgba(166, 53, 43, 0.08) 44%, transparent 72%);
    z-index: -1;
}

.hero-mark img {
    width: 72%;
    height: 72%;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(166, 53, 43, 0.08);
    color: var(--brand);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.section-intro h1,
.panel-head h1,
.admin-header h1 {
    margin: 1rem 0 0.85rem;
    font-family: "Fraunces", serif;
    font-size: clamp(2.4rem, 4vw, 4.6rem);
    line-height: 0.97;
    letter-spacing: -0.04em;
}

.hero p,
.section-intro p,
.panel p,
.card-content p,
.member-bio,
.list-card p {
    color: var(--text-soft);
}

.hero-tagline {
    margin: 0 0 0.8rem;
    color: var(--brand);
    font-weight: 700;
    font-size: 1.08rem;
}

.hero-copy h1 {
    max-width: 11.4ch;
    font-size: clamp(3rem, 4.2vw, 4.6rem);
}

.hero-copy p {
    max-width: 56ch;
}

.hero-actions,
.trip-actions,
.form-actions,
.list-actions,
.panel-head,
.gallery-head,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: white;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(123, 39, 31, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 40px rgba(123, 39, 31, 0.24);
}

.button.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 28px rgba(31, 36, 48, 0.08);
}

.button.danger {
    background: linear-gradient(135deg, #a1302f, #7a2222);
}

.button.small {
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
}

.hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.trip-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.trip-actions .button {
    min-width: 10.5rem;
}

.hero-overview {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.hero-radar {
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
}

.hero-overview-head .panel-label {
    margin: 0;
}

.panel,
.stat-card,
.prose-card {
    padding: 1.5rem;
}

.panel-label {
    margin: 0 0 0.8rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 980px;
    margin: 0 auto;
}

.stat-card span {
    display: block;
    color: var(--text-soft);
    margin-bottom: 0.45rem;
}

.stat-card strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1;
}

.stat-card-hero {
    min-height: 100%;
    display: grid;
    align-content: center;
    padding: 1.05rem 1.05rem 1rem;
    text-align: left;
}

.stat-card-hero span {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.section-intro {
    max-width: 760px;
}

.section-intro h1 {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
}

.trip-grid,
.member-grid,
.gallery-grid,
.admin-grid,
.story-grid {
    display: grid;
    gap: 1rem;
}

.trip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-grid-news {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-grid-articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-grid-wide {
    grid-template-columns: 1fr;
}

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

.member-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-card,
.member-card,
.story-card,
.story-detail,
.spotlight-card {
    overflow: hidden;
}

.trip-card img,
.gallery-item img,
.story-thumb {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.trip-card-wide {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1fr);
}

.trip-card-wide img,
.trip-card-wide .media-placeholder {
    height: 100%;
}

.card-content {
    padding: 1.5rem;
}

.card-content h2,
.member-card h2,
.gallery-panel h2,
.panel-head h2,
.spotlight-card h2,
.list-card h3 {
    margin: 0.5rem 0;
    font-family: "Fraunces", serif;
    font-size: 1.55rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.card-title-link:hover,
.card-title-link:focus-visible {
    color: var(--brand);
}

.meta-row,
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.trip-route-stack {
    display: grid;
    gap: 0.95rem;
    margin-top: 1rem;
}

.trip-route-stack .route-preview {
    margin-top: 0;
}

.trip-card-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 36, 48, 0.08);
}

.participant-row {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 0.9rem;
}

.participant-label {
    color: var(--text-soft);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.participant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.participant-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.78rem;
    border-radius: 999px;
    background: rgba(166, 53, 43, 0.1);
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.participant-chip-link {
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.participant-chip-link:hover,
.participant-chip-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(166, 53, 43, 0.16);
    color: var(--brand);
}

.pill,
.action-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(31, 36, 48, 0.06);
    text-decoration: none;
}

.action-pill {
    background: rgba(166, 53, 43, 0.08);
    color: var(--brand);
}

.text-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.text-link:hover {
    text-decoration: underline;
}

.mini-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.gallery-trigger,
.trip-media-trigger,
.spotlight-media-trigger,
.mini-gallery-trigger,
.gallery-item-trigger,
.trip-detail-cover-trigger {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    color: inherit;
}

.trip-media-trigger,
.spotlight-media-trigger,
.mini-gallery-trigger,
.gallery-item-trigger,
.trip-detail-cover-trigger {
    display: block;
    overflow: hidden;
    border-radius: inherit;
}

.gallery-trigger:focus-visible,
.trip-media-trigger:focus-visible,
.spotlight-media-trigger:focus-visible,
.mini-gallery-trigger:focus-visible,
.gallery-item-trigger:focus-visible,
.trip-detail-cover-trigger:focus-visible {
    outline: 2px solid rgba(166, 53, 43, 0.45);
    outline-offset: 4px;
}

.mini-gallery img,
.gallery-edit-item img {
    border-radius: var(--radius-sm);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.mini-gallery-trigger,
.gallery-item-trigger {
    border-radius: var(--radius-sm);
}

.mini-gallery-image,
.gallery-item-image {
    width: 100%;
    border-radius: var(--radius-sm);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.24s ease;
}

.mini-gallery-trigger:hover .mini-gallery-image,
.gallery-item-trigger:hover .gallery-item-image,
.trip-media-trigger:hover .trip-media-image,
.spotlight-media-trigger:hover .spotlight-media-image,
.trip-detail-cover-trigger:hover .trip-detail-cover-image {
    transform: scale(1.03);
}

.member-card {
    padding: 1.6rem;
}

.member-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.member-card-link:hover,
.member-card-link:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(166, 53, 43, 0.18);
    box-shadow: 0 28px 52px rgba(39, 26, 13, 0.2);
}

.member-slide {
    flex: 0 0 min(300px, 82vw);
    text-align: center;
}

.member-slide .avatar-wrap {
    margin-left: auto;
    margin-right: auto;
}

.member-card-wide {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    gap: 1.2rem;
}

.member-card-wide .card-content,
.member-profile-card .card-content {
    padding: 0;
}

.avatar-wrap {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 1 / 1;
    margin-bottom: 1rem;
}

.member-card-wide .avatar-wrap {
    margin-bottom: 0;
}

.avatar-wrap img,
.avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(166, 53, 43, 0.16), rgba(217, 164, 65, 0.26));
    color: var(--brand-dark);
    font-family: "Fraunces", serif;
    font-size: 3rem;
}

.member-tagline {
    margin: 0;
    color: var(--brand);
    font-weight: 700;
}

.member-bio {
    margin-bottom: 0;
}

.member-card-meta {
    margin-top: 1rem;
}

.spotlight-card {
    display: grid;
    gap: 1rem;
}

.spotlight-card img,
.spotlight-media-image {
    width: 100%;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.trip-media-trigger {
    display: block;
    border-radius: inherit;
}

.trip-media-trigger-wide {
    height: 100%;
}

.trip-media-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.trip-media-trigger-wide .trip-media-image {
    height: 100%;
}

.spotlight-media-trigger {
    border-radius: var(--radius-lg);
}

.trip-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: stretch;
}

.trip-detail-copy,
.trip-detail-media {
    min-height: 100%;
}

.trip-detail-copy h1 {
    margin: 0.9rem 0 0.8rem;
    font-family: "Fraunces", serif;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.trip-detail-meta {
    margin-bottom: 1rem;
}

.trip-detail-description {
    margin: 0;
    font-size: 1.02rem;
}

.trip-detail-media {
    display: grid;
    align-items: stretch;
}

.trip-detail-cover-trigger {
    display: block;
    height: 100%;
    border-radius: calc(var(--radius-xl) - 2px);
}

.trip-detail-cover-image {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    border-radius: calc(var(--radius-xl) - 2px);
}

.trip-detail-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trip-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.trip-stage-card {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    align-content: start;
}

.trip-stage-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
}

.trip-stage-head h2 {
    margin: 0.35rem 0 0;
    font-family: "Fraunces", serif;
    font-size: 1.7rem;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.trip-stage-meta {
    margin-top: -0.15rem;
}

.trip-stage-swatch {
    width: 18px;
    height: 72px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.trip-stage-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.trip-stage-stat {
    padding: 1rem 1.05rem;
    min-height: 0;
}

.trip-stage-actions {
    justify-content: flex-start;
    margin-top: 0.15rem;
}

.route-preview-stage {
    margin-top: 0;
    grid-template-columns: 1fr;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.58);
    justify-items: stretch;
}

.route-preview-stage .route-preview-map {
    min-height: 156px;
}

.route-preview-stage .route-preview-stats {
    gap: 0.55rem;
}

.route-preview-stage .route-preview-stats strong {
    font-size: 0.96rem;
}

.route-preview-stage .route-preview-stats small {
    font-size: 0.8rem;
}

.route-preview-stage .route-preview-copy {
    gap: 0.5rem;
}

.elevation-profile {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem 1rem 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.elevation-profile-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.elevation-profile-range {
    color: var(--text-soft);
    font-size: 0.86rem;
}

.elevation-profile-chart {
    overflow: hidden;
    border-radius: calc(var(--radius-md) - 4px);
    background:
        radial-gradient(circle at 15% 20%, rgba(217, 164, 65, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 238, 228, 0.9));
}

.elevation-profile-chart svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 760 / 186;
}

.elevation-profile-grid {
    stroke: rgba(31, 36, 48, 0.08);
    stroke-width: 1;
}

.elevation-profile-divider {
    stroke: rgba(31, 36, 48, 0.14);
    stroke-width: 1.2;
    stroke-dasharray: 5 8;
}

.elevation-profile-fill {
    opacity: 0.14;
}

.elevation-profile-line-shadow {
    fill: none;
    stroke: rgba(123, 39, 31, 0.18);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.elevation-profile-line {
    fill: none;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.elevation-profile-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.elevation-profile-footer span:last-child {
    text-align: right;
}

.elevation-profile-stage {
    padding-top: 0.85rem;
}

.elevation-profile-modal {
    margin: 0;
}

.route-preview {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.route-preview-map {
    position: relative;
    overflow: hidden;
    min-height: 120px;
    border-radius: calc(var(--radius-md) - 4px);
    background:
        radial-gradient(circle at 20% 18%, rgba(217, 164, 65, 0.15), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 233, 220, 0.9));
}

.route-preview-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: zoom-in;
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.route-preview-map svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.route-preview-open-hint {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.9);
    color: var(--brand-dark);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(31, 36, 48, 0.12);
}

.route-preview-open:hover .route-preview-open-hint,
.route-preview-open:focus-visible .route-preview-open-hint {
    background: rgba(255, 248, 240, 0.98);
}

.route-preview-open:focus-visible {
    outline: 2px solid rgba(139, 61, 43, 0.45);
    outline-offset: -2px;
}

.route-preview-tile {
    image-rendering: auto;
}

.route-preview-map-wash {
    fill: rgba(255, 249, 241, 0.2);
}

.route-preview-track-shadow {
    fill: none;
    stroke: rgba(123, 39, 31, 0.24);
    stroke-width: 5.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.route-preview-track {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.route-preview-attribution {
    position: absolute;
    right: 0.45rem;
    bottom: 0.35rem;
    z-index: 2;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.74);
    color: rgba(31, 36, 48, 0.62);
    font-size: 0.62rem;
    line-height: 1.2;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.route-preview-attribution:hover,
.route-preview-attribution:focus-visible {
    color: var(--brand);
}

.route-preview-copy {
    display: grid;
    gap: 0.65rem;
}

.route-preview-copy .panel-label {
    margin: 0;
}

.route-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.route-preview-stats span {
    display: grid;
    gap: 0.12rem;
}

.route-preview-stats strong {
    font-size: 1rem;
    line-height: 1.15;
}

.route-preview-stats small {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.route-preview-compact {
    grid-template-columns: minmax(112px, 138px) minmax(0, 1fr);
    padding: 0.9rem;
}

.route-preview-compact .route-preview-map {
    min-height: 98px;
}

.route-preview-detail {
    margin-top: 1.2rem;
}

.route-preview-gallery {
    margin: 0 0 1rem;
}

.headline-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.headline-stack-compact {
    grid-template-columns: 1fr;
}

.hero-radar .headline-item {
    min-height: 0;
    padding: 0.9rem;
}

.headline-item {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    align-content: start;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(31, 36, 48, 0.08);
    border-radius: var(--radius-md);
    transition: transform 0.18s ease, background 0.18s ease;
}

.headline-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.86);
}

.headline-item.static {
    cursor: default;
}

.headline-item.static:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.6);
}

.headline-meta,
.story-type {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    font-weight: 700;
}

.headline-item strong {
    font-family: "Fraunces", serif;
    font-size: 1.15rem;
    line-height: 1.1;
}

.headline-item small {
    color: var(--text-soft);
}

.story-card {
    display: grid;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 52px rgba(39, 26, 13, 0.18);
}

.story-card-featured {
    grid-template-rows: auto 1fr;
}

.dashboard-note h3 {
    margin: 0 0 0.6rem;
    font-family: "Fraunces", serif;
    font-size: 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.dashboard-note p {
    margin: 0;
}

.story-detail {
    display: grid;
    gap: 1.25rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.story-detail-head {
    max-width: 860px;
}

.story-detail-head h1 {
    margin: 1rem 0 0.7rem;
    font-family: "Fraunces", serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.story-detail-summary {
    font-size: 1.1rem;
    color: var(--text-soft);
}

.story-detail-image {
    width: 100%;
    border-radius: var(--radius-xl);
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.story-content {
    padding: 1.6rem;
}

.story-content p {
    margin: 0 0 1rem;
    color: var(--text);
}

.story-content p:last-child {
    margin-bottom: 0;
}

.member-hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1.25rem;
}

.member-hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -72px -92px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 164, 65, 0.16), transparent 72%);
    pointer-events: none;
}

.member-hero-main {
    display: grid;
    grid-template-columns: 170px minmax(260px, 540px);
    gap: 1.6rem;
    align-items: center;
    justify-content: start;
    min-width: 0;
}

.avatar-wrap-large {
    max-width: 210px;
    margin-bottom: 0;
}

.member-hero-copy {
    display: grid;
    align-content: center;
    gap: 0.35rem;
    min-width: 0;
}

.member-hero-copy h1 {
    margin: 0.35rem 0 0.2rem;
    font-family: "Fraunces", serif;
    font-size: clamp(2.2rem, 3.6vw, 3.5rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.member-hero-copy .member-tagline {
    font-size: 1rem;
}

.member-bio-large {
    max-width: 44ch;
    font-size: 1.02rem;
    line-height: 1.72;
}

.member-hero-stats .stat-card,
.member-stat-card {
    padding: 1.15rem 1.15rem 1rem;
    min-height: 0;
    text-align: left;
}

.member-hero-stats .stat-card strong,
.member-stat-card strong {
    font-size: clamp(1.7rem, 2.5vw, 2.25rem);
}

.member-hero-note {
    display: grid;
    gap: 0.8rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.member-hero-note p {
    margin: 0;
}

.members-carousel {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 0.2rem 0 0.5rem;
}

.members-carousel::-webkit-scrollbar {
    display: none;
}

.member-strip {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding-right: 0;
}

.member-slider {
    display: grid;
    gap: 1rem;
}

.member-slide {
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.member-strip > .member-slide:last-child {
    scroll-snap-align: end;
}

.member-slide.is-visible {
    transform: translateY(-4px);
    border-color: rgba(166, 53, 43, 0.2);
    box-shadow: 0 28px 52px rgba(39, 26, 13, 0.2);
}

.member-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}

.member-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 36, 48, 0.18);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, width 0.18s ease;
}

.member-dot:hover {
    transform: scale(1.12);
    background: rgba(166, 53, 43, 0.35);
}

.member-dot.is-active {
    width: 28px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.media-placeholder,
.empty-state {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(166, 53, 43, 0.08), rgba(217, 164, 65, 0.18));
    color: var(--text-soft);
    text-align: center;
}

.empty-state.compact {
    min-height: 150px;
}

.gallery-stack {
    display: grid;
    gap: 1rem;
}

.gallery-panel {
    padding: 1.4rem;
}

.gallery-head {
    margin-bottom: 1rem;
    align-items: flex-start;
}

.gallery-head-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
    margin: 0;
    overflow: hidden;
}

.gallery-item img {
    border-radius: var(--radius-md);
    box-shadow: 0 20px 42px rgba(31, 36, 48, 0.12);
}

.admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-stats {
    margin-top: 1rem;
}

.panel-head {
    margin-bottom: 1rem;
}

.admin-list {
    display: grid;
    gap: 0.85rem;
}

.list-card {
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.list-card-copy p {
    margin: 0;
}

.list-actions form {
    margin: 0;
}

.form-panel {
    padding: 1.5rem;
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field > span {
    font-weight: 700;
}

.field-hint {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.stage-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.stage-editor-head > div {
    display: grid;
    gap: 0.35rem;
}

.stage-editor-head > div > span {
    font-weight: 700;
}

.stage-editor {
    display: grid;
    gap: 1rem;
}

.stage-editor-list {
    display: grid;
    gap: 1rem;
}

.stage-editor-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.stage-editor-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.stage-editor-card-head strong {
    font-family: "Fraunces", serif;
    font-size: 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.stage-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    color: var(--text-soft);
    font-size: 0.93rem;
}

.stage-editor-meta a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.stage-editor-meta a:hover,
.stage-editor-meta a:focus-visible {
    text-decoration: underline;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 36, 48, 0.14);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 2px solid rgba(166, 53, 43, 0.24);
    border-color: rgba(166, 53, 43, 0.3);
}

.inline-error {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 239, 235, 0.95);
    border: 1px solid rgba(166, 53, 43, 0.2);
    color: var(--brand-dark);
}

small.inline-error {
    padding: 0;
    background: transparent;
    border: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    min-height: 86px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.checkbox-card input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    padding: 0;
    flex: 0 0 1.05rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    accent-color: var(--brand);
}

.checkbox-card span {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.checkbox-card strong {
    line-height: 1.2;
}

.checkbox-card small {
    color: var(--text-soft);
    line-height: 1.35;
}

.asset-row,
.asset-preview,
.gallery-edit-grid {
    display: grid;
    gap: 1rem;
}

.asset-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-preview {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.asset-preview img {
    width: 100%;
    max-width: 220px;
    border-radius: 18px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.asset-preview-file {
    align-content: start;
}

.asset-preview-file {
    align-content: start;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.checkbox-row input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    accent-color: var(--brand);
}

.gallery-edit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-edit-item {
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(31, 36, 48, 0.08);
}

.admin-auth {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(540px, 100%);
    padding: 2rem;
}

.site-footer {
    padding: 1rem 0 2rem;
}

.footer-shell {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(14, 16, 22, 0.86);
    cursor: zoom-out;
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 2rem 5rem;
    display: grid;
    place-items: center;
}

.lightbox-figure {
    margin: 0;
    display: grid;
    gap: 1rem;
    max-width: min(1240px, calc(100vw - 8rem));
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 28px;
    box-shadow: 0 36px 82px rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
    color: rgba(255, 248, 240, 0.94);
    text-align: center;
    font-size: 0.98rem;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
}

.lightbox-nav {
    top: 50%;
    margin-top: -27px;
    font-size: 2rem;
}

.lightbox-nav-prev {
    left: 1.5rem;
}

.lightbox-nav-next {
    right: 1.5rem;
}

.lightbox-nav[disabled] {
    opacity: 0.35;
    cursor: default;
}

body.lightbox-open,
body.route-modal-open {
    overflow: hidden;
}

.route-map-modal {
    position: fixed;
    inset: 0;
    z-index: 125;
}

.route-map-modal[hidden] {
    display: none;
}

.route-map-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(12, 14, 20, 0.84);
    cursor: zoom-out;
}

.route-map-modal-dialog {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 1.5rem;
    display: grid;
    place-items: center;
}

.route-map-modal-shell {
    position: relative;
    width: min(1180px, calc(100vw - 3rem));
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 30px;
    background: rgba(255, 249, 241, 0.98);
    box-shadow: 0 36px 82px rgba(0, 0, 0, 0.34);
}

.route-map-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 3.5rem;
}

.route-map-modal-copy {
    display: grid;
    gap: 0.35rem;
}

.route-map-modal-copy h2 {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.route-map-modal-meta {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.98rem;
}

.route-map-modal-canvas {
    width: 100%;
    height: min(72vh, 720px);
    min-height: min(72vh, 720px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(31, 36, 48, 0.08);
    overscroll-behavior: contain;
}

.route-map-modal-mapstack {
    position: relative;
    width: 100%;
}

.route-map-modal-empty {
    margin: 0;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-soft);
}

.route-map-modal-profile {
    position: absolute;
    left: 1rem;
    right: auto;
    bottom: 1rem;
    z-index: 460;
    width: min(430px, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    display: grid;
    gap: 0.75rem;
    pointer-events: none;
}

.route-map-modal-profile[hidden] {
    display: none;
}

.route-map-modal-profile .elevation-profile {
    gap: 0.5rem;
    padding: 0.72rem 0.82rem 0.68rem;
    background: rgba(255, 252, 247, 0.76);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 20px 44px rgba(31, 36, 48, 0.18);
    backdrop-filter: blur(14px);
}

.route-map-modal-profile .elevation-profile-head {
    gap: 0.45rem;
}

.route-map-modal-profile .panel-label {
    font-size: 0.68rem;
}

.route-map-modal-profile .elevation-profile-range,
.route-map-modal-profile .elevation-profile-footer {
    font-size: 0.72rem;
}

.route-map-modal-profile .elevation-profile-chart {
    border-radius: 12px;
}

.route-map-modal-profile .elevation-profile-chart svg {
    aspect-ratio: 760 / 98;
}

.route-map-modal-profile .elevation-profile-fill {
    opacity: 0.18;
}

.route-map-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 36, 48, 0.08);
    color: var(--text);
    font-size: 1.9rem;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.route-map-modal-close:hover,
.route-map-modal-close:focus-visible {
    transform: translateY(-1px);
    background: rgba(31, 36, 48, 0.12);
}

@media (max-width: 1080px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-side {
        grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
        align-items: start;
    }

    .split-layout,
    .trip-card-wide,
    .admin-grid,
    .member-grid-wide,
    .trip-detail-hero {
        grid-template-columns: 1fr;
    }

    .trip-grid,
    .member-grid,
    .story-grid-news {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story-grid-articles {
        grid-template-columns: 1fr;
    }

    .member-hero-main {
        grid-template-columns: minmax(160px, 190px) minmax(260px, 1fr);
    }

    .trip-stage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        position: relative;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.8rem);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border-radius: 24px;
        background: rgba(255, 252, 247, 0.98);
        border: 1px solid rgba(31, 36, 48, 0.08);
        box-shadow: 0 24px 48px rgba(31, 36, 48, 0.12);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link,
    .nav-cta {
        width: 100%;
        text-align: center;
    }

    .hero-overview,
    .stats-grid,
    .trip-grid,
    .trip-stage-stats,
    .member-grid,
    .gallery-grid,
    .story-grid-news,
    .story-grid-articles,
    .checkbox-grid,
    .form-grid,
    .asset-row,
    .gallery-edit-grid,
    .trip-detail-gallery {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .route-preview,
    .member-hero-main {
        grid-template-columns: 1fr;
    }

    .elevation-profile-head {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .elevation-profile-footer {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .elevation-profile-footer span:last-child {
        text-align: left;
    }

    .route-map-modal-profile .elevation-profile-head {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .route-map-modal-profile .elevation-profile-footer {
        flex-direction: row;
        width: 100%;
        align-items: center;
    }

    .trip-stage-head {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 0.7rem;
    }

    .trip-stage-swatch {
        width: 72px;
        height: 16px;
    }

    .trip-stage-meta {
        justify-content: center;
        text-align: center;
    }

    .trip-stage-actions {
        justify-content: center;
    }

    .trip-stage-actions .button {
        width: min(100%, 320px);
    }

    .route-preview-stage {
        text-align: left;
    }

    .mini-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-card,
    .list-actions,
    .footer-shell,
    .gallery-head,
    .admin-header,
    .hero-actions,
    .trip-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trip-actions .button {
        min-width: 0;
    }

    .avatar-wrap-large {
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }

    .route-preview-map {
        max-width: none;
        width: 100%;
    }

    .member-hero-main {
        text-align: center;
    }

    .member-hero-copy {
        justify-items: center;
    }

    .member-bio-large {
        max-width: 38ch;
    }

    .lightbox-dialog {
        padding: 1.5rem 4rem;
    }

    .lightbox-figure {
        max-width: min(100vw - 4rem, 100%);
    }

    .route-map-modal-dialog {
        padding: 1rem;
    }

    .route-map-modal-shell {
        width: min(100vw - 2rem, 100%);
    }

    .route-map-modal-canvas {
        height: 62vh;
        min-height: 62vh;
    }

    .stage-editor-head,
    .stage-editor-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-copy {
        padding: 2.2rem 1.2rem 1.2rem;
    }
}

@media (max-width: 620px) {
    .site-shell {
        width: min(100vw - 1rem, 100%);
    }

    .hero h1,
    .section-intro h1,
    .panel-head h1,
    .admin-header h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .member-card-wide {
        grid-template-columns: 1fr;
    }

    .member-hero-panel {
        padding: 1.2rem;
    }

    .card-content,
    .member-card,
    .hero-brand-card,
    .hero-radar,
    .panel,
    .stat-card,
    .form-panel,
    .story-detail {
        padding: 1.15rem;
    }

    .lightbox-dialog {
        padding: 1rem;
    }

    .lightbox-figure {
        max-width: calc(100vw - 1rem);
    }

    .lightbox-image {
        max-height: calc(100vh - 8rem);
        border-radius: 20px;
    }

    .lightbox-close,
    .lightbox-nav {
        width: 46px;
        height: 46px;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .lightbox-nav {
        top: auto;
        bottom: 1.2rem;
        margin-top: 0;
    }

    .lightbox-nav-prev {
        left: 0.75rem;
    }

    .lightbox-nav-next {
        right: 0.75rem;
    }

    .route-map-modal-shell {
        padding: 1rem;
        border-radius: 22px;
    }

    .route-map-modal-head {
        padding-right: 2.75rem;
    }

    .route-map-modal-canvas {
        height: 56vh;
        min-height: 56vh;
        border-radius: 18px;
    }

    .route-map-modal-profile {
        left: 0.65rem;
        right: 0.65rem;
        bottom: 0.65rem;
        width: auto;
        max-width: none;
    }

    .route-map-modal-profile .elevation-profile {
        gap: 0.36rem;
        padding: 0.56rem 0.62rem 0.52rem;
        border-radius: 14px;
    }

    .route-map-modal-profile .elevation-profile-chart svg {
        aspect-ratio: 760 / 84;
    }

    .route-map-modal-profile .panel-label {
        font-size: 0.64rem;
    }

    .route-map-modal-profile .elevation-profile-range,
    .route-map-modal-profile .elevation-profile-footer {
        font-size: 0.68rem;
    }

    .route-preview-map {
        min-height: 132px;
    }

    .route-map-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 46px;
        height: 46px;
        font-size: 1.7rem;
    }
}
