/* Telemeriendas: a homely palette, an 80s after-school snack in the kitchen: cream walls, a
   red gingham tablecloth, the yellow Cola Cao tin, chocolate milk and a bread roll */
/* Content width: 1280px (common standard); header, filters and grid share it */
:root {
	--page-width: 1280px;
	--bg: #ecd3ae;
	--surface: #fbeedb;
	--surface-hover: #f6e1c0;
	--border: rgba(74, 40, 22, 0.2);
	--border-hover: rgba(74, 40, 22, 0.4);
	--text: #3a2013;
	--muted: #7a5338;
	--accent: #b23a26;
	--accent-bg: #c8392b;
	--term: #2a6e34;  /* 2026-10-27: was #2f7a3a, under 4.5:1 on the guide's tuned row (audit) */
	--danger: #c8392b;
	--radius: 8px;
	--cocoa: #5b3420;
	--cocoa-dark: #2e1b10;
	--cola-cao: #f6b91a;
	--bread: #d9a066;
	--gingham: rgba(200, 57, 43, 0.55);
	--font-text: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Fredoka", "Nunito", system-ui, sans-serif;
	--font-badge: "Nunito", system-ui, sans-serif;
	color-scheme: light;
}
* {
	box-sizing: border-box;
}
html, body {
	height: 100%;
}
/* 2026-10-27 (web interface guidelines): what is scrolled to (a focused control, an anchor)
   stops below the fixed bar, whose height the pages' scripts keep in --bar-height; quick taps
   don't zoom (iOS), and a tap shows a faint flash of the accent, not the browser's grey */
html {
	scroll-padding-top: calc(var(--bar-height, 72px) + 12px);
	-webkit-tap-highlight-color: rgba(178, 58, 38, 0.15);
}
a, button, input, .grid-item {
	touch-action: manipulation;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-text);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
p {
	margin: 0;
}
a {
	color: inherit;
	text-decoration: none;
}
a:focus-visible, button:focus-visible, .grid-item:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
/* On the dark bar and footer (chocolate, or a theme's purple, red or blue) the red ring was
   about 1.7:1; there it is the light yellow (2026-10-27) */
nav :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--cola-cao);
}
/* "Saltar al contenido" (nav.php, tmSkipLink()): off screen until focused, then over the bar */
.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 10;
	padding: 8px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font-weight: 800;
	/* translate, which the reduced-motion "transform: none" below leaves alone */
	translate: 0 -200%;
}
.skip-link:focus-visible {
	translate: none;
}

/* Top bar: fixed, so it stays visible while scrolling (sticky let it go after one screen:
   body is only the window's height, as the grid is absolutely positioned). script.js pads
   the body by the bar's height, which changes with the filter panel and its second row */
nav {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	background: rgba(250, 241, 222, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
nav #main {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: var(--page-width);
	margin: 0 auto;
	padding: 12px 16px;
}
.brand {
	flex: 1;
	min-width: 0;
}
.brand h1 {
	overflow: hidden;
	margin: 0;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.brand .subtitle {
	overflow: hidden;
	color: var(--muted);
	font-size: 0.8125rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
.count-badge {
	padding: 4px 10px;
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;  /* the roll-up doesn't jitter (2026-10-27) */
	white-space: nowrap;
}
.count-badge #count,
.count-badge #count-videos {  /* (the videos' number too, owner, 2026-11-14: "pon de color rojo también el total de vídeos") */
	color: var(--term);
}
/* Filtros: sliders icon and label, like Auto; icon only on phones (see the auto-scroll button) */
nav button#filters {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
}
nav button#filters:hover {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
nav button#filters.active {
	background: var(--accent-bg);
	border-color: var(--accent-bg);
	color: #ffffff;
}

/* Filter panel (toggled by the Filtros button). It is inside the fixed bar, so on a phone it
   could run past the bottom of the screen: no taller than most of the screen, scrolling on its
   own without moving the page behind it (2026-10-27) */
.buttons {
	display: none;
	max-height: 65vh;
	max-height: 65dvh;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--border);
}
.content {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	max-width: var(--page-width);
	margin: 0 auto;
	padding: 16px;
}
.filter-label {
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
/* Under the Rombos filter: titles with rombos are only in the catalogue, off the TV's schedule
   (owner, 2026-11-13: "Haciendo explícito que el contenido con rombos queda fuera de la
   programación aunque es visible desde el catálogo") */
.filter-note {
	margin-top: 6px;
	color: var(--muted);
	font-size: 0.75rem;
	line-height: 1.35;
}
.chips button {
	padding: 6px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}
.chips button:hover {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
.chips button.active {
	background: var(--accent-bg);
	border-color: var(--accent-bg);
	color: #ffffff;
}

/* Grid: same item widths as before (2 / 3 / 5 columns), laid out by Isotope */
.grid {
	position: absolute;
	/* Items have 6px padding, so 10px here lines images up with the 16px header padding */
	width: calc(100% - 20px);
	max-width: calc(var(--page-width) - 20px);
	margin: 8px auto 24px;
	padding: 0;
}
.grid-sizer {
	float: left;
	width: 100%;
}
.grid-item {
	position: relative;
	float: left;
	width: 50%;
	margin: 0;
	padding: 6px;
}
.grid-item-container {
	position: relative;
	transition: transform 0.15s;
}
.grid-item.js-modal-btn {
	cursor: pointer;
}
.grid-item.js-modal-btn:hover .grid-item-container {
	transform: translateY(-3px) rotate(-1deg);
}
.thumb {
	position: relative;
	overflow: hidden;
	background: var(--cocoa-dark);
}
img {
	display: block;
	width: 100%;
	transition: transform 0.3s, opacity 0.3s;
}
img:before {
	content: "Dibuhazo noncontrao";
}
/* The card's picture has width and height attributes (catalogo/index.php) to keep its room
   while it loads; its height follows its width (2026-10-27) */
.thumb img {
	height: auto;
}
.grid-item.js-modal-btn:hover img {
	opacity: 0.6;
	transform: scale(1.03);
}

/* Play button, centered on the image, shown on hover */
.play-container {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: 48px;
	height: 48px;
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.9);
	transition: opacity 0.15s, transform 0.15s;
}
.grid-item.js-modal-btn:hover .play-container {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}
.grid-item:not(.js-modal-btn) .play-container {
	display: none;
}
/* What the video is (owner, 2026-11-08: "Identifica claramente ... si son intro, fragmento o episodio
   completo"; script.js): a label, its colour by kind (fixed colours, the same in every theme),
   on the white panel at the end of the year's row (owner, 2026-11-10: "Mueve el label de
   fragmento, intro, etc a la parte blanca"; on the picture's top left corner until then). The
   Tabla view has a Vídeo column instead */
.video-kind {
	grid-area: kind;
	justify-self: end;
	margin-left: 8px;
	padding: 0 6px 1px;
	border-radius: 4px;
	color: #fff;
	font-family: var(--font-badge);
	font-size: 0.6875rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	pointer-events: none;
}
.video-kind.is-full {
	background: #2a6e34;
}
.video-kind.is-fragment {
	background: #f6b91a;
	color: #2e1b10;
}
.video-kind.is-intro {
	background: #b23a26;
}
[data-view="list"] .video-kind {
	display: none;
}
/* TVE's old rombos (owner, 2026-11-13: "En el catálogo, colocar uno o dos rombos según el caso";
   script.js, cards.php's "rombos"): one, not for under-14s; two, only for adults. Red diamonds
   with a white edge in the picture's top right corner, where TVE put its white ones (owner, the
   same day: "ponles color al rombo pq en blanco no se notan"; white for an hour); in the Tabla
   view, small and red after the title. (tm-rombos: the filter's buttons have the class rombos) */
.tm-rombos {
	position: absolute;
	z-index: 2;
	top: 10px;
	right: 12px;
	display: flex;
	gap: 11px;
	pointer-events: none;
}
.tm-rombos i {
	display: block;
	width: 13px;
	height: 13px;
	background: #d0412f;
	box-shadow: 0 0 0 2px #fff, 0 1px 5px 2px rgba(0, 0, 0, 0.45);
	rotate: 45deg;  /* (the property, not a transform: reduced motion takes transforms away) */
}
.tm-rombos-inline {
	display: none;
	position: static;
	vertical-align: 1px;
	gap: 5px;
	margin-left: 4px;
}
.tm-rombos-inline i {
	width: 7px;
	height: 7px;
	background: #d0412f;
	box-shadow: none;
}
[data-view="list"] .thumb .tm-rombos {
	display: none;
}
[data-view="list"] .tm-rombos-inline {
	display: inline-flex;
}
/* Where it is on the TV (owner, 2026-11-14: "indicar en cada título el canal donde se emite";
   script.js, cards.php's "channel"): a tag in the picture's bottom left corner, in the TV's
   on-screen green on black, as the set shows a channel; in the Tabla view, after the title */
.tm-channel {
	position: absolute;
	z-index: 2;
	left: 8px;
	bottom: 8px;
	padding: 2px 7px;
	background: rgba(0, 0, 0, 0.78);
	color: #7cfc6a;
	border-radius: 4px;
	font: 400 15px/1.1 "VT323", ui-monospace, monospace;
	letter-spacing: 0.02em;
	pointer-events: none;
}
.tm-channel-inline {
	display: none;
	position: static;
	margin-left: 6px;
	padding: 0 5px;
	font-size: 13px;
	vertical-align: 1px;
}
[data-view="list"] .thumb .tm-channel {
	display: none;
}
[data-view="list"] .tm-channel-inline {
	display: inline-block;
}
.dot {
	position: absolute;
	inset: 0;
	background: var(--accent-bg);
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.play {
	position: absolute;
	top: 50%;
	left: 54%;
	width: 0;
	height: 0;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	border-left: 15px solid #ffffff;
	transform: translate(-50%, -50%);
}

/* Details: under the picture (the grid's white panel, further down; the list's columns) */
.description {
	width: 100%;
	padding: 10px 12px 12px;
}
.description .title {
	overflow: hidden;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
}
.description .year, .description .producer {
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.75rem;
}
.description .year {
	margin-top: 4px;
	color: var(--accent);
}

/* Loading screen */
#preloader {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: table;
	width: 100%;
	height: 115%;
	background: var(--bg);
}
.no-js #preloader, .oldie #preloader {
	display: none;
}
#loader {
	display: table-cell;
	text-align: center;
	vertical-align: middle;
}
.line-scale-pulse-out > div {
	display: inline-block;
	width: 6px;
	height: 40px;
	margin: 2px;
	background-color: var(--accent);
	border-radius: 3px;
	animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85);
	animation-fill-mode: both;
}
.line-scale-pulse-out > div:nth-child(2), .line-scale-pulse-out > div:nth-child(4) {
	animation-delay: -0.4s !important;
}
.line-scale-pulse-out > div:nth-child(1), .line-scale-pulse-out > div:nth-child(5) {
	animation-delay: -0.2s !important;
}
@keyframes line-scale-pulse-out {
	0% { transform: scaley(1); }
	50% { transform: scaley(0.4); }
	100% { transform: scaley(1); }
}

