.durak-app {
	color-scheme: light;
	font-family: Arial, Helvetica, sans-serif;
	--durak-ui-green: #13491d;
	--durak-ui-green-hover: #0f4119;
	--durak-ui-orange: #cb6300;
	--durak-ui-text: #193522;
	--durak-ui-muted: #607067;
	--durak-ui-surface: #f2f6f3;
	--durak-ui-border: #cbd8cd;
	--durak-ui-body-size: 14px;
	--durak-ui-small-size: 12px;
	--durak-ui-heading-size: 16px;
}

.durak-app,
.durak-app * {
	box-sizing: border-box;
}

.durak-app button,
.durak-app a {
	-webkit-tap-highlight-color: transparent;
}

.durak-game-area {
	position: relative;
	width: 100%;
	min-width: 0;
	overflow: visible;
	border-radius: 8px;
	background: #2c733b url('/img/games/durak/bgpattern.png') repeat;
}

.durak-app {
	position: relative;
	display: grid;
	grid-template-rows: 56px auto;
	width: 100%;
	min-height: 0;
	overflow: visible;
	border-radius: 8px;
	background: #2c733b url('/img/games/durak/bgpattern.png') repeat;
}

.durak-app.is-fullscreen,
.durak-game-shell.is-fullscreen .durak-app {
	position: fixed;
	inset: 0;
	z-index: 20;
	grid-template-rows: 56px minmax(0, 1fr);
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
	border-radius: 0;
}

.durak-app.is-fullscreen.is-home {
	display: grid;
	grid-template-rows: minmax(0, 1fr);
}

.durak-app.is-fullscreen.is-home .durak-board {
	height: 100%;
	padding-top: 56px;
	overflow-y: auto;
}

.durak-app.is-fullscreen:not(.is-home):not(.is-finished) .durak-board {
	height: 100%;
	min-height: 0;
	border-radius: 0;
}

.durak-app:not(.is-home):not(.is-finished) .durak-board {
	height: auto;
	min-height: max(680px, calc(100vh - 180px));
}

.durak-app.is-finished {
	min-height: max(680px, calc(100vh - 180px));
}

.durak-app.is-fullscreen.is-finished {
	min-height: 0;
}

.durak-header {
	display: flex;
	height: 56px;
	min-width: 0;
	color: #fff;
	background: #2c733b url('/img/games/durak/bgpattern.png') repeat;
}

.durak-header--controls .durak-toolbar {
	flex: 1 1 auto;
	width: 100%;
}

.durak-header__all,
.durak-header__title,
.durak-header__state {
	display: flex;
	align-items: center;
	height: 54px;
}

.durak-header__all {
	position: relative;
	z-index: 21;
	flex: 0 0 auto;
	min-width: 114px;
	padding: 0 18px;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	background: #13491d;
}

.durak-header__all:hover,
.durak-header__all:focus-visible {
	color: #fffde2;
	background: #0f4119;
}

