/* 3DSpotify — web del proyecto.
 * Sistema «Bisagra» (docs/STYLES.md). Los tokens son los de
 * source/ui/theme.h, con los mismos nombres y valores. */

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
	/* Fondo y superficies (§2.1) */
	--fondo-sup: #1A7049;
	--fondo-inf: #136040;
	--capa: #0F4B30;
	--capa-alta: #17603E;
	--capa-luz: #237A52;
	--sombra: #08301E;

	/* Acento (§2.2) */
	--clorofila: #2EE87A;
	--menta: #8CF5B5;
	--musgo: #1BB85C;
	--lima: #C6F542;
	--tinta: #04140B;

	/* Texto (§2.3) */
	--texto: #FFFFFF;
	--texto-2: #C4EED6;
	--texto-off: #8ABCA0;

	/* Estado (§2.4) */
	--coral: #FF7A66;
	--coral-luz: #FFB0A3;
	--coral-osc: #D85443;
	--ambar: #FFD25C;
	--ambar-luz: #FFE79E;
	--ambar-osc: #C99A1F;

	/* Botones físicos (§2.5) */
	--btn-a: #FF4F45;
	--btn-b: #FFD23F;
	--btn-x: #3FA2FF;
	--btn-y: #39D97A;

	/* Espaciado (§4.2), unidad 4 px */
	--e1: 4px;
	--e2: 8px;
	--e3: 12px;
	--e4: 16px;
	--e5: 20px;
	--e6: 24px;

	/* Forma (§4.3) */
	--outline-w: 1px;
	--bevel-w: 2px;
	--shadow-off: 2px;
	--art-shadow-off: 3px;
	--press-shift: 2px;
	--focus-w: 2px;
	--focus-gap: 1px;
	--touch-min: 32px;

	/* Tipografía (§3.2). La escala C2D × 2 = rem, para conservar las
	 * proporciones: t_cuerpo (0.50) es el texto base de 16 px. */
	--t-titulo: 1.5rem;   /* 0.75 */
	--t-cabeza: 1.2rem;   /* 0.60 */
	--t-cuerpo: 1rem;     /* 0.50 */
	--t-meta: 0.9rem;     /* 0.45, mínimo */
	--t-grande: 2.25rem;  /* t_titulo × 1.5, como el código de §7.3 */

	--fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;

	--ancho: 960px;

	/* Separación entre secciones: 72 px en móvil, 84 px en escritorio. */
	--seccion: calc(var(--e6) * 3);
}

@media (min-width: 720px) {
	:root {
		--seccion: calc(var(--e1) * 21); /* 84 px */
	}
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
	border-radius: 0;
}

html {
	/* El único degradado de la página (§2.7). */
	background: linear-gradient(to bottom, var(--fondo-sup), var(--fondo-inf));
	background-color: var(--fondo-inf);
	min-height: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: transparent;
	color: var(--texto);
	font-family: var(--fuente);
	font-size: var(--t-cuerpo);
	line-height: 1.5;
}

h1,
h2,
h3,
p,
ol,
ul {
	margin: 0;
}

h1 {
	font-size: var(--t-grande);
	line-height: 1.15;
	font-weight: 700;
}

h2 {
	font-size: var(--t-titulo);
	line-height: 1.25;
	font-weight: 700;
}

h3 {
	font-size: var(--t-cabeza);
	line-height: 1.3;
	font-weight: 600;
}

a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

img,
svg {
	display: block;
}

code {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.95em;
}

/* Foco (§6.2): 2 px lima por fuera del contorno, separado 1 px. */
:focus {
	outline: none;
}

:focus-visible {
	outline: var(--focus-w) solid var(--lima);
	outline-offset: var(--focus-gap);
}

.skip {
	position: absolute;
	left: var(--e4);
	top: -100px;
	z-index: 10;
}

.skip:focus-visible {
	top: var(--e2);
}

.wrap {
	max-width: calc(var(--ancho) + 2 * var(--e4));
	margin: 0 auto;
	padding: 0 var(--e4);
}

.meta {
	font-size: var(--t-meta);
	color: var(--texto-2);
}

.texto-2 {
	color: var(--texto-2);
}

