/* ============================================================
   XFuego — El Estudio IA (v1.9.1)
   Carta de ventas + interfaz del generador. Solo carga en la
   página con plantilla page-estudio.php. Todo bajo clases
   .xf-studio / .xf-st-* : jamás se tocan las variables :root.
   ============================================================ */

/* ── 0. Base ──────────────────────────────────────────────── */

.xf-studio {
	max-width: var(--xf-wrap);
	margin: 0 auto;
	padding: 0 24px 90px;
}

.xf-studio__section { margin-top: clamp(64px, 9vw, 110px); text-align: center; }

.xf-studio__h2 {
	font-family: var(--xf-font-display);
	font-size: clamp(1.9rem, 4vw, 3rem);
	font-weight: 600;
	line-height: 1.15;
	color: var(--xf-cream);
	margin: 14px 0 18px;
}

.xf-st-intro {
	max-width: 640px;
	margin: 0 auto 40px;
	color: var(--xf-mist);
	font-size: 1.05rem;
	line-height: 1.75;
}

.xf-st-intro--small { font-size: 0.95rem; margin-top: 26px; }
.xf-st-intro--small strong { color: var(--xf-gold); }

/* Brasas (misma receta que creadores, espacio propio) */
.xf-st-ember {
	position: absolute;
	left: var(--x);
	bottom: -12px;
	width: var(--s);
	height: var(--s);
	border-radius: 50%;
	background: radial-gradient(circle, #ffd17a, #ff7a1a 60%, transparent);
	filter: blur(0.5px);
	opacity: 0;
	animation: xf-st-ember var(--d) linear infinite;
	pointer-events: none;
}

@keyframes xf-st-ember {
	0%   { transform: translateY(0) scale(1); opacity: 0; }
	12%  { opacity: 0.9; }
	85%  { opacity: 0.25; }
	100% { transform: translateY(-420px) translateX(24px) scale(0.4); opacity: 0; }
}

.xf-st-pulse { animation: xf-st-pulse 2.6s ease-in-out infinite; }

@keyframes xf-st-pulse {
	0%, 100% { box-shadow: 0 10px 34px -10px rgba(255, 84, 17, 0.55); }
	50%      { box-shadow: 0 10px 44px -6px rgba(255, 84, 17, 0.85); }
}

/* ── 1. Hero ──────────────────────────────────────────────── */

.xf-studio__hero { position: relative; overflow: hidden; }

/* Seda de fondo del hero: imagen de ambiente muy apagada */
.xf-studio__hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/studio/hero-studio.jpg') center 30% / cover no-repeat;
	opacity: 0.5;
	-webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 96%);
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 96%);
	pointer-events: none;
}

.xf-studio__hero .xf-eyebrow,
.xf-studio__hero .xf-tube__title,
.xf-studio__hero .xf-tube__sub,
.xf-studio__hero .xf-studio__hero-actions,
.xf-studio__hero .xf-st-trust { position: relative; z-index: 1; }

.xf-studio__hero .xf-st-ember { z-index: 1; }

.xf-studio__hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 30px;
}

.xf-st-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 22px;
	list-style: none;
	padding: 0;
	margin: 28px 0 0;
}

.xf-st-trust li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--xf-mist);
}

.xf-st-trust li svg { color: var(--xf-gold); flex-shrink: 0; }
.xf-st-trust li strong { color: var(--xf-gold); }

/* ── 2. La carta ──────────────────────────────────────────── */

.xf-st-letter__box {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(30px, 4.5vw, 52px);
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius);
	background: var(--xf-grad-glass);
	box-shadow: var(--xf-shadow-card);
	text-align: left;
}

.xf-st-letter__box .xf-eyebrow { margin-bottom: 16px; }

.xf-st-letter__lead {
	font-family: var(--xf-font-display);
	font-size: 1.35rem;
	line-height: 1.45;
	color: var(--xf-cream);
}

.xf-st-letter__box p { color: var(--xf-mist); line-height: 1.8; }
.xf-st-letter__box p strong { color: var(--xf-cream); }

/* ── 3. Los seis modos ────────────────────────────────────── */

.xf-studio__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	text-align: left;
}

.xf-studio__card {
	position: relative;
	padding: 28px 26px 24px;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius);
	background: var(--xf-grad-glass);
	overflow: hidden;
	transition: transform 0.3s var(--xf-ease), border-color 0.3s var(--xf-ease), box-shadow 0.3s var(--xf-ease);
}

