:root {
    --bg: #0F0E0A;
    --bg-deep: #080706;
    --panel: #1A1810;
    --panel-2: #242010;
    --title: #F5E6A8;
    --text: #E8DCB0;
    --muted: #B8A46A;
    --faint: #8A7A48;
    --brand: #E8B923;
    --brand-light: #F3D056;
    --brand-dark: #A88212;
    --cream: #FFF6D8;
    --line: rgba(232,185,35,0.18);
    --line-strong: rgba(232,185,35,0.46);
    --shadow: 0 12px 28px rgba(0,0,0,0.40);
    --radius: 12px;
    --shell: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; }
.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    background: var(--brand-light); color: #0F0E0A; padding: 9px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.topline { height: 22px; background: var(--bg-deep); border-bottom: 1px solid var(--line); color: var(--title); font-size: 12px; }
.topline-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topline-brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topline-search {
    height: 22px; min-width: 54px; border: 0; background: transparent; color: var(--brand-light); cursor: pointer;
}
.racebar { height: 60px; background: #121009; border-bottom: 1px solid var(--line-strong); }
.racebar-inner { height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.brand-link { justify-self: start; display: inline-flex; min-height: 44px; align-items: center; color: var(--title); font-size: 16px; font-weight: 700; }
.brand-link img { height: 28px; width: auto; object-fit: contain; }
.drawer-toggle, .app-link, .btn, .search-presets a, .drawer-close, .search-head button {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer;
}
.drawer-toggle {
    justify-self: center; min-width: 92px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--title); font-weight: 700;
}
.app-link {
    justify-self: end; min-width: 96px; padding: 0 16px; color: #0F0E0A; font-weight: 700;
    background: linear-gradient(135deg,#F3D056 0%,#E8B923 55%,#A88212 100%);
}
.daytabs { height: 40px; background: var(--bg-deep); border-bottom: 1px solid var(--line); font-size: 13px; }
.daytabs-inner { height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.daytabs a { min-width: 82px; padding: 6px 18px; text-align: center; color: var(--muted); border-radius: 8px; }
.daytabs a:hover, .daytabs a:focus-visible { color: var(--cream); outline: 1px solid var(--line-strong); }
.daytabs a.is-current { background: var(--brand); color: #0F0E0A; font-weight: 700; }
.site-main { padding-top: 146px; min-height: 70vh; }
.section { padding: 26px 0; }
.section-tight { padding: 18px 0; }
.section-head { margin-bottom: 16px; }
.eyebrow { color: var(--brand-light); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--title); line-height: 1.3; }
h1 { font-size: 24px; margin-bottom: 14px; }
h2 { font-size: 20px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 8px; }
p { margin: 0 0 12px; }
.lead { color: var(--cream); font-size: 16px; max-width: 840px; }
.muted { color: var(--muted); }
.page-hero {
    border: 1px solid var(--line); background: linear-gradient(180deg, rgba(232,185,35,.06), rgba(255,255,255,0));
    border-radius: 14px; padding: 24px; box-shadow: var(--shadow);
}
.cover-slot { height: 260px; margin-bottom: 18px; }
.image-slot {
    width: 100%; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.image-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.image-slot.card-image { height: 180px; }
.image-slot.section-image { height: 200px; }
.image-slot.app-image { height: 360px; max-width: 480px; margin: 0 auto; }
.image-slot.icon-image { width: 64px; height: 64px; flex: 0 0 64px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { height: 42px; padding: 0 18px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.btn-primary { color: #0F0E0A; background: linear-gradient(135deg,#F3D056 0%,#E8B923 55%,#A88212 100%); }
.btn-secondary { color: var(--title); background: var(--bg-deep); border: 1px solid var(--line-strong); }
.btn:hover, .app-link:hover, .drawer-toggle:hover, .search-presets a:hover { transform: translateY(-1px); }
.btn:focus-visible, .app-link:focus-visible, .drawer-toggle:focus-visible, .topline-search:focus-visible, .mobile-bottom a:focus-visible, .search-presets a:focus-visible, .drawer-close:focus-visible, .search-head button:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.card > .image-slot { margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }
.number-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.number-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.number-chip strong { display: block; color: var(--brand-light); font-size: 18px; margin-bottom: 4px; }
.shelf { display: grid; gap: 10px; }
.shelf-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.shelf-no { color: var(--brand-light); font-weight: 700; }
.shelf-row span:last-child { color: var(--muted); font-size: 13px; }
.timeline { position: relative; padding-left: 28px; }
.timeline:before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 0 0 18px 12px; }
.timeline-item:before { content: ""; position: absolute; left: -24px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(232,185,35,.12); }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--panel-2); color: var(--brand-light); border: 1px solid var(--line); font-size: 12px; }
.note-list, .plain-list { margin: 0; padding-left: 20px; }
.note-list li, .plain-list li { margin-bottom: 9px; }
.feature-stack { display: grid; gap: 16px; }
.feature-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; }
.feature-block .index-no { color: var(--brand-light); font-weight: 700; font-size: 13px; margin-bottom: 8px; display: block; }
.app-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.icon-copy { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; }
.faq-preview, .faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.faq-item h3 { margin-bottom: 8px; }
.prose { max-width: 900px; }
.prose section { margin-bottom: 24px; }
.prose p { margin-bottom: 12px; }
.term-block { background: var(--panel); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 18px; margin-bottom: 16px; }
.callout { background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 18px; color: var(--cream); }
.link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.link-card { display: block; min-height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.link-card strong { display: block; color: var(--title); margin-bottom: 5px; }
.link-card span { color: var(--muted); }
.link-card:hover { border-color: var(--line-strong); }
.site-footer { margin-top: 34px; background: var(--bg-deep); border-top: 1px solid var(--line-strong); color: var(--text); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 22px; padding: 28px 0 20px; }
.footer-grid h2 { font-size: 14px; color: var(--brand-light); margin-bottom: 8px; }
.footer-grid a { display: block; color: var(--muted); padding: 2px 0; }
.footer-grid a:hover { color: var(--cream); }
.footer-brand { display: flex; flex-direction: column; gap: 5px; }
.footer-brand img { height: 28px; width: auto; object-fit: contain; align-self: flex-start; }
.footer-brand strong { color: var(--title); font-size: 15px; }
.footer-brand span { color: var(--faint); }
.footer-note { border-top: 1px solid var(--line); padding: 16px 0 24px; color: var(--muted); }
.footer-note p:last-child { margin-bottom: 0; }
.page-mask { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.58); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.page-mask.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.race-drawer {
    position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(400px, 86vw); background: var(--bg-deep); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow);
    transform: translateX(102%); visibility: hidden; pointer-events: none; transition: transform .24s ease, visibility .24s ease;
}
.race-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-brand img { height: 28px; width: auto; object-fit: contain; }
.drawer-brand span { color: var(--title); font-weight: 700; white-space: nowrap; }
.drawer-close, .search-head button { min-width: 64px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--title); }
.drawer-scroll { height: calc(100vh - 72px); overflow-y: auto; padding: 14px 16px 24px; }
.drawer-group { margin-bottom: 18px; }
.drawer-group h2 { font-size: 14px; color: var(--brand-light); margin-bottom: 8px; }
.drawer-group a { display: block; padding: 11px 12px; border-radius: 10px; border: 1px solid transparent; }
.drawer-group a:hover { background: var(--panel); border-color: var(--line); }
.drawer-group strong { display: block; color: var(--title); margin-bottom: 2px; }
.drawer-group span { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; }
.search-layer { position: fixed; z-index: 79; left: 0; right: 0; top: 82px; visibility: hidden; pointer-events: none; transform: translateY(-16px); opacity: 0; transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
.search-layer.is-open { visibility: visible; pointer-events: auto; transform: translateY(0); opacity: 1; }
.search-card { width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; background: #121009; border: 1px solid var(--line-strong); border-radius: 0 0 14px 14px; box-shadow: var(--shadow); padding: 18px; }
.search-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.search-head strong { color: var(--title); font-size: 18px; }
.search-head p { margin: 2px 0 0; color: var(--muted); }
.search-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.search-presets a { min-width: 84px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); color: var(--title); }
.mobile-bottom { display: none; }
@media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2, .link-grid, .app-panel { grid-template-columns: 1fr; }
    .number-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
    .shell { width: min(calc(100% - 32px), var(--shell)); }
    .daytabs { display: none; }
    .site-main { padding-top: 104px; }
    .racebar-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
    .brand-link { min-width: 0; max-width: 148px; overflow: hidden; }
    .brand-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-link img { max-width: 132px; }
    .drawer-toggle { min-width: 74px; padding: 0 10px; }
    .app-link { min-width: 70px; padding: 0 10px; }
    .section { padding: 20px 0; }
    .page-hero { padding: 18px; }
    .cover-slot { height: 220px; }
    .image-slot.card-image { height: 168px; }
    .image-slot.section-image { height: 188px; }
    .image-slot.app-image { height: 320px; }
    .shelf-row { grid-template-columns: 52px 1fr; }
    .shelf-row span:last-child { grid-column: 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 18px; }
    .mobile-bottom { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg-deep); border-top: 1px solid var(--line-strong); }
    .mobile-bottom a { display: flex; min-width: 0; min-height: 48px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
    .mobile-bottom a.is-current { background: var(--brand); color: #0F0E0A; font-weight: 700; }
    .search-layer { inset: 0; background: var(--bg-deep); overflow-y: auto; }
    .search-card { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; padding: 28px 16px 80px; }
    .search-presets { display: grid; grid-template-columns: repeat(2, 1fr); }
    .page-mask { z-index: 70; }
    .race-drawer { z-index: 80; }
    .search-layer { z-index: 79; }
}
@media (max-width: 420px) {
    .topline-brand { max-width: 74%; }
    .footer-grid { grid-template-columns: 1fr; }
    .number-grid { grid-template-columns: 1fr 1fr; }
}

.mt-16 { margin-top: 16px; }
