:root {
    --bg: #0D0D0D;
    --bg-deep: #070707;
    --surface: #171717;
    --surface-2: #222222;
    --text: #C8C8C8;
    --text-strong: #F2F2F2;
    --muted: #9A9A9A;
    --faint: #6E6E6E;
    --silver: #C8C8C8;
    --silver-bright: #E8E8E8;
    --ink: #1A1A1A;
    --red: #B85A5A;
    --border: rgba(232, 232, 232, 0.12);
    --border-strong: rgba(232, 232, 232, 0.36);
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    --top-height: 122px;
    --radius: 12px;
}

* { 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", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-strong); }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--silver-bright); outline-offset: 3px; }
[hidden] { display: none !important; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link {
    position: fixed; left: 12px; top: -80px; z-index: 200;
    background: var(--silver-bright); color: var(--bg); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 80; box-shadow: 0 1px 0 var(--border); }
.ink-line { height: 22px; background: var(--bg-deep); color: var(--silver); font-size: 12px; }
.ink-line__inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.text-button { min-height: 22px; border: 0; background: transparent; padding: 0 4px; cursor: pointer; font-size: 12px; }
.material-bar { height: 60px; background: var(--ink); border-bottom: 1px solid var(--border); }
.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-link img, .footer-brand img, .drawer-brand img { height: 28px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { font-weight: 760; color: var(--text-strong); font-size: 16px; letter-spacing: 0.08em; }
.drawer-trigger, .app-link, .icon-button {
    min-height: 44px; min-width: 44px; border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--bg-deep); color: var(--silver-bright); padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.drawer-trigger { justify-self: center; }
.app-link { justify-self: end; white-space: nowrap; }
.drawer-trigger:hover, .app-link:hover, .icon-button:hover { border-color: var(--silver-bright); }
.case-tabs { height: 40px; background: var(--bg-deep); border-bottom: 1px solid var(--border); }
.case-tabs__inner { height: 40px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.case-tab { height: 32px; min-width: 84px; padding: 0 16px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.case-tab.is-active { background: var(--silver); color: var(--bg); }
.site-main { min-height: 70vh; padding-top: calc(var(--top-height) + 28px); }

.page-hero { padding: 30px 0 18px; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; margin-bottom: 8px; }
h1, h2, h3 { color: var(--text-strong); margin: 0 0 12px; line-height: 1.3; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 14px; }
.lead { max-width: 850px; color: var(--silver); font-size: 16px; }
.muted { color: var(--muted); }
.page-section { padding: 24px 0; }
.page-section + .page-section { border-top: 1px solid var(--border); }
.mt-16 { margin-top: 16px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head p { margin: 0; max-width: 640px; color: var(--muted); }
.prose { max-width: 900px; }
.prose p + h2, .prose p + h3, .prose ul + h2 { margin-top: 26px; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 8px; }

.hero-media, .media-180, .media-200, .media-360, .media-standard {
    width: 100%; background: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center;
}
.hero-media { height: 260px; }
.media-180 { height: 180px; }
.media-200 { height: 200px; }
.media-360 { height: min(360px, 60vw); }
.media-standard { min-height: 220px; }
.hero-media img, .media-180 img, .media-200 img, .media-360 img, .media-standard img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.cover-copy { padding: 22px 0 8px; }
.app-icon { width: 48px; height: 48px; object-fit: contain; object-position: center; margin-bottom: 12px; border-radius: 10px; }
.cover-copy .brand-kicker { color: var(--muted); font-size: 13px; letter-spacing: 0.18em; }
.cover-copy h1 { margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.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; white-space: nowrap;
}
.button-primary { background: linear-gradient(135deg, #E8E8E8 0%, #C8C8C8 55%, #8A8A8A 100%); color: var(--bg); font-weight: 700; }
.button-primary:hover { color: var(--bg); filter: brightness(1.05); }
.button-secondary { background: var(--bg-deep); color: var(--silver-bright); border: 1px solid var(--border-strong); }
.button-secondary:hover { border-color: var(--silver-bright); }

.grid-2, .grid-3, .grid-4, .shelf-grid, .info-grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0;
}
.card:hover { border-color: var(--border-strong); }
.card .label { color: var(--red); font-size: 12px; letter-spacing: 0.1em; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; min-height: 44px; }
.number-card { position: relative; padding-top: 54px; }
.number-card__no { position: absolute; left: 18px; top: 14px; color: var(--silver-bright); font-size: 13px; letter-spacing: 0.12em; }

.feature-row { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.feature-row--reverse { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr); }
.feature-row--reverse .feature-copy { order: -1; }
.feature-copy { min-width: 0; }
.number-list { list-style: none; padding: 0; margin: 0; counter-reset: item; }
.number-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 15px 0; border-top: 1px solid var(--border); }
.number-list li:first-child { border-top: 0; }
.number-list strong { color: var(--silver-bright); font-size: 13px; letter-spacing: 0.08em; }

.shelf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shelf-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; min-height: 205px; }
.shelf-card .shelf-top { color: var(--muted); font-size: 12px; }
.shelf-card h3 { margin-top: auto; }
.shelf-card .shelf-link { min-height: 44px; display: inline-flex; align-items: end; color: var(--silver-bright); }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--border-strong); }
.timeline-item { position: relative; padding: 0 0 24px 18px; }
.timeline-item::before { content: ''; position: absolute; left: -22px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 0 4px var(--bg); }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--silver); font-size: 12px; }
.note-box { background: var(--surface-2); border-left: 3px solid var(--red); border-radius: 10px; padding: 16px 18px; }
.rule-list { display: grid; gap: 12px; }
.rule-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.rule-item h2, .rule-item h3 { margin-bottom: 6px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.faq-list details + details { margin-top: 12px; }
.faq-list summary { min-height: 54px; display: flex; align-items: center; cursor: pointer; color: var(--text-strong); font-weight: 650; }
.faq-list details p { padding: 0 0 16px; margin: 0; }

.site-footer { margin-top: 42px; background: var(--bg-deep); border-top: 1px solid var(--border); padding: 28px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 24px; }
.footer-grid h2 { font-size: 13px; color: var(--silver-bright); margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--silver); min-height: 30px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--muted); }
.footer-brand__link { min-height: 36px; display: inline-flex; align-items: center; }
.footer-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); }
.footer-note p:last-child { margin-bottom: 0; }

