/* =====================================================================
   TerraRO — tema para FluxCP (v3: "noche magica")
   Fondo violeta profundo con aurora animada (magenta, cian y azul),
   estrellas que parpadean y acentos dorados del logo. Efectos: brillo
   en botones, tarjetas de cristal con borde degradado, aparicion al
   hacer scroll y titulos con degradado animado.
   Todo se desactiva con prefers-reduced-motion.
   ===================================================================== */
:root {
	--bg:      #1a0b45;
	--bg-2:    #26105e;
	--glass:   rgba(255,255,255,.07);
	--line:    rgba(255,255,255,.14);
	--txt:     #ffffff;
	--txt-2:   #d6ccff;
	--gold:    #ffc83d;
	--gold-2:  #ffe58a;
	--pink:    #ff4fd8;
	--cyan:    #3fe8ff;
	--blue:    #4d7cff;
	--violet:  #8b5cff;
	--ok:      #3dff9a;
	--ko:      #ff5d7a;
	--ink:     #1d1640;
	--ink-2:   #655d8a;
	--r:       18px;
	--grad:    linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
	--font:    'Nunito', 'Segoe UI', Tahoma, sans-serif;
	--font-h:  'Fredoka', 'Nunito', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--txt); background: var(--bg); min-height: 100vh; overflow-x: hidden; }
.tr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
::selection { background: var(--pink); color: #fff; }
.tr-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- Fondo: aurora + estrellas (capa fija detras de todo) ---------- */
.tr-sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% 120%, #3a1590 0%, var(--bg) 60%); }
.tr-sky i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; mix-blend-mode: screen; animation: tr-drift 22s ease-in-out infinite alternate; }
.tr-sky i:nth-child(1) { width: 60vw; height: 60vw; left: -15vw; top: 10vh; background: var(--pink); }
.tr-sky i:nth-child(2) { width: 55vw; height: 55vw; right: -15vw; top: 35vh; background: var(--cyan); animation-duration: 26s; animation-delay: -8s; opacity: .4; }
.tr-sky i:nth-child(3) { width: 50vw; height: 50vw; left: 25vw; bottom: -25vw; background: var(--blue); animation-duration: 30s; animation-delay: -15s; }
@keyframes tr-drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,-6vh) scale(1.15); } 100% { transform: translate(-6vw,8vh) scale(.95); } }
.tr-sky::before, .tr-sky::after {   /* dos capas de estrellas que parpadean desfasadas */
	content: ''; position: absolute; inset: -50%;
	background-image:
		radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 90px 120px, #fff, transparent),
		radial-gradient(1.5px 1.5px at 160px 60px, #ffe9a8, transparent), radial-gradient(1px 1px at 230px 170px, #fff, transparent),
		radial-gradient(2px 2px at 300px 90px, #bdf6ff, transparent), radial-gradient(1px 1px at 350px 220px, #fff, transparent);
	background-size: 380px 260px; animation: tr-twinkle 4s ease-in-out infinite;
}
.tr-sky::after { background-size: 520px 340px; animation-delay: -2s; transform: rotate(18deg); }
@keyframes tr-twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }

/* ---------- Botones ---------- */
.tr-btn, button, input[type=submit], input[type=button] {
	position: relative; overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	font-family: var(--font-h); font-weight: 600; font-size: 15px; line-height: 1;
	padding: 11px 20px; border-radius: 999px; cursor: pointer; text-decoration: none !important;
	color: #fff; background: linear-gradient(135deg, var(--violet), var(--blue)); border: 0;
	box-shadow: 0 6px 20px rgba(139,92,255,.4);
	transition: transform .2s, box-shadow .2s, filter .2s;
}
.tr-btn:hover, button:hover, input[type=submit]:hover, input[type=button]:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.1); box-shadow: 0 10px 30px rgba(139,92,255,.6); }
.tr-btn::after {   /* destello que cruza el boton */
	content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg);
	animation: tr-shine 3.5s ease-in-out infinite;
}
@keyframes tr-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.tr-btn.gold { color: #3a2200; background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, #ff9d2e); box-shadow: 0 6px 26px rgba(255,200,61,.5), 0 0 0 0 rgba(255,200,61,.6); animation: tr-glow 2.6s ease-in-out infinite; }
.tr-btn.gold:hover { box-shadow: 0 10px 36px rgba(255,200,61,.75); }
@keyframes tr-glow { 50% { box-shadow: 0 6px 30px rgba(255,200,61,.7), 0 0 0 6px rgba(255,200,61,0); } }
.tr-btn.glass { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: none; }
.tr-btn.glass::after { display: none; }
.tr-btn.glass:hover { background: rgba(255,255,255,.22); box-shadow: 0 0 24px rgba(63,232,255,.45); }
.tr-btn.big { padding: 17px 32px; font-size: 18px; }
.tr-btn.sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Barra superior ---------- */
.tr-top { position: sticky; top: 0; z-index: 50; background: rgba(26,11,69,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background .3s; }
.tr-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); background-size: 200% 100%; animation: tr-flow 6s linear infinite; opacity: .8; }
@keyframes tr-flow { to { background-position: 200% 0; } }
.tr-home .tr-top { background: rgba(26,11,69,.45); }
.tr-home.tr-scrolled .tr-top { background: rgba(26,11,69,.85); }
.tr-top .tr-wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.tr-brand img { display: block; height: 40px; width: auto; filter: drop-shadow(0 0 10px rgba(255,200,61,.45)); transition: transform .25s; }
.tr-brand:hover img { transform: scale(1.06) rotate(-2deg); }
.tr-nav { display: flex; align-items: center; gap: 1px; margin-left: auto; }
.tr-lnk { position: relative; display: block; padding: 7px 10px; border-radius: 999px; color: var(--txt); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; transition: color .2s, background .2s; }
.tr-lnk::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s; }
.tr-lnk:hover::after, .tr-lnk.on::after { transform: scaleX(1); }
.tr-lnk:hover, .tr-lnk.on { color: #fff; text-shadow: 0 0 12px rgba(63,232,255,.7); }
.tr-dd { position: relative; }
.tr-drop {
	display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 8px;
	background: rgba(38,16,94,.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border: 1px solid rgba(139,92,255,.45); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 30px rgba(139,92,255,.25);
	animation: tr-pop .18s ease-out;
}
@keyframes tr-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.tr-drop.right { left: auto; right: 0; }
.tr-dd:hover .tr-drop, .tr-dd:focus-within .tr-drop { display: block; }
.tr-dd::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }  /* puente para el hover */
.tr-drop a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--txt); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, padding .15s; }
.tr-drop a:hover { background: linear-gradient(90deg, rgba(255,79,216,.25), rgba(63,232,255,.15)); padding-left: 18px; }
.tr-drop em { display: block; padding: 10px 12px 4px; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--txt-2); border-top: 1px solid var(--line); margin-top: 6px; }
.tr-acct { margin-left: 8px; }
.tr-burger { display: none; margin-left: auto; color: #fff; font-size: 26px; cursor: pointer; padding: 4px 10px; line-height: 1; }
#tr-menu-toggle { display: none; }

/* ---------- Portada ---------- */
.tr-hero {
	position: relative; min-height: 100vh; display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
	background: var(--bg-2) center top / cover no-repeat;
	animation: tr-zoom 24s ease-in-out infinite alternate;
}
@keyframes tr-zoom { from { background-size: 100% auto; } to { background-size: 108% auto; } }
.tr-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,11,69,0) 50%, rgba(26,11,69,.6) 80%, var(--bg) 100%); pointer-events: none; }
.tr-hero-in { position: relative; z-index: 1; text-align: center; padding: 0 16px 13vh; animation: tr-rise .9s ease-out both .2s; }
@keyframes tr-rise { from { opacity: 0; transform: translateY(30px); } }
.tr-pill {
	display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px;
	background: rgba(26,11,69,.55); border: 1px solid rgba(255,255,255,.25); color: #fff; font-weight: 700; font-size: 15px;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-decoration: none !important;
}
.tr-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--ko); box-shadow: 0 0 10px var(--ko); }
.tr-pill.up i { background: var(--ok); box-shadow: 0 0 0 4px rgba(61,255,154,.25), 0 0 12px var(--ok); animation: tr-pulse 2s infinite; }
@keyframes tr-pulse { 50% { box-shadow: 0 0 0 9px rgba(61,255,154,0), 0 0 12px var(--ok); } }
.tr-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 20px; }
.tr-scroll { position: absolute; z-index: 1; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 34px; line-height: 1; text-decoration: none !important; animation: tr-bob 2s infinite; text-shadow: 0 0 12px var(--cyan); }
@keyframes tr-bob { 50% { transform: translate(-50%, 8px); } }

