/*
 * Author: ThinkDIY
 * Website: https://www.thinkdiy.cn
 * Copyright (c) 2026 ThinkDIY
 */

/**
 * Think Hub 前台样式
 *
 * 变量作用域在 .th-app 上，主色/圆角由 PHP（主题桥接）注入，
 * 未注入时使用下方回退值。夜间跟随主题 html.ta-dark。
 */

.th-app {
	--th-primary: #4682B4;
	--th-primary-dark: #396b94;
	--th-primary-soft: #ecf2f7;
	--th-primary-line: #d6e4ee;
	--th-accent: #90b4d2;
	--th-radius: 10px;
	--th-radius-sm: 6px;

	--th-ink: #1f2430;
	--th-body: #4a5261;
	--th-muted: #8b93a1;
	--th-line: #e9ecf2;
	--th-soft: #f7f8fa;
	--th-card-bg: #ffffff;
	--th-shadow: 0 1px 2px rgba(20, 28, 40, .04), 0 12px 30px -22px rgba(20, 28, 40, .35);

	box-sizing: border-box;
	margin: 26px 0;
	padding: 0;
	color: var(--th-body);
	font-size: 14.5px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

html.ta-dark .th-app {
	--th-ink: #e8ecf3;
	--th-body: #b6bfcc;
	--th-muted: #8b95a3;
	--th-line: #2a303a;
	--th-soft: #1e232b;
	--th-card-bg: #1a1f27;
	--th-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -24px rgba(0, 0, 0, .85);
}

.th-app *,
.th-app *::before,
.th-app *::after { box-sizing: border-box; }

.th-app p { margin: 0; }
.th-app h3,
.th-app h4 { margin: 0; color: var(--th-ink); font-weight: 700; line-height: 1.4; }
.th-app a { color: inherit; text-decoration: none; }
.th-app img { max-width: 100%; height: auto; display: block; }

/* ---------- 通用块 ---------- */
.th-card__title { font-size: 18px; }
.th-block__title { margin: 0 0 12px; font-size: 15px; }
.th-empty { padding: 22px; border: 1px dashed var(--th-line); border-radius: var(--th-radius); color: var(--th-muted); text-align: center; }

.th-chip {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--th-soft);
	border: 1px solid var(--th-line);
	color: var(--th-muted);
	font-size: 12px;
	line-height: 1.6;
}

.th-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 0 18px;
	height: 38px;
	border: 0;
	border-radius: var(--th-radius-sm);
	background: var(--th-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

.th-btn:hover { background: var(--th-primary-dark); color: #fff; }
.th-btn:active { transform: translateY(1px); }
.th-btn[disabled] { opacity: .6; cursor: not-allowed; }

.th-input {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius-sm);
	background: var(--th-card-bg);
	color: var(--th-ink);
	font-size: 14px;
	font-family: inherit;
	transition: border-color .18s ease, box-shadow .18s ease;
}

textarea.th-input { height: auto; padding: 9px 12px; line-height: 1.6; resize: vertical; }

.th-input:focus {
	outline: none;
	border-color: var(--th-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-primary) 14%, transparent);
}

.th-alert {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: var(--th-radius-sm);
	border: 1px solid var(--th-line);
	background: var(--th-soft);
	color: var(--th-body);
	font-size: 13.5px;
}

