/* Telemeriendas: the "¿Te acuerdas?" quiz (te-acuerdas/, 2026-10-23). The frame on a small walnut
   TV, four cream answer pills (green when right, red when wrong), the score; loaded after
   style.css, whose palette, bar and footer it shares. The TV, the question, the answers, the
   message and the prize line are in quiz-parts.css (2026-11-03), shared with the main page; this
   is the page's own layout, head, keys, buttons and end card */

.quiz {
	display: grid;
	justify-items: center;
	gap: 18px;
	width: min(100%, var(--page-width));  /* with its 16px sides: 1248px of content, as the bar */
	margin: 0 auto;
	padding: 36px 16px 48px;  /* 48px clear above the footer */
	text-align: center;
}
.quiz [hidden] {
	display: none !important;
}
/* A gap, and children that may shrink and wrap, so at 320px with large text it can't
   overflow (2026-10-27) */
.quiz-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	width: 100%;
	color: var(--cocoa);
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 700;
}
.quiz-head > * {
	min-width: 0;
}
.quiz-score {
	padding: 2px 12px;
	background: var(--cola-cao);
	border-radius: 999px;
	color: var(--cocoa-dark);
}

/* The 1 to 4 keys, said quietly; only where there is likely a keyboard (2026-10-27) */
.quiz-keys {
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 700;
}
@media (hover: none), (pointer: coarse) {
	.quiz-keys {
		display: none;
	}
}

#quiz-next,
#quiz-again,
.quiz-retry {
	padding: 10px 22px;
	background: linear-gradient(#d0412f, #8e2318);
	border: 1px solid #5e160e;
	border-radius: 999px;
	box-shadow: 0 3px 0 #5e160e;
	color: #ffffff;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
}
/* Hover: a little brighter (2026-10-27) */
#quiz-next:hover,
.quiz-retry:hover {
	filter: brightness(1.08);
}
/* "Reintentar", when a question fails to load (quiz.js): after the message, a size smaller */
.quiz-retry {
	margin-left: 6px;
	padding: 6px 16px;
	font-size: 0.9375rem;
}

/* End of the round */
.quiz-end {
	display: grid;
	justify-items: center;
	gap: 10px;
	width: 100%;
	padding: 30px 20px;
	background: linear-gradient(160deg, #c8392b, #8e2318);
	border-radius: 18px;
	box-shadow: 0 14px 30px rgba(91, 52, 32, 0.3);
	color: #fff7e6;
}
/* An h2 (2026-10-27), with the look it had as a paragraph */
.quiz-end-kicker {
	margin: 0;
	color: #fbe7a6;
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.quiz-end-score {
	color: var(--cola-cao);
	font-family: var(--font-display);
	font-size: clamp(2rem, 6vw, 2.8rem);
	font-weight: 700;
	text-shadow: 3px 3px 0 var(--cocoa-dark);
}
.quiz-end-rating {
	font-size: 1.125rem;
	font-weight: 700;
}
.quiz-end-best {
	font-family: "VT323", ui-monospace, monospace;
	font-size: 1.5rem;
}
/* The album after the round, and a link to it (owner, 2026-11-03: cromos are won here) */
.quiz-end-album {
	max-width: 36em;
	margin: 4px 0 0;
	padding: 10px 16px;
	background: rgba(46, 27, 16, 0.28);
	border-radius: 12px;
	color: #fff4dc;
	font-weight: 700;
	text-wrap: balance;
}
.quiz-end-link {
	color: #fbe7a6;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.quiz-end-link:hover {
	color: #ffffff;
}
.quiz-end #quiz-again {
	margin-top: 6px;
	background: var(--surface);
	border-color: var(--border);
	box-shadow: 0 3px 0 rgba(46, 27, 16, 0.4);
	color: var(--text);
}
.quiz-end #quiz-again:hover {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
/* On the red card the accent ring hardly showed: the light yellow there (2026-10-27) */
.quiz-end :focus-visible {
	outline-color: #fbe7a6;
}
/* No ring for a mouse or a finger (quiz.js sets .quiz-pointer until a key is pressed; owner,
   2026-11-03: the red border on the answers): the quiz focuses its buttons for keyboard users */
.quiz-pointer .quiz :focus-visible {
	outline: none;
}

/* The footer stays at the bottom with the same space above it (as on the TV page) */
.quiz-page .site-footer {
	flex-grow: 1;
	margin-top: 0;
}

@media only screen and (max-width: 520px) {
	.quiz {
		padding-top: 22px;
	}
}

/* Wide screens: the page as wide as the others, in two columns, the TV with the frame on the
   left and the question, answers and result on the right */
@media only screen and (min-width: 900px) {
	.quiz {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
		grid-template-areas:
			"head head"
			"set prize"
			"set question"
			"set options"
			"set keys"
			"set feedback"
			"set next"
			"end end";
		grid-template-rows: auto auto auto auto auto auto 1fr auto;
		align-items: start;
		column-gap: 36px;
		justify-items: stretch;
	}
	.quiz-head { grid-area: head; }
	.quiz-set { grid-area: set; }
	.quiz-prize { grid-area: prize; justify-self: start; margin-top: 30px; }
	.quiz-question { grid-area: question; align-self: end; margin-top: 4px; text-align: left; }
	.quiz-options { grid-area: options; }  /* one column, read from the left: quiz-parts.css */
	.quiz-keys { grid-area: keys; text-align: left; }
	.quiz-feedback { grid-area: feedback; text-align: left; }
	.quiz-next { grid-area: next; text-align: left; }
	.quiz-end { grid-area: end; }
}

