:root {
	color-scheme: dark;
	--felt: #1e5b3a;
	--felt-dark: #16462d;
	--cream: #f7f3e8;
	--ink: #232323;
	--gold: #d9a441;
	--muted: #cfc9b8;
	--danger: #b33;
	--font: system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	background: #1e241e;
	color: var(--cream);
	font-family: var(--font);
	font-size: 16px;
}

a {
	color: #f0d488;
}

a:hover {
	color: #fff;
}

code {
	font-family: var(--mono);
}

.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 46px;
	padding: 0 14px;
	background: #eee;
	color: #232323;
}

.app-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	font-size: 20pt;
	text-decoration: none;
}

.app-brand:hover {
	color: inherit;
}

.app-brand img {
	width: 34px;
	height: 46px;
}

.app-account {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 16pt;
}

.app-account a {
	color: #232323;
	text-decoration: none;
}

.app-account a:hover {
	text-decoration: underline;
}

.app-shell {
	width: min(960px, 100%);
	margin: 0 auto;
	padding: 20px 12px 0;
}

.app-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border: 10px solid #6f4a28;
	border-radius: 22px;
	background:
		radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.1), transparent 55%),
		radial-gradient(circle at 50% 50%, var(--felt), var(--felt-dark));
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.app-card h1 {
	margin: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--gold);
	font-size: 24pt;
	font-weight: 500;
}

.app-card h2 {
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 18pt;
	font-weight: 500;
}

.app-auth-card {
	width: min(520px, 100%);
	margin: 0 auto;
}

.app-home,
.app-settings,
.app-placeholder {
	min-height: 400px;
}

.app-lede {
	margin: 0;
	color: var(--muted);
	font-size: 15pt;
}

.app-muted,
.app-note {
	margin: 0;
	color: var(--muted);
	font-size: 13pt;
}

.app-note {
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.app-panel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.app-panel {
	padding: 14px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.18);
}

.app-panel p {
	margin: 0 0 12px;
}

.app-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.app-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: fit-content;
	padding: 8px 16px;
	border: 1px solid #a8a08e;
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font-family: inherit;
	font-size: 14pt;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.app-button:hover {
	background: #f2ead8;
	color: var(--ink);
}

.app-button:disabled {
	cursor: wait;
	opacity: 0.55;
}

.app-button-secondary {
	background: rgba(0, 0, 0, 0.18);
	border-color: rgba(255, 255, 255, 0.35);
	color: #f0d488;
}

.app-button-secondary:hover {
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
}

.app-button-danger {
	border-color: #d88;
	background: #fff1f1;
	color: #712020;
}

.app-button-danger:hover {
	background: #ffdede;
	color: #4c1010;
}

.app-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.app-form label {
	margin-top: 4px;
	font-size: 14pt;
}

.app-form input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #a8a08e;
	border-radius: 6px;
	background: #fffdf7;
	color: var(--ink);
	font-family: inherit;
	font-size: 14pt;
}

.app-form input:focus {
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

.app-form .app-button {
	margin-top: 10px;
}

.app-auth-switch {
	margin: 4px 0 0;
	font-size: 14pt;
}

.app-error,
.app-success {
	margin: 0;
	padding: 9px 11px;
	border-radius: 6px;
	font-size: 13pt;
}

.app-error {
	border: 1px solid #d88;
	background: #ffd0d0;
	color: #3a1414;
}

.app-success {
	border: 1px solid #77b77f;
	background: #d8f0dc;
	color: #123a1a;
}

.app-error[hidden],
.app-success[hidden],
.app-notice[hidden] {
	display: none;
}

.app-notice {
	padding: 9px 16px;
	background: #d8f0dc;
	color: #123a1a;
	font-size: 14pt;
	text-align: center;
}

.app-notice-error {
	background: #ffd0d0;
	color: #3a1414;
}

.app-details {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 6px 14px;
	margin: 0 0 10px;
}

.app-details dt {
	color: var(--muted);
}

.app-details dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.app-route-id {
	margin: 0;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.2);
	overflow-wrap: anywhere;
}

