/*!
 * Xiuno AI · refresh layer
 * Loaded after modern.css. Re-skins the community UI around a white page,
 * soft grey panels, pill actions and a Geist type scale.
 */

@font-face {
	font-family: "Geist";
	src: url("../font/geist/Geist-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--page: #ffffff;
	--surface: #ffffff;
	--surface-2: #f6f8fa;
	--surface-3: #eef1f5;
	--ink: #1f2328;
	--ink-soft: #3f4650;
	--muted: #59636e;
	--faint: #6b7280;
	--line: #e3e7ee;
	--line-soft: #edf0f4;
	--line-strong: #c6ccd7;
	--primary: #345de3;
	--primary-hover: #2749c0;
	--primary-soft: #eff3ff;
	--positive: #247557;
	--danger: #aa4a43;
	--notice: #d92d20;
	--hover: #f6f8fc;
	--cta: #1f2328;
	--cta-ink: #ffffff;
	--cta-hover: #000000;
	--radius-sm: 0;
	--radius: 0;
	--radius-lg: 0;
	--radius-xl: 0;
	--header-h: 64px;
	--font-sans: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
	--page: #151b23;
	--surface: #1b222b;
	--surface-2: #1c232d;
	--surface-3: #232c37;
	--ink: #e8edf3;
	--ink-soft: #c3ccd8;
	--muted: #98a2af;
	--faint: #8b95a3;
	--line: #2a333e;
	--line-soft: #232c37;
	--line-strong: #3a4552;
	--primary: #8ba8ff;
	--primary-hover: #a6bcff;
	--primary-soft: #22304f;
	--positive: #58b894;
	--danger: #e08b84;
	--hover: #1f2732;
	--cta: #e8edf3;
	--cta-ink: #151b23;
	--cta-hover: #ffffff;
}

/* Base ------------------------------------------------------------------ */

body {
	background: var(--page);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-sans);
	font-weight: 600;
	letter-spacing: -0.025em;
	color: var(--ink);
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); }
.text-muted { color: var(--muted) !important; }
.text-grey { color: var(--muted) !important; }
.text-small { font-size: 12.5px; }
.line-height-3 { line-height: 1.8; }
.break-all { word-break: break-word; }

.skip-link { background: var(--cta); color: var(--cta-ink); border-radius: 0; }

.container { max-width: 1200px; }

/* Header ---------------------------------------------------------------- */

.modern-header {
	background: color-mix(in srgb, var(--page) 86%, transparent);
	border-bottom: 1px solid var(--line);
	min-height: var(--header-h);
	padding: 9px 0;
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
}

.modern-header .navbar-brand { gap: 10px; margin-right: 26px; }
.modern-header .navbar-brand img { width: 30px; height: 30px; border-radius: 0; }
.modern-header .logo-theme-dark { display: none; }
html[data-theme="dark"] .modern-header .logo-theme-light { display: none; }
html[data-theme="dark"] .modern-header .logo-theme-dark { display: block; }
.modern-header .brand-title { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.modern-header .brand-context { font-size: 11.5px; color: var(--faint); font-weight: 500; }

.modern-header .navbar-nav .nav-link {
	color: var(--muted);
	font-size: 14.5px;
	font-weight: 500;
	padding: 8px 14px;
	border-radius: 0;
}

.modern-header .navbar-nav .nav-link:hover { color: var(--ink); background: var(--surface-2); }
.modern-header .navbar-nav .nav-item.active > .nav-link,
.modern-header .navbar-nav .nav-item.active > .nav-link:hover {
	color: var(--ink);
	background: transparent;
	font-weight: 600;
}
.modern-header .navbar-nav .nav-register {
	background: var(--cta);
	color: var(--cta-ink);
	border-radius: 0;
	padding: 8px 17px !important;
	font-size: 13.5px;
	font-weight: 600;
}
.modern-header .navbar-nav .nav-register:hover,
.modern-header .navbar-nav .nav-register:focus { background: var(--cta-hover); color: var(--cta-ink); }

/* Account menu ----------------------------------------------------------- */

.modern-header .account-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 11px 5px 6px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
}
.modern-header .account-trigger:hover,
.modern-header .account-trigger:focus { background: var(--surface-2); color: var(--ink); }
.modern-header .account-avatar { width: 24px; height: 24px; border-radius: 0; object-fit: cover; }
.modern-header .account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modern-header .account-caret {
	width: 6px;
	height: 6px;
	margin-left: 1px;
	border-right: 1.5px solid var(--faint);
	border-bottom: 1.5px solid var(--faint);
	transform: rotate(45deg) translateY(-1px);
	transition: transform .16s ease;
}
.modern-header .account-trigger[aria-expanded="true"] .account-caret { transform: rotate(-135deg) translateY(-1px); }

.account-dropdown {
	min-width: 212px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	box-shadow: 0 20px 48px rgba(15, 23, 42, .12);
	margin-top: 10px;
}
.account-dropdown .dropdown-item {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 9px 10px;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--ink);
	font-size: 13.5px;
	text-align: left;
}
.account-dropdown .dropdown-item i { width: 15px; color: var(--muted); font-size: 13px; text-align: center; }
.account-dropdown .dropdown-item:hover,
.account-dropdown .dropdown-item:focus { background: var(--surface-2); color: var(--ink); }
.account-dropdown .account-logout,
.account-dropdown .account-logout i { color: var(--danger); }
.account-dropdown .account-logout:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.account-dropdown .dropdown-divider { margin: 5px 6px; border-color: var(--line-soft); }
.account-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px 10px;
	margin-bottom: 3px;
	border-bottom: 1px solid var(--line-soft);
}
.account-head-avatar { width: 34px; height: 34px; border-radius: 0; object-fit: cover; }
.account-head-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-head-copy b { font-size: 13.5px; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-head-copy small { font-size: 11px; color: var(--faint); }

.theme-toggle {
	width: 36px;
	height: 36px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: var(--ink-soft);
}
.theme-toggle:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.theme-toggle .icon { font-size: 17px; }

.navbar-toggler { border: 1px solid var(--line); border-radius: 0; padding: 6px 9px; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
	background-image: none;
	position: relative;
	width: 18px;
	height: 12px;
	display: inline-block;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span::before {
	display: none;
}

.modern-header .navbar-collapse { flex-grow: 1; }

@media (max-width: 991.98px) {
	.modern-header .navbar-collapse {
		margin-top: 10px;
		padding: 10px;
		background: var(--surface);
		border: 1px solid var(--line);
		border-radius: 0;
	}
}

/* Footer ---------------------------------------------------------------- */

.modern-footer {
	background: var(--page);
	border-top: 1px solid var(--line);
	color: var(--faint);
	font-size: 11.5px;
	padding: 26px 0;
	margin-top: 48px;
}
.modern-footer a { color: var(--muted); }
.modern-footer a:hover { color: var(--ink); }
.modern-footer .footer-wordmark { display: block; width: 156px; height: auto; margin: 0 0 10px; }
.modern-footer .wordmark-theme-dark { display: none; }
html[data-theme="dark"] .modern-footer .wordmark-theme-light { display: none; }
html[data-theme="dark"] .modern-footer .wordmark-theme-dark { display: block; }
@media (max-width: 479.98px) {
	.modern-footer .footer-wordmark { margin-left: auto; margin-right: auto; }
}

/* Buttons --------------------------------------------------------------- */

.btn {
	border-radius: 0;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	border: 1px solid transparent;
	box-shadow: none !important;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn:focus, .btn:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft) !important; }
.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn-primary:hover, .btn-primary:focus { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
.btn-outline-primary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline-primary:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.btn-secondary, .btn-light { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover, .btn-light:hover { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-outline-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover,
.btn-outline-danger:focus-visible { background: var(--surface-2); border-color: var(--danger); color: var(--danger); }
.btn-link { color: var(--ink); text-decoration: none; }

.btn-cta {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	height: 52px;
	padding: 6px 7px 6px 24px;
	border-radius: 0;
	letter-spacing: -0.01em;
}
.btn-cta .cta-arrow {
	width: auto;
	height: auto;
	border-radius: 0;
	background: transparent;
	color: inherit;
	display: inline-block;
	font-size: 16px;
	line-height: 1;
	transition: transform .18s ease;
}
.btn-cta:hover .cta-arrow,
.btn-cta:focus-visible .cta-arrow {
	transform: translateX(2px);
}

/* Cards & tabs ---------------------------------------------------------- */

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 20px;
}
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 15px 20px; font-size: 14.5px; font-weight: 600; }
.card-body { padding: 20px; }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 14px 20px; }

.card-header-tabs { gap: 0; border: 0; margin: 0; }
.card-header-tabs .nav-link {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	padding: 6px 2px;
	margin-right: 22px;
	color: var(--muted);
	font-size: 13.5px;
	font-weight: 550;
}
.card-header-tabs > .nav-item > .nav-link.active,
.card-header-tabs .nav-link.active {
	color: var(--ink);
	background: transparent;
	background-image: none;
	border-color: transparent;
	border-bottom: 2px solid var(--ink);
}
.card-header-tabs .nav-link:hover { color: var(--ink); }

.nav-tabs { border-color: var(--line); }

/* Hero ------------------------------------------------------------------ */

.community-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0;
	background: none;
	border: 0;
	border-radius: 0;
	padding: 58px 0 40px;
	margin: 0;
	max-width: none;
}
.community-hero::before,
.community-hero::after { content: none; display: none; }

