.rws-card {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	padding: 24px;
	width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #242424;
}

.rws-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.rws-title {
	font-family: Enriqueta, Arial, Helvetica, sans-serif;
	color: #006600;
	font-size: 28px;
	margin: 0;
}

.rws-reset {
	background: #f5f5f5;
	border: none;
	border-radius: 999px;
	width: 40px;
	height: 40px;
	color: #006600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
}

.rws-reset svg {
	width: 18px;
	height: 18px;
}

.rws-reset:hover {
	background: #e5f5e5;
}

.rws-header-btns {
	display: flex;
	gap: 6px;
	align-items: center;
}

.rws-hilfe {
	background: #f5f5f5;
	border: none;
	border-radius: 999px;
	height: 40px;
	padding: 0 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: #8a6d1f;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	flex-shrink: 0;
}

.rws-hilfe svg {
	width: 16px;
	height: 16px;
}

.rws-hilfe:hover:not(:disabled) {
	background: #fdf3e3;
}

.rws-hilfe:disabled {
	opacity: 0.4;
	cursor: default;
}

.rws-hilfe-count {
	background: #8a6d1f;
	color: #fff;
	border-radius: 999px;
	min-width: 16px;
	height: 16px;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	font-variant-numeric: tabular-nums;
}

.rws-board {
	display: grid;
	gap: 8px;
	margin: 16px 0;
}

.rws-card-tile {
	background: #f5f5f5;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	aspect-ratio: 1;
	text-align: center;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.rws-card-tile.is-open,
.rws-card-tile.is-matched {
	border-color: #009900;
}

.rws-card-tile.is-matched {
	cursor: default;
}

/* face-down tile: admin-chosen back image (if set) under a green gradient,
   or just the gradient + a decorative leaf when no image was chosen */
.rws-tile-back {
	background-image: linear-gradient(160deg, rgba(0, 102, 0, 0.85), rgba(0, 153, 0, 0.75));
	background-size: cover;
	background-position: center;
}

.rws-tile-leaf {
	width: 42%;
	height: 42%;
	opacity: 0.9;
}

/* face-up content: image fills the tile edge-to-edge, text gets its own padding */
.rws-tile-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rws-tile-text {
	padding: 8px;
	font-weight: 600;
}

/* matched pair: stays visible but eases back visually, reads as "done" */
.rws-card-tile.is-matched .rws-tile-img {
	filter: grayscale(100%);
	opacity: 0.45;
}

.rws-card-tile.is-matched .rws-tile-text {
	opacity: 0.55;
}

.rws-stats {
	display: flex;
	justify-content: space-around;
	border-top: 1px solid #dcdcde;
	padding-top: 12px;
	margin-top: 12px;
}

.rws-stat {
	text-align: center;
}

.rws-stat-label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #646970;
}

.rws-stat-value {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: #242424;
}

.rws-board--picker {
	min-height: 240px;
}

.rws-picker-overlay {
	position: absolute;
	inset: 0;
	background: #ffffff;
	border: 2px solid #009900;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	gap: 14px;
}

.rws-picker-icon {
	width: 40px;
	height: 40px;
	color: #009900;
}

.rws-picker-title {
	font-family: Enriqueta, Arial, Helvetica, sans-serif;
	color: #006600;
	font-size: 19px;
	margin: 0;
}

.rws-picker-sub {
	margin: 0;
	font-size: 13.5px;
	color: #646970;
}

.rws-picker-choices {
	display: flex;
	gap: 10px;
	margin-top: 4px;
	flex-wrap: wrap;
	justify-content: center;
}

.rws-choice-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	border: 2px solid #dcdcde;
	background: #f5f5f5;
	border-radius: 10px;
	padding: 10px 16px;
	cursor: pointer;
	min-width: 68px;
}

.rws-choice-btn:hover {
	border-color: #009900;
}

.rws-choice-btn.is-recommended {
	border-color: #009900;
	background: #e5f5e5;
}

.rws-choice-btn strong {
	font-size: 20px;
	color: #242424;
	font-variant-numeric: tabular-nums;
}

.rws-choice-btn.is-recommended strong {
	color: #006600;
}

