:root {
    --cream: #F4FBF4;
    --deep-bg: #E6F3E8;
    --panel: #FFFFFF;
    --soft: #D8EEDC;
    --title: #0F3D24;
    --text: #1A3D28;
    --muted: #3E6B4E;
    --aux: #6A8A72;
    --brand: #1F8A4C;
    --bright: #2EA860;
    --deep: #0F3D24;
    --leaf: #7AC994;
    --gold: #E8C458;
    --border: rgba(31, 138, 76, 0.18);
    --strong-border: rgba(31, 138, 76, 0.45);
    --shadow: 0 14px 36px rgba(15, 61, 36, 0.12);
    --radius: 16px;
    --shell: 1220px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    background: var(--cream);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}
body.ui-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell {
    width: min(calc(100% - 32px), var(--shell));
    margin: 0 auto;
}
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 80;
}
.top-fence {
    height: 24px;
    background: var(--deep);
    color: var(--cream);
    font-size: 12px;
}
.top-fence-inner {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.plain-button {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0 8px;
    min-height: 24px;
}
.plain-button:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(232, 196, 88, 0.92);
    outline-offset: 3px;
}
.field-gate {
    height: 72px;
    background: rgba(244, 251, 244, 0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.field-gate-inner {
    height: 72px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 18px;
}
.brand-link { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; }
.brand-logo,
.footer-logo,
.basket-logo {
    display: block;
    height: 34px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    object-position: left center;
}
.brand-fallback {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .04em;
    color: var(--deep);
}
.basket-button {
    justify-self: center;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--strong-border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--deep);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.app-link {
    justify-self: end;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #2EA860 0%, #1F8A4C 55%, #0F3D24 100%);
}
.ridge-nav {
    height: 48px;
    background: var(--soft);
    border-bottom: 1px solid var(--border);
}
.ridge-nav-inner {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ridge-nav a {
    min-height: 34px;
    padding: 4px 15px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    color: var(--deep);
    font-weight: 800;
}
.ridge-nav a.active {
    background: var(--brand);
    color: #fff;
}
.site-main {
    padding-top: 168px;
    min-height: 70vh;
}
.hero,
.page-hero,
.content-section,
.statement-band,
.faq-band {
    width: min(calc(100% - 32px), var(--shell));
    margin: 0 auto 28px;
}
.hero {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.hero-media,
.section-media,
.page-media {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 180px;
    background: var(--deep);
    overflow: hidden;
}
.hero-media { max-height: 320px; aspect-ratio: 16 / 7; }
.hero-media img,
.section-media img,
.page-media img,
.card-media img,
.app-phone img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.hero-copy { padding: 26px clamp(20px, 4vw, 48px) 32px; }
.eyebrow {
    display: inline-block;
    color: var(--brand);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .12em;
    font-size: 12px;
}
h1, h2, h3 { color: var(--title); line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 32px); margin-bottom: 14px; }
h2 { font-size: clamp(21px, 3vw, 26px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 17px; max-width: 900px; }
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2EA860 0%, #1F8A4C 55%, #0F3D24 100%);
}
.btn-secondary {
    background: var(--cream);
    color: var(--deep);
    border-color: var(--strong-border);
}
.grid-3,
.grid-4,
.grid-6,
.editor-grid,
.info-grid {
    display: grid;
    gap: 18px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(3, 1fr); }
.editor-grid { grid-template-columns: repeat(2, 1fr); }
.info-grid { grid-template-columns: repeat(3, 1fr); }
.card,
.topic-card,
.shelf-item,
.rank-item,
.timeline-item,
.note-card,
.term-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 8px 22px rgba(15, 61, 36, 0.06);
}
.card-media {
    margin: -20px -20px 16px;
    height: 200px;
    border-radius: var(--radius) var(--radius) 0 0;
    display: grid;
    place-items: center;
    background: var(--deep-bg);
    overflow: hidden;
}
.content-section {
    padding: 26px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--border);
    border-radius: 18px;
}
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.section-heading p { color: var(--muted); max-width: 700px; }
.section-media {
    height: 220px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: var(--deep-bg);
}
.index-list,
.catalog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.index-list li,
.catalog-list li {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: start;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.index-list li:first-child,
.catalog-list li:first-child { border-top: 0; }
.big-no {
    font-size: 29px;
    line-height: 1;
    color: var(--brand);
    font-weight: 950;
}
.directory-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.directory-strip article {
    background: var(--deep);
    color: #fff;
    border-radius: 14px;
    padding: 18px;
}
.directory-strip h3 { color: #fff; }
.directory-strip p { color: var(--soft); }
.shelf-list { display: grid; gap: 12px; }
.shelf-item {
    display: grid;
    grid-template-columns: 1.2fr 2fr auto;
    gap: 20px;
    align-items: center;
}
.shelf-item span { color: var(--muted); }
.rank-list { display: grid; gap: 12px; }
.rank-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 18px;
    align-items: start;
}
.rank-item .big-no { font-size: 42px; }
.timeline {
    position: relative;
    display: grid;
    gap: 14px;
    padding-left: 24px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--brand);
}
.timeline-item { position: relative; }
.timeline-item::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    left: -25px;
    top: 27px;
    box-shadow: 0 0 0 5px var(--cream);
}
.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--deep);
    font-size: 13px;
    font-weight: 800;
}
.opinion-label {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--brand);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
}
.app-layout {
    display: grid;
    grid-template-columns: minmax(220px, 380px) 1fr;
    gap: 28px;
    align-items: center;
}
.app-phone {
    display: grid;
    place-items: center;
    min-height: 300px;
    max-height: 420px;
    background: var(--deep-bg);
    border-radius: 18px;
    overflow: hidden;
}
.app-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 12px;
}
.statement-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.statement-band article {
    padding: 22px;
    border-radius: 16px;
    background: var(--deep);
    color: var(--soft);
}
.statement-band h2 { color: #fff; }
.page-hero {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 20px;
    align-items: stretch;
}
.page-hero-copy,
.page-hero-media-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px;
}
.page-media {
    height: 100%;
    min-height: 260px;
    border-radius: 14px;
    background: var(--deep-bg);
}
.page-hero-media-wrap {
    padding: 14px;
}
.prose {
    max-width: 880px;
}
.prose p + h2,
.prose ul + h2,
.prose div + h2 { margin-top: 28px; }
.prose ul {
    padding-left: 1.2em;
    margin: 0 0 18px;
}
.prose li { margin-bottom: 8px; }
.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.long-strips {
    display: grid;
    gap: 14px;
}
.long-strips article {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
}
.faq-list {
    display: grid;
    gap: 14px;
}
.faq-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}
.faq-item h2 { font-size: 18px; }
.contact-box {
    background: var(--deep);
    color: var(--soft);
    border-radius: 18px;
    padding: 28px;
}
.contact-box h2, .contact-box h3 { color: #fff; }
.site-footer {
    margin-top: 42px;
    padding: 38px 0 30px;
    background: var(--deep);
    color: var(--soft);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.footer-brand-link { display: inline-flex; }
.footer-logo { filter: none; }
.footer-brand strong {
    color: #fff;
    display: block;
    font-size: 20px;
}
.footer-brand span { color: var(--leaf); font-size: 13px; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    border-top: 1px solid rgba(216, 238, 220, .18);
    border-bottom: 1px solid rgba(216, 238, 220, .18);
    padding: 24px 0;
}
.footer-grid h2 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--soft); padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-note {
    max-width: 900px;
    margin: 22px 0 10px;
    color: #C8E5CF;
}
.copyright { color: #98C6A6; margin: 0; font-size: 13px; }
.ui-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 61, 36, .56);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.ui-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.basket-panel {
    position: fixed;
    z-index: 110;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 105%);
    width: min(720px, 100%);
    max-height: 70vh;
    background: var(--cream);
    border: 1px solid var(--strong-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -16px 42px rgba(15,61,36,.22);
    visibility: hidden;
    pointer-events: none;
    transition: transform .24s ease, visibility .24s ease;
}
.basket-panel.open {
    transform: translate(-50%, 0);
    visibility: visible;
    pointer-events: auto;
}
.basket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.basket-brand { display: flex; align-items: center; gap: 12px; color: var(--deep); }
.basket-logo { height: 30px; }
.panel-close {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--strong-border);
    background: var(--panel);
    color: var(--deep);
    font-weight: 800;
}
.basket-scroll { overflow-y: auto; max-height: calc(70vh - 77px); }
.basket-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 20px;
}
.basket-groups section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.basket-groups h2 { font-size: 16px; }
.basket-groups a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}
.basket-groups a:first-of-type { border-top: 0; }
.basket-groups strong { display: block; color: var(--deep); }
.basket-groups span { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 2px; }
.search-layer {
    position: fixed;
    z-index: 115;
    left: 0;
    right: 0;
    top: 96px;
    padding: 0 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition: .2s ease;
}
.search-layer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.search-card {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 22px;
    background: var(--cream);
    border: 1px solid var(--strong-border);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow);
}
.search-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
}
.search-head h2 { margin-bottom: 6px; }
.search-look { display: block; margin: 16px 0; }
.search-look span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 5px;
}
.search-look input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--strong-border);
    border-radius: 12px;
    background: #fff;
    color: var(--deep);
    padding: 0 14px;
}
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; }
.search-presets a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--soft);
    color: var(--deep);
    font-weight: 800;
}
.mobile-bottom-nav { display: none; }

