:root {
    --bg: #F7F1D8;
    --deep: #E8DFA8;
    --surface: #FFF9E8;
    --surface-2: #F0E8C0;
    --title: #16140C;
    --text: #2A2614;
    --muted: #5A5428;
    --soft: #7A7440;
    --ink: #16140C;
    --yellow: #E8C430;
    --border: rgba(22,20,12,0.12);
    --border-strong: rgba(232,196,48,0.55);
    --shadow: 0 12px 28px rgba(22,20,12,0.10);
    --radius: 14px;
    --shell: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    padding-top: 122px;
}
body.nav-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; }
.site-main { min-height: 60vh; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--ink); color: var(--yellow); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 8px; }

.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; }
.smart-edge { height: 20px; background: var(--ink); color: var(--yellow); font-size: 12px; line-height: 20px; }
.edge-inner { height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-trigger { border: 0; background: transparent; color: var(--yellow); padding: 0 4px; height: 20px; cursor: pointer; }
.smart-head { height: 54px; background: var(--surface); border-bottom: 1px solid rgba(22,20,12,0.25); }
.head-inner { height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 84px; }
.brand-media { height: 24px; min-width: 78px; display: inline-flex; align-items: center; }
.brand-logo, .drawer-logo, .footer-logo { height: 24px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { color: var(--title); font-size: 16px; font-weight: 800; letter-spacing: 0.04em; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-app, .drawer-trigger {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; padding: 0 14px; font-size: 14px; white-space: nowrap;
}
.head-app { background: linear-gradient(135deg,#16140C 0%,#E8C430 100%); color: var(--ink); border: 1px solid var(--ink); font-weight: 800; }
.drawer-trigger { border: 1px solid var(--ink); background: var(--surface); cursor: pointer; }
.smart-grid { height: 48px; background: var(--surface); border-bottom: 1px solid var(--border); }
.quick-inner { height: 48px; display: flex; align-items: center; gap: 10px; }
.quick-link { width: 120px; height: 28px; border: 1px solid var(--ink); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--surface); color: var(--text); }
.quick-link.is-current { background: var(--ink); color: var(--yellow); }

.hero, .page-hero { padding: 42px 0 28px; }
.hero h1, .page-hero h1 { margin: 12px 0 10px; color: var(--title); font-size: 24px; line-height: 1.3; }
h2 { font-size: 20px; line-height: 1.35; color: var(--title); margin: 0 0 12px; }
h3 { font-size: 16px; line-height: 1.4; color: var(--title); margin: 0 0 8px; }
p { margin: 0 0 12px; }
.lead { max-width: 760px; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button-row-center { justify-content: center; }
.btn { min-height: 42px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; white-space: nowrap; border: 1px solid var(--ink); }
.btn-primary { background: linear-gradient(135deg,#16140C 0%,#E8C430 100%); color: var(--ink); }
.btn-secondary { background: var(--surface); color: var(--title); }
a:hover, button:hover { filter: brightness(0.97); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(232,196,48,0.7); outline-offset: 2px; }
.section { padding: 28px 0; }
.section-deep { background: var(--deep); }
.section-surface { background: var(--surface); }
.section-head { margin-bottom: 18px; max-width: 760px; }
.section-head p { color: var(--muted); }

.home-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.home-index a { padding: 16px; min-height: 88px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.home-index strong { display: block; font-size: 16px; margin-bottom: 4px; }
.home-index span { color: var(--muted); }

.parallel-strips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.strip-card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.strip-content { padding: 18px; }
.media-slot { background: var(--surface); border: 1px dashed rgba(22,20,12,0.18); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-slot-wide { min-height: 160px; }
.media-slot-banner { height: 200px; }
.media-slot-app { height: 300px; max-width: 520px; margin: 16px auto; }
.media-slot-icon { width: 72px; height: 72px; margin: 0 auto 12px; padding: 12px; }
.media-slot-icon img { width: 48px; height: 48px; }
.media-slot-square { min-height: 220px; }

.stack-cards { position: relative; display: grid; gap: 14px; }
.stack-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stack-card:nth-child(2) { margin-left: 5%; }
.stack-card:nth-child(3) { margin-left: 10%; }
.stack-card .media-slot { min-height: 210px; margin-bottom: 16px; }

.fold-list { display: grid; gap: 16px; }
.fold-item { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.fold-item:nth-child(even) { grid-template-columns: 1.2fr 0.8fr; }
.fold-copy { padding: 20px; }
.fold-media { min-height: 190px; border-radius: 0; border: 0; border-right: 1px solid var(--border); }
.fold-item:nth-child(even) .fold-media { order: 2; border-right: 0; border-left: 1px solid var(--border); }

.topic-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.topic-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.topic-card strong { display: block; margin-bottom: 5px; color: var(--title); }
.topic-card p { color: var(--muted); }
.topic-header-media { margin: 14px 0 18px; min-height: 200px; }

.period-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.period-card { padding: 18px; background: var(--surface); border-top: 4px solid var(--yellow); border-radius: 0 0 var(--radius) var(--radius); min-height: 170px; }
.period-media { margin-bottom: 16px; min-height: 220px; }

.status-list { display: grid; gap: 10px; }
.status-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.status-badge { border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; background: var(--ink); color: var(--yellow); white-space: nowrap; }
.status-media { min-height: 220px; margin-bottom: 16px; }

.single-flow { max-width: 760px; margin: 0 auto; }
.single-flow .media-slot { min-height: 240px; margin: 18px 0; }
.single-flow section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.single-flow section:last-child { border-bottom: 0; }

.memo-list { display: grid; gap: 14px; }
.memo-item { padding: 18px 20px; border-left: 5px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.memo-media { min-height: 230px; margin-bottom: 18px; }

.method-flow { display: grid; gap: 18px; }
.method-item { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; }
.method-index { width: 84px; min-height: 84px; border-radius: 16px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-weight: 900; }
.method-copy { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-item { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature-item:nth-child(3n) { grid-column: 1 / -1; }

.centered-guide { max-width: 760px; margin: 0 auto; text-align: center; }
.centered-guide .media-slot { min-height: 260px; margin-bottom: 20px; }
.centered-cards { display: grid; gap: 14px; margin-top: 18px; text-align: left; }
.centered-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }

.app-reading { max-width: 760px; margin: 0 auto; text-align: center; }
.app-reading p { text-align: left; }
.app-points { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 18px; text-align: left; }
.app-points article { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }

.policy-sections { max-width: 820px; margin: 0 auto; }
.policy-sections section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.policy-sections ul { margin: 8px 0 0; padding-left: 1.2em; }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.help-grid article { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.help-grid article:first-child { grid-column: 1 / -1; }

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

.contact-paths { display: grid; gap: 14px; }
.contact-path { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.contact-path strong { color: var(--title); }
.notice { padding: 14px 16px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 12px; color: var(--muted); }
.notice-spaced { margin-top: 16px; }

.about-intro { display: grid; gap: 18px; }
.about-values { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.about-values article { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.about-brand-media { min-height: 240px; }

.site-footer { background: var(--ink); color: var(--bg); border-top: 1px solid var(--yellow); font-size: 13px; padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; color: var(--yellow); }
.footer-brand span { display: block; color: var(--bg); opacity: .85; }
.footer-logo-slot { min-width: 78px; min-height: 24px; display: flex; align-items: center; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.footer-links h2 { color: var(--yellow); font-size: 13px; margin-bottom: 8px; }
.footer-links a { display: block; padding: 2px 0; color: var(--bg); }
.rights-note { color: rgba(247,241,216,.82); max-width: 760px; }
.copyright { margin: 0; color: var(--yellow); }

.site-overlay { position: fixed; inset: 0; background: rgba(22,20,12,.46); z-index: 140; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.site-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.smart-drawer { position: fixed; top: 86px; right: 12px; z-index: 160; width: min(420px, 32vw); max-height: calc(100vh - 98px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; transform: translateX(calc(100% + 30px)); visibility: hidden; pointer-events: none; transition: transform .22s ease, visibility .22s ease; }
.smart-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-top, .search-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.icon-button { min-height: 44px; border: 1px solid var(--ink); border-radius: 12px; background: var(--surface); padding: 0 12px; cursor: pointer; }
.drawer-groups { display: grid; gap: 14px; margin-top: 14px; }
.drawer-groups section { border-top: 1px solid var(--border); padding-top: 12px; }
.drawer-groups h2 { font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.drawer-groups a { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; min-height: 44px; }
.drawer-groups a span { color: var(--muted); font-size: 13px; }

.search-layer { position: fixed; left: 0; right: 0; top: 74px; z-index: 170; visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: .2s ease; }
.search-layer.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.search-card { width: min(calc(100% - 32px), 720px); margin: 12px auto 0; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.search-head p { color: var(--muted); margin: 2px 0 0; }
.search-label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
.search-input { width: 100%; height: 44px; border: 1px solid var(--ink); border-radius: 12px; background: #fff; padding: 0 12px; color: var(--text); }
.search-presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.search-presets a { min-height: 58px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-weight: 800; }
.search-presets span { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.search-empty { margin: 12px 0 0; color: var(--muted); }

.mobile-bottom { display: none; }

@media (max-width: 760px) {
    body { padding-top: 74px; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    .smart-grid { display: none; }
    .head-app, .drawer-trigger { padding: 0 10px; }
    .brand-link { min-width: 72px; }
    .shell { width: calc(100% - 32px); }
    .hero, .page-hero { padding: 28px 0 20px; }
    .home-index, .parallel-strips, .topic-cards, .period-grid, .feature-list, .app-points, .help-grid, .about-values { grid-template-columns: 1fr; }
    .stack-card:nth-child(2), .stack-card:nth-child(3) { margin-left: 0; }
    .fold-item, .fold-item:nth-child(even) { grid-template-columns: 1fr; }
    .fold-item:nth-child(even) .fold-media { order: 0; border-left: 0; }
    .fold-media { border-right: 0; border-bottom: 1px solid var(--border); min-height: 170px; }
    .status-row { grid-template-columns: 1fr; gap: 6px; }
    .method-item { grid-template-columns: 58px 1fr; gap: 10px; }
    .method-index { width: 58px; min-height: 58px; }
    .feature-item:nth-child(3n), .help-grid article:first-child { grid-column: auto; }
    .contact-path { grid-template-columns: 1fr; gap: 4px; }
    .footer-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .site-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .smart-drawer { top: 82px; right: 8px; width: min(88vw, 390px); max-height: calc(100vh - 96px); }
    .search-layer { inset: 0; top: 0; z-index: 180; min-height: 100vh; background: var(--ink); color: var(--yellow); }
    .search-layer.is-open { min-height: 100vh; }
    .search-card { width: calc(100% - 24px); max-height: calc(100vh - 24px); overflow: auto; margin: 12px auto; background: var(--ink); border-color: rgba(232,196,48,.45); color: var(--yellow); }
    .search-head strong, .search-head p, .search-label { color: var(--yellow); }
    .search-head .icon-button { border-color: var(--yellow); background: var(--ink); color: var(--yellow); }
    .search-presets { grid-template-columns: 1fr; }
    .search-presets a { background: #2A2614; color: var(--yellow); border-color: rgba(232,196,48,.35); }
    .search-presets span, .search-empty { color: var(--bg); }
    .mobile-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--ink); display: grid; grid-template-columns: repeat(4,1fr); }
    .mobile-bottom a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
    .mobile-bottom a.is-current { background: var(--yellow); color: var(--ink); font-weight: 800; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