.app-loading {
	margin: 24px auto;
	color: var(--muted);
	font-size: 16pt;
	text-align: center;
}

.app-noscript {
	margin: 24px;
	text-align: center;
}

@media (max-width: 600px) {
	.app-brand {
		font-size: 17pt;
	}

	.app-account {
		font-size: 14pt;
	}

	.app-shell {
		padding: 12px 8px 0;
	}

	.app-card {
		padding: 16px;
		border-width: 6px;
		border-radius: 16px;
	}

	.app-card h1 {
		font-size: 20pt;
	}
}

.app-connection {
	align-self: center;
	padding: 3px 9px;
	border-radius: 999px;
	background: #ffd0d0;
	color: #3a1414;
	font-size: 12pt;
}

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

.app-friend-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 6px 0 12px;
}

.app-friend-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.app-friend-row:last-child {
	border-bottom: 0;
}

.app-presence {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
}

.app-presence-online {
	background: #2e9b45;
}

.app-presence-offline {
	background: #b33;
}


.app-panel h3 {
	margin: 12px 0 4px;
	font-size: 15pt;
	font-weight: 500;
}

.app-inline-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 12px;
}

.app-inline-form input,
.app-inline-form select {
	flex: 1;
	min-width: 140px;
	padding: 6px 8px;
	border: 1px solid #a8a08e;
	border-radius: 6px;
	background: #fffdf7;
	color: var(--ink);
	font-family: inherit;
	font-size: 13pt;
}

.app-friend-actions {
	display: flex;
	gap: 5px;
	margin-left: auto;
}

.app-small-button {
	padding: 4px 8px;
	border: 1px solid #a8a08e;
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	font-family: inherit;
	font-size: 11pt;
	cursor: pointer;
}

.app-small-button:hover {
	background: #f2ead8;
}

.app-small-button:disabled {
	cursor: wait;
	opacity: 0.55;
}

.app-list {
	display: flex;
	flex-direction: column;
	margin: 6px 0 12px;
}

.app-list-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	color: #f0d488;
	text-decoration: none;
}

.app-list-row:hover {
	color: #fff;
	text-decoration: underline;
}

.app-list-row:last-child {
	border-bottom: 0;
}

.app-list-name {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.app-list-row .app-muted {
	font-size: 12pt;
	text-align: right;
}

.app-lobby-panel .app-inline-form {
	margin-bottom: 8px;
}

.app-room-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--gold);
}

.app-room-head h1 {
	margin: 4px 0 0;
	padding: 0;
	border: 0;
}

.app-room-head .app-button {
	flex: none;
}

.app-room-wide {
	grid-column: 1 / -1;
}

.app-room-qr-button {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.app-room-qr-button img {
	display: block;
	width: 200px;
	height: 200px;
	border-radius: 8px;
	background: #fff;
}

.app-member-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 8px;
}

.app-member-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.app-member-row:last-child {
	border-bottom: 0;
}

.app-member-row .app-muted:last-child {
	margin-left: auto;
}

.app-creator-badge {
	padding: 1px 7px;
	border: 1px solid var(--gold);
	border-radius: 999px;
	color: var(--gold);
	font-size: 11pt;
}

.app-dialog {
	width: min(640px, 96vw);
	max-height: 90vh;
	overflow: auto;
	padding: 18px;
	border: 1px solid #a8a08e;
	border-radius: 14px;
	background: #f7f3e8;
	color: var(--ink);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.app-dialog::backdrop {
	background: rgba(0, 0, 0, 0.7);
}

.app-dialog form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.app-dialog label {
	margin-top: 4px;
	font-size: 13pt;
}

.app-dialog input[type=text],
.app-dialog select {
	width: 100%;
	padding: 7px 9px;
	border: 1px solid #a8a08e;
	border-radius: 6px;
	background: #fffdf7;
	color: var(--ink);
	font-family: inherit;
	font-size: 13pt;
}

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

.app-dialog-head h2 {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--ink);
}

