:root {
    --page: #F3E8D4;
    --deep: #E2D2B4;
    --panel: #FBF3E4;
    --subtle: #EDE0C8;
    --ink: #1A140A;
    --text: #2C2214;
    --muted: #5C4A30;
    --soft: #7C6844;
    --gold: #7A5A20;
    --copper: #B88838;
    --border: rgba(26,20,10,0.12);
    --strong-border: rgba(122,90,32,0.50);
    --shadow: 0 12px 28px rgba(26,20,10,0.10);
    --top-h: 20px;
    --mast-h: 54px;
    --dot-h: 42px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.lock-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.shell, .page-shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; }

.top-strip {
    position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 90;
    background: var(--ink); color: var(--copper); font-size: 12px;
}
.top-strip-inner, .masthead-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand-mini { font-weight: 700; letter-spacing: .05em; }
.text-button {
    border: 0; background: transparent; color: var(--copper);
    padding: 0 2px; min-width: 44px; height: 20px;
}
.masthead {
    position: fixed; top: var(--top-h); inset-inline: 0; height: var(--mast-h); z-index: 89;
    background: var(--panel); border-bottom: 1px solid var(--strong-border);
}
.logo-link { min-width: 54px; min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo { height: 24px; width: auto; object-fit: contain; object-position: center; }
.logo-fallback { font-size: 16px; font-weight: 800; color: var(--ink); }
.masthead-actions { display: flex; gap: 8px; align-items: center; }
.header-app-link, .drawer-trigger {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 14px; border-radius: 8px; white-space: nowrap; font-size: 14px;
}
.header-app-link { background: linear-gradient(135deg,#1A140A 0%,#B88838 100%); color: var(--panel); }
.drawer-trigger { border: 1px solid var(--gold); background: var(--panel); color: var(--ink); }

.dot-nav {
    position: fixed; top: calc(var(--top-h) + var(--mast-h)); inset-inline: 0; height: var(--dot-h); z-index: 88;
    background: var(--panel); border-bottom: 1px solid var(--border);
}
.dot-nav-inner { height: 100%; display: flex; justify-content: center; gap: 46px; align-items: flex-start; }
.dot-item {
    min-width: 44px; height: 42px; font-size: 13px; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; gap: 3px;
}
.dot {
    width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink); background: transparent;
}
.dot-item.is-current .dot { background: var(--copper); border-color: var(--copper); }
.dot-item.is-current { color: var(--ink); font-weight: 700; }

.site-main {
    padding-top: calc(var(--top-h) + var(--mast-h) + var(--dot-h) + 28px);
    padding-bottom: 48px; min-height: 70vh;
}
h1, h2, h3 { color: var(--ink); margin-top: 0; }
h1 { font-size: 24px; line-height: 1.3; margin-bottom: 14px; }
h2 { font-size: 20px; line-height: 1.4; margin-bottom: 12px; }
h3 { font-size: 16px; line-height: 1.45; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); max-width: 760px; }
.kicker { color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .08em; margin-bottom: 6px; }
.hero-plain { padding: 10px 0 28px; }
.hero-plain .index-dots { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.index-dots a {
    border: 1px solid var(--strong-border); background: var(--panel); color: var(--ink);
    padding: 7px 12px; border-radius: 999px; font-size: 13px;
}
.hero-plain .statement { font-size: 18px; color: var(--gold); font-weight: 700; margin-bottom: 10px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
    min-height: 42px; padding: 0 18px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.btn-primary { background: linear-gradient(135deg,#1A140A 0%,#B88838 100%); color: var(--panel); }
.btn-secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--gold); }
.btn:hover, .header-app-link:hover, .drawer-trigger:hover, .index-dots a:hover { transform: translateY(-1px); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid rgba(184,136,56,.35); outline-offset: 2px;
}

.section-block { margin: 26px 0 34px; }
.paper-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.media-slot {
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px; min-height: 140px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.slice-layout .media-slot { height: 168px; margin-bottom: 14px; }
.slice-layout .slice-copy { background: var(--subtle); border-left: 3px solid var(--copper); padding: 18px; }

.triple-layout { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.triple-layout article { padding: 18px; min-width: 0; }
.triple-layout article:first-child { grid-row: span 2; }
.triple-layout .media-slot { height: 170px; margin-bottom: 14px; }

.clip-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.clip-layout article { padding: 20px; }
.clip-layout article:first-child { margin-top: 18px; transform: rotate(-.35deg); }
.clip-layout article:last-child { margin-bottom: 18px; transform: rotate(.35deg); }
.clip-layout .media-slot { height: 190px; margin-bottom: 14px; }

.shelf-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shelf-card { padding: 18px; }
.shelf-head { margin-bottom: 14px; }
.shelf-head .media-slot { height: 160px; }

.period-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.period-visual .media-slot { height: 240px; position: sticky; top: 136px; }
.period-list { display: grid; gap: 12px; }
.period-list article { padding: 18px; border-left: 3px solid var(--copper); }

.status-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; align-items: start; }
.status-wrap .media-slot { height: 230px; }
.status-list { display: grid; gap: 12px; }
.status-row {
    display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 14px; align-items: center;
    padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
}
.status-tag {
    display: inline-flex; min-height: 30px; align-items: center; justify-content: center;
    padding: 0 10px; border-radius: 999px; background: var(--ink); color: var(--panel); font-size: 13px;
}

.app-layout { max-width: 720px; margin-inline: auto; }
.app-visuals { display: grid; grid-template-columns: 1fr 76px; gap: 14px; align-items: start; margin-bottom: 16px; }
.app-visuals .app-poster { height: 300px; }
.app-visuals .app-icon { height: 76px; min-height: 76px; }
.app-copy { padding: 20px; }

.center-card { max-width: 720px; margin: 0 auto 20px; padding: 22px; text-align: left; }
.center-card .media-slot { height: 210px; margin-bottom: 16px; }

.single-column { max-width: 760px; margin: 0 auto; }
.single-column > section, .single-column > article {
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px;
}
.single-column .media-slot { height: 230px; margin-bottom: 16px; }

.memo-list { display: grid; gap: 12px; }
.memo-item {
    display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 18px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
}
.memo-index {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--copper); font-weight: 800;
}
.method-flow { display: grid; gap: 0; border: 1px solid var(--strong-border); border-radius: 12px; overflow: hidden; }
.method-flow article { padding: 20px; background: var(--panel); border-bottom: 1px solid var(--border); }
.method-flow article:last-child { border-bottom: 0; }
.method-flow article:nth-child(even) { background: var(--subtle); }

.topic-list { display: grid; gap: 14px; }
.topic-list article { padding: 20px; background: var(--panel); border-left: 5px solid var(--gold); border-radius: 0 10px 10px 0; }
.topic-list article:nth-child(even) { margin-left: 34px; }
.topic-list article:nth-child(odd) { margin-right: 34px; }

.terms { display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.terms-nav { background: var(--deep); border-radius: 10px; padding: 14px; align-self: start; }
.terms-nav a { display: block; padding: 10px; border-bottom: 1px solid var(--border); }
.terms-copy section {
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
    padding: 20px; margin-bottom: 14px;
}

.faq-list details {
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 12px; padding: 0 18px;
}
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 16px 28px 16px 0; }
.faq-list details p { padding-bottom: 16px; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-grid article { padding: 20px; }
.notice { background: var(--ink); color: var(--panel); border-radius: 10px; padding: 18px; }
.notice h2, .notice h3 { color: var(--copper); }
.notice p:last-child { margin-bottom: 0; }

.about-banner { height: 200px; margin-bottom: 18px; }
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.about-grid > div, .about-grid > aside { padding: 20px; }
.brand-spare { height: 180px; margin-bottom: 14px; }

.index-late-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.index-late-grid article { padding: 18px; }
.index-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.index-faq article { padding: 16px; }
.brand-intro { padding: 22px; border-top: 3px solid var(--copper); }

.site-footer {
    background: var(--ink); color: var(--page); border-top: 1px solid var(--copper);
    padding: 32px 0 calc(34px + env(safe-area-inset-bottom)); font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--copper); margin-bottom: 20px; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.footer-links h2 { color: var(--copper); font-size: 14px; margin-bottom: 8px; }
.footer-links a { display: block; padding: 3px 0; color: var(--page); }
.footer-note { margin-top: 20px; max-width: 820px; color: #E2D2B4; }
.copyright { color: var(--copper); margin-bottom: 0; }

.overlay {
    position: fixed; inset: 0; z-index: 120; background: rgba(26,20,10,.48);
    visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .18s ease, visibility .18s ease;
}
.overlay.is-active { visibility: visible; opacity: 1; pointer-events: auto; }

.site-drawer {
    position: fixed; left: 18px; bottom: 18px; z-index: 130; width: 240px; max-height: 380px; overflow-y: auto;
    background: var(--panel); color: var(--text); border: 1px solid var(--strong-border); border-radius: 12px;
    box-shadow: var(--shadow); transform: translateY(24px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: .2s ease;
}
.site-drawer.is-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-head {
    position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
}
.drawer-brand { display: flex; align-items: center; gap: 8px; }
.close-button {
    min-width: 44px; min-height: 44px; border: 1px solid var(--gold);
    background: var(--panel); color: var(--ink); border-radius: 8px;
}
.drawer-groups { padding: 10px 12px 14px; }
.drawer-groups section { margin-bottom: 12px; }
.drawer-groups h2 { font-size: 13px; color: var(--gold); margin: 0 0 5px; }
.drawer-groups a { display: block; padding: 8px 0; border-bottom: 1px solid var(--border); }
.drawer-groups a strong, .drawer-groups a span { display: block; }
.drawer-groups a strong { font-size: 14px; color: var(--ink); }
.drawer-groups a span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.search-panel {
    position: fixed; top: calc(var(--top-h) + var(--mast-h)); left: 50%; z-index: 131;
    width: min(620px, calc(100% - 32px)); transform: translate(-50%, -16px);
    background: var(--panel); border: 1px solid var(--strong-border); border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow); padding: 16px; opacity: 0; visibility: hidden; pointer-events: none; transition: .18s ease;
}
.search-panel.is-open { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }
.search-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.search-panel label { display: block; color: var(--muted); margin-bottom: 8px; }
.search-panel input {
    width: 100%; height: 44px; border: 1px solid var(--gold);
    background: #fffaf0; color: var(--ink); border-radius: 8px; padding: 0 12px;
}
.search-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search-results a {
    border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px;
    background: var(--subtle); color: var(--ink);
}
.search-results a[hidden] { display: none; }
.mobile-bottom { display: none; }

@media (max-width: 720px) {
    :root { --dot-h: 0px; }
    .dot-nav { display: none; }
    .site-main { padding-top: calc(var(--top-h) + var(--mast-h) + 22px); padding-bottom: 82px; }
    .masthead-actions { gap: 4px; }
    .header-app-link, .drawer-trigger { padding-inline: 10px; min-width: 64px; }
    .triple-layout, .clip-layout, .shelf-pair, .index-late-grid, .index-faq, .contact-grid, .about-grid, .status-wrap, .period-grid, .terms {
        grid-template-columns: 1fr;
    }
    .triple-layout article:first-child { grid-row: auto; }
    .clip-layout article:first-child, .clip-layout article:last-child { transform: none; margin: 0; }
    .topic-list article:nth-child(even), .topic-list article:nth-child(odd) { margin: 0; }
    .period-visual .media-slot { position: static; height: 190px; }
    .status-row { grid-template-columns: 1fr; }
    .terms-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
    .terms-nav a { white-space: nowrap; border-bottom: 0; border-right: 1px solid var(--border); }
    .footer-links { grid-template-columns: 1fr 1fr; }
    .site-drawer {
        width: 88%; left: 6%; bottom: calc(60px + env(safe-area-inset-bottom)); max-height: min(380px, 70vh);
    }
    .search-panel {
        inset: 0; width: 100%; height: 100%; transform: none; border-radius: 0;
        background: var(--ink); color: var(--copper); padding: calc(28px + env(safe-area-inset-top)) 16px 16px;
    }
    .search-panel.is-open { transform: none; }
    .search-panel label, .search-head strong { color: var(--copper); }
    .search-panel .close-button { background: transparent; color: var(--copper); border-color: var(--copper); }
    .search-panel input { background: var(--panel); }
    .search-results a { background: var(--panel); color: var(--ink); border-color: var(--copper); }
    .mobile-bottom {
        display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
        min-height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: var(--ink); border-top: 1px solid var(--copper);
    }
    .mobile-bottom a {
        min-height: 48px; display: flex; align-items: center; justify-content: center;
        color: var(--page); font-size: 13px;
    }
    .mobile-bottom a.is-current { background: var(--copper); color: var(--ink); font-weight: 800; }
    .app-visuals { grid-template-columns: 1fr 66px; }
    .app-visuals .app-poster { height: 280px; }
    .app-visuals .app-icon { height: 66px; min-height: 66px; }
}
@media (max-width: 420px) {
    .shell, .page-shell { width: calc(100% - 32px); }
    .footer-links { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
    .hero-plain .index-dots { gap: 8px; }
    h1 { font-size: 24px; }
}
