/* Telemeriendas: the parts of the "¿Te acuerdas?" quiz that look the same wherever it is played
   (owner, 2026-11-03: "haz que los estilos del quiz del main page y el de la subpage sean
   idénticos"): its page (te-acuerdas/, with quiz.css for that page's layout) and the question
   under the TV (index.php, with home.css for its place there). The prize line, the walnut TV with
   its screen and snow, the question, the four answers (green when right, red when wrong, snow
   while the server checks one) and the message after answering. Loaded after style.css, whose
   palette it uses */

/* The prize, over the question (owner, 2026-11-03: "algún mensaje de que al responder correctamente
   ganas un fantástico cromo"): a Cola Cao pill with a star and a link to the album */
.quiz-prize {
	display: inline-block;
	margin: 0 0 10px;
	padding: 4px 12px;
	background: var(--cola-cao);
	border: 2px solid var(--cocoa);
	border-radius: 999px;
	box-shadow: 0 2px 0 rgba(91, 52, 32, 0.3);
	color: var(--cocoa-dark);
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1.3;
	white-space: nowrap;  /* on one line (owner, 2026-11-03), shortened below on narrow screens */
}
.quiz-prize a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}
/* Narrow screens leave out "para tu álbum" (.prize-tail; "fantástico" stays, owner), the
   narrowest also take a smaller letter */
@media only screen and (max-width: 440px) {
	.prize-tail {
		display: none;
	}
}
@media only screen and (max-width: 359px) {
	.quiz-prize {
		padding: 4px 10px;
		font-size: 0.8125rem;
	}
}

/* The TV: the TV page's set (tv-look.css, nav.php's tmTvLook(); 2026-11-06, owner: "siempre tenga
   el aspecto de la tv de la main page"; until then a walnut frame round the screen, no panel) */
/* Without the antenna (owner, 2026-11-06: "Quita las antenas de la tele del quiz"), so no room
   above it, and without the panel (the same day: "elimina completamente la zona de botones y
   altavoz de la tele del quiz"): the wood, the bezel and the screen */
.quiz-set .tvl-antenna,
.quiz-set .tvl-panel {
	display: none;
}
.quiz-set.tvl .tvl-cabinet {
	margin-top: 0;
}
.quiz-set .tvl-screen img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s;
}
.quiz-set .tvl-screen img.is-shown {
	opacity: 1;
}
/* The TV's snow until the picture loads (resources/snow.js; owner, 2026-11-03: it said
   "Sintonizando…"), over the picture while it fades in */
.quiz-snow {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	image-rendering: auto;  /* smoothly scaled, as the TV's #static */
}
.quiz-snow[hidden] {
	display: none;
}
/* Only if the picture fails: "Sin señal" over the snow, in the TV's on-screen green with a black
   shadow so it reads on the grain */
.quiz-loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 0 16px;  /* "Sin señal: responde a ciegas" may wrap */
	pointer-events: none;
	color: #7cfc6a;
	font-family: "VT323", ui-monospace, monospace;
	font-size: 2rem;
	line-height: 1.1;
	text-shadow: 0 0 6px rgba(124, 252, 106, 0.6), 2px 2px 0 #000;
}

/* An h2 (2026-10-27), with the look it had as a paragraph */
.quiz-question {
	margin: 0;
	color: var(--accent-bg);
	font-family: var(--font-display);
	font-size: clamp(1.25rem, 3.6vw, 1.625rem);
	font-weight: 700;
	text-shadow: 1px 1px 0 var(--cola-cao);
}

/* Answers: four cream pills in two columns */
.quiz-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	width: 100%;
}
.quiz-options button {
	min-height: 52px;
	padding: 10px 16px;
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 3px 0 rgba(91, 52, 32, 0.25);
	color: var(--text);
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
}
.quiz-options button:hover:not(:disabled) {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
.quiz-options button:disabled {
	cursor: default;
}
.quiz-options button.is-right {
	background: #2f7a3a;
	border-color: #1f5427;
	color: #ffffff;
}
.quiz-options button.is-wrong {
	background: var(--accent-bg);
	border-color: #8e2318;
	color: #ffffff;
}
/* An answer the server is checking (snow.js's tmSnow.busy(), owner, 2026-11-03: "un spinner
   acorde a la estática", as a slow answer looked like nothing happening): the button goes dark
   like a screen tuning, with the TV's snow behind its text, which turns white with the
   on-screen display's black shadow; then green or red */
.quiz-options button {
	position: relative;
	isolation: isolate;  /* the snow (z-index -1) over the background, under the text */
	overflow: hidden;
}
.quiz-options button.is-checking {
	background: #111111;
	border-color: #000000;
	color: #ffffff;
	text-shadow: 2px 2px 0 #000000;
	cursor: progress;
}
.quiz-options .snow-busy {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	opacity: 0.7;
	image-rendering: auto;
}

.quiz-feedback {
	min-height: 1.4em;
	color: var(--cocoa);
	font-size: 1.0625rem;
	font-weight: 800;
}
/* No room held before an answer (owner, 2026-11-03: "mucho espacio vacío" on the main page); not
   display: none, as it is a live region, which must stay in place to be read out */
.quiz-feedback:empty {
	min-height: 0;
}
.quiz-feedback.is-right {
	color: var(--term);
}
.quiz-feedback.is-wrong {
	color: var(--accent);
}

/* Phones: the answers one under another (the TV takes the TV page's phone look by itself,
   tv-look.css) */
@media only screen and (max-width: 520px) {
	.quiz-options {
		grid-template-columns: 1fr;
	}
}
/* Wide screens: beside the TV, the answers one under another, read from the left */
@media only screen and (min-width: 900px) {
	.quiz-options {
		grid-template-columns: 1fr;
	}
	.quiz-options button {
		text-align: left;
	}
}