.app-dialog-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #111;
	border-radius: 50%;
	background: #2b2b2b;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.app-dialog-close:hover {
	background: #000;
}

.app-dialog-close:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

.app-team-holder {
	overflow-x: auto;
}

.app-team-table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0;
}

.app-team-table th {
	padding: 4px 6px;
	color: #5d574b;
	font-size: 11pt;
	text-align: left;
	text-transform: uppercase;
	border-bottom: 1px solid #d8d0bd;
}

.app-team-table td {
	padding: 4px 6px;
	vertical-align: top;
}

.app-team-table input[type=text],
.app-team-table select {
	font-size: 12pt;
}

.app-advanced {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #d8d0bd;
}

.app-advanced summary {
	font-weight: 600;
	cursor: pointer;
}

.app-check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px !important;
}

.app-check input {
	width: auto;
}

.app-dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 10px;
}

.app-qr-dialog {
	width: min(100vw, 85vh);
	max-width: none;
	max-height: 100vh;
	padding: 0;
	border: 0;
	border-radius: 12px;
	overflow: hidden;
}

.app-qr-head {
	display: flex;
	justify-content: flex-end;
	padding: 6px 6px 0;
}

.app-qr-dialog img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
	background: #fff;
	cursor: zoom-out;
}

@media (max-width: 600px) {
	.app-room-head {
		flex-direction: column;
	}
}

.app-shell-wide {
	width: min(1360px, 100%);
}