#zero-results {
	display: none;
	margin: 64px 16px 0;
	color: var(--muted);
	font-size: 1.125rem;
	line-height: 1.6;
	text-align: center;
}

@media only screen and (min-width: 700px) {
	.grid-item {
		width: 33.3%;
	}
	.content {
		grid-template-columns: 2fr 1fr 1fr 1fr;
		gap: 24px;
	}
}

@media only screen and (min-width: 992px) {
	.grid-item {
		width: 20%;
	}
	/* The details sat on the picture until 2026-11-10; now on a white panel under it (below) */
}

@media only screen and (max-width: 520px) {
	.brand .subtitle {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *:hover {
		transition: none !important;
		transform: none !important;
	}
	.play-container, .grid-item.js-modal-btn:hover .play-container {
		transform: translate(-50%, -50%) !important;
	}
	.play {
		transform: translate(-50%, -50%) !important;
	}
}

/* ------------------------------------------------------------------
   Retro TV touches: a wooden TV set icon, a gingham strip under the bar,
   tube-shaped thumbnails, and a frameless rounded video screen with CRT glass
   ------------------------------------------------------------------ */

/* Header: the TV in walnut veneer with a warm, lit screen, and below the bar a strip of red
   gingham tablecloth */
.tv-icon {
	display: flex;
	flex-shrink: 0;
	color: var(--cocoa);
}
.tv-icon svg > rect:first-of-type {
	fill: var(--bread);
}
.tv-icon .tv-screen {
	fill: #fbe7a6;
	stroke: var(--cocoa);
}
nav::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -13px;
	left: 0;
	height: 12px;
	background-color: var(--surface);
	background-image:
		linear-gradient(90deg, var(--gingham) 50%, transparent 0),
		linear-gradient(var(--gingham) 50%, transparent 0);
	background-size: 12px 12px;
	box-shadow: 0 3px 6px rgba(91, 52, 32, 0.18);
}

/* Cards as small screens with rounded tube corners, in a cream photo border like snapshots
   on the kitchen table */
.thumb {
	border-radius: 12px / 14px;
	box-shadow: 0 0 0 4px var(--surface), 0 6px 14px 2px rgba(91, 52, 32, 0.28);
}
.thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	background:
		repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
		radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
	opacity: 0;
	transition: opacity 0.2s;
}
.grid-item:hover .thumb::after {
	opacity: 1;
}
.description {
	padding: 8px 2px 4px;
}

/* Loader bars in snack colours: Cola Cao, chocolate, tablecloth red, bread */
.line-scale-pulse-out > div:nth-child(1) { background-color: var(--cola-cao); }
.line-scale-pulse-out > div:nth-child(2) { background-color: var(--cocoa); }
.line-scale-pulse-out > div:nth-child(3) { background-color: var(--accent-bg); }
.line-scale-pulse-out > div:nth-child(4) { background-color: var(--bread); }
.line-scale-pulse-out > div:nth-child(5) { background-color: var(--cola-cao); }

/* Video player: a frameless rounded screen, matching the cards (markup comes from
   jquery-modal-video). Selectors start with body: modal-video.min.css loads after this file. */
body .modal-video {
	background-color: rgba(46, 27, 16, 0.92);
	overscroll-behavior: contain;  /* scrolling it doesn't scroll the page (2026-10-27) */
}
body .modal-video-body {
	box-sizing: border-box;
	max-width: min(900px, calc((100vh - 120px) * 1.333 + 80px));
	padding: 0 40px;
}
body .modal-video-movie-wrap {
	background: #000;
	border-radius: 22px / 26px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
body .modal-video-movie-wrap iframe {
	background: #000;
	border-radius: 22px / 26px;
}
/* Glass: faint scanlines, vignette and a soft reflection over the picture */
body .modal-video-movie-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: 22px / 26px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
		repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.12) 2px 3px),
		radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.45) 100%);
}
body .modal-video-close-btn {
	top: -44px;
	right: 0;
}

/* The video in the TV page's set (owner, 2026-10-30; script.js, inCabinet()): since 2026-11-06
   the same set as the TV page's, seen from the front (tv-look.css, nav.php's tmTvLook(), a
   <template> in catalogo/index.php; owner: "Haz coherente la tv en todas las páginas"); until
   then a simplified cabinet of its own. No panel (owner, the same day: "Elimina los botones de
   la tele del quiz y del catálogo", then "quitar toda la zona de botones y altavoz", "Lo mismo
   con la tele que se ve en el catálogo"; until then volume − + and mute set YouTube's volume):
   the antenna, the wood, the bezel and the screen; YouTube's own controls set the volume. The
   window is as wide as fits the whole set, antenna included, in the window's height (its height
   is about 0.87 of its width), and the close button sits in the antenna's room, top right */
body .modal-video-body:has(.video-tv) {
	max-width: min(1120px, calc((100vh - 110px) / 0.87));  /* (110px: room for the share button under it, 2026-11-14; 40px until then) */
}
.video-tv .tvl-panel {
	display: none;
}
.video-tv {
	cursor: default;
}
body .video-tv .modal-video-movie-wrap {
	box-shadow: none;
}
/* The close button in the antenna's room, over the cabinet's top right corner */
body .video-tv .modal-video-close-btn {
	top: 0;
	right: 0;
}
/* Share (2026-11-14, script.js's addShareButton()): the TV page's big blue button (tele.css's
   .tele-share-button, which this page doesn't load), centred under the set, its postcard and
   link (owner: "que sea con un botón azul grande como el de la tele de la main page") */
.video-share {
	display: flex;
	justify-content: center;
	margin-top: 18px;
}
.video-share .tele-share-button {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 10px 22px;
	background: #2b5cb8;
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 3px 0 #1d4287, 0 6px 16px rgba(0, 0, 0, 0.35);
}
.video-share .tele-share-button svg {
	flex: none;
}
.video-share .tele-share-button:hover {
	background: #3468c9;
}
.video-share .tele-share-button:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #1d4287, 0 3px 8px rgba(0, 0, 0, 0.35);
}
.video-share .tele-share-button:focus-visible {
	outline: 3px solid var(--cola-cao);
	outline-offset: 3px;
}
.video-share .tele-share-button[aria-busy="true"] {
	cursor: progress;
	opacity: 0.7;
}
@media only screen and (max-width: 760px) {
	.video-share .tele-share-button {
		width: 100%;
		justify-content: center;
	}
}
/* The close button (owner, 2026-11-02: "mejorar el aspecto del aspa"): it was the plugin's, two
   thin white lines on nothing, a little off centre. Now a round cream button with a chocolate
   cross, raised like the site's other buttons; red with a white cross on hover, as the TV's
   power button; pressed in on a click; a ring with the keyboard. (Its name, "Cerrar el vídeo",
   is the plugin's aria-label, MODAL_OPTIONS in script.js) */