.page-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,0.64); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.page-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.material-drawer { position: fixed; z-index: 110; inset: 0 auto 0 0; width: min(400px, 86vw); background: var(--bg-deep); border-right: 1px solid var(--border-strong); transform: translateX(-102%); visibility: hidden; pointer-events: none; transition: transform .24s ease, visibility .24s ease; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.material-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-brand { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.drawer-scroll { overflow-y: auto; padding: 10px 16px 26px; }
.drawer-group { padding: 14px 0; border-bottom: 1px solid var(--border); }
.drawer-group:last-child { border-bottom: 0; }
.drawer-group h2 { font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.drawer-group a { display: grid; gap: 2px; padding: 10px 8px; border-radius: 8px; min-height: 58px; }
.drawer-group a:hover { background: var(--surface); }
.drawer-group b { color: var(--text-strong); font-size: 14px; }
.drawer-group span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.search-layer { position: fixed; z-index: 115; left: 0; right: 0; top: 82px; visibility: hidden; pointer-events: none; opacity: 0; transform: translateY(-8px); transition: .2s ease; }
.search-layer.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); }
.search-card { width: min(760px, calc(100% - 32px)); margin: 12px auto 0; background: var(--ink); border: 1px solid var(--border-strong); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.search-head h2 { font-size: 18px; }
.search-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; }
.search-input { width: 100%; min-height: 46px; background: var(--bg-deep); border: 1px solid var(--border-strong); color: var(--text-strong); border-radius: 10px; padding: 0 12px; }
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.search-presets a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.search-empty { color: var(--muted); margin-top: 12px; }
.mobile-bottom { display: none; }

@media (max-width: 820px) {
    :root { --top-height: 82px; }
    .case-tabs { display: none; }
    .site-main { padding-top: calc(var(--top-height) + 20px); padding-bottom: 58px; }
    .grid-3, .grid-4, .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-row, .feature-row--reverse { grid-template-columns: 1fr; }
    .feature-row--reverse .feature-copy { order: initial; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
    .mobile-bottom {
        position: fixed; display: grid; z-index: 90; left: 0; right: 0; bottom: 0; grid-template-columns: repeat(5, 1fr); height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg-deep); border-top: 1px solid var(--border-strong);
    }
    .mobile-bottom a { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--silver); }
    .mobile-bottom a.is-active { background: var(--silver); color: var(--bg); }
    .search-layer { inset: 0; background: var(--bg-deep); transform: none; }
    .search-card { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; padding: calc(22px + env(safe-area-inset-top)) 16px 16px; overflow-y: auto; }
}

@media (max-width: 620px) {
    .material-bar__inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
    .brand-link { max-width: 100%; overflow: hidden; }
    .brand-link img { max-width: 104px; }
    .brand-fallback { font-size: 15px; white-space: nowrap; }
    .drawer-trigger, .app-link { padding: 0 10px; min-width: 58px; }
    .app-link { font-size: 13px; }
    .grid-2, .grid-3, .grid-4, .shelf-grid, .info-grid { grid-template-columns: 1fr; }
    .page-hero { padding-top: 18px; }
    .hero-media { height: 260px; }
    .media-180 { height: 180px; }
    .media-200 { height: 200px; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .shell { width: calc(100% - 32px); }
    .ink-line__inner { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
