:root {
    --bg: #F5FAFE;
    --deep-bg: #E7F2FA;
    --card: #FFFFFF;
    --soft: #D7EAF6;
    --title: #16324A;
    --text: #2A4156;
    --muted: #4E6A80;
    --subtle: #6E8899;
    --brand: #4AA3E0;
    --bright: #6BB8EC;
    --deep: #1B4A6E;
    --mist: #EAF5FC;
    --border: rgba(74,163,224,0.16);
    --strong-border: rgba(74,163,224,0.42);
    --shadow: 0 12px 28px rgba(27,74,110,0.08);
    --max: 1120px;
    --topline: 22px;
    --mast: 60px;
    --tabs: 40px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; font-size: 15px; line-height: 1.7; overflow-x: hidden; }
body.is-locked { overflow: hidden; }
a { color: var(--deep); text-decoration: none; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(74,163,224,0.30); outline-offset: 2px; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 2000; padding: 8px 14px; background: #fff; border: 1px solid var(--strong-border); border-radius: 8px; }
.skip-link:focus { top: 10px; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 1000; }
.topline { height: var(--topline); background: var(--deep); color: #fff; font-size: 12px; }
.topline-inner, .masthead-inner, .tabbar-inner, .footer-inner, .page-shell { width: min(var(--max), 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: #fff; min-width: 44px; height: 22px; padding: 0 8px; cursor: pointer; font-size: 12px; }
.masthead { height: var(--mast); background: #fff; border-bottom: 1px solid var(--border); }
.masthead-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand-link { justify-self: start; min-width: 56px; min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo, .drawer-logo, .footer-logo { height: 28px; width: auto; max-width: 150px; object-fit: contain; object-position: center; }
.brand-fallback { color: var(--title); font-size: 16px; font-weight: 800; letter-spacing: .08em; }
.drawer-trigger { justify-self: center; border: 1px solid var(--strong-border); background: var(--mist); color: var(--deep); border-radius: 10px; height: 44px; min-width: 82px; padding: 0 18px; cursor: pointer; }
.app-link { justify-self: end; display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 88px; padding: 0 16px; border-radius: 10px; background: linear-gradient(135deg,#6BB8EC 0%,#4AA3E0 55%,#1B4A6E 100%); color: #fff; font-size: 14px; font-weight: 700; }
.app-link:hover { color: #fff; filter: brightness(1.03); }
.tabbar { height: var(--tabs); background: var(--mist); border-bottom: 1px solid var(--border); }
.tabbar-inner { height: 100%; display: flex; justify-content: center; align-items: center; gap: 6px; }
.tab-link { height: 32px; min-width: 82px; display: inline-flex; align-items: center; justify-content: center; color: var(--deep); font-size: 13px; border-radius: 8px; }
.tab-link.is-active { background: var(--brand); color: #fff; }
.site-main { padding-top: calc(var(--topline) + var(--mast) + var(--tabs)); min-height: 70vh; }
.page-shell { padding: 34px 0 72px; }
.page-hero { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .10em; }
h1, h2, h3 { margin-top: 0; color: var(--title); line-height: 1.3; }
h1 { margin-bottom: 12px; font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 16px; max-width: 850px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.button { min-height: 42px; padding: 0 17px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; white-space: nowrap; }
.button-primary { background: linear-gradient(135deg,#6BB8EC 0%,#4AA3E0 55%,#1B4A6E 100%); color: #fff; }
.button-primary:hover { color: #fff; filter: brightness(1.04); }
.button-secondary { background: #fff; border: 1px solid var(--strong-border); color: var(--deep); }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head p { margin: 0; color: var(--subtle); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .text-panel, .index-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.card p:last-child, .text-panel p:last-child { margin-bottom: 0; }
.card .meta { color: var(--subtle); font-size: 13px; }
.media-slot { width: 100%; background: var(--mist); border: 1px solid var(--border); 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-cover { height: 260px; }
.media-card { height: 180px; margin-bottom: 14px; }
.media-section { height: 200px; margin-bottom: 16px; }
.media-app { height: min(360px, 58vw); max-height: 360px; }
.cover-copy { text-align: center; padding: 20px 20px 0; }
.cover-copy h1 { margin-bottom: 8px; }
.cover-copy .brand-line { color: var(--subtle); font-size: 13px; margin-bottom: 4px; }
.cover-copy .lead { margin: 0 auto; max-width: 760px; }
.cover-copy .action-row { justify-content: center; }
.numbered-list, .shelf-list, .topic-list, .timeline, .note-list { list-style: none; padding: 0; margin: 0; }
.numbered-list li, .topic-list li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.numbered-list li:first-child, .topic-list li:first-child { border-top: 0; }
.num { font-size: 24px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.num.small { font-size: 18px; }
.shelf-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.shelf-list li { background: var(--mist); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.shelf-list a { font-weight: 800; }
.timeline { border-left: 2px solid var(--soft); margin-left: 9px; padding-left: 24px; }
.timeline li { position: relative; padding: 0 0 24px; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--strong-border); }
.status { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 0 10px; background: var(--mist); color: var(--deep); font-size: 12px; border: 1px solid var(--border); }
.note-list { display: grid; gap: 12px; }
.note-list li { background: #fff; border-left: 3px solid var(--bright); border-radius: 0 10px 10px 0; padding: 14px 16px; box-shadow: var(--shadow); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.app-showcase { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; align-items: center; }
.icon-line { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.app-icon-slot { width: 48px; height: 48px; border-radius: 12px; background: var(--mist); border: 1px solid var(--border); overflow: hidden; flex: 0 0 auto; }
.app-icon-slot img { width: 100%; height: 100%; object-fit: contain; }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.faq-item h2, .faq-item h3 { margin-bottom: 8px; }
.definition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.index-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.index-links a { min-height: 96px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.index-links strong { color: var(--title); }
.index-links span { color: var(--subtle); font-size: 13px; }
.site-footer { background: var(--deep); color: #E7F2FA; border-top: 1px solid rgba(234,245,252,.25); }
.footer-inner { padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.footer-brand-link { display: inline-flex; min-width: 52px; min-height: 44px; align-items: center; }
.footer-brand-mark { color: #fff; font-size: 20px; font-weight: 800; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.25; }
.footer-brand strong { color: #fff; font-size: 16px; }
.footer-brand span { color: #D7EAF6; font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; }
.footer-grid h2 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer-grid a { display: block; color: #E7F2FA; font-size: 13px; padding: 4px 0; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-note, .copyright { color: #D7EAF6; font-size: 13px; }
.footer-note { margin-top: 24px; max-width: 900px; }
.copyright { margin-bottom: 0; }
.page-overlay { position: fixed; inset: 0; background: rgba(22,50,74,.38); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 1190; }
.page-overlay.is-visible { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100dvh; width: min(400px, 86vw); background: #fff; z-index: 1200; box-shadow: -18px 0 44px rgba(22,50,74,.16); transform: translateX(102%); visibility: hidden; pointer-events: none; transition: transform .2s ease, visibility .2s ease; display: flex; flex-direction: column; }
.drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-brand { display: flex; align-items: center; gap: 10px; color: var(--title); font-weight: 800; }
.icon-button { min-height: 44px; min-width: 56px; border: 1px solid var(--strong-border); border-radius: 10px; background: #fff; color: var(--deep); cursor: pointer; }
.drawer-body { overflow-y: auto; padding: 16px; }
.drawer-group { margin-bottom: 18px; }
.drawer-group h2 { font-size: 13px; color: var(--subtle); margin-bottom: 6px; letter-spacing: .08em; }
.drawer-group a { display: grid; gap: 2px; padding: 10px 8px; border-radius: 8px; }
.drawer-group a:hover { background: var(--mist); }
.drawer-group strong { color: var(--title); }
.drawer-group span { color: var(--subtle); font-size: 12px; }
.search-layer { position: fixed; top: calc(var(--topline) + var(--mast)); left: 0; right: 0; z-index: 1180; visibility: hidden; pointer-events: none; transform: translateY(-16px); opacity: 0; transition: .18s ease; }
.search-layer.is-open { visibility: visible; pointer-events: auto; transform: translateY(0); opacity: 1; }
.search-card { width: min(720px, calc(100% - 32px)); margin: 12px auto 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 22px 60px rgba(22,50,74,.18); }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--title); }
.search-label { display: block; margin: 8px 0; color: var(--muted); }
.search-input { width: 100%; min-height: 44px; border: 1px solid var(--strong-border); border-radius: 10px; padding: 8px 12px; color: var(--text); background: #fff; }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search-presets a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--mist); border: 1px solid var(--border); }
.search-empty { margin: 12px 0 0; color: var(--subtle); }
.mobile-bottom { display: none; }
.kicker-card { background: var(--mist); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; color: var(--deep); }
.rule-list { margin: 0; padding-left: 22px; }
.rule-list li { margin: 7px 0; }
.callout { background: var(--deep); color: #fff; border-radius: 12px; padding: 18px 20px; }
.callout h2, .callout h3 { color: #fff; }
.callout p, .callout a { color: #E7F2FA; }
.table-like { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.table-row { display: grid; grid-template-columns: 160px 1fr; background: #fff; }
.table-row strong, .table-row span { padding: 13px 15px; }
.table-row strong { background: var(--mist); color: var(--title); }
@media (max-width: 820px) {
    :root { --tabs: 0px; }
    .topline-inner, .masthead-inner, .footer-inner, .page-shell { width: calc(100% - 32px); }
    .tabbar { display: none; }
    .site-main { padding-top: calc(var(--topline) + var(--mast)); padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
    .page-shell { padding-top: 22px; }
    .page-hero { padding: 20px; }
    .card-grid, .card-grid.two, .definition-grid, .footer-grid, .split, .app-showcase { grid-template-columns: 1fr; }
    .index-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .shelf-list { grid-template-columns: 1fr; }
    .media-cover { height: 260px; }
    .search-layer { top: 0; bottom: 0; background: var(--deep); display: flex; align-items: flex-start; padding-top: max(24px, env(safe-area-inset-top)); }
    .search-card { width: calc(100% - 32px); margin: 0 auto; background: transparent; border: 0; box-shadow: none; color: #fff; }
    .search-head, .search-label { color: #fff; }
    .search-head .icon-button { border-color: rgba(255,255,255,.35); background: transparent; color: #fff; }
    .search-input { background: #fff; color: var(--text); }
    .search-presets a { background: #fff; border-color: rgba(255,255,255,.5); color: var(--deep); }
    .search-empty { color: #E7F2FA; }
    .mobile-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; display: grid; grid-template-columns: repeat(5,1fr); height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(27,74,110,.08); }
    .mobile-bottom a { display: flex; align-items: center; justify-content: center; min-height: 48px; color: var(--deep); font-size: 12px; }
    .mobile-bottom a.is-active { background: var(--brand); color: #fff; }
    .table-row { grid-template-columns: 1fr; }
    .table-row strong { padding-bottom: 6px; }
    .table-row span { padding-top: 6px; }
}
@media (max-width: 520px) {
    .masthead-inner { grid-template-columns: minmax(52px,1fr) auto minmax(76px,1fr); gap: 6px; }
    .brand-logo { max-width: 88px; }
    .drawer-trigger { min-width: 70px; padding: 0 12px; }
    .app-link { min-width: 76px; padding: 0 12px; }
    .cover-copy { padding-left: 0; padding-right: 0; }
    .media-cover { height: 220px; }
    .page-hero { padding: 18px; }
    .card, .text-panel, .index-panel { padding: 17px; }
    .index-links { grid-template-columns: 1fr; }
}
