:root {
	--bg: #040814;
	--panel: #0b1324;
	--panel-2: #111b31;
	--text: #eef3ff;
	--muted: #9aa8c7;
	--line: rgba(151, 169, 214, 0.18);
	--accent: #8d4fff;
	--accent-2: #f6b44b;
	--violet: #a855f7;
	--cyan: #3b82f6;
}

:root[data-theme="light"] {
	--bg: #f3f5fb;
	--panel: #ffffff;
	--panel-2: #eef2fb;
	--text: #172033;
	--muted: #5f6b82;
	--line: rgba(31, 42, 68, 0.16);
	--accent: #6651c6;
	--accent-2: #d98d12;
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body {
	margin: 0;
	background:
		radial-gradient(circle at 80% 0%, rgba(94, 54, 190, 0.36), transparent 34rem),
		radial-gradient(circle at 8% 12%, rgba(27, 76, 156, 0.28), transparent 26rem),
		var(--bg);
	color: var(--text);
	font-family: Tahoma, Arial, sans-serif;
	line-height: 1.8;
	overflow-x: hidden;
}

:root[data-theme="light"] body {
	background:
		radial-gradient(circle at 80% 0%, rgba(102, 81, 198, 0.16), transparent 34rem),
		radial-gradient(circle at 8% 12%, rgba(59, 130, 246, 0.12), transparent 26rem),
		var(--bg);
}

:root[data-theme="light"] .site-header,
:root[data-theme="light"] .site-footer {
	background: rgba(255, 255, 255, 0.86);
}

:root[data-theme="light"] .series-card,
:root[data-theme="light"] .series-hero,
:root[data-theme="light"] .reader,
:root[data-theme="light"] .chapter-content,
:root[data-theme="light"] .chapter-list,
:root[data-theme="light"] .description,
:root[data-theme="light"] .comment-list,
:root[data-theme="light"] .comment-write,
:root[data-theme="light"] .side-widget,
:root[data-theme="light"] .admin-panel,
:root[data-theme="light"] .preferences-panel,
:root[data-theme="light"] .account-panel,
:root[data-theme="light"] .static-page,
:root[data-theme="light"] .filter-panel {
	background: var(--panel);
	color: var(--text);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
	background: #ffffff;
	color: var(--text);
	border-color: var(--line);
}

a {
	color: inherit;
	text-decoration: none;
}

.site-header,
.site-footer {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px clamp(16px, 4vw, 48px);
	background: rgba(5, 10, 24, 0.74);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(16px);
}

.site-footer {
	border-top: 1px solid var(--line);
	border-bottom: 0;
	color: var(--muted);
	flex-wrap: wrap;
	justify-content: space-between;
	margin-top: 40px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
}

.footer-links a {
	color: var(--muted);
	font-size: 14px;
}

.footer-links a:hover {
	color: var(--text);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 22px;
	font-weight: 700;
	white-space: nowrap;
}

.brand img {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 0 18px rgba(141, 79, 255, 0.35);
}

.header-link {
	color: var(--muted);
	font-size: 14px;
	white-space: nowrap;
}

.site-menu {
	display: flex;
	align-items: center;
	gap: 16px;
}

.site-menu-group {
	position: relative;
	flex: 0 0 auto;
}

.site-menu-group > summary {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	list-style: none;
}

.site-menu-group > summary::-webkit-details-marker { display: none; }
.site-menu-group > summary::after { content: '⌄'; font-size: 16px; line-height: 1; }
.site-menu-group[open] > summary::after { transform: rotate(180deg); }
.site-menu-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-menu-submenu {
	position: absolute;
	z-index: 50;
	inset-inline-start: 0;
	top: calc(100% + 8px);
	min-width: 190px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.site-menu-submenu a {
	display: block;
	padding: 10px 12px;
	border-radius: 6px;
	color: var(--text);
	white-space: nowrap;
}

.site-menu-submenu a:hover,
.site-menu-submenu a:focus-visible { background: var(--panel-2); }

.menu-toggle,
.menu-backdrop {
	display: none;
}

.menu-toggle {
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: var(--text);
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
}

.theme-toggle {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 4px;
	min-width: 60px;
	min-height: 36px;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 4px;
	background: var(--panel);
	color: var(--text);
	cursor: pointer;
}

.theme-toggle span {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
}

:root:not([data-theme="light"]) .theme-toggle-moon,
:root[data-theme="light"] .theme-toggle-sun {
	background: var(--accent);
	color: #fff;
}

.search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	max-width: 760px;
	margin-inline-start: auto;
}

.search-form input,
.search-form button {
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--text);
	border-radius: 6px;
	padding: 10px 12px;
}

.search-form input {
	flex: 1;
}

.search-form button {
	background: #4d2db8;
	color: #fff;
	cursor: pointer;
}

.adult-filter-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(11, 19, 36, 0.9);
	color: var(--muted);
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
}

.adult-filter-toggle input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.adult-filter-toggle span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.adult-filter-toggle span::before {
	content: "";
	width: 34px;
	height: 18px;
	border-radius: 999px;
	background: rgba(151, 169, 214, 0.18);
	box-shadow: inset 0 0 0 1px var(--line);
	transition: background 0.2s ease;
}

.adult-filter-toggle span::after {
	content: "";
	position: absolute;
	inset-inline-start: 15px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--muted);
	transition: transform 0.2s ease, background 0.2s ease;
}

.adult-filter-toggle input:checked + span {
	color: var(--text);
}

.adult-filter-toggle input:checked + span::before {
	background: linear-gradient(135deg, var(--accent), var(--cyan));
}

.adult-filter-toggle input:checked + span::after {
	background: #fff;
	transform: translateX(-16px);
}

.adult-filter-toggle.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.account {
	color: var(--muted);
}

.account a {
	color: var(--text);
	font-weight: 700;
}

.badge {
	margin-inline-start: 8px;
	color: var(--accent-2);
}

.np-js-disabled-notice {
	padding: 10px 16px;
	border-bottom: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--text);
	text-align: center;
	direction: rtl;
	font-size: 14px;
}

.page {
	width: min(1180px, calc(100% - 24px));
	margin: 18px auto 30px;
}

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 10px 12px;
	background: rgba(11, 19, 36, 0.72);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--muted);
	font-size: 13px;
}

.breadcrumb a {
	color: var(--accent-2);
}

.breadcrumb strong {
	color: var(--text);
	font-weight: 600;
}

.section-head {
	margin-bottom: 20px;
}

.section-head h1,
.series-hero h1,
.reader h1 {
	margin: 0 0 8px;
}

.muted,
.section-head p {
	color: var(--muted);
}

.static-page {
	max-width: 900px;
	margin-inline: auto;
}

.static-content {
	display: grid;
	gap: 14px;
}

.static-section {
	padding: 18px;
	background: rgba(11, 19, 36, 0.82);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.static-section h2 {
	margin: 0 0 10px;
	font-size: 22px;
}

.static-section p {
	margin: 0 0 10px;
	color: #d9e4ff;
}

.static-section p:last-child {
	margin-bottom: 0;
}

.ad-slot {
	border: 1px dashed var(--accent-2);
	color: var(--accent-2);
	background: rgba(246, 180, 75, 0.08);
	padding: 18px;
	border-radius: 8px;
	text-align: center;
	margin: 18px 0;
}

.web-ad-slot {
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: visible;
	width: 100%;
	min-height: 92px;
	margin: 12px 0;
	padding: 0;
	text-align: center;
}

.web-ad-slot > * {
	max-width: 100%;
}

.web-ad-slot .ad-placeholder {
	min-height: 0 !important;
	margin: 0 auto !important;
}

.web-ad-slot iframe,
.web-ad-slot img,
.web-ad-slot ins {
	max-width: 100%;
}

.web-ad-slot iframe {
	display: block;
}

.ad-placeholder img,
.web-ad-slot img {
	height: auto;
	object-fit: contain;
}

.web-ad-slot br {
	display: none;
}

.np-adblock-bait {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	pointer-events: none;
	overflow: hidden;
}

.has-adblock-modal {
	overflow: hidden;
}

.adblock-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 18px;
}

.adblock-modal[hidden] {
	display: none !important;
}

.adblock-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 8, 20, 0.82);
	backdrop-filter: blur(8px);
}

.adblock-modal-dialog {
	position: relative;
	width: min(460px, 100%);
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
	padding: 24px;
	text-align: center;
}

.adblock-modal-dialog h2 {
	margin: 0 0 12px;
	font-size: 24px;
	line-height: 1.4;
	color: var(--text);
}

.adblock-modal-dialog p {
	margin: 0;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.9;
}

.adblock-modal-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.adblock-modal-actions button {
	border: 0;
	border-radius: 6px;
	background: var(--accent);
	color: #fff;
	padding: 10px 18px;
	font-family: inherit;
	font-weight: 800;
	cursor: pointer;
}

.adblock-modal-actions .ghost-button {
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--text);
}

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

.content-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 18px;
	align-items: start;
}

.content-main {
	min-width: 0;
}

.battle-ranking-page {
	max-width: 960px;
	margin-inline: auto;
}

.battle-ranking-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	border: 1px solid rgba(255, 190, 48, 0.7);
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(80, 22, 7, 0.9), rgba(17, 19, 27, 0.96) 62%);
	box-shadow: 0 0 24px rgba(255, 121, 24, 0.18);
}

.battle-ranking-emblem {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	border: 1px solid #ffd264;
	border-radius: 50%;
	color: #ffd264;
	font-size: 30px;
	background: #29150b;
}

.ranking-rewards {
	margin: 16px 0 20px;
	padding: 18px;
	border: 2px solid #ffdb64;
	border-radius: 8px;
	background: #142337;
	color: #fff;
	box-shadow: 0 0 18px rgba(255, 211, 77, 0.4);
}