.hero-copy { width: 100%; max-width: 840px; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 550;
	letter-spacing: 0;
	text-transform: none;
	color: var(--muted);
}
.status-dot {
	width: 7px;
	height: 7px;
	background: var(--positive);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--positive) 16%, transparent);
}

.community-hero h1 {
	font-size: clamp(40px, 5vw, 64px);
	line-height: 1.04;
	font-weight: 600;
	letter-spacing: -0.04em;
	margin: 18px 0 16px;
	color: var(--ink);
}
.community-hero .hero-lead {
	font-size: 16.5px;
	line-height: 1.72;
	color: var(--muted);
	max-width: 52ch;
	margin: 0 auto 30px;
}

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 0; flex-wrap: wrap; }
.hero-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 52px;
	padding: 0 22px;
	border: 1px solid var(--line-strong);
	background: transparent;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.hero-link:hover,
.hero-link:focus-visible {
	background: var(--surface-2);
	border-color: var(--ink);
	color: var(--ink);
}
.hero-link span { color: var(--faint); transition: transform .18s ease, color .18s ease; }
.hero-link:hover span,
.hero-link:focus-visible span { transform: translateX(3px); color: var(--ink); }

.hero-figures {
	display: flex;
	align-items: stretch;
	justify-content: center;
	width: 100%;
	max-width: 560px;
	margin: 34px auto 0;
	padding-top: 22px;
	border-top: 1px solid var(--line-soft);
}
.hero-figure { position: relative; flex: 1 1 0; padding: 0 10px; text-align: center; }
.hero-figure + .hero-figure::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 26px;
	background: var(--line-soft);
}
.hero-figure b {
	display: block;
	font-size: 26px;
	line-height: 1.1;
	font-weight: 650;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}
.hero-figure span { display: block; margin-top: 3px; font-size: 12.5px; letter-spacing: .01em; color: var(--muted); }

/* Forum directory ------------------------------------------------------- */

.forum-directory {
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 0;
	padding: 26px 28px 28px;
	margin: 12px 0 34px;
	scroll-margin-top: 92px;
}

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.section-heading h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.section-heading span { font-size: 12.5px; color: var(--muted); }

.forum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.forum-tile {
	display: flex;
	align-items: center;
	gap: 13px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0;
	padding: 15px 16px;
	color: var(--ink);
	transition: border-color .16s ease, background-color .16s ease;
}
.forum-tile:hover { border-color: var(--line-strong); background: var(--surface); transform: none; box-shadow: none; }
.forum-avatar {
	width: 42px;
	height: 42px;
	border-radius: 0;
	background: var(--surface-3);
	display: inline-grid;
	place-items: center;
	font-size: 16px;
	font-weight: 650;
	color: var(--ink-soft);
	flex: 0 0 auto;
}
.forum-tile img { width: 42px; height: 42px; border-radius: 0; object-fit: cover; }
.forum-tile-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.forum-tile strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-tile small { font-size: 11.5px; color: var(--faint); }
.tile-arrow {
	width: 30px;
	height: 30px;
	border-radius: 0;
	border: 1px solid var(--line);
	display: inline-grid;
	place-items: center;
	font-size: 12px;
	color: var(--muted);
	background: var(--surface);
	flex: 0 0 auto;
}

/* Feed / thread list ---------------------------------------------------- */

.community-feed { --bs-gutter-x: 40px; margin-top: 4px; }
.feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.feed-head h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.feed-head a { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.feed-head a:hover { color: var(--ink); }

.card.card-threadlist { border: 0; background: transparent; margin: 0; }
.card-threadlist > .card-header { padding: 0 0 12px; border: 0; }
.card-threadlist > .card-body { padding: 0; border-top: 1px solid var(--line); }

.threadlist { margin: 0; }
.threadlist > .thread {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 10px 6px;
	border-bottom: 1px solid var(--line-soft);
	background: transparent;
	cursor: pointer;
}
.threadlist > .thread:hover { background: var(--hover); }
.threadlist > .thread > input[type="checkbox"] { margin: 0 !important; flex: 0 0 auto; }

.threadlist .avatar-3 {
	width: 34px;
	height: 34px;
	border-radius: 0;
	border: 1px solid var(--line);
	object-fit: cover;
}

.threadlist .media-body { min-width: 0; }
.threadlist .subject {
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.4;
	margin-bottom: 2px;
	color: var(--ink);
}
.threadlist .subject a { color: var(--ink); }
.threadlist .subject a:visited { color: var(--ink-soft); }
.threadlist .subject .icon, .threadlist .subject .icon-lock { color: var(--faint); margin-left: 4px; }

.thread-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; font-size: 12px; color: var(--muted); }
.thread-meta .hidden-sm { display: inline; }
.thread-meta .thread-views { color: var(--faint); }
.thread-meta .thread-views,
.thread-meta .date,
.thread-meta .thread-last > span:last-child { white-space: nowrap; }
.thread-meta .thread-last { color: var(--faint); }

.thread-stat {
	margin-left: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	min-width: 48px;
	flex: 0 0 auto;
}
.thread-stat b {
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.03em;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 3px;
	font-variant-numeric: tabular-nums;
}
.thread-stat span { font-size: 11.5px; color: var(--muted); }

.thread-open {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 0;
	border: 1px solid var(--line);
	display: inline-grid;
	place-items: center;
	color: var(--muted);
	font-size: 11px;
}
.threadlist > .thread:hover .thread-open { border-color: var(--ink); color: var(--ink); }

.empty-state { padding: 52px 16px; text-align: center; }
.empty-state-icon { width: 52px; height: 52px; border-radius: 0; background: var(--surface-2); display: inline-grid; place-items: center; color: var(--faint); font-size: 20px; margin-bottom: 12px; }
.empty-state strong { display: block; font-size: 15px; font-weight: 600; }
.empty-state p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Sidebar --------------------------------------------------------------- */