.xf-studio__card:hover {
	transform: translateY(-5px);
	border-color: rgba(255, 122, 26, 0.45);
	box-shadow: 0 24px 50px -24px rgba(255, 84, 17, 0.4);
}

/* Imagen de ambiente a todo lo ancho, comiéndose el padding */
.xf-studio__card-img {
	display: block;
	width: calc(100% + 52px);
	max-width: none;
	margin: -28px -26px 20px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-bottom: 1px solid rgba(255, 194, 75, 0.14);
	transition: transform 0.5s var(--xf-ease);
}

.xf-studio__card:hover .xf-studio__card-img { transform: scale(1.045); }

.xf-studio__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	background: linear-gradient(140deg, rgba(255, 122, 26, 0.2), rgba(255, 45, 120, 0.14));
	border: 1px solid rgba(255, 122, 26, 0.35);
	color: var(--xf-gold);
	margin-bottom: 16px;
}

.xf-studio__card h3 {
	font-family: var(--xf-font-display);
	font-size: 1.25rem;
	color: var(--xf-cream);
	margin: 0 0 8px;
}

.xf-studio__card p { color: var(--xf-mist); font-size: 0.95rem; line-height: 1.65; margin: 0 0 16px; }

.xf-studio__card-cost {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 13px;
	border-radius: 999px;
	background: rgba(255, 194, 75, 0.1);
	border: 1px solid rgba(255, 194, 75, 0.3);
	color: var(--xf-gold);
	font-size: 0.8rem;
	font-weight: 700;
}

/* ── 4. El Estudio: la interfaz ───────────────────────────── */

.xf-studio__section--wide { max-width: 100%; }

.xf-st-lab {
	margin-top: 44px;
	border: 1px solid rgba(255, 194, 75, 0.22);
	border-radius: calc(var(--xf-radius) + 6px);
	background:
		radial-gradient(80% 60% at 50% -10%, rgba(255, 122, 26, 0.09), transparent 70%),
		linear-gradient(170deg, #170c2b, #0e0718);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
	overflow: hidden;
	text-align: left;
}

/* Pestañas de modo */
.xf-st-lab__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	background: rgba(0, 0, 0, 0.25);
}

.xf-st-lab__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--xf-mist);
	font-family: var(--xf-font-body);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.25s var(--xf-ease), color 0.25s var(--xf-ease), border-color 0.25s var(--xf-ease);
}

.xf-st-lab__tab svg { color: var(--xf-faint); transition: color 0.25s var(--xf-ease); }

.xf-st-lab__tab:hover { color: var(--xf-cream); background: rgba(255, 255, 255, 0.05); }

.xf-st-lab__tab.is-active {
	background: linear-gradient(100deg, rgba(255, 122, 26, 0.22), rgba(255, 45, 120, 0.18));
	border-color: rgba(255, 122, 26, 0.5);
	color: var(--xf-cream);
}

.xf-st-lab__tab.is-active svg { color: var(--xf-gold); }

/* Dos columnas */
.xf-st-lab__cols {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 0;
}

.xf-st-lab__panel { padding: 26px 28px 30px; border-right: 1px solid rgba(255, 255, 255, 0.07); }

.xf-st-lab__modo-desc { color: var(--xf-mist); font-size: 0.95rem; line-height: 1.7; margin: 0 0 22px; }

.xf-st-lab__label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 20px 0 10px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--xf-gold);
}

.xf-st-lab__label:first-child { margin-top: 0; }

/* Prompt */
.xf-st-lab__promptwrap { position: relative; }

.xf-st-lab__prompt,
.xf-st-lab__neg textarea,
.xf-st-lab__pj {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius-sm);
	background: rgba(0, 0, 0, 0.35);
	color: var(--xf-cream);
	font-family: var(--xf-font-body);
	font-size: 0.95rem;
	line-height: 1.6;
	resize: vertical;
	transition: border-color 0.25s var(--xf-ease), box-shadow 0.25s var(--xf-ease);
}

.xf-st-lab__prompt:focus,
.xf-st-lab__neg textarea:focus,
.xf-st-lab__pj:focus {
	outline: none;
	border-color: rgba(255, 122, 26, 0.6);
	box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.15);
}

.xf-st-lab__prompt::placeholder,
.xf-st-lab__neg textarea::placeholder,
.xf-st-lab__pj::placeholder { color: var(--xf-faint); }