.rws-choice-label {
	font-size: 10.5px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.rws-choice-pairs {
	font-size: 10px;
	color: #646970;
}

.rws-choice-btn.is-recommended .rws-choice-pairs {
	color: #006600;
	opacity: 0.75;
}

.rws-choice-best {
	font-size: 9.5px;
	color: #8a6d1f;
	margin-top: 2px;
}

.rws-choice-btn.is-recommended .rws-choice-best {
	color: #6b5417;
}

.rws-choice-badge {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: #009900;
	border-radius: 999px;
	padding: 1px 7px;
	margin-top: -2px;
}

.rws-paar-fakt {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 4px 0 0;
	padding: 6px 10px;
	background: #fdf3e3;
	border-radius: 6px;
	font-size: 12.5px;
	line-height: 1.4;
	color: #8a6d1f;
}

.rws-paar-fakt:empty {
	display: none;
}

.rws-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.97);
	border: 2px solid #006600;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
}

.rws-overlay-title {
	font-family: Enriqueta, Arial, Helvetica, sans-serif;
	color: #006600;
	font-size: 24px;
	margin: 0 0 8px;
}

.rws-game {
	position: relative;
}

.rws-highscore {
	margin-top: 8px;
	font-size: 13px;
	color: #646970;
}

/* Wordle-specific */
.rws-wordle-row {
	display: grid;
	grid-auto-flow: column;
	gap: 6px;
	margin-bottom: 6px;
	justify-content: center;
}

.rws-wordle-letter {
	width: 40px;
	height: 40px;
	border: 2px solid #dcdcde;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	text-transform: uppercase;
}

.rws-wordle-letter.correct {
	background: #009900;
	border-color: #009900;
	color: #fff;
}

.rws-wordle-letter.present {
	background: #e0c200;
	border-color: #e0c200;
	color: #fff;
}

.rws-wordle-letter.absent {
	background: #646970;
	border-color: #646970;
	color: #fff;
}

.rws-wordle-board {
	outline: none;
}

.rws-wordle-board:focus-visible .rws-wordle-letter.is-selected {
	box-shadow: 0 0 0 2px #009900;
}

.rws-wordle-letter.is-active {
	cursor: pointer;
	border-color: #b6bcc2;
}

.rws-wordle-letter.is-selected {
	border-color: #242424;
	border-width: 2.5px;
}

.rws-keyboard {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 14px;
}

.rws-keyboard-row {
	display: flex;
	gap: 5px;
	justify-content: center;
}

.rws-key {
	min-width: 30px;
	height: 42px;
	padding: 0 8px;
	border: none;
	border-radius: 4px;
	background: #e3e5e8;
	color: #242424;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	cursor: pointer;
	flex: 1;
	max-width: 40px;
}

.rws-key:hover {
	background: #cfd3d8;
}

.rws-key:active {
	background: #009900;
	color: #fff;
}

.rws-key-wide {
	max-width: 56px;
	flex: 1.6;
	font-size: 16px;
}

/* Wortsuche-specific */
.rws-ws-grid {
	display: grid;
	gap: 2px;
	width: max-content;
	max-width: 100%;
	margin: 0 auto;
	overflow-x: auto;
	user-select: none;
}

.rws-ws-cell {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	border: 2px solid transparent;
	border-radius: 4px;
	font-weight: 700;
	cursor: pointer;
	font-size: 14px;
	touch-action: none;
}

.rws-ws-cell.is-selected {
	background: #eaf5e0;
	border-color: #74b64a;
	color: #0a6b0a;
}

.rws-ws-cell.is-found {
	background: #009900;
	border-color: #009900;
	color: #fff;
}

.rws-ws-cell.is-hint:not(.is-selected) {
	background: #fdf3e3;
	border-color: #d9a441;
	color: #8a6d1f;
}

.rws-ws-wordlist {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	justify-content: center;
}

.rws-ws-word {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	padding: 4px 10px;
	background: #f5f5f5;
	border-radius: 999px;
}

.rws-ws-word.is-found {
	background: #eaf5e0;
	border: 1px solid #74b64a;
	color: #0a6b0a;
	padding: 3px 9px 3px 9px;
}

.rws-ws-word-check {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

.rws-ws-word-pill {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
	background: #74b64a;
	border-radius: 999px;
	padding: 1px 7px;
	margin-left: 2px;
}
