/* Tarot Gratis — mesa de tiradas (v1.6). Usa los colores del tema, con valores de respaldo. */
.tm, .tm-dlg, .tm-posiciones, .tm-vuela {
	--tm-noche: var(--wp--preset--color--noche, #0c1030);
	--tm-noche2: var(--wp--preset--color--noche-suave, #151a45);
	--tm-tinta: var(--wp--preset--color--tinta, #232a66);
	--tm-oro: var(--wp--preset--color--oro, #d6b26e);
	--tm-oro2: var(--wp--preset--color--oro-claro, #f2deb0);
	--tm-crema: var(--wp--preset--color--crema, #f8f2e4);
	--tm-texto: var(--wp--preset--color--texto, #e6e3f4);
	--tm-apagado: var(--wp--preset--color--apagado, #a7a4cc);
	--tm-serif: var(--wp--preset--font-family--titulos, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif);
	--tm-inv: #c9a3d9;
	--tt-noche: var(--tm-noche); --tt-oro: var(--tm-oro); --tt-oro2: var(--tm-oro2); --tt-crema: var(--tm-crema); --tt-texto: var(--tm-texto); --tt-apagado: var(--tm-apagado); --tt-serif: var(--tm-serif);
}
.tm { max-width: 980px; margin: 1.5rem auto 0; color: var(--tm-texto); scroll-margin-top: 90px; }
.tm *, .tm-dlg * { box-sizing: border-box; }
.tm-panel {
	position: relative; text-align: center;
	background: linear-gradient(180deg, rgba(35, 42, 102, .55), rgba(21, 26, 69, .7));
	border: 1px solid rgba(214, 178, 110, .28); border-radius: 24px;
	padding: clamp(1.1rem, 3.5vw, 2.25rem);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.tm [hidden] { display: none !important; }

/* Pestañas */
.tm-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0 0 1.25rem; }
.tm-tab { padding: .45rem 1rem; border-radius: 999px; border: 1px solid rgba(214, 178, 110, .35); background: rgba(12, 16, 48, .4); color: var(--tm-texto); font: inherit; font-size: .9rem; cursor: pointer; }
.tm-tab.tm-on { background: var(--tm-oro); border-color: var(--tm-oro); color: var(--tm-noche); font-weight: 600; }
.tm-tab:focus-visible { outline: 2px solid var(--tm-oro2); outline-offset: 2px; }

/* Rótulo */
.tm-rotulo { font-family: var(--tm-serif); font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.3; color: var(--tm-crema); margin: 0 0 1.25rem; min-height: 1.6em; }
.tm-rotulo b { color: var(--tm-oro); font-weight: 500; }
.tm-rotulo small { display: block; margin-top: .3rem; font-family: inherit; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .8rem; color: var(--tm-apagado); letter-spacing: .03em; }

/* Huecos */
.tm-huecos { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.6rem, 2.2vw, 1.6rem); --hw: 120px; }
.tm-huecos.tm-n1 { --hw: 150px; }
.tm-huecos.tm-muchos { display: grid; gap: .7rem .55rem; grid-template-columns: repeat(5, var(--hw)); justify-content: center; --hw: 84px; }
.tm-huecos.tm-n12 { grid-template-columns: repeat(6, var(--hw)); }
.tm-huecos.tm-n28 { grid-template-columns: repeat(7, var(--hw)); --hw: 72px; }
.tm-hueco { width: var(--hw); }
.tm-hueco-c {
	position: relative; width: 100%; aspect-ratio: 7 / 12; display: grid; place-items: center;
	border: 1px dashed rgba(214, 178, 110, .4); border-radius: 12px; background: rgba(12, 16, 48, .35);
	color: rgba(214, 178, 110, .45); font-family: var(--tm-serif); font-size: 1.25rem;
	transition: border-color .3s, box-shadow .3s;
}
.tm-hueco-c.tm-lleno { border: 0; background: none; }
.tm-hueco.tm-activo .tm-hueco-c { border-color: var(--tm-oro); box-shadow: 0 0 0 3px rgba(214, 178, 110, .15), 0 0 24px rgba(214, 178, 110, .25); }
.tm-hueco-n { margin-top: .5rem; font-size: .72rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .12em; color: var(--tm-oro); }
.tm-muchos .tm-hueco-n { font-size: .62rem; letter-spacing: .05em; }
.tm-inv-et { display: block; margin-top: .1rem; font-size: .64rem; letter-spacing: .08em; color: var(--tm-inv); }

/* Carta */
.tm-carta { position: relative; display: block; width: 100%; aspect-ratio: 7 / 12; perspective: 1000px; }
.tm-c-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }
.tm-vista .tm-c-in { transform: rotateY(180deg); }
.tm-cara { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.tm-dorso {
	display: grid; place-items: center;
	background:
		radial-gradient(circle at 50% 50%, transparent 0 21%, rgba(214, 178, 110, .45) 22% 23%, transparent 24%),
		repeating-linear-gradient(45deg, rgba(214, 178, 110, .09) 0 2px, transparent 2px 9px),
		repeating-linear-gradient(-45deg, rgba(214, 178, 110, .09) 0 2px, transparent 2px 9px),
		linear-gradient(160deg, #2a3278, #121640);
	border: 2px solid var(--tm-oro, #d6b26e); outline: 1px solid rgba(214, 178, 110, .5); outline-offset: -6px;
}
.tm-dorso svg { width: 34%; color: var(--tm-oro, #d6b26e); opacity: .9; }
.tm-frente {
	transform: rotateY(180deg); container-type: inline-size;
	background: radial-gradient(ellipse at 50% 45%, rgba(214, 178, 110, .2), transparent 65%), linear-gradient(170deg, #fbf5e6, #ecdcb4);
	border: 2px solid var(--tm-oro, #d6b26e); color: #2a2148;
}
.tm-frente::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(160, 125, 60, .55); border-radius: 6px; }
.tm-f { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 10% 6% 9%; }
.tm-inv .tm-f { transform: rotate(180deg); }
.tm-num { font-family: var(--tm-serif, Georgia, serif); font-size: 13cqw; letter-spacing: .08em; line-height: 1; color: #8a6a2e; }
.tm-emb { width: 66%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(160, 125, 60, .55); background: radial-gradient(circle, rgba(214, 178, 110, .28), transparent 70%); }
.tm-emb svg { width: 74%; height: 74%; color: #33285f; }
.tm-emb.tm-emb-menor { width: 82%; aspect-ratio: 60 / 80; border: 0; border-radius: 0; background: none; flex: 1; margin: 4% 0; min-height: 0; }
.tm-emb.tm-emb-menor svg { width: 100%; height: 100%; }
.tm-nom { font-family: var(--tm-serif, Georgia, serif); font-size: 10cqw; line-height: 1.15; text-transform: uppercase; letter-spacing: .05em; text-align: center; color: #2a2148; padding: 0 4%; }

/* Mesa: pila, abanico y tira */
.tm-mesa { position: relative; height: 320px; margin: 1.5rem auto .25rem; max-width: 900px; }
.tm-msg { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; color: var(--tm-apagado); font-size: .95rem; }
.tm-desliza { display: none; margin: .25rem 0 0; font-size: .8rem; color: var(--tm-apagado); }
.tm-pila { position: absolute; left: 50%; top: 40px; width: 90px; margin-left: -45px; }
.tm-naipe { padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; font: inherit; }
.tm-pila .tm-naipe { position: absolute; left: 0; top: 0; width: 90px; transition: transform .25s ease; cursor: default; }
.tm-arco .tm-naipe { position: absolute; left: 50%; top: 28px; width: 86px; margin-left: -43px; transition: transform .55s cubic-bezier(.25, .8, .3, 1), opacity .35s; }
.tm-n28 ~ .tm-mesa .tm-arco .tm-naipe, .tm-mesa.tm-peq .tm-arco .tm-naipe { width: 74px; margin-left: -37px; }
.tm-naipe .tm-cara { box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.tm-abierta .tm-naipe:hover .tm-dorso, .tm-abierta .tm-naipe:focus-visible .tm-dorso { box-shadow: 0 0 0 2px var(--tm-oro2), 0 12px 28px rgba(214, 178, 110, .4); }
.tm-naipe:focus-visible { outline: none; }
.tm-naipe.tm-fuera { opacity: 0; pointer-events: none; }
.tm-cerrada .tm-naipe { pointer-events: none; opacity: .25; }
.tm-abierta .tm-pila { display: none; }
.tm-vuela { position: fixed; z-index: 9990; pointer-events: none; transition: left .6s cubic-bezier(.3, .75, .25, 1), top .6s cubic-bezier(.3, .75, .25, 1), width .6s cubic-bezier(.3, .75, .25, 1), transform .6s cubic-bezier(.3, .75, .25, 1); }

/* Botonera y aviso */
.tm-botonera { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1rem; }
.tm-botonera .tt-btn { min-width: 160px; }
.tm-botonera .tt-btn[disabled] { opacity: .4; cursor: default; transform: none; box-shadow: none; }
.tm-aviso { margin: 1.1rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--tm-apagado); }
.tm-aviso svg { vertical-align: -2px; margin-right: .3rem; }

/* Ventana del tema */
.tm-dlg {
	width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; margin: auto;
	padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--tm-oro); border-radius: 22px;
	background: radial-gradient(ellipse at top, rgba(214, 178, 110, .16), transparent 60%), #151a45;
	color: var(--tm-texto); text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
	animation: tm-entra .35s cubic-bezier(.2, .8, .3, 1) both;
}
.tm-dlg::backdrop { background: rgba(5, 7, 25, .75); backdrop-filter: blur(3px); }
@keyframes tm-entra { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.tm-dlg-x { position: absolute; top: .5rem; right: .7rem; width: 40px; height: 40px; border: 0; background: none; color: var(--tm-apagado); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.tm-dlg-tit { font-family: var(--tm-serif); font-size: 1.6rem; line-height: 1.25; color: var(--tm-crema); margin: 0 0 .25rem; }
.tm-dlg-sub { margin: 0 0 1.1rem; font-size: .92rem; color: var(--tm-apagado); }
.tm-temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.tm-tema { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .85rem .4rem; border-radius: 14px; border: 1px solid rgba(214, 178, 110, .3); background: rgba(12, 16, 48, .45); color: var(--tm-crema); font: inherit; font-size: .92rem; cursor: pointer; }
.tm-tema svg { width: 26px; height: 26px; color: var(--tm-oro); }
.tm-tema.tm-on { border-color: var(--tm-oro); background: rgba(214, 178, 110, .14); }
.tm-subs { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin: 1rem 0 0; }
.tm-subs:empty { display: none; }
.tm-subs-t { width: 100%; margin: 0 0 .1rem; font-size: .88rem; color: var(--tm-apagado); }
.tm-subs-t span { opacity: .75; }
.tm-sub { padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(214, 178, 110, .35); background: none; color: var(--tm-texto); font: inherit; font-size: .88rem; cursor: pointer; }
.tm-sub.tm-on { background: var(--tm-oro); border-color: var(--tm-oro); color: var(--tm-noche); font-weight: 600; }
.tm-tema:focus-visible, .tm-sub:focus-visible, .tm-dlg-x:focus-visible { outline: 2px solid var(--tm-oro2); outline-offset: 2px; }
.tm-nota-salud { width: 100%; margin: .3rem 0 0; font-size: .8rem; color: var(--tm-apagado); }
.tm-nac { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; border: 0; padding: 0; margin: 1.1rem 0 0; min-width: 0; }
.tm-nac legend { width: 100%; padding: 0; margin-bottom: .45rem; font-size: .9rem; color: var(--tm-apagado); }
.tm-nac .tt-sel { flex: 0 1 150px; }
.tm-signo { width: 100%; min-height: 1.3em; margin: .2rem 0 0; font-size: .88rem; color: var(--tm-oro2); }
.tm-preg-l { display: block; margin: .9rem 0 .35rem; font-size: .9rem; color: var(--tm-apagado); }
.tm-preg-l span { opacity: .75; }
.tm-preg { display: block; width: 100%; resize: vertical; padding: .7rem .9rem; border-radius: 12px; font: inherit; font-size: .95rem; background: rgba(12, 16, 48, .6); border: 1px solid rgba(214, 178, 110, .3); color: var(--tm-crema); }
.tm-preg:focus { outline: none; border-color: var(--tm-oro); box-shadow: 0 0 0 3px rgba(214, 178, 110, .2); }
.tm-dlg-err { margin: .6rem 0 0; color: #ffb4a8; font-size: .9rem; }
.tm-dlg-err:empty { display: none; }
.tm-dlg-acc { margin-top: 1.1rem; }
.tm-dlg-acc .tt-btn { min-width: 220px; }
.tm-dlg-tel { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(214, 178, 110, .18); font-size: .88rem; color: var(--tm-apagado); }
.tm-dlg-tel a { display: inline-flex; align-items: center; gap: .3rem; color: var(--tm-oro2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tm-dlg-tel svg { width: 14px; height: 14px; }

/* Lectura */
.tm-lectura { max-width: 700px; margin: 2rem auto 0; text-align: left; animation: tm-aparece .6s ease both; }
@keyframes tm-aparece { from { opacity: 0; transform: translateY(12px); } }
.tm-res-cab { text-align: center; margin-bottom: 1.25rem; }
.tm-res-cab h2 { margin: 0 0 .25rem; font-family: var(--tm-serif); font-weight: 500; font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.25; color: var(--tm-crema); }
.tm-meta { margin: 0; font-size: .85rem; color: var(--tm-apagado); }
.tm-meta b { color: var(--tm-oro2); font-weight: 500; }
.tm-preg-cita { margin: .6rem 0 0; font-style: italic; color: var(--tm-apagado); text-align: center; }
.tm-vision { margin-bottom: 1rem; padding: 1.1rem 1.25rem; border-radius: 16px; background: rgba(214, 178, 110, .08); border: 1px solid rgba(214, 178, 110, .3); }
.tm-vision h3 { margin: 0 0 .35rem; font-family: var(--tm-serif); font-weight: 500; font-size: 1.15rem; color: var(--tm-oro2); }
.tm-vision p, .tm-pos p { margin: 0; line-height: 1.65; }
.tm-vision strong { color: var(--tm-crema); }
.tm-pos { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(214, 178, 110, .15); }
.tm-pos .tm-carta { width: 64px; }
.tm-pos h3 { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--tm-oro); }
.tm-pos h4 { margin: .15rem 0 .35rem; font-family: var(--tm-serif); font-weight: 500; font-size: 1.2rem; line-height: 1.25; color: var(--tm-crema); }
.tm-pos h4 em { font-style: normal; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .8rem; letter-spacing: .04em; color: var(--tm-inv); }
.tm-desenlace { position: relative; display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 0; padding: 1rem; border-radius: 16px; border: 1px dashed rgba(214, 178, 110, .5); background: rgba(12, 16, 48, .35); cursor: pointer; transition: border-color .2s, background .2s; }
.tm-desenlace:hover, .tm-desenlace:focus-visible { border-color: var(--tm-oro); background: rgba(214, 178, 110, .07); outline: none; }
.tm-desenlace > .tm-carta { width: 58px; flex: none; animation: tt-respira 2.6s ease-in-out infinite; }
.tm-desenlace > .tt-candado { left: calc(1rem + 29px); }
.tm-desenlace strong { display: block; font-family: var(--tm-serif); font-weight: 500; font-size: 1.15rem; color: var(--tm-crema); }
.tm-desenlace span { font-size: .92rem; color: #c9c6e6; }
.tm-desenlace em { display: block; margin-top: .3rem; font-style: normal; font-weight: 600; font-size: .9rem; color: var(--tm-oro); }
.tm-llamada { margin-top: 1.25rem; padding: clamp(1.2rem, 4vw, 1.75rem); text-align: center; border-radius: 18px; border: 1px solid var(--tm-oro); background: radial-gradient(ellipse at top, rgba(214, 178, 110, .18), transparent 70%), rgba(12, 16, 48, .5); }
.tm-llamada-t { margin: 0 0 .3rem !important; font-family: var(--tm-serif); font-size: 1.45rem; line-height: 1.25; color: var(--tm-crema); }
.tm-llamada p { margin: 0 0 .25rem; }
.tm-compartir { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin: 1.25rem 0 0; font-size: .88rem; color: var(--tm-apagado); }
.tm-compartir button { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(214, 178, 110, .35); background: none; color: var(--tm-texto); font: inherit; font-size: .85rem; cursor: pointer; }
.tm-compartir button:hover, .tm-compartir button:focus-visible { border-color: var(--tm-oro); outline: none; }
.tm-final { margin: 1rem 0 0; text-align: center; font-size: .88rem; color: var(--tm-apagado); }
.tm-limite { max-width: 560px; margin: 0 auto; text-align: center; }
.tm-limite-c { width: 84px; margin: 0 auto; }
.tm-limite-t { margin: .75rem 0 .4rem; font-family: var(--tm-serif); font-size: 1.5rem; line-height: 1.25; color: var(--tm-crema); }
.tm .tt-ayuda { text-align: left; }

/* Lista «Las N posiciones» (texto de la página) */
.tm-posiciones { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: .8rem; }
.tm-posiciones li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid rgba(214, 178, 110, .2); background: rgba(21, 26, 69, .55); color: #c9c6e6; font-size: .97rem; line-height: 1.55; }
.tm-posiciones strong { display: block; font-family: var(--tm-serif); font-weight: 500; font-size: 1.15rem; color: var(--tm-crema); }
.tm-pos-n { display: grid; place-items: center; width: 44px; aspect-ratio: 7 / 12; border: 1px dashed rgba(214, 178, 110, .55); border-radius: 8px; font-family: var(--tm-serif); font-size: 1.1rem; color: var(--tm-oro); }
.tm-posiciones.tm-pos-muchas { grid-template-columns: 1fr 1fr; }
.tm-pos-muchas li { padding: .75rem 1rem; gap: .8rem; font-size: .92rem; }
.tm-pos-muchas .tm-pos-n { width: 34px; font-size: .95rem; }
.tm-pos-muchas strong { font-size: 1.02rem; }

/* Móvil */
@media (max-width: 640px) {
	.tm { margin-top: 1.25rem; }
	.tm-huecos { --hw: 86px; }
	.tm-huecos.tm-n1 { --hw: 130px; }
	.tm-huecos.tm-muchos { --hw: 58px; gap: .55rem .35rem; }
	.tm-huecos.tm-n12 { grid-template-columns: repeat(4, var(--hw)); --hw: 62px; }
	.tm-huecos.tm-n28 { grid-template-columns: repeat(7, var(--hw)); --hw: 40px; gap: .4rem .25rem; }
	.tm-hueco-n { font-size: .62rem; letter-spacing: .06em; }
	.tm-muchos .tm-hueco-n { font-size: .52rem; letter-spacing: .02em; overflow-wrap: anywhere; hyphens: auto; }
	.tm-muchos .tm-inv-et { font-size: .5rem; letter-spacing: 0; overflow-wrap: normal; }
	.tm-n28 .tm-hueco-n, .tm-n28 .tm-hueco-c span { display: none; }
	.tm-n28 .tm-hueco-c { border-radius: 6px; }
	.tm-n28 .tm-frente::before { inset: 2px; }
	.tm-mesa { height: auto !important; min-height: 180px; margin: 1.25rem -1.1rem .25rem; }
	.tm-msg { position: static; margin-top: .5rem; }
	.tm-msg:empty { display: none; }
	.tm-pila { position: relative; left: auto; top: auto; margin: 10px auto 0; width: 74px; height: 127px; }
	.tm-pila .tm-naipe { width: 70px; }
	.tm-tira { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 24px 20px 10px 46px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.tm-tira::-webkit-scrollbar { display: none; }
	.tm-tira .tm-naipe { position: relative; flex: 0 0 70px; width: 70px; margin-left: -26px; scroll-snap-align: center; transition: transform .25s, opacity .3s; animation: tm-repartir .45s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i) * 22ms); }
	.tm-tira .tm-naipe:active { transform: translateY(-16px); }
	.tm-tira .tm-naipe.tm-fuera { flex-basis: 0; width: 0; margin-left: 0; overflow: hidden; transition: flex-basis .35s ease .15s, width .35s ease .15s, margin .35s ease .15s, opacity .2s; }
	.tm-abierta .tm-desliza { display: block; }
	.tm-temas { grid-template-columns: repeat(3, 1fr); gap: .45rem; }
	.tm-tema { padding: .7rem .2rem; font-size: .85rem; }
	.tm-pos { grid-template-columns: 52px 1fr; gap: .8rem; }
	.tm-pos .tm-carta { width: 52px; }
	.tm-posiciones.tm-pos-muchas { grid-template-columns: 1fr; }
	.tm-llamada .tt-btn { width: 100%; max-width: 300px; }
}
@keyframes tm-repartir { from { opacity: 0; transform: translateX(-40px) rotate(-8deg); } }

@media (prefers-reduced-motion: reduce) {
	.tm *, .tm-dlg, .tm-vuela { animation: none !important; transition: none !important; }
}