/* ------------------------------------------------------------------ */
/* Iconos (§5.10): máscaras de 16 px de la app, sin antialiasing       */
/* ------------------------------------------------------------------ */

.icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
	shape-rendering: crispEdges;
	flex: none;
}

.icon--2x {
	width: 32px;
	height: 32px;
}

/* ------------------------------------------------------------------ */
/* Superficie en relieve (§5.1)                                         */
/*   contorno 1 px tinta → border                                       */
/*   bandas de 2 px     → box-shadow inset                              */
/*   sombra dura        → box-shadow 2px 2px 0, sin desenfoque          */
/* ------------------------------------------------------------------ */

.relieve {
	--relleno: var(--capa-alta);
	--banda-clara: var(--capa-luz);
	--banda-oscura: var(--sombra);
	--relleno-pulsado: var(--capa);
	background: var(--relleno);
	border: var(--outline-w) solid var(--tinta);
	box-shadow:
		inset 0 var(--bevel-w) 0 var(--banda-clara),
		inset 0 calc(-1 * var(--bevel-w)) 0 var(--banda-oscura),
		var(--shadow-off) var(--shadow-off) 0 var(--sombra);
}

/* Panel no interactivo (§5.1): capa, contorno, sin relieve ni sombra. */
.panel {
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
	padding: var(--e4);
}

/* ------------------------------------------------------------------ */
/* Botones (§5.2)                                                       */
/* ------------------------------------------------------------------ */

.btn {
	--relleno: var(--capa-alta);
	--banda-clara: var(--capa-luz);
	--banda-oscura: var(--sombra);
	--relleno-pulsado: var(--capa);
	--tinta-btn: var(--texto);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--e2);
	min-height: var(--touch-min);
	padding: var(--e1) var(--e3);
	background: var(--relleno);
	color: var(--tinta-btn);
	border: var(--outline-w) solid var(--tinta);
	box-shadow:
		inset 0 var(--bevel-w) 0 var(--banda-clara),
		inset 0 calc(-1 * var(--bevel-w)) 0 var(--banda-oscura),
		var(--shadow-off) var(--shadow-off) 0 var(--sombra);
	font: inherit;
	font-size: var(--t-cuerpo);
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.btn--primario {
	--relleno: var(--clorofila);
	--banda-clara: var(--menta);
	--banda-oscura: var(--musgo);
	--relleno-pulsado: var(--musgo);
	--tinta-btn: var(--tinta);
}

.btn--secundario {
	/* Valores por defecto de .btn. */
}

.btn--peligro {
	--relleno: var(--coral);
	--banda-clara: var(--coral-luz);
	--banda-oscura: var(--coral-osc);
	--relleno-pulsado: var(--coral-osc);
	--tinta-btn: var(--tinta);
}

.btn--grande {
	min-height: 48px;
	padding: var(--e2) var(--e4);
	font-size: var(--t-cabeza);
}

/* Pulsado (§6.3): se desplaza 2 px a la derecha y 2 abajo, sin sombra,
 * bandas intercambiadas y relleno en su tono oscuro. main.js mantiene
 * .is-pressed un mínimo de 100 ms (6 frames a 60 Hz). */
.btn:active,
.btn.is-pressed {
	background: var(--relleno-pulsado);
	transform: translate(var(--press-shift), var(--press-shift));
	box-shadow:
		inset 0 var(--bevel-w) 0 var(--banda-oscura),
		inset 0 calc(-1 * var(--bevel-w)) 0 var(--banda-clara);
}

.btn[aria-disabled="true"] {
	/* Deshabilitado (§6.1). */
	background: var(--capa);
	color: var(--texto-off);
	box-shadow: none;
	transform: none;
	cursor: default;
}

/* ------------------------------------------------------------------ */
/* Glifos de botones (§5.6)                                             */
/* ------------------------------------------------------------------ */

.glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75em;
	height: 1.5em;
	padding: 0 0.35em;
	border: var(--outline-w) solid var(--tinta);
	background: var(--capa-alta);
	color: var(--texto);
	font-size: var(--t-meta);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	vertical-align: middle;
}