body .modal-video-close-btn {
	width: 42px;
	height: 42px;
	overflow: visible;
	background: var(--surface);
	border: 2px solid var(--cocoa-dark);
	border-radius: 50%;
	box-shadow: 0 3px 0 var(--cocoa-dark), 0 6px 14px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	transition: background-color 0.15s, transform 0.1s, box-shadow 0.1s;
}
body .modal-video-close-btn::before,
body .modal-video-close-btn::after {
	top: 50%;
	left: 50%;
	width: 18px;
	height: 3px;
	margin: -1.5px 0 0 -9px;   /* centred (the plugin's was 6px high) */
	background: var(--cocoa-dark);
	border-radius: 2px;
	transition: background-color 0.15s;
}
body .modal-video-close-btn:hover {
	background: var(--accent-bg);
}
body .modal-video-close-btn:hover::before,
body .modal-video-close-btn:hover::after {
	background: #fff;
}
body .modal-video-close-btn:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 var(--cocoa-dark), 0 3px 8px rgba(0, 0, 0, 0.45);
}
body .modal-video-close-btn:focus-visible {
	outline: 3px solid var(--cola-cao);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	body .modal-video-close-btn,
	body .modal-video-close-btn::before,
	body .modal-video-close-btn::after {
		transition: none;
	}
}

@media only screen and (max-width: 699px) {
	body .modal-video-body {
		padding: 0 16px;
	}
	/* (the set takes the TV page's phone look by itself, tv-look.css) */
	body .modal-video-movie-wrap,
	body .modal-video-movie-wrap iframe,
	body .modal-video-movie-wrap::after {
		border-radius: 12px / 14px;
	}
}


@media (prefers-reduced-motion: reduce) {
	.thumb::after {
		transition: none;
	}
}

/* Auto-scroll button: play icon, switching to a green pause icon while scrolling */
nav button#autoscroll {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
}
nav button#autoscroll:hover {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
nav button#autoscroll[aria-pressed="true"] {
	border-color: var(--term);
	color: var(--term);
}
.as-icon {
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 8px solid currentColor;
}
#autoscroll[aria-pressed="true"] .as-icon {
	width: 9px;
	height: 10px;
	border: 0;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
}
@media only screen and (max-width: 520px) {
	.as-label, .filters-label {
		display: none;
	}
	nav button#autoscroll, nav button#filters {
		padding: 9px 11px;
	}
}

/* Phones: the gaps are tighter (the TV icon goes too: see the view switch); the counts keep
   their words, a little smaller (owner, 2026-11-11: "Indica qué significa cada número (títulos,
   vídeos)"; from 2026-10-27 the number alone, "títulos" only in its tooltip) */
@media only screen and (max-width: 520px) {
	.count-badge {
		padding: 4px 8px;
		font-size: 0.6875rem;
	}
	nav #main {
		gap: 10px;
	}
	.actions {
		gap: 6px;
	}
}

/* ------------------------------------------------------------------
   Views: grid (the default) and list (since 2026-11-10; compact grid and
   Videoclub until then). script.js sets <html data-view> from the
   switch in the bar and remembers it
   ------------------------------------------------------------------ */
.view-switch {
	display: inline-flex;
	gap: 2px;
	padding: 2px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
}
.view-switch button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 30px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 999px;
	color: var(--muted);
	cursor: pointer;
}
.view-switch button:hover {
	background: var(--surface-hover);
	color: var(--text);
}
.view-switch button[aria-pressed="true"] {
	background: var(--accent-bg);
	color: #ffffff;
}
/* Phones: both views' buttons too (owner, 2026-11-10: "haz los dos botones de vista visibles
   siempre"; until then only the current one, a tap moving on to the next). To leave the title
   room, the TV icon goes from 520px down, and from 380px down the switch loses its frame and
   the gaps are tighter */
@media only screen and (max-width: 520px) {
	.tv-icon {
		display: none;
	}
}
@media only screen and (max-width: 380px) {
	.view-switch {
		padding: 0;
		border: 0;
	}
	nav #main {
		gap: 8px;
	}
	.actions {
		gap: 4px;
	}
}

/* List: one row per title with a small poster, then title, year, producer, format
   and the Spanish dub */
[data-view="list"] .grid-item {
	width: 100%;
	padding: 0 6px;
}
[data-view="list"] .grid-item-container {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 3px 6px;  /* 6px until 2026-11-10 (owner: "compactando más su altura") */
	border-bottom: 1px solid var(--border);
}
[data-view="list"] .grid-item:hover .grid-item-container {
	background: var(--surface);
	transform: none;
}
/* The poster is a plain picture here, cropped to a small 4:3 screen so every row has the same
   height */
[data-view="list"] .thumb {
	position: static;
	flex: 0 0 40px;  /* 56px by 42px until 2026-11-10 */
	height: 30px;
	border-radius: 5px / 6px;
}
[data-view="list"] .thumb img {
	height: 100%;
	object-fit: cover;
}
[data-view="list"] .thumb::after,
[data-view="list"] .play-container {
	display: none;
}
[data-view="list"] .grid-item.js-modal-btn:hover img {
	opacity: 1;
	transform: none;
}
/* Each piece has its column by name (2026-10-31: Origen added, and from 1100px Técnica; a
   Géneros column was there for a few hours, the owner didn't want it; nor the genres in the line
   under the row. .list-head above has the same columns, with their headings) */
