.ssw-app {
	--ssw-accent: #e63b5a;
	--ssw-bg: #1a1a1a;
	--ssw-fg: #fff;
	--ssw-muted: rgba(255, 255, 255, .65);
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	min-height: 620px;
	margin: 0 auto;
	padding: 24px 20px;
	background: var(--ssw-bg);
	color: var(--ssw-fg);
	border-radius: 20px;
	font-family: inherit;
	line-height: 1.4;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}
.ssw-app *, .ssw-app *::before, .ssw-app *::after { box-sizing: border-box; }
.ssw-app [hidden] { display: none !important; }

.ssw-view { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 570px; gap: 14px; }
.ssw-title { margin: 0; color: var(--ssw-fg); font-size: 1.6rem; line-height: 1.2; }
.ssw-sub { margin: 0; color: var(--ssw-muted); font-size: 1rem; }
.ssw-hint { margin: 0; color: var(--ssw-muted); font-size: .85rem; }
.ssw-loading { color: var(--ssw-muted); }

.ssw-legend { display: flex; gap: 28px; font-weight: 700; font-size: 1.1rem; }
.ssw-legend-no { color: #ff6b6b; }
.ssw-legend-yes { color: #4cd98a; }

/* Botones */
.ssw-app .ssw-btn {
	appearance: none; border: 2px solid transparent; cursor: pointer;
	padding: 14px 32px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1rem;
	transition: transform .15s ease, opacity .15s ease;
	width: 100%; max-width: 320px;
}
.ssw-app .ssw-btn:active { transform: scale(.97); }
.ssw-app .ssw-btn-primary { background: var(--ssw-accent); color: #fff; }
.ssw-app .ssw-btn-ghost { background: transparent; color: var(--ssw-fg); border-color: rgba(255, 255, 255, .35); }

/* Formulario */
.ssw-view[data-view="form"] { justify-content: flex-start; }
.ssw-form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.ssw-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--ssw-muted); }
.ssw-form input[type="text"], .ssw-form input[type="email"], .ssw-form input[type="tel"],
.ssw-form input[type="date"], .ssw-form select {
	width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(255, 255, 255, .08); color: var(--ssw-fg); font: inherit; font-size: 16px; min-height: 44px;
}
.ssw-form select option { color: #000; }
.ssw-form input:focus, .ssw-form select:focus { outline: 2px solid var(--ssw-accent); outline-offset: 1px; }
.ssw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ssw-form .ssw-check { flex-direction: row; align-items: flex-start; gap: 10px; line-height: 1.35; }
.ssw-form .ssw-check input { margin-top: 3px; flex: none; accent-color: var(--ssw-accent); }
.ssw-form .ssw-check a { color: var(--ssw-fg); text-decoration: underline; }
.ssw-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ssw-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 107, 107, .18); color: #ffb3b3; font-size: .9rem; }
.ssw-form .ssw-btn { align-self: center; margin-top: 6px; }

/* Baraja */
.ssw-view-deck { justify-content: flex-start; gap: 12px; }
.ssw-topbar { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.ssw-progress { color: var(--ssw-muted); font-size: .9rem; font-weight: 600; }
.ssw-app .ssw-mute { appearance: none; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }

.ssw-stack { position: relative; width: 100%; height: min(60vh, 440px); min-height: 340px; touch-action: pan-y; }
.ssw-card {
	position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
	background: #2a2a2a center / cover no-repeat;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
	transition: transform .25s ease;
	touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
	transform-origin: 50% 100%;
}
.ssw-card.ssw-dragging { transition: none; cursor: grabbing; }
.ssw-card.ssw-gone { pointer-events: none; }
.ssw-card-info {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, 0));
	text-align: left;
}
.ssw-card-title { margin: 0; font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.15; }
.ssw-card-sub { margin: 4px 0 0; font-size: .95rem; color: rgba(255, 255, 255, .75); }
.ssw-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; opacity: .25; }

/* Vídeo de YouTube como fondo de la tarjeta */
.ssw-media { position: absolute; inset: 0; overflow: hidden; background: #111; pointer-events: none; }
.ssw-poster {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transform: scale(1.34); /* hqdefault es 4:3 con bandas negras: las recortamos */
	user-select: none; -webkit-user-drag: none;
}
.ssw-poster-v { transform: none; }
.ssw-yt {
	position: absolute; top: 50%; left: 50%; width: 100%; height: 100%;
	transform: translate(-50%, -50%);
	opacity: 0; transition: opacity .45s ease;
	pointer-events: none;
}
.ssw-yt iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; pointer-events: none; }
.ssw-card.ssw-playing .ssw-yt { opacity: 1; }
.ssw-card.ssw-yt-error .ssw-yt { display: none; }
.ssw-yt-na {
	display: none; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
	padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: rgba(255, 255, 255, .8); font-size: .75rem; white-space: nowrap;
}
.ssw-card.ssw-yt-error .ssw-yt-na { display: block; }
.ssw-card-info, .ssw-stamp { z-index: 2; }
.ssw-card::after {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; z-index: 1; pointer-events: none;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
}

.ssw-app .ssw-mute.ssw-mute-attn { background: var(--ssw-accent); animation: ssw-pulse 1.4s ease-in-out infinite; }
@keyframes ssw-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }

.ssw-stamp {
	position: absolute; top: 24px; padding: 4px 14px; border: 4px solid; border-radius: 10px;
	font-weight: 900; font-size: 1.6rem; letter-spacing: 2px; opacity: 0; pointer-events: none; background: rgba(0, 0, 0, .25);
}
.ssw-stamp-like { left: 20px; color: #4cd98a; transform: rotate(-14deg); }
.ssw-stamp-nope { right: 20px; color: #ff6b6b; transform: rotate(14deg); }

.ssw-actions { display: flex; gap: 36px; padding-top: 6px; }
.ssw-app .ssw-round {
	appearance: none; width: 68px; height: 68px; border-radius: 50%; cursor: pointer; font-size: 1.9rem; line-height: 1;
	background: transparent; border: 3px solid; display: flex; align-items: center; justify-content: center; padding: 0;
	transition: transform .15s ease, background .15s ease;
}
.ssw-app .ssw-round:active { transform: scale(.92); }
.ssw-app .ssw-round-no { color: #ff6b6b; border-color: #ff6b6b; }
.ssw-app .ssw-round-no:hover { background: rgba(255, 107, 107, .15); }
.ssw-app .ssw-round-yes { color: #4cd98a; border-color: #4cd98a; }
.ssw-app .ssw-round-yes:hover { background: rgba(76, 217, 138, .15); }

@media (prefers-reduced-motion: reduce) {
	.ssw-card, .ssw-btn, .ssw-round, .ssw-yt { transition: none !important; }
	.ssw-app .ssw-mute.ssw-mute-attn { animation: none; }
}