.glyph--a { background: var(--btn-a); color: var(--tinta); }
.glyph--b { background: var(--btn-b); color: var(--tinta); }
.glyph--x { background: var(--btn-x); color: var(--tinta); }
.glyph--y { background: var(--btn-y); color: var(--tinta); }

/* START y SELECT no tienen color propio: relleno texto_2. */
.glyph--sys { background: var(--texto-2); color: var(--tinta); }

/* ------------------------------------------------------------------ */
/* Aviso (§5.8)                                                         */
/* ------------------------------------------------------------------ */

.aviso {
	display: flex;
	gap: var(--e3);
	align-items: flex-start;
	padding: var(--e3) var(--e4);
	color: var(--tinta);
}

.aviso--ambar {
	--relleno: var(--ambar);
	--banda-clara: var(--ambar-luz);
	--banda-oscura: var(--ambar-osc);
}

/* Incidencia ajena a la app: rojo del botón A, más llamativo que coral. */
.aviso--rojo {
	--relleno: var(--btn-a);
	--banda-clara: #FF9A93;
	--banda-oscura: #B8261E;
	border-width: 2px;
}

.incidencia {
	padding: var(--e4) var(--e5);
}

.incidencia h2 {
	font-size: var(--t-cabeza);
	margin-bottom: var(--e1);
}

.incidencia code {
	font-weight: 700;
}

.aviso .icon {
	margin-top: 4px;
}

.aviso h3 {
	font-size: var(--t-cabeza);
}

/* ------------------------------------------------------------------ */
/* Barra superior                                                       */
/* ------------------------------------------------------------------ */

.topbar {
	background: var(--capa);
	border-bottom: var(--outline-w) solid var(--tinta);
}

.topbar .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--e4);
	min-height: 56px;
}

.marca {
	display: flex;
	align-items: center;
	gap: var(--e1);
	font-size: var(--t-cabeza);
	font-weight: 700;
	text-decoration: none;
}

.marca img {
	width: 42px;
	height: 42px;
	image-rendering: pixelated;
}

/* ------------------------------------------------------------------ */
/* Secciones                                                            */
/* ------------------------------------------------------------------ */

main > .wrap {
	/* margin, no padding: .wrap ya fija el padding lateral. */
	margin-top: var(--seccion);
}

main > .wrap:first-child {
	margin-top: calc(var(--e6) * 2);
}

.seccion-cabeza {
	display: grid;
	gap: var(--e2);
	margin-bottom: var(--e6);
}

.seccion-cabeza p {
	color: var(--texto-2);
	max-width: 62ch;
}

/* Cabecera: texto y botones a la izquierda, la consola a la derecha. */

.hero {
	display: grid;
	gap: calc(var(--e6) * 2);
	align-items: center;
}

.hero__logo {
	width: 256px;
	height: 128px;
	max-width: 100%;
	object-fit: contain;
	image-rendering: pixelated;
}

.hero__texto {
	display: grid;
	gap: var(--e3);
	justify-items: start;
}

.hero__lema {
	font-size: var(--t-grande);
	line-height: 1.15;
	font-weight: 700;
}

.hero__frase {
	font-size: var(--t-cabeza);
	color: var(--texto-2);
	max-width: 36ch;
}

.acciones {
	display: flex;
	flex-wrap: wrap;
	gap: var(--e4);
	margin-top: var(--e3);
}

.version {
	margin-top: var(--e1);
}

@media (min-width: 880px) {
	.hero {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	}
}

/* QR (§5.13) */

.qr {
	display: grid;
	gap: var(--e6);
	align-items: center;
}

.qr__caja {
	justify-self: center;
	background: var(--texto);
	border: var(--outline-w) solid var(--tinta);
	box-shadow: var(--shadow-off) var(--shadow-off) 0 var(--sombra);
}

.qr__caja img {
	/* 45 módulos × 4 px, escala entera. */
	width: 180px;
	height: 180px;
	image-rendering: pixelated;
}

.qr__pasos {
	display: grid;
	gap: var(--e3);
}

/* Pasos numerados: el número va en un glifo clorofila (§5.6). */
.pasos {
	list-style: none;
	padding: 0;
	counter-reset: paso;
	display: grid;
	gap: var(--e3);
	color: var(--texto-2);
}