[data-view="list"] .description {
	position: static;
	display: grid;
	flex: 1;
	grid-template-columns: 1.75rem 6.5rem minmax(0, 1fr) 3.5rem 3.5rem minmax(0, 0.45fr) minmax(0, 0.6fr) 5rem 5rem 6.75rem;
	/* eps: a series' episodes button, "205 ▾" (2026-11-10) */
	grid-template-areas: "number id title eps year origin producer format kind updated";
	align-items: center;
	gap: 2px 16px;
	width: auto;
	min-width: 0;
	padding: 0;
	background: none;
	border-radius: 0;
	opacity: 1;
	transform: none;
}
[data-view="list"] .description .title,
[data-view="list"] .description .producer {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
[data-view="list"] .grid-item.js-modal-btn:hover .title {
	color: var(--accent);
}
[data-view="list"] .description .year {
	margin-top: 0;
}
/* Format is hidden in the other views. The Spanish dub (.spanish) is hidden in every view: the
   Tabla view's Doblaje column was taken out (owner, 2026-10-31) */
[data-view="list"] .description .format {
	display: block;
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.75rem;
}
[data-view="list"] .description .title { grid-area: title; }
[data-view="list"] .list-head .eps { grid-area: eps; }  /* (2026-11-10; empty headings) */
[data-view="list"] .list-head .wiki { grid-area: wiki; }
[data-view="list"] .description .year { grid-area: year; }
[data-view="list"] .description .origin { grid-area: origin; }
[data-view="list"] .description .producer { grid-area: producer; }
[data-view="list"] .description .format { grid-area: format; }
[data-view="list"] .description .kind { grid-area: kind; }  /* (2026-11-08) */
[data-view="list"] .description .technique { grid-area: technique; }
[data-view="list"] .description .updated { grid-area: updated; }
/* (owner, 2026-11-07) the number in the list and the YouTube id, first; not on phones (below) */
[data-view="list"] .description .number { grid-area: number; }
[data-view="list"] .description .video-id { grid-area: id; }
[data-view="list"] .description .number,
[data-view="list"] .description .video-id {
	display: block;
	overflow: hidden;
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.75rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}
[data-view="list"] .description .number {
	text-align: right;
	font-variant-numeric: tabular-nums;
}
[data-view="list"] .description .video-id {
	font-family: ui-monospace, Consolas, monospace;
	user-select: all;  /* one click selects it, to copy */
}
/* The new columns, like Formato: small and muted; one line, cut with "…" */
[data-view="list"] .description .origin,
[data-view="list"] .description .technique,
[data-view="list"] .description .kind,
[data-view="list"] .description .updated {
	display: block;
	overflow: hidden;
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.75rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}
[data-view="list"] .description .technique {
	display: none;
}
/* Wide screens: Técnica gets a column too */
@media only screen and (min-width: 1100px) {
	[data-view="list"] .description {
		grid-template-columns: 2.25rem 7rem minmax(0, 1.2fr) 3.5rem 4.75rem 3.5rem 5rem 5rem 8.5rem minmax(0, 0.6fr) minmax(0, 0.8fr) 6.75rem;
		/* wiki: the Wikipedia link, the one piece of the old line under the row left (2026-11-10) */
		grid-template-areas: "number id title eps wiki year format kind technique origin producer updated";
	}
	[data-view="list"] .description .technique {
		display: block;
	}
}
/* The headings' row: laid out as a row (the same padding, poster's room and columns), shown in
   the Tabla view only. It stays under the fixed bar while the list scrolls (sticky;
   --bar-height is the bar's height, script.js), over the rows. On phones too since 2026-11-11
   (owner: "En móvil, la vista de lista, añade la cabecera para poder ordenar"), with Título and
   Año only (below); until then from 700px wide only */
.list-head {
	display: none;
}
@media only screen {
	/* As wide and centred as .grid, which follows it (12px narrower than the page) */
	[data-view="list"] .list-head {
		position: sticky;
		top: var(--bar-height, 140px);
		z-index: 3;
		display: block;
		width: calc(100% - 12px);
		max-width: calc(var(--page-width) - 12px);
		margin: 24px auto 0;
		padding: 0 6px;
	}
	[data-view="list"] .grid {
		margin-top: 0;
	}
	.list-head-row {
		display: flex;
		align-items: end;
		gap: 12px;
		padding: 8px 6px 6px;
		background: #f7e6cb;  /* the rows' cream, opaque: the rows pass under it */
		border-bottom: 2px solid var(--border-hover);
		border-radius: 8px 8px 0 0;
		box-shadow: 0 6px 10px -8px rgba(46, 27, 16, 0.45);
	}
	.list-head-thumb {
		flex: 0 0 40px;
	}
	[data-view="list"] .list-head .description > p {
		display: block;
		overflow: visible;
		white-space: normal;  /* a long heading wraps in a narrow column (2026-11-07) */
	}
	/* Headings that don't sort (Nº, ID): as the buttons look */
	.list-head .list-head-label {
		color: var(--cocoa);
		font-family: var(--font-display);
		font-size: 0.75rem;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}
	/* Each heading sorts by its column (script.js): ▲ from less to more, ▼ the other way */
	.list-head .sort {
		display: inline-block;  /* inline-flex until 2026-11-07: this lets a long heading wrap in a narrow column */
		max-width: 100%;
		padding: 2px 0;
		background: none;
		border: 0;
		color: var(--cocoa);
		font-family: var(--font-display);
		font-size: 0.75rem;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-align: left;
		text-transform: uppercase;
		cursor: pointer;
	}
	.list-head .sort::after {
		content: "\2195";  /* ↕, faint: it can be sorted */
		margin-left: 4px;
		opacity: 0.35;
		font-size: 0.875rem;
		line-height: 1;
	}
	.list-head .sort:hover {
		color: var(--accent);
	}
	.list-head .sort:hover::after {
		opacity: 0.8;
	}
	.list-head .sort[data-order="asc"],
	.list-head .sort[data-order="desc"] {
		color: var(--accent);
	}
	.list-head .sort[data-order="asc"]::after {
		content: "\25B2";
		opacity: 1;
		font-size: 0.625rem;
	}
	.list-head .sort[data-order="desc"]::after {
		content: "\25BC";
		opacity: 1;
		font-size: 0.625rem;
	}
	.list-head .sort:focus-visible {
		outline: 2px solid var(--accent);
		outline-offset: 2px;
		border-radius: 3px;
	}
}
@media only screen and (min-width: 700px) and (max-width: 1099px) {
	[data-view="list"] .list-head .description > p.technique,
	[data-view="list"] .list-head .description > p.wiki {
		display: none;
	}
}
/* Phones: the headings' row with Título on the left and Año on the right, over the thin rows'
   title and year (with Detalles too, whose rows wrap: the other headings would have no column) */
@media only screen and (max-width: 699px) {
	[data-view="list"] .list-head {
		margin-top: 16px;
	}
	[data-view="list"] .list-head .description {
		flex-wrap: nowrap;
		align-items: center;
	}
	[data-view="list"] .list-head .description > p:not(.title):not(.year) {
		display: none;
	}
	[data-view="list"] .list-head .description > p.title {
		flex: 1 1 auto;
		min-width: 0;
	}
	[data-view="list"] .list-head .description > p.year {
		flex: none;
		text-align: right;
	}
}
/* Narrow screens: the title on its own line, the rest below it */
@media only screen and (max-width: 699px) {
	[data-view="list"] .description {
		display: flex;
		flex-wrap: wrap;
		gap: 2px 10px;
	}
	[data-view="list"] .description .title {
		flex-basis: 100%;
	}
	[data-view="list"] .description .producer {
		max-width: 100%;
	}
	[data-view="list"] .description .producer:empty,
	[data-view="list"] .description .origin:empty {
		display: none;
	}
	/* No Nº or ID columns here: no headings to name them (2026-11-07) */
	[data-view="list"] .description .number,
	[data-view="list"] .description .video-id {
		display: none;
	}
}

/* Extra data from Wikidata: original title, facts (country, years, episodes,
   seasons) and a Wikipedia link. Stacked at the foot of the grid's white panel, one line under
   the row in the list */
.description .extra {
	margin-top: 4px;
	color: var(--muted);
	font-size: 0.75rem;
	line-height: 1.35;
}
.extra > * {
	display: block;
}
.extra .original-title {
	color: var(--text);
	font-style: italic;
}
.extra .wiki-link {
	display: inline-block;
	margin-top: 2px;
	color: var(--accent);
}
.extra .wiki-link:hover {
	text-decoration: underline;
}
/* The Tabla: no line under the row (owner, 2026-11-10: "compactando más su altura y evitando
   datos redundantes en cada fila"; until then the original title, the facts and the link there).
   Its columns have the country, the year and the date; the years and episodes are the grid's;
   only the Wikipedia link stays, in a column of its own from 1100px (a grid item: the line is
   display: contents) */
[data-view="list"] .description .extra {
	display: contents;
}
[data-view="list"] .extra > * {
	display: none;
}
[data-view="list"] .extra .wiki-link {
	grid-area: wiki;
	margin-top: 0;
	overflow: hidden;
	font-family: var(--font-badge);
	font-size: 0.75rem;
	white-space: nowrap;
}
@media only screen and (min-width: 1100px) {
	[data-view="list"] .extra .wiki-link {
		display: block;
	}
}

/* Filter groups with many buttons (Género, Productora, Marca…; catalogo/index.php marks them,
   2026-10-31; until then only Productora): a row of their own across the panel. Each button
   shows its number of titles */
.filter-group.is-wide {
	grid-column: 1 / -1;
}
/* Desktops (owner, 2026-10-31: the panel had to be scrolled): every group in view at once. Each
   has its place on a grid (fg-<group>, catalogo/index.php), small groups side by side, slightly
   smaller buttons, and the panel may take the window's height under the bar (it still scrolls
   on a very short window) */
@media only screen and (min-width: 992px) {
	.buttons {
		max-height: calc(100vh - 150px);
		max-height: calc(100dvh - 150px);
	}
	.content {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		/* Género, the tallest of the small ones, beside Origen and Técnica stacked */
		grid-template-areas:
			"years years years years years years years format format format format format"
			"genre genre genre genre genre genre genre origin origin origin origin origin"
			"genre genre genre genre genre genre genre technique technique technique technique technique"
			"genre genre genre genre genre genre genre capitulos capitulos capitulos capitulos capitulos"
			"producers producers producers producers producers producers producers producers producers producers producers producers"
			"author author author author author author author author author author author author"
			"marca marca marca marca marca marca marca ad ad ad ad ad"
			"contenido contenido contenido contenido contenido contenido contenido rombos rombos rombos rombos rombos"
			"canal canal canal canal canal canal canal canal canal canal canal canal";  /* (Canal, 2026-11-14) */
		/* (Vídeo and Rombos had no place until 2026-11-13, owner: "Las pildoras de filtros de video y
		   rombos son demasiado estrechas en desktop": put in one column each, a twelfth wide) */
		align-items: start;
		gap: 10px 28px;
		padding: 10px 16px 12px;
	}
	.content > .filter-group {
		grid-column: auto;
	}
	.content > .fg-years { grid-area: years; }
	.content > .fg-format { grid-area: format; }
	.content > .fg-technique { grid-area: technique; }
	.content > .fg-genre { grid-area: genre; }
	.content > .fg-origin { grid-area: origin; }
	.content > .fg-producers { grid-area: producers; }
	.content > .fg-author { grid-area: author; }  /* (2026-11-06) */
	.content > .fg-marca { grid-area: marca; }
	.content > .fg-ad { grid-area: ad; }
	.content > .fg-capitulos { grid-area: capitulos; }  /* (2026-11-08) */
	.content > .fg-contenido { grid-area: contenido; }  /* (2026-11-13) */
	.content > .fg-rombos { grid-area: rombos; }  /* (2026-11-13) */
	.content > .fg-canal { grid-area: canal; }  /* (2026-11-14) */
	.content .filter-label {
		margin-bottom: 4px;
	}
	.content .chips {
		gap: 4px;
	}
	.content .chips button {
		padding: 2px 10px;
		font-size: 0.75rem;
	}
}
.chip-count {
	margin-left: 2px;
	color: var(--muted);
	font-family: var(--font-badge);
	font-size: 0.6875rem;
	font-variant-numeric: tabular-nums;
}
.chips button.active .chip-count {
	color: rgba(255, 255, 255, 0.75);
}

/* Search (full list): in the bar between the title and the buttons on wide screens; below
   1100px, where the bar has no room left, a full-width second row of the (sticky) bar */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.search {
	position: relative;
	flex: 0 1 260px;
	min-width: 160px;
}
.search-icon {
	position: absolute;
	top: 50%;
	left: 12px;
	margin-top: -7.5px;
	color: var(--muted);
	pointer-events: none;
}
.search input {
	width: 100%;
	height: 36px;
	padding: 0 12px 0 34px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-size: 0.875rem;
}
.search input::placeholder {
	color: var(--muted);
}
.search input:hover {
	border-color: var(--border-hover);
}
.search input:focus {
	border-color: var(--accent);
}
/* A ring like the buttons', yellow on the dark bar (2026-10-27: there was none) */
.search input:focus-visible {
	outline: 2px solid var(--cola-cao);
	outline-offset: 2px;
}
.search input::-webkit-search-cancel-button {
	cursor: pointer;
}
@media only screen and (max-width: 1099px) {
	nav #main {
		flex-wrap: wrap;
	}
	.search {
		flex: 1 1 100%;
		order: 1;
	}
}

