/* Organizador Twin Suns: paleta propia (dos soles), bloques con borde de carta TCG. */
.swu-ts,
.swu-ts-cabecera {
	--ts-bg: #110c09;
	--ts-surface: #1c140f;
	--ts-surface2: #271c15;
	--ts-line: #3d2c20;
	--ts-fg: #f5eadd;
	--ts-muted: #a9937e;
	--ts-sun1: #ff8a2a;
	--ts-sun2: #ffcf6b;
	--ts-ink: #1a0e05;
	--ts-ok: #86d494;
	--ts-bad: #ff7461;
	--ts-display: var(--swu-f-titulo, Barlow, system-ui, sans-serif);
	--ts-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Cabecera de la página: logo y texto centrados */
.swu-ts-cabecera {
	text-align: center;
}

.swu-ts-cabecera .wp-block-image img {
	width: min(560px, 88vw);
	height: auto;
}

.swu-ts-cabecera p {
	max-width: 46rem;
	margin-inline: auto;
	color: var(--swu-suave, #a3a9b8);
	font-size: 1.05rem;
	line-height: 1.6;
}

.swu-ts-cabecera a {
	color: var(--ts-sun2);
}

/* Contenedor */
.swu-ts {
	display: grid;
	gap: 22px;
	margin-block: 1.5rem 3rem;
	color: var(--ts-fg);
	font-family: var(--swu-f-texto, Barlow, system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.5;
}

.swu-ts *,
.swu-ts *::before,
.swu-ts *::after {
	box-sizing: border-box;
}

.swu-ts h2 {
	margin: 0;
	font-family: var(--ts-display);
	font-size: 21px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ts-fg);
}

.swu-ts h3 {
	margin: 0 0 6px;
	font-family: var(--ts-mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ts-sun2);
}

/* Borde carta TCG */
.ts-card {
	--cut: 18px;
	--cs: 7px;
	position: relative;
	padding: 1px;
	background: linear-gradient(135deg, var(--ts-sun1), var(--ts-sun2) 50%, var(--ts-sun1));
	clip-path: polygon(var(--cut) 0, calc(100% - var(--cs)) 0, 100% var(--cs), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cs) 100%, 0 calc(100% - var(--cs)), 0 var(--cut));
}

.ts-in {
	position: relative;
	display: grid;
	gap: 14px;
	min-width: 0;
	padding: 18px;
	background: var(--ts-surface);
	clip-path: polygon(calc(var(--cut) - .5px) 0, calc(100% - var(--cs) + .5px) 0, 100% calc(var(--cs) - .5px), 100% calc(100% - var(--cut) + .5px), calc(100% - var(--cut) + .5px) 100%, calc(var(--cs) - .5px) 100%, 0 calc(100% - var(--cs) + .5px), 0 calc(var(--cut) - .5px));
}

.ts-in::before {
	content: "";
	position: absolute;
	top: 0;
	left: calc(var(--cut) + 6px);
	width: 36px;
	height: 3px;
	background: var(--ts-sun1);
}

.ts-card.is-dim {
	background: linear-gradient(135deg, var(--ts-line), #5a4232 50%, var(--ts-line));
}

.ts-card.is-dim .ts-in::before {
	background: var(--ts-muted);
}

.ts-cut {
	clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

/* Controles (aislados de los estilos generales del sitio) */
.swu-ts button {
	margin: 0;
	border-radius: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
}

.swu-ts button:focus-visible,
.swu-ts input:focus-visible,
.swu-ts summary:focus-visible {
	outline: 2px solid var(--ts-sun2);
	outline-offset: -2px;
}

.swu-ts .ts-btn {
	padding: 12px 22px;
	border: 0;
	background: var(--ts-sun1);
	color: var(--ts-ink);
	font-family: var(--ts-display);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.swu-ts .ts-btn:hover:not(:disabled) {
	background: var(--ts-sun2);
}

.swu-ts .ts-btn:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.swu-ts .ts-ghost {
	padding: 10px 16px;
	border: 0;
	background: var(--ts-surface2);
	color: var(--ts-fg);
	font-size: 14px;
	font-weight: 600;
}

.swu-ts .ts-ghost:hover {
	background: var(--ts-line);
}

.swu-ts .ts-ghost.is-danger {
	color: var(--ts-bad);
}

.ts-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px 26px;
}

.ts-row--datos > .ts-field {
	flex: 1 1 240px;
}

.ts-field {
	display: grid;
	gap: 6px;
}

.ts-field--min {
	width: 140px;
}

.ts-lbl {
	font-family: var(--ts-mono);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ts-muted);
}

.ts-step {
	display: flex;
	align-items: center;
	gap: 8px;
}

.swu-ts .ts-step button {
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: var(--ts-surface2);
	font-size: 22px;
	line-height: 1;
}

.swu-ts .ts-step button:hover {
	background: var(--ts-line);
}

.ts-step output {
	min-width: 46px;
	font-family: var(--ts-display);
	font-size: 32px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.swu-ts input[type=text],
.swu-ts input[type=search],
.swu-ts input[type=number] {
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--ts-line);
	border-radius: 0;
	background: var(--ts-bg);
	color: var(--ts-fg);
	font: inherit;
	font-size: 16px;
}

.swu-ts input[type=number] {
	font-family: var(--ts-mono);
	font-variant-numeric: tabular-nums;
}

.swu-ts input::placeholder {
	color: #6f5d4d;
}

.swu-ts input:disabled {
	opacity: .7;
}

.ts-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.swu-ts .ts-seg button {
	padding: 10px 14px;
	border: 0;
	background: var(--ts-surface2);
	font-size: 14px;
	font-weight: 600;
}

.swu-ts .ts-seg button[aria-pressed="true"] {
	background: var(--ts-sun1);
	color: var(--ts-ink);
}

.ts-note {
	margin: 0;
	color: var(--ts-muted);
	font-size: 13.5px;
}

.ts-note.is-error {
	color: var(--ts-bad);
}

.ts-preview {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: 13px;
	color: var(--ts-sun2);
}

.ts-muted {
	color: var(--ts-muted);
}

/* Configuración */
.ts-names {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 8px;
}

.ts-pl {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr) 74px;
	align-items: center;
	gap: 8px;
}

.ts-pl span {
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-muted);
}