.pasos > li {
	counter-increment: paso;
	position: relative;
	min-height: 28px;
	padding: 2px 0 0 40px;
}

.pasos > li::before {
	content: counter(paso);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--clorofila);
	color: var(--tinta);
	border: var(--outline-w) solid var(--tinta);
	font-size: var(--t-meta);
	font-weight: 700;
}

.pasos strong {
	color: var(--texto);
}

.enlace-cia {
	color: var(--lima);
	word-break: break-all;
	font-size: var(--t-meta);
}

@media (min-width: 640px) {
	.qr {
		grid-template-columns: auto 1fr;
		gap: calc(var(--e6) * 1.5);
	}
}

/* ------------------------------------------------------------------ */
/* Pantallas de la consola: 400×240 sobre 320×240                       */
/* Todo el interior se mide en --u, un píxel de la consola, para que    */
/* la maqueta escale entera. main.js la hace interactiva.               */
/* ------------------------------------------------------------------ */

.consola {
	container-type: inline-size;
	width: min(100%, 600px);
	margin: 0 auto;
}

.consola__in {
	--u: calc(100cqw / 400);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.consola__pista {
	margin-top: var(--e4);
	text-align: center;
}

.pantalla {
	position: relative;
	height: calc(240 * var(--u));
	overflow: hidden;
	background: linear-gradient(to bottom, var(--fondo-sup), var(--fondo-inf));
	border: var(--outline-w) solid var(--tinta);
	box-shadow: var(--art-shadow-off) var(--art-shadow-off) 0 var(--sombra);
	font-size: calc(12 * var(--u));
	line-height: 1.2;
	color: var(--texto);
	user-select: none;
	-webkit-user-select: none;
}

.pantalla--sup { width: calc(400 * var(--u)); }
.pantalla--inf { width: calc(320 * var(--u)); }

/* La bisagra entre las dos pantallas. */
.bisagra {
	width: calc(360 * var(--u));
	height: calc(16 * var(--u));
	margin: calc(8 * var(--u)) 0;
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
}

.pantalla .icon {
	width: calc(16 * var(--u));
	height: calc(16 * var(--u));
}

/* Escalas de texto dentro de la maqueta: escala C2D × 24 px. */
.m-titulo { font-size: calc(18 * var(--u)); font-weight: 600; }
.m-cabeza { font-size: calc(14.4 * var(--u)); font-weight: 600; }
.m-cuerpo { font-size: calc(12 * var(--u)); }
.m-meta   { font-size: calc(10.8 * var(--u)); color: var(--texto-2); }

.m-abs { position: absolute; }

.m-linea {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Logotipo 1:1 (sin JS). */
.m-logo {
	left: calc(72 * var(--u));
	top: calc(56 * var(--u));
	width: calc(256 * var(--u));
	height: calc(128 * var(--u));
	image-rendering: pixelated;
}

/* Carátulas de ejemplo: colores planos, sin imágenes reales.
 * Bloques en % para que valgan a 216, 160 y 33 px. */
.m-cover {
	position: absolute;
	overflow: hidden;
	background: var(--c1);
	border: var(--outline-w) solid var(--tinta);
}

.m-cover i {
	position: absolute;
	display: block;
}

.m-cover i:nth-child(1) {
	left: 0;
	right: 0;
	bottom: 0;
	height: 35%;
	background: var(--c2);
	border-top: var(--outline-w) solid var(--tinta);
}

.m-cover i:nth-child(2) {
	left: 15%;
	top: 15%;
	width: 40%;
	height: 40%;
	background: var(--c3);
}

.m-cover i:nth-child(3) {
	left: 45%;
	top: 35%;
	width: 40%;
	height: 40%;
	background: var(--c4);
	border: var(--outline-w) solid var(--tinta);
}

.m-cover--ficha,
.m-cover--grande {
	box-shadow: calc(3 * var(--u)) calc(3 * var(--u)) 0 var(--sombra);
}

/* Ficha (§7.12): centrada en la altura; bajo la franja de tipos, más abajo (§5.17). */
.m-cover--ficha {
	left: calc(12 * var(--u));
	top: calc(40 * var(--u));
	width: calc(160 * var(--u));
	height: calc(160 * var(--u));
}

.m-cover--baja { top: calc(56 * var(--u)); }

/* Sin portada: `capa_alta` con el icono centrado. */
.m-cover--icono {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--capa-alta);
	color: var(--texto-2);
}

.m-cover--tesela {
	left: calc(3 * var(--u));
	top: calc(3 * var(--u));
	width: calc(24 * var(--u));
	height: calc(24 * var(--u));
}

.m-cover--grande {
	left: calc(92 * var(--u));
	top: calc(12 * var(--u));
	width: calc(216 * var(--u));
	height: calc(216 * var(--u));
}

.m-cover--mini {
	left: calc(3 * var(--u));
	top: calc(3 * var(--u));
	width: calc(33 * var(--u));
	height: calc(33 * var(--u));
}

/* Superior: textos de la ficha, centrados junto a la portada (§7.12). */
.m-ficha {
	left: calc(188 * var(--u));
	top: calc(40 * var(--u));
	width: calc(200 * var(--u));
	height: calc(160 * var(--u));
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: calc(4 * var(--u));
}

.m-ficha--baja { top: calc(56 * var(--u)); }

.m-ficha .m-cuerpo {
	color: var(--texto-2);
}

/* Franja de tipos (§5.17): 4 segmentos de 91 px en y 24..48, no es un control. */
.m-tipo {
	top: calc(24 * var(--u));
	width: calc(91 * var(--u));
	height: calc(24 * var(--u));
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(4 * var(--u));
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
	color: var(--texto);
}

.m-tipo .m-meta { color: var(--texto); }

.m-tipo--activo {
	background: var(--clorofila);
	color: var(--tinta);
	box-shadow: inset 0 calc(-2 * var(--u)) 0 var(--musgo);
}

.m-tipo--activo .m-meta { color: var(--tinta); }

/* Ajustes (§7.8): cuenta y créditos sobre el logotipo oscurecido. */
.m-velo {
	inset: 0;
	background: rgb(8 48 30 / 0.8);
}

.m-cuenta {
	left: calc(16 * var(--u));
	top: calc(16 * var(--u));
	width: calc(368 * var(--u));
	height: calc(64 * var(--u));
	display: flex;
	align-items: center;
	gap: calc(12 * var(--u));
	padding: 0 calc(12 * var(--u)) 0 calc(7 * var(--u));
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
}

.m-cuenta__foto {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(48 * var(--u));
	height: calc(48 * var(--u));
	background: var(--capa-alta);
	border: var(--outline-w) solid var(--tinta);
	color: var(--texto-2);
}

.m-cuenta__texto {
	min-width: 0;
	display: grid;
	gap: calc(2 * var(--u));
}

.m-cuenta__texto .m-cuerpo { color: var(--texto-2); }

.m-credito {
	left: calc(20 * var(--u));
	right: calc(16 * var(--u));
	height: calc(20 * var(--u));
	display: flex;
	align-items: center;
}

.m-credito .m-meta {
	flex: 0 0 calc(88 * var(--u));
	color: var(--clorofila);
}

.m-credito .m-cuerpo { min-width: 0; }

.m-regla {
	left: calc(16 * var(--u));
	right: calc(16 * var(--u));
	top: calc(180 * var(--u));
	height: 1px;
	background: var(--capa-luz);
}

.m-marca {
	left: calc(16 * var(--u));
	right: calc(16 * var(--u));
	top: calc(188 * var(--u));
	margin: 0;
}

.m-tiempos {
	display: flex;
	justify-content: space-between;
	height: calc(14 * var(--u));
	line-height: calc(14 * var(--u));
	margin-bottom: calc(3 * var(--u));
}

/* Barras de progreso (§5.4) y volumen (§5.5). */
.m-barra {
	position: relative;
	height: calc(8 * var(--u));
	background: var(--capa-alta);
	border: var(--outline-w) solid var(--tinta);
}

.m-barra--vol {
	height: calc(6 * var(--u));
}

.m-barra__descarga,
.m-barra__progreso {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
}

.m-barra__descarga { background: var(--musgo); }
.m-barra__progreso { background: var(--clorofila); }

.m-barra__tirador {
	position: absolute;
	top: 50%;
	width: calc(6 * var(--u));
	height: calc(14 * var(--u));
	transform: translate(-50%, -50%);
	background: var(--texto);
	border: var(--outline-w) solid var(--tinta);
}

/* Controles de la maqueta: botones de verdad, con foco y pulsado. */
.pantalla button {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	padding: 0;
	font: inherit;
	line-height: 1.2;
	color: var(--texto);
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

/* Inferior: pestañas (§5.12). */
.m-pestanas {
	left: 0;
	top: 0;
	width: 100%;
	height: calc(32 * var(--u));
	display: flex;
	align-items: flex-start;
}

.pantalla .m-pestana {
	flex: 1;
	height: calc(32 * var(--u));
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
	color: var(--texto);
}

.pantalla .m-pestana + .m-pestana {
	border-left: 0;
}

.pantalla .m-pestana--activa {
	/* Borde inferior 2 px más arriba; debajo asoma el fondo. */
	height: calc(30 * var(--u));
	background: var(--clorofila);
	color: var(--tinta);
	box-shadow: inset 0 calc(-2 * var(--u)) 0 var(--musgo);
}

.pantalla .m-pestana.is-pressed {
	/* Pulsada: musgo y el borde inferior sube 4 px. No se desplaza. */
	height: calc(28 * var(--u));
	background: var(--musgo);
	color: var(--tinta);
	box-shadow: none;
}

/* Botón en relieve de la maqueta (§5.1, §5.2). */
.pantalla .m-boton {
	--relleno: var(--capa-alta);
	--banda-clara: var(--capa-luz);
	--banda-oscura: var(--sombra);
	--relleno-pulsado: var(--capa);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(6 * var(--u));
	padding: 0 calc(12 * var(--u));
	background: var(--relleno);
	color: var(--texto);
	border: var(--outline-w) solid var(--tinta);
	box-shadow:
		inset 0 calc(2 * var(--u)) 0 var(--banda-clara),
		inset 0 calc(-2 * var(--u)) 0 var(--banda-oscura),
		calc(2 * var(--u)) calc(2 * var(--u)) 0 var(--sombra);
}

.pantalla .m-boton--primario {
	--relleno: var(--clorofila);
	--banda-clara: var(--menta);
	--banda-oscura: var(--musgo);
	--relleno-pulsado: var(--musgo);
	color: var(--tinta);
}

.pantalla .m-boton.is-pressed {
	background: var(--relleno-pulsado);
	transform: translate(calc(2 * var(--u)), calc(2 * var(--u)));
	box-shadow:
		inset 0 calc(2 * var(--u)) 0 var(--banda-oscura),
		inset 0 calc(-2 * var(--u)) 0 var(--banda-clara);
}

.pantalla .m-boton[aria-disabled="true"] {
	/* Deshabilitado (§6.1). */
	background: var(--capa);
	color: var(--texto-off);
	box-shadow: none;
	transform: none;
	cursor: default;
}

.pantalla .m-ancho {
	left: calc(8 * var(--u));
	width: calc(304 * var(--u));
	height: calc(32 * var(--u));
	justify-content: flex-start;
}

.pantalla .m-centro { justify-content: center; }

/* Reproductor (§7.5, player_logic.h): título en 36..68, artista, álbum y
 * descarga en 72..104, controles en 108..156. */
.m-rep-titulo {
	left: calc(8 * var(--u));
	right: calc(8 * var(--u));
	top: calc(36 * var(--u));
	height: calc(32 * var(--u));
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: calc(8 * var(--u));
}

.m-rep-titulo .m-meta {
	flex: none;
}

.m-rep-enlace {
	top: calc(72 * var(--u));
	width: calc(132 * var(--u));
	line-height: calc(32 * var(--u));
	color: var(--texto-2);
}

.pantalla .m-descarga {
	left: calc(280 * var(--u));
	top: calc(72 * var(--u));
	width: calc(32 * var(--u));
	height: calc(32 * var(--u));
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	color: var(--texto);
}

.pantalla .m-descarga.is-pressed { color: var(--lima); }

.m-descarga--hecha { color: var(--lima); }

.m-controles {
	left: 0;
	right: 0;
	top: calc(108 * var(--u));
	height: calc(48 * var(--u));
	display: flex;
	justify-content: center;
	align-items: center;
	gap: calc(16 * var(--u));
}

.pantalla .m-sq40,
.pantalla .m-sq48 {
	padding: 0;
}

.m-sq40 {
	width: calc(40 * var(--u));
	height: calc(40 * var(--u));
}

.m-sq48 {
	width: calc(48 * var(--u));
	height: calc(48 * var(--u));
}

/* Tiempos en 163..177 y barra en 180..188. */
.m-progreso-inf {
	left: calc(8 * var(--u));
	right: calc(8 * var(--u));
	top: calc(163 * var(--u));
}

/* Barra de volumen en 201..207. */
.m-volumen {
	left: calc(8 * var(--u));
	right: calc(8 * var(--u));
	top: calc(197 * var(--u));
	height: calc(14 * var(--u));
	display: flex;
	align-items: center;
	gap: calc(8 * var(--u));
}

.m-volumen .m-barra {
	flex: 0 0 calc(120 * var(--u));
}

/* Resultados (§7.4): lista entre las dos barras, 4 filas de 41 px. */
.m-lista {
	left: 0;
	right: 0;
	top: calc(32 * var(--u));
	height: calc(184 * var(--u));
	overflow: hidden;
}

.pantalla .m-fila-res {
	position: absolute;
	left: calc(8 * var(--u));
	width: calc(304 * var(--u));
	height: calc(41 * var(--u));
	background: var(--capa);
	color: var(--texto);
	border: var(--outline-w) solid var(--tinta);
}

.m-fila-res__titulo,
.m-fila-res__artista {
	position: absolute;
	left: calc(44 * var(--u));
	right: calc(44 * var(--u));
}

.m-fila-res__titulo { top: calc(3 * var(--u)); }
.m-fila-res__artista { top: calc(21 * var(--u)); color: var(--texto-2); }

.m-fila-res__dur {
	position: absolute;
	right: calc(6 * var(--u));
	top: calc(5 * var(--u));
}

.pantalla .m-fila-res--foco {
	background: var(--clorofila);
	color: var(--tinta);
	box-shadow: inset 0 calc(-2 * var(--u)) 0 var(--musgo);
}

.pantalla .m-fila-res--foco .m-meta,
.pantalla .m-fila-res--foco .m-fila-res__artista {
	color: var(--tinta);
}

.pantalla .m-fila-res.is-pressed {
	transform: translate(calc(2 * var(--u)), calc(2 * var(--u)));
	background: var(--musgo);
	color: var(--tinta);
	box-shadow: none;
}

.pantalla .m-fila-res.is-pressed .m-meta,
.pantalla .m-fila-res.is-pressed .m-fila-res__artista {
	color: var(--tinta);
}

/* Tesela (§5.16): la fila en compacto, 150×32 en la rejilla de 2 columnas. */
.pantalla .m-tesela {
	width: calc(150 * var(--u));
	height: calc(32 * var(--u));
}

.m-tesela__nombre {
	position: absolute;
	left: calc(35 * var(--u));
	right: calc(7 * var(--u));
	top: 50%;
	transform: translateY(-50%);
}

/* Indicador de desplazamiento (§5.11). */
.m-scroll {
	right: 0;
	top: calc(32 * var(--u));
	width: calc(4 * var(--u));
	height: calc(184 * var(--u));
	background: var(--capa);
}

.m-scroll i {
	position: absolute;
	left: 0;
	right: 0;
	display: block;
	background: var(--clorofila);
}

/* Barra de botones (§5.6). */
.m-barra-botones {
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(24 * var(--u));
	display: flex;
	align-items: center;
	gap: calc(12 * var(--u));
	padding: 0 calc(8 * var(--u));
	background: var(--capa);
	border-top: var(--outline-w) solid var(--tinta);
}

.m-accion {
	display: flex;
	align-items: center;
	gap: calc(4 * var(--u));
}

.m-glifo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: calc(14 * var(--u));
	height: calc(14 * var(--u));
	padding: 0 calc(3 * var(--u));
	border: var(--outline-w) solid var(--tinta);
	color: var(--tinta);
	font-size: calc(10 * var(--u));
	font-weight: 700;
}

.m-glifo--a { background: var(--btn-a); }
.m-glifo--b { background: var(--btn-b); }
.m-glifo--x { background: var(--btn-x); }
.m-glifo--y { background: var(--btn-y); }

/* Cruceta: sin color propio, como START y SELECT (§5.6). */
.m-glifo--sys {
	width: calc(16 * var(--u));
	padding: 0;
	background: var(--texto-2);
}

.pantalla .m-glifo .icon {
	width: calc(14 * var(--u));
	height: calc(14 * var(--u));
}

.m-accion--der { margin-left: auto; }

/* ------------------------------------------------------------------ */
/* Características y controles                                          */
/* ------------------------------------------------------------------ */

.rejilla {
	display: grid;
	gap: var(--e4);
}

@media (min-width: 640px) {
	.rejilla {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.rejilla--3 {
		grid-template-columns: repeat(3, 1fr);
	}
}

.caracteristica {
	display: grid;
	gap: var(--e2);
	align-content: start;
}

.caracteristica p {
	color: var(--texto-2);
}

/* Tesela del icono: superficie en relieve con el icono a 2× en tinta. */
.tesela {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tinta);
	margin-bottom: var(--e2);
}

.tesela--clorofila {
	--relleno: var(--clorofila);
	--banda-clara: var(--menta);
	--banda-oscura: var(--musgo);
}

.tesela--coral {
	--relleno: var(--coral);
	--banda-clara: var(--coral-luz);
	--banda-oscura: var(--coral-osc);
}

.tesela--ambar {
	--relleno: var(--ambar);
	--banda-clara: var(--ambar-luz);
	--banda-oscura: var(--ambar-osc);
}

.requisitos {
	margin-top: var(--e6);
}

.controles {
	margin-top: calc(var(--e6) * 2);
}

.controles h3 {
	margin-bottom: var(--e4);
}

.tabla {
	width: 100%;
	border-collapse: collapse;
	background: var(--capa);
	border: var(--outline-w) solid var(--tinta);
}

.tabla th,
.tabla td {
	padding: var(--e2) var(--e3);
	text-align: left;
	vertical-align: top;
	border-top: var(--outline-w) solid var(--tinta);
}

.tabla thead th {
	font-size: var(--t-meta);
	font-weight: 600;
	color: var(--texto-2);
	border-top: 0;
}

.tabla td:first-child {
	white-space: nowrap;
	width: 1%;
}

.tabla td:last-child {
	color: var(--texto-2);
}

.tabla .glyph + .glyph {
	margin-left: var(--e1);
}

/* ------------------------------------------------------------------ */
/* Instalación                                                          */
/* ------------------------------------------------------------------ */

.metodo {
	display: grid;
	gap: var(--e3);
	align-content: start;
}

.metodo__cabeza {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--e2);
	flex-wrap: wrap;
}

.metodo .pasos {
	margin-bottom: var(--e2);
}

.metodo .btn {
	justify-self: start;
}

.etiqueta {
	font-size: var(--t-meta);
	color: var(--texto-2);
}

.primer-arranque {
	margin-top: var(--e4);
}

.primer-arranque p {
	color: var(--texto-2);
}

.primer-arranque p + p {
	margin-top: var(--e2);
}

.primer-arranque strong {
	color: var(--lima);
}

/* ------------------------------------------------------------------ */
/* Pie                                                                  */
/* ------------------------------------------------------------------ */

.pie {
	margin-top: var(--seccion);
	padding: var(--e6) 0 calc(var(--e6) * 2);
	background: var(--capa);
	border-top: var(--outline-w) solid var(--tinta);
	color: var(--texto-2);
	font-size: var(--t-meta);
}

.pie .wrap {
	display: grid;
	gap: var(--e3);
}

.pie strong {
	color: var(--texto);
}