.tr-sec { padding: 56px 0; }
.tr-h { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-h); font-weight: 700; font-size: 32px; margin: 0 0 22px; }
.tr-h, .tr-final h2, .tr-banner h1 {
	background: linear-gradient(90deg, #fff, var(--gold-2), var(--pink), var(--cyan), #fff); background-size: 300% 100%;
	-webkit-background-clip: text; background-clip: text; color: transparent; animation: tr-flow 10s linear infinite;
}
.tr-h a { margin-left: auto; font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--cyan); -webkit-text-fill-color: var(--cyan); }

/* Rates: fichas de colores que flotan y brillan */
.tr-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 64px; }
.tr-rates div {
	position: relative; overflow: hidden; text-align: center; padding: 26px 10px; border-radius: var(--r);
	background: linear-gradient(135deg, #ffd23f, #ff7a1a); box-shadow: 0 14px 34px rgba(255,122,26,.35);
	animation: tr-float 5s ease-in-out infinite; transition: transform .25s;
}
.tr-rates div:nth-child(2) { background: linear-gradient(135deg, #ff6ad5, #b83cff); box-shadow: 0 14px 34px rgba(184,60,255,.4); animation-delay: -1.2s; }
.tr-rates div:nth-child(3) { background: linear-gradient(135deg, #3dffb0, #0bb3d9); box-shadow: 0 14px 34px rgba(11,179,217,.4); animation-delay: -2.4s; }
.tr-rates div:nth-child(4) { background: linear-gradient(135deg, #5ee7ff, #4d5bff); box-shadow: 0 14px 34px rgba(77,91,255,.45); animation-delay: -3.6s; }
@keyframes tr-float { 50% { transform: translateY(-8px); } }
.tr-rates div::after { content: ''; position: absolute; top: -50%; left: -80%; width: 50%; height: 200%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: rotate(20deg); transition: left .6s; }
.tr-rates div:hover::after { left: 130%; }
.tr-rates b { display: block; font-family: var(--font-h); font-weight: 700; font-size: 42px; line-height: 1.1; color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.2); }
.tr-rates span { color: rgba(255,255,255,.95); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }

/* Tarjetas de cristal con borde degradado */
.tr-duo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.tr-tops { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tr-topcard, .tr-blank, .tr-newsitem {
	border: 1px solid transparent; border-radius: var(--r);
	background: linear-gradient(rgba(38,16,94,.75), rgba(38,16,94,.75)) padding-box, linear-gradient(135deg, rgba(255,79,216,.7), rgba(139,92,255,.3), rgba(63,232,255,.7)) border-box;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	transition: transform .25s, box-shadow .25s;
}
.tr-topcard:hover, .tr-blank:hover, .tr-newsitem:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 30px rgba(255,79,216,.25); }
.tr-topcard { padding: 18px; }
.tr-topcard h4 { margin: 0 0 10px; font-family: var(--font-h); font-weight: 600; font-size: 17px; color: var(--gold-2); }
.tr-topcard .r { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 15px; }
.tr-topcard .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-topcard .v { margin-left: auto; color: var(--txt-2); font-size: 13px; white-space: nowrap; }
.tr-blank { padding: 36px 20px; text-align: center; font-size: 44px; }
.tr-blank > *:first-child, .tr-blank { line-height: 1.2; }
.tr-blank p { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--txt-2); }
.tr-bounce { display: inline-block; animation: tr-bob2 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(255,200,61,.5)); }
@keyframes tr-bob2 { 50% { transform: translateY(-8px) rotate(-6deg); } }
.tr-newsitem { padding: 18px 20px; margin-bottom: 14px; }
.tr-newsitem time { font-size: 13px; color: var(--gold); font-weight: 700; }
.tr-newsitem h3 { margin: 2px 0 6px; font-family: var(--font-h); font-weight: 600; font-size: 20px; color: #fff; }
.tr-newsitem div { color: var(--txt-2); font-size: 15px; }

.tr-final { position: relative; margin-top: 30px; padding: 130px 0; text-align: center; background: center 80% / cover no-repeat; }
.tr-final { -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.tr-final::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(58,21,144,.2), rgba(26,11,69,.35)); }
.tr-final .tr-wrap { position: relative; }
.tr-final h2 { margin: 0 0 24px; font-family: var(--font-h); font-weight: 700; font-size: clamp(32px, 5vw, 52px); filter: drop-shadow(0 4px 20px rgba(0,0,0,.6)); }
.tr-toast { padding-top: 84px; position: relative; z-index: 2; }

/* Aparicion al hacer scroll (la clase .in la pone el JS del header) */
.tr-rv { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.tr-rv.in { opacity: 1; transform: none; }
.tr-rv.d1 { transition-delay: .12s; } .tr-rv.d2 { transition-delay: .24s; }

/* ---------- Paginas interiores ---------- */
.tr-banner { padding: 48px 0 22px; }
.tr-banner h1 { margin: 0; font-family: var(--font-h); font-weight: 700; font-size: clamp(30px, 4vw, 44px); display: inline-block; }
.tr-main { padding-bottom: 50px; }
.tr-home .tr-main { padding-bottom: 0; }
.tr-card { position: relative; background: #fff; color: var(--ink); border-radius: var(--r); box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 50px rgba(139,92,255,.25); overflow: hidden; animation: tr-rise .6s ease-out both; }
.tr-card::before { content: ''; display: block; height: 5px; background: var(--grad); background-size: 200% 100%; animation: tr-flow 6s linear infinite; }
.tr-card-in { padding: 28px 32px; overflow-x: auto; }
.tr-card a { color: #6a3df0; }
.tr-card h2 { font-family: var(--font-h); font-weight: 600; font-size: 24px; color: var(--ink); margin: 0 0 14px; }
.tr-card h3 { font-family: var(--font-h); font-weight: 600; font-size: 19px; color: var(--ink); }
.tr-card .tr-btn, .tr-card button, .tr-card input[type=submit] { color: #fff; }
.tr-card .tr-btn.gold { color: #3a2200; }
.m-ranking #submenu { display: none; }   /* el Salon ya tiene sus pestañas */

/* Tablas y formularios de FluxCP (dentro de la tarjeta blanca) */
table.horizontal-table, table.vertical-table, table.generic-form-table, table.tr-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 18px; }
table.horizontal-table th, table.vertical-table th, table.tr-table th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); border-bottom: 2px solid #ece6fb; white-space: nowrap; }
table.horizontal-table td, table.vertical-table td, table.tr-table td { padding: 10px 12px; border-bottom: 1px solid #f1edfa; vertical-align: middle; transition: background .15s; }
table.vertical-table th { width: 30%; border-bottom: 1px solid #f1edfa; }
table.horizontal-table tr:hover td, table.tr-table tr:hover td { background: #f6f1ff; }
table.generic-form-table th { text-align: right; padding: 10px 14px; color: var(--ink-2); width: 30%; vertical-align: top; font-weight: 700; }
table.generic-form-table td { padding: 10px 14px; }
.tr-table td.num, .tr-table th.num { text-align: right; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
	font-family: var(--font); font-size: 15px; color: var(--ink); padding: 10px 12px; border: 1px solid #dcd3f3; border-radius: 12px; background: #fff; max-width: 100%;
	transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,255,.2); }
p.message, .message { padding: 12px 16px; border-radius: 12px; background: #e3fbef; color: #145c34; }
p.notice, .notice { padding: 12px 16px; border-radius: 12px; background: #fff5d6; color: #6a4b00; }
p.red, .red { color: #d1304f; } .green { color: #14753c; }
#submenu, #pagemenu { padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; background: #f5f1ff; font-size: 14px; }
#submenu a.current-sub-menu { font-weight: 800; }
.search-form { background: #f8f5ff; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.pages { margin: 12px 0; } .pages a, .pages span { display: inline-block; padding: 4px 10px; margin: 2px; border-radius: 8px; background: #f3eeff; }

/* ---------- Rankings ---------- */
.tr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tr-tabs a { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink) !important; background: #f3eeff; text-decoration: none !important; transition: transform .15s, background .15s; }
.tr-tabs a:hover { background: #e7dcff; transform: translateY(-2px); }
.tr-tabs a.on { color: #fff !important; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 6px 18px rgba(184,60,255,.4); }
.tr-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.tr-podium div { text-align: center; padding: 18px 10px; border-radius: 14px; background: #f6f2ff; transition: transform .2s; }
.tr-podium div:hover { transform: translateY(-4px); }
.tr-podium div.p1 { background: linear-gradient(180deg, #fff0c2, #fffaf0); box-shadow: 0 8px 24px rgba(255,200,61,.35); }
.tr-podium .m { font-size: 34px; }
.tr-podium .n { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-podium .v { font-family: var(--font-h); color: var(--ink-2); }
.tr-mine { padding: 12px 16px; border-radius: 12px; background: linear-gradient(90deg, #f3e9ff, #e6fbff); margin-bottom: 16px; font-size: 15px; }
.tr-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tr-champs div { padding: 12px; border-radius: 12px; background: #f6f2ff; }
.tr-champs .c { font-size: 12px; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.tr-champs .n { font-weight: 800; }
.tr-empty { color: var(--ink-2); margin: 0; }

/* ---------- Pie ---------- */
.tr-foot { position: relative; padding: 40px 0 46px; text-align: center; color: var(--txt-2); font-size: 14px; background: rgba(18,6,48,.7); }
.tr-foot::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); background-size: 200% 100%; animation: tr-flow 6s linear infinite; }
.tr-foot img { height: 34px; width: auto; filter: drop-shadow(0 0 10px rgba(255,200,61,.4)); }
.tr-foot p { margin: 8px 0 0; }
.tr-foot .tr-small { font-size: 12px; opacity: .8; }
.tr-foot select { padding: 3px 6px; font-size: 12px; border-radius: 6px; }

/* ---------- Tablet / movil (la barra tiene muchos enlaces: colapsa pronto) ---------- */
@media (max-width: 1200px) {
	.tr-burger { display: block; }
	.tr-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 16px; background: rgba(26,11,69,.98); max-height: calc(100vh - 68px); overflow-y: auto; }
	#tr-menu-toggle:checked ~ .tr-nav { display: flex; }
	.tr-lnk { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
	.tr-lnk.dc { align-self: flex-start; margin: 6px 0 0; }
	.tr-lnk::after { display: none; }
	.tr-drop, .tr-drop.right { display: block; position: static; min-width: 0; padding: 0 0 6px 12px; background: none; border: 0; box-shadow: none; animation: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.tr-acct { margin: 8px 0 0; } .tr-acct > .tr-btn { display: none; }
	.tr-duo { grid-template-columns: 1fr; }
	.tr-hero { min-height: 0; display: block; padding-top: 75vw; background-size: 100% auto; background-color: var(--bg); animation: none; }
	.tr-hero-in { padding-bottom: 30px; }
	.tr-scroll { display: none; }
	.tr-sky i { filter: blur(60px); }
}
@media (max-width: 560px) {
	body { font-size: 15px; }
	.tr-brand img { height: 32px; }
	.tr-rates { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.tr-rates b { font-size: 32px; }
	.tr-tops { grid-template-columns: 1fr; }
	.tr-btn.big { padding: 14px 22px; font-size: 16px; }
	.tr-card-in { padding: 20px 16px; }
	.tr-podium { grid-template-columns: 1fr; }
	table.generic-form-table th { text-align: left; width: auto; }
	table.generic-form-table, table.generic-form-table tbody, table.generic-form-table tr, table.generic-form-table th, table.generic-form-table td { display: block; width: 100%; }
}

/* =====================================================================
   Discord: diablillo animado (main/imp.php) + seccion + boton flotante
   ===================================================================== */
.tr-btn.discord { color: #fff; background: linear-gradient(135deg, #5865f2, #8b5cff 60%, #ff4fd8); box-shadow: 0 8px 30px rgba(88,101,242,.6); animation: tr-dcglow 2.2s ease-in-out infinite; }
.tr-btn.discord:hover { box-shadow: 0 12px 40px rgba(255,79,216,.7); }
@keyframes tr-dcglow { 50% { box-shadow: 0 8px 40px rgba(255,79,216,.75), 0 0 0 8px rgba(255,79,216,0); } }

/* El diablillo: cada parte se anima por separado */
.imp { display: block; width: 100%; height: auto; overflow: visible; }
.imp * { transform-box: view-box; }
.imp-fly    { animation: imp-fly 3s ease-in-out infinite; transform-origin: 110px 120px; }
.imp-wing-l { animation: imp-flap-l .32s ease-in-out infinite alternate; transform-origin: 72px 112px; }
.imp-wing-r { animation: imp-flap-r .32s ease-in-out infinite alternate; transform-origin: 148px 112px; }
.imp-tail   { animation: imp-tail 1.6s ease-in-out infinite; transform-origin: 136px 156px; }
.imp-fork   { animation: imp-fork 2.2s ease-in-out infinite; transform-origin: 50px 178px; }
.imp-eyes   { animation: imp-blink 4.5s infinite; transform-origin: 110px 118px; }
.imp-pupils { animation: imp-look 7s ease-in-out infinite; }
.imp-aura   { animation: imp-aura 3s ease-in-out infinite; transform-origin: 110px 118px; }
.imp-shadow { animation: imp-shadow 3s ease-in-out infinite; transform-origin: 110px 208px; }
@keyframes imp-fly    { 0%, 100% { transform: translateY(6px) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes imp-flap-l { from { transform: rotate(-22deg); } to { transform: rotate(10deg); } }
@keyframes imp-flap-r { from { transform: rotate(22deg); } to { transform: rotate(-10deg); } }
@keyframes imp-tail   { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
@keyframes imp-fork   { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes imp-blink  { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes imp-look   { 0%, 30%, 100% { transform: translate(0,0); } 40%, 55% { transform: translate(-4px,1px); } 65%, 80% { transform: translate(4px,-1px); } }
@keyframes imp-aura   { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes imp-shadow { 0%, 100% { transform: scale(1); opacity: .3; } 50% { transform: scale(.7); opacity: .15; } }

/* Imagen propia (img/mascota.*): flota y brilla igual que el SVG */
.imp-img { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.imp-img::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255,79,216,.55), rgba(255,79,216,0) 70%); animation: imp-aura 3s ease-in-out infinite; }
.imp-img img { position: relative; width: 70%; height: auto; image-rendering: auto; animation: imp-fly 3s ease-in-out infinite; }
.tr-dc-float-imp .imp-img img { width: 85%; }

/* Caja de la seccion */
.tr-dc-box {
	position: relative; overflow: hidden; display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: center;
	padding: 40px 48px; border-radius: 28px;
	background: linear-gradient(120deg, #3b2bd6, #6a2cf0, #b636e8, #ff4fd8, #6a2cf0, #3b2bd6); background-size: 300% 300%;
	animation: tr-dcbg 12s ease infinite;
	box-shadow: 0 30px 80px rgba(88,40,220,.55), inset 0 0 0 1px rgba(255,255,255,.25);
}
@keyframes tr-dcbg { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.tr-dc-box::before {   /* reflejo que barre la caja */
	content: ''; position: absolute; top: -50%; left: -40%; width: 30%; height: 200%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.18), transparent); transform: rotate(18deg);
	animation: tr-dcsweep 6s ease-in-out infinite; pointer-events: none;
}
@keyframes tr-dcsweep { 0%, 50% { left: -40%; } 100% { left: 140%; } }
.tr-dc-box::after {   /* puntitos de luz en el fondo */
	content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(2px 2px at 80% 15%, #fff, transparent),
		radial-gradient(1.5px 1.5px at 60% 80%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 70%, #fff, transparent),
		radial-gradient(2px 2px at 92% 70%, #fff, transparent);
	animation: tr-twinkle 3s ease-in-out infinite;
}
.tr-dc-imp { position: relative; z-index: 1; }
.tr-dc-imp .imp { filter: drop-shadow(0 18px 30px rgba(30,0,80,.5)); transition: transform .3s; }
.tr-dc-box:hover .imp { transform: scale(1.06) rotate(-4deg); }
.tr-dc-box:hover .imp-wing-l, .tr-dc-box:hover .imp-wing-r { animation-duration: .14s; }   /* aletea mas rapido */
.tr-dc-bubble {
	position: absolute; z-index: 2; top: -6px; right: -10px; padding: 8px 14px; border-radius: 16px 16px 16px 4px;
	background: #fff; color: #4a1fb8; font-family: var(--font-h); font-weight: 600; font-size: 15px; white-space: nowrap;
	box-shadow: 0 8px 20px rgba(0,0,0,.25); animation: tr-bubble 3s ease-in-out infinite; transform-origin: bottom left;
}
@keyframes tr-bubble { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.08); } }
.tr-dc-txt { position: relative; z-index: 1; }
.tr-dc-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tr-dc-txt h2 { margin: 10px 0 8px; font-family: var(--font-h); font-weight: 700; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; color: #fff; text-shadow: 0 4px 20px rgba(40,0,90,.5); }
.tr-dc-txt p { margin: 0 0 22px; max-width: 520px; font-size: 17px; color: rgba(255,255,255,.92); }
.tr-dc-txt .tr-btn.discord { background: #fff; color: #5b2ee8; box-shadow: 0 10px 30px rgba(30,0,80,.4); }
.tr-dc-txt .tr-btn.discord::after { background: linear-gradient(100deg, transparent, rgba(255,79,216,.35), transparent); }
.tr-dc-spark { position: absolute; z-index: 1; color: #fff; text-shadow: 0 0 10px #fff, 0 0 20px #ff9bf0; animation: tr-spark 2.6s ease-in-out infinite; pointer-events: none; }
.tr-dc-spark.s1 { top: 14%; left: 6%; font-size: 22px; }
.tr-dc-spark.s2 { top: 70%; left: 30%; font-size: 16px; animation-delay: -.6s; }
.tr-dc-spark.s3 { top: 12%; right: 8%; font-size: 26px; animation-delay: -1.2s; color: #ffe58a; }
.tr-dc-spark.s4 { bottom: 12%; right: 14%; font-size: 18px; animation-delay: -1.8s; }
.tr-dc-spark.s5 { top: 40%; left: 2%; font-size: 14px; animation-delay: -2.2s; color: #9ff4ff; }
@keyframes tr-spark { 0%, 100% { transform: scale(.4) rotate(0); opacity: 0; } 50% { transform: scale(1.2) rotate(180deg); opacity: 1; } }

/* Boton flotante en todas las paginas */
.tr-dc-float { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; text-decoration: none !important; }
.tr-dc-float-imp {
	position: relative; display: block; width: 84px; height: 84px; padding: 6px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #8b7bff, #5865f2 60%, #3b2bd6); box-shadow: 0 10px 30px rgba(88,101,242,.6);
	transition: transform .25s;
}
.tr-dc-float-imp::before, .tr-dc-float-imp::after {   /* ondas que salen del boton */
	content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #ff4fd8; animation: tr-ring 2.4s ease-out infinite; pointer-events: none;
}
.tr-dc-float-imp::after { animation-delay: 1.2s; border-color: #3fe8ff; }
@keyframes tr-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.tr-dc-float:hover .tr-dc-float-imp { transform: scale(1.12) rotate(-6deg); }
.tr-dc-float-tip {
	padding: 8px 14px; border-radius: 14px; background: #fff; color: #4a1fb8; font-family: var(--font-h); font-weight: 600; font-size: 15px; white-space: nowrap;
	box-shadow: 0 8px 20px rgba(0,0,0,.3); animation: tr-peek 9s ease-in-out infinite;
}
.tr-dc-float:hover .tr-dc-float-tip { animation: none; opacity: 1; transform: none; }
@keyframes tr-peek { 0%, 55%, 100% { opacity: 0; transform: translateX(14px) scale(.9); } 62%, 90% { opacity: 1; transform: none; } }

@media (max-width: 960px) {
	.tr-dc-box { grid-template-columns: 1fr; text-align: center; padding: 34px 22px; }
	.tr-dc-imp { max-width: 240px; margin: 10px auto 0; }
	.tr-dc-txt p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 560px) {
	.tr-dc-float { right: 12px; bottom: 12px; }
	.tr-dc-float-imp { width: 64px; height: 64px; padding: 4px; }
	.tr-dc-float-tip { display: none; }
	.tr-dc-bubble { right: 0; font-size: 13px; }
}

/* =====================================================================
   Portada v4: hero en dos columnas, 3 pasos, tarjetas de modos de juego
   ===================================================================== */
.tr-hero2 { position: relative; padding: 64px 0 40px; overflow: hidden; }
.tr-hero2-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; min-height: calc(100vh - 160px); }
.tr-hero2-txt { animation: tr-rise .8s ease-out both; }
.tr-hero2 h1 { margin: 18px 0 14px; font-family: var(--font-h); font-weight: 700; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -.01em; }
.tr-hero2 h1 span { background: linear-gradient(90deg, var(--gold-2), var(--pink), var(--cyan)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tr-flow 8s linear infinite; }
.tr-lead { margin: 0 0 26px; max-width: 540px; font-size: 19px; color: var(--txt-2); }
.tr-lead b { color: #fff; }
.tr-cta.left { justify-content: flex-start; margin-top: 0; }
.tr-hero2-dc {
	display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; padding: 12px 18px 12px 12px; border-radius: 18px;
	background: rgba(88,101,242,.18); border: 1px solid rgba(140,150,255,.45); color: #fff; text-decoration: none !important;
	transition: background .2s, transform .2s, box-shadow .2s;
}
.tr-hero2-dc:hover { background: rgba(88,101,242,.32); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(88,101,242,.45); }
.tr-hero2-dc .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #5865f2; box-shadow: 0 6px 18px rgba(88,101,242,.6); }
.tr-hero2-dc b { display: block; font-family: var(--font-h); font-weight: 600; font-size: 16px; }
.tr-hero2-dc small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); }
.tr-hero2-dc .arr { margin-left: 6px; font-size: 20px; transition: transform .2s; }
.tr-hero2-dc:hover .arr { transform: translateX(4px); }
.tr-hero2-art { position: relative; animation: tr-rise 1s ease-out both .15s; }
.tr-poster {
	position: relative; z-index: 1; border-radius: 26px; overflow: hidden; transform: rotate(2deg);
	box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.18), 0 0 60px rgba(63,232,255,.35);
	animation: tr-float 7s ease-in-out infinite; transition: transform .4s;
}
.tr-poster:hover { transform: rotate(0) scale(1.02); }
.tr-poster img { display: block; width: 100%; height: auto; }
.tr-orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .7; z-index: 0; }
.tr-orb.o1 { width: 220px; height: 220px; background: var(--pink); top: -30px; right: -20px; }
.tr-orb.o2 { width: 260px; height: 260px; background: var(--cyan); bottom: -40px; left: -30px; opacity: .45; }

.tr-sec-tight { padding: 10px 0 0; }
.tr-sec-tight .tr-rates { margin: 0; }
.tr-h.center { justify-content: center; text-align: center; display: block; }

/* Contador de Discord */
.tr-dc-count i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); margin-right: 2px; }
.tr-dc-count.big { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.18); font-weight: 700; font-size: 15px; }
.tr-dc-count[hidden] { display: none !important; }

/* 3 pasos */
.tr-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: paso; }
.tr-step {
	position: relative; display: block; padding: 30px 24px 26px; border-radius: 22px; color: #fff; text-decoration: none !important;
	background: linear-gradient(rgba(38,16,94,.78), rgba(38,16,94,.78)) padding-box, linear-gradient(135deg, rgba(255,200,61,.8), rgba(255,79,216,.5), rgba(63,232,255,.7)) border-box;
	border: 1px solid transparent; transition: transform .25s, box-shadow .25s;
}
.tr-step:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0,0,0,.4), 0 0 34px rgba(255,200,61,.25); }
.tr-step .num {
	position: absolute; top: -18px; left: 24px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	font-family: var(--font-h); font-weight: 700; font-size: 20px; color: #3a2200; background: linear-gradient(135deg, var(--gold-2), var(--gold));
	box-shadow: 0 6px 18px rgba(255,200,61,.55);
}
.tr-step .emo { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 18px; font-size: 30px; background: rgba(255,255,255,.1); }
.tr-step h3 { margin: 0 0 6px; font-family: var(--font-h); font-weight: 600; font-size: 22px; }
.tr-step p { margin: 0; color: var(--txt-2); font-size: 15px; }
.tr-step.dc { background: linear-gradient(140deg, #5865f2, #7b4dff 55%, #c23ee6) padding-box, linear-gradient(135deg, #fff, #ff9bf0) border-box; box-shadow: 0 16px 40px rgba(88,101,242,.45); }
.tr-step.dc .emo { background: rgba(255,255,255,.2); }
.tr-step.dc .emo svg { width: 32px; height: 32px; }
.tr-step.dc p { color: rgba(255,255,255,.92); }
.tr-step.dc:hover { box-shadow: 0 22px 50px rgba(88,101,242,.65); }

/* Modos de juego */
.tr-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tr-feat { overflow: hidden; border-radius: 20px; background: rgba(38,16,94,.8); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.tr-feat:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0,0,0,.45), 0 0 30px rgba(255,79,216,.25); }
.tr-feat .pic { aspect-ratio: 16 / 9; background: center bottom / cover no-repeat;   /* recorta el "TERRARO" que trae el arte arriba */ transition: transform .5s; }
.tr-feat:hover .pic { transform: scale(1.07); }
.tr-feat .tx { position: relative; padding: 16px 18px 20px; }
.tr-feat h3 { margin: 0 0 4px; font-family: var(--font-h); font-weight: 600; font-size: 19px; }
.tr-feat p { margin: 0; color: var(--txt-2); font-size: 14px; }

/* Discord: lista de ventajas */
.tr-dc-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 560px; }
.tr-dc-list li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.tr-dc-list span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2); }
.tr-dc-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.tr-final .tr-cta { margin-top: 0; }

/* Boton Discord en la barra */
.tr-lnk.dc { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; background: #5865f2; box-shadow: 0 4px 14px rgba(88,101,242,.5); }
.tr-lnk.dc:hover { background: #6d78ff; text-shadow: none; }
.tr-lnk.dc::after { display: none; }
.tr-lnk.dc svg { width: 18px; height: 18px; }

@media (max-width: 960px) {
	.tr-hero2 { padding: 34px 0 20px; }
	.tr-hero2-in { grid-template-columns: 1fr; gap: 34px; min-height: 0; text-align: center; }
	.tr-lead { margin-left: auto; margin-right: auto; }
	.tr-cta.left { justify-content: center; }
	.tr-hero2-art { max-width: 520px; margin: 0 auto; }
	.tr-steps { grid-template-columns: 1fr; gap: 28px; max-width: 520px; margin: 0 auto; }
	.tr-feats { grid-template-columns: repeat(2, 1fr); }
	.tr-dc-list { margin-left: auto; margin-right: auto; text-align: left; }
	.tr-dc-act { justify-content: center; }
	.tr-lnk.dc { align-self: flex-start; margin: 6px 0 0; }
}
@media (max-width: 560px) {
	.tr-lead { font-size: 17px; }
	.tr-hero2-dc { text-align: left; }
	.tr-feats { grid-template-columns: 1fr; }
	.tr-dc-list { grid-template-columns: 1fr; }
}

/* Quien prefiere menos movimiento: todo quieto */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.tr-rv { opacity: 1; transform: none; }
	html { scroll-behavior: auto; }
}

/* Títulos de logros (sistemas TerraRO) */
.tr-tit { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #7a3cff; background: #f1e8ff; vertical-align: middle; }

/* =====================================================================
   Quests (pestaña "Quests" del salón: Crónica, Ladrón, Pruebas, Reliquia,
   Obras, Infiltrado, Gemelos, Atraco y Padrino) + Crónica en la portada
   ===================================================================== */
.tr-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 18px; padding: 8px; border-radius: 14px; background: #f8f5ff; }
.tr-subtabs a { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--ink) !important; text-decoration: none !important; transition: background .15s; }
.tr-subtabs a:hover { background: #ece4ff; }
.tr-subtabs a.on { color: #fff !important; background: linear-gradient(135deg, var(--violet), var(--blue)); box-shadow: 0 4px 12px rgba(77,124,255,.35); }
.tr-tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 18px; }
.tr-tbl > table.tr-table { margin: 0; }
.tr-card-in h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.tr-nota { margin: -4px 0 10px; font-size: 14px; color: var(--ink-2); }
.tr-estado { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #fff6e0; font-size: 15px; }

/* Guerra de bandos de la Crónica */
.tr-guerra { margin: 0 0 22px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #e6f1ff, #f5eaff); }
.tr-guerra-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tr-guerra .lado b { display: block; font-family: var(--font-h); font-weight: 600; font-size: 19px; line-height: 1.2; }
.tr-guerra .lado span { font-size: 13px; color: var(--ink-2); }
.tr-guerra .lado.luz b { color: #1f62e0; }
.tr-guerra .lado.abismo { text-align: right; }
.tr-guerra .lado.abismo b { color: #7b22c9; }
.tr-guerra .vs { font-family: var(--font-h); font-weight: 700; color: var(--ink-2); }
.tr-guerra-barra { display: flex; height: 28px; border-radius: 999px; overflow: hidden; background: #ddd5f3; box-shadow: inset 0 2px 6px rgba(0,0,0,.12); }
.tr-guerra-barra i { display: flex; align-items: center; font-style: normal; font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; transition: width .8s ease-out; }
.tr-guerra-barra i.luz { padding-left: 12px; background: linear-gradient(90deg, #2f86ff, #7cc4ff); }
.tr-guerra-barra i.abismo { justify-content: flex-end; padding-right: 12px; background: linear-gradient(90deg, #b06bff, #4e148f); }
.tr-guerra ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; }
.tr-guerra li { padding: 3px 0; }
.tr-bandos { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tr-bandos h3 { margin: 0 0 4px; }

/* Obras de la ciudad */
.tr-obra { margin: 0 0 22px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #fff4dd, #f3ecff); }
.tr-obra-tit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.tr-obra-tit b { font-family: var(--font-h); font-weight: 600; font-size: 21px; }
.tr-obra-tit span { color: var(--ink-2); }
.tr-obra-tit em { margin-left: auto; font-style: normal; font-family: var(--font-h); font-weight: 700; font-size: 22px; color: #c2410c; }
.tr-prog { height: 8px; border-radius: 999px; overflow: hidden; background: #e7e0f6; }
.tr-prog.big { height: 16px; }
.tr-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9f1c, var(--pink)); transition: width .8s ease-out; }
.tr-hitos { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tr-hitos span { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: #fff; }
.tr-hitos span.on { color: #fff; background: linear-gradient(135deg, #ff9f1c, #ff4f8b); }
.tr-partes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tr-partes > div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.75); font-size: 14px; }
.tr-partes span { display: block; color: var(--ink-2); }
.tr-partes b { display: block; margin: 2px 0 6px; font-family: var(--font-h); font-weight: 600; }
.tr-obra-fin { margin: 14px 0 0; font-weight: 700; }

/* Sucesos (Reliquia) */
.tr-sucesos { list-style: none; margin: 0 0 18px; padding: 0; }
.tr-sucesos li { padding: 9px 2px; border-bottom: 1px solid #f1edfa; font-size: 15px; }
.tr-sucesos time { margin-left: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* =====================================================================
   Mundo vivo (pestaña "Mundo vivo" del salón + banda de la portada)
   ===================================================================== */
.tr-clima { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 12px; }
.tr-clima > div { padding: 14px 14px 12px; border-radius: 16px; background: linear-gradient(160deg, #eef6ff, #f6f0ff); }
.tr-clima .ico { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.tr-clima b { display: block; font-family: var(--font-h); font-weight: 600; font-size: 17px; }
.tr-clima .now { display: block; font-weight: 700; color: #4d38c9; }
.tr-clima small { display: block; min-height: 34px; margin: 4px 0 8px; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.tr-clima .prev { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.8); }
.tr-clima .w1 { background: linear-gradient(160deg, #e3e8f4, #d9dcef); }
.tr-clima .w3 { background: linear-gradient(160deg, #f1f8ff, #e2efff); }
.tr-clima .w4 { background: linear-gradient(160deg, #fff1df, #ffe3d4); }
.tr-clima .w5 { background: linear-gradient(160deg, #ffe2e2, #f1dcff); }
.tr-clima .w5 .now { color: #c0262d; }
.tr-rango { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: #8b7aa8; }
.tr-rango.r2 { background: #d9622b; }
.tr-rango.r3 { background: linear-gradient(135deg, #b3122e, #5b0f7a); }
.tr-estado.tr-plaga { background: #e9f8e4; }
.tr-alcaldes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 0 10px; }
.tr-alcaldes > div { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #fff7e6, #f5edff); font-size: 14px; }
.tr-alcaldes span { display: block; color: var(--ink-2); }
.tr-alcaldes .c { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #a05a00; }
.tr-alcaldes b { display: block; margin: 4px 0 2px; font-family: var(--font-h); font-weight: 600; font-size: 18px; }
.tr-alcaldes b.sin { color: var(--ink-2); font-size: 16px; }
.tr-alcaldes .dec { margin-top: 4px; font-weight: 700; color: #4d38c9; }
.tr-alcaldes .cand { margin-top: 8px; font-size: 12px; }
.tr-rivales { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0 0 18px; }
.tr-rivales > div { padding: 12px 14px; border-radius: 14px; background: #f8f5ff; }
.tr-rivales .lados { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.tr-rivales .lados span { font-weight: 800; white-space: nowrap; }
.tr-rivales .tr-guerra-barra { height: 10px; }
.tr-rivales small { display: block; margin-top: 6px; color: var(--ink-2); }
.tr-rutas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 18px; }
.tr-rutas > div { padding: 14px; border-radius: 16px; background: #f8f5ff; }
.tr-rutas b { display: block; font-family: var(--font-h); font-weight: 600; }
.tr-rutas span { display: block; margin-top: 4px; font-family: var(--font-h); font-weight: 700; font-size: 28px; color: #4d38c9; }
.tr-rutas .alto span { color: #15803d; }
.tr-rutas .bajo span { color: #b45309; }
.tr-rutas small { display: block; color: #c0262d; font-weight: 700; }

/* Portada: banda de Mundo vivo */
.tr-mv { display: block; padding: 22px 26px; border-radius: 22px; color: #fff; text-decoration: none !important; background: linear-gradient(115deg, rgba(23,148,120,.4), rgba(20,32,86,.92) 50%, rgba(47,134,255,.45)); border: 1px solid var(--line); box-shadow: 0 20px 44px rgba(0,0,0,.35); transition: transform .25s, box-shadow .25s; }
.tr-mv:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(0,0,0,.45), 0 0 34px rgba(47,200,160,.3); }
.tr-mv h3 { margin: 0 0 4px; font-family: var(--font-h); font-weight: 600; font-size: 24px; }
.tr-mv p { margin: 0 0 14px; color: var(--txt-2); font-size: 15px; }
.tr-mv-clima { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-mv-clima span { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.12); white-space: nowrap; }
.tr-mv-datos { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 14px; }
.tr-mv-datos b { color: var(--gold); }
.tr-mv .ver { margin-top: 10px; font-weight: 700; color: var(--gold); }

/* Portada: banda de la Crónica del Abismo */
.tr-cro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: center; padding: 24px 28px; border-radius: 22px; color: #fff; text-decoration: none !important; background: linear-gradient(115deg, rgba(47,134,255,.35), rgba(38,16,94,.9) 45%, rgba(123,34,201,.55)); border: 1px solid var(--line); box-shadow: 0 20px 44px rgba(0,0,0,.35); transition: transform .25s, box-shadow .25s; }
.tr-cro:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(0,0,0,.45), 0 0 34px rgba(139,92,255,.35); }
.tr-cro h3 { margin: 0 0 4px; font-family: var(--font-h); font-weight: 600; font-size: 24px; }
.tr-cro p { margin: 0; color: var(--txt-2); font-size: 15px; }
.tr-cro .tr-guerra-barra { background: rgba(255,255,255,.15); }
.tr-cro .lados { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.tr-cro .ver { margin-top: 10px; font-weight: 700; color: var(--gold); }

@media (max-width: 760px) {
	.tr-bandos, .tr-cro { grid-template-columns: 1fr; }
	.tr-cro { padding: 20px; }
}
@media (max-width: 560px) {
	.tr-guerra { padding: 16px; }
	.tr-guerra-top { flex-direction: column; align-items: stretch; gap: 4px; }
	.tr-guerra .lado.abismo { text-align: left; }
	.tr-guerra .vs { display: none; }
	.tr-obra { padding: 16px; }
	.tr-obra-tit em { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.tr-guerra-barra i, .tr-prog i { transition: none; }
}

/* =====================================================================
   Página Donar (themes/terraro/donate/index.php): cabecera con cofre,
   importes rápidos, pasos, tarjetas de la Tesorera y medallas de rango.
   Los dibujos son SVG del propio index.php (<symbol> + <use>).
   ===================================================================== */
.tr-don { --don-r: 18px; }
.tr-don svg { display: block; }
.tr-don-hero { position: relative; display: flex; align-items: center; gap: 24px; margin: 0 0 24px; padding: 30px 32px; border-radius: var(--don-r); color: #fff; overflow: hidden;
	background: radial-gradient(circle at 85% 30%, rgba(255,200,61,.35), transparent 45%), linear-gradient(130deg, #2a1170, #5b2bd8 55%, #b43fd6); box-shadow: 0 14px 34px rgba(91,43,216,.35); }
.tr-don-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: radial-gradient(1.5px 1.5px at 30px 40px, #fff, transparent), radial-gradient(1px 1px at 120px 90px, #fff, transparent), radial-gradient(1.5px 1.5px at 210px 30px, #ffe9a8, transparent), radial-gradient(1px 1px at 300px 120px, #fff, transparent);
	background-size: 340px 160px; }
.tr-don-hero-txt { position: relative; z-index: 1; flex: 1; min-width: 0; }
.tr-don-kicker { display: inline-block; margin-bottom: 6px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3a2200; background: var(--gold); }
.tr-card .tr-don-hero h2 { margin: 0 0 8px; font-size: 34px; line-height: 1.15; color: #fff; }
.tr-don-hero p { margin: 0 0 14px; max-width: 520px; font-size: 16px; color: rgba(255,255,255,.9); }
.tr-don-hero p b { color: var(--gold-2); }
.tr-don-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-don-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.tr-don-chips svg { width: 20px; height: 20px; }
.tr-don-cofre { position: relative; z-index: 1; flex: 0 0 auto; width: 230px; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); animation: tr-don-flota 4s ease-in-out infinite; }
.tr-don-spark { position: absolute; z-index: 1; fill: var(--gold-2); animation: tr-don-brilla 2.4s ease-in-out infinite; }
.tr-don-spark.s1 { width: 18px; height: 18px; right: 250px; top: 24px; }
.tr-don-spark.s2 { width: 12px; height: 12px; right: 40px; top: 30px; animation-delay: -.8s; fill: #bdf6ff; }
.tr-don-spark.s3 { width: 14px; height: 14px; right: 150px; bottom: 26px; animation-delay: -1.6s; }
@keyframes tr-don-flota { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes tr-don-brilla { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
.tr-don-err { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: #ffe8ec; }

/* Formulario */
.tr-don-pay { margin: 0 0 30px; padding: 22px 24px; border-radius: var(--don-r); background: linear-gradient(135deg, #fff8e6, #f6efff); border: 2px solid #f1e3ff; }
.tr-card .tr-don-pay h3 { margin: 0 0 14px; }
.tr-don-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 16px; }
.tr-card .tr-don-q { flex-direction: column; gap: 2px; padding: 12px 8px; border-radius: 14px; color: var(--ink); background: #fff; border: 2px solid #e7ddfb; box-shadow: 0 4px 12px rgba(29,22,64,.08); }
.tr-card .tr-don-q b { font-family: var(--font-h); font-size: 19px; }
.tr-don-q small { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tr-card .tr-don-q:hover { box-shadow: 0 8px 18px rgba(29,22,64,.15); filter: none; }
.tr-card .tr-don-q.on { border-color: var(--violet); background: #f1e8ff; }
.tr-don-q.q-bronce b { color: #b8672e; } .tr-don-q.q-plata b { color: #6d7a8c; } .tr-don-q.q-oro b { color: #d18a00; } .tr-don-q.q-diamante b { color: #1793b8; }
.tr-don-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; font-weight: 700; }
.tr-don-inputs label { display: inline-flex; align-items: center; gap: 8px; }
.tr-don-inputs input { width: 110px; padding: 10px 12px; border-radius: 12px; border: 2px solid #ddd2f7; font: inherit; font-size: 18px; text-align: center; color: var(--ink); background: #fff; }
.tr-don-inputs input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,255,.2); }
.tr-don-eq { font-size: 22px; color: var(--ink-2); }
.tr-don-ready { display: flex; align-items: center; gap: 20px; }
.tr-don-ready > svg { flex: 0 0 auto; width: 96px; height: 96px; }
.tr-don-ready p { margin: 0 0 8px; }
.tr-don-ready .credit-amount-text { font-family: var(--font-h); font-size: 22px; }
.tr-don-ready .credit-amount { font-size: 30px; color: #d18a00; }
.tr-don-hold { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }

/* Pasos */
.tr-card h3.tr-don-h { margin: 0 0 14px; font-size: 22px; }
.tr-don-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 30px; padding: 0; list-style: none; counter-reset: dpaso; }
.tr-don-steps li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px 18px; border-radius: var(--don-r); background: #f8f5ff; counter-increment: dpaso; }
.tr-don-steps li::before { content: counter(dpaso); position: absolute; top: 14px; right: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-h); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--violet), var(--blue)); }
.tr-don-steps svg { width: 64px; height: 64px; margin-bottom: 6px; }
.tr-don-steps b { font-family: var(--font-h); font-size: 18px; }
.tr-don-steps span { font-size: 14px; color: var(--ink-2); }

/* Tarjetas de la Tesorera */
.tr-don-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 30px; }
.tr-don-item { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; padding: 16px; border-radius: var(--don-r); background: #fff; border: 2px solid #efe9fb; transition: transform .2s, box-shadow .2s; }
.tr-don-item:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(29,22,64,.12); }
.tr-don-item svg { grid-row: 1 / 3; width: 56px; height: 56px; padding: 6px; border-radius: 16px; }
.tr-don-item b { font-family: var(--font-h); font-size: 17px; }
.tr-don-item span { font-size: 14px; color: var(--ink-2); }
.tr-don-item.c1 svg { background: #efe7ff; } .tr-don-item.c2 svg { background: #e6f1ff; } .tr-don-item.c3 svg { background: #fff4d6; }
.tr-don-item.c4 svg { background: #ffe8fa; } .tr-don-item.c5 svg { background: #e3fbff; } .tr-don-item.c6 svg { background: #ffe8ec; }

/* Rangos */
.tr-don-sub { margin: -6px 0 14px; color: var(--ink-2); }
.tr-don-ranks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 12px; }
.tr-don-rank { display: flex; flex-direction: column; align-items: center; padding: 18px 14px 16px; border-radius: var(--don-r); text-align: center; border: 2px solid transparent; transition: transform .2s, box-shadow .2s; }
.tr-don-rank:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 14px 28px rgba(29,22,64,.14); }
.tr-don-med { width: 86px; height: auto; margin-bottom: 6px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.tr-don-rank:hover .tr-don-med { animation: tr-don-gira .8s ease-in-out; }
@keyframes tr-don-gira { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
.tr-don-rn { font-family: var(--font-h); font-size: 22px; }
.tr-don-min { margin: 2px 0 10px; font-family: var(--font-h); font-size: 28px; font-weight: 700; line-height: 1.1; }
.tr-don-min small { display: block; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tr-don-rank ul { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.tr-don-rank li { padding: 3px 0; }
.tr-don-rank li + li { border-top: 1px dashed rgba(29,22,64,.12); }
.tr-don-rank.r-bronce   { --m1: #d98a4f; --m2: #9c5424; --m3: #ffd2a8; --rb1: #e2473d; --rb2: #b8322a; background: linear-gradient(180deg, #fff1e6, #fff); border-color: #f5d6bf; }
.tr-don-rank.r-plata    { --m1: #c9d3df; --m2: #8492a6; --m3: #ffffff; --rb1: #4d7cff; --rb2: #3456c9; background: linear-gradient(180deg, #eef3f8, #fff); border-color: #d8e0ea; }
.tr-don-rank.r-oro      { --m1: #ffc83d; --m2: #c9801a; --m3: #fff3b8; --rb1: #8b5cff; --rb2: #6a3df0; background: linear-gradient(180deg, #fff7dc, #fff); border-color: #ffe39a; }
.tr-don-rank.r-diamante { --m1: #6fdcff; --m2: #1793b8; --m3: #e8fbff; --rb1: #ff4fd8; --rb2: #c43ab0; background: linear-gradient(180deg, #e6fbff, #fff); border-color: #b5ecfb; box-shadow: 0 0 0 0 rgba(63,232,255,.5); animation: tr-don-aura 2.8s ease-in-out infinite; }
.tr-don-rank.r-bronce .tr-don-min { color: #b8672e; } .tr-don-rank.r-plata .tr-don-min { color: #6d7a8c; }
.tr-don-rank.r-oro .tr-don-min { color: #d18a00; } .tr-don-rank.r-diamante .tr-don-min { color: #1793b8; }
@keyframes tr-don-aura { 0%, 100% { box-shadow: 0 0 0 0 rgba(63,232,255,.0); } 50% { box-shadow: 0 0 22px 2px rgba(63,232,255,.45); } }
.tr-don-note { margin: 0; font-size: 14px; color: var(--ink-2); }

@media (max-width: 960px) {
	.tr-don-grid { grid-template-columns: repeat(2, 1fr); }
	.tr-don-ranks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
	.tr-don-hero { flex-direction: column-reverse; text-align: center; padding: 22px 18px; }
	.tr-don-hero p { margin-left: auto; margin-right: auto; }
	.tr-don-chips { justify-content: center; }
	.tr-don-cofre { width: 170px; }
	.tr-don-spark.s1 { right: auto; left: 20px; }
	.tr-card .tr-don-hero h2 { font-size: 27px; }
	.tr-don-steps, .tr-don-grid { grid-template-columns: 1fr; }
	.tr-don-quick { grid-template-columns: repeat(2, 1fr); }
	.tr-don-pay { padding: 18px 14px; }
	.tr-don-ready { flex-direction: column; text-align: center; }
}

/* ===== Cartas en tiempo real (modules/cartas) ===== */
.tr-cr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 22px; }
.tr-cr-stats > div { padding: 16px 18px; border-radius: 14px; background: #f6f2ff; display: flex; flex-direction: column; gap: 2px; }
.tr-cr-stats b { font-family: var(--font-h); font-size: 30px; line-height: 1.1; color: #6a3df0; }
.tr-cr-stats span { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.tr-cr-stats .mvp { background: linear-gradient(180deg, #fff0c2, #fffaf0); }
.tr-cr-stats .mvp b { color: #c07a00; }
.tr-cr-stats .live { justify-content: center; background: linear-gradient(135deg, #ffe9f1, #f3e9ff); }
.tr-cr-stats .live i { width: 12px; height: 12px; border-radius: 50%; background: #ff3b6b; box-shadow: 0 0 0 0 rgba(255,59,107,.6); animation: tr-cr-pulso 1.6s infinite; }
.tr-cr-stats .live span { font-family: var(--font-h); font-size: 18px; color: #e0245e; }
.tr-cr-stats .live small { color: var(--ink-2); font-size: 12px; }
@keyframes tr-cr-pulso { 0% { box-shadow: 0 0 0 0 rgba(255,59,107,.6); } 70% { box-shadow: 0 0 0 12px rgba(255,59,107,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,107,0); } }
.tr-cr-feed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.tr-cr-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 96px; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: #fff; border: 2px solid #eee6ff; border-left: 6px solid #8a5cff; transition: transform .2s, box-shadow .2s; }
.tr-cr-item:hover { transform: translateX(4px); box-shadow: 0 8px 22px rgba(106,61,240,.12); }
.tr-cr-item.mvp { border-color: #ffe2a3; border-left-color: #f5a700; background: linear-gradient(90deg, #fffaf0, #fff); }
.tr-cr-item.nuevo { animation: tr-cr-nuevo 2.4s ease-out; }
@keyframes tr-cr-nuevo { 0% { transform: scale(.96); background: #fff3b0; box-shadow: 0 0 0 4px rgba(255,200,0,.5); } 100% { transform: none; } }
.tr-cr-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #efe6ff, #e2f6ff); }
.tr-cr-item.mvp .tr-cr-ico { background: linear-gradient(135deg, #ffe7a0, #fff4d6); }
.tr-cr-txt { min-width: 0; display: flex; flex-direction: column; }
.tr-cr-carta { font-family: var(--font-h); font-weight: 600; font-size: 17px; color: var(--ink) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-cr-txt span { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-cr-quien { font-size: 14px; text-align: right; white-space: nowrap; }
.tr-cr-quien.suelo { color: #c07a00; font-weight: 800; }
.tr-cr-quien.nadie { color: var(--ink-2); }
.tr-cr-t { font-size: 13px; color: var(--ink-2); text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
	.tr-cr-stats { grid-template-columns: 1fr 1fr; }
	.tr-cr-stats .live { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
	.tr-cr-item { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; }
	.tr-cr-ico { width: 40px; height: 40px; font-size: 20px; grid-row: span 2; }
	.tr-cr-quien, .tr-cr-t { text-align: left; grid-column: 2; }
}
.tr-nav .tr-lnk { white-space: nowrap; }   /* que 'Juego' no se parta al añadir 'Cartas' */

/* =====================================================================
   Visual 2026-11-27: categorías del salón, imágenes de monstruos y cartas,
   vitrina de MVP, hero con fondo, clima de Midgard, aviso de cookies
   ===================================================================== */
/* Letra del sistema parecida si no se aceptan las fuentes de Google */
:root {
	--font:   'Nunito', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
	--font-h: 'Fredoka', 'Nunito', 'Segoe UI Variable Display', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}

/* Aparición al hacer scroll: más corta para no ver huecos al bajar rápido */
.tr-rv { transform: translateY(18px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.tr-rv.d1 { transition-delay: .06s; } .tr-rv.d2 { transition-delay: .12s; }

/* ---------- Hero con ilustración de fondo ---------- */
.tr-hero2::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: var(--tr-hero-bg) center 30% / cover no-repeat; opacity: .28; filter: saturate(1.15);
	-webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.tr-hero2::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: linear-gradient(90deg, rgba(26,11,69,.85) 0%, rgba(26,11,69,.35) 55%, rgba(26,11,69,.1) 100%);
}

/* ---------- Salón: categorías + pestañas de la categoría ---------- */
.tr-cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 2px solid #eee6ff; }
.tr-cats a {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px;
	font-family: var(--font-h); font-weight: 600; font-size: 16px; color: var(--ink) !important; text-decoration: none !important;
	background: #fff; border: 2px solid #e7dcff; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tr-cats a span { font-size: 20px; line-height: 1; }
.tr-cats a:hover { transform: translateY(-2px); border-color: #c9b3ff; }
.tr-cats a.on { color: #fff !important; border-color: transparent; background: linear-gradient(135deg, #2a0f5e, #6a3df0); box-shadow: 0 8px 22px rgba(106,61,240,.35); }
.tr-tabs a { padding: 7px 14px; font-size: 14px; }
.tr-tabsel { display: none; }

/* Podio: el 1º en el centro y más alto */
.tr-podium { align-items: end; }
.tr-podium div.p1 { order: 2; padding-top: 28px; padding-bottom: 26px; }
.tr-podium div.p2 { order: 1; background: linear-gradient(180deg, #eef1f7, #f8f9fc); }
.tr-podium div.p3 { order: 3; background: linear-gradient(180deg, #fbe7d8, #fff7f1); }
.tr-podium div.p1 .m { font-size: 44px; filter: drop-shadow(0 4px 10px rgba(255,180,0,.45)); }
.tr-podium div.p1 .n { font-size: 18px; }

/* Imágenes de monstruos en tablas */
.tr-mobcell { white-space: nowrap; }
.tr-mobi { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; margin-right: 8px; image-rendering: auto; }

/* ---------- Cartas: ilustración de la carta y monstruo ---------- */
.tr-cr-item { grid-template-columns: 52px minmax(0, 1fr) auto 96px; }
.tr-cr-ico { width: 52px; height: 72px; padding: 0; overflow: hidden; border-radius: 8px; text-decoration: none !important; box-shadow: 0 4px 12px rgba(42,15,94,.18); transition: transform .2s; }
.tr-cr-ico:hover { transform: scale(1.08) rotate(-2deg); }
.tr-cr-ico img.carta { display: block; width: 100%; height: 100%; object-fit: cover; }
.tr-cr-ico .emo { font-size: 24px; }
.tr-cr-mob { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.tr-cr-mob img.mob { width: 26px; height: 26px; object-fit: contain; }

/* ---------- Portada: últimos MVP / vitrina ---------- */
.tr-mvps { margin-top: 14px; padding: 18px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.tr-tops:empty + .tr-mvps { margin-top: 0; }
.tr-mvps h4 { margin: 0 0 4px; font-family: var(--font-h); font-weight: 600; font-size: 17px; color: var(--gold-2); }
.tr-mvps p { margin: 0 0 10px; font-size: 14px; color: var(--txt-2); }
.tr-mvps-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tr-mvps.vitrina .tr-mvps-in { grid-template-columns: repeat(3, 1fr); }
.tr-mvp { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.06); transition: transform .2s, background .2s; }
.tr-mvp:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); }
.tr-mvp .pic { display: grid; place-items: end center; width: 84px; height: 84px; }
.tr-mvp .pic img { max-width: 84px; max-height: 84px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); animation: tr-float 6s ease-in-out infinite; }
.tr-mvp:nth-child(2n) .pic img { animation-delay: -2s; } .tr-mvp:nth-child(3n) .pic img { animation-delay: -4s; }
.tr-mvp b { margin-top: 6px; font-size: 14px; line-height: 1.2; }
.tr-mvp small { font-size: 12px; color: var(--txt-2); }
.tr-cifras { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; color: var(--txt-2); }
.tr-cifras b { color: var(--gold); font-size: 17px; }

/* ---------- Midgard ahora mismo: una ficha por ciudad con color de su clima ---------- */
.tr-mv-clima { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tr-mv-clima span { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; white-space: normal; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.tr-mv-clima span i { grid-row: span 2; font-style: normal; font-size: 28px; line-height: 1; }
.tr-mv-clima span b { font-size: 14px; line-height: 1.2; }
.tr-mv-clima span small { font-size: 12px; font-weight: 700; opacity: .85; }
.tr-mv-clima .c0 { background: linear-gradient(135deg, rgba(255,200,61,.22), rgba(255,255,255,.06)); }
.tr-mv-clima .c1 { background: linear-gradient(135deg, rgba(120,110,255,.35), rgba(255,255,255,.06)); }
.tr-mv-clima .c2 { background: linear-gradient(135deg, rgba(200,210,230,.25), rgba(255,255,255,.06)); }
.tr-mv-clima .c3 { background: linear-gradient(135deg, rgba(140,220,255,.32), rgba(255,255,255,.06)); }
.tr-mv-clima .c4 { background: linear-gradient(135deg, rgba(255,120,50,.35), rgba(255,255,255,.06)); }
.tr-mv-clima .c5 { background: linear-gradient(135deg, rgba(220,30,60,.45), rgba(255,255,255,.06)); border-color: rgba(255,90,110,.5); }
.tr-mv-clima .c6 { background: linear-gradient(135deg, rgba(90,230,190,.28), rgba(255,255,255,.06)); }

/* ---------- Aviso de cookies ---------- */
.tr-ck { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; display: flex; justify-content: center; pointer-events: none; }
.tr-ck[hidden] { display: none; }
.tr-ck-in {
	pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; max-width: 980px; width: 100%;
	padding: 18px 20px; border-radius: 20px; color: #fff; background: rgba(32,14,84,.96); border: 1px solid rgba(255,255,255,.18);
	box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(139,92,255,.3); backdrop-filter: blur(12px); animation: tr-rise .45s ease-out both;
}
.tr-ck-ico { font-size: 38px; line-height: 1; }
.tr-ck-tx b { font-family: var(--font-h); font-weight: 600; font-size: 18px; }
.tr-ck-tx p { margin: 4px 0 6px; font-size: 14px; line-height: 1.5; color: var(--txt-2); }
.tr-ck-tx p strong { color: #fff; }
.tr-ck details { font-size: 13px; color: var(--txt-2); }
.tr-ck summary { cursor: pointer; color: var(--cyan); font-weight: 700; }
.tr-ck details ul { margin: 6px 0 0; padding-left: 18px; }
.tr-ck code { font-size: 12px; color: var(--gold-2); }
.tr-ck-bt { display: flex; flex-direction: column; gap: 8px; }
.tr-ck-bt .tr-btn { white-space: nowrap; cursor: pointer; border: 0; font-family: var(--font-h); }
.tr-ck-bt .tr-btn.glass { color: #fff; }
body:has(.tr-ck:not([hidden])) .tr-dc-float { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
	.tr-mvps-in { grid-template-columns: repeat(3, 1fr); }
	.tr-mv-clima { grid-template-columns: repeat(2, 1fr); }
	.tr-ck-in { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
	.tr-ck-ico { display: none; }
	.tr-ck-bt { flex-direction: row; }
	.tr-ck-bt .tr-btn { flex: 1; }
}
@media (max-width: 640px) {
	.tr-cats, .tr-tabs { display: none; }
	.tr-tabsel { display: block; width: 100%; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; border: 2px solid #e7dcff; background: #fff; color: var(--ink); font: 700 16px var(--font); }
	.tr-podium div.p1, .tr-podium div.p2, .tr-podium div.p3 { order: 0; }
	.tr-cr-item { grid-template-columns: 44px minmax(0, 1fr); }
	.tr-cr-ico { width: 44px; height: 62px; }
	.tr-hero2::after { background: rgba(26,11,69,.55); }
}
@media (prefers-reduced-motion: reduce) {
	.tr-mvp .pic img { animation: none; }
	.tr-ck-in { animation: none; }
}

/* TerraRO 2026-11-28: nombres de los rankings enlazan al perfil */
a.tr-pj { color: inherit; text-decoration: none; }
a.tr-pj:hover strong { text-decoration: underline; color: var(--violet); }
