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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.78;
    overflow-x: hidden;
    padding-top: 144px;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(46, 168, 96, .4); outline-offset: 3px; }

.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.top-fence { height: 24px; background: var(--deep); color: var(--cream); }
.top-fence__inner,
.farm-gate__inner,
.ridge-nav__inner,
.site-footer__inner,
.content-wrap {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}
.top-fence__inner { height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; }
.top-search { min-width: 52px; height: 24px; border: 0; color: var(--cream); background: transparent; padding: 0 8px; }
.farm-gate { height: 72px; background: var(--cream); border-bottom: 1px solid var(--border); }
.farm-gate__inner { height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.gate-logo { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; max-width: 220px; }
.brand-logo, .basket-logo, .footer-logo { height: 34px; width: auto; object-fit: contain; object-position: left center; }
.brand-wordmark { font-weight: 900; color: var(--deep); font-size: 22px; letter-spacing: .04em; white-space: nowrap; }
.basket-toggle, .app-link, .primary-btn, .secondary-btn, .text-btn {
    min-height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.basket-toggle { justify-self: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--deep); padding: 0 24px; }
.app-link { justify-self: end; padding: 0 18px; background: linear-gradient(135deg,#2EA860 0%,#1F8A4C 55%,#0F3D24 100%); color: #fff; }
.ridge-nav { height: 48px; background: var(--secondary); border-bottom: 1px solid var(--border); }
.ridge-nav__inner { height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ridge-link { min-height: 34px; padding: 5px 15px; border-radius: 9px; color: var(--deep); font-weight: 800; }
.ridge-link.is-active { background: var(--brand); color: #fff; }

.site-main { min-height: 60vh; }
.content-wrap { padding: 34px 0 76px; }
.page-kicker { color: var(--brand); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--title); line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 32px); margin-bottom: 16px; }
h2 { font-size: clamp(21px, 3vw, 25px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 17px; max-width: 850px; }
.page-head { margin-bottom: 26px; }
.page-head .lead { margin-bottom: 0; }

.section-block { margin-top: 42px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-head p { color: var(--muted); margin: 0; max-width: 640px; }
.surface-card, .index-card, .policy-card, .note-card, .faq-card, .timeline-item, .strip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(15,61,36,.06);
}
.surface-card, .policy-card, .note-card, .faq-card { padding: 22px; }
.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-link { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-link:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-link .arrow { color: var(--brand); font-weight: 900; }

.primary-btn { padding: 0 20px; background: linear-gradient(135deg,#2EA860 0%,#1F8A4C 55%,#0F3D24 100%); color: #fff; }
.secondary-btn { padding: 0 20px; background: var(--cream); color: var(--deep); border: 1px solid var(--border-strong); }
.text-btn { min-height: 42px; padding: 0 4px; color: var(--brand); }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.media-slot { width: 100%; min-height: 180px; background: var(--deep-bg); border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-img { width: 100%; max-height: 240px; object-fit: contain; object-position: center; }
.media-placeholder { width: 100%; height: 100%; min-height: inherit; background: linear-gradient(145deg, rgba(31,138,76,.09), rgba(15,61,36,.17)); position: relative; }
.media-placeholder::after { content: ""; position: absolute; width: 72px; height: 72px; border: 14px solid rgba(31,138,76,.12); border-radius: 50% 50% 45% 55%; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-16deg); }
.hero-media { max-height: 320px; min-height: 220px; background: var(--deep); }
.hero-media .media-img { max-height: 320px; }
.column-media .media-img { height: 200px; max-height: 200px; }
.app-media .media-img { max-height: 420px; width: auto; margin: 0 auto; }

.home-hero { padding: 28px 0 10px; }
.hero-copy { padding: 22px 0 8px; max-width: 920px; }
.hero-label { color: var(--brand); font-weight: 900; font-size: 14px; }
.hero-title { margin: 6px 0 12px; }
.hero-copy p { color: var(--muted); max-width: 860px; }
.three-entry .index-card { overflow: hidden; }
.three-entry .index-card__body { padding: 20px; }

.numbered-list { display: grid; gap: 12px; }
.numbered-item { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.numbered-item .num { color: var(--brand); font-size: 30px; font-weight: 950; line-height: 1; }
.numbered-item p { color: var(--muted); margin-bottom: 0; }

.directory-list, .shelf-list, .long-strips { display: grid; gap: 12px; }
.directory-row, .shelf-row { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.directory-row strong, .shelf-row strong { color: var(--deep); }
.directory-row p, .shelf-row p { color: var(--muted); margin: 0; }
.topic-tile { padding: 20px; min-height: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.topic-tile p { color: var(--muted); }
.rank-list { display: grid; gap: 14px; }
.rank-item { display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.rank-num { font-size: 42px; font-weight: 950; color: var(--brand); line-height: 1; }

.timeline { position: relative; padding-left: 30px; display: grid; gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
.timeline-item { padding: 20px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--cream); }
.status-chip { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; background: var(--deep-bg); color: var(--deep); padding: 2px 10px; font-size: 13px; font-weight: 800; }

.strip-card { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 20px; align-items: center; }
.strip-card .media-slot { min-height: 120px; }
.strip-card .media-img { max-height: 150px; }
.editor-label { display: inline-flex; margin-bottom: 10px; border-radius: 999px; background: var(--deep); color: #fff; min-height: 28px; padding: 2px 10px; align-items: center; font-size: 13px; font-weight: 800; }

.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 34px; align-items: center; }
.app-icon-line { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.app-icon { width: 64px; height: 64px; object-fit: contain; }
.feature-list { display: grid; gap: 12px; margin-top: 18px; }
.feature-list div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }

.prose { max-width: 900px; }
.prose h2 { margin-top: 32px; }
.prose p { color: var(--text); }
.prose .callout { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--brand); background: var(--deep-bg); border-radius: 0 14px 14px 0; color: var(--deep); }
.policy-grid { display: grid; gap: 16px; }
.policy-card h2 { margin-bottom: 8px; }
.policy-card p:last-child { margin-bottom: 0; }

.faq-list { display: grid; gap: 14px; }
.faq-card h2 { font-size: 18px; }
.faq-card p { color: var(--muted); margin-bottom: 0; }

.site-footer { background: var(--deep); color: var(--secondary); padding: 42px 0 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.footer-logo-link { min-height: 44px; display: inline-flex; align-items: center; }
.footer-logo { filter: brightness(0) invert(1); }
.site-footer .brand-wordmark { color: #fff; }
.footer-brand strong { display: block; color: #fff; font-size: 20px; }
.footer-brand span { color: var(--secondary); font-size: 13px; letter-spacing: .08em; }
.footer-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-group h2 { color: #fff; font-size: 16px; margin-bottom: 10px; }
.footer-group a { display: block; min-height: 34px; color: var(--secondary); }
.footer-group a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-note { color: var(--secondary); max-width: 920px; margin-top: 22px; }
.copyright { color: var(--leaf); margin-bottom: 0; font-size: 14px; }

.page-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(7,33,18,.55); opacity: 0; visibility: hidden; pointer-events: none; transition: .2s ease; }
.page-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.basket-panel { position: fixed; z-index: 80; left: 50%; bottom: 0; width: min(720px, 100%); max-height: 70vh; background: var(--cream); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 50px rgba(7,33,18,.22); transform: translate(-50%, 110%); visibility: hidden; pointer-events: none; transition: transform .24s ease, visibility .24s ease; }
.basket-panel.is-open { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; }
.basket-head { height: 68px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: var(--cream); }
.basket-brand { display: flex; align-items: center; gap: 10px; color: var(--deep); }
.basket-logo { max-width: 130px; }
.panel-close { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--deep); padding: 0 15px; font-weight: 800; }
.basket-scroll { max-height: calc(70vh - 68px); overflow-y: auto; padding: 18px 20px 28px; }
.basket-group + .basket-group { margin-top: 22px; }
.basket-group h2 { font-size: 15px; margin-bottom: 10px; color: var(--brand); }
.basket-group a { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; min-height: 52px; border-top: 1px solid var(--border); }
.basket-group a:first-of-type { border-top: 0; }
.basket-group strong { color: var(--deep); }
.basket-group span { color: var(--muted); font-size: 14px; }

.search-layer { position: fixed; z-index: 85; left: 0; right: 0; top: 96px; visibility: hidden; pointer-events: none; opacity: 0; transform: translateY(-12px); transition: .2s ease; }
.search-layer.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); }
.search-card { width: min(calc(100% - 32px), 760px); margin: 0 auto; background: var(--cream); border: 1px solid var(--border-strong); border-radius: 0 0 18px 18px; padding: 22px; box-shadow: var(--shadow); }
.search-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.search-head strong { color: var(--deep); font-size: 20px; }
.search-head p { color: var(--muted); margin: 2px 0 0; }
.search-appearance { min-height: 52px; margin-top: 18px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--soft); display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.search-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.search-presets a { min-height: 44px; border-radius: 12px; background: var(--deep-bg); color: var(--deep); display: flex; align-items: center; justify-content: center; font-weight: 800; }

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

@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-layout { grid-template-columns: 1fr; }
    .app-layout .app-media { max-width: 420px; margin: 0 auto; }
    .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    body { padding-top: 96px; padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .top-fence__inner, .farm-gate__inner, .site-footer__inner, .content-wrap { width: min(calc(100% - 32px), var(--max)); }
    .ridge-nav { display: none; }
    .farm-gate__inner { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
    .gate-logo { max-width: 150px; overflow: hidden; }
    .brand-logo { max-width: 138px; height: 30px; }
    .brand-wordmark { font-size: 19px; }
    .basket-toggle { padding: 0 13px; }
    .app-link { padding: 0 12px; font-size: 14px; }
    .content-wrap { padding-top: 26px; padding-bottom: 48px; }
    .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
    .directory-row, .shelf-row { grid-template-columns: 1fr; gap: 8px; }
    .rank-item { grid-template-columns: 60px 1fr; }
    .rank-num { font-size: 34px; }
    .strip-card { grid-template-columns: 1fr; }
    .numbered-item { grid-template-columns: 50px 1fr; }
    .numbered-item .num { font-size: 26px; }
    .section-head { align-items: start; flex-direction: column; }
    .basket-panel { width: 100%; max-height: 78vh; }
    .basket-scroll { max-height: calc(78vh - 68px); }
    .basket-group a { grid-template-columns: 96px 1fr; }
    .search-layer { inset: 0; top: 0; background: var(--deep); transform: none; }
    .search-card { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; background: var(--deep); color: var(--cream); padding: max(22px, env(safe-area-inset-top)) 18px 28px; }
    .search-head strong { color: #fff; }
    .search-head p { color: var(--secondary); }
    .search-card .panel-close { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
    .search-appearance { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.26); color: var(--secondary); }
    .search-presets { grid-template-columns: repeat(2, 1fr); }
    .search-presets a { background: var(--cream); color: var(--deep); }
    .mobile-bottom-nav { position: fixed; display: grid; grid-template-columns: repeat(5, 1fr); left: 0; right: 0; bottom: 0; z-index: 60; height: calc(50px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 20px rgba(15,61,36,.08); }
    .mobile-bottom-nav a { min-height: 50px; display: flex; align-items: center; justify-content: center; color: var(--deep); font-size: 14px; font-weight: 800; }
    .mobile-bottom-nav a.is-active { background: var(--brand); color: #fff; }
    .footer-groups { grid-template-columns: 1fr 1fr; gap: 18px; }
}

@media (max-width: 430px) {
    .top-brand { max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .footer-groups { grid-template-columns: 1fr; }
    .search-presets { grid-template-columns: 1fr; }
}

.hero-fallback {
    width: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    text-align: center;
    padding: 24px;
}
.hero-fallback strong { font-size: clamp(28px, 5vw, 46px); letter-spacing: .08em; }
.hero-fallback span { margin-top: 6px; font-size: 14px; letter-spacing: .18em; color: var(--secondary); }

.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