.ts-ptable {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ts-ptable div {
	padding: 8px 12px;
	background: var(--ts-surface2);
	font-family: var(--ts-mono);
	font-size: 12.5px;
}

.ts-ptable b {
	color: var(--ts-sun2);
}

/* Reglas */
.swu-ts__reglas {
	border: 1px solid var(--ts-line);
	background: var(--ts-surface);
}

.swu-ts__reglas summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	font-family: var(--ts-display);
	font-size: 18px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	list-style: none;
	cursor: pointer;
}

.swu-ts__reglas summary::-webkit-details-marker {
	display: none;
}

.swu-ts__reglas summary::after {
	content: "+";
	font-family: var(--ts-mono);
	font-size: 22px;
	color: var(--ts-sun1);
}

.swu-ts__reglas[open] summary::after {
	content: "−";
}

.swu-ts__reglas-cuerpo {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
	padding: 0 18px 18px;
}

.swu-ts__reglas ul {
	display: grid;
	gap: 5px;
	margin: 0;
	padding-left: 18px;
	font-size: 14px;
}

.ts-tag {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	font-family: var(--ts-mono);
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	vertical-align: 2px;
}

.ts-tag.is-of {
	background: rgba(134, 212, 148, .15);
	color: var(--ts-ok);
}

.ts-tag.is-ca {
	background: rgba(255, 138, 42, .15);
	color: var(--ts-sun1);
}

/* Juego */
.swu-ts__app {
	display: grid;
	gap: 22px;
}

.ts-encabezado {
	margin: 0;
	font-family: var(--ts-display);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ts-sun2);
}

.ts-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	align-items: start;
	gap: 24px;
}

.ts-col {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.ts-side {
	position: sticky;
	top: 90px;
}

@media (max-width: 880px) {
	.ts-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ts-side {
		position: static;
	}
}

.ts-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.swu-ts .ts-tab {
	padding: 9px 14px;
	border: 0;
	background: var(--ts-surface2);
	color: var(--ts-muted);
	font-family: var(--ts-mono);
	font-size: 13px;
}

.swu-ts .ts-tab[aria-pressed="true"] {
	background: var(--ts-fg);
	color: var(--ts-ink);
}

.ts-tab.is-info {
	cursor: default;
}

.ts-ok {
	color: var(--ts-ok);
}

.ts-tab[aria-pressed="true"] .ts-ok {
	color: #1f7a32;
}

.ts-timer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.ts-clock {
	font-family: var(--ts-mono);
	font-size: clamp(38px, 9vw, 54px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: .02em;
	font-variant-numeric: tabular-nums;
}

.ts-clock.is-low {
	color: var(--ts-sun1);
}

.ts-clock.is-out {
	color: var(--ts-bad);
}

.ts-acts {
	display: flex;
	gap: 6px;
}

.ts-callout {
	padding: 10px 14px;
	border-left: 3px solid var(--ts-bad);
	background: rgba(255, 116, 97, .12);
	font-size: 14px;
}

.ts-bye {
	padding: 10px 14px;
	background: var(--ts-surface2);
	font-size: 14px;
}

.ts-bye b {
	color: var(--ts-sun2);
}

.ts-thead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.ts-thead strong {
	font-family: var(--ts-display);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.ts-thead span {
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-muted);
}

.ts-seats {
	display: grid;
	gap: 6px;
}

.ts-seat {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) 84px 92px;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: var(--ts-bg);
}

.ts-n {
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-muted);
}

.ts-n.is-first {
	color: var(--ts-sun2);
}

.ts-nm {
	font-weight: 600;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.ts-nm small {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: var(--ts-muted);
}

.swu-ts .ts-seat input {
	padding: 8px 10px;
	text-align: center;
}

.ts-badge {
	padding: 6px 4px;
	background: var(--ts-surface2);
	color: var(--ts-muted);
	font-family: var(--ts-mono);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.ts-badge.is-p1 {
	background: var(--ts-sun1);
	color: var(--ts-ink);
	font-weight: 700;
}

.ts-badge.is-p0 {
	border: 1px solid rgba(255, 116, 97, .4);
	background: transparent;
	color: var(--ts-bad);
}

.ts-status {
	margin: 0;
	font-size: 13.5px;
	color: var(--ts-muted);
}

.ts-status b {
	color: var(--ts-fg);
}

.ts-status.is-done b {
	color: var(--ts-sun2);
}

@media (max-width: 440px) {
	.ts-seat {
		grid-template-columns: 26px minmax(0, 1fr) 60px 76px;
		gap: 7px;
	}

	.ts-badge {
		padding: 6px 2px;
		font-size: 11px;
		white-space: nowrap;
		letter-spacing: -.02em;
	}
}

.ts-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* Posiciones */
.ts-tbl {
	overflow-x: auto;
}

.swu-ts table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.swu-ts th {
	padding: 6px 7px;
	border: 0;
	border-bottom: 1px solid var(--ts-line);
	background: none;
	color: var(--ts-muted);
	font-family: var(--ts-mono);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .1em;
	text-align: right;
	text-transform: uppercase;
}

.swu-ts td {
	padding: 9px 7px;
	border: 0;
	border-bottom: 1px solid var(--ts-line);
	background: none;
	font-family: var(--ts-mono);
	font-size: 13.5px;
	text-align: right;
}

.swu-ts th:nth-child(2),
.swu-ts td:nth-child(2) {
	text-align: left;
}

.swu-ts td:nth-child(2) {
	min-width: 96px;
	font-family: var(--swu-f-texto, Barlow, sans-serif);
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.swu-ts th:first-child,
.swu-ts td:first-child {
	width: 26px;
	color: var(--ts-muted);
	text-align: left;
}

.swu-ts td.is-pts {
	color: var(--ts-sun2);
	font-size: 15px;
	font-weight: 700;
}

.swu-ts tr:last-child td {
	border-bottom: 0;
}

.swu-ts tr.is-lead td:first-child {
	color: var(--ts-sun1);
}

.ts-legend {
	margin: 0;
	font-size: 12.5px;
	color: var(--ts-muted);
}

.ts-copyfb {
	width: 100%;
	min-height: 150px;
	padding: 10px;
	border: 1px solid var(--ts-line);
	background: var(--ts-bg);
	color: var(--ts-fg);
	font-family: var(--ts-mono);
	font-size: 12px;
}

.ts-toast {
	min-height: 20px;
	margin: 0;
	font-size: 13px;
	color: var(--ts-ok);
}

.ts-champ__fila {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ts-eyebrow {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ts-muted);
}

.ts-champ__nm {
	margin: 0;
	font-family: var(--ts-display);
	font-size: clamp(34px, 8vw, 52px);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	color: var(--ts-sun2);
	overflow-wrap: anywhere;
}

.ts-demo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border-left: 3px solid var(--ts-sun2);
	background: rgba(255, 207, 107, .1);
	font-size: 14px;
}

.ts-confirm {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

/* Modal de la imagen */
.swu-ts__modal {
	width: min(860px, calc(100vw - 24px));
	max-height: calc(100dvh - 24px);
	padding: 0;
	border: 1px solid var(--ts-line);
	background: var(--ts-surface);
	color: var(--ts-fg);
}

.swu-ts__modal::backdrop {
	background: rgba(5, 4, 3, .85);
}

.swu-ts__modal-caja {
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 26px);
}

.swu-ts__modal-cabeza {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .9rem 1.1rem;
	border-bottom: 1px solid var(--ts-line);
}

.swu-ts .swu-ts__cerrar {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--ts-surface2);
}

.swu-ts__modal-cuerpo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	gap: 1.25rem;
	padding: 1.1rem;
	overflow: auto;
}

