:root {
    --bg: #0D0D0D;
    --deep: #070707;
    --surface: #171717;
    --surface-2: #222222;
    --text: #C8C8C8;
    --title: #F2F2F2;
    --muted: #9A9A9A;
    --faint: #6E6E6E;
    --silver: #C8C8C8;
    --bright: #E8E8E8;
    --ink: #1A1A1A;
    --mist-red: #B85A5A;
    --line: rgba(232,232,232,0.12);
    --line-strong: rgba(232,232,232,0.36);
    --shadow: 0 12px 28px rgba(0,0,0,0.45);
    --radius: 12px;
    --header-total: 122px;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    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;
}
body.is-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(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 120; padding: 10px 14px; background: var(--bright); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 70; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.ink-line { height: 22px; background: var(--deep); border-bottom: 1px solid var(--line); font-size: 12px; }
.ink-line-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.plain-control { min-height: 22px; padding: 0 4px; border: 0; background: transparent; cursor: pointer; }
.material-bar { height: 60px; background: var(--ink); border-bottom: 1px solid var(--line); }
.material-bar-inner { height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.brand-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo, .drawer-logo, .footer-logo { height: 28px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { color: var(--title); font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.drawer-open, .app-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.drawer-open { min-width: 86px; border: 1px solid var(--line-strong); background: var(--deep); color: var(--bright); cursor: pointer; }
.app-link { justify-self: end; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); color: var(--bright); }
.case-tabs { height: 40px; background: var(--deep); border-bottom: 1px solid var(--line); }
.case-tabs-inner { height: 40px; display: flex; align-items: stretch; justify-content: center; }
.case-tabs a { min-width: 108px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; border-left: 1px solid var(--line); }
.case-tabs a:last-child { border-right: 1px solid var(--line); }
.case-tabs a.is-current { background: var(--silver); color: var(--bg); font-weight: 700; }
.site-main { padding-top: calc(var(--header-total) + 28px); min-height: 70vh; }
.page-section { padding: 30px 0; }
.page-section + .page-section { border-top: 1px solid var(--line); }
.hero-block { padding: 8px 0 32px; }
.eyebrow { display: inline-block; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { color: var(--title); margin: 0 0 12px; font-weight: 700; }
h1 { font-size: 24px; line-height: 1.3; letter-spacing: .02em; }
h2 { font-size: 20px; line-height: 1.4; }
h3 { font-size: 16px; line-height: 1.5; }
p { margin: 0 0 14px; }
.lead { max-width: 820px; color: var(--silver); font-size: 16px; }
.meta-line { color: var(--muted); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.two-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.four-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.card, .content-panel, .shelf-item, .note-card, .faq-card, .timeline-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card, .content-panel, .note-card, .faq-card { padding: 20px; }
.card p:last-child, .content-panel p:last-child, .note-card p:last-child, .faq-card p:last-child { margin-bottom: 0; }
.card-number { display: block; color: var(--bright); font-size: 12px; letter-spacing: .18em; margin-bottom: 8px; }
.media-slot { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-banner { height: 260px; }
.media-card { height: 180px; margin-bottom: 16px; }
.media-feature { height: 200px; margin-bottom: 18px; }
.media-app { height: min(360px, 58vw); min-height: 260px; }
.media-inner { height: 220px; margin: 18px 0 22px; }
.home-brand { padding: 20px 0 10px; max-width: 850px; }
.home-brand p { max-width: 780px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.button-primary, .button-secondary { min-height: 42px; padding: 0 18px; 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,#E8E8E8 0%,#C8C8C8 55%,#8A8A8A 100%); color: #0D0D0D; }
.button-secondary { background: var(--deep); color: var(--silver); border: 1px solid var(--line-strong); }
.button-primary:hover, .button-secondary:hover, .app-link:hover, .drawer-open:hover { transform: translateY(-1px); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading p { margin: 0; max-width: 560px; color: var(--muted); }
.shelf-list { display: grid; gap: 12px; }
.shelf-item { padding: 16px 18px; display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: start; }
.shelf-index { color: var(--bright); font-weight: 700; letter-spacing: .08em; }
.shelf-item p { margin: 4px 0 0; color: var(--muted); }
.shelf-item a { color: var(--bright); min-height: 44px; display: inline-flex; align-items: center; }
.editor-list { display: grid; gap: 12px; counter-reset: editor; }
.editor-item { display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.editor-item:last-child { border-bottom: 0; }
.editor-no { font-size: 28px; color: var(--bright); font-weight: 800; line-height: 1; }
.timeline { position: relative; padding-left: 26px; display: grid; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 18px 20px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 0 4px var(--bg); }
.status { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--bright); border: 1px solid var(--line); font-size: 12px; margin-bottom: 8px; }
.memo-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.memo-card { padding: 18px; border-left: 3px solid var(--mist-red); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.app-feature { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 24px; align-items: start; }
.app-icon-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.app-icon-slot { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.app-icon-slot img { width: 48px; height: 48px; object-fit: contain; }
.policy-list { display: grid; gap: 14px; }
.policy-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.policy-item:last-child { border-bottom: 0; }
.callout { border: 1px solid rgba(184,90,90,.42); background: rgba(184,90,90,.08); border-radius: var(--radius); padding: 18px; }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-links a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.site-footer { margin-top: 44px; background: var(--deep); border-top: 1px solid var(--line); padding: 34px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--silver); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4,1fr); gap: 26px; }
.footer-grid h2 { font-size: 13px; margin-bottom: 10px; color: var(--title); }
.footer-grid a { display: block; min-height: 32px; color: var(--muted); }
.footer-grid a:hover { color: var(--bright); }
.footer-brand { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.footer-brand-link { min-height: 32px !important; display: inline-flex !important; align-items: center; }
.footer-brand strong { color: var(--title); font-size: 15px; }
.footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-note p:last-child { margin-bottom: 0; }
.drawer-panel { position: fixed; z-index: 100; inset: 0 auto 0 0; width: min(400px,86vw); background: var(--deep); border-right: 1px solid var(--line-strong); box-shadow: var(--shadow); transform: translateX(-104%); transition: transform .22s ease, visibility .22s ease; visibility: hidden; pointer-events: none; overflow-y: auto; }
.drawer-panel.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { position: sticky; top: 0; z-index: 2; min-height: 72px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(7,7,7,.96); border-bottom: 1px solid var(--line); }
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.drawer-brand span { display: flex; flex-direction: column; line-height: 1.35; }
.drawer-brand small { color: var(--muted); font-size: 10px; }
.drawer-close, .search-close { min-height: 44px; min-width: 56px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer; }
.drawer-content { padding: 8px 16px 28px; }
.drawer-content section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.drawer-content section:last-child { border-bottom: 0; }
.drawer-content h2 { font-size: 13px; color: var(--muted); }
.drawer-content a { display: block; padding: 10px 0; }
.drawer-content strong { display: block; color: var(--bright); }
.drawer-content span { display: block; color: var(--muted); font-size: 13px; }
.page-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.7); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
.page-overlay.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.search-layer { position: fixed; z-index: 99; left: 0; right: 0; top: 82px; visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.search-layer.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.search-card { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 22px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: 0 0 14px 14px; box-shadow: var(--shadow); }
.search-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.search-head h2 { margin-bottom: 0; }
.search-tools { margin-top: 18px; }
.search-tools label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-row input { min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--deep); color: var(--title); padding: 0 12px; }
.search-row button { min-height: 44px; border: 0; border-radius: 9px; background: var(--silver); color: var(--bg); padding: 0 16px; font-weight: 700; cursor: pointer; }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.search-presets a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.search-results { margin-top: 12px; color: var(--muted); }
.search-results a { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.search-results strong { color: var(--bright); }
.search-results span { font-size: 13px; }
.mobile-bottom { display: none; }

@media (max-width: 820px) {
    :root { --header-total: 82px; }
    .case-tabs { display: none; }
    .site-main { padding-top: calc(var(--header-total) + 22px); padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .material-bar-inner { gap: 8px; }
    .drawer-open { min-width: 72px; }
    .app-link { padding: 0 11px; }
    .card-grid, .four-grid, .two-grid, .memo-grid, .app-feature { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-brand { grid-column: 1 / -1; }
    .section-heading { align-items: start; flex-direction: column; }
    .shelf-item { grid-template-columns: 44px 1fr; }
    .shelf-item > a { grid-column: 2; }
    .search-layer { top: 0; bottom: 0; background: var(--deep); overflow-y: auto; }
    .search-card { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; padding: max(20px, env(safe-area-inset-top)) 16px calc(70px + env(safe-area-inset-bottom)); }
    .mobile-bottom { position: fixed; display: grid; grid-template-columns: repeat(5,1fr); z-index: 80; left: 0; right: 0; bottom: 0; min-height: 48px; padding-bottom: env(safe-area-inset-bottom); background: var(--deep); border-top: 1px solid var(--line-strong); }
    .mobile-bottom a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
    .mobile-bottom a.is-current { background: var(--silver); color: var(--bg); font-weight: 700; }
    .site-footer { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
    .media-banner { height: 260px; }
    .media-inner { height: 200px; }
}

@media (max-width: 520px) {
    .shell { width: calc(100% - 32px); }
    .ink-line-inner { gap: 8px; }
    .ink-line-inner > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-logo { max-width: 118px; }
    .brand-fallback { font-size: 15px; }
    .drawer-open { min-width: 64px; padding: 0 8px; }
    .app-link { padding: 0 8px; font-size: 13px; }
    .page-section { padding: 24px 0; }
    .card, .content-panel, .note-card, .faq-card { padding: 17px; }
    .footer-grid { gap: 20px 16px; }
    .editor-item { grid-template-columns: 56px 1fr; }
    .editor-no { font-size: 24px; }
    .search-row { grid-template-columns: 1fr; }
    .search-row button { width: 100%; }
}
/* Interactive target refinements */
.plain-control { position: relative; min-width: 44px; }
.plain-control::after { content: ''; position: absolute; left: -2px; right: -2px; top: -11px; bottom: -11px; }
.case-tabs a { position: relative; }
.case-tabs a::after { content: ''; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.button-primary, .button-secondary, .inline-links a, .search-presets a { min-height: 44px; }
.footer-grid a { min-height: 44px; display: flex; align-items: center; }
.footer-brand-link { min-height: 44px !important; }
