/* wax-seals · 火漆封印 —— 每篇文章是一封信，压着一枚分类色火漆印（分类首字母）；分类页火漆封在左边距 */
:root {
    --ws-slate: #e6e8ef;
    --ws-letter: #ffffff;
    --ws-ink: #1f2232;
    --ws-soft: #4c5064;
    --ws-line: #cfd2de;
    --ws-navy: #1e3a8a;
    --ws-display: Marcellus, Georgia, serif;
    --ws-body: "Inclusive Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pagination-accent: #1e3a8a;
}

.ws-t0 { --ws-t: #8e1b3a; --ws-t-hi: #b8456a; }
.ws-t1 { --ws-t: #1e3a8a; --ws-t-hi: #4a68b8; }
.ws-t2 { --ws-t: #116149; --ws-t-hi: #3e8f73; }
.ws-t3 { --ws-t: #5b2a86; --ws-t-hi: #8357b0; }
.ws-t4 { --ws-t: #7f520f; --ws-t-hi: #aa7a35; }

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

/* ---------- 母题：火漆印 ---------- */
.ws-seal { display: grid; place-items: center; width: 46px; height: 46px; box-sizing: border-box; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--ws-t-hi, #4a68b8) 0 18%, var(--ws-t, #1e3a8a) 55%); box-shadow: 0 0 0 4px var(--ws-t, #1e3a8a), inset 0 0 0 3px rgba(255, 255, 255, .35), 0 3px 6px rgba(31, 34, 50, .3); color: #fff; font-family: var(--ws-display); font-size: 1.3rem; line-height: 1; }
.ws-seal-big { width: 72px; height: 72px; font-size: 2rem; box-shadow: 0 0 0 6px var(--ws-t, #1e3a8a), inset 0 0 0 4px rgba(255, 255, 255, .35), 0 4px 10px rgba(31, 34, 50, .3); }
.ws-letter-cat { display: inline-block; max-width: 100%; min-width: 0; box-sizing: border-box; font-weight: 600; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ws-t, #1e3a8a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.ws-date { font-size: .86rem; color: var(--ws-soft); white-space: nowrap; }
.ws-divider { display: flex; align-items: center; gap: 16px; margin: 44px 0 18px; font-family: var(--ws-display); font-weight: 400; font-size: 1.6rem; }
.ws-divider::before, .ws-divider::after { content: ""; flex: 1; height: 1px; background: var(--ws-line); }
.ws-divider span { min-width: 0; }

/* ---------- 顶栏 ---------- */
.ws-header { background: var(--ws-letter); border-bottom: 3px double var(--ws-line); }
.ws-header-line { display: flex; align-items: center; gap: 24px; max-width: 1320px; margin: 0 auto; padding: 12px 24px; }
.ws-crest { display: inline-flex; align-items: center; gap: 14px; min-width: 0; margin-right: auto; }
.ws-crest-seal { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a68b8 0 18%, var(--ws-navy) 55%); box-shadow: 0 0 0 3px var(--ws-navy); color: #fff; font-family: var(--ws-display); font-size: 1.15rem; }
.ws-crest-name { min-width: 0; font-family: var(--ws-display); font-size: 1.7rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-routes { display: flex; gap: 20px; }
.ws-routes a { padding: 6px 0; font-weight: 600; color: var(--ws-soft); }
.ws-routes a:hover { color: var(--ws-ink); }
.ws-routes a.is-sealed { color: var(--ws-navy); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ws-menu-toggle { display: none; }

/* ---------- 版心 ---------- */
.ws-box { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; }
.ws-box-cat { max-width: 1020px; }
.ws-crumbline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .92rem; color: var(--ws-soft); }
.ws-crumbline a { color: var(--ws-navy); font-weight: 600; }
.ws-title { margin: 4px 0 26px; font-family: var(--ws-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.12; }
.ws-quiet { margin: 32px 0; padding: 24px; background: #fff; text-align: center; list-style: none; }
.ws-pager { margin-top: 32px; }

/* ---------- 信件卡片 ---------- */
.ws-bundle { display: grid; gap: 30px 24px; }
.ws-bundle-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.ws-bundle-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ws-letter { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ws-letter-link { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 0 0 18px; background: var(--ws-letter); box-shadow: 0 1px 2px rgba(31, 34, 50, .12); }
.ws-letter-photo { display: grid; justify-items: center; }
.ws-letter-photo img { grid-area: 1 / 1; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ws-line); }
.ws-letter-photo .ws-seal { grid-area: 1 / 1; align-self: end; margin-bottom: -23px; }
.ws-letter-link > .ws-letter-cat { margin: 30px 18px 0; justify-self: center; max-width: calc(100% - 36px); }
.ws-letter-title { margin: 0 18px; font-family: var(--ws-display); font-size: 1.25rem; line-height: 1.25; text-align: center; }
.ws-letter-link:hover .ws-letter-title { text-decoration: underline; text-decoration-color: var(--ws-t); }
.ws-letter-link > .ws-date { justify-self: center; }

/* ---------- 首页头条：封印压在上边缘的大信 ---------- */
.ws-main { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ws-main > .ws-seal { position: relative; z-index: 1; margin-bottom: -36px; }
.ws-main-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); width: 100%; background: var(--ws-letter); box-shadow: 0 2px 4px rgba(31, 34, 50, .12); }
.ws-main-text { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 14px; padding: 48px 32px 28px; }
.ws-main-title { font-family: var(--ws-display); font-size: clamp(1.9rem, 2.8vw, 2.7rem); line-height: 1.1; }
.ws-main-link:hover .ws-main-title { text-decoration: underline; text-decoration-color: var(--ws-t); }
.ws-main-sum { color: var(--ws-soft); line-height: 1.6; }
.ws-main-link img { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; background: var(--ws-line); }

/* ---------- 分类页：左边距封印的信叠 ---------- */
.ws-cat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ws-stacked { min-width: 0; }
.ws-stacked-link { display: grid; grid-template-columns: 52px minmax(0, 1fr) 220px; align-items: center; gap: 20px; padding: 14px 16px 14px 20px; background: var(--ws-letter); box-shadow: 0 1px 2px rgba(31, 34, 50, .12); border-left: 3px solid var(--ws-t); }
.ws-stacked-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ws-stacked-title { font-family: var(--ws-display); font-size: 1.4rem; line-height: 1.2; }
.ws-stacked-link:hover .ws-stacked-title { text-decoration: underline; text-decoration-color: var(--ws-t); }
.ws-stacked-sum { color: var(--ws-soft); line-height: 1.55; }
.ws-stacked-link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ws-line); }
.ws-cat-list > .ws-ad { list-style: none; }
.ws-cat-list > .ws-ad:not(:has(.ad)) { display: none; }

/* ---------- 分类索引：散放的火漆印 ---------- */
.ws-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.ws-tray-item { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 10px; min-width: 0; padding: 26px 16px 22px; background: var(--ws-letter); box-shadow: 0 1px 2px rgba(31, 34, 50, .12); text-align: center; }
.ws-seal-tray { width: 60px; height: 60px; font-size: 1.7rem; }
.ws-tray-name { margin-top: 6px; font-family: var(--ws-display); font-size: 1.3rem; line-height: 1.2; }
.ws-tray-item:hover .ws-tray-name { text-decoration: underline; text-decoration-color: var(--ws-t); }
.ws-tray-desc { font-size: .9rem; line-height: 1.45; color: var(--ws-soft); }

/* ---------- 广告壳：无广告时塌陷 ---------- */
.ws-ad:has(.ad) { margin: 24px 0; }
.ws-ad:has(.ad) .ad { min-height: 250px; margin: 0 !important; }

/* ---------- 页脚：封好的信封口 ---------- */
.ws-footer { margin-top: 52px; background: var(--ws-letter); }
.ws-flap { display: grid; justify-items: center; height: 56px; background: linear-gradient(to bottom right, var(--ws-slate) 50%, transparent 50%) left / 50% 100% no-repeat, linear-gradient(to bottom left, var(--ws-slate) 50%, transparent 50%) right / 50% 100% no-repeat; }
.ws-flap-seal { align-self: end; width: 34px; height: 34px; margin-bottom: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a68b8 0 18%, var(--ws-navy) 55%); box-shadow: 0 0 0 3px var(--ws-navy); }
.ws-fold { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; max-width: 1320px; margin: 0 auto; padding: 30px 24px 14px; border-bottom: 1px solid var(--ws-line); list-style: none; }
.ws-fold li { display: flex; align-items: center; gap: 8px; }
.ws-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ws-navy); }
.ws-fold a { font-weight: 600; color: var(--ws-navy); white-space: nowrap; }
.ws-fold a:hover { text-decoration: underline; }
.ws-signoff { display: grid; gap: 4px; max-width: 1320px; margin: 0 auto; padding: 16px 24px 96px; text-align: center; font-size: .9rem; color: var(--ws-soft); overflow-wrap: anywhere; }
.ws-signoff strong { font-family: var(--ws-display); font-weight: 400; font-size: 1.35rem; color: var(--ws-ink); }

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

/* ---------- 断点 ---------- */
@media (min-width: 1600px) {
    .ws-box, .ws-header-line, .ws-fold, .ws-signoff { max-width: 1540px; }
    .ws-box-cat { max-width: 1100px; }
}

@media (max-width: 1023px) {
    .ws-main-link { grid-template-columns: minmax(0, 1fr); }
    .ws-main-link img { grid-row: 1; min-height: 0; height: auto; aspect-ratio: 24 / 9; }
    .ws-main-text { padding-top: 24px; }
    .ws-main > .ws-seal { margin-bottom: -20px; }
    .ws-bundle-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ws-stacked-link { grid-template-columns: 52px minmax(0, 1fr) 170px; }
}

@media (max-width: 767px) {
    .ws-header { border-bottom-width: 3px; }
    .ws-header-line { min-height: 55px; padding: 2px 12px; gap: 10px; }
    .ws-crest { gap: 10px; }
    .ws-crest-seal { width: 30px; height: 30px; font-size: .95rem; }
    .ws-crest-name { font-size: 1.3rem; }
    .ws-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; background: var(--ws-slate); }
    .ws-box { padding: 12px 12px 0; }
    .ws-main > .ws-seal { display: none; }
    .ws-main-link img { aspect-ratio: 16 / 9; }
    .ws-main-text { gap: 8px; padding: 12px 14px 14px; }
    .ws-main-title { font-size: 1.5rem; }
    .ws-main-sum { display: none; }
    .ws-bundle { gap: 12px; }
    .ws-bundle-3, .ws-bundle-4 { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
    .ws-letter-link { grid-template-columns: 100px minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 4px 12px; padding: 10px 12px 10px 10px; }
    .ws-letter-photo { grid-row: 1 / span 3; }
    .ws-letter-photo img { height: 100%; min-height: 84px; aspect-ratio: auto; }
    .ws-letter-photo .ws-seal { align-self: start; justify-self: start; width: 28px; height: 28px; margin: 6px; font-size: .85rem; box-shadow: 0 0 0 2px var(--ws-t); }
    .ws-letter-link > .ws-letter-cat { grid-column: 2; margin: 0; justify-self: start; max-width: 100%; font-size: .74rem; }
    .ws-letter-title { grid-column: 2; margin: 0; font-size: 1.05rem; text-align: left; }
    .ws-letter-link > .ws-date { grid-column: 2; justify-self: start; font-size: .8rem; }
    .ws-divider { margin-top: 28px; font-size: 1.3rem; }
    .ws-stacked-link { grid-template-columns: 30px minmax(0, 1fr) 88px; gap: 10px; padding: 10px 10px 10px 10px; }
    .ws-seal-side { width: 28px; height: 28px; font-size: .85rem; box-shadow: 0 0 0 2px var(--ws-t); }
    .ws-stacked-title { font-size: 1.05rem; }
    .ws-stacked-sum { display: none; }
    .ws-stacked-link img { height: 80px; aspect-ratio: auto; }
    .ws-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ws-tray-item { padding: 18px 10px 14px; }
    .ws-seal-tray { width: 44px; height: 44px; font-size: 1.3rem; }
    .ws-tray-name { font-size: 1.05rem; }
}

/* 移动端：分类导航只在 /menu 出现，隐藏规则放在全局规则之后 */
@media (max-width: 767px) {
    .ws-routes { display: none; }
}