/* ------------------------------------------------------------------
   Homely touches (2026-10-23): the kitchen table at snack time. A faint
   gingham tablecloth behind the grid, a rounded 80s title in tablecloth
   red with a Cola Cao yellow shadow, a Cola Cao tin for the count, and
   chocolate tones over the pictures
   ------------------------------------------------------------------ */
/* The tablecloth is a fixed layer, so the background stays
   still while the cards scroll (a fixed layer rather than background-attachment: fixed,
   which iOS Safari ignores) */
body {
	background-color: var(--bg);
}
/* The gingham tablecloth alone (owner, 2026-11-05: "Elimina los motivos"). That day it had for a
   few hours a mosaic of the catalogue's pictures, then small motifs stitched on it (resources/
   motifs.svg, removed; in the backups) */
html::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(90deg, rgba(170, 60, 30, 0.07) 50%, transparent 0),
		linear-gradient(rgba(170, 60, 30, 0.07) 50%, transparent 0);
	background-size: 32px 32px;
	pointer-events: none;
}
::selection {
	background: var(--cola-cao);
	color: var(--cocoa-dark);
}
.brand h1 {
	color: var(--accent-bg);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.15;
	text-shadow: 2px 2px 0 var(--cola-cao);
}
.brand .subtitle {
	font-weight: 600;
}
.filter-label {
	color: var(--cocoa);
	font-family: var(--font-display);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}
.chips button, nav button#filters, nav button#autoscroll {
	font-weight: 700;
}
.count-badge {
	font-weight: 800;
}
/* Count: a label on the yellow Cola Cao tin */
.count-badge {
	background: var(--cola-cao);
	border-color: #d99a00;
	color: var(--cocoa);
}
.count-badge #count,
.count-badge #count-videos {  /* (the videos' number too, owner, 2026-11-14: "pon de color rojo también el total de vídeos") */
	color: var(--accent-bg);
}
/* Room for the gingham strip, and wider gaps so the photo borders don't touch; the grid
   is 12px narrower, so pictures still line up with the bar's 16px padding */
.grid {
	width: calc(100% - 12px);
	max-width: calc(var(--page-width) - 12px);
	margin-top: 24px;
}
.grid-item {
	padding: 10px;
}

/* Play button: a red tablecloth dot */
.dot {
	background: var(--accent-bg);
	box-shadow: 0 0 0 3px var(--surface), 0 6px 20px rgba(46, 27, 16, 0.45);
}

/* List view: rows on a cream sheet, plain pictures, dark text */
[data-view="list"] .grid-item {
	padding: 0 6px;
}
[data-view="list"] .grid-item-container {
	background: rgba(251, 238, 219, 0.75);
}
[data-view="list"] .grid-item:hover .grid-item-container {
	background: var(--surface-hover);
}
[data-view="list"] .thumb {
	box-shadow: none;
}
[data-view="list"] .description {
	--text: #3a2013;
	--muted: #7a5338;
	--accent: #b23a26;
}

/* Filter panel: a slightly deeper cream under the bar */
.buttons {
	background: #e6c69a;
}

@media (prefers-reduced-motion: reduce) {
	.grid-item.js-modal-btn:hover .grid-item-container {
		transform: none;
	}
}

/* Phones: a smaller title, so it shows as much of the name as the plain one did */
@media only screen and (max-width: 520px) {
	.brand h1 {
		font-size: 1.1875rem;
		text-shadow: 1.5px 1.5px 0 var(--cola-cao);
	}
}

/* A chocolate bar on top (2026-10-23, "more chocolate and warmth"): the title in Cola Cao
   yellow with a red shadow, like the tin; light text for the subtitle and TV, and a
   cream fill for the badges that had none. The buttons keep their cream pills */
nav {
	background: linear-gradient(to bottom, #5e3520, #43251a);
	border-bottom-color: #2e1b10;
}
nav .brand h1 {
	color: var(--cola-cao);
	text-shadow: 2px 2px 0 var(--accent-bg);
}
nav .brand .subtitle {
	color: #e3c49a;
}
nav .tv-icon {
	color: #f3dfc0;
}
@media only screen and (max-width: 520px) {
	nav .brand h1 {
		text-shadow: 1.5px 1.5px 0 var(--accent-bg);
	}
}

/* The grid's cards (owner, 2026-11-10: "grid donde cada card tenga una zona blanca bajo la
   imagen con todos los detalles", then "En las cards, no mostrar las labels (e.g. Serie,
   Dibujos animados...)" and "¿Podrían todas las cards tener la misma altura sin ser
   excesiva?"): every card the same height, at every width. The picture is cut to 4:3 (the
   usual shape; a wider one loses a little of its sides), and under it a white panel of three
   fixed rows: the title (one line, "…" when longer, whole in its tooltip), the year and the
   producer ("1940 · Warner Bros", "…" when longer), and the extra data in two lines at most
   (original title, country and facts, Wikipedia, the date, one after another; script.js leaves
   out what the card already says). Format, técnica and origin aren't shown (small tags for a
   few hours that day); the Vídeo kind stays on the picture's corner (.video-kind). Until that
   day a desktop showed the title on the picture and the rest on hover, and phones a cream
   caption under a picture of any height. The Tabla view keeps its columns */
html:not([data-view="list"]) .thumb {
	aspect-ratio: 4 / 3;
}
html:not([data-view="list"]) .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
html:not([data-view="list"]) .description {
	--text: #3a2013;
	--muted: #7a5338;
	--accent: #b23a26;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	/* The title's line, the year's (with the Vídeo kind's label at its end), and the extra
	   data's two lines under a dashed rule */
	grid-template-rows: 1.25rem 1.125rem calc(2.25rem + 7px);
	grid-template-areas: "title title title" "year producer kind" "extra extra extra";
	align-items: center;
	row-gap: 4px;
	width: 100%;  /* 8px wider, under the picture's white ring, until 2026-11-10 */
	margin: 0;
	padding: 10px 12px 12px;
	background: #ffffff;
	border-radius: 0 0 12px 12px / 0 0 14px 14px;
}
html:not([data-view="list"]) .description .title {
	grid-area: title;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25rem;
	white-space: nowrap;
}
html:not([data-view="list"]) .description :is(.year, .producer) {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.125rem;
	white-space: nowrap;
}
html:not([data-view="list"]) .description .year {
	grid-area: year;
	color: var(--accent);
}
html:not([data-view="list"]) .description .producer {
	grid-area: producer;
	overflow: hidden;
	text-overflow: ellipsis;
}
html:not([data-view="list"]) .description .year:not(:empty) + .producer:not(:empty)::before {
	content: "\00B7\00A0";
	padding-left: 0.3em;
	color: var(--muted);
}
html:not([data-view="list"]) .description .extra {
	display: -webkit-box;
	grid-area: extra;
	align-self: start;
	overflow: hidden;
	margin: 0;
	padding-top: 6px;
	border-top: 1px dashed #ead8bf;
	line-height: 1.125rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}
html:not([data-view="list"]) .extra > *,
html:not([data-view="list"]) .extra .wiki-link {
	display: inline;
	margin: 0;
}
html:not([data-view="list"]) .extra > * + *::before {
	content: " \00B7  ";
	color: var(--muted);
	font-style: normal;
	/* Even before an unsplittable part (below): the line may break after the dot, which then
	   ends the line above instead of leading the next one */
	white-space: normal;
}
/* A series' card (2026-11-10, script.js's "has-episodes"): its extra data in one line, and under
   it the button that opens its episodes, "205 episodios ▾", in the same fixed row */
html:not([data-view="list"]) .has-episodes .description .extra {
	-webkit-line-clamp: 1;
	line-clamp: 1;
}
/* Phones and narrow windows: the extra data's row one line high, not two (owner, 2026-11-11:
   "En móvil, la card queda con mucho espacio en blanco vacío bajo el país": in a card ~170px
   wide most say only "Estados Unidos", and the second line stayed blank). Every card is still
   the same height: the extra data in one line ("…" when longer); a series' card shows its
   "112 episodios ▾" button there instead (its extra data hidden under it, the dashed rule kept) */
@media only screen and (max-width: 699px) {
	html:not([data-view="list"]) .description {
		grid-template-rows: 1.25rem 1.125rem calc(1.125rem + 7px);
	}
	html:not([data-view="list"]) .description .extra {
		-webkit-line-clamp: 1;
		line-clamp: 1;
	}
	html:not([data-view="list"]) .has-episodes .description .extra > *,
	html:not([data-view="list"]) .has-episodes .description .extra .wiki-link {
		visibility: hidden;
	}
	/* (and the line's own "…", which is the row's, not its children's) */
	html:not([data-view="list"]) .has-episodes .description .extra {
		color: transparent;
	}
}
.episodes-toggle {
	display: inline-flex;
	grid-area: extra;
	align-self: end;
	justify-self: start;
	align-items: center;
	gap: 4px;
	height: 1.125rem;
	padding: 0 8px;
	background: #fbe1da;
	border: 0;
	border-radius: 999px;
	color: #b23a26;
	font-family: var(--font-badge);
	font-size: 0.6875rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}
.episodes-toggle::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.15s, margin 0.15s;
}
.episodes-toggle[aria-expanded="true"]::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}
.episodes-toggle:hover,
.episodes-toggle[aria-expanded="true"] {
	background: #b23a26;
	color: #ffffff;
}
.episodes-toggle:focus-visible,
.episodes-close:focus-visible,
.sub-card:focus-visible {
	outline: 3px solid var(--cola-cao);
	outline-offset: 2px;
}
/* In the Tabla, its own column: the number alone, "205 ▾" (the whole in its tooltip) */
html[data-view="list"] .episodes-toggle {
	grid-area: eps;
	align-self: center;
	height: 1.25rem;
}
html[data-view="list"] .episodes-toggle .eps-words {
	display: none;
}