.th-alert--muted { color: var(--th-muted); }
.th-alert--ok { border-color: color-mix(in srgb, #18a058 30%, var(--th-line)); background: color-mix(in srgb, #18a058 8%, var(--th-card-bg)); color: var(--th-ink); }
.th-alert a { color: var(--th-primary); font-weight: 600; }

.th-link { color: var(--th-primary); }
.th-link:hover { text-decoration: underline; }

/* ---------- 投票 ---------- */
.th-vote {
	padding: 22px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background:
		radial-gradient(420px 180px at 100% 0%, color-mix(in srgb, var(--th-primary) 8%, transparent), transparent 70%),
		var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-vote__head { margin-bottom: 16px; }
.th-vote__desc { margin-top: 6px; color: var(--th-body); font-size: 13.5px; }
.th-vote__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.th-vote__form { display: grid; gap: 10px; }

.th-option {
	position: relative;
	display: flex; align-items: center; gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius-sm);
	background: var(--th-card-bg);
	cursor: pointer;
	transition: border-color .18s ease, background .18s ease;
}

.th-option:hover { border-color: var(--th-primary-line); background: var(--th-primary-soft); }
.th-option input { position: absolute; opacity: 0; pointer-events: none; }
.th-option:has(input:checked) { border-color: var(--th-primary); background: var(--th-primary-soft); }
.th-option:has(input:disabled) { cursor: default; opacity: .72; }

.th-option__cover { width: 56px; height: 56px; flex: none; border-radius: var(--th-radius-sm); overflow: hidden; background: var(--th-soft); }
.th-option__cover img { width: 100%; height: 100%; object-fit: contain; }

.th-option__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.th-option__title { color: var(--th-ink); font-weight: 600; font-size: 14.5px; }
.th-option__desc { color: var(--th-muted); font-size: 12.5px; }

.th-option__mark {
	width: 18px; height: 18px; flex: none;
	border: 1.5px solid var(--th-line);
	border-radius: 50%;
	position: relative;
	transition: border-color .18s ease, background .18s ease;
}

.th-option input[type="checkbox"] ~ .th-option__mark { border-radius: 5px; }
.th-option:has(input:checked) .th-option__mark { border-color: var(--th-primary); background: var(--th-primary); }

.th-option:has(input:checked) .th-option__mark::after {
	content: "";
	position: absolute;
	left: 5px; top: 2px;
	width: 5px; height: 9px;
	border: 2px solid #fff;
	border-top: 0; border-left: 0;
	transform: rotate(42deg);
}

.th-vote__actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.th-vote__msg { font-size: 13px; color: var(--th-muted); }
.th-vote__msg.is-error { color: #d94848; }
.th-vote__msg.is-ok { color: #18a058; }

.th-result { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--th-line); }
.th-result__title { margin-bottom: 12px; font-size: 14px; color: var(--th-ink); }
.th-result__row + .th-result__row { margin-top: 12px; }
.th-result__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13.5px; }
.th-result__name { color: var(--th-ink); font-weight: 600; }
.th-result__num { color: var(--th-muted); font-size: 12.5px; }

.th-bar { height: 8px; border-radius: 999px; background: var(--th-soft); overflow: hidden; }
.th-bar__fill {
	display: block; height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--th-primary), var(--th-accent));
	transition: width .5s cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 排行榜 ---------- */
.th-rank {
	padding: 22px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-rank__head { margin-bottom: 14px; }
.th-rank__desc { margin-top: 6px; color: var(--th-muted); font-size: 13px; }
.th-rank__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }

.th-rank__item {
	display: flex; align-items: center; gap: 12px;
	padding: 11px 14px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius-sm);
	background: var(--th-card-bg);
}

.th-rank__item.is-top { border-color: var(--th-primary-line); background: var(--th-primary-soft); }

.th-rank__no {
	width: 26px; height: 26px; flex: none;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--th-soft);
	color: var(--th-muted);
	font-size: 12.5px;
	font-weight: 700;
}

.th-rank__item.is-top .th-rank__no { background: var(--th-primary); color: #fff; }
.th-rank__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--th-soft); }
.th-rank__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.th-rank__name { color: var(--th-ink); font-weight: 600; font-size: 14px; }
.th-rank__sub { color: var(--th-muted); font-size: 12px; }
.th-rank__score { color: var(--th-primary); font-weight: 700; font-size: 15px; }