.durak-header__title {
	flex: 0 1 auto;
	min-width: 134px;
	max-width: 320px;
	padding: 0 20px;
	overflow: hidden;
	font-size: 20px;
	font-weight: 400;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.durak-header__state {
	flex: 0 0 230px;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: 0 16px;
	background: linear-gradient(to right, #3e3a87, #2f2b74);
}

.durak-header__state-label {
	margin-bottom: 2px;
	font-size: 12px;
	opacity: .78;
}

.durak-header__state strong {
	max-width: 100%;
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.durak-toolbar {
	display: flex;
	align-items: center;
	min-width: 0;
	height: 56px;
	padding: 10px 15px;
	background: #2c733b url('/img/games/durak/bgpattern.png') repeat;
}

.durak-tool {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 36px;
	margin: 0 20px 0 0;
	padding: 0;
	border: 0;
	color: #ededed;
	font: inherit;
	font-size: 13px;
	font-weight: 400;
	background: transparent;
	cursor: pointer;
}

.durak-tool:hover,
.durak-tool:focus-visible {
	color: #fffde2;
	background: transparent;
	box-shadow: none;
	outline: 0;
}

.durak-tool:hover .durak-tool__icon,
.durak-tool:focus-visible .durak-tool__icon {
	outline: 2px solid #fffde2;
	outline-offset: 2px;
}

.durak-tool__icon,
.durak-zoom button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: inherit;
	background: #13491d;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.durak-tool__icon svg {
	width: 36px;
	height: 36px;
	fill: currentColor;
}

.durak-toolbar__spacer {
	flex: 1 1 auto;
	min-width: 6px;
}

.durak-zoom {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #ededed;
	font-size: 13px;
	white-space: nowrap;
}

.durak-zoom button {
	cursor: pointer;
	touch-action: manipulation;
}

.durak-zoom button:hover,
.durak-zoom button:focus-visible {
	color: #fffde2;
	outline: 2px solid #fffde2;
	outline-offset: 2px;
}

.durak-zoom button:disabled {
	opacity: .4;
	cursor: default;
}

.durak-zoom button svg {
	width: 36px;
	height: 36px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.durak-zoom__label {
	margin-left: 3px;
}

.durak-zoom__value {
	min-width: 4ch;
	color: inherit;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.durak-board {
	--durak-scale: 1;
	--card-width: calc(73px * var(--durak-scale));
	--card-height: calc(98px * var(--durak-scale));
	position: relative;
	display: grid;
	grid-template-rows:
		minmax(var(--card-height), .8fr)
		minmax(calc(var(--card-height) * 1.45), 2fr)
		24px
		46px
		minmax(var(--card-height), 1fr);
	width: 100%;
	height: auto;
	min-height: 0;
	padding: 4px 18px 8px;
	overflow: hidden;
	background-color: #2c733b;
	background-image: url('/img/games/durak/bgpattern.png');
	background-repeat: repeat;
	user-select: none;
    border-radius: 8px;
}

.durak-chat {
	position: absolute;
	z-index: 24;
	top: 14px;
	right: 14px;
	display: flex;
	flex-direction: column;
	width: min(310px, calc(100% - 28px));
	height: min(440px, calc(100% - 28px));
	border: 1px solid rgba(17, 63, 30, .3);
	border-radius: 10px;
	overflow: hidden;
	color: #193522;
	background: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}

.durak-chat.is-closed { display: none; }
.durak-chat__header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; border-bottom: 1px solid #e2e9e3; }
.durak-chat__header button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #31563a; font-size: 22px; background: #edf4ee; cursor: pointer; }
.durak-chat__header button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 4px; }
.durak-chat__header button[hidden] { display: none; }
.durak-chat__header button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.durak-chat.is-closed .durak-chat__header button svg { transform: rotate(180deg); }
.durak-chat__messages { flex: 1; min-height: 0; padding: 10px; overflow-y: auto; overscroll-behavior: contain; }
.durak-chat__message { display: flex; gap: 8px; margin: 0 0 12px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.durak-chat__avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #e6eee7; }
.durak-chat__message-body { min-width: 0; }
.durak-chat__message-meta { display: flex; gap: 7px; align-items: baseline; margin-bottom: 2px; }
.durak-chat__message-meta strong { max-width: 150px; overflow: hidden; color: #245332; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.durak-chat__message-meta time { color: #819087; font-size: 10px; }
.durak-chat__text { color: #25362b; white-space: pre-wrap; }
.durak-chat__status { min-height: 18px; margin: 0; padding: 2px 10px; color: #76847a; font-size: 11px; }
.durak-chat__form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #e2e9e3; }
.durak-chat__form input { min-width: 0; flex: 1; padding: 9px; border: 1px solid #cbd8cd; border-radius: 7px; color: #193522; font: inherit; }
.durak-chat__form button { padding: 8px 10px; border: 0; border-radius: 7px; color: #fff; font: inherit; font-size: 12px; background: #206335; cursor: pointer; }
.durak-chat-toggle { position: absolute; z-index: 25; top: 10px; right: 12px; height: 36px; padding: 0 15px; border: 0; border-radius: 20px; color: #fff; background: #13491d; box-shadow: 0 3px 9px rgba(0,0,0,.25); cursor: pointer; }
.durak-app.is-fullscreen .durak-chat-toggle { right: 60px; }
.durak-chat-notice { position: absolute; z-index: 30; top: 54px; right: 12px; display: flex; flex-direction: column; gap: 5px; width: min(280px, calc(100% - 24px)); padding: 12px; border-radius: 8px; color: #193522; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.25); overflow-wrap: anywhere; font-size: 13px; pointer-events: none; }
.durak-chat-notice span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.durak-app.is-fullscreen .durak-chat-notice { right: 60px; }
.durak-chat-notice[hidden], .durak-app.is-home .durak-chat-notice { display: none; }
.durak-chat-toggle[hidden] { display: none; }
.durak-app.is-bot-game .durak-chat,
.durak-app.is-bot-game .durak-chat-toggle,
.durak-app.is-bot-game .durak-chat-notice { display: none !important; }
.durak-players { position: absolute; z-index: 24; top: 14px; left: 14px; display: flex; flex-direction: column; width: min(310px, calc(100% - 28px)); height: min(440px, calc(100% - 28px)); min-height: 220px; overflow: hidden; border: 1px solid rgba(17, 63, 30, .3); border-radius: 10px; color: #193522; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }
.durak-players.is-closed, .durak-players.is-playing { display: none; }
.durak-app.is-online-session.is-finished .durak-players,
.durak-app.is-online-session.is-finished .durak-players-toggle { display: none !important; }
.durak-players__header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; border-bottom: 1px solid #e2e9e3; }
.durak-players__header button { width: 30px; height: 30px; flex: 0 0 30px; border: 0; border-radius: 50%; color: #31563a; font-size: 22px; background: #edf4ee; cursor: pointer; }
.durak-players__busy { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; min-height: 30px; padding: 8px 0; line-height: 14px; white-space: nowrap; font-size: 10px; }
.durak-players__busy input { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; align-self: center; accent-color: #206335; }
.durak-players__search { box-sizing: border-box; width: calc(100% - 20px); margin: 9px 10px 3px; padding: 7px 9px; border: 1px solid #d7e2d9; border-radius: 6px; color: #193522; font: inherit; font-size: 12px; }
.durak-players__search:focus { border-color: #206335; outline: 2px solid rgba(32, 99, 53, .16); }
.durak-players__status { margin: 0; padding: 7px 10px; color: #76847a; font-size: 11px; }
.durak-players__list { min-height: 0; flex: 1; margin: 0; padding: 0 8px; overflow-y: auto; list-style: none; }
.durak-players__item { display: flex; align-items: center; gap: 8px; padding: 7px 2px; }
.durak-players__item.is-self, .durak-players__item.is-authenticated { margin: 2px -6px; padding: 7px 8px; border-radius: 8px; background: #e4f0e5; }
.durak-players__item[hidden] { display: none; }
.durak-players__item img { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; object-fit: cover; background: #e6eee7; }
.durak-players__name { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.durak-players__identity { display: flex; align-items: baseline; gap: 7px; flex: 1; min-width: 0; }
.durak-players__identity .durak-players__name { flex: 0 1 auto; }
.durak-players__guest-marker { flex: 0 0 auto; color: var(--durak-ui-muted); font-size: 16px; font-weight: 400; line-height: 1; }
.durak-players__rating { flex: 0 0 auto; padding: 2px 5px; border: 1px solid var(--durak-ui-border); border-radius: 4px; color: var(--durak-ui-green); background: #fff; font-size: 11px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.durak-players__rating:empty { display: none; }
.durak-avatar-attribution { margin: 12px 0; text-align: center; font-size: 12px; }
.durak-avatar-attribution a { color: #607067; }
.durak-avatar-attribution summary { color: #607067; cursor: pointer; }
.durak-avatar-attribution__content { max-height: 300px; margin-top: 10px; padding: 12px; overflow-y: auto; background: #fff; text-align: left; overflow-wrap: anywhere; }
.durak-avatar-attribution__content li { margin-bottom: 8px; }
.durak-players__item button, .durak-invite button { padding: 6px 8px; border: 0; border-radius: 6px; color: #fff; font-size: 11px; background: #206335; cursor: pointer; }
.durak-players__item button:disabled, .durak-invite button:disabled { opacity: .6; cursor: default; }
.durak-players__player-status { color: #76847a; font-size: 10px; text-align: right; }
.durak-invite { margin: 6px 8px 8px; padding: 9px; border-radius: 7px; background: #edf4ee; font-size: 12px; }
.durak-invite__actions { display: flex; gap: 6px; margin-top: 7px; }
.durak-invite__entry + .durak-invite__entry { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--durak-ui-border); }
.durak-invite-dialog { position: absolute; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(8,30,14,.48); border-radius: inherit; }
.durak-invite-dialog[hidden] { display: none; }
.durak-invite-dialog__panel { position: relative; width: min(420px,100%); max-height: 100%; overflow-y: auto; padding: 28px; border-radius: 8px; background: #fff; color: var(--durak-ui-text); text-align: center; box-shadow: 0 12px 36px rgba(0,0,0,.25); }
.durak-invite-dialog__panel h2 { margin: 14px 0 10px; font-size: 22px; font-weight: 600; }
.durak-invite-dialog__panel p { margin: 10px 0; font-size: 14px; line-height: 1.5; }
.durak-invite-dialog__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--durak-ui-surface); }
.durak-invite-dialog__panel .durak-invite-dialog__details { padding: 10px; border-radius: 5px; background: var(--durak-ui-surface); }
.durak-invite-dialog__panel .durak-invite-dialog__note { color: var(--durak-ui-muted); font-size: 12px; }
.durak-invite-dialog__close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: #31563a; background: #edf4ee; cursor: pointer; }
.durak-invite-dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.durak-invite-dialog__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.durak-invite-dialog__buttons button { flex: 1; min-height: 44px; padding: 10px 14px; border: 1px solid var(--durak-ui-border); border-radius: 5px; color: var(--durak-ui-green); background: #fff; font: inherit; cursor: pointer; }
.durak-invite-dialog__buttons #durak-invite-accept { color: #fff; border-color: var(--durak-ui-orange); background: var(--durak-ui-orange); }
.durak-invite-dialog button:disabled { opacity: .6; cursor: default; }
.durak-invite-dialog #durak-invite-error { color: #a12c2c; }
.durak-invite-dialog__outgoing { margin-top: 18px; text-align: left; }
.durak-invite-dialog__recipient { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 5px; background: var(--durak-ui-surface); }
.durak-invite-dialog__recipient + .durak-invite-dialog__recipient { margin-top: 8px; }
.durak-invite-dialog__recipient > span { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.durak-app .durak-invite-dialog__recipient button, .durak-app .durak-invite-pending { min-height: 36px; padding: 6px 10px; border: 1px solid var(--durak-ui-border); border-radius: 5px; color: var(--durak-ui-green); background: #fff; font: 400 13px Arial, sans-serif; cursor: pointer; }
.durak-invite-dialog__recipient button { flex: 0 0 auto; }
.durak-app .durak-invite-pending { margin: 6px 10px; text-align: left; }
.durak-invite-pending[hidden] { display: none; }
.durak-players-toggle { position: absolute; z-index: 25; top: 12px; left: 12px; padding: 9px 15px; border: 0; border-radius: 20px; color: #fff; background: #13491d; box-shadow: 0 3px 9px rgba(0,0,0,.25); cursor: pointer; }
.durak-players-toggle[hidden] { display: none; }
.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; }

@media (max-width: 600px) {
	.durak-chat { top: auto; right: 10px; bottom: 10px; width: calc(100% - 20px); height: min(48vh, 390px); }
	.durak-chat-toggle { right: 10px; }
	.durak-players { top: auto; bottom: 10px; left: 10px; width: calc(100% - 20px); height: min(48vh, 390px); min-height: 0; }
	.durak-players-toggle { top: 64px; left: 10px; }
}

.durak-opponent,
.durak-player {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	overflow: visible;
}

.durak-player-label {
	position: absolute;
	left: 0;
	top: 5px;
	display: grid;
	grid-template-columns: 34px auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 7px;
	padding: 5px 9px 5px 6px;
	border-radius: 4px;
	color: #eef5ef;
	background: rgba(19, 73, 29, .78);
}

.durak-player-label__avatar {
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
}

.durak-player-label__avatar svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.durak-player-label span {
	font-size: 12px;
}

.durak-player-label strong {
	font-size: 11px;
	opacity: .78;
}

.durak-player-label--you {
	left: auto;
	right: 0;
	top: auto;
	bottom: 5px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.durak-hand {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(880px, calc(100% - 230px));
	min-width: 0;
	padding-left: 0;
}

.durak-hand .durak-card {
	flex: 0 0 var(--card-width);
	margin-left: calc(var(--card-width) * -.35);
}

.durak-hand .durak-card:first-child {
	margin-left: 0 !important;
}

.durak-hand--player .durak-card.is-playable {
	cursor: pointer;
}

.durak-hand--player .durak-card.is-playable:hover,
.durak-hand--player .durak-card.is-playable:focus-visible {
	z-index: 8;
	transform: translateY(-8px);
	box-shadow: 0 8px 12px rgba(0, 0, 0, .28);
	outline: 0;
}

.durak-player-card-count {
	position: relative;
	z-index: 9;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	margin-left: 10px;
	padding: 0 6px;
	border-radius: 50%;
	color: #eef5ef;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	background: rgba(19, 73, 29, .78);
	box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.durak-hand--player { position: relative; }
.durak-hand-tools { position: relative; z-index: 12; display: flex; flex: 0 0 32px; flex-direction: column; align-items: center; gap: 8px; width: 32px; margin-left: 10px; }
.durak-hand-tools .durak-player-card-count { margin-left: 0; }
.durak-app .durak-hand-sort-toggle { display: grid; place-items: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid #81ac88; border-radius: 5px; color: #e6f0e8; background: #286637; cursor: pointer; }
.durak-hand-sort-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.durak-app .durak-hand-sort-toggle:hover, .durak-app .durak-hand-sort-toggle[aria-expanded="true"] { border-color: #a5c8ad; color: #fff; background: var(--durak-ui-green); }
.durak-hand-sort-menu { position: absolute; z-index: 40; right: 0; bottom: calc(100% + 12px); width: min(262px, calc(100vw - 40px)); padding: 7px; border: 1px solid var(--durak-ui-border); border-radius: 7px; color: var(--durak-ui-text); background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.22); text-align: left; }
.durak-hand-sort-menu[hidden] { display: none; }
.durak-hand-sort-menu p { margin: 6px 9px 8px; color: var(--durak-ui-muted); font-size: 12px; line-height: 1.4; }
.durak-app .durak-hand-sort-menu button { position: relative; display: block; width: 100%; min-height: 40px; padding: 9px 8px 9px 32px; border: 0; border-radius: 4px; color: var(--durak-ui-text); background: #fff; font: 400 14px Arial, sans-serif; text-align: left; cursor: pointer; }
.durak-app .durak-hand-sort-menu button:hover, .durak-app .durak-hand-sort-menu button[aria-pressed="true"] { background: var(--durak-ui-surface); }
.durak-hand-sort-menu button > span { position: absolute; left: 9px; color: var(--durak-ui-green); }
.durak-hand-sort-menu small { display: block; margin-top: 3px; color: var(--durak-ui-muted); font-size: 12px; line-height: 1.4; }
.durak-hand--player:has(.durak-hand-sort-toggle[aria-expanded="true"]) .durak-turn-notice { visibility: hidden; }
.durak-player:has(.durak-hand-sort-toggle[aria-expanded="true"]) { z-index: 10; }
@media (pointer: coarse) {
	.durak-hand-sort-toggle::after { position: absolute; inset: -6px; content: ''; }
	.durak-hand-tools { gap: 14px; }
	.durak-hand-sort-toggle { position: relative; }
	.durak-app .durak-hand-sort-menu button { min-height: 44px; }
}

.durak-play-area {
	position: relative;
	display: grid;
	grid-template-columns: minmax(82px, .7fr) minmax(300px, 4.8fr) minmax(74px, .7fr);
	align-items: center;
	min-width: 0;
	min-height: 0;
}

.durak-stock,
.durak-discard {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
}

.durak-stock__trump {
	position: absolute !important;
	transform: rotate(90deg);
	opacity: .98;
}

.durak-stock__deck {
	position: relative;
	z-index: 2;
	margin-left: calc(var(--card-width) * .42);
	transform: translateX(calc(var(--card-width) * .22));
	box-shadow: -2px 1px 0 #f4f4f4, -4px 2px 0 #244c31;
}

.durak-stock__count,
.durak-discard strong {
	position: absolute;
	z-index: 4;
	right: 4px;
	bottom: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 25px;
	height: 25px;
	padding: 0 6px;
	border-radius: 13px;
	color: #184527;
	font-size: 12px;
	background: #fff;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.durak-stock__label,
.durak-discard__label {
	position: absolute;
	bottom: 0;
	color: rgba(255, 255, 255, .76);
	font-size: 12px;
}

.durak-discard .durak-card {
	transform: rotate(-7deg);
	opacity: .72;
}

.durak-table {
	position: relative;
	z-index: 3;
	display: flex;
	align-content: center;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2px;
	min-width: 0;
	min-height: 0;
	padding: 0 5px;
}

.durak-table__empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	height: 78px;
	border: 1px dashed rgba(255, 255, 255, .18);
	border-radius: 4px;
	color: rgba(255, 255, 255, .4);
	font-size: 12px;
}

.durak-pair {
	position: relative;
	display: inline-block;
	width: calc(var(--card-width) * 1.23);
	height: calc(var(--card-height) * 1.2);
}

.durak-pair .durak-card {
	position: absolute;
	left: 0;
	top: 0;
}

.durak-pair .durak-pair__defense {
	left: calc(var(--card-width) * .22);
	top: calc(var(--card-height) * .16);
	z-index: 2;
	transform: rotate(4deg);
}

.durak-card {
	position: relative;
	display: inline-block;
	width: var(--card-width);
	height: var(--card-height);
	padding: 0;
	overflow: hidden;
	border: 1px solid #151515;
	border-radius: calc(3px * var(--durak-scale));
	color: #050505;
	font-family: Arial, Helvetica, sans-serif;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .24);
	transition: transform .12s ease, box-shadow .12s ease;
	will-change: transform;
}

button.durak-card {
	appearance: none;
}

.durak-app button.durak-card:hover,
.durak-app button.durak-card:focus-visible,
.durak-app button.durak-card:active {
	color: #050505;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .24);
}

.durak-app button.durak-card.durak-card--red:hover,
.durak-app button.durak-card.durak-card--red:focus-visible,
.durak-app button.durak-card.durak-card--red:active {
	color: #f02016;
}

.durak-card--red {
	color: #f02016;
}

.durak-card__corner {
	position: absolute;
	left: calc(4px * var(--durak-scale));
	top: calc(3px * var(--durak-scale));
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: calc(16px * var(--durak-scale));
	font-weight: 700;
	line-height: .82;
}

.durak-card__corner span {
	font-size: calc(15px * var(--durak-scale));
}

.durak-card__corner--bottom {
	left: auto;
	right: calc(4px * var(--durak-scale));
	top: auto;
	bottom: calc(3px * var(--durak-scale));
	transform: rotate(180deg);
}

.durak-card__center {
	position: absolute;
	left: 50%;
	top: 50%;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: calc(34px * var(--durak-scale));
	line-height: 1;
	transform: translate(-50%, -50%);
}

.durak-card--back {
	border: 0;
	border-radius: 0;
	background-color: transparent;
    background-image: url('/img/games/durak/razlozhi-cardback.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	box-shadow: none;
}

.durak-card__back-pattern {
	display: none;
}

.durak-message {
	position: relative;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0 120px;
	overflow: hidden;
	color: #f1f5f2;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
}

.durak-actions {
	position: relative;
	z-index: 8;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 3px 0;
}

.durak-actions button,
.durak-overlay button {
	min-width: 136px;
	height: 40px;
	padding: 0 20px;
	border: 0;
	border-radius: 3px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	background: #13491d;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
	cursor: pointer;
}

.durak-actions button:hover,
.durak-actions button:focus-visible,
.durak-overlay button:hover,
.durak-overlay button:focus-visible {
	color: #fffde2;
	background: #0f4119;
}

.durak-overlay {
	position: absolute;
	z-index: 20;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: transparent;
	backdrop-filter: none;
}

.durak-overlay.is-visible {
	display: flex;
}

.durak-overlay.is-early-finish { z-index: 40; background: rgba(8, 30, 14, .48); }
#durak-early-finish-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
#durak-early-finish-actions[hidden] { display: none; }
#durak-early-finish-actions button { flex: 1 1 120px; min-width: 0; }

.durak-overlay__panel {
	width: min(390px, 100%);
	padding: 25px 28px 27px;
	border-radius: 5px;
	color: #193522;
	text-align: center;
	background: #fff;
	box-shadow: 0 12px 36px rgba(0, 0, 0, .3);
}

.durak-overlay__cards {
	display: block;
	margin-bottom: 7px;
	color: #1d5e30;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 28px;
	letter-spacing: 5px;
}

.durak-overlay h1 {
	margin: 0 0 8px;
	font-size: 30px;
	line-height: 1.15;
}

.durak-overlay p {
	margin: 0 0 18px;
	color: #607067;
	font-size: 14px;
	line-height: 1.4;
}

.durak-settings { margin: 18px 0; text-align: left; }
.durak-settings[hidden] { display: none; }
.durak-settings fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.durak-settings legend { margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.durak-settings__choices { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.durak-settings__choices label { position: relative; flex: 0 0 auto; cursor: pointer; }
.durak-settings__choices input { position: absolute; opacity: 0; }
.durak-settings__choices span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 3px 0;
	border: 0;
	color: #30483a;
	font-size: 13px;
	background: transparent;
}
.durak-settings__choices span::before {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 19px;
	height: 19px;
	border: 2px solid #9fb2a4;
	border-radius: 50%;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	background: #fff;
	content: '';
}
.durak-settings__choices input:checked + span { color: #193f25; font-weight: 700; }
.durak-settings__choices input:checked + span::before {
	border-color: #13491d;
	background: #13491d;
	box-shadow: inset 0 0 0 4px #fff;
	content: '';
}
.durak-settings__choices input:focus-visible + span { outline: 2px solid #13491d; outline-offset: 3px; border-radius: 3px; }
.durak-settings p { min-height: 58px; margin: 0; font-size: 12px; }

.durak-overlay #durak-play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 150px;
	border-radius: 6px;
	background: #cb6300;
	box-shadow: 0 5px 14px rgba(154, 74, 7, .28);
}

.durak-overlay #durak-play:hover,
.durak-overlay #durak-play:focus-visible {
	color: #fff;
	background: #ad5300;
	outline: 2px solid #e8903e;
	outline-offset: 2px;
}

.durak-overlay #durak-play svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}
/* Center ready/result panels in the entire game viewport, including the toolbar. */
.durak-multiplayer .durak-overlay { position: fixed; }
.durak-multiplayer.is-online-session.is-finished .durak-overlay { z-index: 40; background: rgba(8, 30, 14, .48); }
.durak-multiplayer .durak-overlay__panel { max-height: 100%; overflow: auto; }
.durak-multiplayer .durak-seats { position: absolute; inset: 0; display: block; pointer-events: none; }
.durak-multiplayer.is-online-session.is-finished .durak-seats { display: none; }
.durak-multiplayer .durak-seat {
	position: absolute; min-width: 0; display: flex; flex-direction: column;
	justify-content: flex-start; align-items: center; gap: 8px;
	border-radius: 8px; padding: 3px 5px; border: 1px solid transparent; pointer-events: auto;
}
.durak-multiplayer .durak-seat[data-position="top"] { top: 4px; left: 50%; width: min(480px, 52%); height: calc(var(--card-height) + 40px); transform: translateX(-50%); }
.durak-multiplayer .durak-seat[data-position="left"],
.durak-multiplayer .durak-seat[data-position="right"] { top: 42%; width: calc(var(--card-width) + 22px); height: min(290px, 40%); transform: translateY(-50%); }
.durak-multiplayer .durak-seat[data-position="left"] { left: 8px; }
.durak-multiplayer .durak-seat[data-position="right"] { right: 8px; }
.durak-multiplayer .durak-seat:not([data-position="top"]) .durak-hand { flex-direction: column; flex: 1; min-height: 0; }
.durak-multiplayer .durak-seat:not([data-position="top"]) .durak-card { flex: 0 0 var(--card-height); }
.durak-multiplayer .durak-seat[hidden] { display: none; }
.durak-multiplayer .durak-seat.is-active { border-color: #f2d774; background: #13491d55; }
.durak-multiplayer .durak-seat__label {
	display: grid; grid-template-columns: auto minmax(64px, auto);
	justify-content: center; align-items: center; gap: 6px 10px;
	color: #fff; font-size: 12px; min-height: 28px;
}
.durak-multiplayer .durak-seat__name { white-space: nowrap; }
.durak-multiplayer .durak-seat__status {
	min-width: 64px; color: #e0e8dc; font-size: 11px; text-align: center; white-space: nowrap;
}
.durak-multiplayer .durak-seat:not([data-position="top"]) .durak-seat__label {
	display: flex; flex-direction: column; gap: 4px;
}
.durak-multiplayer .durak-card__count {
	position: absolute; z-index: 5; right: 3px; bottom: 3px;
	display: flex; align-items: center; justify-content: center;
	min-width: 28px; height: 28px; padding: 0 6px; border-radius: 50%;
	color: #184527; font-size: 13px; font-weight: 700; line-height: 1;
	background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .24);
}
.durak-multiplayer .durak-card__count--player {
	display: none;
	color: #eef5ef;
	background: rgba(19, 73, 29, .92);
}
.durak-multiplayer .is-defender [data-seat-role] { color: #ffe498; }
.durak-multiplayer .durak-seat .durak-hand { width: 100%; }
.durak-multiplayer .durak-board {
	grid-template-rows: calc(var(--card-height) + 40px) minmax(0, 1fr) 40px 46px minmax(calc(var(--card-height) + 26px), .65fr);
}
.durak-multiplayer .durak-play-area { grid-row: 2; position: static; display: flex; justify-content: center; margin: 0 calc(var(--card-width) + 25px); }
.durak-multiplayer .durak-table { width: 100%; max-height: 100%; }
.durak-multiplayer .durak-table__empty { min-width: 0; width: min(200px, 100%); text-align: center; }
.durak-multiplayer .durak-stock,
.durak-multiplayer .durak-discard { position: absolute; top: 12px; width: calc(var(--card-width) * 1.8); height: var(--card-height); }
.durak-multiplayer .durak-stock { left: 14px; }
.durak-multiplayer[data-player-count="2"] .durak-stock,
.durak-multiplayer[data-player-count="3"] .durak-stock { top: 50%; translate: 0 -50%; }
.durak-multiplayer .durak-discard { right: 14px; }
.durak-multiplayer .durak-message { grid-row: 3; }
.durak-multiplayer .durak-actions { grid-row: 4; }
.durak-multiplayer .durak-player { grid-row: 5; padding-top: 26px; }
/* Reserve the caption space even during bot turns so the hand never jumps. */
.durak-multiplayer .durak-hand--player { position: relative; }
.durak-multiplayer .durak-turn-notice { position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; color: #f2d774; font-size: 15px; font-weight: 700; line-height: 20px; white-space: nowrap; pointer-events: none; }

.durak-multiplayer.is-ready .durak-seat,
.durak-multiplayer.is-ready .durak-discard,
.durak-multiplayer.is-ready .durak-player-label--you {
	visibility: hidden;
}
@media (max-width: 390px) {
	.durak-multiplayer .durak-header__state { display: flex; flex: 0 0 88px; min-width: 88px; padding-inline: 8px; }
	.durak-multiplayer .durak-header__title { min-width: 0; }
}
.durak-multiplayer .durak-message { white-space: normal; line-height: 1.3; }
.durak-multiplayer .durak-actions { gap: 6px; }
.durak-multiplayer .durak-actions button { min-width: 0; }
@media (max-width: 680px) {
	.durak-multiplayer .durak-seat { padding: 2px; gap: 4px; }
	.durak-multiplayer .durak-seat__label { font-size: 11px; min-height: 26px; gap: 3px 6px; }
	.durak-multiplayer .durak-seat__status { min-width: 52px; font-size: 10px; }
	.durak-multiplayer .durak-card__count { min-width: 23px; height: 23px; padding-inline: 5px; font-size: 11px; }
	.durak-multiplayer .durak-seat { --card-width: calc(42px * var(--durak-scale)); --card-height: calc(57px * var(--durak-scale)); }
	.durak-multiplayer .durak-seat[data-position="left"] { left: 3px; }
	.durak-multiplayer .durak-seat[data-position="right"] { right: 3px; }
	.durak-multiplayer .durak-seat[data-position="top"] { width: 48%; }
	.durak-multiplayer .durak-play-area { margin: 0 calc(42px * var(--durak-scale) + 28px); }
	.durak-multiplayer .durak-stock,
	.durak-multiplayer .durak-discard { --card-width: calc(38px * var(--durak-scale)); --card-height: calc(51px * var(--durak-scale)); top: 20px; }
	.durak-multiplayer .durak-board { grid-template-rows: 104px minmax(0, 1fr) 40px 41px minmax(calc(var(--card-height) + 26px), .65fr); }
}
@media (max-height: 500px) and (orientation: landscape) {
	.durak-multiplayer .durak-board { --card-width: calc(36px * var(--durak-scale)); --card-height: calc(48px * var(--durak-scale)); grid-template-rows: calc(var(--card-height) + 22px) minmax(0, 1fr) 28px 38px calc(var(--card-height) + 26px); }
	.durak-multiplayer .durak-seat { --card-width: calc(36px * var(--durak-scale)); --card-height: calc(48px * var(--durak-scale)); }
	.durak-multiplayer .durak-seat[data-position="top"] { height: calc(var(--card-height) + 22px); gap: 2px; }
	.durak-multiplayer .durak-seat[data-position="top"] .durak-seat__label { min-height: 16px; }
	.durak-multiplayer .durak-seat:not([data-position="top"]) { top: 48%; height: 50%; width: 84px; }
	.durak-multiplayer .durak-seat__label { font-size: 10px; gap: 1px 4px; }
	.durak-multiplayer .durak-play-area { margin: 0 90px; }
	.durak-multiplayer .durak-stock,
	.durak-multiplayer .durak-discard { --card-width: 28px; --card-height: 38px; top: 4px; }
	.durak-multiplayer .durak-overlay__panel { padding: 12px 18px; }
	.durak-multiplayer .durak-overlay__cards { display: none; }
}

.durak-card-flight {
	position: fixed !important;
	z-index: 1000 !important;
	margin: 0 !important;
	pointer-events: none !important;
	transform-origin: center;
}

@media (max-width: 900px) {
	.durak-board {
		padding-inline: 9px;
	}

	.durak-player-label {
		display: none;
	}

	.durak-hand {
		width: calc(100% - 12px);
	}

	.durak-message {
		padding-inline: 12px;
	}
}

@media (max-width: 680px) {
	.durak-hand--player .durak-hand-tools {
		position: absolute;
		right: 0;
		bottom: calc(100% + 12px);
		margin-left: 0;
	}

	.durak-player-card-count {
		display: none;
	}

	.durak-multiplayer .durak-card__count--player {
		display: flex;
	}

	.durak-app {
		grid-template-rows: 50px minmax(0, 1fr);
	}

	.durak-header,
	.durak-header__all,
	.durak-header__title,
	.durak-header__state {
		height: 50px;
	}

	.durak-header__all {
		min-width: 94px;
		padding: 0 12px;
		font-size: 15px;
	}

	.durak-header__title {
		min-width: 0;
		padding: 0 12px;
		font-size: 17px;
	}

	.durak-header__state {
		flex: 1 1 112px;
		min-width: 104px;
		padding: 0 10px;
	}

	.durak-header__state-label {
		display: none;
	}

	.durak-header__state strong {
		font-size: 12px;
	}

	.durak-toolbar {
		height: 50px;
		padding: 7px 8px;
	}

	.durak-tool {
		gap: 0;
		margin-right: 7px;
	}

	.durak-tool > span:last-child,
	.durak-zoom__label {
		display: none;
	}

	.durak-board {
		--card-width: calc(58px * var(--durak-scale));
		--card-height: calc(78px * var(--durak-scale));
		grid-template-rows:
			minmax(var(--card-height), .72fr)
			minmax(calc(var(--card-height) * 1.8), 2fr)
			22px
			41px
			minmax(var(--card-height), .9fr);
		padding: 2px 3px 5px;
	}

	.durak-play-area {
		grid-template-columns: 57px minmax(194px, 1fr) 48px;
	}

	.durak-table {
		gap: 0;
		padding: 0;
	}

	.durak-table__empty {
		min-width: 132px;
		height: 58px;
		font-size: 11px;
	}

	.durak-pair {
		width: calc(var(--card-width) * 1.08);
		height: calc(var(--card-height) * 1.16);
	}

	.durak-pair .durak-pair__defense {
		left: calc(var(--card-width) * .15);
		top: calc(var(--card-height) * .13);
	}

	.durak-stock {
		transform: scale(.82);
	}

	.durak-discard {
		transform: scale(.7);
	}

	.durak-stock__count,
	.durak-discard strong {
		right: -2px;
	}

	.durak-message {
		font-size: 11px;
	}

	.durak-actions button {
		min-width: 112px;
		height: 35px;
		padding-inline: 14px;
		font-size: 12px;
	}

	.durak-overlay {
		padding: 10px;
	}

	.durak-overlay__panel {
		padding: 19px 16px 21px;
	}

	.durak-overlay h1 {
		font-size: 25px;
	}
}

@media (max-width: 390px) {
	.durak-header__state {
		display: none;
	}

	.durak-play-area {
		grid-template-columns: 52px minmax(184px, 1fr) 43px;
	}

	.durak-board {
		--card-width: calc(54px * var(--durak-scale));
		--card-height: calc(73px * var(--durak-scale));
	}
}

@media (max-height: 620px) and (min-width: 681px) {
	.durak-app {
		grid-template-rows: 52px minmax(0, 1fr);
	}

	.durak-header,
	.durak-header__all,
	.durak-header__title,
	.durak-header__state {
		height: 52px;
	}

	.durak-toolbar {
		height: 52px;
		padding-block: 8px;
	}

	.durak-board {
		--card-width: calc(62px * var(--durak-scale));
		--card-height: calc(84px * var(--durak-scale));
		grid-template-rows:
			minmax(var(--card-height), .7fr)
			minmax(calc(var(--card-height) * 1.32), 1.8fr)
			21px
			46px
			minmax(var(--card-height), .85fr);
		padding-block: 2px 4px;
	}

	.durak-message {
		font-size: 12px;
	}
}

@media (max-height: 500px) {
	.durak-app {
		grid-template-rows: 46px minmax(0, 1fr);
	}

	.durak-header,
	.durak-header__all,
	.durak-header__title,
	.durak-header__state {
		height: 46px;
	}

	.durak-toolbar {
		height: 46px;
		padding-block: 5px;
	}

	.durak-board {
		--card-width: calc(54px * var(--durak-scale));
		--card-height: calc(73px * var(--durak-scale));
		grid-template-rows:
			minmax(var(--card-height), .62fr)
			minmax(calc(var(--card-height) * 1.17), 1.55fr)
			20px
			41px
			minmax(var(--card-height), .75fr);
	}

	.durak-overlay__cards {
		display: none;
	}

	.durak-overlay__panel {
		padding-block: 14px 16px;
	}

	.durak-overlay h1 {
		font-size: 24px;
	}

	.durak-overlay p {
		margin-bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.durak-card {
		transition: none;
	}
}
.durak-online-panel {
	display: grid;
	gap: 10px;
	width: min(100%, 390px);
	margin: 18px auto 0;
}

.durak-online-panel h2 {
	margin: 0 0 4px;
	font-size: 1.2rem;
}

.durak-online-player-count {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 2px 0;
	padding: 8px 12px;
	border: 1px solid #d3e0d5;
	border-radius: 12px;
}

.durak-online-player-count legend {
	padding: 0 6px;
	color: #30483a;
	font-size: 12px;
	font-weight: 700;
}

.durak-online-player-count .durak-settings__choices { justify-content: center; }

.durak-online-panel button,
.durak-overlay .durak-online-panel button {
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #b8cdbb;
	border-radius: 12px;
	color: #193522;
	background: #edf4ee;
	font: inherit;
	cursor: pointer;
}

.durak-online-panel button:hover,
.durak-online-panel button:focus-visible {
	color: #102b18;
	background: #dcebdd;
	border-color: #78977e;
}

.durak-overlay #durak-mode-back {
	min-width: 0;
	height: auto;
	margin-top: 12px;
	padding: 7px 12px;
	color: #31563a;
	font-size: 12px;
	background: transparent;
	box-shadow: none;
}

.durak-overlay #durak-mode-back:hover,
.durak-overlay #durak-mode-back:focus-visible { color: #13491d; text-decoration: underline; }

.durak-online-panel a {
	color: #fff;
	text-align: center;
}

.durak-invite-row {
	display: flex;
	gap: 8px;
}

.durak-invite-row input {
	min-width: 0;
	flex: 1;
	padding: 8px;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 8px;
}

.durak-invite-row button {
	padding-inline: 10px;
}

.durak-online-status {
	position: fixed;
	top: 8px;
	left: 50%;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-width: 0;
	max-width: calc(100vw - 150px);
	margin: 0;
	padding: 6px 9px;
	border-radius: 999px;
	color: #fff;
	background: rgba(4, 35, 26, .72);
	font-size: .78rem;
	white-space: nowrap;
	transform: translateX(-50%);
}

.durak-online-status > span:first-child { max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
#durak-connection-status { color: #ff7373; }
#durak-connection-status[hidden] { display: none; }

#durak-turn-timer {
	font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
	.durak-online-status { gap: 5px; padding: 5px 7px; font-size: .7rem; }
	.durak-online-status > span:first-child { display: none; }
	#durak-connection-status { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}

#durak-mode-select[hidden],
#durak-online-lobby[hidden],
#durak-online-status[hidden],
#durak-private-invite[hidden],
#durak-play[hidden],
#durak-mode-back[hidden] {
	display: none !important;
}

/* Lobby composition; the game toolbar and playing table retain their styles. */
.durak-home, .durak-home__sidebar, .durak-home__main { display: contents; }
.durak-rooms { display: none; }
.durak-app.is-home { display: block; }
.durak-app.is-home > .durak-header { display: none; }
.durak-app.is-home .durak-board { display: block; height: auto; min-height: 0; overflow: visible; padding: 18px; user-select: auto; }
.durak-app.is-home .durak-home { display: grid; grid-template-columns: minmax(225px, 28%) minmax(0, 1fr); gap: 18px; max-width: 1160px; margin: 0 auto; }
.durak-app.is-home .durak-home__sidebar { display: block; min-width: 0; }
.durak-app.is-home .durak-home__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.durak-rating {
	--durak-ui-green: #13491d;
	--durak-ui-green-hover: #0f4119;
	--durak-ui-text: #193522;
	--durak-ui-muted: #607067;
	--durak-ui-surface: #f2f6f3;
	--durak-ui-border: #cbd8cd;
	display: flex; flex-direction: column; box-sizing: border-box; min-width: 0; min-height: 0; max-height: none;
	padding: 30px; overflow: visible; border: 0; border-radius: 8px; color: #193522; background: #fff;
	font-family: Arial, Helvetica, sans-serif; box-shadow: 0 0 24px rgba(0,0,0,.06);
}
.durak-rating__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; min-height: 44px; padding: 0 0 16px; font-size: 14px; }
.durak-rating__filters { justify-content: flex-end; }
#durak-rating-count[hidden], #durak-rating-help[hidden], #durak-elo-result[hidden] { display: none; }
#durak-elo-result { color: var(--durak-ui-green); font-size: 16px; font-weight: 400; }
#durak-game-rating-status { font-size: 12px; font-weight: 400; }
.durak-rating__status { margin: 0; padding: 12px; color: #76847a; font-size: 12px; }
.durak-rating__list { min-height: 0; max-height: 568px; margin: 0; padding: 0 9px 8px; overflow-y: auto; list-style: none; }
.durak-rating__item { box-sizing: border-box; display: grid; grid-template-columns: 18px 30px minmax(0,1fr) auto; align-items: center; gap: 7px; height: 56px; padding: 8px 1px; border-bottom: 1px solid #edf1ed; }
.durak-rating__position { color: #76847a; font-size: 11px; }
.durak-rating__item img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #e6eee7; }
.durak-rating__name { min-width: 0; overflow: hidden; color: #193522; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.durak-rating__score { grid-column: 4; color: #76847a; font-size: 10px; line-height: 1.5; text-align: right; }
.durak-rating__wins { display: flex; justify-content: flex-end; gap: 8px; }
.durak-rating__win-mode { display: inline-flex; align-items: center; gap: 2px; }
.durak-rating__win-mode svg { width: 12px; height: 12px; fill: currentColor; }
.durak-rating__win-count { font-size: 9px; }
.durak-rating__win-mode strong { color: #193522; font-size: 11px; }
.durak-rating__games { display: block; }
.durak-app.is-home .durak-players, .durak-app.is-home .durak-chat {
	position: relative; inset: auto; z-index: 1; width: 100%; border-radius: 6px;
	box-shadow: 0 3px 10px rgba(0,0,0,.13);
}
.durak-app.is-home .durak-players { display: flex; min-height: 260px; height: auto; max-height: 650px; }
.durak-app.is-home .durak-players__busy { font-size: 11px; }
.durak-app.is-home .durak-players__list { max-height: 440px; flex: auto; }
.durak-app.is-home .durak-chat { display: flex; height: 300px; min-height: 230px; }
.durak-app.is-home .durak-players__header button,
.durak-app.is-home .durak-chat-toggle,
.durak-app.is-home .durak-players-toggle { display: none; }
.durak-app.is-home .durak-chat.is-closed { display: flex; height: 44px; min-height: 44px; }
.durak-app.is-home .durak-chat.is-closed .durak-chat__header { border-bottom: 0; min-height: 42px; }
.durak-app.is-home .durak-chat.is-closed > :not(.durak-chat__header) { display: none; }
.durak-app.is-home .durak-players { box-sizing: border-box; height: 520px; min-height: 520px; max-height: 520px; }
.durak-app.is-home .durak-chat.is-expanded:not(.is-closed) { height: 520px; min-height: 520px; }
.durak-chat__header-actions { display: inline-flex; align-items: center; gap: 6px; }
.durak-app.is-home .durak-board > .durak-opponent,
.durak-app.is-home .durak-board > .durak-play-area,
.durak-app.is-home .durak-board > .durak-message,
.durak-app.is-home .durak-board > .durak-actions,
.durak-app.is-home .durak-board > .durak-player { display: none; }
.durak-app.is-home .durak-rooms { display: block; padding: 18px; border: 1px solid rgba(17,63,30,.3); border-radius: 6px; color: #193522; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.13); }
.durak-rooms__header, .durak-rooms__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.durak-rooms__header { justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.durak-rooms__header h2 { margin: 0; font-size: 18px; }
.durak-computer-label--mobile { display: none; }
.durak-rooms__actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; white-space: nowrap; }
.durak-room-action-icon { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.durak-rooms button, .durak-room-dialog button { padding: 10px 14px; border: 0; border-radius: 4px; color: #fff; font: inherit; font-size: 13px; background: #13491d; cursor: pointer; }
.durak-rooms button:hover, .durak-room-dialog button:hover { background: #0f4119; }
.durak-rooms button:disabled, .durak-room-dialog button:disabled { opacity: .5; cursor: default; }
.durak-rooms button.durak-room-primary, .durak-room-dialog button.durak-room-primary { background: #cb6300; }
.durak-room-primary:hover { filter: brightness(.92); }
.durak-room-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.durak-room-filters button { padding: 6px 10px; color: #607067; background: #f2f6f3; border: 1px solid #d7e2d9; }
.durak-room-filters button[aria-pressed="true"] { color: #fff; background: #13491d; border-color: #13491d; }
.durak-rooms__status { margin: 16px 0 0; color: #607067; font-size: 13px; }
.durak-room-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid #e2e9e3; margin-top: 12px; }
.durak-room-row__info { min-width: 0; }
.durak-room-row__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.durak-room-row__title small { color: #607067; font-size: 12px; }
.durak-room-seats { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.durak-room-seat { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; text-align: center; }
.durak-room-seat img, .durak-room-seat__empty { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #edf4ee; }
.durak-room-seat__empty { display: flex; align-items: center; justify-content: center; border: 1px dashed #b6c7bb; color: #84978a; }
.durak-room-seat span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.durak-room-seats__count { color: #607067; font-size: 12px; padding-top: 8px; }
.durak-room-row__join { flex-shrink: 0; }
.durak-waiting-room { margin-top: 16px; padding: 14px; border: 1px solid #b9d0bf; border-radius: 5px; background: #f2f7f3; }
.durak-waiting-room p { font-size: 13px; color: #607067; }
.durak-waiting-room__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.durak-room-link { width: 100%; padding: 9px; border: 1px solid #cbd8cd; border-radius: 4px; color: #193522; font: inherit; font-size: 12px; background: #fff; }
.durak-room-dialog { position: fixed; z-index: 50; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(8,30,14,.4); overflow-y: auto; }
.durak-auth-dialog { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(8,30,14,.55); }
.durak-auth-dialog[hidden] { display: none; }
.durak-auth-dialog__panel { width: min(440px,100%); padding: 30px; border-radius: 8px; color: #193522; background: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.durak-auth-dialog__panel h2 { margin: 0 0 10px; font-size: 23px; }
.durak-auth-dialog__panel p { margin: 0; color: #607067; font-size: 14px; line-height: 1.5; }
.durak-auth-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.durak-auth-dialog__actions a, .durak-auth-dialog__actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 0; border-radius: 4px; color: #fff; font: inherit; text-decoration: none; background: #13491d; cursor: pointer; }
.durak-auth-dialog__actions button { color: #31563a; background: #edf4ee; }
.durak-auth-dialog__actions a:hover { background: #0f4119; }
.durak-auth-dialog__actions button:hover { background: #e2ece4; }
.durak-verification-dialog__actions { flex-wrap: wrap; }
.durak-room-dialog[hidden], .durak-waiting-room[hidden], .durak-room-row[hidden] { display: none; }
.durak-room-dialog__panel { position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr); width: min(700px,100%); max-height: 100%; overflow-y: auto; border-radius: 5px; color: #193522; background: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.durak-room-dialog__modes { display: flex; flex-direction: column; gap: 12px; padding: 28px 16px; background: #f2f6f3; }
.durak-room-dialog__modes button { padding: 12px 14px; text-align: left; color: var(--durak-ui-muted); border: 1px solid transparent; background: transparent; }
.durak-room-dialog__modes button[aria-pressed="true"] { color: var(--durak-ui-green); border-color: var(--durak-ui-border); background: #fff; }
.durak-room-dialog__modes button strong { display: block; font-size: 17px; }
.durak-room-dialog__modes button span { display: block; margin-top: 8px; font-size: 12px; line-height: 1.4; }
.durak-room-dialog__body { padding: 32px 28px; }
.durak-room-dialog__body h2 { margin: 0 0 8px; font-size: 25px; }
.durak-room-dialog__body > p { color: #607067; font-size: 13px; line-height: 1.4; }
.durak-room-dialog__count { margin: 24px 0 0; padding: 0 0 18px; border: 0; border-bottom: 1px solid #e2e9e3; }
.durak-room-dialog__count legend { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.durak-room-setting { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 0; border-bottom: 1px solid #e2e9e3; font-size: 14px; cursor: pointer; }
.durak-room-setting small { display: block; margin-top: 4px; font-size: 12px; color: #607067; }
.durak-room-switch { appearance: none; width: 44px; height: 25px; flex: 0 0 44px; border-radius: 14px; position: relative; margin: 0; background: #d6ded8; cursor: pointer; }
.durak-room-switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; }
.durak-room-switch:checked { background: #13491d; }
.durak-room-switch:checked::before { left: 22px; }
.durak-room-dialog__body > button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 24px; }
.durak-room-dialog__body > button[type="submit"] svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.durak-room-dialog__body .durak-room-dialog__note { font-size: 12px; text-align: center; }
.durak-room-dialog button.durak-room-dialog__close { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border-radius: 50%; line-height: 1; color: #31563a; background: #edf4ee; }
.durak-room-dialog__close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.durak-room-dialog__body { padding-top: 54px; }
.durak-app.is-finished:not(.is-online-session) { grid-template-rows: minmax(0, 1fr); }
.durak-app.is-finished:not(.is-online-session) > .durak-header { display: none; }
.durak-app.is-finished:not(.is-online-session) .durak-board > :not(.durak-overlay) { display: none; }
.durak-app.is-finished:not(.is-online-session) .durak-overlay { background: #2c733b url('/img/games/durak/bgpattern.png') repeat; }
#durak-result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
#durak-result-actions[hidden] { display: none !important; }
#durak-result-actions button:disabled { opacity: .5; cursor: default; }
.durak-room-dialog__body .durak-room-error { color: #ad2a20; }
.durak-room-dialog [hidden] { display: none !important; }
.durak-room-dialog #durak-settings { margin: 24px 0 0; }
.durak-room-dialog__modes button:not([aria-pressed="true"]):hover { color: var(--durak-ui-green-hover); background: #e2ece4; }
.durak-room-dialog__modes button[aria-pressed="true"]:hover { color: var(--durak-ui-green-hover); background: #fff; }
.durak-app.is-home .durak-overlay.is-visible { background: rgba(8,30,14,.35); }
.durak-chat__composer { position: relative; display: flex; flex: 1; min-width: 0; }
.durak-chat__composer input { width: 100%; padding-right: 40px; }
.durak-chat__form button.durak-chat__emoji-toggle {
	position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
	width: 34px; height: 34px; padding: 0; font-size: 22px; background: transparent;
}
.durak-chat__emoji-toggle:hover, .durak-chat__emoji-toggle[aria-expanded="true"] { filter: brightness(.9); }
.durak-emoji-picker {
	position: absolute; z-index: 30; bottom: calc(100% + 10px); right: 0;
	width: min(300px, 100%); max-height: min(260px, 45dvh); overflow-y: auto;
	padding: 12px; border: 1px solid #d7e2d9; border-radius: 7px;
	color: #193522; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.durak-emoji-picker[hidden] { display: none; }
.durak-emoji-picker > strong { display: block; margin: 0 0 8px; font-size: 12px; color: #607067; }
.durak-emoji-picker__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.durak-chat__form .durak-emoji-picker__grid button {
	display: flex; align-items: center; justify-content: center;
	min-width: 0; min-height: 38px; padding: 3px; font-size: 26px; background: transparent;
}
.durak-chat__form .durak-emoji-picker__grid button:hover,
.durak-chat__form .durak-emoji-picker__grid button:focus-visible { background: #edf4ee; }
@media (pointer: coarse) {
	.durak-chat__form .durak-emoji-picker__grid button { min-height: 44px; }
}
@media (max-width: 680px) {
	.durak-computer-label--desktop { display: none; }
	.durak-computer-label--mobile { display: inline; }
	.durak-app.is-home .durak-board { padding: 10px; }
	.durak-app.is-home .durak-home { grid-template-columns: minmax(0,1fr); gap: 14px; }
	.durak-app.is-home .durak-home__sidebar { grid-row: 2; }
	.durak-app.is-home .durak-home__main { gap: 14px; }
	.durak-rating { padding: 20px; }
	.durak-app.is-home .durak-chat { height: 250px; }
	.durak-app.is-home .durak-rooms { padding: 14px; }
	.durak-rooms__actions { width: 100%; }
	.durak-rooms__actions button { flex: 1; padding: 10px 8px; font-size: 12px; }
	.durak-room-row { flex-wrap: wrap; }
	.durak-room-dialog__panel { grid-template-columns: minmax(0,1fr); }
	.durak-room-dialog__modes { flex-direction: row; padding: 34px 12px 12px; }
	.durak-room-dialog__modes button { flex: 1; padding: 10px; }
	.durak-room-dialog__modes button strong { font-size: 14px; }
	.durak-room-dialog__modes button span { display: none; }
	.durak-room-dialog__body { padding: 20px; }
	.durak-room-dialog input[type="text"], .durak-app.is-home .durak-chat__form input { font-size: 16px; }
}

/* Shared UI hierarchy for lobby, chat and both game setup modes.
   Card typography and the playing-table toolbar are intentionally separate. */
.durak-rooms, .durak-room-dialog__panel, .durak-chat, .durak-players {
	color: var(--durak-ui-text);
	font-size: var(--durak-ui-body-size);
	line-height: 1.5;
}
.durak-rooms__header h2, .durak-chat__header > strong, .durak-players__header > strong {
	color: var(--durak-ui-text);
	font-size: var(--durak-ui-heading-size);
	font-weight: 700;
	line-height: 1.3;
}
.durak-room-dialog__body h2 { font-size: 24px; font-weight: 700; line-height: 1.25; }
.durak-room-dialog__modes button strong { font-size: var(--durak-ui-heading-size); font-weight: 400; line-height: 1.3; }
.durak-room-dialog__modes button span { font-size: var(--durak-ui-small-size); font-weight: 400; line-height: 1.5; }
.durak-room-dialog__body fieldset { margin: 24px 0 0; padding: 0 0 18px; border: 0; border-bottom: 1px solid #e2e9e3; }
.durak-room-dialog #durak-settings { margin: 0; }
.durak-room-dialog__body legend { margin-bottom: 10px; font-size: var(--durak-ui-body-size); font-weight: 700; }
.durak-room-dialog .durak-settings__choices {
	display: inline-flex; max-width: 100%; gap: 2px; padding: 3px;
	border-radius: 7px; background: var(--durak-ui-surface);
}
.durak-room-dialog .durak-settings__choices label { min-width: 0; }
.durak-room-dialog .durak-settings__choices span {
	display: flex; justify-content: center; min-height: 32px; padding: 5px 12px;
	border: 1px solid transparent; border-radius: 5px;
	color: var(--durak-ui-muted); background: transparent;
	font-size: var(--durak-ui-body-size); font-weight: 400; line-height: 1.5;
}
.durak-room-dialog .durak-settings__choices input:checked + span {
	color: var(--durak-ui-green); background: #fff; border-color: var(--durak-ui-border); font-weight: 400;
}
.durak-room-dialog .durak-settings__choices span::before { display: none; }
.durak-room-dialog .durak-settings__choices label:hover span { color: var(--durak-ui-green-hover); }
.durak-room-dialog__body p, .durak-room-dialog .durak-settings p {
	min-height: 0; color: var(--durak-ui-muted); font-size: 13px; font-weight: 400; line-height: 1.5;
}
.durak-room-dialog #durak-rules-description, .durak-room-dialog #durak-online-rules-description { margin: 14px 0 0; }
.durak-room-dialog__body .durak-room-dialog__note { font-size: var(--durak-ui-small-size); }
.durak-room-dialog__body .durak-room-error { color: #ad2a20; }
.durak-rooms button, .durak-room-dialog button, .durak-chat__form > button,
.durak-players__item button, .durak-invite button {
	font-family: inherit; font-size: var(--durak-ui-body-size); font-weight: 600; line-height: 1.25;
	border-radius: 6px;
}
.durak-rooms__actions button, .durak-room-row__join, .durak-waiting-room__actions button,
.durak-room-dialog__body > button[type="submit"], .durak-chat__form > button {
	min-height: 40px; height: auto; padding: 10px 14px;
	color: #fff; background: var(--durak-ui-green);
}
.durak-players__item button, .durak-invite button { min-height: 25px; padding: 5px 10px; background: var(--durak-ui-green); }
.durak-rooms button:hover, .durak-chat__form > button:hover,
.durak-players__item button:hover, .durak-invite button:hover { background: var(--durak-ui-green-hover); }
.durak-rooms button.durak-room-primary, .durak-room-dialog button.durak-room-primary { background: var(--durak-ui-orange); }
.durak-players__item button, .durak-room-filters button {
	color: var(--durak-ui-green); border: 1px solid var(--durak-ui-border);
	background: transparent; font-weight: 400;
}
.durak-room-filters button { min-height: 32px; font-size: 13px; }
.durak-room-filters { align-items: center; gap: 10px; }
.durak-room-filters__label { color: var(--durak-ui-muted); font-size: 12px; font-weight: 400; }
.durak-room-filters__options { display: inline-flex; gap: 2px; padding: 3px; border-radius: 7px; background: var(--durak-ui-surface); }
.durak-room-filters .durak-room-filters__options button {
	min-width: 36px; min-height: 28px; padding: 4px 10px; border: 0; border-radius: 5px;
	color: var(--durak-ui-muted); background: transparent; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.25; box-shadow: none;
}
.durak-room-filters .durak-room-filters__options button[aria-pressed="true"],
.durak-players__item button, .durak-chat__form > button {
	color: var(--durak-ui-green); background: #fff; border: 1px solid var(--durak-ui-border); border-radius: 5px;
	font-weight: 400;
}
.durak-players__item button:hover, .durak-room-filters button:hover,
.durak-room-filters .durak-room-filters__options button:hover {
	color: var(--durak-ui-green-hover); background: transparent;
}
#durak-rating .durak-rating__filters .durak-room-filters__options {
	display: inline-flex; gap: 2px; padding: 3px; border-radius: 7px; background: var(--durak-ui-surface);
}
#durak-rating .durak-rating__filters .durak-room-filters__options button {
	min-width: 36px; min-height: 28px; padding: 4px 10px; border: 0; border-radius: 5px;
	color: var(--durak-ui-muted); background: transparent; font-family: inherit; font-size: 13px;
	font-weight: 400; line-height: 1.25; box-shadow: none;
}
#durak-rating .durak-rating__filters .durak-room-filters__options button[aria-pressed="true"] {
	color: var(--durak-ui-green); background: #fff; border: 1px solid var(--durak-ui-border); border-radius: 5px;
}
.durak-chat__form > button:hover {
	color: var(--durak-ui-green-hover); background: var(--durak-ui-surface);
}
.durak-rooms button:focus-visible, .durak-room-dialog button:focus-visible,
.durak-chat button:focus-visible, .durak-players button:focus-visible {
	outline: 2px solid var(--durak-ui-green); outline-offset: 3px;
}
.durak-room-dialog__modes button[aria-pressed="true"]:focus-visible { outline-offset: 3px; }
.durak-room-dialog button.durak-room-dialog__close:hover { color: var(--durak-ui-green); background: var(--durak-ui-surface); }
.durak-chat__form > button, .durak-chat__form input { height: 40px; }
.durak-chat__form input { padding-block: 8px; }
.durak-app.is-home .durak-chat.is-closed { height: 48px; min-height: 48px; }
.durak-chat__form input, .durak-players__search, .durak-room-link {
	color: var(--durak-ui-text); border-color: var(--durak-ui-border); border-radius: 6px;
	font-family: inherit; font-size: var(--durak-ui-body-size); font-weight: 400; line-height: 1.5;
}
.durak-chat__form input::placeholder, .durak-players__search::placeholder { color: var(--durak-ui-muted); opacity: 1; }
.durak-chat__message { font-size: var(--durak-ui-body-size); }
.durak-chat__text { color: var(--durak-ui-text); }
.durak-chat__message-meta strong, .durak-players__name { color: var(--durak-ui-text); font-size: 13px; font-weight: 600; }
.durak-chat__message-meta time, .durak-chat__status, .durak-players__status,
.durak-players__player-status, .durak-app.is-home .durak-players__busy,
.durak-room-row__title small, .durak-room-seats__count {
	color: var(--durak-ui-muted); font-size: var(--durak-ui-small-size); font-weight: 400;
}
.durak-rooms__status, .durak-waiting-room p { color: var(--durak-ui-muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
.durak-room-row__title strong, .durak-waiting-room > strong { font-size: var(--durak-ui-body-size); font-weight: 600; }
@media (max-width: 680px) {
	.durak-room-dialog__body h2 { font-size: 22px; }
	.durak-room-dialog__modes button strong { font-size: 14px; }
	.durak-rooms__actions button { padding-inline: 10px; }
	.durak-room-dialog .durak-settings__choices { display: flex; }
	.durak-room-dialog .durak-settings__choices label { flex: 1 1 0; }
	.durak-room-dialog .durak-settings__choices span { padding-inline: 6px; font-size: 13px; white-space: nowrap; }
	.durak-chat__form input, .durak-players__search, .durak-room-link { font-size: 16px; }
	.durak-chat__form > button, .durak-chat__form input { height: 44px; }
}
@media (min-width: 681px) {
	.durak-room-dialog__body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 18px; }
	.durak-room-dialog__body > * { grid-column: 1 / -1; }
	.durak-room-dialog #durak-settings:not([hidden]) { display: contents; }
	.durak-room-dialog #durak-kind-setting { grid-column: 1; grid-row: 3; min-width: 0; }
	.durak-room-dialog #durak-online-count, .durak-room-dialog #durak-computer-count { grid-column: 2; grid-row: 3; min-width: 0; }
	.durak-room-dialog #durak-online-rules-setting, .durak-room-dialog #durak-computer-rules-setting { grid-column: 1 / -1; grid-row: 4; min-width: 0; }
}
@media (pointer: coarse) {
	.durak-rooms button, .durak-players__item button, .durak-chat__form > button,
	.durak-room-dialog__body > button[type="submit"] { min-height: 44px; }
	.durak-room-filters .durak-room-filters__options button { min-height: 44px; min-width: 44px; }
	.durak-room-dialog .durak-settings__choices span { min-height: 44px; }
}
