/* matchbox-labels · 火柴盒贴纸 —— 白底擦磷边顶栏、4 列方图架 + 单列右图电讯流、右图分类抽屉、三栏深褐页脚 */
:root {
    --mb-table: #f2eee7;
    --mb-box: #ffffff;
    --mb-ink: #1e1a17;
    --mb-soft: #544b43;
    --mb-striker: #5c3a21;
    --mb-striker-dot: #362010;
    --mb-rule: #d5cdc1;
    --mb-display: "Abril Fatface", Georgia, serif;
    --mb-body: "Signika", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pagination-accent: #a8202a;
}

.mb-l0 { --mb-l: #a8202a; }
.mb-l1 { --mb-l: #1d3d6f; }
.mb-l2 { --mb-l: #1e6141; }
.mb-l3 { --mb-l: #965d0a; }
.mb-l4 { --mb-l: #473485; }

body.theme-matchbox { margin: 0; color: var(--mb-ink); font-family: var(--mb-body); font-size: 16px; line-height: 1.55; background: var(--mb-table); }
:where(.theme-matchbox) a { color: inherit; text-decoration: none; }
.theme-matchbox :focus-visible { outline: 3px solid #a8202a; outline-offset: 3px; }
.mb-skip { position: absolute; left: -9999px; }
.mb-skip:focus { left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: #fff; font-weight: 700; }
.mb-case { display: block; min-height: 60vh; padding-bottom: 40px; }
.mb-case:focus { outline: none; }

/* ---------- 母题：点状擦磷边 ---------- */
.mb-striker-bar { height: 8px; background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); }
.mb-striker-thick { height: 14px; }

/* ---------- 白底顶栏 + 擦磷底边 ---------- */
.mb-header { background: #ffffff; color: var(--mb-ink); }
.mb-header-frame { display: flex; align-items: center; gap: 20px; max-width: 1320px; min-height: 54px; margin: 0 auto; padding: 0 24px; }
.mb-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; }
.mb-match-mark { flex: none; display: grid; place-items: center; width: 32px; height: 24px; background: #a8202a; border: 2px solid var(--mb-ink); border-radius: 3px; }
.mb-match-mark i { display: block; width: 16px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff 0 42%, #f4d38c 42% 100%); }
.mb-brand-name { min-width: 0; font-family: var(--mb-display); font-weight: 400; font-size: 1.55rem; letter-spacing: .01em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-tabs { display: flex; gap: 6px; }
.mb-tabs a { padding: 5px 12px; font-weight: 700; font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mb-soft); border: 1px solid var(--mb-rule); background: #faf7f2; white-space: nowrap; }
.mb-tabs a:hover { border-color: var(--mb-ink); color: var(--mb-ink); }
.mb-tabs a.is-lit { color: #fff; background: #a8202a; border-color: #a8202a; }
.mb-menu-toggle { display: none; }

/* ---------- 版心 ---------- */
.mb-wrap { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; }
.mb-wrap-cat { max-width: 980px; }
.mb-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .9rem; color: var(--mb-soft); }
.mb-crumb a { color: #a8202a; font-weight: 700; }
.mb-page-title { margin: 4px 0 24px; font-family: var(--mb-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.mb-empty { margin: 32px 0; padding: 24px; background: #fff; border: 2px solid var(--mb-ink); text-align: center; list-style: none; }
.mb-pager { margin-top: 32px; }
.mb-shelf-head { display: flex; align-items: center; gap: 14px; margin: 36px 0 18px; }
.mb-shelf-striker { flex: none; width: 48px; height: 14px; background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); border-radius: 2px; }
.mb-shelf-head h2 { margin: 0; font-family: var(--mb-display); font-weight: 400; font-size: 1.8rem; }

/* ---------- 首页前 4 条：4 列方图火柴盒架 ---------- */
.mb-rack-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mb-grid { display: grid; gap: 20px; }
.mb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mb-box { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.mb-box-link { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 10px 1fr; background: var(--mb-box); border: 2px solid var(--mb-ink); box-shadow: 4px 4px 0 rgba(30, 26, 23, .12); }
.mb-box-striker { background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); border-bottom: 2px solid var(--mb-ink); }
.mb-box-label { display: grid; grid-template-columns: minmax(0, 1fr); padding: 7px; min-width: 0; }
.mb-label-frame { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 9px; border: 2px solid var(--mb-l); outline: 1px solid var(--mb-l); outline-offset: -5px; min-width: 0; }
.mb-label-kicker { min-width: 0; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mb-l); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-label-frame img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mb-rule); }
.mb-label-title { font-weight: 700; font-size: 1.02rem; line-height: 1.32; }
.mb-box-link:hover .mb-label-title { color: var(--mb-l); text-decoration: underline; }
.mb-label-date { font-size: .8rem; color: var(--mb-soft); white-space: nowrap; }

/* ---------- 首页后 12 条：居中单列右图电讯索引流 ---------- */
.mb-wire-wrap { max-width: 980px; margin: 0 auto; }
.mb-wire-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.mb-wire-item { min-width: 0; }
.mb-wire-link { display: grid; grid-template-columns: 12px minmax(0, 1fr) 200px; align-items: stretch; background: var(--mb-box); border: 2px solid var(--mb-ink); box-shadow: 3px 3px 0 rgba(30, 26, 23, .1); }
.mb-wire-striker { background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); border-right: 2px solid var(--mb-ink); }
.mb-wire-copy { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 6px; padding: 14px 18px; border-left: 4px solid var(--mb-l); min-width: 0; }
.mb-wire-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mb-wire-title { font-family: var(--mb-display); font-weight: 400; font-size: 1.28rem; line-height: 1.24; }
.mb-wire-link:hover .mb-wire-title { color: var(--mb-l); text-decoration: underline; }
.mb-wire-excerpt { font-size: .92rem; color: var(--mb-soft); line-height: 1.5; }
.mb-wire-link img { display: block; width: 100%; height: 100%; min-height: 126px; max-height: 152px; object-fit: cover; border-left: 2px solid var(--mb-ink); background: var(--mb-rule); }

/* ---------- 分类页：单列右图左文抽屉 ---------- */
.mb-cat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.mb-drawer { min-width: 0; }
.mb-drawer-link { display: grid; grid-template-columns: 14px minmax(0, 1fr); background: var(--mb-box); border: 2px solid var(--mb-ink); box-shadow: 3px 3px 0 rgba(30, 26, 23, .1); }
.mb-drawer-striker { background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); border-right: 2px solid var(--mb-ink); }
.mb-drawer-inner { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: stretch; margin: 6px; border: 2px solid var(--mb-l); }
.mb-drawer-copy { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 7px; padding: 14px 18px; min-width: 0; }
.mb-drawer-title { font-family: var(--mb-display); font-weight: 400; font-size: 1.25rem; line-height: 1.24; }
.mb-drawer-link:hover .mb-drawer-title { color: var(--mb-l); text-decoration: underline; }
.mb-drawer-excerpt { font-size: .92rem; color: var(--mb-soft); line-height: 1.5; }
.mb-drawer-inner img { display: block; width: 100%; height: 100%; min-height: 126px; max-height: 154px; object-fit: cover; border-left: 2px solid var(--mb-l); background: var(--mb-rule); }
.mb-cat-list > .mb-ad { list-style: none; }
.mb-cat-list > .mb-ad:not(:has(.ad)) { display: none; }

/* ---------- 分类索引：火花贴纸展示柜 ---------- */
.mb-display-case { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.mb-case-slot { min-width: 0; }
.mb-cover-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 12px; height: 100%; background: var(--mb-box); border: 2px solid var(--mb-ink); box-shadow: 4px 4px 0 rgba(30, 26, 23, .12); }
.mb-cover-inner { display: grid; align-content: start; gap: 8px; margin: 8px; padding: 14px; border: 2px solid var(--mb-l); outline: 1px solid var(--mb-l); outline-offset: -5px; }
.mb-cover-name { font-family: var(--mb-display); font-weight: 400; font-size: 1.45rem; line-height: 1.15; color: var(--mb-l); }
.mb-cover-card:hover .mb-cover-name { text-decoration: underline; }
.mb-cover-desc { font-size: .9rem; color: var(--mb-soft); line-height: 1.45; }
.mb-cover-striker { background: radial-gradient(var(--mb-striker-dot) 1.5px, transparent 1.5px) 0 0 / 6px 6px, var(--mb-striker); border-top: 2px solid var(--mb-ink); }

/* ---------- 广告壳 ---------- */
.mb-ad:has(.ad) { margin: 24px 0; }
.mb-ad:has(.ad) .ad { min-height: 250px; margin: 0 !important; }

/* ---------- 深褐三栏分组页脚 ---------- */
.mb-footer { margin-top: 56px; background: #261e18; color: #f5efe6; }
.mb-spine-3col { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; max-width: 1320px; margin: 0 auto; padding: 30px 24px 96px; }
.mb-crest-kicker { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #d4a359; }
.mb-spine-name { display: block; margin-top: 6px; font-family: var(--mb-display); font-weight: 400; font-size: 1.8rem; overflow-wrap: anywhere; }
.mb-spine-motto { margin: 10px 0 0; font-size: .88rem; color: #cfc3b4; }
.mb-col-head { display: block; margin-bottom: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #d4a359; }
.mb-col-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mb-col-group a { font-weight: 600; color: #f5efe6; }
.mb-col-group a:hover { color: #d4a359; text-decoration: underline; }

/* ---------- 共享页面 ---------- */
.theme-matchbox .site-menu, .theme-matchbox .site-search, .theme-matchbox .static-page, .theme-matchbox .theme-error { --menu-accent: #a8202a; background: #fff; }

/* ---------- 断点 ---------- */
@media (min-width: 1600px) {
    .mb-wrap, .mb-header-frame, .mb-spine-3col { max-width: 1540px; }
}

@media (max-width: 1023px) {
    .mb-rack-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mb-wire-link { grid-template-columns: 12px minmax(0, 1fr) 160px; }
    .mb-drawer-inner { grid-template-columns: minmax(0, 1fr) 160px; }
}

@media (max-width: 767px) {
    .mb-header-frame { min-height: 52px; padding: 0 12px; gap: 10px; }
    .mb-match-mark { width: 28px; height: 22px; }
    .mb-brand-name { font-size: 1.35rem; }
    .mb-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--mb-ink); border: 1px solid var(--mb-rule); border-radius: 4px; background: #faf7f2; }
    .mb-wrap { padding: 12px 12px 0; }
    .mb-rack-4, .mb-grid-3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .mb-label-frame { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 4px 10px; padding: 8px; }
    .mb-label-kicker { grid-column: 1 / -1; }
    .mb-label-frame img { grid-row: 2 / span 2; height: 100%; min-height: 80px; aspect-ratio: auto; }
    .mb-label-title { grid-column: 2; font-size: .96rem; }
    .mb-label-date { grid-column: 2; }
    .mb-wire-link { grid-template-columns: 10px minmax(0, 1fr) 92px; }
    .mb-wire-copy { padding: 8px 10px; gap: 4px; }
    .mb-wire-title { font-family: var(--mb-body); font-weight: 700; font-size: .96rem; }
    .mb-wire-excerpt { display: none; }
    .mb-wire-link img { min-height: 82px; max-height: 102px; }
    .mb-drawer-link { grid-template-columns: 10px minmax(0, 1fr); }
    .mb-drawer-inner { grid-template-columns: minmax(0, 1fr) 92px; margin: 4px; }
    .mb-drawer-copy { padding: 8px 10px; gap: 4px; }
    .mb-drawer-title { font-family: var(--mb-body); font-weight: 700; font-size: .96rem; }
    .mb-drawer-excerpt { display: none; }
    .mb-drawer-inner img { min-height: 0; height: 100%; max-height: 98px; }
    .mb-display-case { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .mb-spine-3col { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 767px) {
    .mb-tabs { display: none; }
}