/* The Tabla's sub-rows (owner, 2026-11-10: "Actualiza la vista de lista con sublistas"): under
   the series' row, indented on a deeper cream, each episode a low row with only its number (in
   Nº), its id, its title and its Vídeo kind; at most about ten rows, then it scrolls. No head:
   the series' button closes it */
html[data-view="list"] .episodes-panel {
	padding: 0 6px;
}
html[data-view="list"] .episodes-box {
	padding: 0;
	background: #f1dcbb;
	border-radius: 0 0 8px 8px;
	box-shadow: inset 0 6px 8px -8px rgba(46, 27, 16, 0.5);
}
html[data-view="list"] .episodes-head {
	display: none;
}
html[data-view="list"] .episodes-strip {
	display: block;
	max-height: 21rem;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
	scroll-snap-type: none;
}
html[data-view="list"] .sub-card {
	height: auto;
	overflow: visible;
	background: none;
	border-radius: 0;
}
html[data-view="list"] .sub-card .grid-item-container {
	padding: 1px 6px;
	border-bottom: 1px solid rgba(91, 52, 32, 0.12);
}
html[data-view="list"] .sub-card:hover .grid-item-container {
	background: rgba(255, 255, 255, 0.45);
}
html[data-view="list"] .sub-card:hover .title {
	color: var(--accent);
}
/* The picture's room kept empty, so the columns line up with the rows above */
html[data-view="list"] .sub-card .thumb {
	height: 22px;
	visibility: hidden;
}
/* The series' own columns stay empty, and the episode's title takes their room up to Vídeo */
html[data-view="list"] .sub-card .description :is(.year, .producer, .format, .technique, .origin, .updated) {
	display: none;
}
html[data-view="list"] .sub-card .description {
	grid-template-areas: "number id title title title title title title kind updated";
}
@media only screen and (min-width: 1100px) {
	html[data-view="list"] .sub-card .description {
		grid-template-areas: "number id title title title title title kind technique origin producer updated";
	}
}
html[data-view="list"] .sub-card .description .title {
	font-size: 0.875rem;
}
/* The grid's sub-card puts the episode's number before its title */
html:not([data-view="list"]) .sub-card .title::before {
	content: attr(data-n) ". ";
}
@media only screen and (max-width: 699px) {
	html[data-view="list"] .sub-card .description :is(.year, .producer, .format, .technique, .origin, .updated) {
		display: none;
	}
}

/* The Tabla, thin (owner, 2026-11-10: "En vista lista, sólo mostrar la imagen, título y año,
   dando opción a ver el resto de detalles, así las filas serán más finas"): unless the bar's
   Detalles button is pressed (<html data-details="on">, script.js), each row is a 32×24
   picture, the title, a series' episodes button and the year; a sub-row, "2. Quico enfermo…"
   alone. With it, every column as above */
nav .bar-tools #list-details {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 30px;
	margin-left: 2px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 999px;
	color: var(--muted);
	cursor: pointer;
}
nav .bar-tools #list-details:hover {
	background: var(--surface-hover);
	color: var(--text);
}
nav .bar-tools #list-details[aria-pressed="true"] {
	background: var(--accent-bg);
	color: #ffffff;
}
nav .bar-tools #list-details:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
html:not([data-view="list"]) nav .bar-tools #list-details {
	display: none;
}
html[data-view="list"]:not([data-details="on"]) .grid-item-container {
	padding: 2px 6px;
}
html[data-view="list"]:not([data-details="on"]) .thumb {
	flex-basis: 32px;
	height: 24px;
}
html[data-view="list"]:not([data-details="on"]) .list-head-thumb {
	flex-basis: 32px;
}
html[data-view="list"]:not([data-details="on"]) .description {
	grid-template-columns: minmax(0, 1fr) 4rem 3.5rem;
	grid-template-areas: "title eps year";
}
html[data-view="list"]:not([data-details="on"]) .description > :is(.number, .video-id, .format, .kind, .technique, .origin, .producer, .updated, .wiki),
html[data-view="list"]:not([data-details="on"]) .description .extra .wiki-link {
	display: none;
}
html[data-view="list"]:not([data-details="on"]) .sub-card .description {
	grid-template-areas: "title title title";
}
html[data-view="list"]:not([data-details="on"]) .sub-card .thumb {
	height: 18px;
}
html[data-view="list"]:not([data-details="on"]) .sub-card .title::before {
	content: attr(data-n) ". ";
}
/* Phones: the title, then the year and the button, on one line */
@media only screen and (max-width: 699px) {
	html[data-view="list"]:not([data-details="on"]) .description {
		flex-wrap: nowrap;
		align-items: center;
	}
	html[data-view="list"]:not([data-details="on"]) .description .title {
		flex: 1 1 auto;
		min-width: 0;
	}
	/* The episodes' button before the year, and the year in a column of its own at the right
	   edge, under the headings' Año (owner, 2026-11-11: "En la vista lista, el año queda
	   desplazado por el link para mostrar la sublista (en móvil)"; the button came after it, so a
	   series' year stood further left than the others') */
	html[data-view="list"]:not([data-details="on"]) .description .episodes-toggle {
		order: 2;
		flex: none;
	}
	html[data-view="list"]:not([data-details="on"]) .description .year {
		order: 3;
		flex: 0 0 2.75rem;
		text-align: right;
	}
}

/* The episodes' panel: as wide as the grid, under the series' row; a white box with the title
   and a close button, and the sub-cards in a strip that scrolls sideways */
.episodes-panel {
	width: 100%;
}
.episodes-box {
	padding: 12px 14px 8px;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 6px 16px rgba(91, 52, 32, 0.25);
}
.episodes-head {
	display: flex;
	align-items: center;
	gap: 12px;
}
.episodes-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: #3a2013;
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.episodes-close {
	flex: none;
	width: 30px;
	height: 30px;
	padding: 0;
	background: #f5ead9;
	border: 0;
	border-radius: 999px;
	color: #3a2013;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.episodes-close:hover {
	background: #b23a26;
	color: #ffffff;
}
.episodes-strip {
	display: flex;
	gap: 12px;
	margin: 10px 0 0;
	padding: 2px 2px 10px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-snap-type: x proximity;
	scrollbar-color: #e3c49a transparent;
	scrollbar-width: thin;
}
.episodes-strip > li {
	flex: 0 0 168px;
	scroll-snap-align: start;
}
/* A sub-card: the picture and, on a cream foot, "2. Quico enfermo" in two lines at most and the
   Vídeo kind's label */
.sub-card {
	position: relative;
	height: 100%;
	overflow: hidden;
	background: #fbf4ea;
	border-radius: 10px;
	cursor: pointer;
}
.sub-card .grid-item-container {
	height: 100%;
	filter: none;
}
html:not([data-view="list"]) .sub-card .thumb {
	border-radius: 0;
	box-shadow: none;
}
.sub-card:hover img {
	opacity: 0.6;
}
.sub-card:hover .play-container {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}
html:not([data-view="list"]) .sub-card .description {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 2.25rem auto;
	grid-template-areas: "title" "kind";
	row-gap: 5px;
	width: 100%;
	margin: 0;
	padding: 7px 9px 9px;
	background: none;
	border-radius: 0;
}
html:not([data-view="list"]) .sub-card .description .title {
	display: -webkit-box;
	align-self: start;
	overflow: hidden;
	font-size: 0.8125rem;
	line-height: 1.125rem;
	white-space: normal;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}
html:not([data-view="list"]) .sub-card .description :is(.year, .producer) {
	display: none;
}
.sub-card .video-kind {
	justify-self: start;
	margin-left: 0;
}

/* "Wikipedia ↗" never split between the two lines */
html:not([data-view="list"]) .extra .wiki-link {
	white-space: nowrap;
}
/* No "Actualizado el …" on the grid's cards (owner, 2026-11-10: "Elimina el dato de la fecha de
   actualización de las cards de vista grid"); the Tabla has it in its Actualizado column */
