/*
 * 团播 / BJ星秀：自己的版面。只借子比的变量（--theme-color 主题色、--mian-max-width 页面宽度、--main-bg-color / --main-color /
 * --muted-*-color 明暗配色），所以跟着子比的深色模式与站点设置走；弹窗、提示等交互仍用子比的。
 */
.jr-wiki {
	--jw-accent: var(--theme-color, #71b6d4);
	--jw-accent-soft: rgba(113, 182, 212, .14);
	--jw-surface: var(--main-bg-color, #fff);
	--jw-text: var(--main-color, #333);
	--jw-muted: var(--muted-2-color, #8a9299);
	--jw-line: var(--main-border-color, rgba(0, 0, 0, .08));
	--jw-soft: var(--muted-border-color, rgba(0, 0, 0, .04));
	--jw-r: 14px;
	--jw-shadow: 0 6px 24px rgba(15, 30, 45, .06);
	color: var(--jw-text);
}
.jr-wiki a { color: inherit; text-decoration: none; }
.jr-wiki h1, .jr-wiki h2, .jr-wiki p, .jr-wiki dl, .jr-wiki dd { margin: 0; }
.jw-page { padding: 24px 0 56px; }
.jw-wrap { width: 100%; max-width: var(--mian-max-width, 1200px); margin: 0 auto; padding: 0 15px; }
.jw-muted { color: var(--jw-muted); }
.jw-center { text-align: center; }

/* 基础元件 */
.jw-h1 { font-size: 30px; font-weight: 800; line-height: 1.25; letter-spacing: .01em; }
.jw-h1 small { display: inline-block; margin-left: 10px; font-size: 15px; font-weight: 500; color: var(--jw-muted); letter-spacing: 0; }
.jw-h2 { display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 700; margin-bottom: 16px !important; }
.jw-h2 small { font-size: 13px; font-weight: 400; color: var(--jw-muted); }
.jw-kicker { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--jw-accent); }
.jw-box { background: var(--jw-surface); border-radius: var(--jw-r); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--jw-shadow); }
.jw-prose { line-height: 1.9; }
.jw-prose p + p { margin-top: .8em; }
.jw-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--jw-soft); color: var(--jw-muted); white-space: nowrap; }
.jw-pill.is-accent, .jw-pill.is-active { background: var(--jw-accent); color: #fff; }
.jw-pill.is-dormant { background: #f0a43a; color: #fff; }
.jw-pill.is-ended { background: rgba(0, 0, 0, .55); color: #fff; }
.jw-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: 18px; background: var(--jw-accent); color: #fff !important; font-weight: 600; font-size: 14px; }
.jw-btn.is-ghost { background: var(--jw-accent-soft); color: var(--jw-accent) !important; }
.jw-input { width: 100%; max-width: 460px; height: 44px; margin-top: 16px; padding: 0 18px; border: 1px solid var(--jw-line); border-radius: 22px; background: var(--jw-surface); color: var(--jw-text); font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.jw-input:focus { border-color: var(--jw-accent); box-shadow: 0 0 0 4px var(--jw-accent-soft); }
.jw-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--jw-muted); }
.jw-crumb a { color: var(--jw-accent); font-weight: 600; }
.jw-crumb i { font-style: normal; opacity: .5; }

/* 数字组 */
.jw-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px !important; }
.jw-stats dt { font-size: 12px; font-weight: 400; color: var(--jw-muted); }
.jw-stats dd { font-size: 20px; font-weight: 800; line-height: 1.3; }
.jw-stats.is-big dd { font-size: 30px; color: var(--jw-accent); }

/* 栏目头 */
.jw-banner { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 32px 28px; margin-bottom: 22px; border-radius: var(--jw-r); background: var(--jw-surface); box-shadow: var(--jw-shadow); }
.jw-banner::before { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, var(--jw-accent-soft), transparent 70%); pointer-events: none; }
.jw-banner-text { position: relative; flex: 1 1 420px; min-width: 0; }
.jw-banner-intro { margin-top: 10px; max-width: 640px; line-height: 1.85; color: var(--jw-muted); }
.jw-banner .jw-stats { position: relative; margin-top: 0 !important; }

