.bsz-wrap {
	--bsz-bg: #07130f;
	--bsz-panel: #0d281c;
	--bsz-panel-soft: #123323;
	--bsz-border: rgba(116, 154, 118, 0.34);
	--bsz-border-strong: rgba(224, 183, 92, 0.58);
	--bsz-text: #ffffff;
	--bsz-muted: #c8d8cf;
	--bsz-gold: #e0b75c;
	--bsz-gold-soft: rgba(224, 183, 92, 0.14);
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: clamp(18px, 3vw, 30px);
	border: 1px solid var(--bsz-border);
	border-radius: 8px;
	background:
		linear-gradient(135deg, rgba(224, 183, 92, 0.08), transparent 34%),
		linear-gradient(180deg, var(--bsz-panel), var(--bsz-bg));
	color: var(--bsz-text);
	font-family: inherit;
}

.bsz-wrap *,
.bsz-wrap *::before,
.bsz-wrap *::after {
	box-sizing: inherit;
}

.bsz-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: start;
	margin-bottom: 18px;
}

.bsz-eyebrow {
	margin: 0 0 8px;
	color: var(--bsz-gold);
	font-size: 13px;
	font-weight: 850;
	line-height: 1.2;
	text-transform: uppercase;
}

.bsz-head h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.05;
	letter-spacing: 0;
}

.bsz-mode,
.bsz-board-tools,
.bsz-card-actions,
.bsz-challenge-form,
.bsz-game-row div {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.bsz-mode button,
.bsz-board-tools button,
.bsz-challenge-form button,
.bsz-game-row button {
	min-height: 40px;
	padding: 9px 13px;
	border: 1px solid rgba(224, 183, 92, 0.44);
	border-radius: 8px;
	background: var(--bsz-gold-soft);
	color: var(--bsz-gold);
	font: inherit;
	font-size: 15px;
	font-weight: 850;
	line-height: 1;
	cursor: pointer;
}

.bsz-mode button:hover,
.bsz-mode button:focus-visible,
.bsz-mode button.is-active,
.bsz-board-tools button:hover,
.bsz-board-tools button:focus-visible,
.bsz-challenge-form button:hover,
.bsz-challenge-form button:focus-visible,
.bsz-game-row button:hover,
.bsz-game-row button:focus-visible {
	border-color: rgba(224, 183, 92, 0.84);
	background: rgba(224, 183, 92, 0.23);
	outline: none;
}

.bsz-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	min-width: 0;
}

.bsz-board-panel,
.bsz-side,
.bsz-history-panel {
	min-width: 0;
	max-width: 100%;
}

.bsz-side {
	grid-row: 1;
}

.bsz-board-panel {
	grid-row: 2;
}

.bsz-board-panel,
.bsz-side,
.bsz-history-panel,
.bsz-game-setup,
.bsz-status,
.bsz-game-row,
.bsz-notice {
	border: 1px solid var(--bsz-border);
	border-radius: 8px;
	background: rgba(5, 19, 13, 0.68);
}

.bsz-board-panel,
.bsz-side,
.bsz-history-panel,
.bsz-game-setup {
	padding: 14px;
}

.bsz-history-panel {
	grid-row: 3;
}

.bsz-board-tools {
	width: min(100%, 722px);
	margin-right: auto;
	margin-left: auto;
	justify-content: space-between;
	margin-bottom: 14px;
}

.bsz-board-panel > .bsz-clocks {
	width: min(100%, 722px);
	margin: 0 auto 8px;
}

.bsz-board-tools label,
.bsz-challenge-form {
	display: flex;
	gap: 8px;
	align-items: center;
}

.bsz-board-tools label span {
	color: var(--bsz-gold);
	font-size: 13px;
	font-weight: 850;
	text-transform: uppercase;
}

.bsz-board-tools select,
.bsz-challenge-form select {
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid rgba(116, 154, 118, 0.42);
	border-radius: 8px;
	background: #06120d;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 650;
}

.bsz-board-frame {
	position: relative;
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr) 22px;
	width: min(100%, 722px);
	width: min(100%, 722px, calc(100dvh - 128px));
	max-width: 100%;
	margin: 0 auto;
}

.bsz-board-workspace {
	display: grid;
	grid-template-columns: minmax(0, 722px) 38px 54px;
	gap: 8px;
	align-items: stretch;
	justify-content: center;
	width: min(100%, 830px);
	margin: 0 auto;
}

.bsz-board-workspace .bsz-board-frame {
	width: 100%;
	margin: 0;
}

.bsz-board-sidebar {
	display: grid;
	grid-column: 3;
	gap: 10px;
	min-width: 0;
	margin-bottom: 22px;
}

.bsz-wrap.is-analysis-eval .bsz-board-sidebar {
	grid-template-rows: minmax(0, 1fr) auto;
}