.swu-ts__lienzo {
	display: grid;
	place-items: center;
	padding: .6rem;
	background: #070504;
}

.swu-ts__lienzo canvas {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(60vh, 520px);
}

.swu-ts__modal-opciones {
	display: grid;
	gap: .8rem;
	align-content: start;
}

.swu-ts__modal-opciones fieldset {
	display: grid;
	gap: .4rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.swu-ts__modal-opciones legend {
	margin-bottom: .3rem;
	font-family: var(--ts-mono);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ts-muted);
}

.swu-ts__modal-opciones label {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .55rem .75rem;
	background: var(--ts-surface2);
	cursor: pointer;
}

.swu-ts__modal-opciones small {
	color: var(--ts-muted);
}

@media (max-width: 640px) {
	.swu-ts__modal-cuerpo {
		grid-template-columns: 1fr;
	}

	.swu-ts__lienzo canvas {
		max-height: 44dvh;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.swu-ts .ts-btn,
	.swu-ts .ts-ghost,
	.swu-ts .ts-tab,
	.swu-ts .ts-seg button {
		transition: background-color .15s;
	}
}

/* ===== Modos: inicio, salas, jugador ===== */
.ts-barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.swu-ts .ts-volver {
	padding: 8px 12px;
	border: 0;
	background: var(--ts-surface2);
	font-size: 13.5px;
	font-weight: 600;
}

.swu-ts .ts-volver:hover {
	background: var(--ts-line);
}

.ts-barra__t {
	font-family: var(--ts-mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ts-muted);
}

.ts-barra__red {
	margin-left: auto;
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-bad);
}

.ts-barra__red:empty {
	display: none;
}

.ts-aviso {
	position: fixed;
	z-index: 100001;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom));
	width: max-content;
	max-width: calc(100vw - 32px);
	margin: 0;
	padding: 12px 18px;
	border-left: 3px solid var(--ts-ok);
	background: #241a13;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
	color: var(--ts-fg);
	font-size: 14.5px;
	transform: translateX(-50%);
}

.ts-aviso.is-error {
	border-left-color: var(--ts-bad);
}

.ts-opciones {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 16px;
}

.ts-opciones .ts-in {
	height: 100%;
	align-content: start;
}

.ts-opciones .ts-in p:not(.ts-eyebrow) {
	margin: 0;
	color: var(--ts-muted);
	font-size: 14.5px;
}

.ts-opciones .ts-acts,
.ts-opciones .ts-unirse {
	align-self: end;
}

.ts-unirse {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.swu-ts #ts-codigo {
	font-family: var(--ts-mono);
	letter-spacing: .1em;
	text-transform: uppercase;
}

.ts-recientes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ts-recientes small {
	margin-left: 6px;
	color: var(--ts-muted);
}

.ts-pasos {
	display: grid;
	gap: 6px;
	margin: 0;
	padding-left: 1.3em;
	color: var(--ts-muted);
	font-size: 14px;
}

.ts-pasos li::marker {
	color: var(--ts-sun2);
	font-family: var(--ts-mono);
}

.ts-cargando,
.ts-vacio {
	margin: 0;
	color: var(--ts-muted);
}

/* QR */
.ts-qrbox {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr);
	align-items: center;
	gap: 18px;
}

.ts-qrbox > div:last-child {
	display: grid;
	gap: 8px;
}

.ts-qr svg {
	display: block;
	width: 100%;
	height: auto;
}

.ts-salainfo__cod {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: clamp(28px, 7vw, 40px);
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--ts-sun2);
}

.ts-salainfo__fila {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.ts-salainfo__fila > div:first-child {
	display: grid;
	gap: 4px;
	flex: 1 1 260px;
}

.ts-acts {
	flex-wrap: wrap;
}

@media (max-width: 520px) {
	.ts-qrbox {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}

	.ts-qrbox .ts-qr {
		width: min(240px, 70vw);
	}

	.ts-qrbox .ts-acts {
		justify-content: center;
	}
}

.ts-qrgrande {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(10, 7, 5, .94);
}

.ts-qrgrande__caja {
	display: grid;
	justify-items: center;
	gap: 12px;
	text-align: center;
}

.ts-qrgrande__qr {
	width: min(78vmin, 560px);
}

.ts-qrgrande__qr svg {
	display: block;
	width: 100%;
	height: auto;
}

.ts-qrgrande__cod {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: clamp(36px, 9vmin, 72px);
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--ts-sun2);
}