/* 团播卡片 */
.jw-crews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 26px; }
.jw-crew { display: flex; flex-direction: column; border-radius: var(--jw-r); overflow: hidden; background: var(--jw-surface); box-shadow: var(--jw-shadow); transition: transform .2s, box-shadow .2s; }
.jw-crew:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(15, 30, 45, .14); }
.jw-crew-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1c2228; }
.jw-crew-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.jw-crew:hover .jw-crew-cover img { transform: scale(1.05); }
.jw-crew-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.jw-crew-cover .jw-pill { position: absolute; top: 12px; left: 12px; }
.jw-crew-name { position: absolute; left: 16px; right: 16px; bottom: 12px; color: #fff; }
.jw-crew-name b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.jw-crew-name small { display: block; font-size: 12px; opacity: .8; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jw-crew-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.jw-crew-summary { font-size: 14px; line-height: 1.7; color: var(--jw-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jw-crew-nums { display: flex; gap: 18px; margin-top: auto; font-size: 12px; color: var(--jw-muted); }
.jw-crew-nums b { margin-right: 3px; font-size: 18px; font-weight: 800; color: var(--jw-text); }

/* 对比表 */
.jw-table-wrap { overflow-x: auto; margin: 0 -6px; }
.jw-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.jw-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--jw-muted); border-bottom: 1px solid var(--jw-line); }
.jw-table td { padding: 12px; border-bottom: 1px solid var(--jw-line); }
.jw-table tr:last-child td { border-bottom: 0; }
.jw-table tbody tr:hover td { background: var(--jw-soft); }
.jw-table td a { color: var(--jw-accent); }
.jw-table td a b { color: var(--jw-text); }
.jw-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--jw-accent); }
.jw-dot.is-dormant { background: #f0a43a; }
.jw-dot.is-ended { background: var(--jw-muted); }

/* 团播页头 */
.jw-crew-hero { position: relative; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; margin-bottom: 18px; border-radius: var(--jw-r); background: #1c2228; color: #fff; box-shadow: var(--jw-shadow); }
.jw-crew-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jw-crew-hero .jw-crew-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .82) 100%); }
.jw-crew-hero-body { position: relative; padding: 28px 30px; max-width: 760px; }
.jw-crew-hero-body .jw-h1 { margin-top: 10px; }
.jw-crew-hero-body .jw-h1 small, .jw-crew-hero-body .jw-stats dt { color: rgba(255, 255, 255, .7); }
.jw-crew-hero-body p { margin-top: 8px; opacity: .9; line-height: 1.8; }

