:root {
    --secondary-yellow: #f5c84b;
    --secondary-bg: #101827;
    --secondary-panel: rgba(10, 18, 32, 0.9);
    --secondary-panel-soft: rgba(17, 29, 49, 0.78);
    --secondary-line: rgba(255, 255, 255, 0.14);
    --secondary-text: #f8fafc;
    --secondary-muted: rgba(226, 232, 240, 0.72);
}

html body.ui-v3 {
    color: var(--secondary-text) !important;
    background: #101827 !important;
    background-image: none !important;
}

html body.ui-v3.theme-light {
    --secondary-panel: rgba(255, 255, 255, 0.92);
    --secondary-panel-soft: rgba(248, 250, 252, 0.9);
    --secondary-line: rgba(15, 23, 42, 0.14);
    --secondary-text: #111827;
    --secondary-muted: #526075;
    background: #eef3f8 !important;
    background-image: none !important;
}

body.ui-v3 .secondary-page-header {
    position: sticky !important;
    top: 0 !important;
    min-height: 74px !important;
    padding: 8px max(16px, calc((100vw - 1180px) / 2)) !important;
    border-bottom: 1px solid var(--secondary-line) !important;
    background: rgba(8, 13, 23, 0.91) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
}

body.ui-v3.theme-light .secondary-page-header {
    background: rgba(255, 255, 255, 0.91) !important;
}

body.ui-v3 .secondary-page-header .brand-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 !important;
}

body.ui-v3 .secondary-logo-frame {
    display: block !important;
    flex: 0 0 190px !important;
    width: 190px !important;
    height: 43px !important;
    overflow: hidden !important;
}

body.ui-v3 .secondary-page-header .brand-link .secondary-logo-frame .logo {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
}

body.ui-v3 .secondary-page-header .title-wrap {
    position: static !important;
    display: block !important;
    padding: 0 !important;
}

body.ui-v3 .secondary-page-header .brand-slogan {
    color: var(--secondary-muted) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

body.ui-v3:not(.force-mobile) .secondary-page-header .header-btn,
body.ui-v3:not(.force-mobile) .secondary-page-header #settings-toggle {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

body.ui-v3:not(.force-mobile) .secondary-page-header #settings-toggle {
    width: 42px !important;
    border-color: rgba(245, 200, 75, 0.58) !important;
    background: rgba(245, 200, 75, 0.14) !important;
    color: var(--secondary-yellow) !important;
}

body.ui-v3 .settings-panel {
    border: 1px solid var(--secondary-line) !important;
    border-radius: 8px !important;
    background: var(--secondary-panel) !important;
    color: var(--secondary-text) !important;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28) !important;
}

body.ui-v3.about-view .about-page,
body.ui-v3 .wrap {
    width: min(1120px, calc(100% - 32px)) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 28px 0 64px !important;
}

body.ui-v3.about-view .about-stack {
    gap: 18px !important;
}

body.ui-v3.about-view .about-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr) !important;
    gap: 28px !important;
    padding: 30px !important;
    border: 1px solid var(--secondary-line) !important;
    border-radius: 8px !important;
    background: var(--secondary-panel) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24) !important;
}

body.ui-v3.about-view .about-hero h1 {
    margin: 15px 0 14px !important;
    font-size: clamp(2.2rem, 4vw, 4rem) !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

body.ui-v3.about-view .about-lead,
body.ui-v3.about-view .about-section-heading p,
body.ui-v3.about-view .about-pillar p,
body.ui-v3.about-view .about-panel p,
body.ui-v3.about-view .about-cta p {
    color: var(--secondary-muted) !important;
}

body.ui-v3.about-view .about-eyebrow {
    min-height: 28px !important;
    border-radius: 6px !important;
    color: var(--secondary-yellow) !important;
}

body.ui-v3.about-view .about-btn,
body.ui-v3 .btn {
    border-radius: 7px !important;
}

body.ui-v3.about-view .about-metric,
body.ui-v3.about-view .about-visual-card,
body.ui-v3.about-view .about-pillar,
body.ui-v3.about-view .about-panel,
body.ui-v3.about-view .about-cta,
body.ui-v3.about-view .about-quality-item,
body.ui-v3.about-view .about-note {
    border: 1px solid var(--secondary-line) !important;
    border-radius: 8px !important;
    background: var(--secondary-panel-soft) !important;
    box-shadow: none !important;
}

body.ui-v3.about-view .about-sign.type-hiking,
body.ui-v3.about-view .about-sign.type-mountain,
body.ui-v3.about-view .about-sign.type-alpine {
    background: #f5d766 !important;
    color: #111827 !important;
}

body.ui-v3.about-view .about-feature-logo {
    display: block !important;
    width: min(100%, 330px) !important;
    height: 92px !important;
    margin: 2px auto 4px !important;
    object-fit: cover !important;
    object-position: center !important;
    filter: drop-shadow(0 14px 22px rgba(2, 6, 23, 0.2));
}

body.ui-v3.about-view .about-visual-head {
    grid-template-columns: 1fr !important;
    text-align: center;
}

body.ui-v3 .wrap {
    display: grid !important;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

body.ui-v3 .wrap > .card:first-child,
body.ui-v3 #guestbook-form {
    grid-column: 1 !important;
}

body.ui-v3 #guestbook-form {
    margin-top: 0 !important;
}

