/* domino-tiles · 多米诺骨牌 —— 居中双层浅色报头、1+3 并排 + 3 列 4:3 杂志骨牌、2 列分类网格、居中轻版权页脚 */
:root {
    --dm-felt: #e4ebe6;
    --dm-ivory: #ffffff;
    --dm-ink: #181d1b;
    --dm-soft: #495750;
    --dm-bar: #263238;
    --dm-pin: #c49a3a;
    --dm-edge: #c3d1c9;
    --dm-display: "Rowdies", Impact, sans-serif;
    --dm-body: "Oxygen", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pagination-accent: #1c7347;
}

.dm-p0 { --dm-p: #c0262d; }
.dm-p1 { --dm-p: #1e4fa3; }
.dm-p2 { --dm-p: #1c7347; }
.dm-p3 { --dm-p: #a85b08; }
.dm-p4 { --dm-p: #6d2f8f; }

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

/* ---------- 母题：点数与中线铜钉 ---------- */
.dm-pips { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.dm-pips i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--dm-p, var(--dm-bar)); }
.dm-pips-3 i { width: 9px; height: 9px; }
.dm-divider { position: relative; display: grid; place-items: center; height: 14px; background: var(--dm-ivory); }
.dm-divider::before { content: ""; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--dm-bar); }
.dm-pin { position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: var(--dm-pin); border: 2px solid var(--dm-bar); }
.dm-suit-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dm-suit-label { min-width: 0; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dm-p); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 居中双层浅色报头（桌面居中两层，移动单层 60px） ---------- */
.dm-header { background: var(--dm-ivory); color: var(--dm-ink); border-bottom: 2px solid var(--dm-bar); }
.dm-masthead { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 1320px; min-height: 58px; margin: 0 auto; padding: 8px 24px; }
.dm-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.dm-pip-logo { flex: none; display: grid; grid-template-columns: 1fr 1fr; place-items: center; width: 38px; height: 22px; background: var(--dm-bar); border-radius: 4px; position: relative; }
.dm-pip-logo::after { content: ""; position: absolute; top: 3px; bottom: 3px; left: 50%; width: 2px; margin-left: -1px; background: #fff; }
.dm-pip-logo i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #f2c14e; }
.dm-pip-logo i:last-child { background: #6ee7b7; }
.dm-brand-name { min-width: 0; font-family: var(--dm-display); font-weight: 700; font-size: 1.7rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-nav-bar { border-top: 1px solid var(--dm-edge); background: #f4f8f5; }
.dm-nav-inner { display: flex; justify-content: center; gap: 8px; max-width: 1320px; margin: 0 auto; padding: 6px 24px; }
.dm-nav-inner a { padding: 5px 16px; font-weight: 700; font-size: .92rem; color: var(--dm-soft); border-radius: 6px; border: 1px solid transparent; white-space: nowrap; }
.dm-nav-inner a:hover { color: var(--dm-ink); }
.dm-nav-inner a.is-played { color: #fff; background: var(--dm-bar); }
.dm-menu-toggle { display: none; }

/* ---------- 版心 ---------- */
.dm-felt { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; }
.dm-path { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .9rem; color: var(--dm-soft); }
.dm-path a { color: #1c7347; font-weight: 700; }
.dm-page-title { margin: 4px 0 24px; font-family: var(--dm-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; }
.dm-empty { margin: 32px 0; padding: 24px; background: #fff; border: 2px solid var(--dm-bar); border-radius: 10px; text-align: center; list-style: none; grid-column: 1 / -1; }
.dm-pager { margin-top: 32px; }
.dm-line-title { display: flex; align-items: center; gap: 10px; margin: 36px 0 18px; font-family: var(--dm-display); font-weight: 700; font-size: 1.5rem; }

/* ---------- 首页前 4 条：紧凑 1+3 并排骨牌组 ---------- */
.dm-opening { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.dm-lead { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.dm-lead-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; background: var(--dm-ivory); border: 2px solid var(--dm-bar); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 0 rgba(38, 50, 56, .16); }
.dm-lead-media { padding: 10px 10px 0; min-width: 0; }
.dm-lead-media img { display: block; width: 100%; height: 215px; object-fit: cover; border-radius: 6px; background: var(--dm-edge); }
.dm-lead-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 8px 18px 16px; }
.dm-lead-title { margin: 0; font-family: var(--dm-display); font-weight: 700; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; }
.dm-lead-card:hover .dm-lead-title { color: var(--dm-p); text-decoration: underline; }
.dm-lead-excerpt { margin: 0; font-size: .94rem; color: var(--dm-soft); line-height: 1.5; }
.dm-hand-stack { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.dm-mini { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.dm-mini-card { display: grid; grid-template-columns: 144px 14px minmax(0, 1fr); align-items: stretch; background: var(--dm-ivory); border: 2px solid var(--dm-bar); border-radius: 10px; overflow: hidden; box-shadow: 0 3px 0 rgba(38, 50, 56, .12); }
.dm-mini-media { padding: 7px; display: block; }
.dm-mini-media img { display: block; width: 100%; height: 100%; min-height: 92px; max-height: 112px; object-fit: cover; border-radius: 5px; background: var(--dm-edge); }
.dm-mini-bar { position: relative; display: grid; place-items: center; }
.dm-mini-bar::before { content: ""; position: absolute; top: 8px; bottom: 8px; width: 2px; background: var(--dm-bar); }
.dm-mini-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 5px; padding: 10px 14px 10px 8px; min-width: 0; }
.dm-mini-title { font-weight: 700; font-size: .98rem; line-height: 1.3; }
.dm-mini-card:hover .dm-mini-title { color: var(--dm-p); text-decoration: underline; }

/* ---------- 首页后 12 条：3 列 4:3 杂志骨牌网格（4 行 × 3 列） ---------- */
.dm-grid { display: grid; gap: 24px; }
.dm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dm-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dm-tile { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.dm-tile-face { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; background: var(--dm-ivory); border: 2px solid var(--dm-bar); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 0 rgba(38, 50, 56, .16); }
.dm-tile-upper { display: block; padding: 10px 10px 0; }
.dm-tile-upper img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--dm-edge); }
.dm-tile-lower { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 8px; padding: 8px 16px 16px; }
.dm-tile-title { font-weight: 700; font-size: 1.1rem; line-height: 1.35; }
.dm-tile-face:hover .dm-tile-title { color: var(--dm-p); text-decoration: underline; }
.dm-tile-date { font-size: .82rem; color: var(--dm-soft); white-space: nowrap; }

/* ---------- 分类页：2 列横向骨牌网格（首条跨 2 列凑齐前 3 条整行） ---------- */
.dm-cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.dm-chain-item { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.dm-chain-lead { grid-column: 1 / -1; }
.dm-chain-tile { display: grid; grid-template-columns: 185px 16px minmax(0, 1fr); align-items: stretch; background: var(--dm-ivory); border: 2px solid var(--dm-bar); border-radius: 10px; overflow: hidden; box-shadow: 0 3px 0 rgba(38, 50, 56, .12); }
.dm-chain-lead .dm-chain-tile { grid-template-columns: 300px 18px minmax(0, 1fr); }
.dm-chain-media { padding: 8px; display: block; }
.dm-chain-media img { display: block; width: 100%; height: 100%; min-height: 120px; max-height: 160px; object-fit: cover; border-radius: 6px; background: var(--dm-edge); }
.dm-chain-bar { position: relative; display: grid; place-items: center; }
.dm-chain-bar::before { content: ""; position: absolute; top: 10px; bottom: 10px; width: 2px; background: var(--dm-bar); }
.dm-chain-text { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 6px; padding: 12px 16px 12px 8px; }
.dm-chain-title { font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.dm-chain-lead .dm-chain-title { font-family: var(--dm-display); font-size: 1.38rem; }
.dm-chain-tile:hover .dm-chain-title { color: var(--dm-p); text-decoration: underline; }
.dm-chain-excerpt { font-size: .9rem; color: var(--dm-soft); line-height: 1.48; }
.dm-chain-meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--dm-soft); }
.dm-cat-list > .dm-ad { grid-column: 1 / -1; list-style: none; }
.dm-cat-list > .dm-ad:not(:has(.ad)) { display: none; }

/* ---------- 分类索引：骨牌盒 ---------- */
.dm-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.dm-box-item { min-width: 0; }
.dm-box-tile { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; height: 100%; background: var(--dm-ivory); border: 2px solid var(--dm-bar); border-radius: 10px; box-shadow: 0 4px 0 rgba(38, 50, 56, .16); }
.dm-box-top { display: grid; gap: 8px; padding: 16px 16px 8px; }
.dm-box-name { font-family: var(--dm-display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.dm-box-tile:hover .dm-box-name { color: var(--dm-p); text-decoration: underline; }
.dm-box-bottom { padding: 8px 16px 16px; }
.dm-box-desc { font-size: .9rem; color: var(--dm-soft); line-height: 1.45; }

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

/* ---------- 浅色居中轻版权页脚 ---------- */
.dm-footer { margin-top: 56px; background: var(--dm-ivory); color: var(--dm-ink); border-top: 2px solid var(--dm-bar); }
.dm-colophon { max-width: 960px; margin: 0 auto; padding: 30px 24px 96px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.dm-colophon-pips { display: inline-flex; gap: 8px; }
.dm-colophon-pips i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--dm-pin); border: 2px solid var(--dm-bar); }
.dm-colophon-brand { font-family: var(--dm-display); font-weight: 700; font-size: 1.45rem; overflow-wrap: anywhere; }
.dm-colophon-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 4px 0; padding: 0; list-style: none; }
.dm-colophon-links a { font-weight: 700; font-size: .92rem; color: var(--dm-soft); white-space: nowrap; }
.dm-colophon-links a:hover { color: #1c7347; text-decoration: underline; }
.dm-colophon-copy { margin: 0; font-size: .86rem; color: var(--dm-soft); }

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

/* ---------- 断点 ---------- */
@media (min-width: 1600px) {
    .dm-felt, .dm-masthead, .dm-nav-inner { max-width: 1540px; }
}

@media (max-width: 1023px) {
    .dm-opening { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .dm-lead-media img { height: auto; aspect-ratio: 21 / 9; }
    .dm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dm-chain-tile { grid-template-columns: 120px 12px minmax(0, 1fr); }
    .dm-chain-lead .dm-chain-tile { grid-template-columns: 200px 16px minmax(0, 1fr); }
    .dm-chain-excerpt { display: none; }
    .dm-chain-lead .dm-chain-excerpt { display: block; }
}

@media (max-width: 767px) {
    .dm-masthead { justify-content: flex-start; min-height: 58px; padding: 0 12px; gap: 10px; }
    .dm-brand { margin-right: auto; }
    .dm-pip-logo { width: 32px; height: 20px; }
    .dm-brand-name { font-size: 1.25rem; }
    .dm-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--dm-ink); border: 1px solid var(--dm-edge); border-radius: 6px; background: #f4f8f5; }
    .dm-felt { padding: 12px 12px 0; }
    .dm-lead-media { padding: 8px 8px 0; }
    .dm-lead-media img { aspect-ratio: 16 / 9; }
    .dm-lead-body { padding: 8px 12px 12px; gap: 6px; }
    .dm-lead-title { font-size: 1.35rem; }
    .dm-lead-excerpt { display: none; }
    .dm-hand-stack { gap: 12px; }
    .dm-mini-card { grid-template-columns: 96px 12px minmax(0, 1fr); }
    .dm-mini-media { padding: 6px; }
    .dm-mini-media img { min-height: 82px; max-height: 100px; }
    .dm-mini-body { padding: 8px 10px 8px 6px; }
    .dm-mini-title { font-size: .95rem; }
    .dm-grid, .dm-rel-grid { gap: 12px; }
    .dm-grid-3, .dm-rel-grid { grid-template-columns: minmax(0, 1fr); }
    .dm-tile-face { grid-template-columns: 96px 12px minmax(0, 1fr); grid-template-rows: 1fr; }
    .dm-tile-upper { padding: 6px; }
    .dm-tile-upper img { height: 100%; min-height: 84px; aspect-ratio: auto; }
    .dm-divider { height: auto; }
    .dm-divider::before { left: auto; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
    .dm-tile-lower { padding: 8px 10px; gap: 5px; }
    .dm-tile-title { font-size: .96rem; }
    .dm-cat-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .dm-chain-lead { grid-column: auto; }
    .dm-chain-tile, .dm-chain-lead .dm-chain-tile { grid-template-columns: 92px 12px minmax(0, 1fr); }
    .dm-chain-media { padding: 6px; }
    .dm-chain-media img { min-height: 0; height: 100%; max-height: 98px; }
    .dm-chain-text { padding: 8px 10px 8px 6px; gap: 4px; }
    .dm-chain-title, .dm-chain-lead .dm-chain-title { font-family: var(--dm-body); font-size: .96rem; }
    .dm-chain-excerpt, .dm-chain-lead .dm-chain-excerpt { display: none; }
    .dm-box { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 767px) {
    .dm-nav-bar { display: none; }
}
