:root {
    --bg: #F4FBF4;
    --bg-deep: #E6F3E8;
    --surface: #FFFFFF;
    --surface-2: #D8EEDC;
    --title: #0F3D24;
    --text: #1A3D28;
    --muted: #3E6B4E;
    --soft: #6A8A72;
    --green: #1F8A4C;
    --green-bright: #2EA860;
    --green-dark: #0F3D24;
    --leaf: #7AC994;
    --cream: #F4FBF4;
    --gold: #E8C458;
    --border: rgba(31,138,76,.18);
    --border-strong: rgba(31,138,76,.45);
    --shadow: 0 14px 36px rgba(15,61,36,.12);
    --radius: 16px;
    --header-h: 144px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.75;
    font-size: 16px;
}
body.ui-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 999;
    background: var(--green-dark);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    box-shadow: 0 8px 24px rgba(15,61,36,.08);
}
.top-fence { height: 24px; background: var(--green-dark); color: var(--cream); }
.top-fence-inner { height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.micro-brand { font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
.text-button { border: 0; background: transparent; color: inherit; padding: 0 4px; min-height: 24px; }
.text-button:hover, .text-button:focus-visible { text-decoration: underline; outline: none; }

.field-gate { height: 72px; background: var(--cream); border-bottom: 1px solid var(--border); }
.field-gate-inner { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; max-width: 220px; }
.brand-logo { height: 34px; width: auto; max-width: 210px; object-fit: contain; object-position: left center; }
.brand-wordmark { color: var(--green-dark); font-size: 24px; font-weight: 800; letter-spacing: .04em; }
.basket-button, .app-link {
    min-height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-weight: 700;
}
.basket-button {
    border: 1px solid var(--border-strong);
    color: var(--green-dark);
    background: var(--surface);
}
.app-link {
    justify-self: end;
    background: linear-gradient(135deg,#2EA860 0%,#1F8A4C 55%,#0F3D24 100%);
    color: #fff;
}
.basket-button:hover, .basket-button:focus-visible, .app-link:hover, .app-link:focus-visible,
.btn:hover, .btn:focus-visible, .search-presets a:hover, .search-presets a:focus-visible,
.footer-group a:hover, .footer-group a:focus-visible, .footer-minor-links a:hover, .footer-minor-links a:focus-visible {
    outline: 3px solid rgba(232,196,88,.5);
    outline-offset: 2px;
}

.ridge-nav { height: 48px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ridge-nav-inner { height: 48px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.ridge-nav a { min-height: 34px; padding: 4px 14px; border-radius: 10px; display: inline-flex; align-items: center; color: var(--green-dark); font-weight: 700; }
.ridge-nav a.is-current { background: var(--green); color: #fff; }
.ridge-nav a:hover, .ridge-nav a:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; }

.site-main { padding-top: var(--header-h); min-height: 60vh; }
.page-shell { padding: 42px 0 72px; }
.page-hero { margin-bottom: 28px; }
.eyebrow { display: inline-block; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .08em; margin-bottom: 6px; }
h1, h2, h3 { color: var(--title); line-height: 1.28; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 32px); margin-bottom: 14px; }
h2 { font-size: clamp(22px, 3vw, 27px); margin-bottom: 14px; }
h3 { font-size: 18px; margin-bottom: 10px; }
p { margin: 0 0 1em; }
.lead { color: var(--muted); font-size: 17px; max-width: 860px; }
.kicker { color: var(--green); font-weight: 800; margin-bottom: 8px; }

.section-block { padding: 30px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading p { max-width: 640px; margin: 0; color: var(--muted); }
.section-heading .section-link { color: var(--green); font-weight: 800; white-space: nowrap; }
.section-heading .section-link:hover, .section-heading .section-link:focus-visible { text-decoration: underline; }

.surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.soft-surface { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius); }
.green-surface { background: var(--green-dark); color: #fff; border-radius: var(--radius); }
.green-surface h2, .green-surface h3, .green-surface .eyebrow { color: #fff; }
.green-surface p, .green-surface li { color: #E6F3E8; }

.media-slot {
    width: 100%;
    min-height: 190px;
    max-height: 240px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-deep), var(--surface-2));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-slot img { width: 100%; height: 100%; min-height: inherit; max-height: inherit; object-fit: contain; object-position: center; }
.banner-slot { max-height: 320px; aspect-ratio: 16 / 6.8; background: var(--green-dark); }
.banner-slot img { max-height: 320px; object-fit: contain; }
.banner-fallback { color: var(--cream); text-align: center; display: grid; gap: 4px; }
.banner-fallback span { font-size: 32px; font-weight: 900; letter-spacing: .08em; }
.banner-fallback strong { font-size: 13px; letter-spacing: .22em; }
.app-image-slot { max-height: 420px; min-height: 320px; background: var(--bg-deep); }
.app-image-slot img { max-height: 420px; object-fit: contain; }

.hero-copy { margin-top: 22px; display: grid; gap: 10px; }
.hero-copy .hero-tag { font-size: 13px; font-weight: 800; color: var(--green); }
.hero-copy .hero-sentence { font-size: clamp(24px, 4vw, 34px); color: var(--green-dark); font-weight: 900; line-height: 1.35; margin: 0; }
.hero-copy p { max-width: 880px; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn { min-height: 44px; border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.btn-primary { background: linear-gradient(135deg,#2EA860 0%,#1F8A4C 55%,#0F3D24 100%); color: #fff; }
.btn-secondary { background: var(--cream); color: var(--green-dark); border: 1px solid var(--border-strong); }

.grid-2, .grid-3, .grid-4, .grid-6 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 18px; min-width: 0; }
.card .media-slot { margin-bottom: 16px; }
.card p { color: var(--muted); }
.card-link { display: inline-flex; color: var(--green); font-weight: 800; min-height: 44px; align-items: center; }
.card-link:hover, .card-link:focus-visible { text-decoration: underline; }

.number-list { display: grid; gap: 12px; }
.number-item { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.number { font-size: 26px; line-height: 1; font-weight: 900; color: var(--green); }
.number-item p { margin: 4px 0 0; color: var(--muted); }
.number-item a { font-weight: 800; color: var(--green-dark); }
.number-item a:hover, .number-item a:focus-visible { color: var(--green); text-decoration: underline; }

.directory-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.directory-item { padding: 18px; border-left: 4px solid var(--green); background: var(--surface); border-radius: 0 14px 14px 0; border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.directory-item p { color: var(--muted); }

.topic-card { padding: 18px; min-height: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.topic-card a { color: var(--green); font-weight: 800; display: inline-flex; min-height: 44px; align-items: center; }

.shelf { display: grid; gap: 10px; }
.shelf-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.shelf-row:last-child { border-bottom: 0; }
.shelf-label { font-weight: 900; color: var(--green-dark); }
.shelf-row p { margin: 0; color: var(--muted); }
.shelf-row a { color: var(--green); font-weight: 800; }

.ranking { display: grid; gap: 14px; }
.rank-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.rank-no { font-size: 40px; line-height: 1; font-weight: 900; color: var(--green); letter-spacing: -.04em; }
.rank-item p { color: var(--muted); }

.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
.timeline-item { position: relative; padding-left: 54px; }
.timeline-dot { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); border: 5px solid var(--bg); }
.timeline-card { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.status { display: inline-flex; min-height: 30px; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--bg-deep); color: var(--green-dark); font-weight: 800; font-size: 13px; }

.long-strip { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 18px; border-bottom: 1px solid var(--border); }
.long-strip:last-child { border-bottom: 0; }
.long-strip strong { color: var(--green-dark); }
.long-strip p { margin: 0; color: var(--muted); }

.article-note { padding: 22px; }
.article-note .editor-mark { color: var(--green); font-weight: 800; font-size: 13px; }
.article-note p { color: var(--muted); }

.walk-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.walk-item { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.walk-item p { color: var(--muted); }

.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 28px; align-items: center; }
.icon-line { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-icon-slot { width: 64px; height: 64px; min-height: 64px; border-radius: 16px; flex: 0 0 64px; }
.app-icon-slot img { width: 100%; height: 100%; object-fit: contain; }
.feature-list { display: grid; gap: 10px; margin: 18px 0; }
.feature { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.feature strong { color: var(--green-dark); }
.feature p { margin: 4px 0 0; color: var(--muted); }

.policy-sections { display: grid; gap: 18px; }
.policy-section { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.policy-section p, .policy-section li { color: var(--muted); }
.policy-section ul { padding-left: 22px; margin: 10px 0 0; }

.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.faq-item h2 { font-size: 19px; margin-bottom: 8px; }
.faq-item p { color: var(--muted); margin: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.contact-card p { color: var(--muted); }

.site-footer { background: var(--green-dark); color: var(--surface-2); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 28px; }
.footer-brand { min-width: 0; }
.footer-logo-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 10px; }
.brand-logo-footer { max-width: 180px; }
.footer-brand strong, .footer-brand span { display: block; color: #fff; }
.footer-brand strong { font-size: 20px; }
.footer-brand span { font-size: 12px; letter-spacing: .18em; margin-top: 2px; }
.footer-brand p { margin: 14px 0 0; color: var(--surface-2); max-width: 480px; }
.footer-group { display: grid; align-content: start; gap: 8px; }
.footer-group h2 { color: #fff; font-size: 16px; margin-bottom: 4px; }
.footer-group a { color: var(--surface-2); min-height: 30px; display: inline-flex; align-items: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 34px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.footer-minor-links { display: flex; flex-wrap: wrap; gap: 14px; }

.ui-overlay {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(8,31,18,.52);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
.basket-open .ui-overlay, .search-open .ui-overlay { opacity: 1; visibility: visible; pointer-events: auto; }

.basket-panel {
    position: fixed;
    z-index: 210;
    left: 50%;
    bottom: 0;
    width: min(720px, 100%);
    max-height: 70vh;
    transform: translate(-50%, 105%);
    visibility: hidden;
    pointer-events: none;
    background: var(--cream);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 50px rgba(15,61,36,.22);
    transition: transform .25s ease, visibility .25s ease;
    overflow: hidden;
}
.basket-open .basket-panel { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; }
.basket-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.basket-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--green-dark); }
.brand-logo-basket { height: 30px; max-width: 160px; }
.icon-close { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--cream); color: var(--green-dark); font-weight: 800; }
.icon-close:hover, .icon-close:focus-visible { outline: 3px solid rgba(232,196,88,.5); outline-offset: 2px; }
.basket-scroll { max-height: calc(70vh - 74px); overflow-y: auto; padding: 16px 18px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.basket-group h2 { font-size: 16px; margin-bottom: 10px; }
.basket-group a { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.basket-group a:last-child { border-bottom: 0; }
.basket-group strong { color: var(--green-dark); }
.basket-group span { color: var(--muted); font-size: 13px; }
.basket-group a:hover strong, .basket-group a:focus-visible strong { color: var(--green); }

.search-layer {
    position: fixed;
    z-index: 205;
    left: 0;
    right: 0;
    top: 96px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.search-open .search-layer { visibility: visible; opacity: 1; pointer-events: auto; }
.search-card {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    background: var(--cream);
    border: 1px solid var(--border-strong);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.search-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.search-head h2 { margin-bottom: 0; }
.search-appearance { margin-top: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.search-appearance label { display: block; font-weight: 800; color: var(--green-dark); margin-bottom: 8px; }
.search-appearance input { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); padding: 0 14px; background: #fff; color: var(--text); }
.search-appearance input:focus { outline: 3px solid rgba(46,168,96,.2); border-color: var(--green); }
.search-appearance p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.search-presets a { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--green-dark); background: var(--surface); display: inline-flex; align-items: center; font-weight: 800; }

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

@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 2fr repeat(2, 1fr); }
    .footer-brand { grid-row: span 2; }
    .app-layout { grid-template-columns: 1fr 320px; }
}

@media (max-width: 760px) {
    :root { --header-h: 96px; }
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    .shell { width: min(100% - 32px, 1220px); }
    .ridge-nav { display: none; }
    .field-gate-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
    .brand-link { min-width: 0; overflow: hidden; }
    .brand-logo { height: 30px; max-width: 145px; }
    .brand-wordmark { font-size: 20px; white-space: nowrap; }
    .basket-button, .app-link { min-width: 58px; padding: 0 10px; font-size: 14px; }
    .top-fence-inner { gap: 10px; }
    .micro-brand { max-width: calc(100% - 56px); overflow: hidden; text-overflow: ellipsis; }
    .page-shell { padding: 30px 0 54px; }
    .section-block { padding: 24px 0; }
    .grid-2, .grid-3, .grid-4, .grid-6, .directory-list, .walk-index, .contact-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: start; flex-direction: column; }
    .shelf-row { grid-template-columns: 1fr; gap: 6px; }
    .long-strip { grid-template-columns: 1fr; gap: 8px; }
    .app-layout { grid-template-columns: 1fr; }
    .app-layout .app-image-wrap { order: -1; max-width: 320px; width: 100%; margin: 0 auto; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 18px; }
    .footer-brand { grid-column: 1 / -1; grid-row: auto; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .basket-panel { width: 100%; max-height: 78vh; }
    .basket-scroll { max-height: calc(78vh - 74px); grid-template-columns: 1fr; }
    .search-layer { inset: 0; background: var(--green-dark); color: var(--cream); }
    .search-card { width: 100%; min-height: 100%; border: 0; border-radius: 0; margin: 0; background: var(--green-dark); box-shadow: none; padding: calc(26px + env(safe-area-inset-top)) 16px 90px; overflow-y: auto; }
    .search-head h2, .search-head .eyebrow { color: #fff; }
    .search-layer .icon-close { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
    .search-appearance { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }
    .search-appearance label, .search-appearance p { color: var(--cream); }
    .search-presets a { background: var(--cream); }
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        z-index: 150;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 50px;
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--cream);
        border-top: 1px solid var(--border-strong);
        box-shadow: 0 -8px 22px rgba(15,61,36,.1);
    }
    .mobile-bottom-nav a { min-height: 50px; display: flex; align-items: center; justify-content: center; color: var(--green-dark); font-weight: 800; font-size: 13px; }
    .mobile-bottom-nav a.is-current { background: var(--green); color: #fff; }
    .basket-open .mobile-bottom-nav, .search-open .mobile-bottom-nav { z-index: 140; }
    .banner-slot { aspect-ratio: 16 / 10; min-height: 220px; }
}

@media (max-width: 420px) {
    .brand-logo { max-width: 118px; height: 28px; }
    .basket-button, .app-link { font-size: 13px; min-width: 52px; }
    .rank-item { grid-template-columns: 56px 1fr; }
    .rank-no { font-size: 32px; }
}

.mt-18 { margin-top: 18px; }