/* Texto del prompt: se tiene que LEER. Los selectores con ID ganan
   a cualquier estilo global de inputs que venga de fuera (tema padre,
   plugins) sin necesidad de !important. */
textarea#xf-st-prompt,
textarea#xf-st-negativo,
input#xf-st-personaje-nombre {
	color: #FFF7EA;
	-webkit-text-fill-color: #FFF7EA;
	caret-color: var(--xf-gold);
	background-color: rgba(4, 2, 10, 0.55);
	font-size: 16px; /* 16px mínimo: evita el zoom automático en iOS */
	font-weight: 500;
	letter-spacing: 0.01em;
}

textarea#xf-st-prompt:focus,
textarea#xf-st-negativo:focus,
input#xf-st-personaje-nombre:focus { background-color: rgba(4, 2, 10, 0.7); }

.xf-st-lab__counter {
	position: absolute;
	right: 12px;
	bottom: 10px;
	font-size: 0.72rem;
	font-weight: 700;
	color: rgba(255, 194, 75, 0.7);
	pointer-events: none;
}

/* Chips de inspiración */
.xf-st-lab__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.xf-st-lab__chips button {
	padding: 7px 14px;
	border: 1px solid var(--xf-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--xf-mist);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.25s var(--xf-ease), color 0.25s var(--xf-ease), background 0.25s var(--xf-ease);
}

.xf-st-lab__chips button:hover {
	border-color: rgba(255, 194, 75, 0.5);
	color: var(--xf-gold);
	background: rgba(255, 194, 75, 0.08);
}

/* Prompt negativo */
.xf-st-lab__neg { margin-top: 16px; }

.xf-st-lab__neg summary {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--xf-mist);
	list-style: none;
}

.xf-st-lab__neg summary::-webkit-details-marker { display: none; }
.xf-st-lab__neg summary em { color: var(--xf-faint); font-style: normal; font-weight: 500; }
.xf-st-lab__neg summary:hover { color: var(--xf-cream); }
.xf-st-lab__neg textarea { margin-top: 10px; }

/* Píldoras */
.xf-st-lab__pills { display: flex; flex-wrap: wrap; gap: 8px; }

.xf-st-lab__pills button {
	padding: 9px 18px;
	border: 1px solid var(--xf-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--xf-mist);
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.25s var(--xf-ease);
}

.xf-st-lab__pills button:hover { color: var(--xf-cream); border-color: rgba(255, 194, 75, 0.4); }

.xf-st-lab__pills button.is-active {
	background: linear-gradient(100deg, rgba(255, 122, 26, 0.25), rgba(255, 45, 120, 0.2));
	border-color: rgba(255, 122, 26, 0.55);
	color: var(--xf-cream);
}

/* Interruptor personaje consistente */
.xf-st-lab__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	cursor: pointer;
}

.xf-st-lab__toggle input { position: absolute; opacity: 0; pointer-events: none; }

.xf-st-lab__switch {
	position: relative;
	flex-shrink: 0;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--xf-line);
	transition: background 0.25s var(--xf-ease), border-color 0.25s var(--xf-ease);
}

.xf-st-lab__switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--xf-mist);
	transition: transform 0.25s var(--xf-ease), background 0.25s var(--xf-ease);
}