.ranking-rewards h2 { margin: 0 0 4px; color: #ffdb64; font-size: 1.2rem; }
.ranking-rewards p { margin: 0 0 12px; color: #dce9f7; }
.ranking-rewards ol { margin: 0; padding: 0; list-style: none; }
.ranking-rewards li { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 6px 0; border-top: 1px solid rgba(255, 219, 100, 0.3); }
.ranking-rewards li strong { color: #ffdb64; min-width: 80px; }

.ranking-period-tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 18px;
	border-bottom: 1px solid var(--line);
}

.ranking-period-tabs a {
	flex: 1;
	padding: 10px 16px;
	color: var(--muted);
	text-align: center;
	font-weight: 700;
	border-bottom: 3px solid transparent;
}

.ranking-period-tabs a:hover,
.ranking-period-tabs a.is-active {
	color: var(--text);
	border-bottom-color: #d9a82f;
}

.battle-rank-row.commenter-rank-row { grid-template-columns: 46px 54px minmax(0, 1fr) 82px; }

.battle-ranking-list {
	display: grid;
	gap: 10px;
}

.battle-attribute-guide {
	margin-block: 28px;
}

.battle-attribute-guide h2 {
	margin: 0 0 12px;
	font-size: 1.2rem;
}

.battle-attribute-guide dl {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
	gap: 0 20px;
	margin: 0;
}

.battle-attribute-guide dl > div {
	padding: 10px 0;
	border-top: 1px solid var(--line);
}

.battle-attribute-guide dt {
	font-weight: 700;
}

.battle-attribute-guide dd {
	margin: 4px 0 0;
	color: var(--muted);
	line-height: 1.6;
}

.battle-rank-row {
	display: grid;
	grid-template-columns: 46px 54px minmax(150px, 1fr) repeat(4, minmax(58px, 82px));
	align-items: center;
	gap: 10px;
	min-height: 74px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: var(--text);
}

.battle-rank-row:hover {
	border-color: #dca934;
	transform: translateY(-1px);
}

.battle-rank-1 { border-color: #ffd264; box-shadow: inset 4px 0 #ffd264; }
.battle-rank-2 { border-color: #bfc8d6; box-shadow: inset 4px 0 #bfc8d6; }
.battle-rank-3 { border-color: #bd7440; box-shadow: inset 4px 0 #bd7440; }

.battle-rank-position {
	color: #ffd264;
	font-size: 20px;
	text-align: center;
}

.battle-rank-avatar {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--panel-2);
	font-weight: 800;
}

.battle-rank-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.battle-rank-member,
.battle-rank-stat {
	display: grid;
	gap: 2px;
}

.battle-rank-member { min-width: 0; }
.battle-rank-member strong,
.battle-rank-member small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.battle-rank-member small,
.battle-rank-stat small {
	color: var(--muted);
}

.battle-rank-stat {
	text-align: center;
}

@media (max-width: 680px) {
	.battle-rank-row.commenter-rank-row { grid-template-columns: 34px 46px minmax(0, 1fr) 52px; }
	.battle-rank-row {
		grid-template-columns: 34px 46px minmax(0, 1fr) repeat(2, 52px);
		padding-inline: 8px;
	}

	.battle-rank-stat:nth-last-child(2),
	.battle-rank-stat:nth-last-child(3) {
		display: none;
	}

	.battle-rank-avatar {
		width: 42px;
		height: 42px;
	}
}

.sidebar-widgets {
	display: grid;
	gap: 14px;
}

.side-widget {
	overflow: hidden;
	background: #202020;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 4px;
}

.side-widget h2 {
	margin: 0;
	padding: 9px 12px;
	background: #1d1d1d;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 16px;
	text-align: right;
}

.side-ad-box {
	display: grid;
	place-items: center;
	min-height: 132px;
	margin: 10px;
	border: 1px dashed rgba(246, 180, 75, 0.38);
	color: var(--accent-2);
	background: rgba(246, 180, 75, 0.08);
}

.side-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: 10px;
	background: #292929;
}

.side-tabs button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	border: 0;
	border-radius: 4px;
	background: #333;
	color: #d8e3ff;
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
}

.side-tabs .is-active {
	background: #2178c4;
	color: #fff;
}

.side-popular-list,
.side-history {
	display: grid;
}

.side-popular-item {
	padding: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-popular-main {
	display: grid;
	grid-template-columns: 28px 54px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	color: #fff;
}

.side-popular-cover {
	position: relative;
	display: block;
	width: 54px;
}

.side-popular-item:first-child {
	border-top: 0;
}

.side-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1px solid rgba(151, 169, 214, 0.45);
	border-radius: 4px;
	color: #d8e3ff;
	font-size: 13px;
}

.side-popular-item img {
	width: 54px;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 3px;
	background: var(--panel-2);
}

.side-popular-copy {
	display: grid;
	gap: 2px;
	min-width: 0;
	text-align: right;
}

.side-popular-title {
	display: block;
	overflow: hidden;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.side-popular-title:hover {
	color: #d9d1ff;
}

.side-popular-copy small {
	overflow: hidden;
	color: #c7d2ef;
	font-size: 12px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.side-popular-copy em {
	color: #ffc247;
	font-size: 12px;
	font-style: normal;
}

.side-chapter-wrap {
	display: flex;
	justify-content: flex-start;
	margin-top: 3px;
}

.side-chapter-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 22px;
	padding: 3px 8px;
	border-radius: 3px;
	background: #4d2db8;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.side-chapter-link:hover {
	background: #3f229d;
	color: #fff;
}

.side-chapter-link .card-meta-icon {
	width: 12px;
	height: 12px;
	color: #fff;
}

.side-history {
	padding: 8px 12px 12px;
}

.side-history a {
	overflow: hidden;
	padding: 8px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 13px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.side-history a:first-child {
	border-top: 0;
}

.series-card,
.description,
.chapter-list,
.comments-box,
.comment-write,
.reader {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.series-card-main {
	position: relative;
	display: block;
	padding: 12px;
}

.series-card img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 6px;
	background: var(--panel-2);
}

.series-status-badge {
	position: absolute;
	z-index: 3;
	inset-block-start: 8px;
	inset-inline-start: 8px;
	max-width: calc(100% - 16px);
	padding: 4px 8px;
	border-radius: 3px;
	background: rgba(96, 108, 132, 0.94);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.series-status-badge.is-completed {
	background: #dc2626;
	color: #fff;
}

.series-status-badge.is-ongoing {
	background: #16a34a;
	color: #fff;
}

.series-status-badge.is-hiatus {
	background: #facc15;
	color: #1f2937;
}

.side-popular-cover .series-status-badge {
	inset-block-start: 4px;
	inset-inline-start: 4px;
	max-width: calc(100% - 8px);
	padding: 2px 5px;
	font-size: 9px;
}

.series-card h2 {
	overflow: hidden;
	min-height: 22px;
	max-height: 22px;
	font-size: 16px;
	line-height: 1.35;
	margin: 10px 0 4px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.series-card p {
	margin: 4px 0;
	color: var(--muted);
	font-size: 13px;
}

.card-rating {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 2px 0 5px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

.card-rating > span {
	color: var(--text);
}

.card-rating i {
	position: relative;
	display: inline-block;
	width: 72px;
	color: rgba(255, 194, 71, 0.28);
	font-style: normal;
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
}

.card-rating b {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	color: #ffc247;
	font-weight: inherit;
	overflow: hidden;
	white-space: nowrap;
}

.card-meta {
	display: grid;
	gap: 5px;
	min-width: 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.35;
	text-align: right;
}

.card-meta-row {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.card-meta-row span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-meta-language span,
.card-meta-genres span {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.card-meta-language a,
.card-meta-genres a {
	overflow: hidden;
	color: inherit;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-meta-language a:hover,
.card-meta-genres a:hover,
.release-genres a:hover {
	color: #d9d1ff;
}

.release-genres a {
	color: inherit;
}

.meta-separator {
	flex: 0 0 auto;
	color: currentColor;
}

.card-meta-icon {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	color: #8ea4ff;
}

.card-meta-chapter {
	width: max-content;
	max-width: 100%;
	padding: 3px 7px;
	border-radius: 3px;
	background: #4d2db8;
	color: #fff;
	font-weight: 800;
}

.card-meta-chapter .card-meta-icon {
	color: #fff;
}

.card-meta-chapter:hover {
	background: #3f229d;
	color: #fff;
}

.series-card > .card-meta {
	padding: 0 12px 12px;
}

.series-daily-views {
	display: inline-flex;
	width: max-content;
	max-width: calc(100% - 24px);
	margin: 0 12px 12px;
	padding: 3px 7px;
	border-radius: 3px;
	background: rgba(246, 180, 75, 0.14);
	color: #ffc247;
	font-size: 12px;
	font-weight: 800;
}

.series-chapter-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	margin: 0 12px 12px;
	padding: 4px 9px;
	border-radius: 3px;
	background: #4d2db8;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.series-chapter-badge:hover {
	background: #3f229d;
	color: #fff;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0;
}

.tag-list.small {
	padding: 0 12px 12px;
}

.tag-link {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--accent-2);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 13px;
}

.favorite-button,
.favorite-card button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(246, 180, 75, 0.32);
	background: rgba(246, 180, 75, 0.12);
	color: var(--accent-2);
	border-radius: 6px;
	padding: 9px 14px;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.favorite-button.is-active {
	border-color: rgba(168, 85, 247, 0.45);
	background: rgba(168, 85, 247, 0.18);
	color: #d9c7ff;
}

.favorite-card button {
	margin: 0 12px 12px;
	width: calc(100% - 24px);
}

.pager,
.reader-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 24px 0;
}

.pager a,
.reader-nav a,
.reader-nav button,
.reader-nav select,
.reader-nav-disabled {
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 8px 14px;
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}

.reader-nav-disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(154, 168, 199, 0.48);
	cursor: not-allowed;
}

.reader-settings-button {
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 8px 14px;
	font-family: inherit;
	cursor: pointer;
}

.reader-chapter-select {
	min-width: 180px;
	max-width: min(100%, 320px);
	text-align: center;
	text-align-last: center;
}

.series-hero {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 22px;
	align-items: start;
	margin-bottom: 20px;
}

.series-hero > div:last-child {
	display: grid;
	gap: 10px;
	align-content: start;
	min-width: 0;
}

.series-cover-side {
	display: grid;
	gap: 12px;
	min-width: 0;
}

.series-cover-showcase {
	width: 100%;
}

.series-cover-poster {
	width: 100%;
	border-radius: 8px;
}

.series-cover-backdrop {
	display: none;
}

.series-cover-side .favorite-button {
	width: 100%;
	justify-content: center;
}

.series-info-list {
	display: grid;
	gap: 7px;
	margin: 0;
	padding: 12px;
	border: 1px solid rgba(141, 79, 255, 0.22);
	border-radius: 8px;
	background: rgba(141, 79, 255, 0.06);
}

.series-info-list div {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 8px;
	align-items: start;
}

.series-info-list dt,
.series-info-list dd {
	margin: 0;
	min-width: 0;
	font-size: 12px;
	line-height: 1.45;
}

.series-info-list dt {
	color: var(--muted);
}

.series-info-list dd {
	color: var(--text);
	font-weight: 800;
	overflow-wrap: anywhere;
	white-space: normal;
}

.series-info-list a {
	color: var(--accent-2);
}

.series-user-rating {
	display: grid;
	gap: 12px;
	width: 100%;
	max-width: none;
	margin: 8px 0 0;
	padding: 14px;
	border: 1px solid rgba(141, 79, 255, 0.28);
	border-radius: 8px;
	background: rgba(141, 79, 255, 0.08);
}

.series-rating-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.series-rating-head > span {
	color: #ffc247;
	font-size: 18px;
}

.series-user-rating h2,
.series-user-rating p {
	margin: 0;
}

.series-user-rating h2 {
	font-size: 16px;
}

.series-user-rating p {
	color: var(--muted);
	font-size: 13px;
}

.series-rating-layout {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

.series-rating-summary {
	display: grid;
	gap: 5px;
	text-align: center;
}

.series-rating-summary strong {
	color: #eef3ff;
	font-size: 46px;
	font-weight: 900;
	line-height: 1;
}

.series-rating-display-stars {
	color: #ffc247;
	font-size: 18px;
	letter-spacing: 0;
	white-space: nowrap;
}

.series-rating-breakdown {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.series-rating-row {
	display: grid;
	grid-template-columns: 32px minmax(72px, 1fr) 42px;
	gap: 7px;
	align-items: center;
	color: var(--muted);
	font-size: 12px;
}

.series-rating-row span {
	color: #dce6ff;
	white-space: nowrap;
}

.series-rating-row i {
	height: 7px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(154, 168, 199, 0.16);
}

.series-rating-row b {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: #f4a51c;
}

.series-rating-row em {
	overflow: hidden;
	font-style: normal;
	text-align: end;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.series-rating-action {
	display: grid;
	gap: 6px;
	justify-items: start;
}

.series-rating-stars {
	display: inline-flex;
	justify-content: flex-end;
	gap: 3px;
	width: max-content;
	max-width: 100%;
}

.series-rating-stars button {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(154, 168, 199, 0.45);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: color 0.16s ease, transform 0.16s ease;
}

.series-rating-stars button.is-preview,
.series-rating-stars button.is-active {
	color: #ffc247;
}

.series-rating-stars button:hover {
	transform: translateY(-1px);
}

.series-rating-stars button:disabled {
	cursor: default;
}

.series-rating-stars button:disabled:hover {
	transform: none;
}

.description,
.chapter-list,
.reader {
	padding: 18px;
	margin-top: 18px;
}

.last-read-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 18px 0 0;
	padding: 14px 16px;
	background: rgba(141, 79, 255, 0.12);
	border: 1px solid rgba(141, 79, 255, 0.34);
	border-radius: 8px;
}

.last-read-card span,
.last-read-card time {
	color: var(--muted);
	font-size: 13px;
}

.last-read-card a {
	color: var(--accent-2);
	font-weight: 700;
}

.chapter-jump-form {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 10px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line);
}

.chapter-jump-form label {
	display: grid;
	gap: 6px;
	min-width: min(100%, 220px);
}

.chapter-jump-form label span {
	color: var(--muted);
	font-size: 13px;
}

.chapter-jump-form input {
	min-height: 40px;
	border: 1px solid var(--line);
	background: #071023;
	color: var(--text);
	border-radius: 6px;
	padding: 9px 12px;
	font-family: inherit;
}

.chapter-jump-form button {
	min-height: 40px;
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 9px 16px;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.chapter-jump-status {
	margin: 0;
	color: var(--accent-2);
	font-size: 13px;
}

.chapter-list-scroll {
	max-height: 560px;
	overflow-y: auto;
	padding-inline-end: 6px;
	scrollbar-width: thin;
}

.description p {
	margin: 0 0 12px;
	white-space: pre-line;
}

.description p:last-child {
	margin-bottom: 0;
}

.description-toggle {
	margin-top: 12px;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--accent-2);
	border-radius: 6px;
	padding: 8px 14px;
	cursor: pointer;
}

.chapter-row {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 0;
	border-top: 1px solid var(--line);
}

.chapter-row.is-read {
	background: rgba(102, 81, 198, 0.16);
	color: #d9d1ff;
}

.chapter-row.is-read span::before {
	content: "✓";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-inline-end: 8px;
	border-radius: 50%;
	background: rgba(102, 81, 198, 0.95);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.chapter-list-scroll .chapter-row:first-child {
	border-top: 0;
}

.chapter-row time {
	color: var(--muted);
	font-size: 13px;
	white-space: nowrap;
}

.reader {
	width: 100%;
	max-width: none;
	margin-inline: auto;
}

.chapter-content {
	font-size: 20px;
	padding: 18px;
	border-radius: 8px;
}

.chapter-content p {
	margin: 0 0 var(--paragraph-spacing, 18px);
}

.reader-settings {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin: 16px 0;
	padding: 14px;
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.reader-settings[hidden] {
	display: none;
}

.reader-settings label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 13px;
}

.reader-settings .reader-check {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #070e1f;
}

.inline-check {
	display: inline-flex !important;
	grid-template-columns: none !important;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	width: fit-content;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #070e1f;
}

.inline-check input {
	width: auto !important;
	min-height: 0 !important;
	accent-color: var(--accent);
}

.reader-settings span {
	color: var(--text);
	font-weight: 700;
}

.reader-settings input,
.reader-settings select,
.reader-settings button {
	width: 100%;
	min-height: 36px;
	border: 1px solid var(--line);
	background: #070e1f;
	color: var(--text);
	border-radius: 6px;
	padding: 6px 9px;
	font-family: inherit;
}

.reader-settings input[type="checkbox"] {
	width: auto;
	min-height: 0;
	accent-color: var(--accent);
}

.reader-settings button {
	align-self: end;
	background: rgba(246, 180, 75, 0.12);
	color: var(--accent-2);
	cursor: pointer;
}

.reader-bottom-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 14px;
	margin-top: 24px;
}

.reader-bottom-nav a,
.reader-bottom-nav button,
.reader-bottom-nav select,
.reader-bottom-nav .reader-nav-disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 120px;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--text);
	border-radius: 6px;
	padding: 10px 16px;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}

.reader-bottom-nav .next-link {
	justify-self: start;
}

.reader-bottom-nav .previous-link {
	justify-self: end;
}

.reader-bottom-nav .chapter-list-link {
	justify-self: center;
}

.content-report {
	margin: 16px 0;
	color: var(--muted);
	font-size: 14px;
}

.content-report summary {
	width: fit-content;
	cursor: pointer;
	color: var(--muted);
}

.content-report form {
	display: grid;
	gap: 10px;
	max-width: 520px;
	margin-top: 12px;
}

.content-report textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
}

.content-report button {
	justify-self: start;
}

.content-report-status {
	margin: 0 0 10px;
}

.comments-box,
.comment-write {
	margin-top: 18px;
	padding: 18px;
	overflow: hidden;
}

.comments-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.comments-head h2,
.comment-write h2 {
	margin: 0;
	font-size: 22px;
}

.comments-head span {
	color: var(--muted);
	font-size: 14px;
}

.comments-list {
	display: grid;
	gap: 12px;
	min-width: 0;
}

.comment-item {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: rgba(17, 27, 49, 0.62);
	overflow: hidden;
}

.comment-children {
	display: grid;
	gap: 12px;
	margin-top: 12px;
	padding-inline-start: 18px;
	border-inline-start: 1px solid rgba(148, 163, 184, 0.18);
	min-width: 0;
	max-width: 100%;
}

.comment-children .comment-item {
	background: rgba(5, 10, 24, 0.42);
}

.comment-item header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	min-width: 0;
}

.comment-item time {
	color: var(--muted);
	font-size: 13px;
}

.comment-author-line {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
}

.comment-author-line strong {
	overflow-wrap: anywhere;
}

.comment-level-badge,
.comment-exp-badge,
.membership-level {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(246, 180, 75, 0.42);
	background: rgba(246, 180, 75, 0.12);
	color: var(--accent-2);
	border-radius: 999px;
	padding: 2px 9px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
}

.comment-exp-badge {
	border-color: var(--rank-color, rgba(74, 144, 245, 0.42));
	background: var(--rank-color, rgba(74, 144, 245, 0.13));
	color: #0a0a0a;
}

.comment-item p {
	margin: 0 0 10px;
	color: #dce7ff;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.comment-form {
	display: grid;
	gap: 10px;
	min-width: 0;
	max-width: 100%;
}

.comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--line);
	background: #070e1f;
	color: var(--text);
	border-radius: 6px;
	padding: 10px 12px;
	font-family: inherit;
	line-height: 1.8;
	resize: vertical;
}

.comment-form button,
.comment-reply-button {
	justify-self: start;
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 9px 14px;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.comment-reply-button {
	background: rgba(141, 79, 255, 0.16);
	border: 1px solid rgba(141, 79, 255, 0.38);
	color: #d9c7ff;
}

.comment-reply-form {
	margin-top: 10px;
}

@media (max-width: 640px) {
	.comments-box,
	.comment-write {
		padding: 14px 12px;
	}

	.comment-item {
		padding: 13px 12px;
	}

	.comment-children {
		padding-inline-start: 0;
		border-inline-start: 0;
	}

	.comment-item header {
		align-items: flex-start;
	}
}

.series-filter-panel {
	margin: 0 0 22px;
	background: #242424;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.filter-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 42px;
	padding: 0 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-title h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}

.filter-toolbar {
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, minmax(128px, 1fr)) 118px;
	gap: 8px;
	align-items: start;
	padding: 12px 14px;
	direction: rtl;
}

.filter-search {
	grid-column: 1 / -1;
}

.filter-search input {
	width: 100%;
	min-height: 36px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: #2f2f2f;
	color: #fff;
	border-radius: 2px;
	padding: 7px 10px;
}

.filter-menu {
	position: relative;
	min-width: 0;
}

.filter-menu summary {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 10px;
	background: #303030;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 2px;
	font-size: 13px;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.filter-menu summary::-webkit-details-marker {
	display: none;
}

.filter-menu summary::before {
	content: "⌄";
	margin-inline-end: 8px;
	color: #d7d7d7;
	font-size: 12px;
}

.filter-menu[open] summary {
	background: #383838;
}

.filter-menu-body {
	position: absolute;
	z-index: 40;
	inset-inline: 0;
	top: calc(100% + 2px);
	min-width: 640px;
	padding: 14px 18px;
	background: #333;
	border: 1px solid rgba(255, 255, 255, 0.07);
	box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.filter-menu:nth-of-type(1) .filter-menu-body {
	inset-inline-start: auto;
	inset-inline-end: 0;
}

.filter-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(110px, 1fr));
	gap: 10px 28px;
}

.filter-grid.compact {
	grid-template-columns: repeat(3, minmax(120px, 1fr));
	min-width: 440px;
}

.filter-grid label {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	color: #f3f4f6;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}

.filter-grid input {
	accent-color: #1e88e5;
}

.filter-submit {
	min-height: 34px;
	border: 0;
	background: #1e7cc2;
	color: #fff;
	border-radius: 2px;
	font-weight: 700;
	cursor: pointer;
}

.filter-submit::after {
	content: " 🔍";
	font-size: 12px;
}

.list-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.empty-state {
	padding: 18px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--muted);
}

.filter-values-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	align-items: start;
}

