/* Guidos Rätsel: riquadro dell'indovinello nella Legende del Promoter (Sessione 38, docs/sito/24-RAETSEL-GRAFICA.md).
   Funziona anche su Chrome 49: niente Grid, gap, :has(), aspect-ratio; solo flex con margini. */

.rk {
	clear: both;
	max-width: 820px;
	margin: 24px auto 30px;
	background: #fff7ea;
	border: 2px solid #f0c48a;
	border-radius: 18px;
	box-shadow: 0 4px 14px rgba(122,59,0,.12);
	overflow: hidden;
	text-align: left;
	color: #2b2118;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 18px;
	line-height: 1.5;
}
.rk *, .rk *:before, .rk *:after { box-sizing: border-box; }
.rk h2, .rk h3 { font-family: Montserrat, Arial, sans-serif; font-weight: 700; letter-spacing: 0; }

/* testata */
.rk-kopf { background: #ffcc99; background: linear-gradient(135deg, #ffcc99, #ffeb5b); padding: 16px 20px; display: flex; align-items: center; flex-wrap: wrap; }
.rk-kopf h2 { margin: 0; font-size: 28px; color: #7a3b00; flex: 1 1 260px; line-height: 1.2; text-align: left; }
.rk-kopf h2 small { display: block; font-size: 16px; font-weight: 600; color: #a0561a; }
.rk-liga { display: flex; align-items: center; background: #fff; border-radius: 40px; padding: 4px 16px 4px 6px; box-shadow: 0 2px 6px rgba(0,0,0,.12); margin: 6px 0; }
.rk-liga img { width: 58px; height: 44px; object-fit: contain; margin-right: 8px; }
.rk-liga span { font-size: 14px; color: #6d6257; line-height: 1.1; display: block; }
.rk-liga strong { display: block; font-size: 19px; color: #7a3b00; line-height: 1.2; }

/* tempo e bonus */
.rk-info { display: flex; flex-wrap: wrap; padding: 12px 14px 4px; }
.rk-chip { flex: 1 1 220px; margin: 0 6px 10px; background: #fff; border: 1px solid #f0c48a; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; }
.rk-chip svg { flex: 0 0 30px; margin-right: 12px; }
.rk-chip > div { flex: 1 1 auto; }
.rk-chip .rk-t { font-size: 14px; color: #6d6257; line-height: 1.2; }
.rk-chip .rk-w { font-size: 20px; font-weight: 700; color: #7a3b00; line-height: 1.25; }
.rk-balken { height: 8px; background: #f3e2c8; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.rk-balken i { display: block; height: 100%; background: #f0a030; background: linear-gradient(90deg, #f0a030, #ffd23f); border-radius: 4px; -webkit-transition: width 1s; transition: width 1s; }

/* agevolazioni del rango */
.rk-hilfen { margin: 4px 20px 14px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px dashed #f0c48a; }
.rk-hilfen h3 { margin: 0 0 6px; font-size: 17px; color: #7a3b00; text-align: left; }
.rk-hilfen ul { margin: 0; padding: 0; list-style: none; }
.rk-hilfen li { padding-left: 28px; position: relative; font-size: 16px; margin: 3px 0; }
.rk-hilfen li:before { content: ""; position: absolute; left: 4px; top: 5px; width: 14px; height: 8px; border-left: 3px solid #1f7a2e; border-bottom: 3px solid #1f7a2e; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
.rk-hilfen li.rk-nein { color: #6d6257; }
.rk-hilfen li.rk-nein:before { border: 0; height: 3px; background: #b9aa98; top: 11px; -webkit-transform: none; transform: none; }

/* messaggi */
.rk-meldung { margin: 0 20px 16px; border-radius: 14px; padding: 14px 18px; -webkit-animation: rk-rein .35s ease-out; animation: rk-rein .35s ease-out; }
.rk-meldung p { margin: 0 0 6px; }
.rk-meldung p:last-child { margin-bottom: 0; }
.rk-gut { background: #e3f5e1; border: 2px solid #7cc47f; }
.rk-gut h3 { margin: 0 0 8px; color: #1f7a2e; font-size: 22px; text-align: left; }
.rk-schlecht { background: #fde4e1; border: 2px solid #eba49c; color: #7c1a12; font-weight: 600; }
.rk-hinweis-box { background: #fff; border: 2px solid #f0c48a; color: #4a3e33; }
.rk-rechnung { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0; }
.rk-rechnung td { padding: 3px 0; border: 0; background: none; text-align: left; }
.rk-rechnung td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.rk-rechnung .rk-minus td:last-child { color: #c0261b; }
.rk-rechnung .rk-summe td { border-top: 2px solid #7cc47f; padding-top: 6px; font-size: 20px; font-weight: 700; color: #1f7a2e; }
@-webkit-keyframes rk-rein { 0% { opacity: 0; -webkit-transform: translateY(-8px); } 100% { opacity: 1; -webkit-transform: none; } }
@keyframes rk-rein { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: none; } }

.rk-schlecht h3 { margin: 0 0 8px; color: #c0261b; font-size: 22px; text-align: left; }
.rk-zeile-falsch { margin-top: 10px !important; padding: 6px 10px; border-radius: 8px; background: #fde4e1; color: #7c1a12; font-weight: 600; }
.rk-zeile-alle { margin-top: 10px !important; }

/* pop up con l'esito (il JS aggiunge rk-an; senza JS il messaggio resta nel riquadro) */
.rk-pop-guido, .rk-pop-knopf { display: none; }
.rk-overlay.rk-an { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 1000; background: rgba(43,33,24,.55); display: flex; align-items: center; justify-content: center; padding: 16px; -webkit-animation: rk-dunkel .25s ease-out; animation: rk-dunkel .25s ease-out; font-family: Montserrat, Arial, sans-serif; font-size: 18px; line-height: 1.5; color: #2b2118; }
.rk-overlay.rk-an * { box-sizing: border-box; }
.rk-an .rk-meldung { margin: 0; width: 100%; width: calc(100vw - 32px); max-width: 440px; max-height: 92vh; overflow: auto; background: #fff; border-width: 4px; border-radius: 20px; padding: 20px 22px 22px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.35); -webkit-animation: rk-pop .45s cubic-bezier(.2,1.4,.4,1); animation: rk-pop .45s cubic-bezier(.2,1.4,.4,1); }
.rk-overlay h3 { font-family: Montserrat, Arial, sans-serif; font-weight: 700; letter-spacing: 0; }
.rk-an .rk-meldung h3 { text-align: center; font-size: 24px; }
.rk-an .rk-schlecht { color: #2b2118; font-weight: normal; }
.rk-an .rk-rechnung { margin-top: 6px; }
.rk-an .rk-pop-guido { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 50%; margin: 0 auto 10px; border: 4px solid #ffcc99; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.rk-an .rk-gut .rk-pop-guido { border-color: #7cc47f; -webkit-animation: rk-huepf .6s .35s ease-out 2; animation: rk-huepf .6s .35s ease-out 2; }
.rk-an .rk-schlecht .rk-pop-guido { border-color: #eba49c; -webkit-animation: rk-nein .6s .35s ease-in-out; animation: rk-nein .6s .35s ease-in-out; }
.rk-an .rk-pop-knopf { display: block; margin-top: 16px; text-align: center; }
.rk-overlay.rk-raus { opacity: 0; -webkit-transition: opacity .2s; transition: opacity .2s; }
@-webkit-keyframes rk-dunkel { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rk-dunkel { 0% { opacity: 0; } 100% { opacity: 1; } }
@-webkit-keyframes rk-pop { 0% { opacity: 0; -webkit-transform: scale(.6); } 100% { opacity: 1; -webkit-transform: scale(1); } }
@keyframes rk-pop { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@-webkit-keyframes rk-huepf { 0%, 100% { -webkit-transform: translateY(0); } 40% { -webkit-transform: translateY(-14px); } }
@keyframes rk-huepf { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
@-webkit-keyframes rk-nein { 0%, 100% { -webkit-transform: rotate(0); } 25% { -webkit-transform: rotate(-12deg); } 75% { -webkit-transform: rotate(12deg); } }
@keyframes rk-nein { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* stato grande: conto alla rovescia, login, vacanze */
.rk-status { text-align: center; padding: 14px 20px 18px; }
.rk-status .rk-uhr { font-size: 40px; font-weight: 700; color: #7a3b00; letter-spacing: 2px; }
.rk-status img { max-width: 100%; height: auto; border-radius: 12px; }
.rk-status a.rk-link { font-size: 16px; color: #7a3b00; }

/* carte delle parole */
.rk-woerter { padding: 0 20px 6px; }
.rk-wk { background: #fff; border: 2px solid #ead7b9; border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 16px; position: relative; -webkit-transition: border-color .4s, background .4s; transition: border-color .4s, background .4s; }
.rk-wk-kopf { display: flex; align-items: baseline; flex-wrap: wrap; }
.rk-wk-nr { font-weight: 700; font-size: 20px; color: #7a3b00; margin-right: 10px; }
.rk-wk-pkt { margin-left: auto; font-size: 15px; font-weight: 600; color: #a0561a; background: #fff3d6; border-radius: 20px; padding: 2px 12px; }
.rk-wk-hint { margin: 4px 0 10px; font-style: italic; color: #4a3e33; }
.rk-wk-hint b { font-style: normal; font-weight: 600; color: #6d6257; font-size: 15px; }
.rk-zeile-t { font-size: 13px; font-weight: 600; color: #6d6257; text-transform: uppercase; letter-spacing: 1px; margin: 6px 0 4px; }

.rk-steine, .rk-felder { display: flex; flex-wrap: wrap; margin: 0 -3px; }
.rk-stein { width: 40px; height: 44px; margin: 3px; border-radius: 8px; background: #f5dca6; background: linear-gradient(#fff6dc, #f5dca6); border: 1px solid #d9a441; box-shadow: 0 3px 0 #c58f2d; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: #5a2e00; -webkit-transition: opacity .25s, -webkit-transform .25s, box-shadow .25s; transition: opacity .25s, transform .25s, box-shadow .25s; }
.rk-stein.rk-weg { opacity: .35; -webkit-transform: translateY(3px); transform: translateY(3px); box-shadow: 0 0 0 #c58f2d; text-decoration: line-through; }

.rk-eingabe { position: relative; margin-top: 6px; }
.rk-eingabe input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; padding: 0; margin: 0; cursor: text; }
.rk-feld { width: 40px; height: 48px; margin: 3px; border-radius: 8px; border: 2px solid #cdbba3; background: #fffdf8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; color: #2b2118; -webkit-transition: border-color .2s, background .2s; transition: border-color .2s, background .2s; }
.rk-feld.rk-neu { -webkit-animation: rk-plopp .18s ease-out; animation: rk-plopp .18s ease-out; }
.rk-feld.rk-ok { border-color: #1f7a2e; background: #e3f5e1; color: #1f7a2e; }
.rk-feld.rk-nicht { border-color: #c0261b; background: #fde4e1; color: #c0261b; }
.rk-feld.rk-cursor { border-color: #a0561a; box-shadow: 0 0 0 3px rgba(240,160,48,.35); }
.rk-fokus .rk-feld.rk-cursor:after { content: ""; width: 2px; height: 26px; background: #7a3b00; -webkit-animation: rk-blink 1s steps(1) infinite; animation: rk-blink 1s steps(1) infinite; }
@-webkit-keyframes rk-blink { 50% { opacity: 0; } }
@keyframes rk-blink { 50% { opacity: 0; } }
@-webkit-keyframes rk-plopp { 0% { -webkit-transform: scale(.8); } 100% { -webkit-transform: scale(1); } }
@keyframes rk-plopp { 0% { transform: scale(.8); } 100% { transform: scale(1); } }

/* parola senza anagramma (Show_A = 0): casella normale */
.rk-frei { width: 100%; font: 700 24px Montserrat, Arial, sans-serif; text-transform: uppercase; letter-spacing: 2px; padding: 10px 14px; border: 2px solid #cdbba3; border-radius: 10px; background: #fffdf8; color: #2b2118; }
.rk-frei:focus { outline: 0; border-color: #a0561a; box-shadow: 0 0 0 3px rgba(240,160,48,.35); }

.rk-versuche { margin-top: 10px; font-size: 15px; color: #6d6257; }
.rk-versuche .rk-v { display: inline-block; background: #f4ede3; border-radius: 14px; padding: 1px 10px; margin: 2px 4px 2px 0; color: #4a3e33; letter-spacing: 1px; }
.rk-versuche .rk-v.rk-alle { text-decoration: line-through; color: #9b8f82; }

/* parola risolta */
.rk-wk.rk-geloest { border-color: #7cc47f; background: #f3fbf2; background: linear-gradient(#f3fbf2, #fff); }
.rk-wk.rk-geloest .rk-stein { background: #c9eec3; background: linear-gradient(#e9f8e6, #c9eec3); border-color: #62b066; box-shadow: 0 3px 0 #3f8f45; color: #155d20; }
.rk-wk.rk-jetzt .rk-stein { -webkit-animation: rk-flip .5s both; animation: rk-flip .5s both; }
.rk-geloest-band { display: flex; align-items: center; margin-top: 8px; font-weight: 700; color: #1f7a2e; }
.rk-geloest-band svg { margin-right: 8px; flex: 0 0 26px; }
@-webkit-keyframes rk-flip { 0% { -webkit-transform: rotateX(90deg); } 100% { -webkit-transform: rotateX(0); } }
@keyframes rk-flip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.rk-wk.rk-wackeln { -webkit-animation: rk-wackeln .5s .3s; animation: rk-wackeln .5s .3s; border-color: #eba49c; }
@-webkit-keyframes rk-wackeln { 20% { -webkit-transform: translateX(-8px); } 40% { -webkit-transform: translateX(7px); } 60% { -webkit-transform: translateX(-5px); } 80% { -webkit-transform: translateX(3px); } }
@keyframes rk-wackeln { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* carte bloccate (prima dell'inizio, ospiti) */
.rk-wk.rk-zu .rk-steine { -webkit-filter: blur(4px); filter: blur(4px); opacity: .6; }
.rk-schloss { position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -20%); transform: translate(-50%, -20%); white-space: nowrap; background: #fff; border: 1px solid #f0c48a; border-radius: 20px; padding: 4px 16px; font-size: 16px; font-weight: 700; color: #7a3b00; box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* pulsanti */
.rk-knopfzeile { text-align: center; padding: 4px 20px 22px; }
.rk-knopf, a.rk-knopf { display: inline-block; border: 0; border-radius: 40px; padding: 14px 40px; font: 700 22px Montserrat, Arial, sans-serif; color: #fff; text-decoration: none; text-shadow: none; background: #d15f12; background: linear-gradient(#e8761c, #c4520b); box-shadow: 0 4px 0 #8f3a06, 0 6px 14px rgba(0,0,0,.18); cursor: pointer; width: auto; height: auto; margin: 0; }
.rk-knopf:hover, .rk-knopf:focus { background: #d15f12; background: linear-gradient(#f08a2e, #d15f12); color: #fff; }
.rk-knopf:active { -webkit-transform: translateY(3px); transform: translateY(3px); box-shadow: 0 1px 0 #8f3a06; }
.rk-knopf:focus { outline: 3px solid #1a5fb4; outline-offset: 3px; }
.rk-knopf.rk-wartet, .rk-knopf.rk-wartet:hover { opacity: .75; cursor: wait; background: #c4520b; -webkit-transform: none; transform: none; }
a.rk-knopf.rk-zweit { background: #fff; color: #7a3b00; border: 2px solid #f0c48a; box-shadow: none; font-size: 18px; padding: 10px 24px; margin: 6px; }
a.rk-knopf.rk-zweit:hover { background: #fff3d6; }

/* regole */
.rk-regeln { margin: 0 20px 14px; background: #fff; border-radius: 12px; border: 1px solid #f0c48a; }
.rk-regeln summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: #7a3b00; }
.rk-regeln .rk-inhalt { padding: 0 18px 12px; font-size: 16px; }
.rk-regeln dl { margin: 0; }
.rk-regeln dt { font-weight: 700; margin-top: 8px; }
.rk-regeln dd { margin: 0 0 4px; }
.rk-ligen { display: flex; flex-wrap: wrap; margin: 6px -4px; }
.rk-ligen div { flex: 1 1 150px; margin: 4px; text-align: center; border-radius: 10px; padding: 8px; background: #fbf4e8; font-size: 14px; }
.rk-ligen div.rk-du { background: #fff3d6; outline: 2px solid #f0a030; }
.rk-ligen img { height: 40px; width: auto; display: block; margin: 0 auto 4px; }

/* stelline dopo la risposta giusta */
.rk-funke { position: fixed; width: 10px; height: 10px; pointer-events: none; z-index: 1100; border-radius: 2px; -webkit-transition: -webkit-transform 1.4s cubic-bezier(.2,.6,.4,1), opacity 1.4s ease-in; transition: transform 1.4s cubic-bezier(.2,.6,.4,1), opacity 1.4s ease-in; }

/* pulsanti di prova dell'admin (Tag vorher / Nächsten Tag) */
.rk-admin { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 15px; }
.rk-admin form { margin: 4px 8px; }

@media (max-width: 500px) {
	.rk { font-size: 17px; border-radius: 14px; }
	.rk-kopf h2 { font-size: 24px; }
	.rk-stein { width: 32px; height: 38px; font-size: 19px; margin: 2px; }
	.rk-feld { width: 32px; height: 42px; font-size: 20px; margin: 2px; }
	.rk-woerter { padding: 0 10px 6px; }
	.rk-hilfen, .rk-regeln, .rk-meldung { margin-left: 10px; margin-right: 10px; }
	.rk-lang .rk-stein { width: 26px; height: 32px; font-size: 16px; border-radius: 6px; }
	.rk-lang .rk-feld { width: 26px; height: 36px; font-size: 17px; border-radius: 6px; }
	.rk-status .rk-uhr { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
	.rk *, .rk-funke, .rk-overlay, .rk-overlay * { -webkit-animation: none !important; animation: none !important; -webkit-transition: none !important; transition: none !important; }
}
