/* El Caso Munford — noir art-déco */

@font-face { font-family: "Josefin Sans"; font-weight: 300; font-display: swap; src: url(../fonts/josefin-sans-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-weight: 400; font-display: swap; src: url(../fonts/josefin-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-weight: 600; font-display: swap; src: url(../fonts/josefin-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }

:root {
	/* Tema por defecto: noche (fondo negro, acento melocotón F3CCAB) */
	--ink: #0f0d0c;
	--ink-2: #171311;
	--panel: #1d1815;
	--bg-rgb: 15, 13, 12;
	--fg: #f6e9dc;
	--fg-rgb: 246, 233, 220;
	--muted: #b3a090;
	--accent: #f3ccab;
	--accent-hi: #fbe3cd;
	--accent-lo: #a77f62;
	--accent-rgb: 243, 204, 171;
	--line: rgba(243, 204, 171, .26);
	--btn-bg: linear-gradient(180deg, #fbe3cd, #f3ccab 55%, #d6a37c);
	--btn-fg: #1a1210;
	--glow: rgba(243, 204, 171, .45);
	--red: #c0453a;
	--grain: .07;
	--logo-filter: none;
	--cast-filter: sepia(.25) contrast(1.05) brightness(.85);
	--display: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
	--serif: "Cormorant Garamond", "Georgia", serif;
	--gutter: 20px;
	--maxw: 560px;
	--safe-t: env(safe-area-inset-top, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: dark;
}

/* Tema día: fondo melocotón F3CCAB, tinta oscura */
:root[data-theme="dia"] {
	--ink: #f3ccab;
	--ink-2: #f6d8bc;
	--panel: #f8dfc8;
	--bg-rgb: 243, 204, 171;
	--fg: #1e1613;
	--fg-rgb: 30, 22, 19;
	--muted: #6f5444;
	--accent: #7a4429;
	--accent-hi: #2a1a13;
	--accent-lo: #a8765b;
	--accent-rgb: 122, 68, 41;
	--line: rgba(30, 22, 19, .22);
	--btn-bg: #1e1613;
	--btn-fg: #f3ccab;
	--glow: rgba(122, 68, 41, .35);
	--red: #a52a20;
	--grain: .05;
	--logo-filter: brightness(0);
	--cast-filter: none;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	background: var(--ink);
	color: var(--fg);
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	-webkit-text-size-adjust: 100%;
	overflow: hidden;
	overscroll-behavior: none;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent-hi); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

/* Grano de película */
.grain {
	position: fixed; inset: -50%;
	pointer-events: none; z-index: 90; opacity: var(--grain);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: grain 1.2s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

/* ---------- Pantallas ---------- */
#app { position: fixed; inset: 0; }
.screen {
	position: absolute; inset: 0;
	overflow-y: auto; overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	opacity: 0; visibility: hidden;
	transform: translateY(14px);
	transition: opacity .55s var(--ease), transform .55s var(--ease), visibility 0s .55s;
	background:
		radial-gradient(120% 60% at 50% 0%, rgba(var(--accent-rgb), .10), transparent 60%),
		var(--ink);
}
.screen.is-active {
	opacity: 1; visibility: visible; transform: none;
	transition: opacity .55s var(--ease), transform .55s var(--ease), visibility 0s;
}
.screen-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: calc(76px + var(--safe-t)) var(--gutter) calc(40px + var(--safe-b));
	min-height: 100%;
}
.screen-inner.with-player { padding-bottom: calc(130px + var(--safe-b)); }

/* ---------- Tipografía ---------- */
.heading { text-align: center; margin: 8px 0 22px; }
.eyebrow {
	font-family: var(--display); font-weight: 300;
	text-transform: uppercase; letter-spacing: .35em;
	font-size: 12px; color: var(--accent);
	margin: 0 0 10px;
	display: flex; align-items: center; justify-content: center; gap: 12px;
}
.eyebrow::before, .eyebrow::after { content: ""; height: 1px; width: 28px; background: var(--accent-lo); }
.heading h2 {
	font-family: var(--display); font-weight: 400;
	text-transform: uppercase; letter-spacing: .14em;
	font-size: clamp(24px, 7vw, 34px); line-height: 1.15;
	margin: 0; color: var(--fg);
	text-wrap: balance;
}
.heading h2::after {
	content: "◆"; display: block;
	font-size: 10px; color: var(--accent); letter-spacing: 0;
	margin-top: 14px;
	background: linear-gradient(90deg, transparent, var(--accent-lo) 30%, transparent 46%, transparent 54%, var(--accent-lo) 70%, transparent) center / 100% 1px no-repeat;
}
.lede { font-size: 23px; line-height: 1.35; margin: 0 0 14px; }
.lede em, .body-text em { color: var(--accent-hi); }
.body-text { color: var(--fg); opacity: .86; margin: 0 0 22px; }
.center { text-align: center; }
.hint {
	font-family: var(--display); font-size: 12px; letter-spacing: .14em;
	text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.kicker, .extra-kicker {
	font-family: var(--display); text-transform: uppercase;
	letter-spacing: .3em; font-size: 11px; color: var(--accent);
	margin: 0 0 10px;
}

/* ---------- Botones ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 0 26px;
	font-family: var(--display); font-weight: 600;
	text-transform: uppercase; letter-spacing: .22em; font-size: 13px;
	text-decoration: none; position: relative;
	transition: transform .15s, background .3s, color .3s, opacity .3s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
	color: var(--btn-fg);
	background: var(--btn-bg);
	box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px var(--accent-lo), 0 10px 30px -10px var(--glow);
}
.btn-ghost { color: var(--accent-hi); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 12px; color: var(--accent-hi); border: 1px solid var(--line); }
.btn[disabled] { opacity: .35; pointer-events: none; }

.actions-row { display: flex; gap: 12px; margin-top: 28px; }
.actions-row .btn { flex: 1; padding: 0 14px; letter-spacing: .16em; white-space: nowrap; }
.actions-row .btn-primary { flex: 1.4; }
.actions-row.single { justify-content: center; }
.actions-row.single .btn { flex: 0 1 auto; }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-hi); stroke-width: 1.6; }

/* ---------- Marco déco ---------- */
.frame { position: relative; margin: 0; padding: 6px; border: 1px solid var(--accent-lo); background: var(--ink-2); }
.frame::before, .frame::after {
	content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
	border: 2px solid var(--accent);
}
.frame::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }

.deco-rule { display: flex; align-items: center; gap: 12px; width: min(260px, 70vw); margin: 0 auto; color: var(--accent); }
.deco-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.deco-rule span:last-child { background: linear-gradient(270deg, transparent, var(--accent)); }
.deco-rule i { font-style: normal; font-size: 10px; }

/* ---------- Portada ---------- */
.screen-intro { display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.sunburst {
	position: absolute; left: 50%; top: 22%; width: 160vmax; height: 160vmax;
	transform: translate(-50%, -50%);
	background: repeating-conic-gradient(from 0deg, rgba(var(--accent-rgb), .055) 0 4deg, transparent 4deg 12deg);
	mask-image: radial-gradient(circle, #000 0, transparent 45%);
	-webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%);
	animation: spin 180s linear infinite;
	pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.intro-head { position: relative; padding-top: calc(7vh + var(--safe-t)); transition: padding .9s var(--ease); }
.logo { margin: 18px auto; width: min(64vw, 300px); transition: width 1.2s var(--ease); }
.logo img { width: 100%; filter: var(--logo-filter) drop-shadow(0 4px 24px rgba(0, 0, 0, .35)); }
.screen-intro.opened .intro-head { padding-top: calc(4vh + var(--safe-t)); }
.screen-intro.opened .logo { width: min(40vw, 190px); margin: 12px auto; }
.intro-body {
	position: relative; z-index: 2;
	max-width: var(--maxw); padding: 3vh var(--gutter) 0;
	display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.intro-body .body-text { font-size: 18px; }
.intro-body .btn { width: min(100%, 320px); margin-top: 8px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 1.2s var(--ease) .3s, transform 1.2s var(--ease) .3s; }
.screen-intro.opened .reveal { opacity: 1; transform: none; }
.intro-cast {
	position: relative; margin-top: auto; width: 100%; max-width: 760px;
	pointer-events: none; flex-shrink: 0;
}
.intro-cast img { width: 100%; filter: var(--cast-filter); }
@media (max-height: 700px) { .intro-cast { max-height: 22vh; overflow: hidden; } }

/* ---------- Modo ---------- */
.mode-cards { display: grid; gap: 16px; margin: 6px 0 22px; }
.mode-card {
	position: relative; text-align: left;
	padding: 24px 22px 20px 74px;
	border: 1px solid var(--line);
	background: linear-gradient(135deg, rgba(var(--accent-rgb), .08), transparent 60%), var(--panel);
	display: grid; gap: 6px;
	transition: border-color .3s, transform .15s, background .3s;
}
.mode-card:active { transform: scale(.98); }
.mode-card:hover, .mode-card.is-picked { border-color: var(--accent); }
.mode-num {
	position: absolute; left: 22px; top: 22px;
	width: 36px; height: 36px; display: grid; place-items: center;
	font-family: var(--display); font-size: 14px; line-height: 1; color: var(--accent-hi);
	padding-top: 2px;
}
.mode-num::before { content: ""; position: absolute; inset: 2px; border: 1px solid var(--accent); transform: rotate(45deg); }
.mode-title { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: 18px; }
.mode-desc { color: var(--muted); font-size: 17px; line-height: 1.4; }
.mode-cta { font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: 11px; color: var(--accent); margin-top: 6px; }

/* ---------- Audios ---------- */
.track-intro {
	width: 100%; display: flex; align-items: center; gap: 16px;
	padding: 16px 18px; margin-bottom: 18px; text-align: left;
	border: 1px solid var(--accent-lo);
	background: linear-gradient(90deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .03));
}
.ti-icon {
	flex: none; width: 48px; height: 48px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--btn-bg);
}
.ti-icon svg { width: 20px; fill: var(--btn-fg); margin-left: 3px; }
.ti-text { display: grid; }
.ti-text b { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .18em; font-size: 15px; }
.ti-text small { color: var(--muted); font-size: 15px; }
.track-intro.is-playing { border-color: var(--accent-hi); }
.track-intro.is-done .ti-text small::before { content: "✓ "; color: var(--accent); }

.tracks {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
	transition: opacity .5s;
}
.tracks.locked { opacity: .28; pointer-events: none; filter: grayscale(1); }
.track {
	aspect-ratio: 1; position: relative;
	display: grid; place-items: center;
	border: 1px solid var(--line); background: var(--panel);
	font-family: var(--display); font-weight: 300; font-size: 24px; color: var(--fg);
	transition: border-color .3s, background .3s, transform .12s;
}
.track:active { transform: scale(.94); }
.track small {
	position: absolute; top: 6px; left: 0; right: 0;
	font-size: 8px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted);
}
.track.is-done { border-color: var(--accent-lo); }
.track.is-done::after {
	content: ""; position: absolute; right: 6px; bottom: 6px;
	width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg);
}
.track.is-playing { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--accent-hi); }
.track.is-playing small { color: var(--btn-fg); }
.locked-note { grid-column: 1 / -1; }

.enigma-tile {
	width: 100%; margin-top: 14px; padding: 14px 18px;
	display: flex; justify-content: space-between; align-items: baseline;
	border: 1px dashed var(--accent); color: var(--accent-hi);
	font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: 13px;
}
.enigma-tile small { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--muted); font-style: italic; }

/* ---------- Reproductor ---------- */
.player {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
	display: flex; align-items: center; gap: 14px;
	padding: 12px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) calc(12px + var(--safe-b));
	background: rgba(var(--bg-rgb), .92);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border-top: 1px solid var(--line);
	transform: translateY(110%); transition: transform .45s var(--ease);
}
.player.is-visible { transform: none; }
.player-btn {
	flex: none; width: 52px; height: 52px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--btn-bg);
}
.player-btn svg { width: 22px; fill: var(--btn-fg); }
.player-btn .i-pause { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player-btn.small { width: 40px; height: 40px; background: none; border: 1px solid var(--line); }
.player-btn.small svg { width: 18px; fill: var(--accent-hi); }
.player-info { flex: 1; min-width: 0; }
.player-title {
	font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: 12px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--accent-hi);
}
.player-times { display: flex; justify-content: space-between; font-family: var(--display); font-size: 11px; color: var(--muted); }
input[type=range] {
	-webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 2px 0; background: transparent;
	--p: 0%;
}
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(var(--fg-rgb), .18) var(--p)); }
input[type=range]::-moz-range-track { height: 2px; background: rgba(var(--fg-rgb), .18); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; background: var(--accent-hi); transform: rotate(45deg); border: 0; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--accent-hi); transform: rotate(45deg); border: 0; border-radius: 0; }