@media (max-width: 900px) {
    .grid-3, .grid-4, .grid-6, .info-grid { grid-template-columns: repeat(2, 1fr); }
    .directory-strip { grid-template-columns: repeat(2, 1fr); }
    .page-hero { grid-template-columns: 1fr; }
    .page-media { min-height: 220px; }
    .statement-band { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .app-layout { grid-template-columns: .8fr 1.2fr; }
}
@media (max-width: 640px) {
    body { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
    .shell,
    .hero,
    .page-hero,
    .content-section,
    .statement-band,
    .faq-band { width: min(calc(100% - 32px), var(--shell)); }
    .ridge-nav { display: none; }
    .site-main { padding-top: 116px; }
    .field-gate-inner {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
    }
    .brand-logo { max-width: 116px; height: 30px; }
    .brand-fallback { font-size: 18px; white-space: nowrap; }
    .basket-button { padding: 7px 10px; min-width: 78px; }
    .app-link { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
    .top-fence { height: 24px; }
    .top-fence-inner { height: 24px; }
    .field-gate, .field-gate-inner { height: 72px; }
    .hero-media { aspect-ratio: 16 / 9; max-height: 320px; }
    .hero-copy { padding: 20px 18px 24px; }
    .grid-3, .grid-4, .grid-6, .editor-grid, .info-grid, .two-col { grid-template-columns: 1fr; }
    .directory-strip { grid-template-columns: 1fr; }
    .card-media { height: 200px; }
    .content-section { padding: 20px 16px; }
    .section-heading { display: block; }
    .shelf-item { grid-template-columns: 1fr; gap: 6px; }
    .app-layout { grid-template-columns: 1fr; }
    .app-phone { max-height: 420px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .basket-panel { max-height: 78vh; }
    .basket-scroll { max-height: calc(78vh - 77px); }
    .basket-groups { grid-template-columns: 1fr; }
    .search-layer {
        inset: 0;
        top: 0;
        padding: 0;
        background: var(--deep);
    }
    .search-card {
        width: 100%;
        min-height: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: var(--deep);
        color: var(--cream);
        padding: 34px 18px 90px;
    }
    .search-head h2,
    .search-card .eyebrow { color: #fff; }
    .search-card .eyebrow { opacity: .78; }
    .search-look span { color: var(--soft); }
    .search-look input { background: var(--cream); color: var(--deep); }
    .search-presets a { background: #fff; color: var(--deep); }
    .search-card .panel-close { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
    .mobile-bottom-nav {
        position: fixed;
        z-index: 95;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(50px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        background: rgba(244, 251, 244, .98);
        border-top: 1px solid var(--border);
    }
    .mobile-bottom-nav a {
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--deep);
        font-size: 13px;
        font-weight: 800;
    }
    .mobile-bottom-nav a.active { background: var(--brand); color: #fff; }
    .ui-overlay { z-index: 100; }
    .basket-panel { z-index: 110; }
}

.fallback-title {
    min-height: 220px;
    width: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: #FFFFFF;
    text-align: center;
}
.fallback-title strong { font-size: clamp(30px, 6vw, 54px); letter-spacing: .06em; }
.fallback-title span { color: #D8EEDC; font-size: 13px; letter-spacing: .18em; }
