/**
 * Die Reifekammer — Styles (KONZEPT.md §7).
 * Holz, Bast und Sonnenlicht statt Glas und Neon: die Optik ist bewusst weit
 * weg von den Vorbildern des Genres. Sorten sind immer über Symbol UND Form
 * unterscheidbar, nie nur über Farbe (Farbenblind-Regel).
 */

.rk-hud {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	justify-content: center;
	margin-bottom: 1rem;
}

.rk-hud-item {
	background: var(--sand, #fdf6e3);
	border: 2px solid #d9c9a3;
	border-radius: 14px;
	padding: .45rem 1rem;
	min-width: 5.5rem;
	text-align: center;
	box-shadow: 0 2px 6px rgba(120, 90, 40, .12);
}

.rk-hud-label {
	display: block;
	font-size: .72rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #8a7550;
}

.rk-hud-value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: #5b4520;
}

/* ---------- Reifeliste ---------- */

.rk-reifeliste {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: .6rem;
	margin-bottom: 1rem;
}

.rk-reifebox {
	position: relative;
	background: #fffaf0;
	border: 2px solid #e2d5b8;
	border-radius: 12px;
	padding: .5rem .6rem;
}

.rk-reifebox.rk-reif      { border-color: #6fae4a; background: #f3faee; }
.rk-reifebox.rk-ueberreif { border-color: #c98a2f; background: #fdf3e2; }
.rk-reifebox.rk-gruen     { border-color: #c9c9c9; }

.rk-reifekopf {
	display: flex;
	align-items: center;
	gap: .35rem;
	font-weight: 600;
	font-size: .9rem;
	margin-bottom: .35rem;
}

.rk-symbol { font-size: 1.15rem; }
.rk-sortenname { color: #5b4520; }

.rk-fliege {
	margin-left: auto;
	border: none;
	background: transparent;
	font-size: 1.15rem;
	cursor: pointer;
	padding: 0 .2rem;
	animation: rk-summen .9s ease-in-out infinite alternate;
}

@keyframes rk-summen {
	from { transform: translate(0, 0) rotate(-8deg); }
	to   { transform: translate(3px, -3px) rotate(8deg); }
}

.rk-balken {
	position: relative;
	height: 10px;
	background: #ece2cc;
	border-radius: 5px;
	overflow: hidden;
}

.rk-balken-fuell {
	position: absolute;
	inset: 0 auto 0 0;
	background: linear-gradient(90deg, #a8c98a, #6fae4a);
	transition: width .25s ease;
}

.rk-reifebox.rk-ueberreif .rk-balken-fuell { background: linear-gradient(90deg, #d8a860, #b5762a); }

/* Optimalfenster als Markierung — zeigt, wann es sich lohnt einzulagern */
.rk-balken-fenster {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 2px solid rgba(60, 110, 30, .55);
	border-right: 2px solid rgba(60, 110, 30, .55);
	background: rgba(110, 174, 74, .18);
	pointer-events: none;
}

.rk-reifetext {
	margin-top: .3rem;
	font-size: .78rem;
	color: #7a6844;
}

/* ---------- Die Kammer ---------- */

.rk-kammer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-end;
	gap: .7rem;
	padding: 1.2rem .8rem .9rem;
	border-radius: 18px;
	/* Holzwand mit Lamellenlicht */
	background:
		repeating-linear-gradient(90deg,
			rgba(255, 240, 200, .00) 0 38px,
			rgba(255, 240, 200, .16) 38px 44px),
		linear-gradient(180deg, #a8763f 0%, #8d5f30 55%, #7a5028 100%);
	box-shadow: inset 0 4px 14px rgba(0, 0, 0, .28);
}

.rk-stange {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .3rem;
	padding: .5rem .4rem .35rem;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	background: linear-gradient(180deg, #cdae74 0%, #b8934f 100%);
	box-shadow: 0 3px 0 #8a6a33, 0 5px 10px rgba(0, 0, 0, .25);
	transition: transform .12s ease, box-shadow .12s ease;
}

.rk-stange:hover { transform: translateY(-2px); }

.rk-stange.rk-gewaehlt {
	outline: 3px dashed #ffe27a;
	outline-offset: 3px;
}

.rk-stange.rk-fertig {
	background: linear-gradient(180deg, #f6d97a 0%, #e9b93f 100%);
	box-shadow: 0 3px 0 #b78d20, 0 0 16px rgba(255, 214, 90, .8);
	animation: rk-bereit 1.4s ease-in-out infinite alternate;
}

@keyframes rk-bereit {
	from { box-shadow: 0 3px 0 #b78d20, 0 0 10px rgba(255, 214, 90, .55); }
	to   { box-shadow: 0 3px 0 #b78d20, 0 0 22px rgba(255, 214, 90, .95); }
}

.rk-stange-innen {
	display: flex;
	flex-direction: column;
	gap: .22rem;
}

.rk-frucht {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 42px;
	font-size: 1.5rem;
	line-height: 1;
	background: var(--rk-farbe, #ddd);
	border-radius: 10px;
	box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .2);
}

/* Form trägt die Unterscheidung zusätzlich zur Farbe (Farbenblind-Regel) */
.rk-form-rund    { border-radius: 50%; }
.rk-form-zapfen  { border-radius: 10px 10px 4px 4px; }
.rk-form-oval    { border-radius: 50% / 38%; }
.rk-form-stern   { clip-path: polygon(50% 0, 62% 35%, 100% 35%, 70% 58%, 82% 95%, 50% 72%, 18% 95%, 30% 58%, 0 35%, 38% 35%); }
.rk-form-sichel  { border-radius: 44% 44% 44% 12%; }
.rk-form-faecher { border-radius: 50% 50% 14% 14%; }
.rk-form-feder   { border-radius: 60% 20% 60% 20%; }

.rk-frucht.rk-leer {
	background: rgba(255, 255, 255, .12);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14);
}

.rk-frucht.rk-angehoben {
	transform: translateY(-8px) scale(1.06);
	box-shadow: 0 6px 12px rgba(0, 0, 0, .35);
}

.rk-einlagern {
	font-size: .68rem;
	font-weight: 700;
	color: #6b4c00;
	white-space: nowrap;
}

/* ---------- Restliches UI ---------- */

.rk-status {
	text-align: center;
	min-height: 1.5em;
	font-weight: 600;
	color: #5b4520;
	margin: .6rem 0;
}

.rk-aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: center;
	margin-top: 1rem;
}

.rk-aktionen .rk-aktiv {
	outline: 3px solid #ffd54a;
	outline-offset: 2px;
}

.rk-ergebnis {
	margin-top: 1rem;
	padding: .9rem 1.1rem;
	border-radius: 14px;
	background: var(--sand, #fdf6e3);
	border: 2px solid #e0b93c;
	text-align: center;
	font-weight: 600;
	color: #5b4520;
}

.rk-regeln { margin-top: 2rem; line-height: 1.65; }
.rk-regeln h2 { margin-bottom: .5rem; }
.rk-regeln h3 { margin-top: 1.2rem; margin-bottom: .3rem; font-size: 1.05rem; }
.rk-regeln ul { margin: .4rem 0 .6rem 1.2rem; }
.rk-regeln li { margin-bottom: .2rem; }

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
	.rk-kammer { gap: .45rem; padding: .8rem .5rem .6rem; }
	.rk-frucht { width: 36px; height: 34px; font-size: 1.2rem; }
	.rk-stange { padding: .35rem .3rem .25rem; }
	.rk-einlagern { font-size: .6rem; }
	.rk-hud-item { min-width: 4.4rem; padding: .35rem .7rem; }
}

@media (prefers-reduced-motion: reduce) {
	.rk-stange.rk-fertig,
	.rk-fliege { animation: none; }
	.rk-stange, .rk-balken-fuell { transition: none; }
}