/* ---------- Barra superior ---------- */
.topbar {
	position: fixed; top: 0; left: 0; right: 0; z-index: 30;
	display: flex; align-items: center; justify-content: space-between;
	padding: calc(8px + var(--safe-t)) 10px 8px;
	background: linear-gradient(180deg, rgba(var(--bg-rgb), .96) 60%, rgba(var(--bg-rgb), 0));
}
.topbar-mark { width: 44px; text-align: center; font-size: 10px; color: var(--accent-lo); }
.steps { display: flex; gap: 6px; }
.steps span {
	min-width: 34px; padding: 4px 6px; text-align: center;
	font-family: var(--display); font-size: 11px; letter-spacing: .1em;
	color: var(--muted); border-bottom: 2px solid rgba(var(--fg-rgb), .12);
	transition: color .3s, border-color .3s;
}
.steps span.done { color: var(--accent); border-color: var(--accent-lo); }
.steps span.now { color: var(--fg); border-color: var(--accent-hi); }
.topbar.no-steps .steps { visibility: hidden; }

/* ---------- Sospechosos ---------- */
.suspects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
@media (min-width: 420px) { .suspects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.suspect, .helper, .key { min-width: 0; width: 100%; }
.suspect { text-align: left; transition: transform .15s, opacity .4s; }
.suspect:active { transform: scale(.97); }
.suspect .frame { padding: 4px; }
.suspect img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; filter: sepia(.15) contrast(1.05); transition: filter .4s; }
.suspect-label {
	display: flex; justify-content: space-between; align-items: baseline;
	margin-top: 8px; font-family: var(--display); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.suspect-label b { font-weight: 300; font-size: 18px; color: var(--accent-hi); letter-spacing: .05em; }
.suspect.is-wrong { opacity: .45; }
.suspect.is-wrong img { filter: grayscale(1) brightness(.6); }
.suspect.is-wrong .frame::before { border-color: var(--red); }
.suspect.is-wrong .suspect-label span { font-size: 0; }
.suspect.is-wrong .suspect-label span::after { content: "Descartado"; font-size: 11px; color: var(--red); }

/* ---------- Opciones (ayudante / habitación / móvil) ---------- */
.helpers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.helper { text-align: center; transition: transform .15s; }
.helper:active { transform: scale(.97); }
.helper img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; width: 100%; filter: sepia(.15); }
.helper-name { display: block; margin-top: 10px; font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
.helper.is-picked .frame { border-color: var(--accent-hi); box-shadow: 0 0 0 1px var(--accent-hi), 0 0 30px -6px var(--accent); }

.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.key {
	position: relative; aspect-ratio: 3 / 4;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	border: 1px solid var(--line);
	background: radial-gradient(80% 60% at 50% 30%, rgba(var(--accent-rgb), .14), transparent), var(--panel);
	transition: border-color .3s, transform .15s;
}
.key:active { transform: scale(.97); }
.key svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 1.2; }
.key-num { font-family: var(--display); font-weight: 300; font-size: 40px; letter-spacing: .08em; color: var(--fg); }
.key-label { font-family: var(--display); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.key.is-picked { border-color: var(--accent-hi); }

.motives { display: grid; gap: 12px; }
.motive {
	display: flex; align-items: center; gap: 18px;
	min-height: 70px; padding: 0 22px; text-align: left;
	border: 1px solid var(--line); background: var(--panel);
	font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: 16px;
	transition: border-color .3s, transform .15s;
}
.motive:active { transform: scale(.98); }
.motive span { font-weight: 300; color: var(--accent); font-size: 13px; width: 22px; }
.motive.is-picked { border-color: var(--accent-hi); background: linear-gradient(90deg, rgba(var(--accent-rgb), .18), var(--panel)); }

/* ---------- Resultado ---------- */
.stars { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; }
.stars svg { width: 36px; height: 36px; }
.stars .on { fill: var(--accent-hi); filter: drop-shadow(0 0 10px var(--glow)); }
.stars .off { fill: none; stroke: var(--accent-lo); stroke-width: 1.2; }
.stars svg { opacity: 0; transform: scale(.4); animation: pop .5s var(--ease) forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.score-label { text-align: center; font-style: italic; color: var(--accent-hi); font-size: 21px; margin: 0 0 18px; }
.verdicts { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.verdicts li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.verdicts .q { grid-column: 1 / -1; font-family: var(--display); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; color: var(--muted); }
.verdicts .a { font-size: 20px; }
.verdicts .a small { color: var(--muted); font-size: 15px; }
.verdicts .mark { font-family: var(--display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; align-self: center; padding: 4px 8px; border: 1px solid; }
.verdicts .ok { color: var(--accent-hi); border-color: var(--accent-lo); }
.verdicts .ko { color: var(--red); border-color: rgba(178, 58, 46, .5); }

/* ---------- Gracias / créditos ---------- */
.extras { display: grid; gap: 14px; margin: 22px 0; }
.extra { padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.extra h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .16em; font-size: 20px; margin: 0 0 6px; }
.extra p:not(.extra-kicker) { margin: 0 0 14px; color: var(--muted); font-size: 17px; line-height: 1.4; }
.banner { display: block; margin: 22px 0; border: 1px solid var(--line); }

.cast { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 0; }
.cast li { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cast .who { font-size: 19px; }
.cast .char { font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-align: right; align-self: center; }
.cast .ig { grid-column: 1 / -1; font-size: 15px; color: var(--muted); font-style: italic; }
.team { margin: 0 0 10px; display: grid; gap: 14px; text-align: center; }
.team dt { font-family: var(--display); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.team dd { margin: 2px 0 0; font-size: 18px; line-height: 1.35; }

.about { display: grid; gap: 4px; }
.about-photo { width: 62%; margin: 0 auto 10px; }
.handle { text-align: center; font-family: var(--display); letter-spacing: .14em; color: var(--accent-hi); font-size: 14px; margin: 0 0 8px; }
.about p:not(.handle) { margin: 0 0 12px; opacity: .88; }
.contact { margin: 20px 0 0; padding: 20px; border: 1px solid var(--line); text-align: center; display: grid; gap: 6px; }
.contact a { text-decoration: none; font-size: 19px; }

/* ---------- Puzle ---------- */
.puzzle {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
	width: min(100%, 420px); margin: 0 auto 14px; aspect-ratio: 933 / 1320;
	padding: 4px; touch-action: manipulation;
}
.piece {
	background-image: url(../img/testamento.webp); background-size: 300% 300%;
	transition: transform .25s var(--ease), box-shadow .25s, filter .25s;
	outline: 1px solid rgba(0, 0, 0, .35);
}
.piece.is-sel { transform: scale(.92); box-shadow: 0 0 0 2px var(--accent-hi); filter: brightness(1.08); z-index: 2; }
.puzzle.solved { gap: 0; }
.puzzle.solved .piece { outline: none; cursor: zoom-in; }

.zoomer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 7, 6, .97); }
.zoomer-scroll { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.zoomer-scroll img { width: 180%; max-width: none; margin: 60px auto; }
@media (min-width: 700px) { .zoomer-scroll img { width: 900px; } }
.zoomer-close { position: fixed; top: calc(10px + var(--safe-t)); right: 10px; background: var(--ink); border: 1px solid var(--line); border-radius: 50%; }

/* ---------- Visor de sospechoso ---------- */
/* Los visores son siempre oscuros, sea cual sea el tema */
.lightbox, .zoomer {
	--ink: #0f0d0c; --ink-2: #171311; --fg: #f6e9dc; --muted: #b3a090;
	--accent: #f3ccab; --accent-hi: #fbe3cd; --accent-lo: #a77f62; --line: rgba(243, 204, 171, .3);
	color: var(--fg);
}
.lightbox {
	position: fixed; inset: 0; z-index: 50;
	display: grid; place-items: center; padding: 20px;
	background: rgba(8, 7, 6, .9);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	animation: fade .3s;
}
@keyframes fade { from { opacity: 0; } }
.lb-card { width: min(100%, 400px); display: grid; justify-items: center; gap: 10px; position: relative; }
.lb-photo { width: 100%; }
.lb-photo img { width: 100%; max-height: 62vh; object-fit: cover; aspect-ratio: 2 / 3; }
.lb-name { margin: 6px 0 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .24em; font-size: 13px; color: var(--muted); }
.stamp {
	position: absolute; top: 58%; left: 50%;
	transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); opacity: 0;
	padding: 10px 18px; border: 4px double currentColor;
	font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .2em; font-size: 22px;
	white-space: nowrap; text-align: center; line-height: 1.2;
	background: rgba(15, 13, 12, .55);
}
.stamp.show { animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) .25s forwards; }
@keyframes stamp { to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.stamp.no { color: var(--red); }
.stamp.yes { color: var(--accent-hi); }

/* ---------- Varios ---------- */
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; width: 100%; height: 100%; }
.toast {
	position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); z-index: 80;
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	padding: 10px 18px; background: var(--panel); border: 1px solid var(--accent-lo);
	font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hi);
	transition: opacity .3s, transform .3s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
	.stars svg { opacity: 1; transform: none; }
	.stamp { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg); }
}
