/* ==========================================================
   Tivity Minigames · núcleo (Chispi, bocadillo, premio, botones)
   ========================================================== */

.tivity-mg { position: relative; box-sizing: border-box; }
.tivity-mg *, .tivity-mg *::before, .tivity-mg *::after,
.tmg-reward, .tmg-reward *, .tmg-reward *::before, .tmg-reward *::after { box-sizing: border-box; }

.tmg-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------- Botones compartidos ---------------- */
.tmg-btn {
	display: inline-block;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 800;
	font-size: 17px;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: transform .08s, box-shadow .08s;
}
.tmg-btn-primary { background: #ffd23f; color: #1c2333 !important; box-shadow: 0 4px 0 #c99a00; }
.tmg-btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #c99a00; }
.tmg-btn-ghost { background: transparent; color: inherit !important; box-shadow: inset 0 0 0 2px currentColor; opacity: .85; }
.tmg-btn:focus-visible { outline: 3px solid #2f7bff; outline-offset: 3px; }

/* ---------------- Chispi ---------------- */
.tmg-chispi {
	--tmg-ch-size: 84px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.tmg-chispi.tmg-layout-column { flex-direction: column; align-items: center; text-align: center; }

.tmg-ch-avatar {
	flex: 0 0 var(--tmg-ch-size);
	width: var(--tmg-ch-size);
	height: var(--tmg-ch-size);
	position: relative;
}
.tmg-ch-svg { width: 100%; height: 100%; overflow: visible; display: block; }

.tmg-ch-star { stroke: #d6a520; stroke-width: 9; stroke-linejoin: round; }
.tmg-ch-arm path { fill: none; stroke: #d6a520; stroke-width: 8.5; stroke-linecap: round; }
.tmg-ch-hl { fill: #fff; opacity: .5; }
.tmg-ch-cheek { fill: #ffa86b; opacity: .85; }
.tmg-ch-eye ellipse { fill: #2a1d14; }
.tmg-ch-shiny { fill: #fff; }
.tmg-ch-smile { fill: #7a2a2a; }
.tmg-ch-o { fill: #7a2a2a; opacity: 0; }
.tmg-ch-spark { fill: #fff; }
.tmg-ch-spark.s2 { fill: #fff6c2; }
.tmg-ch-spark.s4 { fill: #fff6c2; }

/* Orígenes de transformación */
.tmg-ch-body, .tmg-ch-eye, .tmg-ch-smile, .tmg-ch-o, .tmg-ch-spark, .tmg-ch-glow, .tmg-ch-arm, .tmg-ch-bit {
	transform-box: fill-box;
}
.tmg-ch-body { transform-origin: 50% 60%; }
.tmg-ch-eye { transform-origin: 50% 50%; transition: transform .07s; }
.tmg-ch-smile { transform-origin: 50% 0%; transition: transform .06s; }
.tmg-ch-o { transform-origin: 50% 50%; }
.tmg-ch-spark, .tmg-ch-glow { transform-origin: 50% 50%; }
.tmg-ch-arm-l { transform-origin: 100% 100%; }
.tmg-ch-arm-r { transform-origin: 0% 100%; }
.tmg-ch-face, .tmg-ch-pupil { transition: transform .28s cubic-bezier(.3, 1.4, .5, 1); }

/* Parpadeo */
.tmg-blink .tmg-ch-eye { transform: scaleY(.1); }

/* ----- Brillo ----- */
.tmg-ch-glow, .tmg-ch-sparkles, .tmg-ch-shine { display: none; }
.tmg-glow-on .tmg-ch-glow { display: inline; animation: tmg-glow 2.6s ease-in-out infinite; }
.tmg-glow-on .tmg-ch-sparkles { display: inline; }
.tmg-glow-on .tmg-ch-shine { display: inline; animation: tmg-shine 4.8s ease-in-out infinite; }
.tmg-glow-on .tmg-ch-svg { filter: drop-shadow(0 0 6px rgba(255, 214, 74, .75)); animation: tmg-halo 2.6s ease-in-out infinite; }
.tmg-ch-spark { animation: tmg-twinkle 2.2s ease-in-out infinite; }
.tmg-ch-spark.s2 { animation-delay: .7s; }
.tmg-ch-spark.s3 { animation-delay: 1.3s; }
.tmg-ch-spark.s4 { animation-delay: 1.8s; }

@keyframes tmg-glow { 0%, 100% { transform: scale(.82); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
@keyframes tmg-halo {
	0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 214, 74, .55)); }
	50% { filter: drop-shadow(0 0 12px rgba(255, 230, 120, .95)); }
}
@keyframes tmg-shine { 0%, 55% { transform: translateX(0); } 85%, 100% { transform: translateX(260px); } }
@keyframes tmg-twinkle {
	0%, 100% { transform: scale(.35) rotate(0deg); opacity: .25; }
	50% { transform: scale(1.1) rotate(45deg); opacity: 1; }
}

/* ----- Estados de ánimo ----- */
.tmg-ch-avatar[data-mood="idle"] .tmg-ch-body { animation: tmg-float 3.2s ease-in-out infinite; }
.tmg-ch-avatar.tmg-talking[data-mood="idle"] .tmg-ch-body { animation: tmg-talkbob .34s ease-in-out infinite alternate; }
@keyframes tmg-float {
	0%, 100% { transform: translateY(0) rotate(-3deg); }
	50% { transform: translateY(-5px) rotate(3deg); }
}
@keyframes tmg-talkbob { from { transform: translateY(0) scale(1); } to { transform: translateY(-2px) scale(1.03, .98); } }

/* Contenta: saltitos y saludo */
.tmg-ch-avatar[data-mood="happy"] .tmg-ch-body { animation: tmg-hop .45s ease-out 3; }
.tmg-ch-avatar[data-mood="happy"] .tmg-ch-arm-l { animation: tmg-wave-l .3s ease-in-out 6 alternate; }
.tmg-ch-avatar[data-mood="happy"] .tmg-ch-arm-r { animation: tmg-wave-r .3s ease-in-out 6 alternate; }
@keyframes tmg-hop {
	0%, 100% { transform: translateY(0) scale(1); }
	30% { transform: translateY(0) scale(1.08, .9); }
	60% { transform: translateY(-12px) scale(.95, 1.06); }
}
@keyframes tmg-wave-l { to { transform: rotate(-28deg); } }
@keyframes tmg-wave-r { to { transform: rotate(28deg); } }

/* ¡Ups!: se inclina, tiembla y pone boca de "o" */
.tmg-ch-avatar[data-mood="oops"] .tmg-ch-body { animation: tmg-oops .6s ease-in-out; transform: rotate(-8deg); }
.tmg-ch-avatar[data-mood="oops"] .tmg-ch-smile { opacity: 0; }
.tmg-ch-avatar[data-mood="oops"] .tmg-ch-o { opacity: 1; animation: tmg-o .5s ease-in-out infinite alternate; }
.tmg-ch-avatar[data-mood="oops"] .tmg-ch-arm-l { transform: rotate(40deg); transition: transform .2s; }
.tmg-ch-avatar[data-mood="oops"] .tmg-ch-arm-r { transform: rotate(-40deg); transition: transform .2s; }
@keyframes tmg-oops {
	0% { transform: rotate(0); }
	20% { transform: rotate(-12deg) translateX(-3px); }
	40% { transform: rotate(6deg) translateX(3px); }
	60% { transform: rotate(-10deg) translateX(-2px); }
	100% { transform: rotate(-8deg); }
}
@keyframes tmg-o { to { transform: scale(1.2, .8); } }

/* ¡Fiesta!: salto con giro, brazos arriba y destellos */
.tmg-ch-avatar[data-mood="celebrate"] .tmg-ch-body { animation: tmg-spin 1s cubic-bezier(.3, 1.3, .5, 1), tmg-float 1.6s ease-in-out 1s infinite; }
.tmg-ch-avatar[data-mood="celebrate"] .tmg-ch-arm-l { animation: tmg-wave-l .22s ease-in-out infinite alternate; }
.tmg-ch-avatar[data-mood="celebrate"] .tmg-ch-arm-r { animation: tmg-wave-r .22s ease-in-out infinite alternate; }
.tmg-ch-avatar[data-mood="celebrate"] .tmg-ch-glow { animation-duration: .9s; }
@keyframes tmg-spin {
	0% { transform: translateY(0) rotate(0) scale(1); }
	40% { transform: translateY(-18px) rotate(200deg) scale(1.12); }
	100% { transform: translateY(0) rotate(360deg) scale(1); }
}
.tmg-ch-bit { animation: tmg-bit 1.1s ease-out forwards; opacity: 0; }
@keyframes tmg-bit {
	0% { transform: translate(0, 0) scale(.2) rotate(0); opacity: 1; }
	100% { transform: translate(var(--tx), var(--ty)) scale(.7) rotate(180deg); opacity: 0; }
}

/* Escuchando / atenta: se inclina hacia delante */
.tmg-ch-avatar[data-mood="listen"] .tmg-ch-body { animation: tmg-listen 1.4s ease-in-out infinite alternate; }
@keyframes tmg-listen { from { transform: rotate(-6deg) scale(1.02); } to { transform: rotate(-10deg) scale(1.05); } }

/* Pensando */
.tmg-ch-avatar[data-mood="think"] .tmg-ch-body { animation: tmg-float 4s ease-in-out infinite; }
.tmg-ch-avatar[data-mood="think"] .tmg-ch-smile { transform: scale(.55, .5); }



/* ----- Marea (hermana de Chispi): tonos de mar y pelo de espuma ----- */
.tmg-skin-marea .tmg-ch-star { stroke: #1f86bf; }
.tmg-skin-marea .tmg-ch-arm path { stroke: #1f86bf; }
.tmg-skin-marea .tmg-ch-cheek { fill: #ff9fb5; }
.tmg-skin-marea .tmg-ch-eye ellipse { fill: #10324a; }
.tmg-skin-marea .tmg-ch-smile, .tmg-skin-marea .tmg-ch-o { fill: #8a2f4a; }
.tmg-skin-marea .tmg-ch-spark { fill: #e8fbff; }
.tmg-ch-foam { fill: #ffffff; stroke: #bfe9fb; stroke-width: 1.6; }
.tmg-ch-foam.f1 { fill: #f4fcff; }
.tmg-ch-foam.f2 { fill: #e9f8ff; }
.tmg-ch-hair { transform-box: fill-box; transform-origin: 50% 100%; animation: tmg-hair 2.8s ease-in-out infinite; }
@keyframes tmg-hair { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.04, .97); } }
.tmg-ch-bubble { fill: rgba(255, 255, 255, .85); transform-box: fill-box; transform-origin: 50% 50%; animation: tmg-bubble 3s ease-in infinite; }
.tmg-ch-bubble.b2 { animation-delay: 1s; }
.tmg-ch-bubble.b3 { animation-delay: 2s; }
@keyframes tmg-bubble { 0% { transform: translateY(14px) scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-16px) scale(1.1); opacity: 0; } }
.tmg-glow-on .tmg-skin-marea .tmg-ch-svg { animation-name: tmg-halo-marea; }
@keyframes tmg-halo-marea {
	0%, 100% { filter: drop-shadow(0 0 4px rgba(120, 220, 255, .55)); }
	50% { filter: drop-shadow(0 0 12px rgba(170, 235, 255, .95)); }
}

/* ----- Personaje con imagen propia ----- */
.tmg-ch-custom .tmg-ch-fx { position: absolute; inset: 0; }
.tmg-ch-imgbody { position: absolute; inset: 6%; }
.tmg-ch-img {
	display: block; width: 100%; height: 100%; object-fit: contain;
	transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
	-webkit-user-drag: none; user-select: none;
}
.tmg-glow-on .tmg-ch-img { filter: drop-shadow(0 0 6px rgba(255, 214, 74, .7)); }
.tmg-glow-on.tmg-chispi .tmg-ch-custom .tmg-ch-svg { filter: none; animation: none; }

/* ----- Bocadillo ----- */
.tmg-ch-bubble {
	position: relative;
	flex: 1;
	min-height: 48px;
	padding: 10px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .96);
	color: #1c2333;
	font-size: 16px;
	line-height: 1.4;
	cursor: pointer;
	margin-top: calc(var(--tmg-ch-size) * .12);
}
.tmg-ch-bubble::before {
	content: ""; position: absolute; left: -8px; top: 18px;
	border: 8px solid transparent; border-left: 0; border-right-color: inherit;
	border-right-color: rgba(255, 255, 255, .96);
}
.tmg-layout-column .tmg-ch-bubble { margin-top: 2px; width: 100%; }
.tmg-layout-column .tmg-ch-bubble::before {
	left: 50%; top: -8px; margin-left: -8px;
	border: 8px solid transparent; border-top: 0; border-bottom-color: rgba(255, 255, 255, .96);
}
.tmg-ch-bubble.tmg-tone-bad { background: #ffe1dc; }
.tmg-ch-bubble.tmg-tone-bad::before { border-right-color: #ffe1dc; }
.tmg-layout-column .tmg-ch-bubble.tmg-tone-bad::before { border-right-color: transparent; border-bottom-color: #ffe1dc; }
.tmg-ch-bubble.tmg-tone-good { background: #e3ffe9; }
.tmg-ch-bubble.tmg-tone-good::before { border-right-color: #e3ffe9; }
.tmg-layout-column .tmg-ch-bubble.tmg-tone-good::before { border-right-color: transparent; border-bottom-color: #e3ffe9; }
.tmg-ch-bubble.tmg-pop { animation: tmg-pop .25s ease-out; }
@keyframes tmg-pop { 0% { transform: scale(.94); opacity: .6; } 100% { transform: scale(1); opacity: 1; } }
.tmg-caret {
	display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px;
	background: currentColor; animation: tmg-caret .6s steps(1) infinite;
}
@keyframes tmg-caret { 50% { opacity: 0; } }

/* ---------------- Ventana de premio ---------------- */
.tmg-reward {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(5, 15, 35, .72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity .3s;
	font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
	overflow: hidden;
}
.tmg-reward.tmg-open { opacity: 1; }
.tmg-reward-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 100%;
	overflow-y: auto;
	padding: 22px 20px 18px;
	border-radius: 24px;
	background: linear-gradient(180deg, #13305e 0%, #0b1d3a 100%);
	color: #fff;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 0 3px rgba(255, 210, 63, .5);
	transform: scale(.85) translateY(20px);
	transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
.tmg-reward.tmg-open .tmg-reward-card { transform: none; }
.tmg-reward-title { margin: 0 0 8px; font-size: 24px; font-weight: 900; color: #ffd23f; line-height: 1.2; }
.tmg-reward-chispi .tmg-ch-bubble { text-align: left; cursor: default; }
.tmg-reward-img img { max-width: 70%; max-height: 180px; margin: 14px auto 0; display: block; border-radius: 12px; }
.tmg-reward-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.tmg-reward-count { margin: 10px 0 0; font-size: 14px; opacity: .75; min-height: 1em; }

.tmg-confetti { position: absolute; inset: 0; pointer-events: none; }
.tmg-confetti i {
	position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px;
	animation: tmg-fall 3s linear infinite;
}
@keyframes tmg-fall {
	0% { transform: translateY(0) rotate(0); opacity: 1; }
	100% { transform: translateY(110vh) rotate(var(--r)); opacity: .8; }
}

@media (max-width: 420px) {
	.tmg-ch-bubble { font-size: 15px; }
	.tmg-reward-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
	.tmg-chispi *, .tmg-reward * { animation: none !important; transition: none !important; }
}

/* ---------------- Galería de pruebas [tivity_probar_juegos] ---------------- */
.tmg-showcase { max-width: 1100px; margin: 0 auto; font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif; }
.tmg-showcase *, .tmg-sc-modal, .tmg-sc-modal * { box-sizing: border-box; }
.tmg-sc-head { text-align: center; margin-bottom: 18px; }
.tmg-sc-head h2 { margin: 0 0 6px; }
.tmg-sc-head p { margin: 0; opacity: .8; }
.tmg-sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tmg-sc-card {
	position: relative; display: flex; flex-direction: column; gap: 8px;
	padding: 20px 18px 18px; border-radius: 20px;
	background: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .1), transparent 60%), #0b1d3a;
	color: #fff; box-shadow: 0 10px 26px rgba(11, 29, 58, .25);
	overflow: hidden;
}
.tmg-sc-card::after {
	content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 214, 74, .35), transparent 70%);
	pointer-events: none;
}
.tmg-sc-label {
	align-self: flex-start; padding: 3px 10px; border-radius: 999px;
	background: rgba(255, 210, 63, .18); color: #ffd23f; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}
.tmg-sc-card h3 { margin: 2px 0 0; font-size: 21px; line-height: 1.2; color: #fff; }
.tmg-sc-card p { margin: 0; flex: 1; font-size: 15px; line-height: 1.45; opacity: .85; }
.tmg-sc-card .tmg-btn { align-self: flex-start; margin-top: 6px; }
.tmg-sc-septima-ola::after { background: radial-gradient(circle, rgba(120, 220, 255, .35), transparent 70%); }
.tmg-sc-barcas-casa::after { background: radial-gradient(circle, rgba(255, 243, 176, .35), transparent 70%); }

/* Ventana a pantalla completa con el juego */
.tmg-sc-lock, .tmg-sc-lock body { overflow: hidden !important; }
.tmg-sc-modal {
	position: fixed; inset: 0; z-index: 99990;
	display: flex; flex-direction: column;
	background: rgba(5, 12, 28, .96);
	opacity: 0; transition: opacity .25s;
}
.tmg-sc-modal.tmg-open { opacity: 1; }
.tmg-sc-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 14px; color: #fff; font-size: 16px;
	padding-top: max(10px, env(safe-area-inset-top));
}
.tmg-sc-close { padding: 8px 18px; font-size: 15px; }
.tmg-sc-body { flex: 1; overflow-y: auto; padding: 0 10px 20px; -webkit-overflow-scrolling: touch; }
.tmg-sc-body > .tivity-mg { margin-top: 0; }

/* ==========================================================
   Base compartida de los minijuegos (TivityMG.Base)
   ========================================================== */
.tmg-base {
	--tmg-bg: #1C2736;
	--tmg-text: #F7EED9;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 600px;
	margin: 0 auto;
	padding: 14px;
	border-radius: 22px;
	overflow: hidden;
	background: radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .08), transparent 60%), var(--tmg-bg);
	color: var(--tmg-text);
	font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
	line-height: 1.4;
	outline: none;
	user-select: none;
	-webkit-user-select: none;
}
.tmg-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; font-weight: 800; }
.tmg-hud-title { font-size: 17px; }
.tmg-hud-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tmg-dots { display: inline-flex; gap: 6px; }
.tmg-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); }
.tmg-dots i.on { background: #F9D87B; border-color: #F9D87B; box-shadow: 0 0 8px #F9D87B; }
.tmg-counter b { color: #F9D87B; }
.tmg-stage { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 120px; }
.tmg-canvas { display: block; border-radius: 16px; touch-action: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .35); }
.tmg-talk .tmg-chispi { min-height: 70px; }
.tmg-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 8px; }
.tmg-btn.tmg-held { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 #c99a00, 0 0 24px #F9D87B; }

/* Panel sobre la escena */
.tmg-panel {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96);
	width: min(94%, 460px); max-height: 94%; overflow-y: auto; z-index: 3;
	padding: 16px 18px; border-radius: 18px;
	background: rgba(15, 26, 38, .92);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	box-shadow: 0 0 0 2px rgba(249, 216, 123, .35);
	opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
	font-size: 15px; text-align: left;
}
.tmg-panel.tmg-on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.tmg-panel h3 { margin: 0 0 6px; font-size: 19px; color: #F9D87B; }
.tmg-panel p { margin: 0 0 10px; }
.tmg-panel p:last-child { margin-bottom: 0; }
.tmg-stage:has(> .tmg-panel.tmg-on):not(:has(> .tmg-canvas)) { min-height: 220px; }

/* Pregunta escrita */
.tmg-ask-prompt { font-weight: 700; font-size: 16px; }
.tmg-ask-row { display: flex; gap: 8px; }
.tmg-ask-row input {
	flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .35);
	background: #fff; color: #1c2333; font: inherit; font-size: 18px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.tmg-ask-row input:focus { outline: none; border-color: #F9D87B; box-shadow: 0 0 0 3px rgba(249, 216, 123, .35); }
.tmg-ask-row .tmg-btn { padding: 10px 16px; font-size: 15px; white-space: nowrap; }
.tmg-ask-msg { min-height: 1.2em; color: #ffb3a7; font-weight: 700; margin: 8px 0 0 !important; }
.tmg-hint { margin-top: 8px; border-radius: 10px; background: rgba(255, 255, 255, .08); padding: 6px 10px; }
.tmg-hint summary { cursor: pointer; font-weight: 700; color: #F9D87B; }
.tmg-hint p { margin: 6px 0 2px !important; }

/* Llegada al punto */
.tmg-gate-dist { font-weight: 800; color: #F9D87B; }

/* Destello de pantalla */
.tmg-flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 99999; mix-blend-mode: screen; }
.tmg-flash.tmg-on { animation: tmg-flash var(--tmg-flash-ms, .38s) ease-out; }
@keyframes tmg-flash { 0% { opacity: .75; } 100% { opacity: 0; } }
.tmg-shake { animation: tmg-shake .4s; }
@keyframes tmg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Barra de progreso genérica */
.tmg-bar { position: relative; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.tmg-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #d9a41e, #F9D87B); box-shadow: 0 0 10px rgba(249, 216, 123, .7); transition: width .3s; }

/* Elementos arrastrables (DOM) */
.tmg-drag { touch-action: none; cursor: grab; user-select: none; -webkit-user-drag: none; }
.tmg-drag.tmg-dragging { cursor: grabbing; z-index: 5; }

@media (max-width: 420px) {
	.tmg-base { padding: 10px; border-radius: 16px; }
	.tmg-panel { padding: 12px 14px; font-size: 14px; }
}
