:root {
    --bg: #E8F4F0;
    --deep-bg: #C8E4DC;
    --surface: #F4FAF8;
    --surface-2: #DCEEE8;
    --title: #16382E;
    --text: #245044;
    --muted: #4A7468;
    --soft: #6A9488;
    --green: #2A8A72;
    --green-2: #3AA88A;
    --gold: #C4A050;
    --border: rgba(22,56,46,0.12);
    --focus: rgba(42,138,114,0.48);
    --shadow: 0 12px 28px rgba(22,56,46,0.08);
    --top-h: 20px;
    --head-h: 54px;
    --point-h: 48px;
}
* { 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;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 1000;
    background: var(--surface); color: var(--title); padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }
.topline {
    position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 120;
    background: var(--green); color: var(--surface); font-size: 12px;
}
.topline-inner, .header-inner, .point-arc, .site-main, .footer-inner {
    width: min(960px, calc(100% - 32px)); margin: 0 auto;
}
.topline-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.text-button { border: 0; background: transparent; color: var(--surface); padding: 0 4px; min-height: 20px; position: relative; }
.text-button::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
.site-header {
    position: fixed; top: var(--top-h); left: 0; right: 0; height: var(--head-h); z-index: 115;
    background: var(--surface); border-bottom: 1px solid rgba(42,138,114,0.25);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand-link { display: inline-flex; align-items: center; min-height: 44px; }
.brand-logo, .drawer-logo, .footer-logo { height: 24px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { font-size: 16px; font-weight: 800; color: var(--title); letter-spacing: .04em; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-app, .menu-button {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 14px; border-radius: 10px; font-size: 14px;
}
.header-app { background: linear-gradient(135deg,#2A8A72 0%,#3AA88A 100%); color: var(--surface); }
.menu-button { border: 1px solid var(--green); background: var(--surface); color: var(--title); }
.point-nav {
    position: fixed; top: calc(var(--top-h) + var(--head-h)); left: 0; right: 0; height: var(--point-h); z-index: 110;
    background: var(--surface); border-bottom: 1px solid var(--border);
}
.point-arc { height: 100%; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.point-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; color: var(--muted); min-height: 44px; }
.point-item:nth-child(3) { transform: translateY(-4px); }
.point-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--green-2); border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(42,138,114,.25); }
.point-item.is-current { color: var(--title); font-weight: 800; }
.point-item.is-current .point-dot { width: 14px; height: 14px; background: var(--green); }
.site-main { padding-top: calc(var(--top-h) + var(--head-h) + var(--point-h) + 28px); padding-bottom: 72px; }
h1, h2, h3 { color: var(--title); line-height: 1.3; margin: 0 0 12px; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 14px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; color: var(--green); font-weight: 800; text-transform: uppercase; }
.lead { font-size: 16px; color: var(--title); max-width: 760px; }
.page-intro { margin-bottom: 26px; }
.page-intro .lead { margin-top: 6px; }
.section { margin: 34px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0; }
.primary-btn, .secondary-btn {
    display: inline-flex; min-height: 44px; padding: 0 16px; border-radius: 10px; align-items: center; justify-content: center;
    font-size: 14px; white-space: nowrap; border: 1px solid transparent;
}
.primary-btn { background: linear-gradient(135deg,#2A8A72 0%,#3AA88A 100%); color: var(--surface); }
.secondary-btn { background: var(--surface); color: var(--title); border-color: var(--green); }
.primary-btn:hover, .secondary-btn:hover, .header-app:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.media-slot {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; min-height: 150px;
}
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; }
.soft-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.home-index { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.home-index a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--muted); }
.home-index i { width: 10px; height: 10px; border-radius: 50%; background: var(--green-2); }
.hero-note { padding: 26px 0 12px; }
.hero-note .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.split-strips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split-strip { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; min-height: 164px; }
.split-strip.with-image { display: grid; grid-template-columns: 1fr 180px; gap: 16px; align-items: center; }
.split-strip.with-image .media-slot { height: 164px; min-height: 164px; }
.vertical-record { border-left: 2px solid rgba(42,138,114,.28); padding-left: 18px; display: grid; gap: 16px; }
.record-item { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.record-item::before { content: ""; position: absolute; left: -25px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); }
.record-item.has-image { display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.record-item.has-image .media-slot { min-height: 150px; }
.clipped-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.clip-page { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px 14px 14px 10px; padding: 20px; box-shadow: var(--shadow); }
.clip-page::after { content: ""; position: absolute; top: 10px; right: 12px; width: 34px; height: 6px; border-radius: 99px; background: rgba(196,160,80,.55); }
.clip-page .media-slot { margin-bottom: 14px; min-height: 176px; }
.shelf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shelf-head { grid-column: 1 / -1; }
.shelf-head .media-slot { min-height: 190px; }
.period-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.period-card { background: var(--surface); border-top: 4px solid var(--green); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.status-list { display: grid; gap: 12px; }
.status-row { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; }
.status-badge { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; border-radius: 99px; background: var(--surface-2); color: var(--title); font-weight: 700; }
.app-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; align-items: center; }
.app-visual { display: grid; gap: 10px; justify-items: center; }
.app-visual .media-slot:first-child { width: min(100%, 280px); height: 320px; }
.app-icon { width: 48px; height: 48px; object-fit: contain; }
.icon-slot { width: 64px; height: 64px; min-height: 64px; }
.method-list, .memo-list, .topic-list, .terms-list { display: grid; gap: 12px; }
.method-item, .memo-item, .topic-item, .term-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.topic-item { border-left: 4px solid var(--green); }
.center-cards { width: min(760px, 100%); margin: 0 auto; display: grid; gap: 16px; }
.center-card { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.center-card .media-slot { margin-bottom: 14px; min-height: 190px; }
.single-column { width: min(760px, 100%); margin: 0 auto; }
.single-column .media-slot { margin: 18px 0; min-height: 220px; }
.right-image-left-text { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.right-image-left-text .media-slot { min-height: 220px; }
.five-notes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.note-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.faq-item h2 { font-size: 16px; margin-bottom: 8px; }
.about-banner .media-slot { height: 200px; min-height: 200px; }
.brand-panel { background: var(--title); color: var(--bg); border-radius: 14px; padding: 22px; }
.brand-panel h2, .brand-panel h3 { color: var(--surface); }
.brand-panel p { color: #DCEEE8; }
.eyebrow-on-dark { color: #C8E4DC; }
.spaced-block { margin-top: 14px; }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--green); font-weight: 700; }
.site-footer { background: var(--title); color: var(--bg); border-top: 1px solid rgba(244,250,248,.28); font-size: 13px; }
.footer-inner { padding: 30px 0 80px; }
.footer-brand-row { border-bottom: 1px solid rgba(244,250,248,.2); padding-bottom: 16px; margin-bottom: 18px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand strong { color: var(--surface); }
.footer-brand span { color: #C8E4DC; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.footer-links h2 { font-size: 13px; color: var(--surface); margin-bottom: 8px; }
.footer-links a { display: flex; align-items: center; color: #DCEEE8; min-height: 44px; }
.footer-note { margin-top: 22px; color: #DCEEE8; }
.copyright { color: #AFCFC5; }
.page-mask {
    position: fixed; inset: 0; z-index: 200; background: rgba(22,56,46,.34); opacity: 0; visibility: hidden; pointer-events: none; transition: .2s ease;
}
.page-mask.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.site-drawer {
    position: fixed; top: 0; left: 0; z-index: 220; width: min(36vw, 460px); min-width: 330px; max-height: 94vh; overflow-y: auto;
    background: var(--surface); color: var(--text); box-shadow: 16px 0 40px rgba(22,56,46,.18);
    transform: translateX(-104%); visibility: hidden; pointer-events: none; transition: .24s ease; border-radius: 0 0 14px 0;
}
.site-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { position: sticky; top: 0; background: var(--surface); z-index: 2; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.drawer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--title); }
.icon-close { min-height: 44px; min-width: 60px; border: 1px solid var(--border); background: var(--surface); color: var(--title); border-radius: 10px; }
.drawer-groups { padding: 8px 16px 22px; }
.drawer-groups section { margin: 18px 0; }
.drawer-groups h2 { font-size: 13px; color: var(--green); margin-bottom: 8px; }
.drawer-groups a { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); min-height: 52px; }
.drawer-groups a span { color: var(--muted); font-size: 13px; }
.search-panel { position: fixed; inset: calc(var(--top-h) + var(--head-h)) 0 auto 0; z-index: 230; pointer-events: none; }
.search-panel.is-open { pointer-events: auto; }
.search-card { width: min(760px, calc(100% - 32px)); margin: 12px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.search-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.search-head p { color: var(--muted); margin-top: 4px; }
.search-label { display: block; color: var(--muted); margin-bottom: 6px; }
.search-input { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: white; color: var(--title); }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search-presets a { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 10px; background: var(--surface-2); color: var(--title); }
.no-scroll { overflow: hidden; }
.mobile-bottom { display: none; }

/* Distinct inner-page compositions */
.page-wenji .page-intro { border-left: 4px solid var(--green); padding-left: 18px; }
.page-wenchang .page-intro { background: var(--surface-2); padding: 18px; border-radius: 12px; }
.page-wenbu .page-intro { text-align: right; max-width: 780px; margin-left: auto; }
.page-wenci .page-intro { width: min(760px, 100%); margin-inline: auto; }
.page-xunwen .page-intro { border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.page-wenli .page-intro { background: var(--surface); padding: 18px; border-radius: 12px; box-shadow: var(--shadow); }
.page-wenbei .page-intro { max-width: 700px; }
.page-kanwen .page-intro { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; align-items: end; }
.page-wenzhuan .page-intro { border-top: 4px solid var(--gold); padding-top: 16px; }
.page-wenjia .page-intro { text-align: center; max-width: 720px; margin-inline: auto; }

@media (max-width: 760px) {
    :root { --point-h: 0px; }
    .point-nav { display: none; }
    .topline-inner, .header-inner, .site-main, .footer-inner { width: calc(100% - 32px); }
    .site-main { padding-top: calc(var(--top-h) + var(--head-h) + 22px); padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    .header-app, .menu-button { padding: 0 10px; }
    .split-strips, .clipped-pages, .shelf-cards, .period-grid, .footer-links, .app-layout, .right-image-left-text { grid-template-columns: 1fr; }
    .split-strip.with-image, .record-item.has-image { grid-template-columns: 1fr; }
    .split-strip.with-image .media-slot { height: 164px; }
    .five-notes { grid-template-columns: 1fr 1fr; }
    .status-row { grid-template-columns: 1fr; gap: 8px; }
    .footer-inner { padding-bottom: 92px; }
    .site-drawer { width: min(86vw, 390px); min-width: 0; max-height: 92vh; }
    .drawer-groups a { grid-template-columns: 76px 1fr; }
    .search-panel { inset: 0; background: var(--green); }
    .search-card { width: 100%; min-height: 100vh; margin: 0; border-radius: 0; border: 0; background: var(--green); color: var(--surface); padding: calc(env(safe-area-inset-top) + 24px) 16px 30px; }
    .search-head strong, .search-head p, .search-label { color: var(--surface); }
    .search-card .icon-close { background: var(--surface); }
    .search-presets a { background: rgba(244,250,248,.16); color: var(--surface); border: 1px solid rgba(244,250,248,.34); }
    .mobile-bottom {
        position: fixed; z-index: 150; left: 0; right: 0; bottom: 0; height: calc(48px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border);
        display: grid; grid-template-columns: repeat(4, 1fr);
    }
    .mobile-bottom a { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 13px; color: var(--muted); }
    .mobile-bottom a.is-current { background: var(--green); color: var(--surface); font-weight: 800; }
    .page-kanwen .page-intro { grid-template-columns: 1fr; }
    .page-wenbu .page-intro { text-align: left; }
}
@media (max-width: 480px) {
    .header-actions { gap: 4px; }
    .header-app, .menu-button { font-size: 13px; }
    .home-index { gap: 8px 12px; }
    .five-notes { grid-template-columns: 1fr; }
    .app-visual .media-slot:first-child { height: 280px; }
}
