:root {
	color-scheme: dark;
	--bg: #0d141b;
	--panel: #17212b;
	--panel-strong: #202d38;
	--panel-soft: #101820;
	--line: #2e4050;
	--line-strong: #5b7388;
	--text: #f4efe6;
	--muted: #a9b4bd;
	--red: #cf5143;
	--blue: #66c0f4;
	--green: #79bf6a;
	--gold: #d7aa58;
	--shadow: rgba(0, 0, 0, 0.34);
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	min-height: 100%;
}

body {
	min-height: 100%;
	margin: 0;
	background:
		linear-gradient(180deg, rgba(102, 192, 244, 0.08), rgba(13, 20, 27, 0) 260px),
		linear-gradient(135deg, rgba(215, 170, 88, 0.055), rgba(207, 81, 67, 0) 42%),
		var(--bg);
	color: var(--text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	letter-spacing: 0;
	overflow-x: hidden;
}

button,
input,
select {
	font: inherit;
	letter-spacing: 0;
}

button,
a,
select {
	-webkit-tap-highlight-color: transparent;
}

a {
	color: inherit;
}

.app-shell {
	width: min(1320px, calc(100% - 40px));
	margin: 0 auto;
	padding: 24px 0 40px;
}

.topbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	margin-bottom: 22px;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background:
		linear-gradient(90deg, rgba(102, 192, 244, 0.1), rgba(215, 170, 88, 0.06)),
		var(--panel);
	box-shadow: 0 18px 50px var(--shadow);
}

.brand-block,
.panel-title > div,
.modal-title {
	min-width: 0;
}

.eyebrow {
	margin: 0 0 5px;
	color: var(--gold);
	font-size: 0.74rem;
	font-weight: 800;
	text-transform: uppercase;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 0;
	font-size: 2.15rem;
	line-height: 1;
}

h2 {
	margin-bottom: 0;
	font-size: 1.18rem;
	line-height: 1.2;
}

h3 {
	margin-bottom: 0;
	font-size: 0.98rem;
	line-height: 1.25;
}

.auth-panel {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
}

.auth-user {
	display: grid;
	gap: 2px;
	min-width: 0;
	text-align: right;
}

.auth-user span {
	color: var(--muted);
	font-size: 0.78rem;
}

.auth-user strong {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 390px;
	gap: 20px;
	align-items: start;
}

.view-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.app-page[hidden] {
	display: none;
}

.content-column {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.admin-panel,
.analytics-panel,
.player-card,
.player-modal,
.message-modal {
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	box-shadow: 0 16px 40px var(--shadow);
}

.admin-panel,
.analytics-panel {
	padding: 16px;
}

.analytics-panel {
	position: sticky;
	top: 16px;
}

.panel-title,
.list-header,
.chart-title,
.modal-head,
.message-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.list-header {
	padding: 4px 2px 0;
}

.list-tools {
	display: grid;
	grid-template-columns: minmax(220px, 260px) minmax(190px, 240px) minmax(220px, 1fr) 190px;
	gap: 10px;
}

.admin-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	margin-top: 14px;
}

.field-control {
	width: 100%;
	min-width: 0;
	height: 42px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-soft);
	color: var(--text);
	padding: 0 12px;
	outline: none;
}

.field-control:focus {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(214, 173, 85, 0.16);
}

.primary-action,
.ghost-action,
.icon-action,
.chart-tab,
.view-tab,
.player-links a,
.player-links button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 0 12px;
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}