.xf-st-lab__toggle input:checked + .xf-st-lab__switch {
	background: linear-gradient(100deg, #ff7a1a, #ff3d6e);
	border-color: transparent;
}

.xf-st-lab__toggle input:checked + .xf-st-lab__switch::after { transform: translateX(20px); background: #fff; }

.xf-st-lab__toggle-txt { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--xf-mist); line-height: 1.5; }
.xf-st-lab__toggle-txt svg { color: var(--xf-gold); flex-shrink: 0; }
.xf-st-lab__toggle-txt strong { color: var(--xf-cream); }

.xf-st-lab__pj { margin-top: 12px; }

/* Zona de arrastre */
.xf-st-lab__ref { margin-top: 4px; }

.xf-st-drop {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	border: 2px dashed rgba(255, 194, 75, 0.3);
	border-radius: var(--xf-radius-sm);
	background: rgba(255, 194, 75, 0.04);
	color: var(--xf-mist);
	cursor: pointer;
	transition: border-color 0.25s var(--xf-ease), background 0.25s var(--xf-ease);
}

.xf-st-drop:hover { border-color: rgba(255, 194, 75, 0.6); background: rgba(255, 194, 75, 0.08); }
.xf-st-drop svg { color: var(--xf-gold); flex-shrink: 0; }
.xf-st-drop p { margin: 0; font-size: 0.88rem; line-height: 1.55; }
.xf-st-drop strong { color: var(--xf-cream); }

/* Lienzo */
.xf-st-lab__stage {
	display: flex;
	flex-direction: column;
	padding: 26px 28px 30px;
}

.xf-st-lab__canvas {
	position: relative;
	flex: 1;
	min-height: 340px;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius);
	background:
		radial-gradient(70% 55% at 50% 100%, rgba(255, 122, 26, 0.12), transparent 70%),
		linear-gradient(170deg, #150b26, #0a0512);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Seda de ambiente dentro del lienzo vacío */
.xf-st-lab__canvas::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/studio/muestra-3.jpg') center / cover no-repeat;
	opacity: 0.17;
	pointer-events: none;
}

.xf-st-lab__canvas .xf-st-ember { z-index: 1; }

.xf-st-lab__canvas-msg { position: relative; z-index: 1; text-align: center; color: var(--xf-faint); }
.xf-st-lab__canvas-msg svg { color: rgba(255, 122, 26, 0.55); margin-bottom: 10px; }
.xf-st-lab__canvas-msg p { margin: 0; font-size: 0.95rem; font-weight: 600; }

/* Coste + botón */
.xf-st-lab__coste {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 20px;
}

.xf-st-lab__coste-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	background: rgba(255, 194, 75, 0.1);
	border: 1px solid rgba(255, 194, 75, 0.35);
	color: var(--xf-cream);
	font-size: 0.92rem;
	font-weight: 600;
}

.xf-st-lab__coste-tag svg { color: var(--xf-gold); }
.xf-st-lab__coste-tag strong { color: var(--xf-gold); font-size: 1.1rem; }

.xf-st-lab__saldo {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 16px 0 0;
	font-size: 0.8rem;
	color: var(--xf-faint);
	line-height: 1.5;
}

.xf-st-lab__saldo svg { color: var(--xf-gold); flex-shrink: 0; }

/* ── 5. Galería privada ───────────────────────────────────── */

.xf-st-galeria { margin-top: 54px; }

.xf-st-galeria__head h3 {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--xf-font-display);
	font-size: 1.4rem;
	color: var(--xf-cream);
	margin: 0 0 10px;
}

.xf-st-galeria__head h3 svg { color: var(--xf-gold); }

.xf-st-galeria__head p { color: var(--xf-mist); margin: 0 0 26px; }
.xf-st-galeria__head p strong { color: var(--xf-cream); }

.xf-st-galeria__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.xf-st-galeria__item {
	position: relative;
	margin: 0;
	border-radius: var(--xf-radius-sm);
	overflow: hidden;
	border: 1px solid var(--xf-line);
	aspect-ratio: 4 / 5;
	transition: transform 0.3s var(--xf-ease), border-color 0.3s var(--xf-ease);
}

.xf-st-galeria__item:hover { transform: translateY(-4px); border-color: rgba(255, 122, 26, 0.45); }

.xf-st-galeria__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.xf-st-galeria__item figcaption {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(5, 2, 10, 0.72);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 194, 75, 0.3);
	color: var(--xf-gold);
	font-size: 0.72rem;
	font-weight: 700;
}

.xf-st-galeria__nota { margin-top: 16px; font-size: 0.8rem; color: var(--xf-faint); }

/* ── 6. Prompts de ejemplo ────────────────────────────────── */

.xf-st-prompts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	text-align: left;
}

.xf-st-prompt {
	padding: 0 0 22px;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius);
	background: var(--xf-grad-glass);
	overflow: hidden;
	transition: transform 0.3s var(--xf-ease), border-color 0.3s var(--xf-ease);
}

.xf-st-prompt:hover { transform: translateY(-4px); border-color: rgba(255, 194, 75, 0.4); }

.xf-st-prompt__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(255, 194, 75, 0.14);
	transition: transform 0.5s var(--xf-ease);
}

.xf-st-prompt:hover .xf-st-prompt__img { transform: scale(1.045); }

.xf-st-prompt__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 122, 26, 0.12);
	border: 1px solid rgba(255, 122, 26, 0.35);
	color: var(--xf-gold);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin: 0 24px 14px;
}