.bsz-eval-bar {
	position: relative;
	display: block;
	grid-column: 2;
	grid-row: 1;
	align-self: stretch;
	width: 38px;
	height: auto;
	min-height: 0;
	margin: 0 0 22px;
	overflow: hidden;
	border: 1px solid rgba(224, 183, 92, 0.5);
	border-radius: 8px;
	background: #111;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.bsz-eval-bar[hidden] { display: none !important; }

.bsz-eval-white {
	position: absolute;
	top: auto;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: 50%;
	background: #f2f0e8;
	transition: height 240ms ease;
}

.bsz-eval-bar strong {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	padding: 4px 8px;
	border-radius: 4px;
	background: rgba(4, 12, 8, 0.82);
	color: #fff;
	font: 800 12px/1.1 Consolas, monospace;
	transform: translate(-50%, -50%);
	writing-mode: horizontal-tb;
	text-orientation: mixed;
	white-space: nowrap;
}

.bsz-eval-bar.is-white-ahead strong { background: rgba(245, 243, 235, 0.9); color: #111; }

.bsz-eval-black-label,
.bsz-eval-white-label {
	position: absolute;
	left: 50%;
	z-index: 2;
	font-size: 12px;
	font-weight: 900;
	transform: translateX(-50%);
}

.bsz-eval-black-label { top: 8px; color: #fff; }
.bsz-eval-white-label { top: auto; bottom: 8px; color: #111; }

.bsz-game-action-icons {
	display: grid;
	gap: 8px;
}

.bsz-game-action-icons[hidden],
.bsz-game-action-icons button[hidden],
.bsz-promotion-picker[hidden] {
	display: none !important;
}

.bsz-game-action-icons button {
	display: grid;
	place-items: center;
	width: 46px;
	min-width: 46px;
	height: 46px;
	min-height: 46px;
	padding: 0;
	border-radius: 10px;
	font-size: 24px;
	line-height: 1;
}

.bsz-game-action-icons button.is-alert {
	border-color: #e5bd59;
	box-shadow: 0 0 0 3px rgba(229, 189, 89, 0.18);
}

.bsz-analysis-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 14px auto 4px;
}

.bsz-analysis-navigation[hidden] {
	display: none !important;
}

.bsz-analysis-navigation button {
	display: grid;
	place-items: center;
	width: 54px;
	min-width: 54px;
	height: 46px;
	min-height: 46px;
	padding: 0;
	border-radius: 10px;
	font-size: 28px;
	line-height: 1;
}

.bsz-analysis-navigation button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.bsz-analysis-navigation span {
	min-width: 116px;
	color: var(--bsz-text);
	font-weight: 800;
	text-align: center;
}

.bsz-fullscreen-history {
	display: none;
}

.bsz-promotion-picker {
	display: grid;
	grid-column: 2;
	grid-row: 1;
	place-items: center;
	z-index: 20;
	padding: clamp(10px, 3vw, 28px);
	border-radius: 8px;
	background: rgba(1, 8, 5, 0.88);
	backdrop-filter: blur(4px);
}

.bsz-promotion-card {
	display: grid;
	gap: 12px;
	width: min(100%, 520px);
	padding: clamp(16px, 4vw, 28px);
	border: 1px solid var(--bsz-border-strong);
	border-radius: 14px;
	background: #071710;
	box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
	text-align: center;
}

.bsz-promotion-card h3,
.bsz-promotion-card p {
	margin: 0;
}

.bsz-promotion-choices {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.bsz-promotion-choices button {
	display: grid;
	gap: 5px;
	place-items: center;
	min-width: 0;
	padding: 9px 5px;
	border-radius: 10px;
}

.bsz-promotion-choices .bsz-piece {
	display: block;
	font-size: clamp(38px, 8vw, 68px);
	line-height: 1;
}

.bsz-promotion-choices small {
	font-size: 11px;
	font-weight: 800;
}

.bsz-promotion-cancel {
	justify-self: center;
}

.bsz-public-games {
	display: grid;
	gap: 14px;
	margin-top: 18px;
	padding: clamp(16px, 3vw, 24px);
	border: 1px solid rgba(116, 154, 118, 0.32);
	border-radius: 12px;
	background: #07170f;
}

.bsz-public-games header h3,
.bsz-public-games header p,
.bsz-public-game p,
.bsz-shortcode-note {
	margin: 0;
}

.bsz-public-games-list {
	display: grid;
	gap: 8px;
}

.bsz-archive-search {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) auto auto;
	gap: 10px;
	align-items: end;
}

.bsz-archive-search label {
	display: grid;
	gap: 6px;
}

.bsz-archive-search label span {
	color: var(--bsz-gold);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}

.bsz-archive-search input {
	width: 100%;
	min-width: 0;
}

.bsz-archive-reset,
.bsz-archive-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 9px 15px;
	border: 1px solid rgba(224, 183, 92, 0.52);
	border-radius: 9px;
	background: rgba(224, 183, 92, 0.12);
	color: var(--bsz-gold);
	font-weight: 800;
	text-decoration: none;
}

.bsz-archive-date {
	border: 1px solid rgba(116, 154, 118, 0.32);
	border-radius: 10px;
	background: #06150e;
	overflow: hidden;
}

.bsz-archive-date > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	color: #fff;
	cursor: pointer;
}

.bsz-archive-date > summary strong {
	color: var(--bsz-gold);
	font-size: 19px;
}

.bsz-archive-date > summary span {
	color: #b8ccc1;
	font-size: 13px;
	font-weight: 700;
}

.bsz-archive-date-content {
	display: grid;
	gap: 14px;
	padding: 0 14px 14px;
}

.bsz-archive-user-group {
	display: grid;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid rgba(224, 183, 92, 0.2);
}

.bsz-archive-user-group h4 {
	margin: 0;
	color: #eef5ef;
	font-size: 15px;
}

.bsz-public-game {
	border: 1px solid rgba(224, 183, 92, 0.25);
	border-radius: 9px;
	background: #041009;
}

.bsz-public-game summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 10px;
	align-items: center;
	padding: 12px 14px;
	cursor: pointer;
}