.aside { padding-top: 34px; }
.aside-panel {
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 0;
	padding: 22px;
	margin-bottom: 16px;
}
.sidebar-kicker { font-size: 10.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.sidebar-title { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 8px; }
.aside-desc { font-size: 13px; line-height: 1.75; color: var(--muted); margin: 0 0 16px; }
.aside-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.aside-stats div { display: flex; flex-direction: column; gap: 1px; }
.aside-stats b { font-size: 18px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.aside-stats span { font-size: 11.5px; color: var(--muted); }
.aside-panel .btn { width: 100%; }

.sidebar-cta { display: none; }

.community-note { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 0; padding: 22px; }
.community-note i { width: 34px; height: 34px; border-radius: 0; background: var(--surface-3); display: inline-grid; place-items: center; color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.community-note h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.community-note p { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 0; }

.member-panel .sidebar-title { display: flex; align-items: center; gap: 8px; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.member-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); text-decoration: none; }
.member-link:hover .member-name { color: var(--accent); }
.member-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 0; object-fit: cover; background: var(--surface-3); }
.member-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-meta { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.member-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 0; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.member-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.member-cloud a { display: block; width: 30px; height: 30px; background: var(--surface-3); }
.member-cloud img { width: 30px; height: 30px; display: block; border-radius: 0; object-fit: cover; }
.member-note { margin: 12px 0 0; color: var(--faint); font-size: 11.5px; }
.member-empty { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* Pagination ------------------------------------------------------------ */

.pagination { gap: 6px; }
.page-link {
	display: inline-grid;
	place-items: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
}
.page-link:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.page-link .icon-angle-left, .page-link .icon-angle-right { font-size: 17px; }
.page-item.active .page-link { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.page-item.disabled .page-link { opacity: .45; }

/* Forms ----------------------------------------------------------------- */

.form-control, .form-select {
	min-height: 36px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0;
	color: var(--ink);
	font-size: 14px;
	padding: 7px 12px;
}
.form-control:focus, .form-select:focus {
	background: var(--surface);
	border-color: var(--ink-soft);
	box-shadow: 0 0 0 3px rgba(31, 35, 40, .10);
	color: var(--ink);
}
.form-control::placeholder { color: var(--faint); }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.input-group-text { background: var(--surface-2); border-color: var(--line); color: var(--muted); }

/* Forum page ------------------------------------------------------------ */

.forum-hero {
	display: flex;
	align-items: center;
	gap: 20px;
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 0;
	padding: 26px 28px;
	margin: 30px 0 8px;
}
.forum-hero-icon {
	width: 58px;
	height: 58px;
	border-radius: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	padding: 7px;
	object-fit: contain;
	flex: 0 0 auto;
}
span.forum-hero-icon {
	display: inline-grid;
	place-items: center;
	padding: 0;
	font-size: 22px;
	font-weight: 600;
	color: var(--ink-soft);
}
.forum-hero-copy { min-width: 0; flex: 1; }
.forum-hero .eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.forum-hero h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 4px; line-height: 1.2; }
.forum-hero p { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; line-height: 1.6; }
.forum-meta { font-size: 12px; color: var(--faint); }
.forum-hero > .btn { flex: 0 0 auto; }

.card-forum-info,
.card-user-info {
	background: var(--surface-2);
	border-color: var(--line-soft);
	border-radius: 0;
}
.card-forum-info .card-footer,
.card-user-info .card-footer { background: transparent; border-top-color: var(--line); }
.card-forum-info .forum-avatar {
	display: inline-grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 0;
	font-size: 26px;
	font-weight: 600;
	color: var(--ink-soft);
}
.card-forum-info .avatar-5,
.card-user-info .avatar-5 { width: 84px; height: 84px; border-radius: 0; }
.card-user-info h5 { font-weight: 600; }
.card-forum-info img.logo-5 { width: 64px; height: 64px; border-radius: 0; background: var(--surface); border: 1px solid var(--line); padding: 7px; object-fit: contain; }
.card-forum-info h5 { font-size: 16px; font-weight: 600; margin: 8px 0 6px; }
.card-forum-info .card-body { padding: 22px; }
.card-forum-info .card-footer { background: transparent; border-top-color: var(--line); }
.card-forum-info .text-start { font-size: 12.5px; color: var(--muted); }

.breadcrumb { font-size: 12px; color: var(--faint); margin: 14px 0 12px; }
.breadcrumb a { color: var(--muted); }

.theme-toggle[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1199.98px) {
	.community-hero { gap: 40px; }
}

@media (max-width: 991.98px) {
	.community-hero { padding: 38px 0 20px; }
	.hero-copy { max-width: 100%; }
	.forum-directory { padding: 22px; border-radius: 0; }
	.section-heading { margin-bottom: 14px; }
	.modern-header .account-trigger { width: 100%; justify-content: flex-start; padding: 8px 12px; border-radius: 0; }
	.modern-header .account-dropdown {
		position: static !important;
		transform: none !important;
		width: 100%;
		min-width: 0;
		margin: 6px 0 2px;
		padding: 4px 0 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}
	.modern-header .account-dropdown .account-head { padding-left: 12px; }
}

@media (max-width: 767.98px) {
	.community-hero h1 { font-size: clamp(34px, 9vw, 44px); margin: 12px 0 14px; }
	.community-hero .hero-lead { font-size: 15px; margin-bottom: 22px; }
	.hero-actions { flex-direction: column; width: 100%; max-width: 320px; gap: 10px; }
	.hero-actions .btn-cta { width: 100%; justify-content: space-between; }
	.hero-link { width: 100%; height: 50px; }
	.btn-cta { height: 50px; padding: 5px 6px 5px 18px; }
	.btn-cta .cta-arrow { width: auto; height: auto; }
	.community-hero { padding-top: 30px; }
	.forum-grid { grid-template-columns: 1fr; }
	.feed-head h2, .section-heading h2 { font-size: 20px; }
	.card-header-tabs .nav-link { font-size: 13.5px; }
	.threadlist > .thread { gap: 10px; padding: 9px 8px; }
	.threadlist .avatar-3 { width: 32px; height: 32px; border-radius: 0; }
	.threadlist .subject { font-size: 14px; line-height: 1.35; }
	.thread-meta { font-size: 11.5px; }
	.thread-stat { min-width: 40px; }
	.thread-stat b { font-size: 18px; }
	.thread-open { display: none; }
	.hero-figures { max-width: 100%; margin-top: 28px; padding-top: 18px; }
	.hero-figure b { font-size: 22px; }
	.hero-figure span { font-size: 11.5px; }
	.modern-footer { margin-top: 28px; }
}

@media (max-width: 575.98px) {
	.community-feed { --bs-gutter-x: 24px; }
	.threadlist .subject { font-size: 14px; }
	.thread-meta .hidden-sm { display: none; }
	.thread-stat span { display: block; font-size: 11px; color: var(--muted); }
	.aside-panel, .community-note { padding: 18px; }
}

/* Motion / print -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

@media print {
	.modern-header, .modern-footer, .aside, .pagination, .thread-open { display: none !important; }
	body { background: #fff; color: #000; }
}

/* Auth pages: let the login column shrink on phones (Bootstrap columns keep flex-shrink:0) */
@media (max-width: 767.98px) {
  .auth-shell > .col-lg-6,
  .auth-shell > [class*="col-"] {
    flex-basis: 100%;
    max-width: 100%;
  }
  .auth-shell .card,
  .auth-shell .card-body,
  .auth-shell #form,
  .auth-shell .input-group {
    max-width: 100%;
  }
}

/* =========================================================================
   Thread detail — reading view refinement
   Scope: thread.htm + post_list.inc.htm; the breadcrumb tweak below is the
   shared component (same markup on list pages) and only adjusts type/rhythm.
   Pure presentation; no markup changes.
   ========================================================================= */

/* Breadcrumb: quiet type, current page reads as a label, long titles truncate.
   The :hover selector is repeated so modern.css's higher-specificity hover
   rule cannot enlarge the type and padding when the pointer enters. */
.breadcrumb,
.breadcrumb:hover {
  margin: 4px 0 16px;
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}
.breadcrumb-item + .breadcrumb-item::before {
  padding-right: 7px;
  color: var(--faint);
  opacity: .65;
}
.breadcrumb-item a {
  color: var(--muted);
  font-weight: 450;
  text-decoration: none;
  transition: color .16s ease;
}
.breadcrumb-item a:hover { color: var(--ink); }
.breadcrumb-item.active { min-width: 0; }
.breadcrumb-item.active a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb .icon-home { font-size: 12px; color: var(--faint); }

/* Thread header */
.card-thread > .card-body { padding: 32px 34px 34px; }
.card-thread > .card-body > .media > a { padding-top: 6px; }
.card-thread > .card-body > .media > a .avatar-3 {
  width: 46px;
  height: 46px;
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--line);
}
.thread-title {
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.03em;
}

/* Byline: name / date / views share one rhythm, dot-separated */
.card-thread .media-body > .d-flex.small,
.postlist .post > .media-body > .d-flex.small {
  align-items: center;
  gap: 10px;
  min-height: 22px;
  color: var(--faint);
  font-size: 12.5px;
}
.card-thread .small .ms-2,
.postlist .post .small .ms-2 { margin-left: 0 !important; }
.card-thread .username a,
.postlist .post .username a {
  color: var(--ink) !important;
  font-size: 13px;
  font-weight: 600 !important;
  text-decoration: none;
}
.card-thread .username a:hover,
.postlist .post .username a:hover { color: var(--primary) !important; }
.card-thread .small .date::before,
.postlist .post .small .date::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 7px;
  border-radius: 0;
  background: currentColor;
  opacity: .5;
  vertical-align: middle;
}
.card-thread .small .icon-eye,
.postlist .post .small .icon-eye {
  margin-right: 4px;
  font-size: 12px;
  opacity: .85;
}
.card-thread .small,
.postlist .post .small { font-variant-numeric: tabular-nums; }

/* Thread-level edit / delete: quiet chips instead of loose text links */
.card-thread .post_update,
.card-thread .post_delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 0;
  color: var(--muted) !important;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}
.card-thread .post_update:hover { background: var(--surface-2); color: var(--ink) !important; }
.card-thread .post_delete:hover {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger) !important;
}

.card-thread hr {
  margin: 22px 0 24px;
  border-color: var(--line-soft);
  opacity: 1;
}
.message { line-height: 1.85; }
.message > p:last-child { margin-bottom: 0; }

/* Attachments: flat label + file chips (kills the default bullet list) */
.message .fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.message .fieldset > legend {
  float: none;
  width: auto;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
}
.message .attachlist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.message .attachlist > li { margin: 0; padding: 0; }
.message .attachlist a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.message .attachlist a:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--ink);
  text-decoration: none;
}
.message .attachlist .filetype { flex: 0 0 auto; }

/* Replies */
.card-postlist > .card-body { padding: 22px 24px 24px; }
.card-postlist .card-title {
  padding-bottom: 14px;
  font-size: 14.5px;
}
.postlist > .post { padding: 22px 0; }
.postlist .post > a.me-3 { margin-right: 14px !important; }
.postlist .post .avatar-3 {
  width: 40px;
  height: 40px;
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--line);
}
.postlist .post .message { padding-top: 8px; }