.primary-action {
	border-color: #a88336;
	background: linear-gradient(180deg, #e5bd67, var(--gold));
	color: #15120d;
	font-weight: 800;
}

.ghost-action,
.chart-tab,
.view-tab,
.player-links a,
.player-links button {
	background: var(--panel-soft);
}

.primary-action:hover,
.ghost-action:hover,
.chart-tab:hover,
.view-tab:hover,
.player-links a:hover,
.player-links button:hover,
.icon-action:hover {
	filter: brightness(1.08);
}

.view-tab {
	min-width: 128px;
	font-weight: 800;
}

.view-tab.active {
	border-color: var(--blue);
	background: rgba(102, 192, 244, 0.13);
	color: var(--blue);
}

.range-control,
.scope-switch {
	display: inline-grid;
	grid-template-columns: repeat(3, minmax(72px, 1fr));
	gap: 6px;
	min-width: min(310px, 100%);
}

.scope-switch {
	grid-template-columns: repeat(2, minmax(94px, 1fr));
}

.range-btn,
.scope-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel-soft);
	color: var(--text);
	font-weight: 800;
	cursor: pointer;
}

.range-btn.active,
.scope-btn.active {
	border-color: var(--gold);
	background: rgba(214, 173, 85, 0.14);
	color: var(--gold);
}

.account-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	border: 1px solid rgba(215, 170, 88, 0.34);
	border-radius: 8px;
	background:
		linear-gradient(90deg, rgba(215, 170, 88, 0.12), rgba(102, 192, 244, 0.08)),
		var(--panel-soft);
	padding: 12px 14px;
}

.account-summary-main {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.account-summary-avatar {
	width: 42px;
	height: 42px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background: #080d12;
	object-fit: cover;
}

.account-summary-main span,
.account-summary-stats span {
	color: var(--muted);
	font-size: 0.78rem;
}

.account-summary-main strong {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.account-summary-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	font-weight: 800;
}

.account-summary-stats .is-positive,
.account-summary-stats .is-positive strong {
	color: var(--green);
}

.account-summary-stats .is-negative,
.account-summary-stats .is-negative strong {
	color: var(--red);
}

.state-pill,
.role-chip {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0 10px;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	white-space: nowrap;
}

.role-chip {
	border-color: rgba(105, 193, 132, 0.45);
	color: var(--green);
}

.player-list {
	display: grid;
	gap: 12px;
}

.player-card {
	display: grid;
	grid-template-columns: minmax(260px, 1.15fr) 96px minmax(230px, 1fr) 96px;
	gap: 14px;
	align-items: center;
	min-height: 112px;
	padding: 14px;
	border-left-width: 4px;
	transition: transform 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.player-card.account-mode {
	grid-template-columns: minmax(260px, 1.2fr) minmax(230px, 0.8fr);
}

.player-card.is-positive {
	border-left-color: var(--green);
}

.player-card.is-negative {
	border-left-color: var(--red);
}

.player-card.is-neutral {
	border-left-color: var(--gold);
}

.player-card.saved {
	border-color: var(--gold);
	animation: rowSaved 0.55s ease;
}

.player-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.steam-avatar,
.modal-avatar {
	flex: 0 0 auto;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background: #090909;
	object-fit: cover;
}

.steam-avatar {
	width: 64px;
	height: 64px;
}

.player-copy {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.nickname {
	display: block;
	overflow: hidden;
	color: var(--text);
	font-size: 1.02rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.player-id {
	color: var(--muted);
	font-size: 0.8rem;
	overflow-wrap: anywhere;
}

.player-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.player-links a,
.player-links button {
	min-height: 29px;
	padding: 0 9px;
	font-size: 0.78rem;
}

.remove-form {
	margin: 0;
}

.danger-link {
	color: var(--red) !important;
}

.vote-btn {
	position: relative;
	width: 96px;
	height: 66px;
	border: 1px solid #080807;
	border-radius: 8px;
	background-color: #f4efe7;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.34), 0 10px 22px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.vote-btn span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.vote-btn.minus {
	background-image: url("/assets/rdr-minus.jpg");
}

.vote-btn.plus {
	background-image: url("/assets/rdr-plus.jpg");
}

.vote-btn:hover {
	filter: contrast(1.08) saturate(1.08);
	transform: translateY(-1px);
}

.vote-btn:active {
	transform: translateY(1px) scale(0.97);
}

.vote-btn.selected {
	border-color: var(--gold);
	box-shadow: inset 0 0 0 4px rgba(214, 173, 85, 0.9), 0 10px 22px rgba(0, 0, 0, 0.28);
}

.vote-btn.cooldown,
.vote-btn:disabled {
	cursor: not-allowed;
	filter: grayscale(0.85) contrast(0.9);
	opacity: 0.58;
}

.vote-btn.vote-kick {
	animation: voteKick 0.48s ease;
}

.score-panel {
	display: grid;
	gap: 9px;
	min-width: 0;
}

.score-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 24px;
	color: var(--muted);
	font-size: 0.82rem;
}

.score-value {
	color: var(--text);
	font-size: 1.12rem;
}

.score-counts {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	min-height: 22px;
}

.score-count {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--panel-soft);
	padding: 0 8px;
	font-size: 0.76rem;
	font-weight: 800;
}

.score-count.plus {
	color: var(--green);
}

.score-count.minus {
	color: var(--red);
}

.score-value.is-positive,
.score-thumb.is-positive,
.modal-stats strong.is-positive,
.ranking-balance.is-positive,
.admin-row-score strong.is-positive,
.metric-grid strong.is-positive,
.voter-stat.balance.is-positive,
.detail-list strong.is-positive,
.pinned-vote-score.is-positive {
	color: var(--green);
}

.score-value.is-negative,
.score-thumb.is-negative,
.modal-stats strong.is-negative,
.ranking-balance.is-negative,
.admin-row-score strong.is-negative,
.metric-grid strong.is-negative,
.voter-stat.balance.is-negative,
.detail-list strong.is-negative,
.pinned-vote-score.is-negative {
	color: var(--red);
}

.account-vote-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 30px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--panel);
	padding: 0 12px;
	font-size: 0.82rem;
	font-weight: 900;
}