.xf-st-prompt p {
	margin: 0;
	padding: 0 24px;
	font-family: var(--xf-font-display);
	font-style: italic;
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--xf-cream);
}

/* ── 7. Tabla de precios ──────────────────────────────────── */

.xf-st-precios { max-width: 760px; margin: 0 auto; }

.xf-st-tabla {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius);
	overflow: hidden;
	background: var(--xf-grad-glass);
	text-align: left;
}

.xf-st-tabla th {
	padding: 14px 18px;
	background: rgba(255, 194, 75, 0.09);
	color: var(--xf-gold);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.xf-st-tabla td {
	padding: 14px 18px;
	border-top: 1px solid var(--xf-line);
	color: var(--xf-mist);
	font-size: 0.93rem;
}

.xf-st-tabla td:first-child { color: var(--xf-cream); font-weight: 600; }
.xf-st-tabla td svg { color: var(--xf-gold); vertical-align: -3px; margin-right: 6px; }
.xf-st-tabla td strong { color: var(--xf-gold); font-size: 1.02rem; }
.xf-st-tabla tbody tr { transition: background 0.25s var(--xf-ease); }
.xf-st-tabla tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

.xf-st-precios__nota { margin-top: 16px; font-size: 0.85rem; color: var(--xf-faint); }

/* ── 8. Privacidad ────────────────────────────────────────── */

.xf-st-privacidad {
	padding: clamp(34px, 5vw, 56px);
	border-radius: var(--xf-radius);
	border: 1px solid rgba(255, 194, 75, 0.25);
	background:
		radial-gradient(70% 100% at 15% -10%, rgba(157, 108, 255, 0.12), transparent 70%),
		linear-gradient(170deg, var(--xf-plum), var(--xf-coal));
	box-shadow: var(--xf-shadow-card);
}

.xf-st-privacidad__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
	margin-top: 34px;
	text-align: left;
}

.xf-st-privacidad__grid svg { color: var(--xf-gold); margin-bottom: 12px; }

.xf-st-privacidad__grid h3 {
	font-family: var(--xf-font-display);
	font-size: 1.1rem;
	color: var(--xf-cream);
	margin: 0 0 8px;
}

.xf-st-privacidad__grid p { margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--xf-mist); }

/* ── 9. Reglas del Estudio ────────────────────────────────── */

.xf-st-reglas {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	padding: clamp(30px, 4.5vw, 48px);
	border: 1px dashed rgba(255, 194, 75, 0.35);
	border-radius: var(--xf-radius);
	background: rgba(255, 194, 75, 0.03);
	text-align: left;
}

.xf-st-reglas .xf-studio__h2 { text-align: center; }
.xf-st-reglas .xf-eyebrow { display: flex; justify-content: center; }

.xf-st-reglas__list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }

.xf-st-reglas__list li {
	display: flex;
	gap: 13px;
	align-items: flex-start;
	padding: 16px 18px;
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius-sm);
	background: rgba(255, 255, 255, 0.03);
}

.xf-st-reglas__list li svg { color: var(--xf-gold); flex-shrink: 0; margin-top: 3px; }
.xf-st-reglas__list li div { color: var(--xf-mist); font-size: 0.94rem; line-height: 1.65; }
.xf-st-reglas__list li strong { color: var(--xf-cream); }

.xf-st-reglas__nota { margin: 22px 0 0; text-align: center; font-size: 0.88rem; color: var(--xf-faint); }

/* ── 10. FAQ ──────────────────────────────────────────────── */

.xf-st-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; text-align: left; }

.xf-st-faq__item {
	border: 1px solid var(--xf-line);
	border-radius: var(--xf-radius-sm);
	background: var(--xf-grad-glass);
	overflow: hidden;
	transition: border-color 0.25s var(--xf-ease);
}

.xf-st-faq__item:hover { border-color: rgba(255, 194, 75, 0.35); }

.xf-st-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 22px;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	font-size: 0.98rem;
	color: var(--xf-cream);
}

.xf-st-faq__item summary::-webkit-details-marker { display: none; }

.xf-st-faq__item summary svg {
	flex-shrink: 0;
	color: var(--xf-gold);
	transform: rotate(90deg);
	transition: transform 0.3s var(--xf-ease);
}

.xf-st-faq__item[open] summary svg { transform: rotate(-90deg); }