/* ---------- 赛事 ---------- */
.th-match {
	padding: 22px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-match__head { display: flex; gap: 16px; align-items: flex-start; }
.th-match__cover { width: auto; height: auto; max-width: 132px; max-height: 160px; object-fit: contain; border-radius: var(--th-radius-sm); flex: none; background: var(--th-soft); }
.th-match__intro { min-width: 0; }
.th-match__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.th-match__desc { margin-top: 10px; color: var(--th-body); font-size: 13.5px; }
.th-match__block { margin-top: 22px; }

.th-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.th-standings { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.th-standings th,
.th-standings td { padding: 9px 8px; border-bottom: 1px solid var(--th-line); text-align: center; }
.th-standings thead th { color: var(--th-muted); font-weight: 600; font-size: 12.5px; background: var(--th-soft); }
.th-standings__team { display: flex; align-items: center; gap: 8px; text-align: left; }
.th-standings__logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.th-standings__points { color: var(--th-primary); font-weight: 700; }
.th-standings tbody tr:hover { background: var(--th-soft); }

.th-round + .th-round { margin-top: 16px; }
.th-round__title { margin-bottom: 8px; color: var(--th-muted); font-size: 12.5px; font-weight: 600; }

.th-game {
	display: grid;
	grid-template-columns: 78px 1fr auto 1fr 110px;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius-sm);
	background: var(--th-card-bg);
	font-size: 13.5px;
}

.th-game + .th-game { margin-top: 6px; }
.th-game__time { color: var(--th-muted); font-size: 12px; }
.th-game__side { display: flex; align-items: center; gap: 6px; color: var(--th-ink); }
.th-game__side--home { justify-content: flex-end; text-align: right; }
.th-game__side--away { justify-content: flex-start; }
.th-game__side img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

.th-game__score {
	min-width: 62px;
	padding: 2px 8px;
	border-radius: var(--th-radius-sm);
	background: var(--th-soft);
	color: var(--th-muted);
	font-weight: 700;
	font-size: 13px;
	text-align: center;
	letter-spacing: .5px;
}

.th-game.is-done .th-game__score { background: var(--th-primary-soft); color: var(--th-primary); }
.th-game__venue { color: var(--th-muted); font-size: 12px; text-align: right; }

/* 作品评选大赛 */
.th-prose { color: var(--th-body); font-size: 13.5px; line-height: 1.8; }
.th-prose p + p { margin-top: 10px; }
.th-prose ul,
.th-prose ol { margin: 8px 0 0; padding-left: 20px; }

.th-awards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px;
}

.th-award {
	padding: 16px 18px;
	border: 1px solid var(--th-primary-line);
	border-radius: var(--th-radius-sm);
	background:
		linear-gradient(160deg, var(--th-primary-soft), var(--th-card-bg));
}

.th-award__name { color: var(--th-primary); font-size: 15px; font-weight: 700; line-height: 1.4; }
.th-award__quota { margin-top: 4px; color: var(--th-ink); font-size: 12.5px; font-weight: 600; }
.th-award__note { margin-top: 8px; color: var(--th-muted); font-size: 12.5px; line-height: 1.65; }

.th-award-grid {
	display: grid;
	grid-template-columns: repeat(var(--th-award-cols, 4), minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 900px) {
	.th-award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.th-award-grid { grid-template-columns: 1fr; }
}

.th-award-card {
	overflow: hidden;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius-sm);
	background: var(--th-card-bg);
}

.th-award-card__media {
	position: relative;
	min-height: 120px;
	overflow: hidden;
	background: var(--th-soft);
}

.th-award-card__media img { display: block; width: 100%; height: auto; object-fit: contain; }

