/* denim-patches · 牛仔贴章 —— 牛仔斜纹底，每篇文章是一枚刺绣贴章：粗锁边 + 内圈虚线针脚 */
:root {
    --dp-denim: #2b4a6f;
    --dp-denim-dark: #1f3753;
    --dp-patch: #ffffff;
    --dp-ink: #1a2230;
    --dp-soft: #4a5568;
    --dp-light: #e8eef6;
    --dp-gold: #f2b134;
    --dp-display: Righteous, "Segoe UI", system-ui, sans-serif;
    --dp-body: Commissioner, system-ui, -apple-system, "Segoe UI", sans-serif;
    --pagination-accent: #2b4a6f;
}

.dp-thread-0 { --dp-thread: #f2b134; --dp-chip-ink: #1a2230; }
.dp-thread-1 { --dp-thread: #c73e3a; --dp-chip-ink: #ffffff; }
.dp-thread-2 { --dp-thread: #2f7d4f; --dp-chip-ink: #ffffff; }
.dp-thread-3 { --dp-thread: #b83280; --dp-chip-ink: #ffffff; }
.dp-thread-4 { --dp-thread: #2867a8; --dp-chip-ink: #ffffff; }

body.theme-denim {
    margin: 0; color: var(--dp-light); font-family: var(--dp-body); font-size: 17px; line-height: 1.5;
    background-color: var(--dp-denim);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 6px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 5px);
}
:where(.theme-denim) a { color: inherit; text-decoration: none; }
.theme-denim :focus-visible { outline: 3px solid var(--dp-gold); outline-offset: 3px; }
.dp-skip { position: absolute; left: -9999px; }
.dp-skip:focus { left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: #fff; color: var(--dp-ink); font-weight: 600; }
.dp-jacket { display: block; min-height: 60vh; padding-bottom: 40px; }
.dp-jacket:focus { outline: none; }
.dp-seam { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; }

/* ---------- 母题：贴章 = 粗锁边 + 内圈虚线 ---------- */
.dp-chip { display: inline-block; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 2px 10px; border-radius: 999px; background: var(--dp-thread, #f2b134); color: var(--dp-chip-ink, #1a2230); font-weight: 600; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.dp-patch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: .84rem; color: var(--dp-soft); }
.dp-patch-meta > * { min-width: 0; }

/* ---------- 顶栏：深色牛仔腰头 + 金线 ---------- */
.dp-head { background: var(--dp-denim-dark); border-bottom: 3px dashed var(--dp-gold); }
.dp-head-inner { display: flex; align-items: center; gap: 24px; max-width: 1320px; margin: 0 auto; padding: 12px 24px; }
.dp-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; color: #fff; }
.dp-brand-patch { flex: none; display: grid; place-items: center; width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%; background: #c73e3a; border: 3px solid var(--dp-gold); }
.dp-brand-patch span { width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; border: 2px dashed #fff; }
.dp-brand-name { min-width: 0; font-family: var(--dp-display); font-size: 1.55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-nav { display: flex; gap: 6px; }
.dp-nav a { padding: 6px 12px; border: 2px dashed transparent; border-radius: 8px; color: var(--dp-light); font-weight: 600; }
.dp-nav a:hover { border-color: rgba(255, 255, 255, .4); }
.dp-nav a.is-on { border-color: var(--dp-gold); color: #fff; }
.dp-menu-toggle { display: none; color: #fff; }

.dp-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .92rem; color: var(--dp-light); }
.dp-crumb a { color: #ffd27a; font-weight: 600; }
.dp-title { margin: 4px 0 22px; font-family: var(--dp-display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: #fff; }
.dp-empty { margin: 32px 0; padding: 24px; background: #fff; color: var(--dp-ink); border-radius: 18px; text-align: center; list-style: none; }
.dp-pager { margin-top: 32px; padding: 12px 16px; background: #fff; color: var(--dp-ink); border-radius: 14px; }

/* ---------- 卡片贴章 ---------- */
.dp-patch { min-width: 0; }
.dp-patch-link { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100%; box-sizing: border-box; background: var(--dp-patch); color: var(--dp-ink); border: 6px solid var(--dp-thread); border-radius: 18px; outline: 2px dashed var(--dp-thread); outline-offset: -14px; overflow: hidden; }
.dp-patch-link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #cbd5e1; }
.dp-patch-text { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 12px 18px 20px; }
.dp-patch-title { font-weight: 600; font-size: 1.1rem; line-height: 1.32; }
.dp-patch-link:hover .dp-patch-title { text-decoration: underline; text-decoration-color: var(--dp-thread); text-decoration-thickness: 2px; }

/* ---------- 首页：大贴章 + 袖子一排 ---------- */
.dp-front { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.dp-big-link { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--dp-patch); color: var(--dp-ink); border: 8px solid var(--dp-thread); border-radius: 26px; outline: 3px dashed var(--dp-thread); outline-offset: -18px; overflow: hidden; }
.dp-big-link img { display: block; width: 100%; height: auto; aspect-ratio: 24 / 9; object-fit: cover; background: #cbd5e1; }
.dp-big-label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 32px 28px; }
.dp-big-title { font-family: var(--dp-display); font-weight: 400; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.15; }
.dp-big-link:hover .dp-big-title { text-decoration: underline; text-decoration-color: var(--dp-thread); }
.dp-big-excerpt { max-width: 72ch; color: var(--dp-soft); line-height: 1.6; }
.dp-sleeve { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.dp-pocket { margin-top: 40px; }
.dp-pocket-head { display: inline-block; margin: 0 0 18px; padding: 6px 18px; background: var(--dp-gold); color: var(--dp-ink); border-radius: 10px; outline: 2px dashed var(--dp-ink); outline-offset: -6px; font-family: var(--dp-display); font-weight: 400; font-size: 1.2rem; }
.dp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.dp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 分类页：织唛标签，两端折边 ---------- */
.dp-cat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 1040px; margin: 0; padding: 0; list-style: none; }
.dp-label { min-width: 0; }
.dp-label-link { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0; background: var(--dp-patch); color: var(--dp-ink); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); }
.dp-label-link img { display: block; width: 100%; height: 100%; min-height: 130px; object-fit: cover; background: #cbd5e1; }
.dp-label-woven { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 14px 40px 16px 20px; border-left: 8px solid var(--dp-thread); background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(26, 34, 48, .035) 5px 6px); }
.dp-label-date { font-size: .84rem; font-weight: 600; color: var(--dp-soft); }
.dp-label-title { font-family: var(--dp-display); font-weight: 400; font-size: 1.3rem; line-height: 1.25; }
.dp-label-link:hover .dp-label-title { text-decoration: underline; text-decoration-color: var(--dp-thread); }
.dp-label-excerpt { color: var(--dp-soft); line-height: 1.55; }
.dp-cat-list > .dp-ad { list-style: none; }
.dp-cat-list > .dp-ad:not(:has(.ad)) { display: none; }

/* ---------- 分类索引：夹克背面的圆形贴章 ---------- */
.dp-back { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 22px; margin: 0; padding: 0; list-style: none; }
.dp-back > li { min-width: 0; }
.dp-round { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; text-align: center; }
.dp-round-ring { display: grid; place-items: center; width: 168px; max-width: 100%; aspect-ratio: 1; box-sizing: border-box; padding: 22px; border-radius: 50%; background: var(--dp-patch); color: var(--dp-ink); border: 8px solid var(--dp-thread); outline: 2px dashed var(--dp-thread); outline-offset: -18px; }
.dp-round-name { font-family: var(--dp-display); font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.dp-round:hover .dp-round-name { text-decoration: underline; }
.dp-round-desc { font-size: .88rem; line-height: 1.45; color: var(--dp-light); }

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

/* ---------- 页脚：洗水标 ---------- */
.dp-foot { margin-top: 40px; padding: 32px 24px 96px; background: var(--dp-denim-dark); border-top: 3px dashed var(--dp-gold); }
.dp-care { max-width: 560px; margin: 0 auto; padding: 18px 26px 20px; background: #f7f8fa; color: var(--dp-ink); border-radius: 4px; clip-path: polygon(0 0, 50% 10px, 100% 0, 100% 100%, 0 100%); }
.dp-care-top { display: grid; gap: 2px; padding: 8px 0 12px; border-bottom: 1px solid #cbd5e1; text-align: center; }
.dp-care-brand { font-family: var(--dp-display); font-weight: 400; font-size: 1.3rem; overflow-wrap: anywhere; }
.dp-care-size { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dp-soft); }
.dp-care-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 14px 0; padding: 0; list-style: none; }
.dp-care-lines a { display: block; padding: 4px 0; border-bottom: 1px dashed #94a3b8; font-weight: 600; }
.dp-care-lines a:hover { color: #c73e3a; }
.dp-care-note { margin: 0; font-size: .84rem; text-align: center; color: var(--dp-soft); }

/* ---------- 共享页面 ---------- */
.theme-denim .site-menu, .theme-denim .site-search, .theme-denim .static-page, .theme-denim .theme-error { --menu-accent: #2b4a6f; background: #fff; color: var(--dp-ink); border-radius: 18px; }

/* ---------- 断点 ---------- */
@media (min-width: 1600px) {
    .dp-seam, .dp-head-inner { max-width: 1540px; }
    .dp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .dp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .dp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dp-label-link { grid-template-columns: 170px minmax(0, 1fr); }
}

@media (max-width: 767px) {
    .dp-head-inner { min-height: 55px; padding: 2px 12px; gap: 10px; }
    .dp-brand-patch { width: 32px; height: 32px; border-width: 2px; }
    .dp-brand-patch span { width: 18px; height: 18px; }
    .dp-brand-name { font-size: 1.2rem; }
    .dp-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px dashed rgba(255, 255, 255, .5); border-radius: 10px; box-sizing: border-box; }
    .dp-seam { padding: 12px 12px 0; }
    .dp-front { gap: 12px; }
    .dp-big-link { border-width: 5px; border-radius: 18px; outline-offset: -12px; }
    .dp-big-link img { aspect-ratio: 16 / 9; }
    .dp-big-label { gap: 8px; padding: 12px 18px 18px; }
    .dp-big-title { font-size: 1.4rem; }
    .dp-big-excerpt { display: none; }
    .dp-sleeve, .dp-grid, .dp-grid-3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dp-pocket { margin-top: 26px; }
    .dp-patch-link { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto; border-width: 4px; border-radius: 14px; outline: 0; }
    .dp-patch-link img { height: 100%; min-height: 88px; aspect-ratio: auto; }
    .dp-patch-text { gap: 6px; padding: 8px 12px 10px; border-left: 2px dashed var(--dp-thread); }
    .dp-patch-title { font-size: 1rem; }
    .dp-label-link { grid-template-columns: 88px minmax(0, 1fr); }
    .dp-label-link img { min-height: 84px; height: 100%; }
    .dp-label-woven { gap: 4px; padding: 8px 26px 10px 12px; border-left-width: 5px; }
    .dp-label-title { font-size: 1.02rem; }
    .dp-label-excerpt { display: none; }
    .dp-back { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .dp-round-ring { width: 136px; padding: 16px; border-width: 6px; outline-offset: -14px; }
    .dp-round-name { font-size: 1rem; }
    .dp-care-lines { grid-template-columns: minmax(0, 1fr); }
    .dp-foot { padding: 24px 12px 96px; }
}

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