.xf-st-faq__item > div { padding: 0 22px 20px; }
.xf-st-faq__item > div p { margin: 0; color: var(--xf-mist); line-height: 1.75; font-size: 0.95rem; }

/* ── 11. CTA final ────────────────────────────────────────── */

.xf-studio__cta {
	position: relative;
	overflow: hidden;
	margin-top: clamp(64px, 9vw, 110px);
	padding: clamp(44px, 6vw, 72px) clamp(24px, 5vw, 60px);
	border: 1px solid rgba(255, 194, 75, 0.3);
	border-radius: calc(var(--xf-radius) + 6px);
	background:
		radial-gradient(80% 130% at 50% 120%, rgba(255, 84, 17, 0.25), transparent 70%),
		linear-gradient(170deg, var(--xf-plum), var(--xf-coal));
	box-shadow: var(--xf-shadow-card);
	text-align: center;
}

/* Seda de fondo en el cierre */
.xf-studio__cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/studio/hero-studio.jpg') center 60% / cover no-repeat;
	opacity: 0.22;
	pointer-events: none;
}

.xf-studio__cta h2,
.xf-studio__cta p,
.xf-studio__cta a { position: relative; z-index: 1; }

.xf-studio__cta .xf-st-ember { z-index: 1; }

.xf-studio__cta h2 {
	font-family: var(--xf-font-display);
	font-size: clamp(1.9rem, 4.4vw, 3.1rem);
	font-weight: 600;
	line-height: 1.2;
	color: var(--xf-cream);
	margin: 0 0 16px;
}

.xf-studio__cta > p { max-width: 520px; margin: 0 auto 28px; color: var(--xf-mist); line-height: 1.75; }

.xf-studio__cta-note { margin-top: 18px !important; font-size: 0.83rem; color: var(--xf-faint); }

.xf-st-ps {
	max-width: 560px;
	margin: 30px auto 0 !important;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.92rem;
	font-style: italic;
	color: var(--xf-mist);
}

.xf-st-ps strong { color: var(--xf-gold); font-style: normal; }

/* ── 12. Aviso flotante (apertura inminente) ──────────────── */

.xf-st-toast {
	position: fixed;
	left: 50%;
	bottom: 30px;
	transform: translate(-50%, 24px);
	z-index: 9999;
	max-width: min(440px, calc(100vw - 40px));
	padding: 16px 24px;
	border-radius: var(--xf-radius);
	border: 1px solid rgba(255, 194, 75, 0.45);
	background: linear-gradient(160deg, #241235, #150a24);
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85);
	color: var(--xf-mist);
	font-size: 0.92rem;
	line-height: 1.6;
	opacity: 0;
	transition: opacity 0.45s var(--xf-ease), transform 0.45s var(--xf-ease);
}

.xf-st-toast strong { color: var(--xf-gold); }

.xf-st-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── 13. Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
	.xf-studio__cards { grid-template-columns: repeat(2, 1fr); }
	.xf-st-lab__cols { grid-template-columns: 1fr; }
	.xf-st-lab__panel { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
	.xf-st-lab__canvas { min-height: 300px; }
	.xf-st-galeria__grid { grid-template-columns: repeat(2, 1fr); }
	.xf-st-prompts { grid-template-columns: 1fr; }
	.xf-st-privacidad__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.xf-studio { padding: 0 18px 70px; }
	.xf-studio__cards { grid-template-columns: 1fr; }
	.xf-st-lab__tabs { flex-wrap: nowrap; overflow-x: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
	.xf-st-lab__tab { flex-shrink: 0; padding: 9px 14px; font-size: 0.82rem; }
	.xf-st-lab__panel, .xf-st-lab__stage { padding: 20px 18px 24px; }
	.xf-st-lab__coste { flex-direction: column; align-items: stretch; text-align: center; }
	.xf-st-lab__coste .xf-btn { width: 100%; justify-content: center; }
	.xf-st-lab__coste-tag { justify-content: center; }
	.xf-st-privacidad__grid { grid-template-columns: 1fr; }
	.xf-st-tabla th, .xf-st-tabla td { padding: 11px 10px; font-size: 0.85rem; }
}

/* ── 14. Movimiento reducido ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.xf-st-ember { display: none; }
	.xf-st-pulse { animation: none; }
	.xf-studio__card,
	.xf-st-galeria__item,
	.xf-st-prompt,
	.xf-st-toast { transition: none; }
}