/* When the meta line wraps on narrow screens, keep the actions flush right */
.card-thread .media-body > .d-flex.small > :last-child,
.postlist .post .media-body > .d-flex > .text-end { margin-left: auto; }

/* Reply actions: real hit targets, quiet until hover */
.postlist .post .text-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.postlist .post .text-end > a {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 !important;
  border-radius: 0;
  color: var(--muted) !important;
  font-size: 13px;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}
.postlist .post .text-end .floor-parent { margin-left: 6px; }
.postlist .post .text-end > a:hover { background: var(--surface-2); color: var(--ink) !important; }
.postlist .post .text-end > a.post_delete:hover {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger) !important;
}

/* Floor number becomes one compact chip: "2 楼" */
.floor-parent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 0;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1;
}
.floor-parent .floor {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Quick reply composer */
.postlist .newpost {
  margin-top: 18px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--surface-2);
}
.postlist .newpost > .media-body > .d-flex {
  align-items: center;
  margin-bottom: 12px !important;
}
.postlist .newpost .username,
.postlist .newpost .media-body > div:first-child > div:first-child { color: var(--ink); }
.postlist .newpost .floor {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 0;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#quick_reply_form #message {
  min-height: 118px;
  resize: vertical;
  border-color: var(--line);
  font-size: 14.5px;
}
#quick_reply_form #message:focus {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .10);
}
html[data-theme="dark"] #quick_reply_form #message { background: var(--surface-3); }
#quick_reply_form .btn {
  min-height: 40px;
  padding: 0 22px;
  border-radius: 0;
  font-size: 13.5px;
}
#advanced_reply {
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}
#advanced_reply:hover { color: var(--ink); }

/* Back: ghost pill with an arrow instead of a full-width bar */
.xn-back {
  display: flex !important;
  align-items: center;
  gap: 7px;
  width: max-content !important;
  max-width: 100%;
  margin: 6px auto 28px !important;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}
.xn-back::before { content: "←"; font-size: 14px; line-height: 1; }
.xn-back:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

/* Moderation: one segmented bar instead of four floating pills */
.mod-button {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}
.mod-button > .btn {
  flex: 0 0 auto;
  padding: 7px 16px;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.mod-button > .btn:hover { background: var(--surface-2); color: var(--ink); }
.mod-button > .btn.delete:hover {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger);
}

/* Sidebar author card */
.card-user-info { overflow: hidden; }
.card-user-info .m-3 { margin: 24px 24px 18px !important; }
.card-user-info .avatar-5 {
  width: 80px;
  height: 80px;
  margin-top: 0;
  border-radius: 0;
}
.card-user-info h5 { margin: 14px 0 0; font-size: 17px; }
.card-user-info h5 a { color: var(--ink); text-decoration: none; }
.card-user-info .card-footer { padding: 14px 10px; }
.card-user-info table td { padding: 2px; }
.card-user-info table span { font-size: 11.5px; }
.card-user-info table b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
  .card-thread > .card-body { padding: 24px 18px 22px; }
  .card-thread > .card-body > .media > a .avatar-3 { width: 40px; height: 40px; border-radius: 0; }
  .thread-title { font-size: 23px; letter-spacing: -.02em; }
  .card-postlist > .card-body { padding: 18px 15px 20px; }
  .postlist .post .text-end > a { width: 26px; height: 26px; }
  .floor-parent { height: 22px; padding: 0 8px; }
  .postlist .newpost { padding: 14px 14px 16px; }
  .message .attachlist a { padding: 8px 12px; font-size: 12.5px; }
  .xn-back { margin-bottom: 20px !important; }
}
/* Search ---------------------------------------------------------------- */

.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 0 8px;
}
.nav-search-input {
  width: 190px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.nav-search-input::placeholder { color: var(--faint); }
.nav-search-input:focus {
  outline: 0 !important;
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: none;
}
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--cta);
  color: var(--cta-ink);
  cursor: pointer;
  transition: background .18s ease;
}
.nav-search-btn:hover, .nav-search-btn:focus-visible { background: var(--cta-hover); color: var(--cta-ink); }
.nav-search-btn .icon { font-size: 15px; }

.search-panel {
  display: grid;
  gap: 16px;
  padding: 26px 28px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 72%);
}
.search-panel .eyebrow { color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.search-panel h1 { margin: 6px 0 4px; font-size: 27px; letter-spacing: -.03em; }
.search-panel p { margin: 0; color: var(--muted); font-size: 13.5px; }
.search-form { display: flex; gap: 8px; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(20, 26, 38, .04);
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.search-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 22px;
  border-radius: 0;
  font-weight: 600;
  white-space: nowrap;
}
.search-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 0 !important; color: var(--muted); font-size: 13.5px; }
.search-keyword {
  display: inline-block;
  max-width: 26em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 10px;
  border-radius: 0;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.search-results .card-header { border-bottom: 1px solid var(--line-soft); }
.search-results-label { color: var(--faint); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; }
.search-result { padding: 18px 4px; border-bottom: 1px solid var(--line-soft); }
.search-result:first-child { padding-top: 6px; }
.search-result:last-child { padding-bottom: 4px; border-bottom: 0; }
.search-result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 12.5px; }
.search-result-forum {
  padding: 2px 9px;
  border-radius: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-weight: 600;
}
.search-result-forum:hover { color: var(--ink); border-color: var(--line-strong); }
.search-result-title { margin: 8px 0 6px; font-size: 17.5px; line-height: 1.5; letter-spacing: -.015em; }
.search-result-title a { color: var(--ink); }
.search-result-title a:hover { color: var(--primary); }
.search-result-snippet {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.75;
  word-break: break-word;
}
.search-result-stat { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }
.search-hit {
  padding: 0 2px;
  border-radius: 0;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: inherit;
  font-weight: 600;
}
.search-capped { margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.search-empty .empty-state { padding: 48px 20px; }
html[data-theme="dark"] .search-panel { background: linear-gradient(180deg, var(--surface-2), var(--surface) 72%); }

@media (max-width: 991.98px) {
  .nav-search { width: 100%; margin: 8px 0 10px; }
  .nav-search-input { flex: 1 1 auto; width: auto; }
}
@media (max-width: 575.98px) {
  .search-panel { padding: 20px 18px; border-radius: 0; }
  .search-submit span { display: none; }
  .search-submit { padding: 0 16px; }
  .search-result-title { font-size: 16.5px; }
}
/* ---- favorites ---- */
.favorite-toggle { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.favorite-toggle:hover { color: var(--primary); }
.favorite-toggle.is-active { color: #c79100; }
.favorite-toggle i { margin-right: 2px; }
.favorite-list { display: flex; flex-direction: column; }
.favorite-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.favorite-item:last-child { border-bottom: 0; }
.favorite-main { min-width: 0; }
.favorite-title { display: block; color: var(--ink); font-weight: 600; font-size: 15.5px; text-decoration: none; }
.favorite-title:hover { color: var(--primary); }
.favorite-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.favorite-forum { padding: 1px 8px; border-radius: 0; background: var(--surface-2); color: var(--muted); text-decoration: none; }
.favorite-forum:hover { color: var(--primary); }
.favorite-remove { flex: 0 0 auto; }
@media (max-width: 575.98px) {
  .favorite-item { flex-direction: column; }
  .favorite-remove { align-self: flex-end; }
}

/* 通知 */
.modern-header .navbar-nav .nav-link.nav-notice-link,
.modern-header .navbar-nav .nav-link.nav-pm-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0 !important; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.nav-notice-link:hover,
.nav-pm-link:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.nav-notice-link:hover .nav-notice-badge,
.nav-pm-link:hover .nav-notice-badge { box-shadow: 0 0 0 2px var(--surface-2); }
.nav-notice-link .icon-bell,
.nav-pm-link .icon-envelope { font-size: 17px; }
.nav-notice-badge { position: absolute; top: -1px; right: -1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 0; background: var(--notice); color: #fff; font-size: 9.5px; line-height: 16px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--page); }
.dropdown-notice-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 0; background: var(--notice); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; font-weight: 600; }
.notice-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.notice-toolbar form { margin: 0; }
.notice-list { margin: 0; }
.notice-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); }
.notice-item:last-child { border-bottom: 0; }
.notice-item.notice-unread { background: linear-gradient(90deg, var(--primary-soft), transparent 70%); border-radius: 0; }
.notice-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 0; object-fit: cover; }
.notice-main { flex: 1 1 auto; min-width: 0; }
.notice-text { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.notice-actor { color: var(--ink); font-weight: 600; text-decoration: none; }
.notice-actor:hover { color: var(--primary); }
.notice-action { color: var(--muted); margin: 0 3px; }
.notice-subject { color: var(--primary); font-weight: 600; text-decoration: none; }
.notice-subject:hover { text-decoration: underline; }
.notice-meta { margin-top: 4px; color: var(--faint); font-size: 12px; }
.notice-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.notice-actions form { margin: 0; }
@media (max-width: 575.98px) {
  .notice-item { flex-wrap: wrap; }
  .notice-actions { width: 100%; justify-content: flex-end; }
  .notice-text { font-size: 13.5px; }
}

/* Header rhythm: 36px control row (desktop) ------------------------------ */
@media (min-width: 992px) {
  .modern-header .navbar-brand {
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .modern-header #nav > ul:first-child { align-items: center; }
  .modern-header #nav > ul:first-child > .nav-item > .nav-link {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px !important;
  }

  .modern-header #nav > ul:last-child { align-items: center; gap: 8px; }
  .modern-header #nav > ul:last-child > .nav-item { display: flex; align-items: center; }
  .modern-header #nav > ul:last-child > .nav-item > .nav-link { height: 36px; }

  .modern-header .navbar-nav .nav-link {
    transition: background-color .16s ease, color .16s ease;
  }

  .modern-header .navbar-nav .nav-link.account-trigger {
    height: 36px;
    padding: 0 10px 0 4px !important;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
  }
  .modern-header .navbar-nav .nav-link.account-trigger:hover,
  .modern-header .navbar-nav .nav-link.account-trigger:focus,
  .modern-header .navbar-nav .nav-link.account-trigger[aria-expanded="true"] {
    border-color: var(--line-strong);
    background: var(--surface-2);
    color: var(--ink);
  }

  .modern-header .account-avatar { width: 26px; height: 26px; }

  .nav-search { margin: 0 12px 0 8px; }
  .nav-search-input { padding: 0 12px; }
}

/* Consistency pass: one neutral accent, one component rhythm -------------- */

/* Tabs: hover/active use ink, not brand blue */
.card-header-tabs > .nav-item > .nav-link:hover:not(.active) { color: var(--ink); }

/* Focus states: neutral ring instead of blue */
.nav-search-input:focus,
.search-input:focus,
#quick_reply_form #message:focus {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .10);
}
html[data-theme="dark"] .nav-search-input:focus,
html[data-theme="dark"] .search-input:focus,
html[data-theme="dark"] #quick_reply_form #message:focus {
  box-shadow: 0 0 0 3px rgba(232, 237, 243, .14);
}
.btn:focus,
.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .12) !important;
}
html[data-theme="dark"] .btn:focus,
html[data-theme="dark"] .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 237, 243, .16) !important;
}
.form-check-input:focus {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .10);
}
.form-check-input:checked {
  background-color: var(--ink);
  border-color: var(--ink);
}