html:not([data-view="list"]) .extra .updated-line {
	display: none;
}

/* ------------------------------------------------------------------
   Top bar grouped by type (2026-10-23):
   site (TV, title) | find (search + Filtros) |
   view (grid / list in one cream control, Auto beside it) | info (count,
   set apart by a thin line on the chocolate)
   ------------------------------------------------------------------ */
.bar-find {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 1 360px;
	min-width: 220px;
}
.bar-find .search {
	flex: 1 1 auto;
	min-width: 0;
}
/* View: the switch (and Detalles) in one pill; Auto is its own pill beside it (owner,
   2026-11-13: "separa el botón Auto de las vistas"; until then it shared this one, after a thin
   line) */
.bar-tools {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
}
.bar-tools .view-switch {
	padding: 0;
	background: none;
	border: 0;
}
/* Auto's own pill: as tall as the views' (32px), green-tinted while scrolling */
nav button#autoscroll {
	min-height: 36px;
	padding: 6px 13px 6px 11px;
}
nav button#autoscroll[aria-pressed="true"] {
	background: rgba(47, 122, 58, 0.12);
}
/* Info: read-only facts, after a divider */
.bar-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 4px;
	padding-left: 12px;
	border-left: 1px solid rgba(255, 240, 220, 0.22);
}
.actions {
	gap: 10px;
}
/* Below 1100px the find group is the bar's full-width second row (it was the search alone) */
@media only screen and (max-width: 1099px) {
	.bar-find {
		flex: 1 1 100%;
		order: 1;
	}
	.bar-find .search {
		flex: 1 1 auto;
		order: 0;
	}
	.brand {
		flex: 1;
	}
}
@media only screen and (max-width: 520px) {
	nav button#autoscroll {
		padding: 7px 10px;
	}
	.bar-info {
		gap: 4px;
		margin-left: 0;
		padding-left: 6px;
	}
	.actions {
		gap: 6px;
	}
}
@media only screen and (max-width: 380px) {
	.bar-tools {
		padding: 1px;
	}
	.bar-info {
		padding-left: 0;
		border-left: 0;
	}
	.actions {
		gap: 4px;
	}
}
/* The narrowest phones: a smaller title, so more of it fits beside the grouped controls */
@media only screen and (max-width: 380px) {
	nav .brand h1 {
		font-size: 1rem;
		text-shadow: 1px 1px 0 var(--accent-bg);
	}
	nav button#autoscroll {
		padding: 7px 8px;
	}
}

/* Below desktop size the title sits under the picture, on the patterned background:
   there it gets a cream caption joined to the picture's border, like a photo
   print, so it reads on anything (the list view has its own rows) */

/* ------------------------------------------------------------------
   Footer (2026-10-23): the top bar turned upside down. A gingham
   strip on top, the chocolate gradient, the TV and title in Cola Cao
   yellow, a short line about the catalogue and "Volver arriba"; below,
   a small note on where the pictures and videos come from
   ------------------------------------------------------------------ */
.site-footer {
	position: relative;
	margin-top: 48px;
	/* 68px below: the host's badge (see .consent) sits in the last 48px, clear of the note and
	   the version (owner, 2026-11-03; it was 20px) */
	padding: 28px 16px 68px;
	background: linear-gradient(to bottom, #43251a, #5e3520);
	color: #e3c49a;
}
.site-footer::before {
	content: "";
	position: absolute;
	top: -12px;
	right: 0;
	left: 0;
	height: 12px;
	background-color: var(--surface);
	background-image:
		linear-gradient(90deg, var(--gingham) 50%, transparent 0),
		linear-gradient(var(--gingham) 50%, transparent 0);
	background-size: 12px 12px;
}
/* The bar's content width (the page width less its 16px padding each side), so the footer's
   edges line up with the bar's and the pages' (2026-10-27: it was 16px wider each side) */
.footer-main, .footer-note {
	max-width: calc(var(--page-width) - 32px);
	margin: 0 auto;
}
.footer-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}
.footer-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}
.site-footer .tv-icon {
	display: flex;
	color: #f3dfc0;
}
.footer-title {
	color: var(--cola-cao);
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: 2px 2px 0 var(--accent-bg);
}
.footer-tagline {
	margin-top: 2px;
	font-size: 0.875rem;
	font-weight: 600;
	text-wrap: pretty;  /* no word alone on the last line (2026-10-27) */
}
.to-top {
	flex-shrink: 0;
	padding: 7px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 700;
}
.to-top:hover {
	background: var(--surface-hover);
}
.footer-note {
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 240, 220, 0.18);
	color: #c9a57a;
	font-size: 0.75rem;
}
/* The site's version (nav.php, tmVersion(), owner, 2026-11-03), at the note line's right end;
   under the note, on its own line, when the line is full (phones) */
.footer-version {
	float: right;
	margin-left: 16px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	opacity: 0.85;
}
/* The pages about Telemeriendas (nav.php, tmFooterLinks(), 2026-10-29): a row of links over
   the note, wrapping on narrow screens */
.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	max-width: calc(var(--page-width) - 32px);
	margin: 22px auto 0;
	font-size: 0.875rem;
	font-weight: 700;
}
.footer-links a {
	color: #f3dfc0;
}
.footer-links a:hover {
	color: #fff0dc;
	text-decoration: underline;
}
/* The footer's "Cookies" (nav.php, tmFooterLinks(), 2026-10-31): a button that looks like the links */
.footer-cookies {
	padding: 0;
	background: none;
	border: 0;
	color: #f3dfc0;
	font: inherit;
	cursor: pointer;
}
.footer-cookies:hover {
	color: #fff0dc;
	text-decoration: underline;
}
/* Google Analytics' consent (nav.php, tmAnalytics(), 2026-10-31): a slim cream strip along the
   bottom edge until it is answered, one line on wide screens (that day it was first a card that
   covered the bottom of the TV, the first thing a visitor saw) */
.consent {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 18px;
	padding: 8px 16px;
	background: var(--surface);
	border-top: 2px solid var(--cocoa);
	box-shadow: 0 -6px 18px rgba(46, 27, 16, 0.25);
	color: var(--text);
	font-size: 0.8125rem;
	line-height: 1.4;
}
/* The free host (FreeWebHostingArea) adds its "Free Web Hosting" badge to every page, fixed bottom
   right (180 × 45px, 3px from the corner, z-index 999999), and its terms ask to keep it. On
   narrower screens it covered the banner's buttons (owner, 2026-11-03): the banner keeps that
   strip free under its content (48px + its own 8px). On wide screens the centred content is clear
   of it. Locally there is no badge; the room is the same */
@media only screen and (max-width: 1100px) {
	.consent {
		padding-bottom: 56px;
	}
}
.consent[hidden] {
	display: none;
}
.consent p {
	flex: 0 1 auto;
	max-width: 760px;
}
.consent a {
	color: var(--accent);
	font-weight: 700;
	text-decoration: underline;
}
.consent-buttons {
	display: flex;
	gap: 8px;
}
.consent-buttons button {
	padding: 5px 14px;
	background: transparent;
	border: 1px solid var(--border-hover);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.consent-buttons button:hover {
	background: var(--surface-hover);
}
.consent-buttons .consent-yes {
	background: var(--accent-bg);
	border-color: var(--accent-bg);
	color: #ffffff;
}
.consent-buttons .consent-yes:hover {
	background: var(--accent);
}
.consent-buttons button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
/* "Comparte Telemeriendas" (nav.php, tmShareSite(), 2026-10-31): a row of pills under the links */
.footer-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: calc(var(--page-width) - 32px);
	margin: 16px auto 0;
}
.footer-share-label {
	margin-right: 6px;
	color: var(--cola-cao);
	font-family: var(--font-display);
	font-size: 0.875rem;
	font-weight: 600;
}
.share-chip {
	padding: 5px 12px;
	background: transparent;
	border: 1px solid rgba(255, 240, 220, 0.45);
	border-radius: 999px;
	color: #f3dfc0;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}
.share-chip:hover {
	background: rgba(255, 240, 220, 0.12);
	border-color: #fff0dc;
	color: #fff0dc;
}
.share-chip:focus-visible {
	outline: 2px solid var(--cola-cao);
	outline-offset: 2px;
}
.share-chip[hidden] {
	display: none;
}
/* Sign out (nav.php, tmSignOut()) */
.footer-signout {
	color: inherit;
}
.footer-signout:hover {
	color: #fff0dc;
}
@media only screen and (max-width: 520px) {
	.site-footer .tv-icon {
		display: flex;
	}
	.to-top {
		width: 100%;
		text-align: center;
	}
}
/* The footer reaches the bottom of the window when there is little above it (no results,
   few titles): the body is a column at least as tall as the window, and the footer takes
   the space left (body was a fixed 100% tall, which only the old sticky bar needed) */
body {
	display: flex;
	flex-direction: column;
	height: auto;
	min-height: 100%;
}
.site-footer {
	margin-top: auto;
}
#zero-results {
	margin-bottom: 48px;
}

/* Links in the bar between the catalogue and its TV (tele/, 2026-10-23): a pill like Filtros,
   icon only on phones */
