/* ╔══════════════════════════════════════════════════════════╗
   ║  Whisper Engine — el reproductor de música de la app       ║
   ╚══════════════════════════════════════════════════════════╝
   Copiado VERBATIM de apps/web/src/shared/ui/whisperEngine/WhisperEngine.css.
   Usa los mismos tokens que la app (--surface-card, --accent, --font-mono…),
   que ya viven en css/tokens/. Si el componente cambia allí, se recopia aquí.
   El comportamiento está portado a JS plano en js/whisperEngine.js. */

/* Whisper Engine — float + reproductor. Compone tokens.css. Lima solo en el EQ/play (acento puntual). */

.wh-float {
	position: fixed;
	bottom: 14px;
	left: 14px;
	z-index: 45;
	display: flex;
	gap: 9px;
	align-items: center;
	padding: 7px 11px;
	background: var(--surface-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-float);
}
.wh-float__brand {
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	background: none;
	border: none;
}
.wh-float__ticker {
	max-width: 150px;
	overflow: hidden;
	cursor: pointer;
	background: none;
	border: none;
	mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}
.wh-float__track {
	display: block;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-secondary);
	white-space: nowrap;
}
.is-playing .wh-float__track {
	animation: wh-ticker 11s linear infinite;
}
@keyframes wh-ticker {
	from {
		transform: translateX(40%);
	}
	to {
		transform: translateX(-100%);
	}
}
.wh-eq {
	display: flex;
	gap: 2px;
	align-items: flex-end;
	height: 14px;
}
.wh-eq i {
	width: 2px;
	height: 3px;
	background: var(--accent);
	border-radius: 1px;
}
.is-playing .wh-eq i {
	animation: wh-eq 0.6s ease-in-out infinite;
}
.is-playing .wh-eq i:nth-child(2) {
	animation-delay: 0.15s;
}
.is-playing .wh-eq i:nth-child(3) {
	animation-delay: 0.3s;
}
@keyframes wh-eq {
	0%,
	100% {
		height: 3px;
	}
	50% {
		height: 12px;
	}
}
.wh-float__mute {
	display: grid;
	place-items: center;
	padding: 4px;
	font-size: 15px;
	cursor: pointer;
	background: none;
	border: none;
}

.wh-widget {
	position: fixed;
	bottom: 56px;
	left: 14px;
	z-index: 46;
	width: 248px;
	padding: 12px;
	background: var(--surface-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-pop);
	animation: wh-pop 0.22s var(--ease);
}
@keyframes wh-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
.wh-widget__head {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 10px;
}
.wh-widget__title {
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	color: var(--text-primary);
}
.wh-widget__artist {
	font-size: 10px;
	color: var(--text-secondary);
}
.wh-widget__x {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	background: var(--surface-sunken);
	border: none;
	border-radius: 50%;
}
.wh-widget__bar {
	position: relative;
	width: 100%;
	height: 5px;
	padding: 0;
	cursor: pointer;
	background: var(--surface-sunken);
	border: none;
	border-radius: 3px;
}
.wh-widget__fill {
	display: block;
	height: 100%;
	background: var(--accent);
	border-radius: 3px;
}
.wh-widget__btns {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
}
.wh-widget__skip {
	font-size: 15px;
	color: var(--text-secondary);
	cursor: pointer;
	background: none;
	border: none;
}
.wh-widget__play {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	font-size: 13px;
	color: #fff;
	cursor: pointer;
	background: var(--da-ink);
	border: none;
	border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
	.wh-float__track,
	.wh-eq i {
		animation: none;
	}
}

/* ─────────── control de volumen ───────────
   No venía en el componente de la app: se añade aquí porque esta web se abre
   desde WhatsApp, a menudo en sitios donde no puedes permitirte que suene. */
.wh-widget__vol {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: 10px;
	font-size: 11px;
}
.wh-widget__slider {
	flex: 1;
	height: 4px;
	appearance: none;
	cursor: pointer;
	background: var(--surface-sunken);
	border-radius: 3px;
}
.wh-widget__slider::-webkit-slider-thumb {
	width: 14px;
	height: 14px;
	appearance: none;
	background: var(--accent);
	border: none;
	border-radius: 50%;
	cursor: pointer;
}
.wh-widget__slider::-moz-range-thumb {
	width: 14px;
	height: 14px;
	background: var(--accent);
	border: none;
	border-radius: 50%;
	cursor: pointer;
}