/* Inline accents that were still blue */
.search-keyword { background: var(--surface-2); color: var(--ink); }
.search-result-title a:hover,
.favorite-toggle:hover,
.favorite-title:hover,
.favorite-forum:hover,
.notice-actor:hover,
.postlist .post .username a:hover { color: var(--ink) !important; }
.notice-subject {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}
.notice-subject:hover { text-decoration-color: var(--ink); }
.notice-item.notice-unread {
  background: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--ink);
}

/* My-account sidebar: 44px rows, ink active state */
#my_aside .list-group-item,
#user_aside .list-group-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  border-color: var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}
#my_aside .list-group-item-action:hover,
#user_aside .list-group-item-action:hover {
  background: var(--surface-2);
  color: var(--ink);
}
#my_aside .list-group-item.active,
#user_aside .list-group-item.active {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--ink);
}

/* File fields + avatar progress: match the 36px control rhythm */
#my_main input[type="file"].form-control {
  height: 36px;
  padding: 4px 6px;
  font-size: 12.5px;
}
#my_main input[type="file"].form-control::file-selector-button {
  height: 26px;
  margin: 0 8px 0 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#my_main input[type="file"].form-control::file-selector-button:hover {
  background: var(--surface-3);
}
.progress:has(> .progress-bar[style*="display: none"]) { display: none; }