.account-vote-badge.plus {
	border-color: rgba(121, 191, 106, 0.45);
	color: var(--green);
}

.account-vote-badge.minus {
	border-color: rgba(207, 81, 67, 0.5);
	color: var(--red);
}

.account-vote-badge.neutral {
	border-color: rgba(215, 170, 88, 0.48);
	color: var(--gold);
}

.score-track {
	position: relative;
	width: 100%;
	height: 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(224, 95, 84, 0.72), rgba(214, 173, 85, 0.55), rgba(105, 193, 132, 0.72));
}

.score-track::after {
	position: absolute;
	inset: -5px auto -5px 50%;
	width: 1px;
	background: rgba(244, 239, 230, 0.38);
	content: "";
}

.score-thumb {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 30px;
	padding: 0 8px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: #11100f;
	color: var(--text);
	font-size: 0.86rem;
	font-weight: 800;
	transform: translate(-50%, -50%);
	transition: left 0.24s ease;
}

.score-thumb.pop {
	animation: thumbPop 0.45s ease;
}

.vote-status {
	min-height: 18px;
	color: var(--muted);
	font-size: 0.79rem;
	text-align: right;
}

.vote-status.ready {
	color: var(--green);
}

.vote-status.cooldown {
	color: var(--gold);
}

.metric-strip {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin: 16px 0;
	padding: 14px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.metric-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1px;
	margin: 16px 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--line);
}

.metric-grid div {
	display: grid;
	gap: 6px;
	min-width: 0;
	background: var(--panel-soft);
	padding: 14px;
}