.th-award-card__empty {
	display: grid;
	place-items: center;
	height: 100%;
	background: linear-gradient(135deg, var(--th-primary-soft), var(--th-card-bg) 55%, var(--th-primary-soft));
	color: color-mix(in srgb, var(--th-primary) 60%, #ffffff);
	font-size: 13px;
	letter-spacing: .3em;
	text-indent: .3em;
}

.th-award-card__badge {
	position: absolute;
	left: 10px;
	top: 10px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--th-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
}

.th-award-card__body { padding: 13px 15px 15px; }

.th-award-card__title { margin: 0; color: var(--th-ink); font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.th-award-card__title a:hover { color: var(--th-primary); }

.th-award-card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; color: var(--th-muted); font-size: 12px; }
.th-award-card__desc { margin-top: 7px; color: var(--th-muted); font-size: 12.5px; line-height: 1.65; overflow-wrap: anywhere; }
.th-award-card__desc p:first-child { margin-top: 0; }
.th-award-card__desc p:last-child { margin-bottom: 0; }
.th-award-card__desc img,
.th-award-card__desc video,
.th-award-card__desc iframe,
.th-award-card__desc embed { display: block; max-width: 100%; height: auto; margin: 10px 0; border-radius: 6px; }

/* ---------- 活动 ---------- */
.th-event {
	padding: 22px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-event__head { display: flex; gap: 16px; align-items: flex-start; }
.th-event__cover { width: auto; height: auto; max-width: 160px; max-height: 180px; object-fit: contain; border-radius: var(--th-radius-sm); flex: none; background: var(--th-soft); }
.th-event__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.th-event__summary { margin-top: 14px; color: var(--th-body); }
.th-event__content { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--th-line); color: var(--th-body); }
.th-event__content p + p { margin-top: 10px; }

.th-signup { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--th-line); }
.th-signup__tip { margin-bottom: 12px; color: var(--th-muted); font-size: 13px; }
.th-signup__form { display: grid; gap: 12px; }