.bsz-public-game summary span {
	color: var(--bsz-gold);
	font-weight: 800;
}

.bsz-public-game summary time,
.bsz-shortcode-note {
	color: #acc1b6;
	font-size: 12px;
}

.bsz-public-game > div {
	display: grid;
	gap: 10px;
	padding: 0 14px 14px;
}

.bsz-archive-moves {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 5px 20px;
	margin: 0;
	padding-left: 24px;
}

.bsz-archive-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	padding-top: 4px;
}

.bsz-archive-actions form {
	margin: 0;
}

.bsz-archive-actions button {
	width: auto;
	min-width: 210px;
	padding: 10px 16px;
}

.bsz-archive-actions .bsz-delete-game {
	min-width: 140px;
	border-color: #a64942;
	background: rgba(155, 50, 45, 0.2);
	color: #ffaaa3;
}

.bsz-archive-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-top: 8px;
}

.bsz-archive-pagination span {
	color: #cfddd5;
	font-weight: 700;
}

.bsz-public-games:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.bsz-archive-search {
		grid-template-columns: 1fr;
	}
	.bsz-public-game summary {
		grid-template-columns: 1fr;
	}
	.bsz-archive-moves {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.bsz-archive-pagination {
		flex-wrap: wrap;
	}
}

.bsz-board {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	grid-column: 2;
	grid-row: 1;
	width: 100%;
	max-width: 100%;
	margin: 0;
	aspect-ratio: 1 / 1;
	container-type: inline-size;
	border: 1px solid rgba(224, 183, 92, 0.38);
	border-radius: 8px;
	overflow: hidden;
	background: #0b170f;
}

.bsz-analysis-arrows {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 22px !important;
	left: 22px !important;
	display: block;
	width: calc(100% - 22px) !important;
	height: calc(100% - 22px) !important;
	max-width: none !important;
	max-height: none !important;
	z-index: 30 !important;
	pointer-events: none;
	overflow: hidden;
}

.bsz-analysis-arrows[hidden] {
	display: none !important;
}

.bsz-analysis-arrows .bsz-analysis-arrow-line {
	fill: none;
	stroke-width: 16;
	stroke-linecap: round;
	opacity: 0.9;
}