.filter-values-card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 16px;
	overflow: auto;
}

.filter-values-card h2 {
	margin: 0 0 12px;
}

.values-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.values-table th,
.values-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--line);
	text-align: right;
	vertical-align: top;
}

.values-table th {
	color: var(--accent-2);
	font-weight: 700;
}

.notice {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--panel);
}

.notice p {
	margin: 0;
}

.notice.error {
	border-color: rgba(248, 113, 113, 0.45);
	color: #fecaca;
	background: rgba(127, 29, 29, 0.2);
}

.notice.success {
	border-color: rgba(74, 222, 128, 0.45);
	color: #bbf7d0;
	background: rgba(20, 83, 45, 0.2);
}

.admin-panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 18px;
}

.admin-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.admin-dashboard-card {
	display: grid;
	gap: 8px;
	min-height: 132px;
	padding: 18px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.admin-dashboard-card:hover {
	transform: translateY(-2px);
	border-color: rgba(141, 79, 255, 0.55);
}

.admin-dashboard-card strong {
	font-size: 18px;
}

.admin-dashboard-card span {
	color: var(--muted);
	font-size: 14px;
}

.admin-results,
.admin-levels {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.admin-results a,
.admin-levels span {
	border: 1px solid var(--line);
	background: #071023;
	color: var(--text);
	border-radius: 6px;
	padding: 7px 10px;
	font-size: 13px;
}

.admin-table-wrap {
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.admin-table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
}

.admin-table th,
.admin-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	text-align: start;
	vertical-align: top;
}

.admin-table th {
	background: rgba(17, 27, 49, 0.86);
	color: var(--text);
}

.admin-table td {
	color: var(--muted);
}

.inline-admin-form {
	display: grid;
	grid-template-columns: minmax(120px, 1fr) 150px auto;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}

.inline-admin-form:last-child {
	margin-bottom: 0;
}

.inline-admin-form input,
.inline-admin-form select {
	border: 1px solid var(--line);
	background: #070e1f;
	color: var(--text);
	border-radius: 6px;
	padding: 8px 10px;
	font-family: inherit;
}

.danger-inline {
	grid-template-columns: minmax(120px, 1fr) auto;
}

.danger-panel {
	border-color: rgba(255, 92, 122, 0.42);
}

.danger-button {
	border: 0;
	background: #e24566;
	color: #fff;
}

.admin-search,
.chapter-form {
	display: grid;
	gap: 14px;
}

.admin-search {
	grid-template-columns: minmax(0, 1fr) 120px;
	align-items: end;
	margin-bottom: 18px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line);
}

.chapter-form {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-form .full {
	grid-column: 1 / -1;
}

.chapter-form .field {
	display: grid;
	gap: 8px;
	color: var(--muted);
}

.chapter-form .field-title {
	color: var(--text);
	font-weight: 700;
}

.admin-search label,
.chapter-form label {
	display: grid;
	gap: 6px;
	color: var(--muted);
}

.admin-search span,
.chapter-form span {
	color: var(--text);
	font-weight: 700;
}

.admin-search input,
.chapter-form input,
.chapter-form select,
.chapter-form textarea {
	width: 100%;
	border: 1px solid var(--line);
	background: #070e1f;
	color: var(--text);
	border-radius: 6px;
	padding: 10px 12px;
	font-family: inherit;
}

.chapter-form textarea {
	min-height: 360px;
	resize: vertical;
	line-height: 1.9;
}

.select2-lite {
	display: grid;
	gap: 6px;
}

.select2-lite-search {
	width: 100%;
	border: 1px solid var(--line);
	background: #050b18;
	color: var(--text);
	border-radius: 6px;
	padding: 10px 12px;
	font-family: inherit;
}

.select2-lite select {
	min-height: 120px;
}

.choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
	max-height: 300px;
	overflow: auto;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #070e1f;
}

.choice-grid label {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	min-height: 34px;
	padding: 6px 8px;
	border: 1px solid rgba(151, 169, 214, 0.12);
	border-radius: 6px;
	color: var(--text);
	background: rgba(17, 27, 49, 0.6);
	cursor: pointer;
}

.choice-grid input {
	flex: 0 0 auto;
	width: auto !important;
	min-height: 0 !important;
	accent-color: var(--accent);
}

.choice-grid span {
	font-weight: 400;
}

.preferences-page {
	max-width: 980px;
	margin-inline: auto;
}

.preferences-panel {
	padding: 18px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.preferences-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.preferences-actions button,
.ghost-button {
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 10px 16px;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

.preferences-actions .ghost-button {
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--muted);
}

.preference-field {
	display: grid;
	gap: 8px;
	margin-bottom: 14px;
}

.preference-gender {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.preference-gender label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #070e1f;
	color: var(--text);
	cursor: pointer;
}

.preference-gender input {
	accent-color: var(--accent);
}

.preference-grid {
	max-height: 420px;
	grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
}

.preference-status {
	margin: 12px 0 0;
	color: var(--accent-2);
}

.has-preference-onboarding {
	overflow: hidden;
}

.preference-onboarding {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: grid;
	place-items: center;
	padding: 18px;
}

.preference-onboarding[hidden] {
	display: none;
}

.preference-onboarding-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 17, 0.76);
	backdrop-filter: blur(4px);
}

.preference-onboarding-dialog {
	position: relative;
	width: min(640px, 100%);
	max-height: min(680px, calc(100vh - 36px));
	overflow: hidden;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.preference-onboarding-track {
	display: flex;
	width: 200%;
	direction: ltr;
	transition: transform 0.28s ease;
}

.preference-onboarding-slide {
	width: 50%;
	max-height: min(680px, calc(100vh - 36px));
	overflow-y: auto;
	padding: 22px;
	direction: rtl;
}

.preference-onboarding-slide header {
	display: grid;
	gap: 8px;
	margin-bottom: 18px;
}

.preference-onboarding-slide h2 {
	margin: 0;
	font-size: 24px;
}

.preference-onboarding-slide p {
	margin: 0;
	color: var(--muted);
}

.preference-onboarding-gender {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.preference-onboarding-gender button {
	min-height: 68px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel-2);
	color: var(--text);
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
}

.preference-onboarding-gender button.is-selected {
	border-color: #8ea4ff;
	background: rgba(102, 81, 198, 0.28);
	color: #fff;
}

.preference-onboarding-grid {
	max-height: 340px;
	overflow-y: auto;
	grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
	padding-inline-end: 4px;
}

.preference-onboarding-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 18px;
}

.preference-onboarding-actions button {
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 10px 16px;
	font-family: inherit;
	font-weight: 800;
	cursor: pointer;
}

.preference-onboarding-actions .ghost-button {
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--muted);
}

.admin-multi-results,
.admin-selected-series {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.admin-multi-results-head {
	display: flex;
	flex: 1 1 100%;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--muted);
	font-size: 13px;
}

.admin-multi-results button,
.admin-selected-series button {
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-2);
	color: var(--text);
	padding: 7px 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.admin-selected-series button {
	background: rgba(102, 81, 198, 0.26);
	color: #fff;
}