.app-save-icon {
	padding: 6px 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	font-family: inherit;
	font-size: 16pt;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.app-save-icon.changed {
	background: var(--gold);
}

.app-save-icon:disabled {
	cursor: default;
	opacity: 0.45;
}

.app-friends-layout {
	margin-top: 16px;
}

.app-friends-layout {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.app-friends-share {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	text-align: center;
}

.app-friends-code {
	font-size: 14pt;
}

.app-friends-code span {
	color: var(--muted);
	letter-spacing: 0.06em;
}

.app-friends-code code {
	font-size: 16pt;
	letter-spacing: 0.08em;
}

.app-friends-list-panel,
.app-friends-share-panel {
	min-width: 0;
}

@media (max-width: 760px) {
	.app-friends-layout {
		grid-template-columns: 1fr;
	}
}

.app-friends-share .app-room-qr-button {
	align-self: center;
	margin: 0 auto;
}

.app-inline-form label {
	align-self: center;
	font-size: 13pt;
	white-space: nowrap;
}

.app-dialog .app-button-secondary {
	border-color: #a8a08e;
	background: #fff;
	color: var(--ink);
}

.app-dialog .app-button-secondary:hover {
	border-color: #8a8273;
	background: #f2ead8;
	color: var(--ink);
}

.app-room-grid {
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

@media (max-width: 760px) {
	.app-room-grid {
		grid-template-columns: 1fr;
	}
}

.app-game-table {
	width: 100%;
	margin: 8px 0 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.app-game-table-head,
.app-game-table-row {
	display: grid;
	grid-template-columns: minmax(90px, 1fr) minmax(0, 1.4fr) 90px 160px;
	gap: 12px;
	align-items: baseline;
	padding: 7px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.app-game-table-head {
	color: var(--muted);
	font-size: 11pt;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.app-game-table-row:last-child {
	border-bottom: 0;
}

.app-game-table-row .app-list-name {
	color: #f0d488;
	text-decoration: none;
}

.app-game-table-row .app-list-name:hover {
	color: #fff;
	text-decoration: underline;
}

.app-game-created {
	color: var(--muted);
	white-space: nowrap;
}

.app-game-status {
	text-transform: capitalize;
}

.app-game-players {
	overflow-wrap: anywhere;
}

@media (max-width: 600px) {
	.app-game-table-head,
	.app-game-table-row {
		grid-template-columns: minmax(0, 1fr) 70px;
	}

	.app-game-table-head span:nth-child(2),
	.app-game-table-head span:nth-child(4),
	.app-game-table-row .app-game-created,
	.app-game-table-row .app-game-players {
		display: none;
	}
}

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

.app-room-panel-head h2 {
	margin: 0;
	padding: 0;
	border: 0;
}

.app-create-game-dialog {
	width: min(1100px, 96vw);
}

.app-game-builder {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 16px;
	margin: 8px 0;
}

.app-builder-pool h3,
.app-builder-head h3 {
	margin: 0 0 6px;
	font-size: 14pt;
}

.app-candidate-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 360px;
	overflow-y: auto;
	padding-right: 3px;
}

.app-candidate {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 7px 9px;
	border: 1px solid #a8a08e;
	border-radius: 7px;
	background: #fffdf7;
	cursor: grab;
	user-select: none;
}

.app-candidate:active {
	cursor: grabbing;
}

.app-candidate-bot {
	border-left: 4px solid #7a6f58;
}

.app-candidate-selected {
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

.app-candidate-used {
	opacity: 0.4;
	cursor: not-allowed;
}

.app-candidate-name {
	font-weight: 600;
	font-size: 12pt;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-builder-table {
	min-width: 0;
	overflow-x: auto;
}

.app-builder-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.app-team-builder-head,
.app-team-row {
	display: grid;
	grid-template-columns: minmax(110px, 1fr) repeat(4, minmax(92px, 1fr)) 30px;
	gap: 6px;
	align-items: stretch;
}

.app-team-builder-head {
	padding: 4px 2px;
	color: #5d574b;
	font-size: 10.5pt;
	text-transform: uppercase;
}

.app-team-row {
	margin-bottom: 6px;
}

.app-team-name {
	width: 100%;
	padding: 6px 7px !important;
	font-size: 11.5pt !important;
}

.app-team-slot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0;
	border: 0;
	background: transparent;
}

.app-team-slot::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px dashed #a8a08e;
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.42);
	pointer-events: none;
}

.app-team-slot-filled::before {
	display: none;
}

.app-team-slot-drag {
	outline: 2px solid var(--gold);
	outline-offset: -2px;
}

.app-team-slot-drag::before {
	border-color: var(--gold);
	background: rgba(212, 175, 55, 0.16);
}

.app-slot-hint {
	position: relative;
	color: #8b8271;
	font-size: 10.5pt;
}

.app-assigned {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 6px 24px 6px 8px;
	border: 1px solid #a8a08e;
	border-radius: 6px;
	background: #fffdf7;
	cursor: grab;
}

.app-assigned-name {
	font-weight: 600;
	font-size: 11.5pt;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-assigned-remove,
.app-team-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 1px solid #a8a08e;
	border-radius: 50%;
	background: #fffdf7;
	color: #6e261c;
	font-size: 14pt;
	line-height: 1;
	cursor: pointer;
}

.app-assigned-remove {
	position: absolute;
	top: 3px;
	right: 3px;
}

.app-team-remove {
	align-self: center;
}

.app-assigned-remove:disabled,
.app-team-remove:disabled,
.app-small-button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

@media (max-width: 800px) {
	.app-game-builder {
		grid-template-columns: 1fr;
	}

	.app-candidate-list {
		flex-direction: row;
		max-height: none;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.app-candidate {
		min-width: 150px;
	}

	.app-team-builder-head,
	.app-team-row {
		grid-template-columns: minmax(100px, 1fr) repeat(4, minmax(85px, 1fr)) 28px;
	}
}

.app-assigned {
	-webkit-user-drag: element;
}

.app-assigned-selected {
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

.app-team-row {
	display: flex;
	gap: 6px;
	align-items: stretch;
}

.app-team-name {
	flex: 0 0 120px;
}

.app-team-slots {
	display: flex;
	flex: 1 1 auto;
	gap: 6px;
	min-width: 0;
}

.app-team-slots .app-team-slot {
	flex: 1 1 0;
	min-width: 88px;
}

.app-team-controls {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}

.app-team-controls .app-small-button {
	padding: 4px 7px;
	font-size: 10.5pt;
}

.app-team-controls .app-team-remove {
	align-self: center;
}

@media (max-width: 800px) {
	.app-team-row {
		flex-wrap: wrap;
	}

	.app-team-name {
		flex: 1 1 100%;
	}

	.app-team-slots {
		order: 3;
		flex-basis: 100%;
	}

	.app-team-controls {
		order: 2;
		margin-left: auto;
	}
}

.app-assigned-name-input {
	width: 100%;
	padding: 4px 6px !important;
	border: 1px solid #a8a08e;
	border-radius: 5px;
	background: #fff;
	color: var(--ink);
	font-family: inherit;
	font-size: 11pt !important;
}

.app-candidate,
.app-assigned {
	touch-action: none;
}

.app-assigned-name-input {
	touch-action: auto;
}

.app-drag-ghost {
	position: fixed;
	z-index: 10000;
	transform: translate(-50%, -50%);
	padding: 8px 10px;
	border: 1px solid #a8a08e;
	border-radius: 7px;
	background: #fffdf7;
	color: var(--ink);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
	font-family: inherit;
	font-size: 11.5pt;
	font-weight: 600;
	pointer-events: none;
	opacity: 0.95;
}

body.app-drag-active,
body.app-drag-active * {
	cursor: grabbing !important;
}

@media (max-width: 700px) {
	#createGameDialog.app-dialog {
		inset: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: calc(8px + env(safe-area-inset-top)) 12px 0;
		border: 0;
		border-radius: 0;
		overscroll-behavior: contain;
	}

	#createGameDialog form {
		min-height: 100%;
		padding-bottom: env(safe-area-inset-bottom);
	}

	#createGameDialog label {
		margin-top: 5px;
		font-size: 12pt;
	}

	#createGameDialog input[type=text],
	#createGameDialog select {
		min-height: 42px;
		font-size: 16px;
	}

	.app-create-game-dialog .app-dialog-head {
		position: sticky;
		top: 0;
		z-index: 3;
		padding: 4px 0 8px;
		background: #f7f3e8;
	}

	.app-candidate-list {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
		gap: 8px;
		max-height: 32dvh;
		overflow-x: hidden;
		overflow-y: auto;
		padding: 0 2px 6px 0;
		align-content: start;
	}

	.app-candidate {
		flex: none;
		min-width: 0;
		min-height: 44px;
		padding: 8px;
	}

	.app-game-builder {
		gap: 10px;
	}

	.app-builder-pool h3,
	.app-builder-head h3 {
		font-size: 13pt;
	}

	.app-builder-head .app-small-button {
		min-height: 40px;
		padding: 0 12px;
	}

	.app-team-row {
		flex-wrap: wrap;
		gap: 8px;
		padding-bottom: 10px;
		border-bottom: 1px solid #d8d0bd;
	}

	.app-team-name {
		flex: 1 1 calc(100% - 40px);
		order: 1;
		min-height: 44px;
	}

	.app-team-controls {
		order: 2;
	}

	.app-team-slots {
		order: 3;
		flex: 1 1 100%;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
		gap: 6px;
		overflow: visible;
		padding-bottom: 0;
	}

	.app-team-slots .app-team-slot {
		flex: none;
		min-width: 0;
		min-height: 56px;
	}

	.app-assigned {
		min-height: 56px;
		padding: 5px 34px 5px 7px;
	}

	.app-assigned-remove,
	.app-team-remove {
		width: 30px;
		height: 30px;
		font-size: 18px;
	}

	.app-assigned-remove {
		top: 4px;
		right: 4px;
	}

	.app-assigned-name {
		font-size: 11pt;
	}

	.app-advanced {
		margin-top: 6px;
	}

	.app-dialog-actions {
		position: sticky;
		bottom: 0;
		z-index: 3;
		display: grid;
		grid-template-columns: 1fr 1fr;
		margin: 8px -12px 0;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: #f7f3e8;
		border-top: 1px solid #d8d0bd;
	}

	.app-dialog-actions .app-button {
		width: 100%;
		min-height: 44px;
	}
}

@media (max-width: 480px) {
	.app-team-slots {
		grid-auto-flow: row;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