.bsz-analysis-arrows .is-best { stroke: #39d98a; fill: #39d98a; opacity: 0.42; }
.bsz-analysis-arrows .is-played { stroke: #e0b75c; fill: #e0b75c; opacity: 0.68; }
.bsz-analysis-arrows .is-alternative { stroke: #79b7ff; fill: #79b7ff; opacity: 0.62; }

.bsz-board-panel.is-result-win .bsz-board {
	border: 4px solid #39c77a;
	box-shadow: 0 0 0 2px rgba(57, 199, 122, 0.24), 0 0 22px rgba(57, 199, 122, 0.3);
}

.bsz-board-panel.is-result-loss .bsz-board {
	border: 4px solid #d84a4a;
	box-shadow: 0 0 0 2px rgba(216, 74, 74, 0.24), 0 0 22px rgba(216, 74, 74, 0.3);
}

.bsz-board-panel.is-result-draw .bsz-board {
	border: 4px solid #d9b642;
	box-shadow: 0 0 0 2px rgba(217, 182, 66, 0.22), 0 0 20px rgba(217, 182, 66, 0.26);
}

.bsz-rank-labels,
.bsz-file-labels {
	color: rgba(238, 241, 235, 0.78);
	font-size: 12px;
	font-weight: 850;
	line-height: 1;
	text-transform: lowercase;
	user-select: none;
}

.bsz-rank-labels {
	display: grid;
	grid-column: 1;
	grid-row: 1;
	grid-template-rows: repeat(8, minmax(0, 1fr));
}

.bsz-file-labels {
	display: grid;
	grid-column: 2;
	grid-row: 2;
	grid-template-columns: repeat(8, minmax(0, 1fr));
}

.bsz-rank-labels span,
.bsz-file-labels span {
	display: grid;
	place-items: center;
}

.bsz-square {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 1 / 1;
	border: 0;
	padding: 0;
	color: #fff;
	cursor: pointer;
}

.bsz-square.is-light {
	background: #c9d3bf;
	color: #06120d;
}

.bsz-square.is-dark {
	background: #234a33;
	color: #fff;
}

.bsz-square span {
	position: relative;
	z-index: 1;
	font-size: clamp(28px, 6vw, 56px);
	font-size: clamp(22px, 9cqi, 56px);
	line-height: 1;
	text-shadow: 0 2px 7px rgba(0, 0, 0, 0.34);
}

.bsz-square .bsz-piece {
	font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
	font-weight: 400;
	filter: contrast(1.55);
	max-width: 100%;
}

.bsz-square .bsz-piece--white {
	color: #fff !important;
	-webkit-text-stroke: 1.15px #020202;
	text-shadow: 0 2px 4px #000, 0 0 2px #000, 0 0 7px rgba(255, 255, 255, 0.42);
}

.bsz-square .bsz-piece--black {
	color: #000 !important;
	-webkit-text-stroke: 0.55px #000;
	text-shadow: 0 0 1px #fff, 0 1px 2px rgba(255, 255, 255, 0.72), 0 2px 3px #000;
}

.bsz-square .bsz-move-quality {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 5px;
	border: 1px solid rgba(255, 255, 255, 0.62);
	border-radius: 999px;
	background: #243229;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
	text-shadow: none;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.48);
	pointer-events: none;
}

.bsz-move-quality.is-book { background: #76571d; color: #fff2bd; }
.bsz-move-quality.is-mega,
.bsz-move-quality.is-brilliant { background: #087e70; color: #fff; }
.bsz-move-quality.is-great { background: #247d5c; color: #fff; }
.bsz-move-quality.is-good { background: #176f3d; color: #fff; }
.bsz-move-quality.is-average { background: #59645d; color: #fff; }
.bsz-move-quality.is-inaccuracy { background: #9a6b13; color: #fff; }
.bsz-move-quality.is-bad,
.bsz-move-quality.is-blunder { background: #9f302f; color: #fff; }

.bsz-promotion-choices .bsz-piece--white {
	color: #fff !important;
	-webkit-text-stroke: 1.15px #020202;
	text-shadow: 0 2px 4px #000, 0 0 2px #000, 0 0 7px rgba(255, 255, 255, 0.42);
}

.bsz-promotion-choices .bsz-piece--black {
	color: #000 !important;
	-webkit-text-stroke: 0.55px #000;
	text-shadow: 0 0 1px #fff, 0 1px 2px rgba(255, 255, 255, 0.72), 0 2px 3px #000;
}

.bsz-engine-card--under-board {
	width: 100%;
	margin-top: 12px;
}

.bsz-engine-card--under-board + .bsz-status {
	margin-top: 10px;
}

.bsz-square .bsz-piece.is-opponent-animated {
	filter: drop-shadow(0 0 7px rgba(224, 183, 92, 0.72));
}

.bsz-square.is-last-from,
.bsz-square.is-last-to {
	box-shadow: inset 0 0 0 5px rgba(255, 209, 90, 0.92), inset 0 0 24px rgba(255, 209, 90, 0.34);
}

.bsz-square.is-premove-from,
.bsz-square.is-premove-to {
	box-shadow: inset 0 0 0 5px rgba(76, 180, 255, 0.88), inset 0 0 24px rgba(76, 180, 255, 0.28);
}

.bsz-square.is-premove-to::before {
	content: '';
	position: absolute;
	inset: 34%;
	z-index: 2;
	border: 3px solid rgba(203, 235, 255, 0.95);
	border-radius: 50%;
	background: rgba(76, 180, 255, 0.32);
	pointer-events: none;
}

.bsz-square.is-last-to {
	box-shadow: inset 0 0 0 5px #f4c84f, inset 0 0 34px rgba(244, 200, 79, 0.55);
}

.bsz-square.is-checked-king {
	background: #8f1717 !important;
	box-shadow: inset 0 0 0 5px #ff5b5b, inset 0 0 34px rgba(255, 0, 0, 0.72);
	animation: bsz-check-pulse 900ms ease-in-out infinite alternate;
}

@keyframes bsz-check-pulse {
	from { box-shadow: inset 0 0 0 5px #ff5b5b, inset 0 0 18px rgba(255, 0, 0, 0.48); }
	to { box-shadow: inset 0 0 0 6px #ff9a9a, inset 0 0 38px rgba(255, 0, 0, 0.86); }
}

.bsz-square.is-selected::after,
.bsz-square.is-target::after {
	content: "";
	position: absolute;
	inset: 7px;
	border: 3px solid var(--bsz-gold);
	border-radius: 999px;
	pointer-events: none;
}

.bsz-square.is-target::after {
	inset: 38%;
	border: 1px solid rgba(2, 12, 8, 0.48);
	background: rgba(248, 209, 95, 0.62);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38), 0 0 5px rgba(248, 209, 95, 0.34);
}

.bsz-square.is-target:has(.bsz-piece:not(:empty))::after {
	inset: 10px;
	border: 3px solid rgba(248, 209, 95, 0.72);
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(2, 12, 8, 0.5);
}

.bsz-side {
	display: grid;
	gap: 14px;
}

.bsz-wrap [hidden] {
	display: none !important;
}

.bsz-game-setup,
.bsz-setup-step,
.bsz-field,
.bsz-advanced-grid {
	display: grid;
	gap: 10px;
}

.bsz-field {
	min-width: 0;
}

.bsz-field > span,
.bsz-game-type-field > span,
.bsz-advanced-settings summary {
	color: var(--bsz-gold);
	font-size: 13px;
	font-weight: 850;
	text-transform: uppercase;
}

.bsz-game-type-field {
	display: grid;
	gap: 8px;
}

.bsz-game-type-buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.bsz-game-type-buttons button,
.bsz-board-screen-tools button {
	min-height: 46px;
	padding: 9px 14px;
	border: 1px solid rgba(116, 154, 118, 0.42);
	border-radius: 8px;
	background: #06120d;
	color: #fff;
	font: inherit;
	font-weight: 850;
	cursor: pointer;
}

.bsz-game-type-buttons button:hover,
.bsz-game-type-buttons button:focus-visible,
.bsz-game-type-buttons button.is-active,
.bsz-board-screen-tools button:hover,
.bsz-board-screen-tools button:focus-visible {
	border-color: rgba(224, 183, 92, 0.84);
	background: var(--bsz-gold-soft);
	color: var(--bsz-gold);
	outline: none;
}

.bsz-game-type-buttons button:disabled {
	cursor: not-allowed;
	opacity: 0.48;
}

.bsz-field select,
.bsz-field input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 46px;
	padding: 9px 12px;
	border: 1px solid rgba(116, 154, 118, 0.42);
	border-radius: 8px;
	background: #06120d;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
}

.bsz-setup-step {
	padding-top: 12px;
	border-top: 1px solid rgba(116, 154, 118, 0.22);
}

.bsz-setup-step button {
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid rgba(224, 183, 92, 0.55);
	border-radius: 8px;
	background: var(--bsz-gold-soft);
	color: var(--bsz-gold);
	font: inherit;
	font-weight: 850;
	cursor: pointer;
}

.bsz-custom-time,
.bsz-advanced-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.bsz-advanced-settings {
	padding-top: 12px;
	border-top: 1px solid rgba(116, 154, 118, 0.22);
}

.bsz-advanced-settings summary {
	cursor: pointer;
}

.bsz-advanced-grid {
	margin-top: 12px;
}

.bsz-advanced-grid .bsz-field {
	width: calc(100% - 8px);
}

.bsz-advanced-grid .bsz-field:nth-child(even) {
	justify-self: end;
}

.bsz-setup-step small {
	color: var(--bsz-muted);
	font-size: 12px;
}

.bsz-engine-card {
	display: grid;
	grid-template-columns: 12px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 11px 12px;
	border: 1px solid rgba(116, 154, 118, 0.3);
	border-radius: 8px;
	background: #04100b;
}

.bsz-engine-card > span:last-child {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.bsz-engine-card strong {
	color: #fff;
	font-size: 14px;
	line-height: 1.25;
}

.bsz-engine-card small {
	display: block;
	line-height: 1.35;
}

.bsz-engine-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #728078;
	box-shadow: 0 0 0 3px rgba(114, 128, 120, 0.12);
}

.bsz-engine-card[data-state="loading"] .bsz-engine-dot,
.bsz-engine-card[data-state="thinking"] .bsz-engine-dot {
	background: var(--bsz-gold);
	box-shadow: 0 0 0 4px rgba(224, 183, 92, 0.16);
	animation: bsz-engine-pulse 1s ease-in-out infinite;
}

.bsz-engine-card[data-state="ready"] .bsz-engine-dot {
	background: #70e0aa;
	box-shadow: 0 0 0 3px rgba(112, 224, 170, 0.15);
}

.bsz-engine-card[data-state="error"] .bsz-engine-dot {
	background: #ef8c82;
	box-shadow: 0 0 0 3px rgba(239, 140, 130, 0.14);
}

@keyframes bsz-engine-pulse {
	50% {
		opacity: 0.45;
		transform: scale(0.82);
	}
}

.bsz-setup-message {
	min-height: 1.3em;
	margin: 0;
	color: #9ff5d5;
	font-size: 13px;
	font-weight: 750;
}

.bsz-clocks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.bsz-clocks article {
	display: grid;
	gap: 2px;
	padding: 8px 12px;
	border: 1px solid var(--bsz-border-strong);
	border-radius: 8px;
	background: #06120d;
}

.bsz-clocks span {
	color: var(--bsz-gold);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.bsz-clocks strong {
	color: #fff;
	font-family: Consolas, "Courier New", monospace;
	font-size: clamp(22px, 3vw, 30px);
	line-height: 1;
}

.bsz-board-screen-tools {
	display: flex;
	justify-content: center;
	width: min(100%, 722px);
	margin: 10px auto 0;
}

.bsz-board-screen-tools button {
	min-width: 150px;
}

.bsz-board-panel:fullscreen {
	box-sizing: border-box;
	width: 100vw;
	height: 100vh;
	padding: 12px;
	overflow: auto;
	background: #020806;
}

.bsz-board-panel:fullscreen .bsz-board-tools,
.bsz-board-panel:fullscreen > .bsz-clocks,
.bsz-board-panel:fullscreen .bsz-board-screen-tools {
	width: min(100%, 1080px);
	margin-right: auto;
	margin-left: auto;
}

.bsz-board-panel:fullscreen .bsz-board-workspace {
	grid-template-columns: minmax(0, min(760px, calc(100dvh - 140px))) 38px minmax(220px, 300px);
	width: min(100%, 1080px);
}

.bsz-board-panel:fullscreen .bsz-board-frame {
	width: 100%;
}

.bsz-board-panel:fullscreen .bsz-board-sidebar {
	grid-template-rows: auto minmax(0, 1fr);
	max-height: calc(100dvh - 140px);
}

.bsz-board-panel:fullscreen .bsz-game-action-icons {
	display: flex;
}

.bsz-board-panel:fullscreen .bsz-fullscreen-history {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 14px;
	border: 1px solid rgba(224, 183, 92, 0.28);
	border-radius: 10px;
	background: #06120d;
}

.bsz-board-panel:fullscreen .bsz-fullscreen-history h3 {
	margin: 0 0 10px;
	color: var(--bsz-gold);
	font-size: 17px;
}

.bsz-board-panel:fullscreen .bsz-fullscreen-history .bsz-history {
	flex: 1;
	min-height: 0;
	margin: 0;
	overflow: auto;
}

@media (max-width: 760px) {
	.bsz-board-workspace,
	.bsz-board-panel:fullscreen .bsz-board-workspace {
		grid-template-columns: minmax(0, 1fr) 34px;
	}

	.bsz-eval-bar {
		grid-column: 2;
		grid-row: 1;
		width: 34px;
	}

	.bsz-board-sidebar {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.bsz-game-action-icons {
		display: flex;
	}

	.bsz-board-panel:fullscreen .bsz-fullscreen-history {
		display: none;
	}
}

.bsz-wrap[data-bsz-board-theme="wood"] .bsz-square.is-light { background: #d8b37c; }
.bsz-wrap[data-bsz-board-theme="wood"] .bsz-square.is-dark { background: #70472d; }
.bsz-wrap[data-bsz-board-theme="wood"] .bsz-square.is-target::after {
	background: #fff3a6;
	border-color: #241006;
	box-shadow: 0 0 0 3px #ffcf3d, 0 0 15px rgba(255, 239, 139, 0.95);
}
.bsz-wrap[data-bsz-board-theme="wood"] .bsz-square.is-target:has(.bsz-piece:not(:empty))::after {
	background: transparent;
	border-color: #fff3a6;
	box-shadow: inset 0 0 0 2px #241006, 0 0 0 3px #ffcf3d;
}
.bsz-wrap[data-bsz-board-theme="mono"] .bsz-square.is-light { background: #e5e5e5; }
.bsz-wrap[data-bsz-board-theme="mono"] .bsz-square.is-dark { background: #303030; }
.bsz-wrap[data-bsz-board-theme="blue"] .bsz-square.is-light { background: #d4deea; }
.bsz-wrap[data-bsz-board-theme="blue"] .bsz-square.is-dark { background: #365a7b; }

.bsz-piece-preview {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
	margin-top: 8px;
	padding: 7px 9px;
	border: 1px solid #2d4939;
	border-radius: 9px;
	background: #010906;
	overflow: hidden;
}

.bsz-piece-preview .bsz-piece {
	display: grid;
	place-items: center;
	min-width: 0;
	height: 36px;
	font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
	font-size: 29px;
	line-height: 1;
}

.bsz-piece-preview .bsz-piece--white {
	color: #fff;
	-webkit-text-stroke: 1px #111;
	text-shadow: 0 1px 2px #000;
}

.bsz-piece-preview .bsz-piece--black {
	color: #050505;
	-webkit-text-stroke: 0.6px #000;
	text-shadow: 0 0 2px rgba(255, 255, 255, 0.75);
}

.bsz-board-preview {
	display: grid;
	grid-template-columns: repeat(2, 38px);
	grid-template-rows: repeat(2, 38px);
	width: 76px;
	height: 76px;
	margin-top: 8px;
	border: 1px solid #b89131;
	border-radius: 8px;
	overflow: hidden;
	background: #010906;
}

.bsz-board-preview .is-light { background: #c9d3bf; }
.bsz-board-preview .is-dark { background: #234a33; }
.bsz-wrap[data-bsz-board-theme="wood"] .bsz-board-preview .is-light { background: #d8b37c; }
.bsz-wrap[data-bsz-board-theme="wood"] .bsz-board-preview .is-dark { background: #70472d; }
.bsz-wrap[data-bsz-board-theme="mono"] .bsz-board-preview .is-light { background: #e5e5e5; }
.bsz-wrap[data-bsz-board-theme="mono"] .bsz-board-preview .is-dark { background: #303030; }
.bsz-wrap[data-bsz-board-theme="blue"] .bsz-board-preview .is-light { background: #d4deea; }
.bsz-wrap[data-bsz-board-theme="blue"] .bsz-board-preview .is-dark { background: #365a7b; }

.bsz-wrap[data-bsz-piece-set="letters"] .bsz-piece {
	font-family: Georgia, serif;
	font-size: clamp(24px, 5vw, 48px);
	font-weight: 900;
}

.bsz-wrap[data-bsz-piece-set="outline"] .bsz-piece--white,
.bsz-wrap[data-bsz-piece-set="tournament"] .bsz-piece--white,
.bsz-wrap[data-bsz-piece-set="letters"] .bsz-piece--white {
	color: #fff !important;
	-webkit-text-stroke: 1.25px #000;
	text-shadow: 0 0 2px #000, 0 2px 4px #000, 0 0 7px rgba(255, 255, 255, 0.5);
}

.bsz-wrap[data-bsz-piece-set="outline"] .bsz-piece--black,
.bsz-wrap[data-bsz-piece-set="tournament"] .bsz-piece--black,
.bsz-wrap[data-bsz-piece-set="letters"] .bsz-piece--black {
	color: #000 !important;
	-webkit-text-stroke: 0.75px #000;
	text-shadow: 0 0 1px #fff, 0 0 3px rgba(255, 255, 255, 0.86), 0 2px 2px rgba(0, 0, 0, 0.7);
}

.bsz-wrap[data-bsz-piece-set="outline"] .bsz-piece--white {
	color: rgba(255, 255, 255, 0.58) !important;
	opacity: 0.82;
	-webkit-text-stroke: 1.1px rgba(0, 0, 0, 0.92);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82), 0 0 3px rgba(255, 255, 255, 0.22);
}

.bsz-wrap[data-bsz-piece-set="tournament"] .bsz-piece {
	font-family: "DejaVu Sans", "Segoe UI Symbol", sans-serif;
	filter: none;
	transform: scale(0.94);
	transform-origin: center;
}

.bsz-wrap[data-bsz-piece-set="tournament"] .bsz-piece--white {
	color: #fff !important;
	-webkit-text-stroke: 1.4px #050505;
	text-shadow: 0 1px 1px #000;
}

.bsz-wrap[data-bsz-piece-set="tournament"] .bsz-piece--black {
	color: #111 !important;
	-webkit-text-stroke: 0.8px #000;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.38);
}

.bsz-wrap[data-bsz-piece-set="simple"] .bsz-piece {
	font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
	font-weight: 400;
	filter: none;
	transform: scale(0.9);
}

.bsz-wrap[data-bsz-piece-set="simple"] .bsz-piece--white {
	color: #fff !important;
	-webkit-text-stroke: 1.1px #050505;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

.bsz-wrap[data-bsz-piece-set="simple"] .bsz-piece--black {
	color: #050505 !important;
	-webkit-text-stroke: 0;
	text-shadow: 0 0 1px rgba(255, 255, 255, 0.92);
}

/* Dwa własne zestawy o czytelnym charakterze popularnych portali szachowych. */
.bsz-wrap[data-bsz-piece-set="portal-classic"] .bsz-piece {
	font-family: "DejaVu Sans", "Noto Sans Symbols 2", "Segoe UI Symbol", sans-serif;
	font-weight: 400;
	filter: none;
	transform: scale(0.93);
	transform-origin: center;
}

.bsz-wrap[data-bsz-piece-set="portal-classic"] .bsz-piece--white {
	color: #fff !important;
	opacity: 1;
	-webkit-text-stroke: 1.35px #171717;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.78), 0 2px 3px rgba(0, 0, 0, 0.32);
}

.bsz-wrap[data-bsz-piece-set="portal-classic"] .bsz-piece--black {
	color: #323232 !important;
	-webkit-text-stroke: 0.8px #090909;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2), 0 2px 3px rgba(0, 0, 0, 0.42);
}

.bsz-wrap[data-bsz-piece-set="portal-modern"] .bsz-piece {
	font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
	font-weight: 600;
	filter: none;
	transform: scale(0.89);
	transform-origin: center;
}

.bsz-wrap[data-bsz-piece-set="portal-modern"] .bsz-piece--white {
	color: #fff !important;
	opacity: 1;
	-webkit-text-stroke: 1px #181818;
	text-shadow: 0 1px 0 #111, 0 2px 4px rgba(0, 0, 0, 0.52);
}

.bsz-wrap[data-bsz-piece-set="portal-modern"] .bsz-piece--black {
	color: #111 !important;
	-webkit-text-stroke: 0.35px #000;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3), 0 2px 3px rgba(0, 0, 0, 0.52);
}

.bsz-end-actions,
.bsz-analysis,
.bsz-chat,
.bsz-puzzle-controls,
.bsz-puzzle-side {
	box-sizing: border-box;
	padding: 16px;
	border: 1px solid rgba(116, 154, 118, 0.34);
	border-radius: 10px;
	background: #04130d;
}

.bsz-end-actions {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	justify-self: center;
	z-index: 8;
	width: calc(100% - 34px);
	max-width: 640px;
	margin: 0;
	background: rgba(2, 15, 9, 0.95);
	box-shadow: 0 16px 42px rgba(0, 0, 0, 0.68);
	text-align: center;
}

.bsz-board-panel.is-result-win .bsz-end-actions { border-color: rgba(57, 199, 122, 0.8); }
.bsz-board-panel.is-result-loss .bsz-end-actions { border-color: rgba(216, 74, 74, 0.82); }
.bsz-board-panel.is-result-draw .bsz-end-actions { border-color: rgba(217, 182, 66, 0.82); }

.bsz-end-actions h3,
.bsz-analysis h3,
.bsz-chat h3,
.bsz-puzzle-side h3 {
	margin: 0 0 12px;
	color: #fff;
}

.bsz-end-actions > div,
.bsz-puzzle-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.bsz-end-actions button,
.bsz-analysis button,
.bsz-chat button,
.bsz-puzzle-controls button,
.bsz-puzzle-actions button {
	min-height: 42px;
	padding: 9px 14px;
	border: 1px solid rgba(224, 183, 92, 0.58);
	border-radius: 8px;
	background: var(--bsz-gold-soft);
	color: var(--bsz-gold);
	font: inherit;
	font-weight: 850;
	cursor: pointer;
}

.bsz-analysis {
	width: min(100%, 722px);
	max-height: 520px;
	margin: 14px auto 0;
	overflow: auto;
}

.bsz-analysis-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.bsz-analysis-head button {
	min-width: 42px;
	padding: 4px;
	font-size: 24px;
}

.bsz-analysis ol {
	display: grid;
	gap: 8px;
	padding: 0;
	list-style: none;
}

.bsz-analysis li {
	display: grid;
	grid-template-columns: 100px repeat(3, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
	border-left: 4px solid #8d6e32;
	background: #071a12;
}

.bsz-analysis li.is-best { border-left-color: #50c990; }

.bsz-analysis li.is-book { border-left-color: #d7ae50; }
.bsz-analysis li.is-mega,
.bsz-analysis li.is-brilliant { border-left-color: #20cdb4; }
.bsz-analysis li.is-great,
.bsz-analysis li.is-good { border-left-color: #50c990; }
.bsz-analysis li.is-average { border-left-color: #8f9d95; }
.bsz-analysis li.is-inaccuracy { border-left-color: #e0a63c; }
.bsz-analysis li.is-bad,
.bsz-analysis li.is-blunder { border-left-color: #e05a55; }

.bsz-quality-list {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 25px;
	min-height: 25px;
	margin-left: 5px;
	padding: 1px 5px;
	border-radius: 999px;
	background: #33443a;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 13px;
	font-style: normal;
	line-height: 1;
}

.bsz-quality-list.is-book { background: #76571d; }
.bsz-quality-list.is-mega,
.bsz-quality-list.is-brilliant { background: #087e70; }
.bsz-quality-list.is-good,
.bsz-quality-list.is-great { background: #176f3d; }
.bsz-quality-list.is-inaccuracy { background: #9a6b13; }
.bsz-quality-list.is-bad,
.bsz-quality-list.is-blunder { background: #9f302f; }

.bsz-analysis li span small {
	display: block;
	margin-top: 3px;
	color: #e0b75c;
	font-size: 12px;
	font-weight: 700;
}

.bsz-analysis li[data-bsz-analysis-position] {
	cursor: pointer;
}

.bsz-analysis li.is-viewing {
	background: rgba(224, 183, 92, 0.14);
	box-shadow: inset 0 0 0 1px rgba(224, 183, 92, 0.55);
}

.bsz-chat {
	display: grid;
	gap: 10px;
}

.bsz-chat-messages {
	display: grid;
	gap: 8px;
	max-height: 300px;
	overflow-y: auto;
	padding: 4px;
}

.bsz-chat-message {
	max-width: 88%;
	padding: 9px 11px;
	border: 1px solid rgba(116, 154, 118, 0.3);
	border-radius: 10px 10px 10px 2px;
	background: #092018;
}

.bsz-chat-message.is-mine {
	justify-self: end;
	border-color: rgba(224, 183, 92, 0.45);
	border-radius: 10px 10px 2px 10px;
	background: rgba(224, 183, 92, 0.12);
}

.bsz-chat-message header {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	color: var(--bsz-gold);
	font-size: 11px;
}

.bsz-chat-message p { margin: 5px 0 0; color: #fff; overflow-wrap: anywhere; }

.bsz-chat form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.bsz-chat input {
	box-sizing: border-box;
	min-width: 0;
	min-height: 42px;
	padding: 9px 11px;
	border: 1px solid rgba(116, 154, 118, 0.42);
	border-radius: 8px;
	background: #020d08;
	color: #fff;
}

.bsz-game-row strong small { color: var(--bsz-gold); font-size: 11px; white-space: nowrap; }

.bsz-puzzle-controls {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
	margin-bottom: 18px;
}

.bsz-puzzle-controls .bsz-field,
.bsz-puzzle-controls select { min-width: 0; width: 100%; }

.bsz-puzzle-controls > button {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	white-space: nowrap;
}

.bsz-puzzle-layout {
	display: grid;
	grid-template-columns: minmax(0, 722px) minmax(260px, 1fr);
	gap: 18px;
	align-items: start;
}

.bsz-puzzle-board-frame { margin: 0; }
.bsz-puzzle-side { display: grid; gap: 12px; }
.bsz-puzzle-side > p { margin: 0; }
.bsz-puzzle-next-bottom {
	align-self: end;
	justify-self: end;
	margin-top: 10px;
}
.bsz-puzzle-next-bottom[hidden] { display: none !important; }

@media (max-width: 900px) {
	.bsz-analysis li { grid-template-columns: 1fr 1fr; }
	.bsz-puzzle-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.bsz-end-actions > div,
	.bsz-puzzle-controls,
	.bsz-chat form { grid-template-columns: 1fr; display: grid; }
	.bsz-analysis li { grid-template-columns: 1fr; }
}

.bsz-side h3 {
	margin: 0 0 10px;
	color: #fff;
	font-size: 21px;
	line-height: 1.2;
}

.bsz-status,
.bsz-notice {
	padding: 13px 14px;
	color: #fff;
	font-weight: 800;
}

.bsz-notice {
	margin-bottom: 14px;
	border-color: var(--bsz-border-strong);
	background: var(--bsz-gold-soft);
}

.bsz-online {
	display: grid;
	gap: 12px;
}

.bsz-challenge-form {
	align-items: stretch;
}

.bsz-challenge-form select {
	min-width: 0;
	flex: 1;
}

.bsz-games {
	display: grid;
	gap: 10px;
}

.bsz-game-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 10px;
	padding: 12px;
}

.bsz-game-row strong {
	color: #fff;
}

.bsz-game-row span {
	color: var(--bsz-gold);
	font-size: 13px;
	font-weight: 850;
	text-transform: uppercase;
}

.bsz-game-row div {
	grid-column: 1 / -1;
}

.bsz-history {
	display: grid;
	gap: 5px;
	max-height: 240px;
	margin: 0;
	padding: 0 0 0 22px;
	overflow: auto;
	color: var(--bsz-muted);
}

.bsz-history li {
	padding: 3px 0;
}

.bsz-muted {
	margin: 0;
	padding: 12px;
	border: 1px dashed rgba(116, 154, 118, 0.28);
	border-radius: 8px;
	color: var(--bsz-muted);
}

@media (max-width: 900px) {
	.bsz-head,
	.bsz-layout {
		grid-template-columns: 1fr;
	}

	.bsz-board {
		margin: 0 auto;
	}
}

@media (max-width: 560px) {
	.bsz-wrap {
		padding: 16px;
	}

	.bsz-board-panel,
	.bsz-side {
		padding: 10px;
	}

	.bsz-board-tools,
	.bsz-board-tools label,
	.bsz-challenge-form {
		display: grid;
		grid-template-columns: 1fr;
	}

	.bsz-custom-time,
	.bsz-advanced-grid,
	.bsz-clocks {
		grid-template-columns: 1fr;
	}

	.bsz-advanced-grid .bsz-field {
		width: 100%;
	}

	.bsz-game-type-buttons {
		grid-template-columns: 1fr;
	}
}