/* Lista de la sala */
.ts-names--sala {
	grid-template-columns: minmax(0, 1fr);
}

.ts-pl--sala {
	grid-template-columns: 26px minmax(0, 1fr) 64px 52px 36px;
}

.ts-origen-tag {
	font-family: var(--ts-mono);
	font-size: 10.5px;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
	color: var(--ts-muted);
}

.swu-ts .ts-quitar {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ts-muted);
}

.swu-ts .ts-quitar:hover {
	background: var(--ts-surface2);
	color: var(--ts-bad);
}

.ts-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ts-chip {
	padding: 6px 12px;
	background: var(--ts-surface2);
	font-size: 14px;
}

.ts-chip.is-yo {
	background: var(--ts-sun1);
	color: var(--ts-ink);
	font-weight: 700;
}

.ts-mas summary {
	cursor: pointer;
	color: var(--ts-sun2);
	font-size: 14px;
	font-weight: 600;
}

.ts-mas[open] summary {
	margin-bottom: 10px;
}

.ts-mas.ts-card {
	padding: 0;
	background: none;
	clip-path: none;
	border: 1px solid var(--ts-line);
}

.ts-mas.ts-card > summary {
	padding: 14px 16px;
	margin: 0;
	background: var(--ts-surface);
	font-family: var(--ts-display);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ts-fg);
}

.ts-mas__cuerpo {
	display: grid;
	gap: 12px;
	padding: 12px;
}

.ts-origen {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-muted);
}

.ts-origen.is-mesa {
	color: var(--ts-ok);
}

.swu-ts .ts-ghost--sm {
	padding: 8px 12px;
	font-size: 13px;
}

/* Mi mesa (jugador) */
.ts-mimesa__fila {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
}

.ts-mimesa__mesa {
	margin: 0;
	font-family: var(--ts-display);
	font-size: clamp(44px, 13vw, 68px);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	color: var(--ts-sun2);
}

.ts-mimesa__asiento {
	margin: 0;
	font-family: var(--ts-display);
	font-size: 26px;
	font-weight: 800;
	text-transform: uppercase;
	text-align: right;
}

.ts-mimesa__asiento small {
	display: block;
	font-family: var(--swu-f-texto, Barlow, system-ui, sans-serif);
	font-size: 13px;
	font-weight: 500;
	text-transform: none;
	color: var(--ts-sun1);
}

.ts-mimesa .ts-seat {
	grid-template-columns: 34px minmax(0, 1fr) 92px;
}

.ts-seat.is-yo {
	background: rgba(255, 138, 42, .14);
	box-shadow: inset 3px 0 0 var(--ts-sun1);
}

.swu-ts .ts-btn--grande {
	width: 100%;
	padding: 18px 22px;
	font-size: 20px;
}

.ts-timer--jugador {
	padding: 10px 14px;
	background: var(--ts-bg);
}