/* Profile moderation actions: compact, right aligned, red reserved for delete */
.user-mod-actions {
  display: block;
  text-align: right;
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.user-mod-actions .btn {
  display: inline-block;
  width: auto !important;
  height: 40px;
  min-height: 40px;
  margin: 0 !important;
  padding: 0 16px !important;
  font-size: 13px;
  line-height: 38px;
  vertical-align: middle;
}
.user-mod-actions .btn + .btn { margin-left: 10px !important; }

/* Footer brand: same lockup as the header */
.modern-footer .footer-brandline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.modern-footer .footer-logo {
  display: block;
  width: 26px;
  height: 26px;
}
.modern-footer .footer-brandname {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.modern-footer .footer-meta { color: var(--muted); }
.modern-footer .footer-meta b { color: var(--ink-soft); font-weight: 600; }
.modern-footer .footer-meta b span { color: var(--muted); font-weight: 500; }
.modern-footer .logo-theme-dark { display: none; }
html[data-theme="dark"] .modern-footer .logo-theme-light { display: none; }
html[data-theme="dark"] .modern-footer .logo-theme-dark { display: block; }

/* input group focus: neutral */
.input-group:focus-within .input-group-text {
	border-color: var(--ink-soft);
	color: var(--ink);
}

/* ---------- Bilibili-style reaction bar: like + coin ---------- */
.bili-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.bili-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.bili-action:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.bili-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bili-action[disabled] { opacity: .55; cursor: default; }
.bili-action .bili-icon { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
.bili-action .bili-icon svg { display: block; width: 20px; height: 20px; }
.bili-action .bili-icon i { font-size: 17px; line-height: 1; }
.bili-action .bili-count { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.bili-action-static { border-color: var(--line-soft); background: transparent; color: var(--muted); cursor: default; }
.bili-action-static:hover { border-color: var(--line-soft); background: transparent; color: var(--muted); }
.bili-action-coin .bili-icon { color: #d9941a; }
.bili-action-coin:hover { color: #b97a00; border-color: rgba(245, 166, 35, .55); background: rgba(245, 166, 35, .10); }
.bili-action-coin:hover .bili-count,
.bili-action-coin.is-active .bili-count { color: #b97a00; }
.bili-action-coin.is-active { color: #b97a00; border-color: rgba(245, 166, 35, .55); background: rgba(245, 166, 35, .12); }
.bili-action.post-like:hover { color: #d6336c; border-color: rgba(214, 51, 108, .5); background: rgba(214, 51, 108, .08); }
.bili-action.post-like:hover .bili-count,
.bili-action.post-like.is-active .bili-count { color: #d6336c; }
.bili-action.post-like.is-active { color: #d6336c; border-color: rgba(214, 51, 108, .5); background: rgba(214, 51, 108, .1); }
html[data-theme="dark"] .bili-action-coin .bili-icon { color: #f5b642; }
html[data-theme="dark"] .bili-action-coin:hover,
html[data-theme="dark"] .bili-action-coin.is-active { color: #f5b642; }
html[data-theme="dark"] .bili-action.post-like:hover,
html[data-theme="dark"] .bili-action.post-like.is-active { color: #ff85a2; }
html[data-theme="dark"] .bili-action.post-like:hover .bili-count,
html[data-theme="dark"] .bili-action.post-like.is-active .bili-count { color: #ff85a2; }
.bili-coin-icon.is-coin-pop svg { animation: bili-coin-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes bili-coin-pop {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.26) rotate(-8deg); }
  70% { transform: scale(.94) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---------- Coin dialog ---------- */
body.coin-modal-open { overflow: hidden; }
.coin-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.coin-modal[hidden] { display: none; }
.coin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 22, .55);
  animation: coin-fade .16s ease-out;
}
.coin-modal-panel {
  position: relative;
  width: min(400px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(10, 15, 22, .28);
  animation: coin-pop .2s cubic-bezier(.2, .8, .3, 1.1);
}
.coin-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.coin-modal-close:hover { color: var(--ink); background: var(--surface-2); }
.coin-modal-head { padding: 0 18px; text-align: center; }
.coin-modal-icon { display: inline-flex; width: 46px; height: 46px; margin-bottom: 10px; color: #d9941a; }
.coin-modal-icon svg { display: block; width: 100%; height: 100%; }
.coin-modal-title { margin: 0 0 6px; color: var(--ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.coin-modal-sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.coin-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 12px; }
.coin-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 74px;
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.coin-option svg { width: 20px; height: 20px; color: #c9922a; }
.coin-option:hover { border-color: rgba(245, 166, 35, .6); color: var(--ink); }
.coin-option.is-selected { border-color: #e09a12; background: rgba(245, 166, 35, .1); color: var(--ink); box-shadow: inset 0 0 0 1px #e09a12; }
.coin-option-check { position: absolute; right: 5px; top: 5px; display: none; width: 14px; height: 14px; background: #e09a12; color: #fff; font-size: 9px; line-height: 14px; text-align: center; }
.coin-option-check::before { content: "✓"; }
.coin-option.is-selected .coin-option-check { display: block; }
.coin-custom { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.coin-custom[hidden] { display: none; }
.coin-custom-label { color: var(--muted); font-size: 12.5px; }
.coin-custom-input { width: 110px; height: 36px; padding: 0 10px; border: 1px solid var(--line); background: var(--page); color: var(--ink); font: inherit; font-size: 14px; }
.coin-custom-input:focus { outline: none; border-color: #e09a12; box-shadow: 0 0 0 2px rgba(245, 166, 35, .18); }
.coin-balance { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 9px 12px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.coin-balance-value { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.coin-wallet-link { margin-left: auto; color: var(--primary); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.coin-wallet-link:hover { text-decoration: underline; }
.coin-wallet-link[hidden] { display: none; }
.coin-tip { margin: 0 0 8px; color: var(--faint); font-size: 12px; line-height: 1.5; }
.coin-error { margin: 0 0 10px; color: var(--danger); font-size: 12.5px; line-height: 1.5; }
.coin-error[hidden] { display: none; }
.coin-modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.coin-btn { flex: 1; height: 40px; border: 1px solid var(--line); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.coin-btn-ghost { background: var(--surface); color: var(--ink-soft); }
.coin-btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.coin-btn-primary { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.coin-btn-primary:hover { background: var(--cta-hover); }
.coin-btn[disabled] { opacity: .5; cursor: not-allowed; }
.coin-btn.is-busy { opacity: .7; }
@keyframes coin-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes coin-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Toast ---------- */
.bili-toast {
  position: fixed;
  left: 50%;
  top: 14%;
  z-index: 1400;
  max-width: min(86vw, 420px);
  padding: 10px 18px;
  background: rgba(24, 28, 34, .94);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
}
.bili-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 575.98px) {
  .bili-actions { gap: 8px; }
  .bili-action { padding: 0 12px; }
  .coin-modal { padding: 14px; }
  .coin-modal-panel { padding: 22px 16px 16px; }
  .coin-options { gap: 8px; }
  .coin-option { height: 68px; }
}

/* Header action cluster: one aligned control row ------------------------- */
@media (min-width: 992px) {
  .modern-header .navbar-collapse { align-items: center; }
  .modern-header #nav > ul:last-child { align-items: center; gap: 8px; flex: 0 0 auto; }
  .modern-header #nav > ul:last-child > .nav-item { display: flex; align-items: center; margin: 0; }
  .modern-header #nav > ul:last-child > .nav-item > .nav-link { height: 38px; }
  .modern-header #nav > ul:last-child > .nav-item > .nav-link.account-trigger { height: 38px; }

  .modern-header .nav-search { gap: 0; margin: 0 18px 0 12px; }
  .modern-header .nav-search-input {
    width: 220px;
    height: 38px;
    padding: 0 14px;
    border-right: 0;
    background: var(--surface);
  }
  .modern-header .nav-search-input::placeholder { color: var(--muted); opacity: .85; }
  .modern-header .nav-search-input:focus {
    outline: 0 !important;
    border-color: var(--ink);
    box-shadow: none;
  }
  .modern-header .nav-search:focus-within .nav-search-btn { background: var(--cta-hover); }
  .modern-header .nav-search-btn { width: 38px; height: 38px; }
  .modern-header .nav-search-btn .icon { font-size: 16px; }

  .modern-header .navbar-nav .nav-link.account-trigger {
    height: 38px;
    padding: 0 12px 0 5px !important;
    gap: 9px;
  }
  .modern-header .account-avatar { width: 26px; height: 26px; }
  .modern-header .account-caret { border-color: var(--muted); }

  .modern-header .theme-toggle { width: 38px; height: 38px; background: var(--surface); }
  .modern-header .theme-toggle .icon { transition: transform .2s ease; }
  .modern-header .theme-toggle:hover .icon { transform: rotate(45deg); }
}

/* ------------------------------------------------------------------
   Image lightbox: click any image in a post to view it full-screen.
   ------------------------------------------------------------------ */
.message img.is-zoomable { cursor: zoom-in; }
.message img.is-zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
html.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 13, .94);
  opacity: 0;
  transition: opacity .16s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 76px;
}
.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  max-width: min(1400px, 100%);
  max-height: calc(100vh - 152px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  user-select: none;
}
.lightbox__caption {
  max-width: min(80vw, 900px);
  overflow: hidden;
  color: rgba(255, 255, 255, .66);
  font-size: 12.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 0;
  background: rgba(10, 12, 16, .42);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  border-color: #fff;
  background: #fff;
  color: #111;
}
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.lightbox__close {
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  width: 44px;
  height: 64px;
  transform: translateY(-50%);
  font-size: 18px;
}
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

.lightbox__meta {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.lightbox__counter {
  color: rgba(255, 255, 255, .62);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .lightbox__stage { padding: 52px 12px 64px; }
  .lightbox__img { max-height: calc(100vh - 176px); }
  .lightbox__nav { top: auto; bottom: 14px; width: 40px; height: 40px; transform: none; }
  .lightbox__nav--prev { left: calc(50% - 52px); }
  .lightbox__nav--next { right: calc(50% - 52px); }
  .lightbox__meta { bottom: 62px; }
  .lightbox__close { top: 12px; right: 12px; }
}

/* ===== 个人中心导航：桌面侧栏 + 移动端横向标签 ===== */
.my-account-card {
  overflow: hidden;
}
.my-account-head {
  padding: 22px 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.my-account-avatar {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.my-account-name {
  margin: 10px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}
.my-account-nav {
  padding: 8px 0;
}
.my-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}
.my-nav-item { margin: 0; }
.my-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.my-nav-link .icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
  opacity: .62;
  transition: opacity .15s ease;
}
.my-nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.my-nav-link:hover .icon { opacity: .9; }
.my-nav-link.active {
  border-left-color: var(--ink);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}
.my-nav-link.active .icon { opacity: 1; }
.my-nav-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

@media (max-width: 991.98px) {
  .my-nav-header {
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
  }
  .my-nav-header .my-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .my-nav-header .my-nav::-webkit-scrollbar { display: none; }
  .my-nav-header .my-nav-item { flex: 0 0 auto; }
  .my-nav-header .my-nav-link {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 12.5px;
    white-space: nowrap;
  }
  .my-nav-header .my-nav-link .icon {
    width: 15px;
    height: 15px;
    font-size: 15px;
  }
  .my-nav-header .my-nav-link:hover {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink);
  }
  .my-nav-header .my-nav-link.active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--surface);
  }
  .my-nav-header .my-nav-link.active .icon { color: inherit; }
}

/* Profile content follows the theme's ink color (Bootstrap's .card-body default is fixed dark). */
#my_main .card-body { color: var(--ink); }

@media (min-width: 992px) {
  #my_aside .my-account-card {
    position: sticky;
    top: 84px;
  }
}

/* =========================================================================
   Account password form
   Scope: my_password.htm. Square-cornered fields, visible labels, eye toggles.
   ========================================================================= */

.password-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.password-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
}
.password-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}
.password-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.password-form .pw-field { margin-bottom: 18px; }
.password-form .form-group { margin-bottom: 0; }
.password-form .pw-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}
.password-form .input-group { flex-wrap: wrap; }
.password-form .input-group .input-group-text {
  width: 46px;
  justify-content: center;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--muted);
  font-size: 16px;
}
.password-form .input-group .form-control {
  height: 46px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 0;
  color: var(--ink);
  font-size: 14px;
  box-shadow: none;
}
.password-form .input-group .form-control:focus {
  border-color: var(--ink);
  box-shadow: none;
  background: var(--surface);
}
.password-form .input-group:focus-within .input-group-text {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}
.password-form .pw-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.password-form .pw-toggle:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.password-form .pw-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.password-form .form-group.is-invalid .input-group-text,
.password-form .form-group.is-invalid .pw-toggle,
.password-form .form-control.is-invalid {
  border-color: var(--danger);
  color: var(--danger);
}
.password-form .form-control.is-invalid ~ .invalid-feedback { display: block; }
.password-form .invalid-feedback {
  flex-basis: 100%;
  order: 9;
  margin: 6px 0 0;
  padding-left: 2px;
  font-size: 12px;
  color: var(--danger);
}
.pw-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}
.pw-hint i { margin-top: 1px; font-size: 14px; }
.password-actions { margin-top: 24px; }
.password-form #submit {
  height: 46px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}
.password-forgot {
  display: block;
  margin-top: 14px;
  font-size: 12.5px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
}
.password-forgot:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 575.98px) {
  .password-head { gap: 12px; margin-bottom: 18px; padding-bottom: 14px; }
  .password-badge { width: 40px; height: 40px; font-size: 18px; }
  .password-title { font-size: 17px; }
  .password-form .input-group .input-group-text,
  .password-form .pw-toggle { width: 44px; }
  .password-form .input-group .input-group-text,
  .password-form .input-group .form-control,
  .password-form .pw-toggle,
  .password-form #submit { height: 44px; }
}

/* ==========================================================================
   UI unification pass
   ========================================================================== */

/* Bootstrap cards carry `color: var(--bs-body-color)` (#212529). This theme
   switches through [data-theme], not [data-bs-theme], so card content stayed
   near-black on the dark surface (admin radios, thread section headings). */
.card { color: var(--ink); }
.card-header,
.card-footer { color: var(--ink); }

/* A disabled CTA used to fall back to Bootstrap's blue primary. */
.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
	background: var(--surface-2);
	border-color: var(--line);
	color: var(--muted);
	opacity: 1;
}
.btn-primary:disabled,
.btn-primary.disabled {
	background: var(--surface-2);
	border-color: var(--line);
	color: var(--muted);
}

/* Auth pages were the only cards with a drop shadow. */
.auth-shell .card,
.auth-mark { box-shadow: none; }

/* Page-head icon badges: use the same neutral surface as the auth mark. */
.editor-heading > i {
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	color: var(--ink);
}

/* Search is a form card, not a gradient hero. */
.search-panel { background: var(--surface); }
html[data-theme="dark"] .search-panel { background: var(--surface); }
.search-input { box-shadow: none; }
.search-input:focus {
	border-color: var(--ink-soft);
	box-shadow: 0 0 0 3px rgba(31, 35, 40, .10);
}
html[data-theme="dark"] .search-input:focus {
	box-shadow: 0 0 0 3px rgba(232, 237, 243, .12);
}

/* Shared account-page heading. */
.account-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0 0 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line-soft);
}
.account-head-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line-soft);
	background: var(--surface-2);
	color: var(--ink);
	font-size: 19px;
}
.account-head h2 {
	margin: 1px 0 3px;
	font-size: 19px;
	font-weight: 650;
	letter-spacing: -.02em;
}
.account-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Avatar editor */
.avatar-editor {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	flex-wrap: wrap;
}
.avatar-editor .avatar-preview {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border: 1px solid var(--line);
	background: var(--surface-2);
}
.avatar-editor-body { flex: 1 1 280px; min-width: 0; }
.avatar-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avatar-upload-row .btn { margin: 0; cursor: pointer; }
.avatar-editor .progress {
	height: 4px;
	margin-top: 16px;
	border-radius: 0;
	background: var(--surface-2);
}
.avatar-editor .progress-bar { background: var(--ink); }

/* Wallet: one panel with hairline dividers, not three nested cards. */
.wallet-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 22px;
	border: 1px solid var(--line);
	background: var(--surface-2);
}
.wallet-stat { padding: 18px 20px; }
.wallet-stat + .wallet-stat { border-left: 1px solid var(--line); }
.wallet-stat-label { color: var(--muted); font-size: 12.5px; }
.wallet-stat-value {
	margin-top: 6px;
	color: var(--ink);
	font-size: 30px;
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}
.wallet-stat-unit { margin-top: 1px; color: var(--faint); font-size: 12px; }

/* Bootstrap tables keep a white cell background in dark mode. */
.table {
	--bs-table-bg: transparent;
	--bs-table-color: var(--ink);
	--bs-table-border-color: var(--line-soft);
	--bs-table-striped-bg: var(--surface-2);
	--bs-table-striped-color: var(--ink);
	--bs-table-hover-bg: var(--hover);
	--bs-table-hover-color: var(--ink);
}
.table > :not(caption) > * > * {
	background-color: transparent;
	border-color: var(--line-soft);
}
.table thead th {
	background: var(--surface-2);
	color: var(--muted);
	font-weight: 600;
}
.table tbody tr:hover { background: var(--hover); }

#my_main .wallet-ledger .text-success { color: var(--positive) !important; font-weight: 600; }
#my_main .wallet-ledger .text-danger { color: var(--danger) !important; font-weight: 600; }

/* Restore semantic colors that the legacy layer flattened to ink. */
.modern-community .text-danger { color: var(--danger) !important; }
.modern-community .text-success { color: var(--positive) !important; }

/* Account-page section headings and compact empty states. */
.my-section-title {
	margin: 26px 0 14px;
	color: var(--ink);
	font-size: 15px;
	font-weight: 650;
	letter-spacing: -.01em;
}
.empty-state.empty-state-compact { padding: 28px 16px 30px; }

.notice-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line-soft);
}
.notice-toolbar-text { color: var(--muted); font-size: 13px; }

/* Password form sits under the shared account heading, left aligned. */
.password-layout { max-width: 480px; }

/* Public profile uses the same fact list as the account page. */
.user-profile-identity { min-width: 112px; }
.user-profile-name { margin-top: 8px; font-size: 14px; font-weight: 600; }
.user-profile-facts { min-width: 0; }
.user-mod-actions .btn { min-height: 40px; }

/* The PM start form lives in a compact toolbar; keep both controls aligned. */
.pm-toolbar .form-control { height: 40px; }

/* Public-profile mobile nav uses the account tabs' pill language. */
#user_mobile_nav { display: flex; width: 100%; gap: 8px; margin: 0 0 16px !important; }
#user_mobile_nav .btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: var(--muted);
	font-size: 12.5px;
	font-weight: 600;
}
#user_mobile_nav .btn.active { border-color: var(--ink); background: var(--ink); color: var(--surface); }

/* Profile facts */
.profile-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	margin: 0;
}
.profile-facts > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line-soft);
}
.profile-facts > div:nth-child(odd) { padding-right: 24px; }
.profile-facts > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line-soft); }
.profile-facts > div.profile-fact-wide { grid-column: 1 / -1; padding-right: 0; padding-left: 0; border-left: 0; }
.profile-facts dt {
	color: var(--muted);
	font-size: 13px;
	font-weight: 400;
}
.profile-facts dd {
	margin: 0;
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 500;
	overflow-wrap: anywhere;
	text-align: right;
}
.profile-facts .profile-fact-wide { grid-column: 1 / -1; }

