:root {
    --bg: #0C0B0A;
    --bg-deep: #161311;
    --surface: #1C1916;
    --surface-2: #26221D;
    --paper: #F3E6D2;
    --title: #FFF8F0;
    --text: #EDE4D8;
    --muted: #B7A898;
    --soft: #8A7B6C;
    --red: #E11D2E;
    --red-hi: #FF4A4F;
    --wine: #8B1E2D;
    --rust: #E25A2A;
    --amber: #E2B14A;
    --line: rgba(226,177,74,.16);
    --line-strong: rgba(225,29,46,.40);
    --shadow: 0 18px 44px rgba(0,0,0,.46);
    --footer: #080706;
    --footer-text: #D8CBBA;
    --max: 1280px;
}

* { 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", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--title); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}
button, input, summary { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
figure { margin: 0; min-width: 0; }
section, article, aside, nav, div { min-width: 0; }
[hidden] { display: none !important; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 1000;
    padding: 10px 14px;
    background: var(--paper);
    color: #241a14;
    border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.brand-header {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #11100e 0%, #0c0b0a 100%);
}
.brand-header-inner {
    max-width: var(--max);
    min-height: 80px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-logo { display: block; height: 34px; width: auto; object-fit: contain; object-position: center; }
.brand-text-logo { color: var(--title); font-size: 24px; font-weight: 800; letter-spacing: .08em; }
.brand-en { color: var(--muted); font-size: 12px; letter-spacing: .16em; white-space: nowrap; }
.header-shortcuts { display: flex; align-items: center; gap: 10px; }
.header-shortcuts a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--muted);
    border-radius: 6px;
    border: 1px solid transparent;
}
.header-shortcuts a:hover, .header-shortcuts a[aria-current="page"] {
    color: var(--title);
    border-color: var(--line-strong);
    background: rgba(225,29,46,.08);
}

.tool-zone { border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.tool-zone-inner { max-width: var(--max); margin: 0 auto; padding: 10px 24px; display: flex; gap: 12px; align-items: flex-start; }
.tool-panel { flex: 1 1 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tool-panel summary {
    list-style: none;
    min-height: 44px;
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--title);
    font-weight: 700;
}
.tool-panel summary::-webkit-details-marker { display: none; }
.summary-state::before { content: "+"; color: var(--red-hi); font-size: 20px; }
details[open] > summary .summary-state::before { content: "−"; }
.tool-body { border-top: 1px solid var(--line); padding: 18px; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.directory-group h2 { margin: 0 0 10px; color: var(--paper); font-size: 15px; }
.directory-group a, .search-result {
    min-height: 44px;
    padding: 9px 10px;
    display: block;
    border-left: 2px solid transparent;
    border-radius: 4px;
}
.directory-group a:hover, .directory-group a[aria-current="page"], .search-result:hover {
    background: rgba(225,29,46,.07);
    border-left-color: var(--red);
}
.directory-group strong, .search-result strong { display: block; color: var(--title); font-size: 14px; }
.directory-group span, .search-result span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tool-close {
    min-height: 44px;
    margin-top: 16px;
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--paper);
}
.site-search label { display: block; color: var(--title); font-weight: 700; margin-bottom: 8px; }
.search-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.search-controls input {
    min-width: 0;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #110f0d;
    color: var(--text);
    padding: 8px 12px;
}
.search-controls button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    background: var(--paper);
    color: #241a14;
    font-weight: 700;
}
.search-status { color: var(--muted); font-size: 13px; margin: 10px 0; }
.search-results { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }

.content-shell {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 24px 72px;
    display: grid;
    grid-template-columns: 196px minmax(0,1fr);
    gap: 24px;
    align-items: start;
}
.desktop-sidebar { align-self: start; }
.sidebar-nav { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 16px; }
.sidebar-nav section + section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-nav h2 { margin: 0 0 8px; font-size: 13px; color: var(--soft); letter-spacing: .12em; }
.sidebar-nav a { position: relative; min-height: 40px; display: flex; align-items: center; padding: 6px 8px 6px 12px; color: var(--muted); border-radius: 4px; }
.sidebar-nav a::before { content: ""; position: absolute; left: 0; width: 3px; height: 14px; border-radius: 3px; background: transparent; pointer-events: none; }
.sidebar-nav a:hover, .sidebar-nav a[aria-current="page"] { color: var(--title); background: rgba(255,255,255,.025); }
.sidebar-nav a[aria-current="page"]::before { background: var(--red); }
.sidebar-full { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px !important; color: var(--paper) !important; }
@media (min-width: 1100px) and (min-height: 760px) {
    .sidebar-nav { position: sticky; top: 18px; }
}

.main-content { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--paper); }
.page-lead { margin-bottom: 40px; max-width: 800px; }
.page-kicker { display: inline-block; margin-bottom: 8px; color: var(--red-hi); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 0; color: var(--title); font-size: clamp(28px, 3vw, 32px); line-height: 1.28; }
.page-intro { margin: 16px 0 0; color: var(--muted); font-size: 17px; max-width: 760px; }

.section-block { margin: 0 0 48px; }
.section-heading { margin-bottom: 18px; }
.section-heading > span { display: inline-block; color: var(--red-hi); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.section-heading h2 { margin: 4px 0 0; color: var(--title); font-size: 23px; line-height: 1.35; }
.section-block h3 { color: var(--paper); font-size: 18px; line-height: 1.45; margin: 22px 0 8px; }
.section-block p, .article-column p { margin: 0 0 16px; }
.section-block p:last-child, .article-column p:last-child { margin-bottom: 0; }
.article-column { max-width: 780px; }
.article-column.wide { max-width: 900px; }
.editor-note { border-left: 3px solid var(--red); padding-left: 16px; color: var(--paper); }
.muted-note { color: var(--muted); }

.hero-editorial {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 48px;
    padding: 24px;
    border: 1px solid var(--line);
    background: radial-gradient(circle at 85% 10%, rgba(139,30,45,.22), transparent 38%), var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.hero-copy .eyebrow { color: var(--red-hi); font-weight: 800; letter-spacing: .08em; }
.hero-copy h1 { margin-top: 8px; }
.hero-statement { margin: 14px 0 12px; color: var(--title); font-size: 21px; font-weight: 700; line-height: 1.5; }
.hero-copy p { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-primary, .button-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 800;
}
.button-primary { background: linear-gradient(135deg,#FF4A4F 0%,#E11D2E 46%,#E25A2A 100%); color: #fffaf5; }
.button-secondary { background: var(--paper); color: #241a14; }
.hero-media { display: flex; justify-content: center; align-items: center; min-height: 180px; }
.hero-media img { max-height: 300px; width: auto; max-width: 100%; object-fit: contain; object-position: center; }

.content-image { display: block; width: auto; max-width: 100%; height: auto; object-fit: contain; object-position: center; margin-inline: auto; }
.image-fallback {
    width: 100%;
    min-height: 130px;
    max-height: 180px;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #171311, #2b1718);
    border: 1px solid var(--line-strong);
    color: var(--paper);
    text-align: center;
}
.image-fallback span { font-weight: 800; letter-spacing: .05em; }
.column-image { max-height: 240px; }
.app-image { max-height: 420px; }
.app-mark { max-height: 72px; }

.path-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.path-link { min-height: 124px; padding: 16px; border-top: 2px solid var(--red); background: var(--surface); }
.path-link strong { display: block; color: var(--title); margin-bottom: 6px; }
.path-link span { display: block; color: var(--muted); font-size: 14px; line-height: 1.6; }

.split-section { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.35fr); gap: 28px; align-items: start; }
.split-section.reverse { grid-template-columns: minmax(0,1.35fr) minmax(260px,.8fr); }
.split-section .media-box { background: var(--surface); border: 1px solid var(--line); padding: 18px; display: flex; justify-content: center; align-items: center; }
.digest-list { display: grid; gap: 14px; }
.digest-item { padding: 16px 0 16px 16px; border-left: 2px solid var(--line-strong); }
.digest-item h3 { margin: 0 0 6px; font-size: 18px; }
.digest-item p { color: var(--muted); margin: 0 0 8px; }
.inline-link { color: var(--paper); font-weight: 700; border-bottom: 1px solid var(--red); }

.feature-top-image { margin-bottom: 22px; padding: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; justify-content: center; }
.feature-top-image img { max-height: 240px; width: auto; object-fit: contain; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.mini-note { padding: 16px; border-top: 2px solid var(--red); background: var(--surface); }
.mini-note strong { display: block; color: var(--paper); margin-bottom: 6px; }
.mini-note span { color: var(--muted); font-size: 14px; line-height: 1.6; }

.editorial-pair { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.editorial-unit { border: 1px solid var(--line); background: var(--surface); padding: 20px; }
.editorial-unit figure { min-height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.editorial-unit h3 { margin-top: 0; }
.reading-points { margin: 14px 0 0; padding: 0; list-style: none; }
.reading-points li { padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); }

.horizontal-band { display: grid; grid-template-columns: minmax(220px,.6fr) minmax(0,1.4fr); gap: 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.horizontal-band:last-child { border-bottom: 1px solid var(--line); }
.horizontal-band figure { display: flex; justify-content: center; align-items: center; }
.check-points { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.check-point { padding: 12px; background: var(--surface); border-top: 2px solid var(--amber); }
.check-point strong { display: block; color: var(--paper); }
.check-point span { color: var(--muted); font-size: 13px; line-height: 1.55; }

.compare-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.compare-cell { padding: 18px; background: var(--paper); color: #2a2019; border-radius: 6px; }
.compare-cell h3 { margin: 0 0 8px; color: #2a2019; }
.compare-cell p { margin: 0; color: #4a3a2f; }

.trace-list { display: grid; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 8px; }
.trace-item { position: relative; padding: 0 0 22px 22px; }
.trace-item::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); pointer-events: none; }
.trace-item strong { color: var(--paper); display: block; }
.trace-item span { color: var(--muted); }

.status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.status-card { padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.status-card strong { color: var(--title); display: block; margin-bottom: 6px; }
.status-card span { color: var(--muted); font-size: 14px; line-height: 1.65; }

.topic-block { padding: 20px 0; border-top: 1px solid var(--line); }
.topic-block:last-child { border-bottom: 1px solid var(--line); }
.topic-block h3 { margin-top: 0; }
.observation-box { margin-top: 18px; padding: 18px; background: var(--surface); border-left: 3px solid var(--rust); }
.observation-label { color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: .1em; }

.clue-strip { border-top: 2px solid var(--red); border-bottom: 1px solid var(--line); padding: 24px 0; }
.clue-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.text-link-button { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--paper); }

.mobile-reading { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(220px,.7fr); gap: 28px; align-items: center; }
.mobile-art { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; justify-items: center; }
.mobile-art .app-image { max-height: 420px; }
.mobile-art .app-mark { max-width: 72px; }

.triple-text { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.text-unit { padding: 20px; border-top: 2px solid var(--red); background: var(--surface); }
.text-unit h3 { margin-top: 0; }
.text-unit p { color: var(--muted); }

.article-card { margin-bottom: 24px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.article-card h2 { margin: 0 0 12px; color: var(--title); font-size: 22px; }
.article-card h3 { margin-top: 20px; }
.article-card p { margin: 0 0 15px; }
.article-card p:last-child { margin-bottom: 0; }
.article-image-wrap { display: flex; justify-content: center; align-items: center; padding: 18px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; }
.article-image-wrap img { max-height: 260px; width: auto; object-fit: contain; }
.narrow-article { max-width: 760px; }

.contents-list { margin: 0 0 28px; padding: 16px 18px 16px 34px; background: var(--surface); border: 1px solid var(--line); }
.contents-list a { color: var(--paper); border-bottom: 1px solid transparent; }
.contents-list a:hover { border-color: var(--red); }

.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 12px; vertical-align: top; text-align: left; }
.data-table th { background: var(--surface-2); color: var(--paper); width: 26%; }
.data-table td { color: var(--text); }

.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { min-height: 52px; padding: 12px 0; cursor: pointer; color: var(--title); font-weight: 800; }
.faq-answer { padding: 0 0 18px; color: var(--muted); max-width: 780px; }

.related-section { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.related-link { min-height: 120px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.related-link:hover { border-color: var(--line-strong); }
.related-link strong { display: block; color: var(--title); margin-bottom: 6px; }
.related-link span { display: block; color: var(--muted); font-size: 14px; line-height: 1.6; }

.site-footer { background: var(--footer); border-top: 1px solid var(--red); color: var(--footer-text); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px 24px 42px; }
.footer-brand { margin-bottom: 28px; }
.footer-lockup { margin-bottom: 8px; }
.footer-brand p { margin: 0; color: var(--muted); }
.footer-directory { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 20px; }
.footer-group h2 { color: var(--paper); font-size: 14px; margin: 0 0 10px; }
.footer-group a { display: block; min-height: 36px; padding: 5px 0; color: var(--muted); font-size: 14px; }
.footer-group a:hover, .footer-group a[aria-current="page"] { color: var(--title); }
.footer-note { max-width: 900px; margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-copy { margin: 14px 0 0; color: var(--soft); font-size: 13px; }
.mobile-bottom-nav { display: none; }

@media (max-width: 1099px) {
    .content-shell { grid-template-columns: minmax(0,1fr); padding-top: 32px; }
    .desktop-sidebar { display: none; }
    .directory-tool { display: block; }
    .tool-zone-inner { align-items: stretch; }
}
@media (min-width: 1100px) {
    .directory-tool { display: none; }
    .search-tool { max-width: 520px; }
    .tool-zone-inner { justify-content: flex-end; }
}

@media (max-width: 900px) {
    .hero-editorial, .split-section, .split-section.reverse, .mobile-reading { grid-template-columns: 1fr; }
    .editorial-pair { grid-template-columns: 1fr; }
    .horizontal-band { grid-template-columns: minmax(180px,.55fr) minmax(0,1.45fr); }
    .path-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .status-grid, .triple-text, .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-directory { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .mobile-art { grid-template-columns: 1fr auto; }
}

@media (max-width: 767px) {
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    .brand-header-inner { min-height: 64px; padding: 10px 16px; gap: 12px; }
    .brand-logo { height: 30px; }
    .brand-text-logo { font-size: 21px; }
    .brand-en { font-size: 10px; letter-spacing: .1em; }
    .header-shortcuts a { padding: 6px 8px; font-size: 13px; }
    .header-shortcuts a[href="faq.php"] { display: none; }
    .tool-zone-inner { padding: 8px 16px; flex-direction: column; }
    .tool-panel { width: 100%; }
    .directory-grid, .search-results { grid-template-columns: 1fr; }
    .content-shell { padding: 28px 16px 48px; }
    h1 { font-size: clamp(24px, 7vw, 28px); }
    .page-intro { font-size: 16px; }
    .section-block { margin-bottom: 34px; }
    .section-heading h2 { font-size: 21px; }
    .hero-editorial { padding: 18px; gap: 20px; }
    .hero-statement { font-size: 19px; }
    .hero-media img { max-height: 260px; }
    .path-grid, .status-grid, .triple-text, .related-grid, .mini-grid, .check-points { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .horizontal-band { grid-template-columns: 1fr; gap: 14px; }
    .compare-grid { grid-template-columns: 1fr; }
    .mobile-reading { gap: 18px; }
    .mobile-art { grid-template-columns: 1fr; }
    .mobile-art .app-image { max-height: 360px; }
    .app-image { max-height: 360px; }
    .column-image { max-height: none; }
    .image-fallback { max-height: 140px; }
    .footer-inner { padding: 34px 16px calc(92px + env(safe-area-inset-bottom)); }
    .footer-directory { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 14px; }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        height: calc(56px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5,minmax(0,1fr));
        background: rgba(8,7,6,.98);
        border-top: 1px solid var(--line-strong);
    }
    .mobile-bottom-nav a { min-width: 0; min-height: 56px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; font-weight: 700; }
    .mobile-bottom-nav a[aria-current="page"] { color: var(--red-hi); background: rgba(225,29,46,.08); }
    .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
    .data-table { border: 0; }
    .data-table tr { margin-bottom: 12px; border: 1px solid var(--line); background: var(--surface); }
    .data-table th, .data-table td { border: 0; width: 100%; }
    .data-table th { border-bottom: 1px solid var(--line); }
}

@media (max-width: 380px) {
    .brand-en { display: none; }
    .path-grid, .status-grid, .triple-text, .related-grid, .mini-grid, .check-points, .footer-directory { grid-template-columns: 1fr; }
}
.directory-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.directory-brand .brand-logo { height: 30px; }
