:root {
	color-scheme: light;
	font-family: Arial, Helvetica, sans-serif;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	min-width: 320px;
	min-height: 0;
	margin: 0;
	overflow: hidden;
}

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

.durak-page {
	/* Anchor ads overlay the game; their body padding must not move the field. */
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	overflow: hidden;
	color: #fff;
	background: #f0f0f0;
}

.durak-app {
	/* Stay on screen even if an anchor ad changes body spacing or scrolls it.
	   No z-index: advertising overlays and their own controls stay above us. */
	position: fixed;
	top: 0;
	left: 0;
	display: grid;
	grid-template-rows: 54px 56px minmax(0, 1fr);
	width: 100%;
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
	background: #2c733b url('/i/themes/default/bgpattern.png') repeat;
}

.durak-header {
	display: flex;
	height: 54px;
	min-width: 0;
	color: #fff;
	background: #181818;
}

.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('/i/themes/default/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;
	outline: 0;
}

.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: 100%;
	min-height: 0;
	padding: 4px 18px 8px;
	overflow: hidden;
	background-color: #2c733b;
	background-image: url('/i/themes/default/bgpattern.png');
	background-repeat: repeat;
	user-select: none;
}

.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-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-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('/i/themes/default/back.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__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; gap: 6px; }
.durak-settings__choices label { position: relative; flex: 1; cursor: pointer; }
.durak-settings__choices input { position: absolute; opacity: 0; }
.durak-settings__choices span {
	display: block; padding: 10px 5px; border: 1px solid #cddcd0;
	border-radius: 6px; text-align: center; font-size: 13px; background: #f4f8f4;
}
.durak-settings__choices input:checked + span { border-color: #2e7d38; color: #fff; background: #2e7d38; }
.durak-settings__choices input:focus-visible + span { outline: 2px solid #13491d; outline-offset: 2px; }
.durak-settings p { min-height: 58px; margin: 0; font-size: 12px; }
/* Center ready/result panels in the entire game viewport, including the toolbar. */
.durak-multiplayer .durak-overlay { position: fixed; }
.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 .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: flex; flex-wrap: wrap; justify-content: center; align-items: center;
	gap: 3px 8px; color: #fff; font-size: 12px; min-height: 20px;
}
.durak-multiplayer .durak-seat__label [data-seat-role] { color: #e0e8dc; font-size: 11px; }
.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; }
@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: 32px; gap: 2px 6px; }
	.durak-multiplayer .durak-seat__label [data-seat-role] { order: 1; width: 100%; text-align: center; }
	.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[data-position="top"] [data-seat-role] { order: 0; width: auto; }
	.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-app {
		grid-template-rows: 50px 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: 50px 52px minmax(0, 1fr);
	}

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

	.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 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;
	}
}