@media (max-width: 767.98px) {
	.wallet-stats { grid-template-columns: minmax(0, 1fr); }
	.wallet-stat + .wallet-stat { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 575.98px) {
	.modern-footer .footer-brandline { justify-content: center; }
	.hero-actions .btn-cta { justify-content: center; gap: 9px; }
	.account-head { gap: 12px; margin-bottom: 18px; padding-bottom: 14px; }
	.account-head-icon { width: 40px; height: 40px; font-size: 18px; }
	.account-head h2 { font-size: 17px; }
	.avatar-editor { gap: 18px; }
	.avatar-editor .avatar-preview { width: 80px; height: 80px; }
	.profile-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.profile-facts > div:nth-child(odd),
	.profile-facts > div:nth-child(even) { padding-right: 0; padding-left: 0; border-left: 0; }
}

/* Legacy 4px chips break the square-corner system. */.modern-community .uid-chip { border-radius: 0; }

/* Keep the thread author rail in view while the discussion scrolls. */
@media (min-width: 992px) {
	.thread-aside {
		position: sticky;
		top: calc(var(--header-h) + 16px);
		align-self: flex-start;
		margin-top: 34px;
		padding-top: 0;
		max-height: calc(100vh - var(--header-h) - 32px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}
}

/* Nav forums dropdown --------------------------------------------------- */

.nav-forums { margin-left: 4px; }
.nav-forums .dropdown-toggle { display: flex; align-items: center; gap: 6px; }
.nav-forums .dropdown-toggle::after { margin-left: 2px; opacity: .6; }
.nav-forums .dropdown-menu {
	min-width: 190px;
	padding: 6px;
	border: 1px solid var(--line);
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(15, 23, 42, .10);
}
.nav-forums .dropdown-item { padding: 8px 12px; font-size: 13.5px; color: var(--ink-soft); }
.nav-forums .dropdown-item:hover, .nav-forums .dropdown-item:focus { background: var(--surface-2); color: var(--ink); }
.nav-forums .dropdown-item.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }

/* Status / 404 page ----------------------------------------------------- */

.message-page { max-width: 560px; margin: 64px auto 40px; padding: 0 16px; }
.message-card { background: var(--surface); border: 1px solid var(--line); padding: 48px 40px; text-align: center; }
.message-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	display: grid;
	place-items: center;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 26px;
}
.message-icon.is-warn { color: var(--danger); }
.message-title { font-size: 20px; font-weight: 650; line-height: 1.45; margin: 0 0 10px; letter-spacing: -.01em; }
.message-hint { font-size: 13px; color: var(--muted); margin: 0 0 26px; }
.message-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.message-actions .btn { min-width: 124px; }

/* Footer links / perf --------------------------------------------------- */

.modern-footer .footer-links { display: flex; justify-content: flex-end; gap: 6px; font-size: 12px; }
.modern-footer .footer-links a { color: var(--muted); text-decoration: none; }
.modern-footer .footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.modern-footer .footer-perf { margin-top: 4px; font-size: 11px; color: var(--faint); }

@media (max-width: 575.98px) {
	.message-page { margin-top: 36px; }
	.message-card { padding: 36px 22px; }
	.modern-footer .footer-links { justify-content: flex-start; }
}