@media (max-width: 560px) {
	.preference-onboarding {
		padding: 10px;
	}

	.preference-onboarding-slide {
		padding: 16px;
	}

	.preference-onboarding-gender {
		grid-template-columns: 1fr;
	}

	.preference-onboarding-grid {
		grid-template-columns: 1fr;
		max-height: 310px;
	}

	.preference-onboarding-actions {
		justify-content: stretch;
	}

	.preference-onboarding-actions button {
		flex: 1 1 120px;
	}

	.chapter-list-scroll {
		max-height: 430px;
	}
}

.account-page {
	display: grid;
	gap: 18px;
	max-width: 860px;
	margin-inline: auto;
}

.member-profile-page {
	display: grid;
	gap: 18px;
	max-width: 860px;
	margin-inline: auto;
}

.member-profile-hero {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	padding: 20px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.member-profile-avatar {
	position: relative;
	display: grid;
	place-items: center;
	width: 104px;
	height: 104px;
	/* Keep the presence dot visible outside the avatar edge. */
	border: 2px solid var(--accent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--panel) 78%, var(--accent) 22%);
	color: #fff;
	font-size: 2.4rem;
	font-weight: 900;
}

.member-profile-avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.member-profile-avatar .member-profile-presence {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 16px;
	height: 16px;
	border: 3px solid var(--panel);
	border-radius: 50%;
	background: #c94343;
}

.member-profile-avatar .member-profile-presence.is-online {
	background: #27a75d;
}

.member-profile-summary h1 {
	margin: 0 0 6px;
	font-size: clamp(1.45rem, 4vw, 2rem);
}

.member-profile-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.member-profile-meta span {
	padding: 5px 9px;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: color-mix(in srgb, var(--panel) 86%, var(--accent) 14%);
}

.member-attribute-benefits {
	margin: 0 0 14px;
	color: var(--muted);
}