.metric-strip div {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.metric-strip span,
.metric-grid span,
.chart-title span,
.modal-stats span {
	color: var(--muted);
	font-size: 0.78rem;
}

.metric-strip strong,
.metric-grid strong {
	overflow: hidden;
	font-size: 1.25rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chart-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}

.chart-tab {
	width: 100%;
	font-weight: 800;
}

.chart-tab.active {
	border-color: var(--gold);
	background: rgba(214, 173, 85, 0.14);
	color: var(--gold);
}

.chart-view[hidden] {
	display: none;
}

canvas {
	display: block;
	width: 100%;
	height: 238px;
}

.analytics-page-panel,
.admin-page-panel {
	position: static;
}

.analytics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.analytics-grid-wide {
	grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
	align-items: start;
}

.analytics-grid-single {
	grid-template-columns: 1fr;
}

.trend-block canvas {
	height: 280px;
}

.analytics-grid-wide > .analysis-block:only-child {
	grid-column: 1 / -1;
}

.analysis-block,
.modal-detail-panel {
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel-soft);
	padding: 14px;
}

.ranking-table {
	display: grid;
	gap: 8px;
	margin-top: 12px;
}

.ranking-row {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 84px 96px;
	gap: 10px;
	align-items: center;
	min-height: 48px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: inherit;
	padding: 8px 10px;
	text-align: left;
	cursor: pointer;
}

.ranking-row:hover {
	border-color: var(--line-strong);
	filter: brightness(1.04);
}

.ranking-place {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--gold);
	font-weight: 800;
}

.ranking-name {
	overflow: hidden;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ranking-meta {
	color: var(--muted);
	font-size: 0.78rem;
}

.ranking-balance,
.ranking-rate,
.admin-row-score strong {
	font-weight: 800;
	text-align: right;
}

.global-history-list {
	max-height: 410px;
}

.pinned-voter-panel .field-control {
	margin-top: 12px;
}

.pinned-voter-breakdown {
	display: grid;
	gap: 8px;
	margin-top: 12px;
}

.pinned-voter-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	padding: 10px;
}

.pinned-voter-summary span {
	color: var(--muted);
	font-size: 0.82rem;
}

.pinned-vote-row {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) 74px;
	gap: 10px;
	align-items: center;
	min-height: 50px;
	border: 1px solid var(--line);
	border-left-width: 4px;
	border-radius: 8px;
	background: var(--panel);
	color: inherit;
	padding: 8px 10px;
	text-align: left;
	cursor: pointer;
}

.pinned-vote-row.is-positive {
	border-left-color: var(--green);
}

.pinned-vote-row.is-negative {
	border-left-color: var(--red);
}

.pinned-vote-row:hover {
	border-color: var(--line-strong);
	filter: brightness(1.04);
}

.pinned-vote-row img {
	width: 36px;
	height: 36px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	object-fit: cover;
}

.pinned-vote-row div {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.pinned-vote-row div strong,
.pinned-vote-row div span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pinned-vote-row div span {
	color: var(--muted);
	font-size: 0.78rem;
}

.pinned-vote-score {
	text-align: right;
}

.admin-layout {
	display: grid;
	gap: 16px;
}

.admin-player-list {
	display: grid;
	gap: 10px;
	margin-top: 14px;
}

.deleted-player-table {
	display: grid;
	gap: 10px;
	margin-top: 14px;
}

.admin-player-row,
.deleted-player-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 96px minmax(300px, auto);
	gap: 14px;
	align-items: center;
	border: 1px solid var(--line);
	border-left-width: 4px;
	border-radius: 8px;
	background: var(--panel-soft);
	padding: 12px;
}

.deleted-player-row {
	grid-template-columns: minmax(0, 1fr) auto;
	border-left-color: var(--red);
}

.admin-player-row.is-positive {
	border-left-color: var(--green);
}

.admin-player-row.is-negative {
	border-left-color: var(--red);
}

.admin-player-row.is-neutral {
	border-left-color: var(--gold);
}

.admin-row-score {
	display: grid;
	gap: 4px;
	color: var(--muted);
	font-size: 0.78rem;
	text-align: right;
}

.admin-row-score strong {
	font-size: 1.12rem;
}

.danger-action {
	border-color: rgba(224, 95, 84, 0.5);
	color: var(--red);
}