/* Batch 2: auth forms, single-tab headers, post like, mobile search --- */

.auth-form .pw-code-row { display: flex; gap: 8px; align-items: stretch; }
.auth-form .form-error { margin: 0 0 16px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--danger); background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .3); }
.auth-form .pw-code-row .input-group { flex: 1 1 auto; min-width: 0; }
.auth-form #sendcode { height: 46px; flex: 0 0 auto; white-space: nowrap; font-size: 13px; padding: 0 14px; }
.auth-form .pw-hint { margin-top: 7px; }

.nav-search-toggle { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; cursor: pointer; }
.nav-search-toggle:hover, .nav-search-toggle:focus-visible { background: rgba(255, 255, 255, .12); }
.nav-search-toggle i { font-size: 18px; }

.bili-action-sm { height: 32px; padding: 0 10px; gap: 6px; font-size: 12.5px; }
.bili-action-sm .bili-icon { font-size: 15px; }
.post-actions .bili-action { border-color: var(--line); }

.card-header:has(.nav-tabs):not(:has(.card-header-dropdown)):has(.nav-item:only-child) { display: none; }
.card-header-tabs:has(.nav-item:only-child) { display: none; }
.card-header .card-header-dropdown { margin-left: auto; }

.forum-stats-panel .aside-stats { margin: 12px 0 0; }

@media (max-width: 575.98px) {
	.auth-form #sendcode { height: 44px; padding: 0 10px; font-size: 12px; }
}

/* batch 4: lightbox / pagination status / mobile breadcrumbs */
.lightbox{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;background:rgba(10,12,15,.93);padding:48px 64px}
.lightbox[hidden]{display:none}
.lightbox-img{max-width:min(92vw,1400px);max-height:88vh;object-fit:contain;background:#fff;box-shadow:0 16px 56px rgba(0,0,0,.55)}
.lightbox-close{position:absolute;top:16px;right:16px;width:40px;height:40px;border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;font-size:26px;line-height:1;cursor:pointer}
.lightbox-close:hover{background:rgba(255,255,255,.12)}
.lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:64px;border:1px solid rgba(255,255,255,.35);background:rgba(20,22,26,.55);color:#fff;font-size:34px;line-height:1;cursor:pointer}
.lightbox-prev{left:16px}
.lightbox-next{right:16px}
.lightbox-nav:hover{background:rgba(255,255,255,.16)}
.lightbox-count{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);color:#e8edf3;font-size:12.5px;letter-spacing:.04em}
body.lightbox-open{overflow:hidden}
.pagination .page-status .page-link{background:transparent;border-color:transparent;color:var(--muted);padding-left:0;padding-right:10px}
.threadlist .subject > a:hover{text-decoration:underline;text-underline-offset:3px}
@media (max-width:991.98px){.post-actions{gap:8px;flex-wrap:wrap}.post-actions .bili-action{height:34px;padding:0 10px;font-size:12.5px;gap:6px}}
@media (max-width:767.98px){.breadcrumb{font-size:12px;margin-bottom:10px}.breadcrumb-item.active{max-width:62vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* batch 5: lightbox gestures */
.lightbox-img{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}

/* Quick reply: the floating scroll controls are hidden by modern.css. */
/* lightbox affordance */
div.message img, .pm-text img { cursor: zoom-in; }
div.message [data-image-type], .pm-text [data-image-type] { cursor: zoom-in; }

/* ensure the batch-4 lightbox overlay is visible (older .lightbox rule sets opacity:0 until .is-open) */
.lightbox { opacity: 1; visibility: visible; }

/* --- Editor attachment tray ------------------------------------------------ */
.attach-panels { margin-top: 18px; }
.attach-panel { border: 1px solid var(--line); background: var(--surface); }
.attach-panel-head { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.attach-panel-title { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.attach-panel-title .icon { font-size: 14px; }
.attach-panel-count { margin-left: auto; min-width: 20px; padding: 0 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.attachlist { display: block; margin: 0; padding: 6px; list-style: none; }
.attach-item { display: flex; align-items: center; gap: 11px; padding: 8px 9px; transition: background-color .15s ease; }
.attach-item + .attach-item { border-top: 1px solid var(--line); }
.attach-item:hover { background: var(--surface-2); }
.attach-icon { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface-2); }
.attach-icon .icon { color: var(--muted); font-size: 16px; }
.attach-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 1px; min-width: 0; }
.attach-name { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.35; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.attach-name:hover { color: var(--primary); text-decoration: underline; }
.attach-meta { color: var(--muted); font-size: 11px; letter-spacing: .02em; line-height: 1.35; }
.attach-remove { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid transparent; color: var(--muted); text-decoration: none; }
.attach-remove .icon { font-size: 13px; }
.attach-remove:hover { border-color: var(--line); background: var(--surface); color: var(--danger); }
.attach-panels .progress { margin: 8px 0 0; height: 3px; }
@media (max-width: 575.98px) {
  .attach-item { gap: 9px; padding: 7px 6px; }
  .attach-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .attach-name { font-size: 12.5px; }
}
/* specificity over modern.css ".attachlist a" */
.attachlist .attach-name { color: var(--ink); }
.attachlist .attach-name:hover { color: var(--primary); }
.attachlist .attach-remove { color: var(--muted); }
.attachlist .attach-remove:hover { color: var(--danger); }

/* Thread sidebar author card */
.card-user-info { overflow: hidden; }
.card-user-info .user-info-head { padding: 22px 20px 18px; text-align: center; }
.card-user-info .user-info-avatar { display: inline-block; padding: 3px; border: 1px solid var(--line); background: var(--surface-2); line-height: 0; transition: border-color .16s ease; }
.card-user-info .user-info-avatar:hover { border-color: var(--line-strong); }
.card-user-info .avatar-5 { display: block; width: 76px; height: 76px; margin: 0; border-radius: 0; object-fit: cover; }
.card-user-info .user-info-name { margin: 14px 0 0; font-size: 16px; font-weight: 650; line-height: 1.3; }
.card-user-info .user-info-name a { color: var(--ink); text-decoration: none; }
.card-user-info .user-info-name a:hover { color: var(--primary); text-decoration: underline; }
.card-user-info .user-info-group { display: inline-block; margin-top: 7px; padding: 1px 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.card-user-info .user-info-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.card-user-info .user-info-stat { padding: 14px 6px 16px; text-align: center; transition: background-color .16s ease; }
.card-user-info .user-info-stat + .user-info-stat { border-left: 1px solid var(--line); }
.card-user-info .user-info-stat:hover { background: var(--surface-2); }
.card-user-info .user-info-stat-label { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; line-height: 1.4; }
.card-user-info .user-info-stat b { display: block; margin-top: 4px; color: var(--ink); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
@media (max-width: 991.98px) {
  .card-user-info .user-info-head { padding: 18px 16px 14px; }
  .card-user-info .avatar-5 { width: 68px; height: 68px; }
}

/* Thread poll */
.poll-card { margin-bottom: 16px; }
.poll-card .card-body { padding: 20px 22px 18px; }
.poll-head { margin-bottom: 14px; }
.poll-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.poll-title { margin: 6px 0 6px; font-size: 19px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.poll-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.poll-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poll-option { padding: 10px 12px 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s ease, background-color .15s ease; }
.poll-option:hover { border-color: var(--line-strong); }
.poll-option.is-picked { border-color: var(--ink); background: var(--surface-2); }
.poll-choice { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.poll-choice input { flex: none; margin: 0; }
.poll-option-label { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.poll-option-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.poll-bar { display: block; height: 4px; margin-top: 9px; background: var(--surface-2); overflow: hidden; }
.poll-bar-fill { display: block; height: 100%; background: var(--ink); opacity: .35; }
.poll-option.is-picked .poll-bar-fill { background: var(--primary); opacity: 1; }
.poll-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.poll-tip { color: var(--muted); font-size: 12px; }
.poll-editor { margin-top: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.poll-editor > summary { padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.poll-editor > summary::-webkit-details-marker { display: none; }
.poll-editor-body { padding: 4px 14px 14px; }
.poll-editor-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 8px; }
.poll-check, .poll-expire { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.poll-expire .form-select { width: auto; height: 36px; }
@media (max-width: 575.98px) {
  .poll-card .card-body { padding: 16px; }
  .poll-title { font-size: 17px; }
  .poll-choice { gap: 8px; }
}

/* 收藏按钮移入点赞/投币操作栏 */
.bili-actions .favorite-form { display: contents; margin: 0; }
.bili-action.post-favorite .bili-icon i { font-size: 18px; }
.bili-action.post-favorite.is-active { color: #0b76c5; border-color: rgba(11, 118, 197, .45); background: rgba(11, 118, 197, .1); }
.bili-action.post-favorite.is-active .bili-count { color: #0b76c5; }
html[data-theme="dark"] .bili-action.post-favorite.is-active { color: #5cc7f5; }