.bar-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 700;
	white-space: nowrap;
}
.bar-link:hover {
	background: var(--surface-hover);
	border-color: var(--border-hover);
}
@media only screen and (max-width: 520px) {
	.bar-link {
		padding: 9px 11px;
	}
	.bar-link-label {
		display: none;
	}
}

/* The full list's bar has room for the Tele, Álbum and "¿Qué vemos?" labels only when the
   search is a row of its own (1099px down, the bar's content being capped at the page width):
   above that they are icons (their names in the title), as on phones */
@media only screen and (min-width: 1100px) {
	.bar-find .bar-link-label {
		display: none;
	}
	.bar-find .bar-link {
		padding: 9px 11px;
	}
}
/* With the three icon buttons beside it, the find group needs more room so the search box
   keeps a usable width in the bar */
@media only screen and (min-width: 1100px) {
	.bar-find {
		flex-basis: 440px;
		min-width: 300px;
	}
}

/* The Álbum link's badge: how many cromos are new since the last visit (album-badge.js) */
.bar-link[href$="album/"] {
	position: relative;
}
.album-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	display: grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	background: var(--accent-bg);
	border: 2px solid #43251a;
	border-radius: 999px;
	color: #ffffff;
	font-size: 0.6875rem;
	font-weight: 800;
	line-height: 1;
}
.album-badge.is-bumped {
	animation: album-badge-pop 0.4s ease-out;
}
@keyframes album-badge-pop {
	0% { scale: 1; }
	40% { scale: 1.35; }
	100% { scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.album-badge.is-bumped {
		animation: none;
	}
}

/* "¡Cromo nuevo!" bubble under the Álbum link (album-badge.js): red with the dark edge and white
   text, like the counter, its tail pointing up at the link */
.cromo-toast {
	position: fixed;
	z-index: 6;
	display: grid;
	gap: 1px;
	max-width: min(260px, calc(100vw - 16px));
	padding: 7px 12px 8px;
	background: var(--accent-bg);
	border: 2px solid #43251a;
	border-radius: 12px;
	box-shadow: 0 6px 16px rgba(46, 27, 16, 0.35);
	color: #ffffff;
	font-size: 0.8125rem;
	line-height: 1.3;
	opacity: 0;
	translate: 0 -6px;
	transition: opacity 0.25s, translate 0.25s;
	pointer-events: none;
}
.cromo-toast.is-shown {
	opacity: 1;
	translate: 0 0;
	pointer-events: auto;
}
/* The tail: the dark edge, then the red over it */
.cromo-toast::before,
.cromo-toast::after {
	content: "";
	position: absolute;
	right: var(--tail-right, 14px);
	border: 8px solid transparent;
	border-top: 0;
}
.cromo-toast::before {
	top: -10px;
	border-bottom-color: #43251a;
}
.cromo-toast::after {
	top: -7px;
	border-bottom-color: var(--accent-bg);
}
.cromo-toast-head {
	color: var(--cola-cao);
	font-family: var(--font-display);
	font-size: 0.9375rem;
	font-weight: 700;
}
.cromo-toast-text {
	font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
	.cromo-toast {
		transition: none;
	}
}

/* The grid: the picture and its white panel are one card (at every width since 2026-11-10;
   below desktop size only, with a cream caption, until then). The picture's bottom corners are
   square, so no dark notch shows where they meet; no white ring round it (owner, 2026-11-10:
   "Eliminar borde blanco superior y lateral de la vista de grid"; 4px until then): the picture
   reaches the card's edges; a single shadow around the whole card (drop-shadow follows its
   outline) */
html:not([data-view="list"]) .thumb {
	border-radius: 12px 12px 0 0 / 14px 14px 0 0;
	box-shadow: none;
}
html:not([data-view="list"]) .grid-item-container {
	filter: drop-shadow(0 6px 8px rgba(91, 52, 32, 0.25));
}

/* ==================================================================
   Motion details (2026-10-23): tilting cards, their entrance, the
   bar's TV icon, the moving tablecloth strip. All off with
   reduced motion
   ================================================================== */

/* 6. Cards lean towards the mouse (script.js sets --rx/--ry), like a cromo held in the hand */
.grid-item-container {
	transition: transform 0.15s ease-out;
}
html:not([data-view="list"]) .grid-item.is-tilting .grid-item-container {
	transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px) scale(1.02);
}

/* 7. Cards come in one after another with a little bounce (script.js adds is-entering, with
      a delay per card in its batch) */
.grid-item.is-entering .grid-item-container {
	animation: card-in 0.45s cubic-bezier(0.25, 1.4, 0.5, 1) both;
	animation-delay: var(--enter-delay, 0ms);
}
@keyframes card-in {
	from { opacity: 0; translate: 0 16px; scale: 0.94; }
	to { opacity: 1; translate: 0 0; scale: 1; }
}

/* 9. The bar's TV icon: its little screen flickers through colours now and then */
.tv-icon .tv-screen {
	animation: icon-screen 9s steps(1) infinite;
}
@keyframes icon-screen {
	0%, 82%, 100% { fill: #fbe7a6; }
	84% { fill: #7cfc6a; }
	86% { fill: #4dd9ff; }
	88% { fill: #ff6ad5; }
	90% { fill: #fbe7a6; }
	92% { fill: #ffd23f; }
}

/* 10. The tablecloth strip under the bar moves very slowly sideways */
nav::after {
	animation: gingham-slide 4s linear infinite;
}
@keyframes gingham-slide {
	from { background-position: 0 0, 0 0; }
	to { background-position: 24px 0, 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
	.grid-item.is-entering .grid-item-container,
	.tv-icon .tv-screen,
	nav::after {
		animation: none;
	}
	html:not([data-view="list"]) .grid-item.is-tilting .grid-item-container {
		transform: none;
	}
}

/* No tablecloth strip under the top bar nor above the footer (owner, 2026-10-23): the two
   gingham strips (nav::after, .site-footer::before) are hidden */
nav::after,
.site-footer::before {
	display: none;
}

/* ==================================================================
   The same bar on every page (2026-10-23): the logo (a link to La tele)
   on the left, the site menu on the right (La tele, Catálogo, Álbum,
   ¿Te acuerdas?; nav.php), the current page in Cola Cao yellow. The
   catalogue's own tools go on a second row of the bar; on phones the
   menu has its own row under the logo (2026-10-27)
   ================================================================== */
.brand h1 a {
	color: inherit;
}
.brand h1 a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.site-nav {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}
.site-nav .bar-link.is-current {
	background: var(--cola-cao);
	border-color: #d99a00;
	color: var(--cocoa-dark);
	cursor: default;
}
/* The catalogue: logo and menu first, then a full-width break, then its tools (search and
   Filtros on the left, views, Auto and the count on the right) */
nav:has(.bar-find) #main {
	flex-wrap: wrap;
}
nav:has(.bar-find) #main::after {
	content: "";
	flex-basis: 100%;
	order: 2;
}
nav:has(.bar-find) .site-nav {
	order: 1;
}
nav:has(.bar-find) .tv-icon,
nav:has(.bar-find) .brand {
	order: 0;
}
nav:has(.bar-find) .bar-find {
	flex: 1 1 auto;
	order: 3;
	min-width: 0;
	max-width: 520px;
}
nav:has(.bar-find) .actions {
	order: 4;
	margin-left: auto;
}
/* The short label under the icon: only on narrow screens (nav.php, 2026-10-27) */
.bar-link-short {
	display: none;
}
/* Narrow screens: each menu link is its icon over a short label, like a phone's tab bar
   (owner, 2026-10-27: the icons alone were guessed wrong, the ? read as help) */
@media only screen and (max-width: 900px) {
	.site-nav .bar-link-label {
		display: none;
	}
	.site-nav .bar-link {
		flex-direction: column;
		justify-content: center;
		gap: 2px;
		min-width: 56px;
		padding: 6px 10px 5px;
		border-radius: 14px;
	}
	.site-nav .bar-link-short {
		display: block;
		font-size: 0.6875rem;
		font-weight: 800;
		line-height: 1.1;
	}
}
/* Phones: the five don't fit beside the name, so the menu takes its own row under it, the
   links sharing its width */
@media only screen and (max-width: 600px) {
	nav #main {
		flex-wrap: wrap;
	}
	.site-nav {
		display: grid;
		flex-basis: 100%;
		grid-auto-columns: 1fr;
		grid-auto-flow: column;
		gap: 6px;
		margin-left: 0;
	}
	.site-nav .bar-link {
		min-width: 0;
		padding-inline: 4px;
	}
}
@media only screen and (max-width: 700px) {
	nav:has(.bar-find) .bar-find {
		flex-basis: 100%;
		max-width: none;
	}
	nav:has(.bar-find) .actions {
		order: 4;
		margin-left: 0;
	}
}

/* Catalogue's video window, only the video (owner, 2026-10-23): the player is taller than the
   window and moved up, so its title band (title, channel, share) is cut off while its controls
   at the bottom stay */
body .modal-video-movie-wrap {
	overflow: hidden;
}
body .modal-video-movie-wrap iframe {
	top: -13%;
	height: 113%;
}