.danger-zone {
	border-color: rgba(224, 95, 84, 0.5);
}

.danger-pill {
	border-color: rgba(224, 95, 84, 0.5);
	color: var(--red);
}

.danger-form {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) auto;
	gap: 10px;
	margin-top: 14px;
}

.admin-actions {
	display: grid;
	gap: 8px;
}

.admin-actions .remove-form {
	display: grid;
	grid-template-columns: minmax(130px, 1fr) auto;
	gap: 8px;
	align-items: center;
}

.admin-actions .remove-form:last-child {
	grid-template-columns: 1fr;
	justify-items: end;
}

.compact-field {
	height: 36px;
	padding-inline: 9px;
}

.empty-state {
	margin: 0;
	border: 1px dashed var(--line);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.025);
	color: var(--muted);
	padding: 18px;
}

.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 30;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(0, 0, 0, 0.72);
}

.modal-backdrop.open {
	display: flex;
}

.player-modal {
	width: min(1120px, 100%);
	max-height: min(860px, calc(100vh - 36px));
	overflow: auto;
	padding: 18px;
}

.modal-head {
	align-items: center;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
}

.modal-avatar {
	width: 72px;
	height: 72px;
}

.modal-range-row {
	display: flex;
	justify-content: flex-end;
	margin: 14px 0 0;
}

.icon-action {
	width: 38px;
	height: 38px;
	padding: 0;
	background: var(--panel-soft);
	font-size: 1.35rem;
	line-height: 1;
}

.modal-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin: 16px 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--line);
}

.modal-stats div {
	display: grid;
	gap: 8px;
	min-width: 0;
	background: var(--panel-soft);
	padding: 13px;
}

.modal-stats strong {
	font-size: 1.3rem;
}

.modal-insight-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
	gap: 14px;
	margin-bottom: 16px;
}

.modal-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 310px;
	gap: 16px;
	align-items: start;
}

.modal-chart,
.modal-history-block,
.modal-detail-panel {
	min-width: 0;
}

.ratio-stack {
	display: grid;
	gap: 14px;
	margin-top: 14px;
}

.ratio-row {
	display: grid;
	gap: 7px;
}

.ratio-line {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	color: var(--muted);
	font-size: 0.82rem;
}

.ratio-line strong {
	color: var(--text);
}

.ratio-track {
	display: flex;
	width: 100%;
	height: 14px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--panel);
}

.ratio-track span {
	display: block;
	width: 0;
	min-width: 0;
	transition: width 0.2s ease;
}

.ratio-plus {
	background: var(--green);
}

.ratio-minus {
	background: var(--red);
}

.detail-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin-top: 14px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--line);
}

.detail-list div {
	display: grid;
	gap: 6px;
	min-width: 0;
	background: var(--panel);
	padding: 12px;
}

.detail-list span {
	color: var(--muted);
	font-size: 0.78rem;
}

.detail-list strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.modal-voter-panel {
	margin-bottom: 16px;
}

.voter-breakdown {
	display: grid;
	gap: 8px;
	margin-top: 12px;
}

.voter-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 64px 64px 72px;
	gap: 10px;
	align-items: center;
	min-height: 42px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	padding: 8px 10px;
}

.voter-name {
	overflow: hidden;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.voter-stat {
	color: var(--muted);
	font-size: 0.82rem;
	text-align: right;
}

.voter-stat.plus {
	color: var(--green);
}

.voter-stat.minus {
	color: var(--red);
}

.voter-stat.balance {
	color: var(--text);
	font-weight: 800;
}

.history-list {
	display: grid;
	gap: 9px;
	max-height: 290px;
	margin: 12px 0 0;
	padding: 0;
	overflow: auto;
	list-style: none;
}

.history-item {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	min-height: 48px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel-soft);
	padding: 8px;
}

.history-score {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	border-radius: 999px;
	background: var(--panel);
	font-weight: 800;
}