.web-store-page,
.web-battle-page { max-width: 1040px; margin-inline: auto; }
.web-store-balances,
.web-battle-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	padding: 14px 18px;
	border-block: 1px solid var(--line);
	background: var(--panel);
}
.web-store-balances > div,
.web-battle-summary > div { display: grid; min-width: 135px; }
.web-store-balances span,
.web-battle-summary span { color: var(--muted); font-size: .8rem; }
.web-store-balances strong,
.web-battle-summary strong { font-size: 1.4rem; line-height: 1.3; }
.web-store-balances a { color: #52c9b3; font-weight: 700; }
.web-store-announcement,
.battle-notice { padding: 12px 16px; border-inline-start: 3px solid #e2ad43; background: var(--panel); }
.web-store-tabs { display: flex; gap: 8px; overflow-x: auto; padding-block: 18px 4px; }
.web-store-tabs a { white-space: nowrap; padding: 7px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.web-store-tabs a:hover,
.web-store-tabs a:focus-visible { border-color: #52c9b3; }
.web-store-section { padding-block: 14px 24px; scroll-margin-top: 20px; }
.web-store-section h2,
.battle-recent h2,
.web-battle-log h2 { margin: 0 0 14px; font-size: 1.2rem; }
.web-store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.web-store-product {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
}
.web-store-membership { border-top: 3px solid #d6a646; }
.web-store-points { border-top: 3px solid #42b5a9; }
.web-store-product-symbol { font-size: 1.8rem; line-height: 1; color: #d6a646; }
.web-store-points .web-store-product-symbol { color: #42b5a9; }
.web-store-product h3 { margin: 12px 0 2px; font-size: 1.05rem; }
.web-store-product p { margin: 0 0 6px; color: var(--muted); }
.web-store-product > small { color: var(--muted); }
.web-store-badge { align-self: flex-start; color: #d6a646; }
.web-store-benefits { margin-block: 14px; border-top: 1px solid var(--line); }
.web-store-benefits summary { cursor: pointer; padding-block: 8px; font-weight: 700; }
.web-store-benefits ul { margin: 0; padding-inline-start: 20px; font-size: .88rem; }
.web-store-benefits li { margin-block: 3px; }
.web-store-buy,
.member-challenge-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin-top: auto;
	padding: 8px 14px;
	border: 0;
	border-radius: 5px;
	background: #197d78;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.web-store-buy:hover,
.member-challenge-form button:hover { background: #12625e; }
.web-store-checkout-form { display: flex; margin-top: auto; }
.web-store-unavailable { margin-top: auto; padding-top: 12px; color: var(--muted); font-size: .85rem; }
.member-challenge-form { margin-top: 14px; }
.battle-recent { margin-top: 24px; }
.battle-recent-list { display: grid; gap: 8px; }
.battle-recent-list a { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.battle-recent-list a:hover { border-color: #d6a646; }
.battle-recent-list small { color: var(--muted); }
.web-battle-log { margin-block: 22px; }
.web-battle-log p { display: flex; gap: 12px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.web-battle-log p span { flex: 0 0 28px; color: #d6a646; font-weight: 700; }

.member-attributes-locked {
	display: grid;
	gap: 8px;
	padding: 18px;
	text-align: center;
}

.member-attributes-locked p {
	margin: 0;
}

.account-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 18px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.account-panel h2 {
	margin: 0 0 6px;
}

.member-exp-panel,
.reader-exp-panel {
	display: block;
}

.member-exp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	font-weight: 800;
}

.member-exp-head span {
	color: var(--accent);
	direction: ltr;
	white-space: nowrap;
}

.member-exp-bar {
	width: 100%;
	height: 9px;
	margin: 10px 0 8px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.18);
}

.member-exp-bar span {
	display: block;
	height: 100%;
	min-width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--accent), var(--cyan));
	transition: width .25s ease;
}

.member-attributes-panel {
	display: block;
	--rank-color: #171717;
	border: 2px solid var(--rank-color);
}

.member-rank-fff { --rank-color: #171717; }
.member-rank-ff { --rank-color: #8b6f47; }
.member-rank-f { --rank-color: #4b5563; }
.member-rank-e-minus { --rank-color: #6b7280; }
.member-rank-e { --rank-color: #9ca3af; }
.member-rank-e-plus { --rank-color: #e5e7eb; }
.member-rank-d-minus { --rank-color: #f9fafb; }
.member-rank-d { --rank-color: #fff; }
.member-rank-d-plus { --rank-color: #166534; }
.member-rank-c-minus { --rank-color: #16a34a; }
.member-rank-c { --rank-color: #86efac; }
.member-rank-c-plus { --rank-color: #1e3a8a; }
.member-rank-b-minus { --rank-color: #2563eb; }
.member-rank-b { --rank-color: #38bdf8; }
.member-rank-b-plus { --rank-color: #7f1d1d; }
.member-rank-a-minus { --rank-color: #dc2626; }
.member-rank-a { --rank-color: #ff4d4d; }
.member-rank-a-plus { --rank-color: #ff5a1f; }
.member-rank-s { --rank-color: #fde68a; }
.member-rank-ss { --rank-color: #b8860b; }
.member-rank-sss { --rank-color: #ffb000; box-shadow: 0 0 14px color-mix(in srgb, #ffb000 45%, transparent); }

.member-rank-label {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 9px;
	border-radius: 5px;
	background: var(--rank-color);
	color: #080808;
}

.member-attributes-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	margin-bottom: 14px;
}

.member-attributes-head p {
	margin: 4px 0 0;
}

.member-attributes-head > span {
	color: var(--accent);
	font-weight: 800;
	white-space: nowrap;
}

.member-attributes-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.member-attribute-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 11px 12px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.member-attribute-item strong {
	color: var(--accent);
	direction: ltr;
}

.member-attribute-value {
	display: flex;
	align-items: center;
	gap: 7px;
}

.member-attribute-add {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--rank-color);
	border-radius: 50%;
	background: color-mix(in srgb, var(--rank-color) 18%, transparent);
	color: var(--rank-color);
	font-size: 1.2rem;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

.member-attribute-add:disabled {
	opacity: .3;
	cursor: not-allowed;
}

.member-combat-power {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding: 13px 14px;
	border: 1px solid var(--rank-color);
	border-radius: 6px;
	background: color-mix(in srgb, var(--panel) 82%, var(--rank-color) 18%);
	font-weight: 900;
}

.member-combat-power strong { color: var(--rank-color); font-size: 1.35rem; }

@media (max-width: 620px) {
	.member-attributes-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.member-profile-hero {
		grid-template-columns: 76px minmax(0, 1fr);
		padding: 15px;
	}

	.member-profile-avatar {
		width: 76px;
		height: 76px;
		font-size: 1.8rem;
	}
}

.reader-exp-panel {
	margin: 14px 0;
	padding: 14px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.account-avatar {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--cyan));
	color: #fff;
	font-size: 30px;
	font-weight: 700;
}

.account-avatar-image {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(94, 152, 255, 0.45);
}

.account-details {
	min-width: 0;
	flex: 1;
}

.account-details p {
	margin: 0 0 10px;
	color: var(--muted);
}

.account-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
}

.account-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.ghost-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: transparent;
	color: var(--text);
	padding: 8px 12px;
	font: inherit;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}

.membership-panel {
	display: grid;
	align-items: start;
}

.login-panel {
	display: block;
}

.google-login-card {
	display: grid;
	gap: 10px;
	width: min(440px, 100%);
	margin: 0 auto 18px;
	padding: 16px;
	border: 1px solid rgba(94, 152, 255, 0.28);
	border-radius: 8px;
	background: rgba(94, 152, 255, 0.08);
}

.google-login-card h2 {
	margin: 0;
}

.login-form {
	display: grid;
	gap: 14px;
	width: min(440px, 100%);
	margin-inline: auto;
}

.login-form label {
	display: grid;
	gap: 7px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
	width: 100%;
	min-height: 42px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-2);
	color: var(--text);
	padding: 8px 10px;
	font-family: inherit;
}

.login-form button {
	min-height: 42px;
	border: 0;
	border-radius: 6px;
	background: var(--accent);
	color: #fff;
	font-family: inherit;
	font-weight: 800;
	cursor: pointer;
}

.login-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
}

.word-page {
	display: grid;
	gap: 18px;
	max-width: 980px;
	margin-inline: auto;
}

.word-panel {
	display: grid;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
}

.word-panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
}

.word-head-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.word-panel-head h2,
.word-pack h3 {
	margin: 0;
}

.word-panel-head p,
.word-pack p,
.word-item small {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.7;
}

.word-panel-head button,
.word-pack button,
.word-actions button,
.word-form button {
	border: 0;
	border-radius: 6px;
	background: var(--accent);
	color: #fff;
	padding: 9px 12px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.word-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 10px;
	align-items: end;
}

.word-form label {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 13px;
}

.word-form input {
	width: 100%;
	min-height: 40px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-2);
	color: var(--text);
	padding: 8px 10px;
	font: inherit;
}

.word-list,
.word-pack-list {
	display: grid;
	gap: 10px;
}

.word-item,
.word-pack {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: rgba(255, 255, 255, .035);
}

.word-item.is-disabled {
	opacity: .58;
}

.word-item strong,
.word-item span {
	display: block;
	overflow-wrap: anywhere;
}

.word-item span {
	color: var(--muted);
	font-size: 14px;
}

.word-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.word-actions button:last-child {
	background: #dc2626;
}

.word-pack {
	align-items: flex-start;
	flex-wrap: wrap;
}

.word-pack-details {
	flex: 1 0 100%;
	display: grid;
	gap: 8px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
}

.word-pack-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.word-pack-toolbar button {
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-2);
	color: var(--text);
	padding: 7px 10px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.word-pack-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	padding: 9px 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: rgba(255, 255, 255, .025);
}

.word-pack-item span,
.word-pack-item strong,
.word-pack-item em {
	display: block;
	min-width: 0;
	overflow-wrap: anywhere;
}

.word-pack-item em {
	margin-top: 3px;
	color: var(--muted);
	font-style: normal;
}

@media (max-width: 720px) {
	.word-form,
	.word-panel-head,
	.word-item,
	.word-pack {
		display: grid;
		grid-template-columns: 1fr;
	}
}

.personalized-preview {
	margin-top: 24px;
}

.chapter-form small {
	color: var(--muted);
}

.admin-search button,
.form-actions button {
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 11px 18px;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 720px) {
	.site-header {
		flex-wrap: wrap;
	}

	.search-form {
		order: 3;
		width: 100%;
		max-width: none;
		flex-wrap: wrap;
	}

	.search-form input[type="search"] {
		min-width: min(100%, 220px);
	}

	.adult-filter-toggle {
		flex: 1 1 100%;
		justify-content: center;
	}

	.reader {
		overflow: hidden;
		padding: 14px;
	}

	.reader-nav,
	.reader-bottom-nav {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
		margin: 16px 0;
	}

	.reader-nav .reader-settings-button {
		grid-column: 1 / -1;
	}

	.reader-nav a,
	.reader-nav button,
	.reader-nav select,
	.reader-nav-disabled,
	.reader-bottom-nav a,
	.reader-bottom-nav button,
	.reader-bottom-nav select,
	.reader-bottom-nav .reader-nav-disabled {
		min-width: 0;
		width: 100%;
		max-width: 100%;
		padding: 9px 6px;
		font-size: 13px;
		white-space: nowrap;
	}

	.reader-chapter-select {
		min-width: 0;
	}

	.reader-bottom-nav .next-link,
	.reader-bottom-nav .previous-link,
	.reader-bottom-nav .chapter-list-link {
		justify-self: stretch;
	}

	.series-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}

	.series-grid .series-card {
		position: relative;
		display: grid;
		grid-template-rows: auto auto;
		overflow: hidden;
		border: 0;
		border-radius: 0;
		background: var(--panel-2);
		box-shadow: none;
	}

	.series-grid .series-card-main {
		position: relative;
		display: block;
		padding: 0;
	}

	.series-grid .series-card img {
		display: block;
		width: 100%;
		aspect-ratio: 3 / 4;
		border-radius: 0;
	}

	.series-grid .series-card h2 {
		position: absolute;
		inset-inline: 0;
		bottom: 22px;
		min-height: 0;
		max-height: none;
		margin: 0;
		padding: 6px 7px 3px;
		background: rgba(55, 57, 62, 0.82);
		color: #fff;
		font-size: 11px;
		line-height: 1.25;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.series-grid .series-card .card-rating {
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		margin: 0;
		padding: 2px 7px 6px;
		background: rgba(55, 57, 62, 0.82);
		color: #fff;
		font-size: 10px;
	}

	.series-grid .series-card .card-rating > span {
		color: #fff;
	}

	.series-grid .series-card .card-rating i {
		width: 58px;
	}

	.series-grid .series-card p {
		display: none;
	}

	.series-grid .series-card > .card-meta {
		gap: 3px;
		padding: 6px 7px 8px;
		color: #fff;
		background: rgba(55, 57, 62, 0.82);
		font-size: 10px;
	}

	.series-grid .series-card > .card-meta .card-meta-row {
		gap: 3px;
	}

	.series-grid .series-card > .card-meta .card-meta-row:not(.card-meta-chapter) {
		color: #fff;
	}

	.series-grid .series-card > .card-meta .card-meta-icon {
		flex-basis: 11px;
		width: 11px;
		height: 11px;
		color: #fff;
	}

	.series-grid .series-card > .card-meta .card-meta-chapter {
		justify-self: center;
		margin-top: 4px;
		padding: 3px 5px;
		background: #4d2db8;
		color: #fff;
	}

	.series-grid .series-card > .card-meta .card-meta-chapter:hover {
		background: #3f229d;
		color: #fff;
	}

	.series-hero {
		grid-template-columns: 1fr;
		gap: 14px;
		overflow: hidden;
		margin-inline: calc(var(--mobile-page-bleed, 0px) * -1);
		padding: 0 0 16px;
		background: var(--panel);
		border: 1px solid var(--line);
		border-radius: 10px;
	}

	.series-cover-side {
		gap: 12px;
	}

	.series-cover-showcase {
		position: relative;
		display: grid;
		justify-items: center;
		align-items: start;
		min-height: 310px;
		padding-top: 44px;
		overflow: hidden;
		background-image: linear-gradient(180deg, rgba(255, 255, 255, 0) 0 66%, var(--panel) 66% 100%);
	}

	.series-cover-backdrop {
		display: block;
		position: absolute;
		inset: 0 0 auto;
		width: 100%;
		height: 220px;
		object-fit: cover;
		filter: blur(2px);
		transform: scale(1.04);
		opacity: 0.82;
	}

	.series-cover-poster {
		position: relative;
		z-index: 1;
		width: min(62vw, 245px);
		aspect-ratio: 3 / 4;
		object-fit: cover;
		border: 5px solid #fff;
		border-radius: 6px;
		box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
	}

	.series-cover-side .favorite-button {
		width: max-content;
		max-width: calc(100% - 28px);
		justify-self: center;
	}

	.series-info-list {
		margin-inline: 14px;
	}

	.series-user-rating {
		margin-top: 6px;
	}

	.series-hero > div:not(.series-cover-showcase) {
		padding-inline: 14px;
		text-align: center;
	}

	.series-rating-layout {
		grid-template-columns: 1fr;
	}

	.series-rating-action {
		justify-items: center;
	}

	.series-hero .tag-list {
		justify-content: center;
	}

	.chapter-list {
		padding: 14px;
		border-radius: 10px;
	}

	.chapter-list h2 {
		margin-top: 0;
	}

	.chapter-list-scroll {
		display: grid;
		gap: 10px;
		padding: 2px 2px 2px 6px;
	}

	.chapter-row {
		align-items: center;
		padding: 12px 14px;
		border: 1px solid var(--line);
		border-radius: 8px;
		background: var(--panel-2);
		box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
	}

	.chapter-row.is-read {
		border-color: rgba(102, 81, 198, 0.62);
		background: linear-gradient(135deg, rgba(102, 81, 198, 0.26), rgba(17, 27, 49, 0.94));
	}

	.chapter-list-scroll .chapter-row:first-child {
		border-top: 1px solid var(--line);
	}

	.chapter-row span {
		display: block;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-weight: 700;
	}

	.chapter-row time {
		display: none;
	}

	.content-with-sidebar {
		grid-template-columns: 1fr;
	}

	.sidebar-widgets {
		order: 2;
	}

	.filter-toolbar {
		grid-template-columns: 1fr;
	}

	.filter-menu-body,
	.filter-grid.compact {
		position: static;
		min-width: 0;
		margin-top: 2px;
	}

	.filter-grid,
	.filter-grid.compact {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.list-head {
		display: block;
	}

	.filter-values-grid {
		grid-template-columns: 1fr;
	}

	.admin-search,
	.chapter-form {
		grid-template-columns: 1fr;
	}

	.inline-admin-form,
	.danger-inline {
		grid-template-columns: 1fr;
	}
}

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

.app-home {
	padding-bottom: 24px;
}

.app-hero-shell {
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	padding: 18px;
	min-height: 300px;
	background:
		linear-gradient(180deg, rgba(4, 8, 20, 0.08), rgba(4, 8, 20, 0.98)),
		radial-gradient(circle at 76% 12%, rgba(168, 85, 247, 0.55), transparent 13rem),
		radial-gradient(circle at 18% 4%, rgba(59, 130, 246, 0.32), transparent 14rem),
		#050916;
	border: 1px solid var(--line);
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.cosmic-glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, 0.84) 0 1px, transparent 1.5px),
		linear-gradient(135deg, transparent 18%, rgba(126, 87, 255, 0.16), transparent 45%);
	background-size: 62px 62px, 100% 100%;
	opacity: 0.38;
}

.app-topbar,
.continue-card,
.app-section {
	position: relative;
	z-index: 1;
}

.app-topbar {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	gap: 12px;
	align-items: center;
	margin-bottom: 18px;
}

.round-icon,
.coin-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border: 1px solid rgba(246, 180, 75, 0.28);
	background: rgba(6, 13, 29, 0.7);
	color: #ffd68b;
	border-radius: 14px;
	box-shadow: inset 0 0 18px rgba(168, 85, 247, 0.12);
}

.round-icon {
	font-size: 24px;
}

.coin-chip {
	gap: 8px;
	padding: 0 12px;
	direction: ltr;
}

.app-title {
	text-align: center;
}

.app-title h1 {
	margin: 0;
	font-size: clamp(30px, 5vw, 48px);
	line-height: 1.15;
	text-shadow: 0 0 20px rgba(166, 112, 255, 0.46);
}

.app-title p {
	margin: 4px 0 0;
	color: var(--muted);
}

.continue-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 45%);
	overflow: hidden;
	border-radius: 16px;
	min-height: 220px;
	background: linear-gradient(90deg, rgba(8, 16, 34, 0.96), rgba(9, 15, 32, 0.72));
	border: 1px solid rgba(165, 130, 255, 0.24);
	box-shadow: inset 0 0 32px rgba(141, 79, 255, 0.08);
}

.continue-copy {
	padding: clamp(18px, 4vw, 34px);
	align-self: center;
}

.section-kicker {
	display: inline-flex;
	color: #e8d8ff;
	font-weight: 700;
	margin-bottom: 12px;
}

.continue-copy h2 {
	margin: 0 0 8px;
	font-size: clamp(22px, 4vw, 34px);
}

.continue-copy p {
	margin: 0 0 14px;
	color: var(--muted);
}

.progress-track {
	width: min(360px, 100%);
	height: 8px;
	border-radius: 999px;
	background: rgba(151, 169, 214, 0.16);
	overflow: hidden;
	margin-bottom: 12px;
}

.progress-track span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #6d5dfc, #b95cff);
	box-shadow: 0 0 16px rgba(185, 92, 255, 0.8);
}

.progress-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: min(360px, 100%);
}

.progress-row strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	padding: 10px 18px;
	border-radius: 10px;
	background: linear-gradient(180deg, #9e61ff, #6537e8);
	box-shadow: 0 12px 30px rgba(141, 79, 255, 0.32);
}

.progress-row span {
	color: var(--muted);
}

.continue-art {
	position: relative;
	min-height: 220px;
}

.continue-art::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(8, 16, 34, 0.98), transparent 42%);
}

.continue-art img,
.hero-fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cover-fallback {
	width: 100%;
	height: 100%;
	min-height: 180px;
	background:
		radial-gradient(circle at 60% 32%, rgba(168, 85, 247, 0.78), transparent 38%),
		linear-gradient(135deg, #111827, #312e81 52%, #050816);
}

.app-section {
	margin-top: 24px;
}

.app-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.app-section-head h2 {
	margin: 0;
	font-size: clamp(22px, 3vw, 30px);
}

.app-section-head a {
	color: #b88cff;
	font-size: 14px;
}

.rail-cards {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(148px, 185px);
	gap: 14px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	padding: 2px 2px 12px;
	scrollbar-width: thin;
}

.app-card {
	position: relative;
	display: grid;
	grid-template-rows: 1fr auto;
	gap: 6px;
	background: linear-gradient(180deg, rgba(16, 24, 44, 0.92), rgba(7, 12, 27, 0.96));
	border: 1px solid rgba(151, 169, 214, 0.18);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.app-card-main {
	display: block;
	padding: 8px;
}

.app-cover {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 10px;
	background: var(--panel-2);
}

.app-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.new-pill {
	position: absolute;
	top: 8px;
	inset-inline-start: auto;
	inset-inline-end: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, #7c3aed, #a855f7);
	font-size: 11px;
	font-weight: 700;
}

.app-card h3 {
	overflow: hidden;
	min-height: 22px;
	max-height: 22px;
	margin: 10px 4px 2px;
	font-size: 15px;
	line-height: 1.45;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.app-card p {
	margin: 0 4px;
	color: var(--muted);
	font-size: 13px;
}

.rating-star {
	display: inline-block;
	margin: 4px;
	color: #ffc65b;
	font-size: 13px;
}

.app-chapter-badge {
	justify-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	margin-bottom: 8px;
	padding: 4px 8px;
	border-radius: 3px;
	background: #4d2db8;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.app-chapter-badge:hover {
	background: #3f229d;
	color: #fff;
}

.app-card > .card-meta {
	padding: 0 10px 10px;
	text-align: center;
}

.app-card > .card-meta .card-meta-row {
	justify-content: center;
}

.podium {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	align-items: end;
	padding: 18px;
	border-radius: 16px;
	border: 1px solid rgba(246, 180, 75, 0.16);
	background:
		radial-gradient(ellipse at 50% 100%, rgba(246, 180, 75, 0.24), transparent 45%),
		linear-gradient(180deg, rgba(7, 13, 30, 0.9), rgba(5, 9, 21, 0.98));
}

.rank-card {
	overflow: visible;
}

.rank-card::before {
	content: attr(class);
	display: none;
}

.rank-1 {
	transform: translateY(-12px) scale(1.04);
	border-color: rgba(246, 180, 75, 0.58);
	box-shadow: 0 0 34px rgba(246, 180, 75, 0.24);
}

.rank-1 .app-cover::before,
.rank-2 .app-cover::before,
.rank-3 .app-cover::before {
	position: absolute;
	z-index: 2;
	top: 8px;
	inset-inline-end: 8px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(8, 13, 27, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
	font-weight: 700;
}

.rank-1 .app-cover::before { content: "1"; color: #ffd782; }
.rank-2 .app-cover::before { content: "2"; color: #d7e1ff; }
.rank-3 .app-cover::before { content: "3"; color: #ffb08f; }

.app-pager {
	padding-bottom: 70px;
}

@media (max-width: 760px) {
	.page {
		width: min(100% - 20px, 620px);
		margin-top: 10px;
	}

	.continue-card {
		grid-template-columns: 1fr;
	}

	.continue-art {
		min-height: 170px;
		order: -1;
	}

	.continue-art::after {
		background: linear-gradient(180deg, transparent, rgba(8, 16, 34, 0.95));
	}

	.podium {
		grid-template-columns: 1fr 1.08fr 1fr;
		gap: 8px;
		padding: 10px;
	}

	.rank-card h3 {
		font-size: 13px;
		min-height: 42px;
	}
}

/* Home app layout */
.home-app-page {
	min-height: 100vh;
	background:
		radial-gradient(circle at 72% 2%, rgba(99, 102, 241, 0.28), transparent 22rem),
		radial-gradient(circle at 14% 10%, rgba(124, 58, 237, 0.18), transparent 20rem),
		#040814;
}

:root[data-theme="light"] .home-app-page {
	background:
		radial-gradient(circle at 72% 2%, rgba(102, 81, 198, 0.16), transparent 22rem),
		radial-gradient(circle at 14% 10%, rgba(59, 130, 246, 0.12), transparent 20rem),
		#f3f5fb;
}

.home-app-page .site-header,
.home-app-page .site-footer {
	display: none;
}

.home-app-page .page {
	width: min(1180px, calc(100% - 48px));
	margin: 0 auto;
	padding: 0 14px 96px;
}

.home-app-page .app-home {
	width: 100%;
	margin: 0 auto;
	padding-bottom: 0;
}

.home-app-page .app-hero-shell {
	margin: 0 -14px 24px;
	padding: 18px 18px 20px;
	border: 0;
	border-radius: 0 0 26px 26px;
	min-height: auto;
	background:
		linear-gradient(180deg, rgba(4, 8, 20, 0.2), #040814 96%),
		radial-gradient(circle at 77% 10%, rgba(139, 92, 246, 0.62), transparent 12rem),
		radial-gradient(circle at 32% 0%, rgba(37, 99, 235, 0.34), transparent 15rem),
		linear-gradient(135deg, #050916, #080c1c 58%, #050714);
	box-shadow: none;
}

.home-app-page .cosmic-glow {
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.7px),
		radial-gradient(ellipse at 82% 0%, rgba(168, 85, 247, 0.35), transparent 20rem),
		linear-gradient(138deg, transparent 10%, rgba(59, 130, 246, 0.12), transparent 44%);
	background-size: 54px 54px, 100% 100%, 100% 100%;
	opacity: 0.52;
}

.home-app-page .app-topbar {
	grid-template-columns: 46px 1fr auto;
	margin-bottom: 20px;
}

.home-app-page .app-title h1 {
	font-size: clamp(34px, 8vw, 46px);
	font-weight: 800;
	letter-spacing: 0;
}

.home-app-page .app-title p {
	font-size: 13px;
}

.home-app-page .round-icon,
.home-app-page .coin-chip {
	min-height: 44px;
	border-radius: 14px;
	background: rgba(6, 11, 26, 0.72);
	backdrop-filter: blur(10px);
}

.home-app-page .continue-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 46%;
	min-height: 212px;
	border-radius: 18px;
	background:
		linear-gradient(90deg, rgba(7, 14, 31, 0.98), rgba(7, 14, 31, 0.8)),
		#091124;
}

.home-app-page .continue-copy {
	padding: 22px 20px;
	text-align: right;
}

.home-app-page .continue-copy h2 {
	font-size: clamp(20px, 4.6vw, 28px);
	line-height: 1.45;
}

.home-app-page .progress-row {
	flex-direction: column-reverse;
	align-items: flex-start;
	gap: 8px;
}

.home-app-page .progress-row strong {
	width: min(100%, 280px);
	min-width: 0;
}

.home-app-page .continue-art {
	min-height: 212px;
}

.home-app-page .continue-art::after {
	background: linear-gradient(90deg, rgba(7, 14, 31, 0.96), transparent 52%);
}

.home-app-page .app-section {
	margin-top: 26px;
}

.home-app-page .app-section-head {
	margin-bottom: 12px;
}

.home-app-page .app-section-head h2 {
	font-size: clamp(21px, 5vw, 28px);
	font-weight: 800;
}

.home-app-page .app-section-head a {
	color: #b48cff;
}

.home-app-page .rail-cards {
	grid-auto-columns: 150px;
	gap: 12px;
	padding: 2px 2px 14px;
}

.home-app-page .app-card {
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(12, 20, 39, 0.96), rgba(5, 10, 25, 0.98));
}

.home-app-page .app-card-main {
	padding: 7px;
}

.home-app-page .app-cover {
	border-radius: 10px;
	aspect-ratio: 3 / 4;
}

.home-app-page .app-card h3 {
	margin: 9px 4px 2px;
	min-height: 21px;
	max-height: 21px;
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

.home-app-page .app-card p,
.home-app-page .rating-star {
	display: block;
	text-align: center;
}

.home-app-page .podium {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding: 18px 10px 12px;
	border-radius: 18px;
}

.home-app-page .rank-1 {
	transform: translateY(-12px) scale(1.04);
}

.home-app-page .app-pager {
	margin: 18px 0 0;
	padding-bottom: 0;
}

.app-tabbar {
	position: fixed;
	z-index: 50;
	right: 50%;
	bottom: 0;
	transform: translateX(50%);
	width: min(1180px, calc(100% - 48px));
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: rgba(5, 10, 24, 0.94);
	border-top: 1px solid rgba(151, 169, 214, 0.18);
	backdrop-filter: blur(18px);
}

.app-tabbar a {
	display: grid;
	place-items: center;
	gap: 2px;
	min-height: 50px;
	border-radius: 16px;
	color: #9aa8c7;
	font-size: 22px;
}

.app-tabbar a:first-child {
	color: #d9c7ff;
	background: radial-gradient(circle at 50% 20%, rgba(168, 85, 247, 0.55), rgba(124, 58, 237, 0.16) 58%, transparent 70%);
	box-shadow: 0 0 24px rgba(141, 79, 255, 0.34);
}

.app-tabbar span {
	font-size: 11px;
	line-height: 1.2;
}

@media (min-width: 900px) {
	.home-app-page .page {
		padding-inline: 0;
	}

	.home-app-page .app-home {
		padding-top: 0;
	}

	.home-app-page .app-hero-shell {
		margin: 0 0 34px;
		padding: 28px 34px 34px;
		border: 1px solid rgba(151, 169, 214, 0.16);
		border-radius: 0 0 30px 30px;
	}

	.home-app-page .app-topbar {
		grid-template-columns: 58px 1fr auto;
		margin-bottom: 28px;
	}

	.home-app-page .round-icon,
	.home-app-page .coin-chip {
		min-height: 50px;
		border-radius: 16px;
	}

	.home-app-page .app-title h1 {
		font-size: 56px;
	}

	.home-app-page .app-title p {
		font-size: 15px;
	}

	.home-app-page .continue-card {
		grid-template-columns: minmax(0, 1fr) 42%;
		min-height: 320px;
		border-radius: 22px;
	}

	.home-app-page .continue-copy {
		padding: 38px 44px;
	}

	.home-app-page .section-kicker {
		font-size: 18px;
	}

	.home-app-page .continue-copy h2 {
		max-width: 620px;
		font-size: 38px;
	}

	.home-app-page .continue-copy p {
		font-size: 17px;
	}

	.home-app-page .progress-track,
	.home-app-page .progress-row {
		width: min(460px, 100%);
	}

	.home-app-page .progress-row strong {
		width: min(320px, 100%);
		padding-block: 13px;
		font-size: 17px;
	}

	.home-app-page .continue-art {
		min-height: 320px;
	}

	.home-app-page .app-section {
		margin-top: 38px;
	}

	.home-app-page .app-section-head h2 {
		font-size: 32px;
	}

	.home-app-page .rail-cards {
		grid-auto-columns: 190px;
		gap: 18px;
	}

	.home-app-page .app-card-main {
		padding: 9px;
	}

	.home-app-page .app-card h3 {
		min-height: 24px;
		max-height: 24px;
		font-size: 16px;
	}

	.home-app-page .app-card p,
	.home-app-page .rating-star {
		font-size: 14px;
	}

	.home-app-page .podium {
		gap: 22px;
		padding: 28px 28px 18px;
	}

	.home-app-page .podium .app-card {
		max-width: 260px;
		margin-inline: auto;
	}

	.app-tabbar {
		border-radius: 24px 24px 0 0;
	}
}

@media (max-width: 760px) {
	.home-app-page .page,
	.app-tabbar {
		width: min(100%, 680px);
	}
}

@media (max-width: 560px) {
	.home-app-page .page {
		padding-inline: 12px;
	}

	.home-app-page .app-hero-shell {
		margin-inline: -12px;
		padding-inline: 16px;
	}

	.home-app-page .continue-card {
		grid-template-columns: 1fr;
	}

	.home-app-page .continue-art {
		order: -1;
		min-height: 178px;
	}

	.home-app-page .continue-art::after {
		background: linear-gradient(180deg, transparent, rgba(7, 14, 31, 0.98));
	}

	.home-app-page .rail-cards {
		grid-auto-columns: 134px;
	}

	.home-app-page .podium {
		gap: 7px;
		padding-inline: 7px;
	}

	.home-app-page .app-card h3 {
		font-size: 13px;
	}
}

/* Desktop web-style homepage */
.home-app-page .site-header {
	display: flex;
	background: rgba(92, 72, 183, 0.96);
	border-bottom: 0;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.home-app-page .site-footer {
	display: block;
}

.home-app-page .page {
	width: min(1140px, calc(100% - 32px));
	padding: 18px 0 48px;
}

.web-home {
	display: grid;
	gap: 16px;
	direction: rtl;
	color: var(--text);
}

.web-home a {
	color: inherit;
}

.web-top-strip {
	padding: 12px 0;
	color: #eef3ff;
	font-weight: 700;
}

.web-top-strip h1 {
	margin: 0;
	font-size: 18px;
}

.web-feature-grid {
	display: grid;
	grid-template-columns: 216px minmax(0, 1fr);
	gap: 16px;
	align-items: stretch;
}

.web-compact-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.web-mobile-top-grid {
	display: none;
}

.web-poster-card,
.web-compact-card,
.web-panel {
	background: var(--panel);
	border: 1px solid var(--line);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.web-poster-card {
	display: grid;
	grid-template-rows: 1fr 22px;
	gap: 10px;
	padding: 14px;
}

.web-card-main {
	display: grid;
	gap: 10px;
	text-align: right;
}

.web-poster-cover {
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: #111827;
}

.web-feature-grid > .web-poster-card.is-featured .web-poster-cover {
	height: 360px;
	aspect-ratio: auto;
}

.web-poster-cover img,
.web-compact-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.web-poster-overlay {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 10px 12px 12px;
	color: #fff;
	text-align: right;
	background: rgba(54, 57, 64, 0.9);
	box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(2px);
}

.web-poster-overlay h3 {
	margin: 0 0 8px;
	overflow: hidden;
	min-height: 20px;
	max-height: 20px;
	font-size: 16px;
	line-height: 1.25;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.web-poster-overlay h3 a {
	color: inherit;
}

.web-poster-overlay p {
	margin: 5px 0 0;
	min-height: 18px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 700;
}

.web-poster-overlay span,
.web-compact-card p span {
	color: #f4a51c;
	letter-spacing: 0;
}

.web-card-badges,
.web-chapter-badge {
	justify-self: center;
	width: max-content;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 22px;
	overflow: hidden;
	line-height: 1.2;
}

.web-card-badges strong,
.web-card-badges em,
.web-chapter-badge {
	padding: 4px 8px;
	border-radius: 3px;
	background: #4d2db8;
	color: #fff;
	font-size: 12px;
	font-style: normal;
	white-space: nowrap;
}

.web-chapter-badge:hover {
	background: #3f229d;
	color: #fff;
}

.web-chapter-badge .card-meta-icon {
	width: 12px;
	height: 12px;
	color: #fff;
}

.web-card-badges em {
	background: #f0a51b;
	color: #1d2436;
}

.web-compact-main {
	display: grid;
	grid-template-columns: 100px minmax(0, 1fr);
	gap: 14px;
	align-items: stretch;
	min-height: 100%;
	text-align: right;
}

.web-compact-card {
	padding: 12px;
}

.web-compact-cover {
	position: relative;
	width: 100px;
	height: 100%;
	min-height: 136px;
	overflow: hidden;
	background: var(--panel-2);
}

.web-compact-cover a {
	position: relative;
	display: block;
	height: 100%;
}

.web-compact-cover .cover-fallback {
	width: 100%;
	height: 100%;
}

.web-compact-card img,
.web-compact-cover .cover-fallback {
	aspect-ratio: 3 / 4;
}

.web-compact-copy {
	display: grid;
	align-content: start;
	min-width: 0;
}

.web-compact-title {
	display: block;
	margin: 0 0 10px;
	overflow: hidden;
	min-height: 22px;
	max-height: 22px;
	color: var(--text);
	font-size: 16px;
	line-height: 1.35;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.web-compact-card p,
.web-compact-card small {
	display: block;
	margin: 0 0 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--muted);
	font-size: 13px;
}

.web-compact-card .web-chapter-badge {
	justify-self: start;
	margin-top: 2px;
}

.web-poster-overlay .card-meta {
	color: #fff;
	font-weight: 700;
}

.web-poster-overlay .card-meta-icon {
	color: #d9d1ff;
}

.web-compact-copy .card-meta {
	gap: 6px;
}

.web-main-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 326px;
	gap: 16px;
	align-items: stretch;
}

.web-panel {
	overflow: hidden;
}

.web-main-grid > .web-main-column,
.web-main-grid > .web-side-column {
	display: grid;
}

.web-main-grid > .web-main-column > .web-panel,
.web-main-grid > .web-side-column > .web-panel {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.web-panel + .web-panel {
	margin-top: 16px;
}

.web-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
}

.web-panel-head h2 {
	margin: 0;
	color: #d8d0ff;
	font-size: 17px;
	font-weight: 800;
	text-transform: uppercase;
}

.web-panel-head a {
	color: #d8d0ff;
	font-weight: 800;
}

.release-table {
	display: grid;
	flex: 1;
	border-block-start: 1px dashed var(--line);
}

.release-row {
	display: grid;
	grid-template-columns: 36px minmax(190px, 1.15fr) minmax(130px, 0.75fr) minmax(180px, 1fr) 96px;
	align-items: center;
	min-height: 42px;
	border-bottom: 1px dashed var(--line);
	color: var(--text);
}

.release-row:hover {
	background: rgba(102, 81, 198, 0.08);
}

.release-title {
	display: flex;
	align-items: center;
	min-width: 0;
	color: var(--text);
}

.release-title strong {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.release-cover {
	display: grid;
	place-items: center;
	padding: 7px 0;
}

.release-cover img,
.release-cover .cover-fallback {
	width: 22px;
	height: 28px;
	object-fit: cover;
}

.release-cover .cover-fallback {
	display: block;
	background: var(--panel-2);
}

.release-cover,
.release-title,
.release-row > span,
.release-row > a,
.release-row time {
	min-width: 0;
	padding: 7px 14px;
	border-inline-start: 1px dashed var(--line);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.release-cover {
	border-inline-start: 0;
	padding-inline: 0;
}

.release-row > :first-child {
	border-inline-start: 0;
}

.release-genres {
	display: flex;
	align-items: center;
	gap: 5px;
}

.release-genres a {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text);
}

.release-genres a:hover {
	color: #7a63de;
}

.release-chapter {
	color: #6651c6;
	font-weight: 800;
}

.release-chapter:hover,
.release-title:hover strong {
	color: #7a63de;
}

.release-row time {
	color: var(--muted);
	font-size: 13px;
}

.genre-table {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: minmax(38px, 1fr);
	flex: 1;
}

.genre-table a {
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 10px 14px;
	border-bottom: 1px dashed var(--line);
	color: var(--text);
	font-weight: 700;
}

.genre-table a:nth-child(odd) {
	border-inline-end: 1px dashed var(--line);
}

.genre-table a::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-inline-end: 6px;
	border-radius: 50%;
	background: #4d2db8;
	box-shadow: 0 0 0 2px rgba(102, 81, 198, 0.16);
}

.web-poster-row {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
	padding: 14px;
}

.web-poster-row .web-poster-card {
	padding: 0;
	border: 0;
	box-shadow: none;
	background: var(--panel-2);
}

.web-poster-row .web-poster-card {
	grid-template-rows: 1fr 22px;
	gap: 10px;
	padding-bottom: 12px;
}

.web-poster-row .web-poster-cover {
	border-radius: 0;
	height: 232px;
	aspect-ratio: auto;
}

.web-poster-row .web-poster-overlay h3 {
	min-height: 20px;
	max-height: 20px;
	-webkit-line-clamp: 1;
	white-space: nowrap;
	text-overflow: ellipsis;
	display: block;
}

.home-app-page .app-tabbar {
	display: none;
}

@media (max-width: 1100px) {
	.web-feature-grid,
	.web-main-grid {
		grid-template-columns: 1fr;
	}

	.web-feature-grid > .web-poster-card.is-featured {
		max-width: 260px;
	}

	.web-feature-grid > .web-poster-card.is-featured .web-poster-cover {
		height: 360px;
	}

	.web-poster-row {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.web-poster-row .web-poster-cover {
		height: 220px;
	}
}

@media (max-width: 900px) {
	.home-app-page .web-side-column,
	.home-app-page .genre-table,
	.home-app-page .sidebar-widgets {
		display: none !important;
	}
}

@media (max-width: 760px) {
	.home-app-page .site-header {
		background: rgba(92, 72, 183, 0.96);
	}

	.site-header {
		position: sticky;
		top: 0;
		z-index: 1000;
		flex-wrap: wrap;
		gap: 10px;
		padding: 10px 14px;
	}

	.brand {
		min-width: 0;
		font-size: 18px;
	}

	.brand span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.menu-toggle {
		display: inline-flex;
		flex-direction: column;
		gap: 5px;
		order: 20;
		margin-inline-start: auto;
	}

	.site-menu {
		order: 30;
		display: flex;
		align-items: flex-start;
		width: 100%;
		gap: 8px;
		padding-top: 8px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		max-height: 0;
		overflow: hidden;
		overflow-x: auto;
		transition: opacity 0.18s ease, visibility 0.18s ease, max-height 0.22s ease;
	}

	body.menu-open .site-menu,
	.menu-open .site-menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		max-height: 300px;
	}

	.site-menu .header-link {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		min-height: 44px;
		padding: 10px 12px;
		border: 1px solid var(--line);
		border-radius: 8px;
		background: var(--panel-2);
		color: var(--text);
		font-size: 15px;
		font-weight: 700;
	}

	.site-menu-submenu {
		position: relative;
		inset: auto;
		margin-top: 4px;
		min-width: 0;
		box-shadow: none;
	}

	.site-header .search-form {
		order: 40;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		width: 100%;
		max-width: none;
		margin: 0;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		max-height: 0;
		overflow: hidden;
		transition: opacity 0.18s ease, visibility 0.18s ease, max-height 0.22s ease;
	}

	body.menu-open .site-header .search-form,
	.menu-open .site-header .search-form {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		max-height: 64px;
	}

	.site-header .search-form button {
		display: none;
	}

	.site-header .adult-filter-toggle {
		min-height: 42px;
		padding: 8px;
	}

	.site-header .adult-filter-toggle span {
		font-size: 0;
	}

	.site-header .adult-filter-toggle span::before {
		margin: 0;
	}

	.site-header .account {
		display: none;
	}

	.web-home {
		gap: 12px;
	}

	.web-ad-slot {
		min-height: 72px;
	}

	.web-side-column,
	.web-feature-grid {
		display: none;
	}

	.web-mobile-top-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		padding: 14px;
		background: var(--panel);
		border: 1px solid var(--line);
	}

	.web-compact-grid,
	.web-poster-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.web-feature-grid > .web-poster-card.is-featured .web-poster-cover,
	.web-mobile-top-grid .web-poster-cover,
	.web-poster-row .web-poster-cover {
		height: auto;
		aspect-ratio: 3 / 4;
	}

	.web-poster-card {
		grid-template-rows: 1fr 34px;
		gap: 0;
		padding: 0;
		border: 0;
		background: #f2f3f6;
		box-shadow: none;
	}

	.web-poster-cover {
		border-radius: 3px 3px 0 0;
	}

	.web-poster-overlay {
		padding: 9px 10px 11px;
		background: rgba(55, 57, 62, 0.82);
	}

	.web-poster-overlay h3 {
		margin-bottom: 7px;
		font-size: 16px;
		text-align: start;
	}

	.web-poster-overlay .card-meta {
		gap: 5px;
		font-size: 13px;
	}

	.web-poster-overlay .card-meta-row {
		min-width: 0;
		overflow: hidden;
	}

	.web-poster-overlay .card-meta-row span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.web-card-badges {
		align-self: center;
		margin-top: 8px;
	}

	.web-mobile-top-grid .web-poster-card {
		background: var(--panel-2);
	}

	.web-poster-row .web-poster-cover {
		height: auto;
		aspect-ratio: 3 / 4;
	}

	.web-compact-main {
		grid-template-columns: 82px minmax(0, 1fr);
	}

	.web-compact-cover {
		width: 82px;
		height: 100%;
		min-height: 112px;
	}

	.release-row {
		grid-template-columns: 58px minmax(0, 1fr) 70px;
		grid-template-rows: auto auto auto;
		gap: 3px 12px;
		align-items: center;
		min-height: 86px;
		padding: 10px 12px;
	}

	.release-title,
	.release-cover,
	.release-row > span,
	.release-row > a,
	.release-row time {
		border-inline-start: 0;
		border-top: 0;
		padding: 0;
	}

	.release-row > :first-child {
		border-top: 0;
	}

	.release-title {
		grid-column: 2;
		grid-row: 1;
		display: block;
		align-self: end;
	}

	.release-cover {
		grid-column: 1;
		grid-row: 1 / 4;
		display: block;
		width: 58px;
		height: 58px;
		overflow: hidden;
	}

	.release-cover img,
	.release-cover .cover-fallback {
		width: 58px;
		height: 58px;
		border-radius: 4px;
	}

	.release-title strong {
		font-size: 15px;
		line-height: 1.25;
		color: var(--text);
	}

	.release-genres {
		grid-column: 2;
		grid-row: 2;
		align-self: start;
		font-size: 13px;
	}

	.release-chapter {
		grid-column: 2;
		grid-row: 3;
		align-self: start;
		margin-inline-start: 0;
		font-size: 13px;
		font-weight: 700;
	}

	.release-row time {
		grid-column: 3;
		grid-row: 1 / 4;
		align-self: center;
		text-align: end;
		font-size: 12px;
	}

	.genre-table {
		grid-template-columns: 1fr;
	}
}

:root[data-theme="light"] .home-app-page .site-header {
	background: rgba(255, 255, 255, 0.92);
	border-bottom: 1px solid var(--line);
}

:root[data-theme="light"] .home-app-page .site-footer {
	background: rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .web-top-strip {
	color: var(--text);
}

:root[data-theme="light"] .web-panel-head h2,
:root[data-theme="light"] .web-panel-head a {
	color: #4d3aa6;
}

:root[data-theme="light"] .web-poster-card,
:root[data-theme="light"] .web-compact-card,
:root[data-theme="light"] .web-panel {
	background: #ffffff;
	color: var(--text);
}

:root[data-theme="light"] .web-poster-row .web-poster-card {
	background: #f4f6fb;
}

:root[data-theme="light"] .web-compact-title,
:root[data-theme="light"] .web-compact-card p,
:root[data-theme="light"] .web-compact-card small,
:root[data-theme="light"] .release-row,
:root[data-theme="light"] .genre-table a {
	color: var(--text);
}

:root[data-theme="light"] .search-form input,
:root[data-theme="light"] .comment-form textarea,
:root[data-theme="light"] .reader-settings input,
:root[data-theme="light"] .reader-settings select,
:root[data-theme="light"] .chapter-jump-form input,
:root[data-theme="light"] .admin-search input,
:root[data-theme="light"] .chapter-form input,
:root[data-theme="light"] .chapter-form select,
:root[data-theme="light"] .chapter-form textarea,
:root[data-theme="light"] .select2-lite-search,
:root[data-theme="light"] .inline-admin-form input,
:root[data-theme="light"] .inline-admin-form select {
	background: #ffffff;
	color: var(--text);
	border-color: var(--line);
}

:root[data-theme="light"] .search-form button {
	background: #4d2db8;
	color: #fff;
	border-color: #4d2db8;
}

:root[data-theme="light"] .admin-results a,
:root[data-theme="light"] .admin-levels span,
:root[data-theme="light"] .choice-grid,
:root[data-theme="light"] .select2-lite select {
	background: #f7f8fc;
	color: var(--text);
}

.floating-chat {
	position: fixed;
	z-index: 80;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	direction: rtl;
}

.social-float {
	position: fixed;
	z-index: 81;
	right: max(88px, calc(env(safe-area-inset-right) + 72px));
	bottom: max(18px, env(safe-area-inset-bottom));
	direction: rtl;
}
.social-float [hidden], .social-float.social-float-hidden { display: none !important; }
.social-float-toggle {
	width: 52px;
	height: 52px;
	border: 1px solid #82a6cf;
	border-radius: 50%;
	background: #174d77;
	color: #fff;
	font-size: 25px;
	cursor: pointer;
	position: relative;
}
.social-float-toggle span, .social-float-unread {
	position: absolute;
	top: -7px;
	left: -8px;
	min-width: 22px;
	height: 22px;
	padding: 0 4px;
	border-radius: 11px;
	background: #c62828;
	color: #fff;
	font-size: 12px;
	line-height: 22px;
	text-align: center;
}
.social-float-dismiss {
	position: absolute;
	top: -12px;
	right: -10px;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: #334155;
	color: #fff;
	cursor: pointer;
}
.social-float-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; }
.social-float-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .57); }
.social-float-dialog {
	position: relative;
	width: 70vw;
	height: 70vh;
	max-width: 720px;
	max-height: 760px;
	display: flex;
	flex-direction: column;
	border: 1px solid #64748b;
	border-radius: 8px;
	background: #111827;
	color: #f8fafc;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.social-float-dialog > header { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #334155; }
.social-float-dialog > header strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-float-dialog button { cursor: pointer; }
.social-float-dialog > header button { border: 0; background: transparent; color: inherit; font-size: 22px; }
.social-float-content { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.social-float-peer { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px; border: 0; border-bottom: 1px solid #334155; background: transparent; color: inherit; text-align: right; }
.social-float-peer strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-float-peer .social-float-unread { position: static; }
.social-float-message { width: fit-content; max-width: 85%; padding: 9px 12px; border-radius: 8px; background: #26364f; white-space: pre-wrap; overflow-wrap: anywhere; }
.social-float-message.mine { margin-inline-start: auto; background: #174d77; }
.social-float-message time { display: block; color: #bbc7d7; font-size: 11px; }
.social-float-error { color: #ffb4ab; }
.social-float-dialog form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #334155; }
.social-float-dialog form textarea { flex: 1; min-width: 0; resize: none; background: #fff; color: #111; }
.social-float-dialog form button { padding: 0 12px; }
@media (max-width: 600px) {
	.social-float-dialog { width: 90vw; height: 70vh; }
}

.floating-chat [hidden] {
	display: none !important;
}

.floating-chat-button {
	width: 56px;
	height: 56px;
	display: inline-grid;
	place-items: center;
	border: 1px solid rgba(94, 152, 255, 0.45);
	border-radius: 50%;
	background: linear-gradient(145deg, #2e85ff, #5f4bff);
	color: #fff;
	box-shadow: 0 16px 38px rgba(46, 133, 255, 0.32);
	cursor: pointer;
}

.floating-word-button {
	position: absolute;
	right: 6px;
	bottom: 68px;
	width: 44px;
	height: 44px;
	display: inline-grid;
	place-items: center;
	border: 1px solid rgba(45, 212, 191, .5);
	border-radius: 50%;
	background: linear-gradient(145deg, #14b8a6, #2e85ff);
	color: #fff;
	box-shadow: 0 14px 34px rgba(20, 184, 166, .28);
	font-size: 26px;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

.floating-chat-button svg {
	width: 25px;
	height: 25px;
}

.floating-chat-panel,
.floating-word-panel {
	position: absolute;
	right: 0;
	bottom: 68px;
	width: min(390px, calc(100vw - 28px));
	height: min(640px, calc(100vh - 112px));
	max-height: calc(100vh - 112px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(110, 127, 168, 0.34);
	border-radius: 18px;
	background: rgba(11, 17, 31, 0.98);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.floating-word-panel {
	bottom: 120px;
	height: auto;
	max-height: min(560px, calc(100vh - 148px));
}

.floating-chat-head {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 18px 12px;
	border-bottom: 1px solid rgba(110, 127, 168, 0.22);
}

.floating-chat-head h2 {
	margin: 0;
	color: #fff;
	font-size: 22px;
	line-height: 1.3;
}

.floating-chat-head p,
.floating-chat-muted {
	margin: 4px 0 0;
	color: #aab5ca;
	font-size: 14px;
	line-height: 1.7;
}

.floating-chat-head button {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.floating-chat-login {
	flex: 0 0 auto;
	margin: 12px 14px 0;
	padding: 14px;
	border: 1px solid rgba(110, 127, 168, 0.28);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.045);
}

.floating-chat-login p {
	margin: 0 0 12px;
	color: #d8e0f2;
	font-size: 14px;
	line-height: 1.7;
}

.floating-chat-messages {
	flex: 1 1 auto;
	min-height: 0;
	padding: 14px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.floating-chat-message {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	gap: 10px;
	margin-bottom: 12px;
}

.floating-chat-avatar {
	width: 38px;
	height: 38px;
	overflow: hidden;
	border-radius: 50%;
	background: #233150;
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 800;
}

.floating-chat-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.floating-chat-bubble {
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(110, 127, 168, 0.18);
	border-radius: 14px 4px 14px 14px;
	background: rgba(255, 255, 255, 0.055);
}

.floating-chat-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.floating-chat-author-wrap {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	min-width: 0;
}

.floating-chat-meta strong {
	min-width: 0;
	overflow: hidden;
	color: #fff;
	font-size: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.floating-chat-profile-link {
	color: inherit;
	text-decoration: none;
}

.floating-chat-profile-link:hover,
.floating-chat-profile-link:focus-visible {
	color: var(--accent-2);
	text-decoration: underline;
}

.floating-chat-membership-badge,
.floating-chat-level-badge {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(246, 180, 75, 0.42);
	background: rgba(246, 180, 75, 0.12);
	color: var(--accent-2);
	border-radius: 999px;
	padding: 1px 7px;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.5;
	white-space: nowrap;
}

.floating-chat-level-badge {
	border-color: var(--rank-color, rgba(74, 144, 245, 0.42));
	background: var(--rank-color, rgba(74, 144, 245, 0.14));
	color: #0a0a0a;
}

.floating-chat-meta time,
.floating-chat-bubble small {
	color: #7f8ba5;
	font-size: 11px;
}

.floating-chat-bubble p {
	margin: 0;
	color: #dfe6f6;
	font-size: 14px;
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.floating-chat-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 9px;
}

.floating-chat-actions button {
	border: 1px solid rgba(94, 152, 255, 0.24);
	border-radius: 999px;
	background: rgba(94, 152, 255, 0.09);
	color: #bcd6ff;
	padding: 4px 10px;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.5;
	cursor: pointer;
}

.floating-chat-actions button.is-liked {
	border-color: rgba(255, 199, 87, 0.42);
	background: rgba(255, 199, 87, 0.12);
	color: #ffd782;
}

.floating-chat-more {
	flex: 0 0 auto;
	justify-self: center;
	align-self: center;
	margin: 10px 14px 0;
	padding: 6px 14px;
	border: 1px solid rgba(94, 152, 255, 0.38);
	border-radius: 999px;
	background: rgba(46, 133, 255, 0.12);
	color: #bcd6ff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
	cursor: pointer;
}

.floating-chat-form {
	align-self: stretch;
	flex: 0 0 auto;
	margin-top: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px 14px;
	border-top: 1px solid rgba(110, 127, 168, 0.22);
}

.floating-chat-reply {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid rgba(94, 152, 255, 0.28);
	border-radius: 12px;
	background: rgba(94, 152, 255, 0.1);
	color: #dce9ff;
	font-size: 13px;
}

.floating-chat-reply span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.floating-chat-reply button {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
}

.floating-chat-form textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	max-height: 110px;
	resize: none;
	border: 1px solid rgba(110, 127, 168, 0.32);
	border-radius: 12px;
	background: rgba(4, 8, 20, 0.9);
	color: #fff;
	padding: 9px 12px;
	font: inherit;
	line-height: 1.6;
}

.floating-chat-form button {
	align-self: end;
	min-height: 46px;
	border: 0;
	border-radius: 12px;
	background: #2e85ff;
	color: #fff;
	padding: 0 16px;
	font-weight: 800;
	cursor: pointer;
}

.floating-chat-form.is-sending {
	opacity: 0.72;
	pointer-events: none;
}

.floating-word-form {
	grid-template-columns: 1fr;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(110, 127, 168, 0.22);
}

.floating-word-form input {
	background: rgba(4, 8, 20, .9);
	color: #fff;
}

.floating-word-list {
	display: grid;
	gap: 10px;
	max-height: 300px;
	padding: 12px 14px;
	overflow-y: auto;
}

.floating-word-list .word-item {
	display: grid;
	grid-template-columns: 1fr;
	align-items: start;
	background: rgba(255, 255, 255, .055);
}

.floating-word-link {
	display: block;
	margin: 0 14px 14px;
	padding: 10px 12px;
	border: 1px solid rgba(94, 152, 255, .3);
	border-radius: 10px;
	color: #bcd6ff;
	text-align: center;
	text-decoration: none;
	font-weight: 800;
}

:root[data-theme="light"] .floating-chat-panel,
:root[data-theme="light"] .floating-word-panel {
	background: rgba(255, 255, 255, 0.98);
	color: #111827;
}

:root[data-theme="light"] .floating-chat-head h2,
:root[data-theme="light"] .floating-chat-meta strong,
:root[data-theme="light"] .floating-chat-bubble p,
:root[data-theme="light"] .floating-chat-form textarea,
:root[data-theme="light"] .floating-word-form input {
	color: #111827;
}

:root[data-theme="light"] .floating-chat-bubble,
:root[data-theme="light"] .floating-chat-login {
	background: #f5f7fc;
}

:root[data-theme="light"] .floating-chat-reply,
:root[data-theme="light"] .floating-chat-actions button {
	color: #24538f;
}

:root[data-theme="light"] .floating-chat-form textarea {
	background: #fff;
}

:root[data-theme="light"] .floating-word-form input {
	background: #fff;
}

@media (max-width: 640px) {
	html.has-floating-chat-open,
	body.has-floating-chat-open {
		height: 100%;
		overflow: hidden;
		overscroll-behavior: none;
	}

	.floating-chat {
		right: max(14px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
	}

	.floating-chat-panel {
		position: fixed;
		inset-inline: 0;
		top: max(122px, env(safe-area-inset-top));
		bottom: 0;
		height: calc(100vh - max(122px, env(safe-area-inset-top)));
		height: calc(100dvh - max(122px, env(safe-area-inset-top)));
		width: auto;
		max-height: none;
		display: flex;
		flex-direction: column;
		border-inline: 0;
		border-bottom: 0;
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -22px 70px rgba(0, 0, 0, 0.54);
	}

	.floating-chat-head {
		padding: 18px 16px 12px;
		background: linear-gradient(135deg, rgba(61, 119, 255, 0.32), rgba(26, 35, 58, 0.98));
	}

	.floating-chat-head::before {
		content: "";
		position: absolute;
		top: 9px;
		left: 50%;
		width: 46px;
		height: 5px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.38);
		transform: translateX(-50%);
	}

	.floating-chat-head h2 {
		font-size: 20px;
	}

	.floating-chat-messages {
		flex: 1 1 auto;
		min-height: 0;
		padding: 12px 14px;
	}

	.floating-chat-form {
		flex: 0 0 auto;
		margin-top: auto;
		grid-template-columns: 1fr;
		padding-bottom: max(14px, env(safe-area-inset-bottom));
	}

	.floating-chat-form button {
		width: 100%;
	}
}
.members-page { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.members-level-bands { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.members-level-bands a { flex: none; min-width: 58px; padding: 8px 10px; border: 1px solid var(--border-color, #d7dbe0); border-radius: 6px; color: inherit; text-align: center; text-decoration: none; }
.members-level-bands a[aria-current="page"] { background: #2877c7; border-color: #2877c7; color: #fff; font-weight: 700; }
.social-page, .social-chat-page { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.social-tabs { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 14px; }
.social-tabs a { flex: none; color: inherit; text-decoration: none; border-bottom: 2px solid #2877c7; padding: 6px 2px; }
.social-section { padding: 12px 0 24px; border-top: 1px solid var(--border-color, #d7dbe0); }
.social-section h2 { font-size: 1.1rem; margin: 4px 0 12px; }
.social-section h2 small { font-weight: 400; opacity: .7; }
.social-member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; border-bottom: 1px solid var(--border-color, #d7dbe0); }
.social-member-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.social-member-link img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.social-member-link span { min-width: 0; display: grid; gap: 2px; }
.social-member-link strong, .social-member-link small { overflow-wrap: anywhere; }
.social-member-actions { display: flex; align-items: center; flex: none; gap: 8px; }
.social-member-actions form { margin: 0; }
.social-presence::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: 5px; border-radius: 50%; background: #ae3333; }
.social-presence.online::before { background: #238a4e; }
.social-messages { display: grid; gap: 8px; margin: 16px 0; }
.social-message { max-width: 88%; justify-self: start; margin: 0; padding: 10px 12px; border: 1px solid var(--border-color, #d7dbe0); border-radius: 6px; overflow-wrap: anywhere; }
.social-message.mine { justify-self: end; background: #e6f2ff; color: #10283d; }
.social-message time { display: block; margin-top: 4px; font-size: .75rem; opacity: .65; }
.social-compose { display: grid; gap: 8px; }
.social-compose textarea { width: 100%; resize: vertical; }
.social-compose div { display: flex; justify-content: space-between; align-items: center; }
.social-refresh { display: inline-block; margin-top: 14px; }
.member-social-actions { margin: 12px 0; }
.members-list { display: grid; }
.member-row { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 4px; border-bottom: 1px solid var(--border-color, #d7dbe0); color: inherit; text-decoration: none; }
.member-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.member-row span { display: grid; gap: 3px; min-width: 0; }
.member-row strong, .member-row small { overflow-wrap: anywhere; }
.member-row small { opacity: .72; }
#members-more { margin: 20px auto 0; display: block; }
#members-more[hidden] { display: none; }
.battle-strategy-page { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.battle-strategy-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--border-color, #d7dbe0); }
.battle-strategy-row input, .battle-strategy-row select { width: 100%; min-width: 0; }
@media (max-width: 520px) { .battle-strategy-row { grid-template-columns: 1fr; } }