body.ui-v3 .entries {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    margin-top: 0 !important;
    gap: 10px !important;
}

body.ui-v3 .card,
body.ui-v3 .entry,
body.ui-v3.theme-light .card,
body.ui-v3.theme-light .entry {
    border: 1px solid var(--secondary-line) !important;
    border-radius: 8px !important;
    background: var(--secondary-panel) !important;
    color: var(--secondary-text) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18) !important;
}

body.ui-v3 .card {
    padding: 22px !important;
}

body.ui-v3 .entry {
    position: relative !important;
    padding: 16px 18px 16px 24px !important;
    line-height: 1.55 !important;
}

body.ui-v3 .entry::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--secondary-yellow);
}

body.ui-v3 .entry .meta,
body.ui-v3 .subtitle,
body.ui-v3.theme-light .entry .meta,
body.ui-v3.theme-light .subtitle {
    color: var(--secondary-muted) !important;
}

body.ui-v3 input,
body.ui-v3 textarea,
body.ui-v3.theme-light input,
body.ui-v3.theme-light textarea {
    border-radius: 7px !important;
    border-color: var(--secondary-line) !important;
    background: var(--secondary-panel-soft) !important;
    color: var(--secondary-text) !important;
}

@media (max-width: 900px) {
    body.ui-v3 .secondary-page-header {
        min-height: 62px !important;
        padding: max(7px, env(safe-area-inset-top)) 10px 7px !important;
    }

    body.ui-v3 .secondary-logo-frame {
        flex-basis: 145px !important;
        width: 145px !important;
        height: 33px !important;
    }

    body.ui-v3 .secondary-page-header .title-wrap {
        display: none !important;
    }

    body.ui-v3 .secondary-page-header .header-btn {
        display: none !important;
    }

    body.ui-v3.about-view .about-page,
    body.ui-v3 .wrap {
        width: min(100%, calc(100% - 20px)) !important;
        padding: 14px 0 42px !important;
    }

    body.ui-v3.about-view .about-hero,
    body.ui-v3.about-view .about-grid,
    body.ui-v3.about-view .about-cta,
    body.ui-v3.about-view .about-pillars,
    body.ui-v3 .wrap {
        grid-template-columns: 1fr !important;
    }

    body.ui-v3.about-view .about-hero {
        padding: 20px !important;
    }

    body.ui-v3.about-view .about-feature-logo {
        width: min(100%, 280px) !important;
        height: 76px !important;
    }

    body.ui-v3 .wrap > .card:first-child,
    body.ui-v3 #guestbook-form,
    body.ui-v3 .entries {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

/* Override legacy forced-view header rules from secondary-pages.css. */
html body.ui-v3 header.secondary-page-header .brand-link,
html body.ui-v3.force-mobile header.secondary-page-header .brand-link,
html body.ui-v3:not(.force-mobile) header.secondary-page-header .brand-link {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: none !important;
    gap: 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body.ui-v3 header.secondary-page-header .secondary-logo-frame,
html body.ui-v3.force-mobile header.secondary-page-header .secondary-logo-frame,
html body.ui-v3:not(.force-mobile) header.secondary-page-header .secondary-logo-frame {
    position: relative !important;
    display: block !important;
    flex: 0 0 190px !important;
    width: 190px !important;
    height: 43px !important;
    max-width: none !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

html body.ui-v3 header.secondary-page-header .brand-link .secondary-logo-frame .logo,
html body.ui-v3.force-mobile header.secondary-page-header .brand-link .secondary-logo-frame .logo,
html body.ui-v3:not(.force-mobile) header.secondary-page-header .brand-link .secondary-logo-frame .logo {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    filter: none !important;
}

html body.ui-v3 header.secondary-page-header .title-wrap,
html body.ui-v3:not(.force-mobile) header.secondary-page-header .title-wrap {
    position: static !important;
    display: block !important;
    width: auto !important;
    padding: 0 !important;
}

html body.ui-v3 header.secondary-page-header .brand-slogan,
html body.ui-v3:not(.force-mobile) header.secondary-page-header .brand-slogan {
    display: block !important;
    color: var(--secondary-muted) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

html body.ui-v3.force-mobile header.secondary-page-header .secondary-logo-frame {
    flex-basis: 145px !important;
    width: 145px !important;
    height: 33px !important;
}

html body.ui-v3.force-mobile header.secondary-page-header .title-wrap,
html body.ui-v3.force-mobile header.secondary-page-header .brand-slogan {
    display: none !important;
}

@media (max-width: 900px) {
    html body.ui-v3 header.secondary-page-header .title-wrap,
    html body.ui-v3 header.secondary-page-header .brand-slogan {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    html body.ui-v3 header.secondary-page-header .secondary-logo-frame {
        flex-basis: 155px !important;
        width: 155px !important;
        height: 35px !important;
    }
}