/* ─────────── mientras hay una hoja abierta ───────────
   Añadido el 30/8/2026. El reproductor se cuelga de <body> y las hojas viven
   dentro de la columna, que abre su propio contexto de apilado con `z-index:1`:
   por eso el reproductor salía POR ENCIMA del billete y de la ficha de zona
   aunque su z-index (45) sea menor que el de ellas (60). La ficha de zona
   arrastraba 64 px de relleno inferior sólo para esquivarlo.

   La clase la pone js/app.js en cada render. Sin transición: aparecer con
   fundido justo cuando sube una hoja llama la atención sobre lo que se va, que
   es lo contrario de lo que se busca. */
body.hay-hoja .wh-float,
body.hay-hoja .wh-widget {
	display: none;
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  LA HOJA DE LA LETRA                                       ║
   ╚══════════════════════════════════════════════════════════╝

   Portada de la maqueta que mandó Andoni el 30/8/2026, respetando sus
   decisiones: la letra en gris flojo que se aclara al pasar por encima, los
   gritos en negro y grandes, los susurros en cursiva casi invisibles, y el
   vídeo en polaroid con dos hojas torcidas detrás.

   La idea de fondo es que la letra NO se lee toda: se ojea, y lo que salta a
   la vista son los cuatro gritos. Por eso el cuerpo normal va al 50 % de
   opacidad y el grito al 100 %. Si se igualan, se pierde la canción. */

.wh-letra {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.wh-letra.is-abierta {
	pointer-events: auto;
	opacity: 1;
}

.wh-letra__velo {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
}

.wh-letra__caja {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 460px;
	max-height: 88dvh;
	margin: 0 8px 12px;
	border-radius: 16px;
	background: var(--da-paper-2, #f1f1f1);
	color: var(--text-primary, #252525);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transform: translateY(16px);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.wh-letra.is-abierta .wh-letra__caja {
	transform: translateY(0);
}

.wh-letra__polvo {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

/* ─────────── cabecera ─────────── */

.wh-letra__cab {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 10px;
}

.wh-letra__titulo {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-primary, #252525);
}

.wh-letra__artista {
	margin-top: 1px;
	font-size: 11px;
	font-weight: 300;
	color: var(--da-gray, #9d9d9d);
}

.wh-letra__x {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: -6px -6px -6px 0;
	border: 0;
	border-radius: 50%;
	background: none;
	font-size: 15px;
	color: var(--da-gray, #9d9d9d);
	cursor: pointer;
	transition: color 0.15s ease;
}

.wh-letra__x:hover {
	color: var(--text-primary, #252525);
}

/* ─────────── los mandos ─────────── */

.wh-letra__mandos {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 16px 14px;
}

.wh-letra__barra {
	position: relative;
	width: 100%;
	height: 14px;      /* alto real para el dedo… */
	padding: 5px 0;    /* …con la barra fina dibujada en medio */
	border: 0;
	background: none;
	cursor: pointer;
}

.wh-letra__barra::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 4px;
	margin-top: -2px;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.06);
}

.wh-letra__relleno {
	position: absolute;
	left: 0;
	top: 50%;
	height: 4px;
	width: 0%;
	margin-top: -2px;
	border-radius: 2px;
	background: var(--da-accent, #b9c91c);
	transition: width 0.1s linear;
}

.wh-letra__tirador {
	position: absolute;
	top: 50%;
	left: 0%;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--text-primary, #252525);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transform: translate(-50%, -50%);
	transition: left 0.1s linear;
}

.wh-letra__tiempos {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	color: var(--da-gray, #9d9d9d);
	font-variant-numeric: tabular-nums;
}

.wh-letra__btns {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-top: 2px;
}

.wh-letra__salto {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	font-size: 19px;
	color: var(--da-gray, #9d9d9d);
	cursor: pointer;
	transition: color 0.15s ease;
}

.wh-letra__salto:hover {
	color: var(--text-primary, #252525);
}

.wh-letra__play {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--text-primary, #252525);
	color: var(--da-paper-2, #f1f1f1);
	font-size: 15px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.wh-letra__play:hover {
	background: var(--da-accent, #b9c91c);
}

/* ─────────── el cuerpo ─────────── */

.wh-letra__cuerpo {
	position: relative;
	z-index: 1;
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 0 16px 28px;
}

.wh-letra__hero {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 300;
	line-height: 1.5;
	color: rgba(37, 37, 37, 0.75);
	text-align: center;
	text-wrap: pretty;
}

/* ─────────── el vídeo en polaroid ───────────
   Dos hojas torcidas detrás y una recta delante. Mientras no haya vídeo, el
   hueco dice qué se está esperando — que en esta campaña es parte del gancho,
   no un "próximamente" vacío. */

.wh-letra__vid {
	width: 70%;
	max-width: 280px;
	margin: 0 auto 20px;
	transition: transform 0.2s ease;
}

.wh-letra__vid:hover {
	transform: rotate(1.5deg);
}

.wh-letra__vid-marco {
	position: relative;
	padding: 4px 4px 22px;
	border: 2px solid var(--text-primary, #252525);
	background: #fff;
}

.wh-letra__vid-marco::before,
.wh-letra__vid-marco::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	border: 2px solid rgba(37, 37, 37, 0.25);
	background: #fff;
	transition: transform 0.2s ease;
}

.wh-letra__vid-marco::before {
	transform: rotate(-3deg);
}

.wh-letra__vid-marco::after {
	transform: rotate(3deg);
}

.wh-letra__vid:hover .wh-letra__vid-marco::before {
	transform: rotate(-5deg);
}

.wh-letra__vid:hover .wh-letra__vid-marco::after {
	transform: rotate(5deg);
}

.wh-letra__vid-hueco {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e8e8e8;
}

.wh-letra__vid-hueco iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.wh-letra__vid-hueco.is-espera {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.4;
	color: #8d8d8d;
	text-align: center;
	text-wrap: pretty;
}

.wh-letra__vid-pie {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 5px;
	font-size: 7px;
	letter-spacing: 0.06em;
	color: #bbb;
	text-align: center;
}

/* ─────────── la letra ───────────
   El rótulo de sección en lima y diminuto; la línea normal al 50 % para que la
   canción se ojee; el grito a tamaño y negro completos; el susurro casi
   invisible, que es lo que es. */

.wh-letra__sec {
	margin: 26px 0 8px;
	font-size: 9px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--da-accent, #b9c91c);
}

.wh-letra__sec:first-child {
	margin-top: 0;
}

.wh-letra__l {
	margin: 0;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.7;
	color: rgba(37, 37, 37, 0.5);
	transition: color 0.2s ease;
}

.wh-letra__l:hover {
	color: var(--text-primary, #252525);
}

.wh-letra__l.is-grito {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--text-primary, #252525);
}

.wh-letra__l.is-grito:hover {
	color: var(--da-accent, #b9c91c);
}

.wh-letra__l.is-susurro {
	font-size: 12px;
	font-style: italic;
	font-weight: 300;
	color: rgba(37, 37, 37, 0.22);
}

.wh-letra__hueco-l {
	height: 10px;
}

/* El botón que la abre, en el reproductor. */
.wh-widget__letra-b {
	width: 100%;
	min-height: 44px;
	margin-top: 10px;
	border: 1px solid var(--border, rgba(47, 36, 24, 0.14));
	border-radius: var(--radius-sm, 10px);
	background: transparent;
	font: 700 12.5px/1.2 var(--font-body, sans-serif);
	letter-spacing: -0.01em;
	color: var(--da-gray, #9d9d9d);
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease;
}

.wh-widget__letra-b:hover {
	background: var(--accent-tint, rgba(185, 201, 28, 0.16));
	color: var(--da-accent-ink, #2e3300);
}

.wh-widget__letra-b[hidden] {
	display: none;
}

@media (min-width: 768px) {
	.wh-letra {
		align-items: center;
	}

	.wh-letra__caja {
		max-width: 500px;
		margin: 0 auto;
	}

	.wh-letra__hero {
		font-size: 22px;
	}

	.wh-letra__l {
		font-size: 16px;
	}

	.wh-letra__l.is-grito {
		font-size: 21px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wh-letra,
	.wh-letra__caja,
	.wh-letra__vid,
	.wh-letra__vid-marco::before,
	.wh-letra__vid-marco::after {
		transition: none;
	}
}