.ts-grid--sala {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 880px) {
	.ts-grid--sala {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ===== Contador de daño a pantalla completa ===== */
html.swu-ts-bloqueo,
html.swu-ts-bloqueo body {
	overflow: hidden;
	overscroll-behavior: none;
}

.ts-cnt {
	position: fixed;
	z-index: 100000;
	inset: 0;
	overflow: hidden;
	background: #0b0806;
	color: var(--ts-fg);
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	touch-action: manipulation;
}

/* La mesa siempre se ve como con el celular acostado (horizontal).
   Si el celular está en vertical, se gira 90° para que cada jugador quede en un lado largo. */
.ts-cnt__mesa {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
}

@media (orientation: portrait) {
	.ts-cnt__mesa {
		inset: auto;
		top: 0;
		left: 100%;
		width: 100vh;
		width: 100dvh;
		height: 100vw;
		transform: rotate(90deg);
		transform-origin: 0 0;
	}
}

.ts-cnt__fila {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 4px;
	min-height: 0;
	padding: 4px;
}

.ts-z {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: color-mix(in srgb, var(--zc) 22%, #120d0a);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zc) 45%, transparent);
	clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.ts-z {
	container-type: size;
}

.ts-z__in {
	position: absolute;
	inset: 0;
}

.ts-z.is-girada .ts-z__in {
	transform: rotate(180deg);
}

.swu-ts .ts-z__btn {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	display: grid;
	align-items: center;
	padding: 0 7%;
	border: 0;
	background: transparent;
	color: color-mix(in srgb, var(--zc) 70%, #fff);
	font-size: clamp(30px, 8vmin, 54px);
	font-weight: 300;
	line-height: 1;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.swu-ts .ts-z__btn.is-menos {
	left: 0;
	justify-items: start;
}

.swu-ts .ts-z__btn.is-mas {
	right: 0;
	justify-items: end;
}

.swu-ts .ts-z__btn.is-pulsado,
.swu-ts .ts-z__btn:active {
	background: color-mix(in srgb, var(--zc) 25%, transparent);
}

.ts-z__info {
	position: absolute;
	inset: 0 18%;
	padding-top: 26px;
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 2px;
	min-width: 0;
	pointer-events: none;
	text-align: center;
}

.ts-z__nm {
	max-width: 100%;
	overflow: hidden;
	font-weight: 700;
	font-size: clamp(13px, 3.4vmin, 18px);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-z__vida {
	font-family: var(--ts-display);
	font-size: clamp(48px, 17vmin, 150px);
	font-size: min(40cqh, 46cqw);
	font-weight: 800;
	line-height: .9;
	font-variant-numeric: tabular-nums;
}


.ts-z__sub {
	font-family: var(--ts-mono);
	font-size: clamp(10.5px, 2.6vmin, 13px);
	color: rgba(245, 234, 221, .7);
	white-space: nowrap;
}

.ts-z__ini {
	margin-top: 4px;
	padding: 2px 8px;
	background: var(--ts-sun2);
	color: var(--ts-ink);
	font-family: var(--ts-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.ts-z__delta {
	position: absolute;
	top: 6%;
	right: 4%;
	font-family: var(--ts-mono);
	font-size: clamp(16px, 4vmin, 24px);
	font-weight: 700;
	color: var(--ts-bad);
	opacity: 0;
}

.ts-z__delta.is-on {
	opacity: 1;
}

.ts-z__delta.is-mas {
	color: var(--ts-ok);
}

.ts-z.is-caida {
	background: #1a1210;
	box-shadow: inset 0 0 0 1px rgba(255, 116, 97, .45);
}

.ts-z.is-caida .ts-z__vida {
	color: var(--ts-bad);
}

.ts-cnt__barra {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 6px;
	background: #17110d;
	border-block: 1px solid var(--ts-line);
}

.swu-ts .ts-cnt__barra button {
	flex: 0 0 auto;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 12px;
	border: 0;
	background: var(--ts-surface2);
	font-size: 14px;
	font-weight: 700;
}

.swu-ts .ts-cnt__barra button:disabled {
	opacity: .35;
}

.swu-ts .ts-cnt__barra .is-fin {
	background: var(--ts-sun1);
	color: var(--ts-ink);
}

.ts-cnt__titulo {
	display: flex;
	line-height: 1.25;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 8px;
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-muted);
}

.ts-cnt__titulo b {
	padding: 2px 8px;
	background: var(--ts-bad);
	color: #1a0805;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.ts-cnt__reloj {
	color: var(--ts-sun2);
	font-weight: 700;
}


.ts-cnt.is-final .ts-cnt__barra {
	border-color: var(--ts-bad);
}

.ts-cnt__capa {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(8, 6, 4, .88);
	overflow-y: auto;
}

.ts-cnt__caja {
	display: grid;
	gap: 12px;
	width: min(520px, 100%);
	padding: 20px;
	border: 1px solid var(--ts-sun1);
	background: var(--ts-surface);
}

.ts-cnt__caja p {
	margin: 0;
}

.ts-cnt__opciones {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 8px;
}

.ts-cnt__opciones.is-sec {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.swu-ts .ts-cnt__opciones .ts-btn.is-marcado {
	outline: 3px solid var(--ts-sun2);
	outline-offset: 2px;
}

.ts-cnt__fin {
	display: grid;
	gap: 6px;
}

.ts-cnt__finfila {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 76px 86px;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	background: var(--ts-bg);
}

.ts-cnt__finfila small {
	font-family: var(--ts-mono);
	font-size: 12px;
	color: var(--ts-sun2);
	text-align: right;
}

.swu-ts .ts-cnt__finfila input {
	padding: 8px;
	text-align: center;
}

.ts-cnt__estado {
	padding: 10px 12px;
	border-left: 3px solid var(--ts-ok);
	background: rgba(134, 212, 148, .1);
	font-size: 14px;
}

.ts-cnt__estado.is-error {
	border-left-color: var(--ts-bad);
	background: rgba(255, 116, 97, .12);
}

/* ===== Bases (SWUDB) ===== */
.ts-asp {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 5px;
	border-radius: 50%;
	background: var(--ac);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
	vertical-align: 0;
}

.swu-ts .ts-basebtn {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 6px 12px;
	border: 1px dashed var(--ts-line);
	background: transparent;
	color: var(--ts-muted);
	font-size: 14px;
	text-align: left;
}

.swu-ts .ts-basebtn:hover {
	border-color: var(--ts-sun1);
	color: var(--ts-fg);
}

.swu-ts .ts-basebtn.is-elegida {
	border-style: solid;
	background: var(--ts-bg);
	color: var(--ts-fg);
}

.ts-basebtn > img {
	width: 52px;
	height: 36px;
	object-fit: cover;
	clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.ts-basebtn__nm {
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-basebtn:not(.is-elegida) .ts-basebtn__nm {
	grid-column: 1 / 3;
}

.ts-basebtn small {
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-muted);
	white-space: nowrap;
}

.ts-pl .ts-basebtn {
	grid-column: 2 / -1;
}

/* Selector */
.ts-selector {
	position: fixed;
	z-index: 100002;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 12px;
	background: rgba(8, 6, 4, .86);
}

.ts-selector__caja {
	display: grid;
	grid-template-rows: auto auto auto minmax(0, 1fr) auto;
	gap: 10px;
	width: min(560px, 100%);
	height: min(760px, calc(100dvh - 24px));
	padding: 16px;
	border: 1px solid var(--ts-sun1);
	background: var(--ts-surface);
}

.ts-selector__cab {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ts-selector__aspectos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.swu-ts .ts-selector__aspectos button {
	padding: 7px 11px;
	border: 0;
	background: var(--ts-surface2);
	font-size: 13px;
	font-weight: 600;
}

.swu-ts .ts-selector__aspectos button[aria-pressed="true"] {
	background: var(--ts-sun1);
	color: var(--ts-ink);
}

.ts-selector__lista {
	display: grid;
	align-content: start;
	gap: 6px;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.swu-ts .ts-selector__item {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 6px 12px 6px 6px;
	border: 0;
	background: var(--ts-bg);
	text-align: left;
}

.swu-ts .ts-selector__item:hover {
	background: var(--ts-surface2);
}

.ts-selector__item > img,
.ts-selector__sinimg {
	width: 84px;
	height: 58px;
	object-fit: cover;
	background: var(--ts-surface2);
}

.ts-selector__txt {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.ts-selector__txt b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-selector__txt small {
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-muted);
}

.ts-selector__hp {
	font-family: var(--ts-display);
	font-size: 26px;
	font-weight: 800;
	color: var(--ts-sun2);
}

.ts-selector__pie {
	display: grid;
	gap: 6px;
}

.ts-selector__pie a {
	color: var(--ts-sun2);
}

/* Arte de la base en el contador, oscurecido para que se lea la vida */
.ts-z__arte {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	opacity: .55;
	filter: saturate(.85);
}

.ts-z__arte::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(8, 6, 4, .55), rgba(8, 6, 4, .85)),
		color-mix(in srgb, var(--zc) 18%, transparent);
}

.ts-z.is-caida .ts-z__arte {
	opacity: .2;
	filter: grayscale(1);
}

.ts-z.con-arte .ts-z__info {
	text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}

.ts-z__base {
	max-width: 100%;
	overflow: hidden;
	font-size: clamp(10.5px, 2.5vmin, 13px);
	color: color-mix(in srgb, var(--zc) 55%, #fff);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ===== Contador Premier (vertical) ===== */
.ts-prem__mesa {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
}

.ts-lado {
	position: relative;
	min-height: 0;
	margin: 4px;
	overflow: hidden;
	container-type: size;
	background: color-mix(in srgb, var(--zc) 20%, #120d0a);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zc) 45%, transparent);
	clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

.ts-lado.is-ini {
	box-shadow: inset 0 0 0 2px var(--ts-sun2);
}

.ts-lado__in {
	position: absolute;
	inset: 0;
}

.ts-lado.is-girada .ts-lado__in {
	transform: rotate(180deg);
}

.ts-lado__base,
.ts-lado__lider,
.ts-lado__sombra {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	pointer-events: none;
}

/* Líder arriba a la izquierda, base abajo a la derecha, unidos por un degradado en diagonal */
/* Del líder sólo se usa el retrato (lado izquierdo de la carta) */
.ts-lado .ts-lado__lider {
	background-repeat: no-repeat;
	background-size: 260% auto;
	background-position: 12% 40%;
}

.ts-lado.con-base .ts-lado__lider {
	-webkit-mask-image: linear-gradient(125deg, #000 34%, transparent 62%);
	mask-image: linear-gradient(125deg, #000 34%, transparent 62%);
}

.ts-lado.con-lider .ts-lado__base {
	-webkit-mask-image: linear-gradient(125deg, transparent 38%, #000 66%);
	mask-image: linear-gradient(125deg, transparent 38%, #000 66%);
}

.ts-lado__sombra {
	background:
		radial-gradient(ellipse at center, rgba(8, 6, 4, .5), rgba(8, 6, 4, .82) 75%),
		linear-gradient(125deg, transparent 42%, rgba(8, 6, 4, .35) 50%, transparent 58%),
		color-mix(in srgb, var(--zc) 14%, transparent);
}

.ts-lado.is-caida .ts-lado__base,
.ts-lado.is-caida .ts-lado__lider {
	filter: grayscale(1);
	opacity: .35;
}

.ts-lado__info {
	position: absolute;
	inset: 0 18% 54px;
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 2px;
	pointer-events: none;
	text-align: center;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .85);
}

.ts-lado .ts-z__vida {
	font-size: clamp(56px, 18vmin, 160px);
	font-size: min(42cqh, 44cqw);
}

.ts-lado.is-caida .ts-z__vida {
	color: var(--ts-bad);
}

.ts-lado__cartas {
	max-width: 100%;
	overflow: hidden;
	font-size: 12.5px;
	color: color-mix(in srgb, var(--zc) 50%, #fff);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-lado__fichas {
	position: absolute;
	z-index: 2;
	left: 8px;
	right: 8px;
	bottom: 10px;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.swu-ts .ts-ficha {
	flex: 0 1 auto;
	min-height: 38px;
	padding: 6px 12px;
	border: 1px solid color-mix(in srgb, var(--zc) 55%, transparent);
	background: rgba(10, 7, 5, .7);
	color: var(--ts-fg);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.swu-ts .ts-ficha[aria-pressed="true"] {
	border-color: transparent;
	background: rgba(10, 7, 5, .45);
	color: rgba(245, 234, 221, .45);
	text-decoration: line-through;
}

.swu-ts .ts-ficha.is-ini[aria-pressed="true"] {
	background: var(--ts-sun2);
	color: var(--ts-ink);
	text-decoration: none;
}

@container (max-width: 360px) {
	.swu-ts .ts-ficha {
		padding: 6px 8px;
		font-size: 11.5px;
	}
}

.ts-prem__barra {
	justify-content: space-between;
}

.swu-ts .ts-prem__barra .ts-prem__reloj {
	flex: 1 1 auto;
	font-family: var(--ts-mono);
	font-size: 24px;
	font-variant-numeric: tabular-nums;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.swu-ts .ts-prem__reloj.is-corre {
	color: var(--ts-sun2);
}

.swu-ts .ts-prem__reloj.is-low {
	color: var(--ts-sun1);
}

.swu-ts .ts-prem__reloj.is-out {
	background: var(--ts-bad);
	color: #1a0805;
}

@media (max-width: 400px) {
	.ts-prem__barra button span {
		display: none;
	}
}

.ts-prem-j {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--ts-line);
}

.ts-prem-j legend {
	padding: 0 6px;
	font-family: var(--ts-mono);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ts-sun2);
}

.ts-prem-j__vida {
	display: grid;
	grid-template-columns: 1fr 90px;
	align-items: center;
	gap: 10px;
}

.ts-prem .ts-cnt__caja {
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
}

.ts-prem-resumen {
	display: grid;
	gap: 6px;
}

.ts-prem-resumen__j {
	display: grid;
	padding: 8px 12px;
	background: var(--ts-bg);
}

.ts-prem-resumen__j small {
	color: var(--ts-muted);
}

/* Scroll de las cajas Twin Suns en naranjo */
.swu-ts *,
.ts-selector__lista,
.ts-cnt__capa {
	scrollbar-color: #5a4232 transparent;
}

.swu-ts ::-webkit-scrollbar-track {
	background: transparent;
}

.swu-ts ::-webkit-scrollbar-thumb {
	border-color: var(--ts-surface);
	background: #5a4232;
}

.swu-ts ::-webkit-scrollbar-thumb:hover {
	background: var(--ts-sun1);
}

/* Íconos de aspecto */
.ts-aspi {
	display: inline-block;
	width: 18px;
	height: auto;
	margin-right: 5px;
	vertical-align: -4px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}

.ts-aspi + .ts-aspi {
	margin-left: -2px;
}

.ts-aspi--grande {
	width: 30px;
	margin: 0;
	vertical-align: middle;
}

.swu-ts .ts-selector__aspectos .ts-filtro-asp {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	opacity: .55;
}

.swu-ts .ts-selector__aspectos .ts-filtro-asp:hover {
	opacity: .9;
}

.swu-ts .ts-selector__aspectos .ts-filtro-asp[aria-pressed="true"] {
	background: var(--ts-surface2);
	box-shadow: inset 0 0 0 2px var(--ts-sun1);
	opacity: 1;
}

.ts-cnt__finvida {
	display: block;
	font-family: var(--ts-mono);
	font-size: 11px;
	color: var(--ts-muted);
}

/* ===== Overlay para streams: panel de control ===== */
.ts-grid--ov {
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

@media (max-width: 960px) {
	.ts-grid--ov {
		grid-template-columns: minmax(0, 1fr);
	}

	.ts-grid--ov .ts-side {
		order: -1;
	}
}

.ts-ov-jugadores {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.ts-ov-j .ts-in {
	gap: 10px;
}

.ts-ov-dano {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) 64px;
	align-items: center;
	gap: 8px;
}

.swu-ts .ts-ov-dano button {
	height: 64px;
	padding: 0;
	border: 0;
	background: var(--ts-surface2);
	font-size: 32px;
	line-height: 1;
}

.swu-ts .ts-ov-dano button:last-child {
	background: var(--ts-sun1);
	color: var(--ts-ink);
}

.ts-ov-dano > div {
	display: grid;
	justify-items: center;
}

.ts-ov-dano output {
	font-family: var(--ts-display);
	font-size: 44px;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.ts-ov-dano small {
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-muted);
}

.ts-ov-red {
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-ok);
}

.ts-ov-red.is-error {
	color: var(--ts-bad);
}

.ts-ov-tam {
	flex: 1 1 200px;
}

.ts-ov-tam input[type=range] {
	width: 100%;
	accent-color: var(--ts-sun1);
}

.ts-ov-previa {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background-color: #2a2a30;
	background-image:
		linear-gradient(45deg, #34343b 25%, transparent 25%, transparent 75%, #34343b 75%),
		linear-gradient(45deg, #34343b 25%, transparent 25%, transparent 75%, #34343b 75%);
	background-position: 0 0, 10px 10px;
	background-size: 20px 20px;
}

.ts-ov-previa iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 1920px;
	height: 1080px;
	border: 0;
	pointer-events: none;
	transform-origin: 0 0;
}

.swu-ts a.ts-ghost {
	display: inline-block;
	color: var(--ts-fg);
	text-decoration: none;
}

/* Vida que le queda a la base, bajo el daño */
.ts-z__sub b {
	font-size: 1.35em;
	color: var(--ts-fg);
}

/* Jueces y enlace con el overlay */
.ts-ov-pin {
	margin: 0;
	font-family: var(--ts-mono);
	font-size: 15px;
	color: var(--ts-muted);
}

.ts-ov-pin b {
	font-size: 26px;
	letter-spacing: .18em;
	color: var(--ts-sun2);
}

.ts-ov-dano small b {
	font-size: 1.3em;
	color: var(--ts-fg);
}

.ts-jz {
	display: grid;
	gap: 14px;
}

.ts-jz__cab {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ts-jz__cab > div {
	display: grid;
	min-width: 0;
}

.ts-jz__cab small {
	overflow: hidden;
	color: var(--ts-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-jz__nombre {
	font-family: var(--ts-display);
	font-size: 22px;
	font-weight: 800;
	text-transform: uppercase;
}

.ts-jz__lider {
	flex: 0 0 52px;
	height: 70px;
	background-repeat: no-repeat;
	background-size: 328% auto;
	background-position: 10% 35%;
	clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.ts-jz__dano {
	grid-template-columns: 84px minmax(0, 1fr) 84px;
}

.swu-ts .ts-jz__dano button {
	height: 84px;
	font-size: 40px;
}

.ts-jz__dano output {
	font-size: 56px;
}

.ts-enl {
	display: grid;
	gap: 10px;
}

.ts-enl__ok {
	margin: 0;
	color: var(--ts-ok);
	font-size: 14px;
}

.ts-enl__ok b {
	font-family: var(--ts-mono);
}

.ts-enl__campos {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 90px auto;
	gap: 8px;
}

.swu-ts .ts-en-cod {
	font-family: var(--ts-mono);
	text-transform: uppercase;
}

/* Botones de carta dentro de las filas de jugadores */
.ts-pl .ts-basebtn span {
	font-family: inherit;
	font-size: 14px;
	color: inherit;
}

.ts-jz__ed {
	display: grid;
	gap: 8px;
}

.ts-cerrar {
	flex-basis: 100%;
	padding: 10px 12px;
	border-left: 3px solid var(--ts-bad);
	background: rgba(255, 116, 97, .08);
}

.ts-cerrar span {
	flex-basis: 100%;
}

/* Overlay: reloj de la ronda y juegos ganados */
.ts-ov-reloj {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}

.ts-ov-reloj output {
	min-width: 110px;
	font-family: var(--ts-mono);
	font-size: 32px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ts-muted);
}

.ts-ov-reloj output.is-corre {
	color: var(--ts-sun2);
}

.ts-ov-min {
	display: flex;
	align-items: center;
	gap: 8px;
}

.swu-ts .ts-ov-min input {
	width: 78px;
}

.ts-ov-juegos {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ts-ov-juegos .ts-lbl {
	margin-right: auto;
}

.swu-ts .ts-ov-juego {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 2px solid var(--ts-line);
	background: transparent;
	transform: rotate(45deg) scale(.8);
}

.swu-ts .ts-ov-juego[aria-pressed="true"] {
	border-color: var(--ts-sun2);
	background: var(--ts-sun2);
	box-shadow: 0 0 10px rgba(255, 207, 107, .5);
}

.swu-ts .ts-ov-ini {
	--zc: var(--ts-sun1);
	justify-self: start;
	color: var(--ts-fg);
}

.ts-ov-epicas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.swu-ts .ts-ov-epica {
	--zc: var(--ts-sun1);
	color: var(--ts-fg);
}

/* Carta destacada (panel del streamer) */
.ts-dest {
	gap: 10px;
}

.ts-dest__res {
	display: grid;
	gap: 6px;
	max-height: 320px;
	overflow-y: auto;
}

.swu-ts .ts-dest__item {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	padding: 5px 10px 5px 5px;
	border: 0;
	background: var(--ts-bg);
	text-align: left;
}

.swu-ts .ts-dest__item:hover,
.swu-ts .ts-dest__item.is-primero {
	background: var(--ts-surface2);
}

.ts-dest__item > img {
	width: 54px;
	height: 54px;
	object-fit: cover;
	object-position: top;
}

.ts-dest__item span {
	display: grid;
	min-width: 0;
}

.ts-dest__item b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-dest__item small {
	font-family: var(--ts-mono);
	font-size: 11.5px;
	color: var(--ts-muted);
}

.ts-dest__actual {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
}

/* Botón "Token" arriba al centro de cada zona del contador Twin Suns */
.swu-ts .ts-z__tok {
	position: absolute;
	top: 6px;
	left: 50%;
	z-index: 2;
	display: flex;
	gap: 4px;
	max-width: 64%;
	min-height: 28px;
	padding: 3px 12px;
	border: 1px solid color-mix(in srgb, var(--zc) 55%, transparent);
	background: rgba(10, 7, 5, .72);
	color: color-mix(in srgb, var(--zc) 60%, #fff);
	font-family: var(--ts-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	transform: translateX(-50%);
	clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%, 0 6px);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.swu-ts .ts-z__tok.is-con {
	padding: 3px 4px;
	border-color: transparent;
	background: transparent;
}

.ts-z__tok span {
	padding: 3px 8px;
	background: #0b0b0d;
	color: #fff;
	letter-spacing: .06em;
	box-shadow: inset 0 -2px 0 var(--tokc);
}

.ts-z__tok .is-iniciativa,
.ts-tok.is-iniciativa {
	--tokc: #e5262b;
}

.ts-z__tok .is-blast,
.ts-tok.is-blast {
	--tokc: #ff8a1f;
}

.ts-z__tok .is-plan,
.ts-tok.is-plan {
	--tokc: #3fa9ff;
}

/* Ventana de tokens */
.ts-cnt__tokens {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.swu-ts .ts-cnt__tokens .ts-tok {
	display: grid;
	gap: 2px;
	min-height: 64px;
	padding: 8px;
	border-color: color-mix(in srgb, var(--tokc) 60%, transparent);
	white-space: normal;
}

.ts-cnt__tokens .ts-tok b {
	font-size: 15px;
}

.ts-cnt__tokens .ts-tok small {
	font-size: 11px;
	font-weight: 500;
	color: var(--ts-muted);
}

/* Fichas en el panel del streamer y de jueces (Twin Suns) */
.swu-ts .ts-tok {
	--zc: var(--tokc);
	color: var(--ts-fg);
}

.swu-ts .ts-tok[aria-pressed="true"] {
	border-color: transparent;
	background: var(--tokc);
	color: #fff;
	text-decoration: none;
}

.swu-ts .ts-tok[aria-pressed="true"] small {
	color: rgba(255, 255, 255, .85);
}

/* La ventana de tokens mira hacia quien la abrió */
@media (orientation: landscape) {
	.ts-cnt__capa.is-girada .ts-cnt__caja {
		transform: rotate(180deg);
	}
}

/* Opción de pantalla completa en la configuración de los contadores */
.swu-ts .ts-pc {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 4px 0 2px;
	color: var(--ts-fg);
	font-size: 14px;
	cursor: pointer;
}

.swu-ts .ts-pc input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--ts-sun1);
}

.swu-ts p.ts-pc {
	display: block;
	color: var(--ts-muted);
}

/* Fichas (Iniciativa, Blast, Plan) directo en cada zona del contador Twin Suns */
.ts-z__toks {
	position: absolute;
	top: 6px;
	left: 50%;
	z-index: 2;
	display: flex;
	gap: 6px;
	transform: translateX(-50%);
}

.swu-ts .ts-z__tk {
	--tokc: #e5262b;
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 30px;
	padding: 3px 10px;
	border: 1px solid color-mix(in srgb, var(--tokc) 70%, transparent);
	background: rgba(10, 7, 5, .7);
	color: #fff;
	font-family: var(--ts-mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.swu-ts .ts-z__tk.is-blast {
	--tokc: #ff8a1f;
}

.swu-ts .ts-z__tk.is-plan {
	--tokc: #3fa9ff;
}

.swu-ts .ts-z__tk[aria-pressed="true"] {
	border-color: transparent;
	background: var(--tokc);
	box-shadow: 0 0 12px color-mix(in srgb, var(--tokc) 55%, transparent);
}

/* Zonas angostas: sólo el ícono de la ficha libre */
@container (max-width: 300px) {
	.ts-z__tk[aria-pressed="false"] span {
		display: none;
	}
}

/* Reset tokens al medio de la barra del contador */
.swu-ts .ts-cnt__barra .ts-cnt__reset {
	border: 1px solid var(--ts-line);
	white-space: nowrap;
}

.ts-cnt__esp {
	flex: 1 1 0;
}

.ts-cnt:not(.ts-prem) .ts-cnt__titulo {
	flex: 0 1 auto;
}

/* PIN de organizador */
.swu-ts .ts-orgpin {
	margin: 8px 0 4px;
	font-family: var(--ts-mono);
	font-size: 13px;
	color: var(--ts-muted);
}

.swu-ts .ts-orgpin b {
	margin-left: 8px;
	color: var(--ts-sun2);
	font-size: 26px;
	letter-spacing: .12em;
}

.swu-ts #ts-org-pin {
	width: 100%;
	margin-top: 8px;
}