.history-score.plus {
	color: var(--green);
}

.history-score.minus {
	color: var(--red);
}

.history-main {
	overflow: hidden;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.history-meta {
	margin-top: 2px;
	color: var(--muted);
	font-size: 0.78rem;
}

.message-modal {
	width: min(440px, 100%);
	padding: 18px;
}

.message-text {
	margin: 12px 0 0;
	color: var(--muted);
	line-height: 1.5;
}

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

:focus-visible {
	outline: 3px solid rgba(214, 173, 85, 0.45);
	outline-offset: 2px;
}

@keyframes voteKick {
	0% { transform: translateY(0) scale(1); }
	35% { transform: translateY(4px) scale(0.94); }
	70% { transform: translateY(-3px) scale(1.03); }
	100% { transform: translateY(0) scale(1); }
}

@keyframes thumbPop {
	0% { transform: translate(-50%, -50%) scale(1); }
	45% { transform: translate(-50%, -50%) scale(1.2); }
	100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes rowSaved {
	0% { transform: translateY(0); }
	35% { transform: translateY(-2px); }
	100% { transform: translateY(0); }
}

@media (max-width: 1080px) {
	.workspace {
		grid-template-columns: 1fr;
	}

	.analytics-panel {
		position: static;
	}

	.metric-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.analytics-grid,
	.analytics-grid-wide,
	.modal-insight-grid {
		grid-template-columns: 1fr;
	}

	.modal-body {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.app-shell {
		width: calc(100% - 24px);
		max-width: 1320px;
		padding-top: 12px;
	}

	.topbar,
	.panel-title,
	.list-header,
	.auth-panel {
		align-items: stretch;
	}

	.topbar,
	.list-header {
		grid-template-columns: 1fr;
	}

	.topbar,
	.auth-panel,
	.panel-title,
	.list-header {
		display: grid;
	}

	.auth-user {
		text-align: left;
	}

	.auth-panel {
		justify-content: stretch;
	}

	.view-tab {
		flex: 1 1 130px;
	}

	.auth-panel .primary-action,
	.auth-panel .ghost-action {
		width: 100%;
	}

	.list-tools,
	.admin-form {
		grid-template-columns: 1fr;
	}

	.player-card {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.player-profile,
	.score-panel {
		grid-column: 1 / -1;
	}

	.vote-btn {
		width: 100%;
		min-width: 0;
	}

	.vote-status {
		text-align: left;
	}

	.metric-strip,
	.metric-grid,
	.modal-stats,
	.modal-body,
	.detail-list {
		grid-template-columns: 1fr;
	}

	.ranking-row {
		grid-template-columns: 38px minmax(0, 1fr) 74px;
	}

	.ranking-rate {
		display: none;
	}

	.range-control,
	.scope-switch {
		grid-template-columns: 1fr;
	}

	.account-summary {
		display: grid;
	}

	.account-summary-stats {
		justify-content: flex-start;
	}

	.voter-row {
		grid-template-columns: 1fr 48px 48px 56px;
	}

	.admin-player-row {
		grid-template-columns: 1fr;
	}

	.deleted-player-row {
		grid-template-columns: 1fr;
	}

	.danger-form,
	.admin-actions .remove-form,
	.admin-actions .remove-form:last-child {
		grid-template-columns: 1fr;
		justify-items: stretch;
	}

	.admin-row-score {
		text-align: left;
	}

	.modal-head {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.modal-range-row {
		justify-content: stretch;
	}
}

@media (max-width: 480px) {
	h1 {
		font-size: 1.75rem;
	}

	.steam-avatar {
		width: 56px;
		height: 56px;
	}

	.player-links a,
	.player-links button {
		flex: 1 1 auto;
	}

	.modal-backdrop {
		padding: 10px;
	}

	.player-modal,
	.message-modal {
		padding: 14px;
	}
}