/* 季导航 */
.jw-seasons { position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin-bottom: 8px; scrollbar-width: none; }
.jw-seasons a { flex: 0 0 auto; height: 32px; padding: 0 16px; line-height: 32px; border-radius: 16px; background: var(--jw-surface); color: var(--jw-accent); font-weight: 700; box-shadow: var(--jw-shadow); }
.jw-seasons a:hover { background: var(--jw-accent); color: #fff; }
.jw-season { scroll-margin-top: 120px; }
.jw-season-no { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--jw-accent); color: #fff; font-size: 13px; }

/* BJ 头部 */
.jw-bj-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px; padding: 28px 30px; margin-bottom: 18px; border-radius: var(--jw-r); background: var(--jw-surface); box-shadow: var(--jw-shadow); }
.jw-bj-hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) saturate(1.3); opacity: .28; pointer-events: none; }
.jw-bj-hero > * { position: relative; }
.jw-bj-hero-body { min-width: 0; }
.jw-idline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.jw-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.jw-split > .jw-box:only-child { grid-column: 1 / -1; }
.jw-crewlist { list-style: none; margin: 0; padding: 0; }
.jw-crewlist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--jw-line); }
.jw-crewlist li:last-child { border-bottom: 0; }
.jw-crewlist-name { font-weight: 700; }
.jw-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.jw-dots a { min-width: 32px; height: 24px; padding: 0 6px; line-height: 24px; text-align: center; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--jw-accent-soft); color: var(--jw-accent); }
.jw-dots a:hover { background: var(--jw-accent); color: #fff; }

/* 子比分类页：主播资料取代分类封面 */
.jw-bj-term .page-cover { display: none; }
.jw-bj-term .jw-profile { margin-bottom: 8px; }

/* 头像格 */
.jw-mc { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--jw-line); }
.jw-mc > .jw-pill { align-self: center; }
.jw-mc .jw-member { width: 84px; }
.jw-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 18px 10px; margin-bottom: 18px; }
.jw-member { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.jw-member[hidden] { display: none; }
.jw-member:hover .jw-avatar { box-shadow: 0 0 0 3px var(--jw-accent); }
.jw-member-name { margin-top: 8px; font-size: 14px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jw-member-note { font-size: 12px; color: var(--jw-muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jw-avatar { width: 66px; height: 66px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: linear-gradient(135deg, var(--jw-accent-soft), var(--jw-soft)); color: var(--jw-accent, #71b6d4); font-size: 24px; font-weight: 800; transition: box-shadow .15s; }
.jw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.jw-avatar.is-large { width: 112px; height: 112px; font-size: 42px; box-shadow: 0 0 0 4px var(--jw-surface), 0 8px 24px rgba(0, 0, 0, .15); }

/* 文章格 */
.jw-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.jw-post { display: flex; flex-direction: column; min-width: 0; }
.jw-post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: var(--jw-soft); }
.jw-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.jw-post-thumb:hover img { transform: scale(1.05); }
.jw-post-title { margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jw-post-title:hover { color: var(--jw-accent); }
.jw-post-date { margin-top: 2px; font-size: 12px; color: var(--jw-muted); }
.jw-more { margin-top: 18px; text-align: center; }

/* BJ星秀筛选 */
.jw-filters { padding: 16px 24px; }
.jw-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.jw-filter-row > span { width: 40px; color: var(--jw-muted); }
.jw-chip { height: 28px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--jw-soft); color: var(--jw-text); font-size: 13px; cursor: pointer; }
.jw-chip.is-on { background: var(--jw-accent); color: #fff; }
.jw-letters { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 10px; border-top: 1px dashed var(--jw-line); }
.jw-letters button { min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--jw-muted); font-weight: 700; cursor: pointer; }
.jw-letters button:hover { color: var(--jw-accent); }
.jw-letters button.is-on { background: var(--jw-accent); color: #fff; }

/* 文章页主播卡片（新版资源文章确认后才启用） */
.jw-card { display: flex; gap: 14px; align-items: center; }
.jw-card .jw-avatar { width: 56px; height: 56px; font-size: 20px; }
.jw-card-body { min-width: 0; }
.jw-card-intro { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* 快速预览：自己的版面，颜色取子比变量（深色模式跟着变） */
.modal-dialog.jw-modal { width: 560px; max-width: calc(100vw - 24px); }
.jw-modal .modal-content { border-radius: 12px; overflow: hidden; }
.jw-pv { position: relative; background: var(--main-bg-color, #fff); color: var(--main-color, #333); max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; }
.jw-pv-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 20px; line-height: 32px; text-align: center; cursor: pointer; }
.jw-pv-media { position: relative; background: #000; }
.jw-pv-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.jw-pv-track::-webkit-scrollbar { display: none; }
.jw-pv-slide { flex: 0 0 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: contain; scroll-snap-align: center; background: #000; }
.jw-pv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 24px; line-height: 34px; cursor: pointer; opacity: .8; }
.jw-pv-nav:hover { opacity: 1; }
.jw-pv-nav.is-prev { left: 10px; }
.jw-pv-nav.is-next { right: 10px; }
.jw-pv-count { position: absolute; right: 10px; bottom: 10px; padding: 1px 8px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; }
.jw-pv-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: rgba(0, 0, 0, .85); }
.jw-pv-thumb { flex: 0 0 auto; width: 56px; height: 34px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; opacity: .6; cursor: pointer; transition: opacity .15s, border-color .15s; }
.jw-pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jw-pv-thumb.is-more { position: relative; opacity: 1; }
.jw-pv-thumb.is-more span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700; font-size: 13px; }
.jw-pv-thumb.is-on, .jw-pv-thumb:hover { opacity: 1; border-color: var(--theme-color, #71b6d4); }
.jw-pv-body { padding: 12px 16px 4px; }
.jw-pv-title { font-size: 15px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jw-pv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; font-size: 13px; color: var(--muted-2-color, #999); }
.jw-pv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 2px; border-radius: 20px; background: var(--muted-border-color, rgba(0, 0, 0, .05)); color: var(--main-color, #333) !important; }
.jw-pv-chip:not(:has(.jw-avatar)) { padding-left: 10px; color: var(--theme-color, #71b6d4) !important; }
.jw-pv-chip .jw-avatar { width: 22px; height: 22px; font-size: 11px; }
.jw-pv-feature { margin-top: 10px; padding: 8px 12px; font-size: 13px !important; border-left: 3px solid var(--theme-color, #71b6d4); border-radius: 0 8px 8px 0; background: var(--muted-border-color, rgba(0, 0, 0, .04)); font-size: 14px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.jw-pv-specs { margin: 12px 0 6px; }
.jw-pv-size { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 10px; background: linear-gradient(120deg, rgba(113, 182, 212, .18), rgba(113, 182, 212, .04)); }
.jw-pv-size span { font-size: 12px; color: var(--muted-2-color, #999); letter-spacing: .05em; }
.jw-pv-size b { font-size: 16px; font-weight: 700; color: var(--theme-color, #71b6d4); }
.jw-pv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jw-pv-tag { padding: 3px 10px; border-radius: 14px; font-size: 12px; border: 1px solid var(--main-border-color, rgba(0, 0, 0, .1)); color: var(--muted-color, #666); white-space: nowrap; }
.jw-pv-tag::before { content: '#'; margin-right: 2px; color: var(--theme-color, #71b6d4); }
.jw-pv-bar { position: sticky; bottom: 0; z-index: 2; background: var(--main-bg-color, #fff); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--main-border-color, rgba(0, 0, 0, .08)); }
.jw-pv-pricebox { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.jw-pv-price { font-size: 18px; color: var(--theme-color, #71b6d4); white-space: nowrap; }
.jw-pv-orig { font-size: 13px; color: var(--muted-3-color, #bbb); }
.jw-pv-tiers { width: 100%; font-size: 12px; color: var(--muted-2-color, #999); }
.jw-pv-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.jw-pv-btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 16px; border-radius: 17px; font-size: 14px; background: var(--theme-color, #71b6d4); color: #fff !important; font-weight: 600; white-space: nowrap; }
.jw-pv-btn:hover { filter: brightness(1.06); }
.jw-pv-btn.is-ghost { background: var(--muted-border-color, rgba(0, 0, 0, .05)); color: var(--main-color, #333) !important; font-weight: 400; }

@media (max-width: 768px) {
	.jw-page { padding-top: 14px; }
	.jw-wrap { padding: 0 10px; }
	.jw-h1 { font-size: 24px; }
	.jw-box { padding: 16px; border-radius: 12px; }
	.jw-banner { padding: 22px 18px; }
	.jw-stats.is-big dd { font-size: 22px; }
	.jw-crews { grid-template-columns: 1fr; gap: 14px; }
	.jw-crew-hero { min-height: 240px; }
	.jw-crew-hero-body { padding: 20px 18px; }
	.jw-bj-hero { padding: 20px 16px; gap: 16px; }
	.jw-avatar.is-large { width: 84px; height: 84px; font-size: 32px; }
	.jw-split { grid-template-columns: 1fr; gap: 0; }
	.jw-members { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 14px 8px; }
	.jw-avatar { width: 56px; height: 56px; }
	.jw-posts { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.jw-filter-row > span { width: 100%; }
	.modal-dialog.jw-modal { width: 100%; max-width: 100%; }
	.jw-pv { max-height: 82vh; }
	.jw-pv-nav { display: none; }
	.jw-pv-btn { padding: 0 12px; }
	.jw-pv-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
