body.arcana-app {
	max-width: none;
	text-align: left;
	color: #f2e7d5;
	background: radial-gradient(circle at top, #1d2340 0%, #0b0f1f 55%, #06070f 100%);
}

.app-title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.5em;
}

.app-home-link {
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: rgba(242, 231, 213, 0.8);
	text-decoration: none;
	border: 1px solid rgba(242, 231, 213, 0.35);
	padding: 0.3em 0.7em;
	border-radius: 999px;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.app-home-link:hover {
	color: #f7edd9;
	border-color: rgba(242, 231, 213, 0.7);
	background: rgba(242, 231, 213, 0.1);
}

.app-title {
	font-size: 1.8em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0;
}

.arcana-app__overlay {
	margin: 2em auto 4em;
	max-width: 1200px;
}

.app-shell {
	display: grid;
	gap: 2em;
}

.panel {
	background: rgba(6, 7, 15, 0.7);
	padding: 1.5em 1.5em 2em;
	border: 1px solid rgba(242, 231, 213, 0.2);
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.panel h2,
.panel h3 {
	margin-top: 0;
}

body.arcana-app button {
	background: linear-gradient(135deg, #7d3c4a 0%, #b56a5a 55%, #6d2c41 100%);
	border: 1px solid rgba(242, 231, 213, 0.4);
	color: #f6efe4;
	padding: 0.4em 0.9em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

body.arcana-app button:hover {
	border-color: rgba(242, 231, 213, 0.8);
}

body.arcana-app button.ghost {
	background: transparent;
	border: 1px solid rgba(242, 231, 213, 0.4);
	box-shadow: none;
}

.hand-card {
	display: grid;
	gap: 0.5em;
	justify-items: center;
}

.hand-card-actions {
	display: flex;
	gap: 0.4em;
}

.form-row {
	margin: 1em 0;
}

.create-settings {
	margin: 1em 0;
	padding: 1em;
	border: 1px dashed rgba(242, 231, 213, 0.4);
	border-radius: 12px;
}

.error {
	color: #ffb4a2;
	font-weight: 600;
}

.is-hidden {
	display: none;
}

.room-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
}

.table-grid {
	display: grid;
	gap: 2em;
}

.section-title {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.85em;
	color: rgba(242, 231, 213, 0.75);
}

.actions-row {
	display: flex;
	gap: 0.8em;
	flex-wrap: wrap;
	align-items: center;
}

.deck-actions {
	margin-top: 0.8em;
}

.hint {
	font-size: 0.9em;
	color: rgba(242, 231, 213, 0.6);
	margin-top: 0.6em;
}

.danger {
	border-color: #ff9f8f;
	color: #ffcabf;
}

.danger:hover {
	border-color: #ffb4a2;
}

.deck-counts {
	display: flex;
	gap: 1.5em;
	flex-wrap: wrap;
	font-weight: 600;
}

.card-slot {
	width: 96px;
	aspect-ratio: 8 / 13;
	border-radius: 12px;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(242, 231, 213, 0.2);
}

.card-slot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-with-caption {
	display: grid;
	gap: 0.35em;
	justify-items: center;
}

.card-caption {
	font-size: 0.7em;
	text-align: center;
	color: rgba(242, 231, 213, 0.7);
	max-width: 110px;
}

.card-back {
	width: 96px;
	aspect-ratio: 8 / 13;
	border-radius: 12px;
	display: grid;
	place-items: center;
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: rgba(242, 231, 213, 0.8);
	background: linear-gradient(135deg, #3a1f3f, #64246f 55%, #2d1a3a);
	border: 1px solid rgba(242, 231, 213, 0.3);
	box-shadow: inset 0 0 0 3px rgba(6, 7, 15, 0.5);
}

.card-back--small {
	width: 96px;
	aspect-ratio: 8 / 13;
}

.couples-grid {
	display: grid;
	gap: 1.8em;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	justify-items: center;
	padding: 0.2em;
}

.couples-grid--dense {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.4em;
}

.couples-grid--dense .card-slot,
.couples-grid--dense .card-back {
	width: 84px;
	aspect-ratio: 8 / 13;
}

.couples-grid--dense .card-caption {
	max-width: 92px;
	font-size: 0.65em;
}

.couple-slot {
	padding: 1em;
	border-radius: 14px;
	background: rgba(12, 14, 26, 0.7);
	border: 1px solid rgba(242, 231, 213, 0.15);
	display: grid;
	gap: 0.8em;
	width: 100%;
	max-width: 320px;
	box-sizing: border-box;
	overflow: hidden;
}

.couple-slot--theme {
	border: 1px solid rgba(242, 231, 213, 0.4);
	box-shadow: inset 0 0 0 1px rgba(242, 231, 213, 0.2);
}

.couple-header {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75em;
	letter-spacing: 0.12em;
}

.couple-cards {
	display: flex;
	gap: 0.8em;
	justify-content: center;
	flex-wrap: wrap;
}

.couple-actions {
	display: flex;
	gap: 0.5em;
	justify-content: center;
	flex-wrap: wrap;
}

.couple-select {
	background: rgba(255, 255, 255, 0.08);
	color: #f2e7d5;
	border: 1px solid rgba(242, 231, 213, 0.3);
	border-radius: 8px;
	padding: 0.4em 0.6em;
}

.couple-select option {
	color: #0b0f1f;
}

.played-grid,
.hand-grid {
	display: flex;
	gap: 0.8em;
	flex-wrap: wrap;
}

.card-editor {
	position: fixed;
	inset: 0;
	background: rgba(6, 7, 15, 0.7);
	display: grid;
	place-items: center;
	z-index: 10;
}

.card-editor.is-hidden {
	display: none;
}

.card-editor__content {
	background: #0e1327;
	border: 1px solid rgba(242, 231, 213, 0.3);
	border-radius: 16px;
	padding: 1.5em;
	display: grid;
	gap: 1em;
	min-width: 280px;
}

.card-editor__content select {
	background: rgba(255, 255, 255, 0.08);
	color: #f2e7d5;
	border: 1px solid rgba(242, 231, 213, 0.3);
	border-radius: 10px;
	padding: 0.5em 0.7em;
}

.card-editor__content select option {
	color: #0b0f1f;
}

.card-editor__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.6em;
}

.card-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(6, 8, 16, 0.75);
	display: grid;
	place-items: center;
	z-index: 12;
}

.card-lightbox.is-hidden {
	display: none;
}

.card-lightbox__content {
	position: relative;
	background: rgba(10, 14, 30, 0.95);
	border: 1px solid rgba(242, 231, 213, 0.35);
	border-radius: 20px;
	padding: 1.5em;
	display: grid;
	gap: 0.8em;
	justify-items: center;
	max-width: min(360px, 85vw);
	box-shadow: 0 20px 60px rgba(8, 10, 24, 0.6);
}

.card-lightbox__content img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(4, 6, 16, 0.6);
}

.card-lightbox__label {
	margin: 0;
	font-size: 0.9em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	color: rgba(242, 231, 213, 0.8);
}

.card-lightbox__close {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	border: none;
	background: transparent;
	color: rgba(242, 231, 213, 0.8);
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
}

.card-lightbox__action {
	border-radius: 999px;
	padding: 0.5em 1.4em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: rgba(242, 231, 213, 0.12);
	color: #f2e7d5;
	border: 1px solid rgba(242, 231, 213, 0.4);
}

.players-grid {
	display: grid;
	gap: 1em;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.player-card {
	padding: 1em;
	border-radius: 14px;
	background: rgba(9, 12, 25, 0.65);
	border: 1px solid rgba(242, 231, 213, 0.15);
	display: grid;
	gap: 0.6em;
	justify-items: center;
}

.player-title {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8em;
}

.player-info {
	font-size: 0.9em;
	color: rgba(242, 231, 213, 0.75);
}

.player-traits {
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
	justify-content: center;
}

.player-traits-summary {
	font-size: 0.75em;
	color: rgba(242, 231, 213, 0.75);
	text-align: center;
	letter-spacing: 0.04em;
}

.trait-select {
	background: rgba(255, 255, 255, 0.08);
	color: #f2e7d5;
	border: 1px solid rgba(242, 231, 213, 0.3);
	border-radius: 10px;
	padding: 0.4em 0.6em;
	font-size: 0.85em;
}

.trait-select option {
	color: #0b0f1f;
}

.hand-section {
	padding-top: 0;
}

.hand-actions {
	margin-top: 1em;
}

.is-clickable {
	cursor: pointer;
}

@media (max-width: 768px) {
	.arcana-app__overlay {
		margin: 1em;
	}

	.card-slot,
	.card-back {
		width: 80px;
		aspect-ratio: 8 / 13;
	}
}

@media (max-width: 1024px) {
	.arcana-app__overlay {
		margin: 1.5em auto 3em;
		padding: 0 1em;
		box-sizing: border-box;
	}

	.couples-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}

	.couple-slot {
		max-width: 280px;
	}
}

@media (min-width: 1024px) and (max-width: 1366px) {
	.arcana-app__overlay {
		margin: 1.5em auto 3.5em;
		padding: 0 1.5em;
		box-sizing: border-box;
	}
}