.th-field-row { display: grid; gap: 6px; }
.th-field-label { color: var(--th-ink); font-size: 13.5px; font-weight: 600; }
.th-field-label em { color: #d94848; font-style: normal; margin-left: 2px; }
.th-signup__actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.th-signup__msg { font-size: 13px; color: var(--th-muted); }
.th-signup__msg.is-error { color: #d94848; }
.th-signup__msg.is-ok { color: #18a058; }

/* ---------- 图集 ---------- */
.th-gallery {
	padding: 22px;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-gallery__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.th-gallery__desc { margin-top: 6px; color: var(--th-muted); font-size: 13px; }

.th-gallery__grid {
	display: grid;
	grid-template-columns: repeat(var(--th-cols, 3), minmax(0, 1fr));
	gap: 12px;
}

.th-gallery__item { margin: 0; }

.th-gallery__link {
	display: block;
	border-radius: var(--th-radius-sm);
	overflow: hidden;
	background: var(--th-soft);
}

.th-gallery__link img {
	display: block;
	width: 100%; height: auto;
	object-fit: contain;
}

.th-gallery__caption { margin-top: 7px; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.th-gallery__caption strong { color: var(--th-ink); font-weight: 600; }
.th-gallery__caption span { color: var(--th-muted); }

/* 灯箱 */
.th-lightbox {
	position: fixed; inset: 0;
	z-index: 99990;
	display: flex; align-items: center; justify-content: center;
	gap: 12px;
	padding: 24px;
	background: rgba(8, 11, 16, .9);
	backdrop-filter: blur(4px);
}

.th-lightbox[hidden] { display: none; }
.th-lightbox__figure { margin: 0; max-width: min(1100px, 88vw); text-align: center; }
.th-lightbox__figure img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: var(--th-radius-sm); }

.th-lightbox__figure figcaption {
	margin-top: 12px;
	color: rgba(255, 255, 255, .78);
	font-size: 13px;
	line-height: 1.6;
}

.th-lightbox__close,
.th-lightbox__nav {
	width: 42px; height: 42px;
	flex: none;
	display: grid; place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .18s ease;
}

.th-lightbox__close:hover,
.th-lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.th-lightbox__close { position: absolute; top: 18px; right: 18px; font-size: 26px; }
.th-lightbox__nav--prev { font-size: 30px; }
.th-lightbox__nav--next { font-size: 30px; }

/* ---------- 栏目列表页 ---------- */
.th-hub-main { padding: 8px 0 56px; }
.th-hub-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.th-hub-list { margin: 0; }

.th-hub-list__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 22px;
	padding: 28px 30px;
	border: 1px solid var(--th-line);
	border-radius: calc(var(--th-radius) + 6px);
	background:
		radial-gradient(520px 200px at 100% -30%, color-mix(in srgb, var(--th-primary) 12%, transparent), transparent 70%),
		var(--th-card-bg);
	box-shadow: var(--th-shadow);
}

.th-hub-list__intro { min-width: 0; }

.th-hub-list__title {
	margin: 0;
	color: var(--th-ink);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .5px;
}

.th-hub-list__subtitle { margin: 8px 0 0; color: var(--th-muted); font-size: 13.5px; }

.th-hub-list__stat {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	padding-left: 22px;
	border-left: 1px solid var(--th-line);
	text-align: right;
}

.th-hub-list__stat strong { color: var(--th-primary); font-size: 26px; font-weight: 700; line-height: 1.1; }
.th-hub-list__stat span { color: var(--th-muted); font-size: 11.5px; }

/* 分类筛选 */
.th-hub-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.th-hub-filter__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--th-line);
	border-radius: 999px;
	background: var(--th-card-bg);
	color: var(--th-body);
	font-size: 13px;
	line-height: 1.4;
	transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.th-hub-filter__item em { color: var(--th-muted); font-size: 11.5px; font-style: normal; }
.th-hub-filter__item:hover { border-color: var(--th-primary-line); color: var(--th-primary); }
.th-hub-filter__item.is-active { border-color: var(--th-primary); background: var(--th-primary); color: #fff; }
.th-hub-filter__item.is-active em { color: rgba(255, 255, 255, .78); }

/* 卡片网格 */
.th-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
	gap: 18px;
	margin-top: 22px;
}

.th-hub-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	box-shadow: var(--th-shadow);
	transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.th-hub-card:hover {
	transform: translateY(-3px);
	border-color: var(--th-primary-line);
	box-shadow: 0 2px 4px rgba(20, 28, 40, .05), 0 20px 38px -26px rgba(20, 28, 40, .45);
}

.th-hub-card__media {
	position: relative;
	display: block;
	min-height: 160px;
	overflow: hidden;
	background: var(--th-soft);
}

.th-hub-card__cover {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.th-hub-card__cover--empty {
	display: grid;
	place-items: center;
	min-height: 160px;
	background:
		linear-gradient(135deg, var(--th-primary-soft), var(--th-card-bg) 55%, var(--th-primary-soft));
	color: color-mix(in srgb, var(--th-primary) 62%, #ffffff);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .35em;
	text-indent: .35em;
}

.th-hub-card__badge {
	position: absolute;
	left: 14px;
	top: 14px;
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 14px;
	border-radius: 8px;
	background: var(--th-status-ongoing-bg, #18a058);
	color: var(--th-status-ongoing-text, #ffffff);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .02em;
	box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .45);
}

.th-hub-card__badge--draft { background: var(--th-status-draft-bg, #2f7cf6); color: var(--th-status-draft-text, #ffffff); }
.th-hub-card__badge--ongoing { background: var(--th-status-ongoing-bg, #18a058); color: var(--th-status-ongoing-text, #ffffff); }
.th-hub-card__badge--finished { background: var(--th-status-finished-bg, #8b93a1); color: var(--th-status-finished-text, #1f2430); }
.th-hub-card__badge--rank { background: var(--th-primary); color: #ffffff; }

.th-hub-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
}

.th-hub-card__title {
	display: -webkit-box;
	overflow: hidden;
	color: var(--th-ink);
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.45;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.th-hub-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	color: var(--th-muted);
	font-size: 13px;
	line-height: 1.65;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.th-hub-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.th-hub-card__chip {
	padding: 2px 8px;
	border: 1px solid var(--th-line);
	border-radius: 999px;
	background: var(--th-soft);
	color: var(--th-muted);
	font-size: 11.5px;
	line-height: 1.6;
}

.th-hub-card__more {
	margin-top: auto;
	padding-top: 10px;
	color: var(--th-primary);
	font-size: 12.5px;
	font-weight: 600;
}

.th-hub-card__more i { font-style: normal; margin-left: 2px; transition: margin-left .18s ease; }
.th-hub-card:hover .th-hub-card__more i { margin-left: 6px; }

/* 空状态 / 分页 */
.th-hub-empty {
	margin-top: 22px;
	padding: 56px 20px;
	border: 1px dashed var(--th-line);
	border-radius: var(--th-radius);
	background: var(--th-card-bg);
	color: var(--th-muted);
	text-align: center;
}

.th-hub-empty__icon { display: block; margin-bottom: 10px; color: var(--th-primary-line); font-size: 26px; }
.th-hub-empty p { font-size: 13.5px; }

/* 同页详情 */
.th-hub-detail { margin-top: 20px; }

.th-hub-detail__back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 14px;
	padding: 7px 14px;
	border: 1px solid var(--th-line);
	border-radius: 999px;
	background: var(--th-card-bg);
	color: var(--th-muted);
	font-size: 12.5px;
	transition: color .18s ease, border-color .18s ease;
}

.th-hub-detail__back:hover { border-color: var(--th-primary-line); color: var(--th-primary); }
.th-hub-detail > .th-app { margin: 0; }

/* 统一封面（单条详情） */
.th-vote__cover,
.th-rank__cover {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	margin-bottom: 16px;
	border-radius: var(--th-radius-sm);
	object-fit: contain;
}

/* ---------- 后台占位（编辑器预览） ---------- */
.th-placeholder {
	display: flex; align-items: center; gap: 10px;
	margin: 18px 0; padding: 14px 16px;
	border: 1px dashed var(--th-line, #dfe3ea);
	border-radius: 8px;
	background: #fafbfc;
	color: #6b7280;
	font-size: 13px;
}

.th-placeholder__tag {
	padding: 2px 8px;
	border-radius: 4px;
	background: #ecf2f7;
	color: #4682B4;
	font-size: 12px;
	font-weight: 600;
}

.th-placeholder p { margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
	.th-app { font-size: 14px; margin: 20px 0; }

	.th-vote,
	.th-rank,
	.th-match,
	.th-event,
	.th-gallery { padding: 16px; }

	.th-hub-main { padding: 0 0 40px; }
	.th-hub-shell { width: calc(100% - 28px); }
	.th-hub-list__head { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
	.th-hub-list__title { font-size: 24px; }
	.th-hub-list__stat { flex-direction: row; align-items: baseline; gap: 8px; padding: 0; border-left: 0; text-align: left; }
	.th-hub-list__stat strong { font-size: 20px; }
	.th-hub-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.th-hub-filter { gap: 6px; }
	.th-hub-filter__item { padding: 6px 12px; font-size: 12.5px; }

	.th-match__head,
	.th-event__head { flex-direction: column; }

	.th-match__cover,
	.th-event__cover { width: 100%; height: auto; max-height: none; }

	.th-gallery__grid { grid-template-columns: repeat(min(var(--th-cols, 3), 2), minmax(0, 1fr)); gap: 10px; }

	.th-game {
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas:
			"time time time"
			"home score away"
			"venue venue venue";
		gap: 6px;
		padding: 12px;
	}

	.th-game__time { grid-area: time; }
	.th-game__side--home { grid-area: home; justify-content: flex-start; }
	.th-game__side--away { grid-area: away; justify-content: flex-end; }
	.th-game__score { grid-area: score; }
	.th-game__venue { grid-area: venue; text-align: left; }

	.th-lightbox { padding: 12px; gap: 4px; }
	.th-lightbox__nav { width: 34px; height: 34px; }
	.th-lightbox__figure img { max-height: 70vh; }
}

@media (max-width: 420px) {
	.th-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
