/* ==========================================================================
   Guía y Códice (/como-jugar) — agente Gc, 2026-10-14.
   Misma dirección de arte que la portada (landing.css): cielo con rayos, pradera, cartel de madera, pergamino, tinta azul y oro del HUD.
   Clases propias con prefijo `ht-`; solo usa las variables de shell.css (--oro, --tinta, --pergamino…) y la cabecera común (--hdr-h).
   Nada de utilidades de Tailwind: la página se ve igual con la CDN caída.
   ========================================================================== */

/* base.html pone `h-full` (height: 100%) en <html> y <body>: el body mide solo una ventana y la cabecera pegajosa deja de pegarse al pasar de ahí.
   Aquí la página es larga y lleva una barra pegajosa debajo de la cabecera, así que se deja la altura automática (aviso en el informe de Gc). */
html.h-full, body.se-body.h-full { height: auto; min-height: 100%; }
.ht { --ht-bar: 60px; --ht-top: calc(var(--hdr-h, 60px) + var(--ht-bar)); display: block; color: var(--claro); }
.ht *, .ht *::before, .ht *::after { box-sizing: border-box; }
.ht-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ht-wrap { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.ht-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ht img { max-width: 100%; }
.ht :focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.ht-hero :focus-visible, .ht-band--meadow :focus-visible, .ht-dlg__panel :focus-visible { outline-color: var(--tinta-3); }

/* ---------- Colores por categoría (rango del dragón, clase del héroe, tipo de edificio): --t-lite = fondo claro, --t-dark = cinta (texto blanco, contraste AA) ---------- */
.ht [data-tint] { --t-lite: #bfe3f6; --t-dark: #1a5a91; }
.ht [data-tint="elemental"], .ht [data-tint="warriors"] { --t-lite: #c4e88a; --t-dark: #2c7418; }
.ht [data-tint="epic"], .ht [data-tint="heroes"], .ht [data-tint="military"] { --t-lite: #9bd6f6; --t-dark: #1a5a91; }
.ht [data-tint="legendary"], .ht [data-tint="legends"], .ht [data-tint="economy"] { --t-lite: #ffe27a; --t-dark: #94560a; }
.ht [data-tint="supreme"], .ht [data-tint="creatures"] { --t-lite: #ffaa9b; --t-dark: #a3241d; }
.ht [data-tint="mages"], .ht [data-tint="special"] { --t-lite: #d6c3f7; --t-dark: #5b34a1; }
.ht [data-tint="trolls"] { --t-lite: #d3dc9a; --t-dark: #4a6a17; }
.ht [data-tint="siege"] { --t-lite: #e6c598; --t-dark: #7a4a1c; }
.ht [data-tint="support"] { --t-lite: #a8e8dc; --t-dark: #0f6a63; }
.ht [data-tint="defense"] { --t-lite: #d3dde8; --t-dark: #3f5a77; }

/* ==========================================================================
   Cabecera de la página: cielo, rayos, título con el tratamiento del logotipo y una escena con arte del juego
   ========================================================================== */
.ht-hero {
  position: relative; isolation: isolate; overflow: hidden; padding: 30px 0 112px; color: var(--texto);
  background: linear-gradient(180deg, #b7def2 0%, #d6edf9 48%, #eaf7fd 100%);
}
.ht-hero__sun {
  position: absolute; inset: -30% -20% -10% -20%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from -90deg at 70% 56%, rgba(255, 255, 255, 0.62) 0 6.5deg, rgba(255, 255, 255, 0) 6.5deg 13deg);
  -webkit-mask-image: radial-gradient(circle at 70% 56%, #000 0, #000 26%, transparent 66%); mask-image: radial-gradient(circle at 70% 56%, #000 0, #000 26%, transparent 66%);
  animation: ht-sun 160s linear infinite;
}
@keyframes ht-sun { to { transform: rotate(360deg); } }
.ht-hero__in { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(16px, 3vw, 48px); align-items: center; }
.ht-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px 6px 10px; border-radius: 99px;
  background: var(--tinta-2); color: var(--oro-claro); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 3px 0 var(--tinta);
}
.ht-kicker svg { color: var(--oro); }
.ht-h1 { font-size: clamp(2.8rem, 5.4vw, 4.9rem); margin: 0 0 0.3em; text-wrap: balance; }
.ht-lead { margin: 0 0 26px; max-width: 34em; font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.6; color: #153250; }
.ht-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.ht-btn-big { min-height: 56px; padding: 0 28px; font-size: 1.08rem; border-radius: 14px; }
.ht-btn-ghost { background: #fff; color: var(--tinta-2); border-color: var(--tinta-2); box-shadow: 0 4px 0 var(--tinta-2), 0 8px 16px rgba(0, 0, 0, 0.14); }
.ht-btn-ghost:hover { background: #f3fbff; }
.ht-btn-ghost:active { box-shadow: 0 2px 0 var(--tinta-2); }
.ht-facts { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.ht-facts li {
  display: flex; align-items: baseline; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(18, 48, 79, 0.18); color: #153250; font-weight: 800; font-size: 0.92rem;
}
.ht-facts b { font: 700 1.35rem/1 var(--f-num); color: var(--rojo); min-width: 1.5ch; }

.ht-hero__art { position: relative; width: 100%; max-width: clamp(380px, calc((100vh - 330px) * 1.12), 540px); justify-self: center; aspect-ratio: 1.12 / 1; }
.ht-art__ground {
  position: absolute; left: 4%; right: 4%; bottom: 3%; height: 36%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #9ed04a 0, #86bb3a 58%, #6aa02e 100%); box-shadow: 0 10px 0 #4a7d1f, inset 0 0 0 3px rgba(255, 255, 255, 0.16);
}
.ht-art__castle { position: absolute; left: 50%; bottom: 17%; width: 40%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 14px 10px rgba(11, 42, 70, 0.3)); }
.ht-art__card {
  position: absolute; display: block; padding: 5px; border-radius: 13px; line-height: 0; transform: rotate(var(--r, 0deg));
  background: linear-gradient(180deg, var(--oro-claro), var(--oro) 45%, var(--oro-hondo)); border: 2px solid var(--oro-borde);
  box-shadow: 0 4px 0 var(--oro-borde), 0 14px 18px rgba(11, 42, 70, 0.28); animation: ht-bob 6s ease-in-out infinite alternate; animation-delay: var(--d, 0s);
}
.ht-art__card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #fff; }
.ht-art__card--a { --r: -7deg; --d: -1s; left: 3%; top: 15%; width: 21%; }
.ht-art__card--b { --r: 6deg; --d: -3s; right: 2%; top: 7%; width: 24%; }
.ht-art__card--c { --r: -4deg; --d: -2s; right: 5%; top: 47%; width: 17%; }
@keyframes ht-bob { from { transform: translateY(0) rotate(var(--r, 0deg)); } to { transform: translateY(-9px) rotate(var(--r, 0deg)); } }
.ht-art__king { position: absolute; left: 17%; bottom: 10%; width: 11%; height: auto; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.3)); }
.ht-art__troll { position: absolute; right: 18%; bottom: 8%; width: 16%; height: auto; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.3)); }
.ht-art__chest { position: absolute; left: 33%; bottom: 5%; width: 12%; height: auto; filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.3)); }
.ht-hero__edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 76px; display: block; }

/* ==========================================================================
   Navegación por secciones: cartel de madera que se queda bajo la cabecera común (--hdr-h la mide shell_menu.js)
   ========================================================================== */
.ht-tabbar {
  position: sticky; top: var(--hdr-h, 60px); z-index: 40; background: #6a4421;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 3px, rgba(255, 255, 255, 0.03) 3px 10px), linear-gradient(180deg, #93673a, #6a4421);
  border-block: 3px solid #3a230e; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 8px 16px rgba(2, 10, 20, 0.28);
}
.ht-tabs { display: flex; justify-content: flex-start; gap: 8px; padding: 7px 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.ht-tabs::-webkit-scrollbar { display: none; }
.ht-tab:first-child { margin-left: auto; }
.ht-tab:last-child { margin-right: auto; }
.ht-tab {
  flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 7px; scroll-snap-align: center;
  border: 2px solid rgba(0, 0, 0, 0.25); border-radius: 12px; background: rgba(36, 20, 6, 0.38); color: #fff3d2;
  font: 800 0.98rem/1 var(--f-body); letter-spacing: 0.01em; white-space: nowrap; transition: transform 0.08s ease, background-color 0.15s, filter 0.15s;
}
.ht-tab:hover { background: rgba(36, 20, 6, 0.2); }
.ht-tab:active { transform: translateY(2px); }
.ht-tab__pic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.ht-tab__n { min-width: 2.2em; padding: 3px 7px; border-radius: 99px; background: rgba(0, 0, 0, 0.35); color: #fff3d2; font: 700 0.78rem/1 var(--f-num); text-align: center; }
.ht-tab[aria-selected="true"] {
  background: linear-gradient(180deg, var(--oro-claro) 0%, var(--oro) 45%, #f0a800 100%); color: #3b2300; border-color: var(--oro-borde); box-shadow: 0 3px 0 var(--oro-borde);
}
.ht-tab[aria-selected="true"] .ht-tab__n { background: rgba(59, 35, 0, 0.82); color: var(--oro-claro); }
.ht-tab[aria-selected="true"]:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--oro-borde); }

/* ==========================================================================
   Escenario y paneles (transición entre pestañas)
   ========================================================================== */
.ht-stage { position: relative; background: linear-gradient(180deg, var(--tinta-2), var(--tinta) 520px); }
.ht-panel { display: block; scroll-margin-top: calc(var(--ht-top) + 6px); outline: none; animation: ht-panel-in 0.34s ease-out both; }
.ht-panel[hidden] { display: none; }
.ht-panel--data { padding: 54px 0 96px; background: radial-gradient(rgba(255, 255, 255, 0.045) 2px, transparent 3px) 0 0 / 40px 40px; }
@keyframes ht-panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ht-head { margin-bottom: 26px; }
.ht-h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); text-wrap: balance; }
.ht-sub { margin: 14px 0 0; max-width: 46em; font-size: 1.06rem; line-height: 1.6; color: #e7f2fb; }
.ht-sub--note { margin-top: 8px; font-size: 0.92rem; color: var(--apagado); }

/* ---------- Bandas de la guía (alternan como en la portada: pradera, tinta, bosque, cierre) ---------- */
.ht-band { position: relative; padding: 70px 0 84px; scroll-margin-top: calc(var(--ht-top) + 6px); }
.ht-band--meadow { background: var(--pradera) radial-gradient(rgba(255, 255, 255, 0.07) 2px, transparent 3px) 0 0 / 40px 40px; padding-top: 40px; color: var(--texto); }
.ht-band--ink { background: linear-gradient(180deg, var(--tinta-2), var(--tinta)); }
.ht-band--forest { background: var(--pradera-honda) radial-gradient(rgba(255, 255, 255, 0.05) 2px, transparent 3px) 0 0 / 40px 40px; }
.ht-band--final { background: var(--tinta); border-top: 6px solid var(--madera-clara); padding: 64px 0 70px; }
.ht-lead2 { margin: 16px 0 0; max-width: 44em; font-size: 1.08rem; line-height: 1.6; font-weight: 600; color: var(--tinta); }
.ht-lead2--light { color: #e7f2fb; font-weight: 400; }
.ht-plank + .ht-lead2 { text-align: center; margin-inline: auto; }

/* Salto a subsecciones */
.ht-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.ht-jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 99px; text-decoration: none; font-weight: 800; font-size: 0.95rem;
  color: #fff; background: linear-gradient(180deg, #93673a, #6a4421); border: 2px solid #3a230e; box-shadow: 0 3px 0 #2a1709; transition: transform 0.08s ease, filter 0.15s;
}
.ht-jump a:hover { filter: brightness(1.12); }
.ht-jump a:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1709; }

/* Pergamino (como las notas de «Así se juega») */
.ht-note {
  position: relative; padding: 20px 26px 22px; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10;
  border: 3px solid var(--pergamino-borde); border-radius: 14px; box-shadow: 0 5px 0 #7d5d28, 0 16px 24px rgba(0, 0, 0, 0.16);
}
.ht-note__h { margin: 0 0 8px; font: 700 clamp(1.5rem, 2.4vw, 1.9rem)/1.12 var(--f-display); color: var(--rojo-hondo); text-wrap: balance; }
.ht-note p { margin: 0 0 10px; font-size: 1.04rem; line-height: 1.6; }
.ht-note p:last-child { margin-bottom: 0; }
.ht-note em { font-style: normal; font-weight: 800; color: #6b3d00; background: rgba(255, 194, 26, 0.35); padding: 0 4px; border-radius: 4px; }
.ht-about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr); gap: clamp(18px, 3vw, 44px); align-items: center; margin-bottom: 66px; }
.ht-about__art { margin: 0; display: grid; place-items: center; }
.ht-about__art img { width: min(100%, 250px); height: auto; filter: drop-shadow(0 16px 14px rgba(11, 42, 70, 0.35)); animation: ht-bob 7s ease-in-out infinite alternate; }

/* Cartel de madera con el título del paso a paso (como .lp-plank) */
.ht-plank {
  display: table; margin: 24px auto 0; position: relative; padding: 14px 44px 18px; max-width: 100%;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 3px, rgba(255, 255, 255, 0.03) 3px 10px), linear-gradient(180deg, #93673a, #6a4421);
  border: 4px solid #3a230e; border-radius: 12px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.22), 0 8px 0 #2a1709, 0 20px 26px rgba(0, 0, 0, 0.22);
}
.ht-plank::before, .ht-plank::after {
  content: ""; position: absolute; top: -34px; width: 7px; height: 34px; background: repeating-linear-gradient(180deg, #d8bd82 0 5px, #8f7443 5px 10px); border-radius: 2px;
}
.ht-plank::before { left: 22%; } .ht-plank::after { right: 22%; }
.ht-plank .ht-h2 { scroll-margin-top: calc(var(--ht-top) + 40px); text-align: center; }

/* ---------- Paso a paso: seis paradas en el camino de tierra ---------- */
.ht-steps { list-style: none; counter-reset: paso; margin: 54px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; position: relative; }
.ht-steps::before {
  content: ""; position: absolute; left: 3%; right: 3%; top: 168px; height: 14px; border-radius: 10px; opacity: 0.9;
  background: repeating-linear-gradient(90deg, #dcc48f 0 16px, transparent 16px 32px);
}
.ht-step { counter-increment: paso; position: relative; display: flex; flex-direction: column; min-width: 0; }
.ht-step::after {
  content: counter(paso); position: absolute; left: 50%; top: 148px; transform: translateX(-50%); z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--oro); border: 3px solid var(--oro-borde); color: #3b2300; font: 700 1.25rem/1 var(--f-num);
  box-shadow: 0 3px 0 var(--oro-borde), 0 0 0 5px rgba(95, 155, 43, 0.9);
}
.ht-step__art { position: relative; height: 148px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding-bottom: 22px; }
.ht-step__art::before {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 10px; height: 54%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #9ed04a 0, #86bb3a 60%, #6aa02e 100%); box-shadow: 0 6px 0 #4a7d1f, inset 0 0 0 3px rgba(255, 255, 255, 0.14);
}
.ht-step__art img { position: relative; display: block; height: auto; width: auto; max-width: 62%; max-height: 112px; }
.ht-step__art img[src*="aldean"] { width: 38px; }
.ht-step__tree { margin-left: -20px; }
.ht-step__art--cards { gap: 6px; align-items: center; padding-bottom: 28px; }
.ht-step__art--cards .ht-mini { position: relative; flex: none; width: 52px; padding: 3px; border-radius: 9px; line-height: 0; background: linear-gradient(180deg, var(--oro-claro), var(--oro)); border: 2px solid var(--oro-borde); box-shadow: 0 3px 0 var(--oro-borde); }
.ht-step__art--cards .ht-mini:nth-child(1) { transform: rotate(-6deg); }
.ht-step__art--cards .ht-mini:nth-child(3) { transform: rotate(6deg); }
.ht-step__art--cards .ht-mini img { width: 100%; max-width: none; max-height: none; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #fff; }
.ht-step__body {
  position: relative; flex: 1; margin-top: 30px; padding: 16px 14px 16px; text-align: center; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10;
  border: 3px solid var(--pergamino-borde); border-radius: 14px; box-shadow: 0 5px 0 #7d5d28, 0 14px 20px rgba(0, 0, 0, 0.16);
}
.ht-step__body h3 { margin: 0 0 6px; font: 700 1.14rem/1.15 var(--f-display); color: var(--rojo-hondo); text-wrap: balance; }
.ht-step__body p { margin: 0; font-size: 0.93rem; line-height: 1.5; }
.ht-step__body em { font-style: normal; font-weight: 800; color: #6b3d00; background: rgba(255, 194, 26, 0.35); padding: 0 3px; border-radius: 4px; }

/* ---------- Recursos: tarjetas de pergamino con el icono original del juego ---------- */
.ht-res { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.ht-rescard { grid-column: span 2; display: flex; flex-direction: column; padding: 0 0 20px; overflow: hidden; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10; border: 3px solid var(--pergamino-borde); border-radius: 16px; box-shadow: 0 5px 0 #7d5d28, 0 16px 24px rgba(0, 0, 0, 0.22); }
.ht-rescard:nth-child(n+4) { grid-column: span 3; }
.ht-rescard__head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: linear-gradient(180deg, var(--rc-lite, #ffe27a), var(--rc-dark, #d98e00)); border-bottom: 3px solid var(--pergamino-borde); }
.ht-rescard__head img { flex: none; display: block; width: auto; height: 52px; max-width: 110px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.28)); }
.ht-rescard__head h3 { margin: 0; padding: 7px 18px 8px; border-radius: 99px; background: rgba(11, 29, 50, 0.82); border: 2px solid rgba(0, 0, 0, 0.3); font: 700 1.55rem/1.05 var(--f-display); color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.ht-rescard[data-res="gold"] { --rc-lite: #ffd34a; --rc-dark: #b87000; }
.ht-rescard[data-res="wood"] { --rc-lite: #c28746; --rc-dark: #6b4220; }
.ht-rescard[data-res="food"] { --rc-lite: #e8695b; --rc-dark: #8f2a20; }
.ht-rescard[data-res="stone"] { --rc-lite: #96a6b6; --rc-dark: #4d5d6d; }
.ht-rescard[data-res="cash"] { --rc-lite: #7cc95c; --rc-dark: #2f6a1b; }
.ht-rescard__k { margin: 16px 20px 6px; font: 800 0.74rem/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: #684710; }
.ht-rescard__t { margin: 0 20px; font-size: 0.99rem; line-height: 1.55; }
.ht-src { list-style: none; margin: 0 20px 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ht-src li { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--tinta-2); color: var(--claro); border: 2px solid #3a230e; font-weight: 700; font-size: 0.84rem; line-height: 1.15; }
.ht-src img { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--oro); }
.ht-src small { display: block; font: 700 0.72rem/1 var(--f-num); color: var(--oro-claro); margin-top: 2px; }
.ht-src__empty { color: #684710; font-size: 0.9rem; font-weight: 700; }

/* ---------- Escalera de títulos ---------- */
.ht-ladder { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 204px), 1fr)); gap: 12px; }
.ht-rank {
  position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 4px 11px; align-items: center; padding: 9px 12px 9px 9px; border-radius: 14px;
  background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10; border: 3px solid var(--pergamino-borde); box-shadow: 0 4px 0 #7d5d28;
  animation: ht-rise 0.4s ease-out both; animation-delay: calc(min(var(--i, 0), 14) * 28ms);
}
.ht-rank__lv { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--oro-claro), var(--oro)); border: 3px solid var(--oro-borde); box-shadow: 0 2px 0 var(--oro-borde); color: #3b2300; font: 700 1.05rem/1 var(--f-num); }
.ht-rank__t { font: 700 0.95rem/1.12 var(--f-display); color: var(--rojo-hondo); overflow-wrap: break-word; hyphens: auto; align-self: end; }
.ht-rank__xp { font: 700 0.76rem/1 var(--f-num); color: #6b4f1a; align-self: start; }
.ht-rank--top { background: linear-gradient(180deg, #fff1a8, #ffd34a); border-color: var(--oro-borde); box-shadow: 0 4px 0 var(--oro-borde), 0 0 22px rgba(255, 226, 122, 0.55); }
.ht-rank--top::before { content: ""; position: absolute; right: 10px; bottom: 100%; width: 22px; height: 50px; margin-bottom: -6px; background: url("/img/landing/bandera.webp") center bottom / contain no-repeat; }
.ht-ladder__note { margin: 22px 0 0; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: rgba(6, 18, 31, 0.55); border: 2px solid var(--madera-clara); color: var(--oro-claro); font-weight: 800; }
@keyframes ht-rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Cierre ---------- */
.ht-final { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: center; }
.ht-final > img { width: min(220px, 24vw); height: auto; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.4)); }
.ht-final p { margin: 12px 0 22px; max-width: 36em; font-size: 1.1rem; color: var(--apagado); }

/* ==========================================================================
   Códice: barra de herramientas, rejilla de fichas, estado vacío
   ========================================================================== */
.ht-tools {
  display: grid; gap: 16px; padding: 16px 18px 18px; margin: 0 0 18px; border-radius: 16px; background: rgba(6, 18, 31, 0.62);
  border: 3px solid var(--madera-clara); box-shadow: 0 5px 0 var(--madera), 0 14px 24px rgba(0, 0, 0, 0.3);
}
.ht-tools__row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.ht-search { position: relative; flex: 1 1 280px; min-width: 0; }
.ht-search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--apagado); pointer-events: none; }
.ht-search input {
  width: 100%; min-height: 48px; padding: 0 48px 0 44px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.22); background: #06121f; color: var(--claro); font: inherit; font-size: 1rem;
}
.ht-search input::placeholder { color: #8ea6bf; }
.ht-search input:focus { border-color: var(--oro); outline: none; box-shadow: 0 0 0 3px rgba(255, 194, 26, 0.28); }
.ht-search input::-webkit-search-cancel-button { display: none; }
.ht-search button {
  position: absolute; right: 4px; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 10px; background: transparent; color: var(--apagado); font-size: 1.4rem; line-height: 1;
}
.ht-search button:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.ht-sel { display: grid; gap: 6px; min-width: 0; flex: 0 1 220px; }
.ht-sel span, .ht-chips legend { font: 800 0.74rem/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--oro-claro); padding: 0; }
.ht-sel select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 0 40px 0 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.22); color: var(--claro); font: inherit; font-weight: 700; font-size: 0.97rem;
  background: #06121f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffe27a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px 18px;
}
.ht-sel select:focus { border-color: var(--oro); outline: none; box-shadow: 0 0 0 3px rgba(255, 194, 26, 0.28); }
.ht-chips { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.ht-chips__in { display: flex; flex-wrap: wrap; gap: 8px; }
.ht-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.07); color: var(--claro);
  font: 800 0.93rem/1 var(--f-body); transition: transform 0.08s ease, background-color 0.15s;
}
.ht-chip:hover { background: rgba(255, 255, 255, 0.16); }
.ht-chip:active { transform: translateY(2px); }
.ht-chip small { font: 700 0.76rem/1 var(--f-num); opacity: 0.8; }
.ht-chip[aria-pressed="true"] { background: linear-gradient(180deg, var(--oro-claro), var(--oro) 50%, #f0a800); color: #3b2300; border-color: var(--oro-borde); box-shadow: 0 3px 0 var(--oro-borde); }
.ht-chip[aria-pressed="true"] small { opacity: 1; }

.ht-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; min-height: 44px; }
.ht-count { margin: 0; font-weight: 800; font-size: 1rem; color: var(--oro-claro); }
.ht-count b { font: 700 1.15rem var(--f-num); color: #fff; }
.ht-clear { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, 0.3); background: transparent; color: var(--claro); font-weight: 800; font-size: 0.9rem; }
.ht-clear:hover { background: rgba(255, 255, 255, 0.12); }
.ht-clear[hidden] { display: none; }

.ht-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 184px), 1fr)); gap: 18px 16px; }
/* Sin content-visibility: con ~120 fichas montadas por lotes no hace falta y las capturas de página completa dejaban huecos sin pintar */
.ht-grid > li { min-width: 0; }
.ht-card {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 14px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10; border: 3px solid var(--pergamino-borde); border-radius: 16px;
  box-shadow: 0 5px 0 #7d5d28, 0 12px 18px rgba(0, 0, 0, 0.28); transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s;
  animation: ht-rise 0.42s ease-out both; animation-delay: calc(min(var(--i, 0), 14) * 34ms);
}
.ht-card:hover { transform: translateY(-5px); box-shadow: 0 10px 0 #7d5d28, 0 22px 28px rgba(0, 0, 0, 0.32); filter: brightness(1.04); }
.ht-card:active { transform: translateY(2px); box-shadow: 0 2px 0 #7d5d28, 0 6px 10px rgba(0, 0, 0, 0.25); }
.ht-card:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
.ht-ribbon {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 18px); padding: 4px 11px; border-radius: 8px; border: 2px solid rgba(0, 0, 0, 0.3);
  background: var(--t-dark); color: #fff; font: 800 0.68rem/1.1 var(--f-body); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.ht-pic__wrap { display: block; flex: none; line-height: 0; }
.ht-pic {
  position: relative; isolation: isolate; display: block; flex: none; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; border: 3px solid var(--t-dark);
  background: radial-gradient(circle at 50% 30%, var(--t-lite), var(--t-dark)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 3px 0 rgba(0, 0, 0, 0.22);
}
.ht-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-100%); animation: ht-shine 1.4s ease-in-out infinite; pointer-events: none; }
.ht-pic.is-loaded::after, .ht-pic.is-broken::after { display: none; }
.ht-pic img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease; }
.ht-pic.is-loaded img { opacity: 1; }
.ht-pic__ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); }
.ht-pic__ph svg { width: 44%; height: 44%; }
@keyframes ht-shine { to { transform: translateX(100%); } }
.ht-card__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; min-height: 2.3em; font: 700 1rem/1.15 var(--f-display); color: var(--rojo-hondo); overflow-wrap: anywhere; }
.ht-card__sub { margin: -2px 0 0; font-size: 0.8rem; font-weight: 700; color: #6b4f1a; line-height: 1.2; }
.ht-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: auto; }
.ht-stat { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 7px; border-radius: 99px; background: var(--tinta-2); color: var(--claro); font: 700 0.8rem/1 var(--f-num); font-variant-numeric: tabular-nums; }
.ht-stat svg { width: 13px; height: 13px; flex: none; }
.ht-stat--life svg { color: #ff8a7c; } .ht-stat--attack svg { color: #ffd34a; } .ht-stat--lv svg { color: var(--apagado); } .ht-stat--pop svg { color: #8fd0f4; }

/* marcador mientras llega el catálogo */
.ht-card--skel { pointer-events: none; animation: none; min-height: 250px; }
.ht-card--skel i { display: block; border-radius: 8px; background: rgba(58, 42, 16, 0.14); }
.ht-card--skel i:nth-child(1) { width: 112px; height: 112px; border-radius: 14px; }
.ht-card--skel i:nth-child(2) { width: 80%; height: 14px; margin-top: 6px; }
.ht-card--skel i:nth-child(3) { width: 55%; height: 12px; }
.ht-card--skel::after { content: ""; position: absolute; inset: 0; border-radius: 13px; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%); transform: translateX(-100%); animation: ht-shine 1.4s ease-in-out infinite; }

.ht-empty, .ht-error {
  display: grid; justify-items: center; gap: 8px; padding: 34px 24px 38px; text-align: center; border-radius: 18px; color: #3a2a10;
  background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); border: 3px solid var(--pergamino-borde); box-shadow: 0 5px 0 #7d5d28, 0 16px 24px rgba(0, 0, 0, 0.22);
}
.ht-empty[hidden], .ht-error[hidden] { display: none; }
.ht-empty img { width: 64px; height: auto; margin-bottom: 4px; }
.ht-empty h3, .ht-error h3 { margin: 0; font: 700 1.5rem/1.15 var(--f-display); color: var(--rojo-hondo); }
.ht-empty p, .ht-error p { margin: 0 0 8px; max-width: 32em; font-size: 1.02rem; }
.ht-btn-wood { min-height: 44px; padding: 0 20px; border-radius: 12px; border: 2px solid #3a230e; background: linear-gradient(180deg, #93673a, #6a4421); color: #fff; font-weight: 800; font-size: 0.95rem; box-shadow: 0 3px 0 #2a1709; transition: transform 0.08s ease, filter 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.ht-btn-wood:hover { filter: brightness(1.12); }
.ht-btn-wood:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1709; }
.ht-btn-wood:disabled { opacity: 0.5; cursor: not-allowed; }
.ht-btn-wood svg { width: 18px; height: 18px; }

/* ==========================================================================
   Modos y minijuegos
   ========================================================================== */
.ht-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; }
.ht-mode { display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10; border: 3px solid var(--pergamino-borde); border-radius: 18px; box-shadow: 0 6px 0 #7d5d28, 0 18px 28px rgba(0, 0, 0, 0.3); animation: ht-rise 0.45s ease-out both; animation-delay: calc(min(var(--i, 0), 8) * 70ms); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.ht-mode:hover { transform: translateY(-4px); box-shadow: 0 10px 0 #7d5d28, 0 26px 34px rgba(0, 0, 0, 0.34); }
.ht-mode__art { position: relative; aspect-ratio: 16 / 7; background: var(--tinta-2); border-bottom: 3px solid var(--pergamino-borde); overflow: hidden; }
.ht-mode__art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ht-mode:hover .ht-mode__art img { transform: scale(1.05); }
.ht-mode__tags { position: absolute; inset: 10px 10px auto 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.ht-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; border: 2px solid rgba(0, 0, 0, 0.3); font: 800 0.72rem/1.1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--tinta-2); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.ht-tag--open { background: #2c7418; }
.ht-tag--open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b9f08a; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.ht-tag--lv { background: #1a5a91; }
.ht-tag--cat { background: rgba(11, 29, 50, 0.9); }
.ht-mode__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; flex: 1; }
.ht-mode__body h3 { margin: 0; font: 700 1.45rem/1.12 var(--f-display); color: var(--rojo-hondo); text-wrap: balance; }
.ht-mode__badge { margin: -4px 0 0; font: 800 0.76rem/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: #684710; }
.ht-mode__sum { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.ht-how { padding: 12px 14px; border-radius: 12px; background: rgba(58, 35, 14, 0.09); border: 2px dashed rgba(122, 85, 22, 0.45); }
.ht-how b { display: block; margin-bottom: 4px; font: 800 0.76rem/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: #684710; }
.ht-how p { margin: 0; font-size: 0.97rem; line-height: 1.55; }
.ht-reward { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 10px 14px; border-radius: 12px; background: var(--tinta-2); color: var(--oro-claro); font-weight: 800; font-size: 0.95rem; line-height: 1.35; }
.ht-reward img { flex: none; width: 38px; height: auto; }

/* ==========================================================================
   Ficha de detalle (cajón lateral / hoja inferior)
   ========================================================================== */
.ht-dlg { position: fixed; inset: 0; z-index: 140; display: flex; justify-content: flex-end; }
.ht-dlg[hidden] { display: none; }
.ht-dlg__back { position: absolute; inset: 0; background: rgba(4, 14, 26, 0.7); animation: ht-fade 0.2s ease-out both; }
.ht-dlg__panel {
  position: relative; width: min(500px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain; color: #3a2a10; outline: none;
  background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); border-left: 5px solid #3a230e; box-shadow: -14px 0 44px rgba(0, 0, 0, 0.55); animation: ht-slide 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes ht-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ht-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ht-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ht-dlg__head {
  position: relative; display: flex; align-items: flex-end; gap: 16px; padding: 22px 18px 18px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 18% 40%, var(--t-lite), var(--t-dark) 72%); border-bottom: 4px solid #3a230e;
}
.ht-dlg__head::before { content: ""; position: absolute; inset: -50% -20%; z-index: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg at 18% 60%, rgba(255, 255, 255, 0.2) 0 6deg, rgba(255, 255, 255, 0) 6deg 12deg); }
.ht-dlg__pic { position: relative; z-index: 1; flex: none; width: 128px; height: 128px; padding: 5px; border-radius: 18px; background: linear-gradient(180deg, var(--oro-claro), var(--oro) 45%, var(--oro-hondo)); border: 2px solid var(--oro-borde); box-shadow: 0 5px 0 var(--oro-borde), 0 14px 20px rgba(0, 0, 0, 0.35); }
.ht-dlg__pic .ht-pic { width: 100%; height: 100%; border-width: 0; border-radius: 12px; box-shadow: none; background: #fff; }
.ht-dlg__pic .ht-pic img { object-fit: cover; }
.ht-dlg__titles { position: relative; z-index: 1; min-width: 0; flex: 1; padding-bottom: 4px; }
.ht-dlg__titles h2 { font-size: clamp(1.5rem, 4vw, 1.95rem); overflow-wrap: anywhere; text-wrap: balance; }
.ht-dlg__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ht-dlg__tags li { padding: 4px 11px; border-radius: 99px; background: rgba(6, 18, 31, 0.78); color: #fff; font: 800 0.72rem/1.1 var(--f-body); letter-spacing: 0.07em; text-transform: uppercase; border: 2px solid rgba(255, 255, 255, 0.28); }
.ht-dlg__x { position: absolute; z-index: 2; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 2px solid rgba(0, 0, 0, 0.35); background: rgba(6, 18, 31, 0.72); color: #fff; }
.ht-dlg__x:hover { background: rgba(6, 18, 31, 0.92); }
.ht-dlg__x svg { width: 20px; height: 20px; }
.ht-dlg__body { padding: 20px 20px 10px; display: grid; gap: 22px; }
.ht-dlg h3 { margin: 0 0 10px; font: 800 0.78rem/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: #684710; }
.ht-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ht-bar { display: grid; grid-template-columns: 24px 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 0.95rem; font-weight: 700; }
.ht-bar svg { width: 20px; height: 20px; color: var(--bar, #3a2a10); }
.ht-bar__k { color: #5a421a; }
.ht-bar__track { position: relative; height: 14px; border-radius: 99px; background: #2a1709; border: 2px solid #3a230e; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4); }
.ht-bar__fill { display: block; height: 100%; width: var(--w, 0%); min-width: 6px; border-radius: 99px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), var(--bar, #58b43a) 40%, var(--bar, #58b43a)); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ht-bar__v { min-width: 4.2ch; text-align: right; font: 700 1.05rem/1 var(--f-num); color: #2a1709; font-variant-numeric: tabular-nums; }
.ht-bar--population { --bar: #8a5a2c; } .ht-bar--life { --bar: #4cae2f; } .ht-bar--attack { --bar: #d8342a; } .ht-bar--range { --bar: #2a8bd0; } .ht-bar--speed { --bar: #f0a91a; } .ht-bar--pop { --bar: #8a5a2c; }
.ht-facts2 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ht-facts2 li { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: rgba(58, 35, 14, 0.09); border: 2px solid rgba(122, 85, 22, 0.35); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #684710; }
.ht-facts2 b { display: inline-flex; align-items: center; gap: 8px; font: 700 1.1rem/1.1 var(--f-num); letter-spacing: 0; text-transform: none; color: #2a1709; }
.ht-facts2 img { width: 28px; height: 22px; object-fit: contain; }
.ht-specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ht-spec { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(58, 35, 14, 0.09); border: 2px solid rgba(122, 85, 22, 0.35); }
.ht-spec .ht-pic { width: 52px; height: 52px; border-width: 2px; border-radius: 10px; box-shadow: none; }
.ht-spec__n { font: 700 1.02rem/1.15 var(--f-display); color: var(--rojo-hondo); overflow-wrap: anywhere; }
.ht-spec__cd { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--tinta-2); color: var(--oro-claro); font: 700 0.82rem/1 var(--f-num); white-space: nowrap; }
.ht-spec__cd svg { width: 14px; height: 14px; }
.ht-note-s { margin: 10px 0 0; font-size: 0.84rem; color: #6b4f1a; }
.ht-dlg__nav { position: sticky; z-index: 5; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); margin-top: 16px; background: var(--pergamino); border-top: 3px solid rgba(122, 85, 22, 0.45); box-shadow: 0 -10px 14px rgba(58, 42, 16, 0.12); }
.ht-dlg__nav .ht-btn-wood { flex: 0 1 auto; min-width: 0; }
.ht-dlg__pos { font: 700 0.95rem var(--f-num); color: #5a421a; white-space: nowrap; }

/* ---------- Aviso (error al cargar el catálogo) ---------- */
.ht-toast { position: fixed; z-index: 150; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: min(520px, calc(100% - 28px)); display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: var(--tinta); color: var(--claro); border: 2px solid var(--madera-clara); box-shadow: var(--sombra); font-weight: 700; animation: ht-rise 0.25s ease-out both; }
.ht-toast[hidden] { display: none; }
.ht-toast button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--oro-borde); background: var(--oro); color: #3b2300; font-weight: 800; }
.ht-toast--error { border-color: #a3241d; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1240px) {
  .ht-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .ht-steps::before { display: none; }
  .ht-step::after { top: 148px; }
}
@media (max-width: 1020px) {
  .ht-hero__in { grid-template-columns: minmax(0, 1fr); }
  .ht-hero { padding-bottom: 100px; }
  .ht-hero__art { max-width: 520px; }
  .ht-about { grid-template-columns: minmax(0, 1fr); }
  .ht-about__art { display: none; }
  .ht-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-rescard, .ht-rescard:nth-child(n+4) { grid-column: span 1; }
  .ht-rescard:last-child { grid-column: 1 / -1; }
  .ht-final { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .ht-final .ht-cta { justify-content: center; }
}
@media (max-width: 760px) {
  .ht-wrap { width: calc(100% - 28px); }
  .ht-hero { padding: 26px 0 92px; }
  .ht-hero__art { max-width: 420px; }
  .ht-art__card--c { display: none; }
  .ht-btn-big { width: 100%; }
  .ht-cta { gap: 12px; }
  .ht-facts li { flex: 1 1 calc(50% - 10px); }
  .ht-steps { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 44px; padding-left: 0; }
  .ht-steps::before { display: block; left: 23px; right: auto; width: 14px; top: 22px; bottom: 22px; height: auto; background: repeating-linear-gradient(180deg, #dcc48f 0 16px, transparent 16px 32px); }
  .ht-step { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; align-items: center; padding-left: 52px; }
  .ht-step::after { left: 23px; top: 50%; transform: translate(-50%, -50%); }
  .ht-step__art { height: 108px; padding-bottom: 14px; }
  .ht-step__art img { max-height: 76px; }
  .ht-step__art--cards .ht-mini { width: 36px; }
  .ht-step__body { margin-top: 0; text-align: left; }
  .ht-res { grid-template-columns: minmax(0, 1fr); }
  .ht-rescard:last-child { grid-column: auto; }
  .ht-band { padding: 54px 0 60px; }
  .ht-panel--data { padding: 38px 0 70px; }
  .ht-ladder { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
  .ht-tools { padding: 14px 12px 16px; }
  .ht-sel { flex: 1 1 140px; }
  .ht-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .ht-pic { width: min(112px, 100%); height: auto; aspect-ratio: 1; }
  .ht-dlg { align-items: flex-end; justify-content: stretch; }
  .ht-dlg__panel { width: 100%; height: auto; max-height: 92dvh; border-left: 0; border-top: 5px solid #3a230e; border-radius: 22px 22px 0 0; animation-name: ht-sheet; }
  .ht-dlg__pic { width: 104px; height: 104px; }
  .ht-bar { grid-template-columns: 22px 86px minmax(0, 1fr) auto; }
}
@media (max-width: 420px) {
  .ht-sel { flex: 1 1 100%; }
  .ht-tab { padding-right: 12px; font-size: 0.92rem; }
  .ht-card { padding: 18px 6px 12px; }
  .ht-card__name { font-size: 0.92rem; }
  .ht-step { grid-template-columns: 72px minmax(0, 1fr); padding-left: 48px; }
  .ht-dlg__head { flex-direction: column; align-items: flex-start; }
}
@media (max-height: 520px) and (min-width: 761px) {
  .ht-dlg__panel { width: min(560px, 100%); }
}

/* ==========================================================================
   Alto contraste del panel de accesibilidad (html.se-hc, public/css/net.css): bordes blancos, fondos lisos y texto negro/blanco puro
   ========================================================================== */
html.se-hc .ht-band--meadow { background: #0f3a00; color: #fff; }
html.se-hc .ht-band--meadow .ht-lead2 { color: #fff; }
html.se-hc .ht-hero { background: #eaf6ff; }
html.se-hc .ht-note, html.se-hc .ht-step__body, html.se-hc .ht-rescard, html.se-hc .ht-card, html.se-hc .ht-mode, html.se-hc .ht-empty, html.se-hc .ht-error,
html.se-hc .ht-rank, html.se-hc .ht-dlg__panel { background: #fffbe8; color: #000; border-color: #000; box-shadow: 0 4px 0 #000; }
html.se-hc .ht-card__name, html.se-hc .ht-note__h, html.se-hc .ht-step__body h3, html.se-hc .ht-rank__t, html.se-hc .ht-mode__body h3, html.se-hc .ht-spec__n { color: #5a0000; }
html.se-hc .ht-card__sub, html.se-hc .ht-rank__xp, html.se-hc .ht-rescard__k, html.se-hc .ht-mode__badge, html.se-hc .ht-how b, html.se-hc .ht-dlg h3,
html.se-hc .ht-bar__k, html.se-hc .ht-dlg__pos, html.se-hc .ht-note-s, html.se-hc .ht-facts2 li { color: #000; }
html.se-hc .ht-tabbar { background: #1a1008; border-color: #fff; }
html.se-hc .ht-tab { background: #000; border-color: #fff; color: #fff; }
html.se-hc .ht-tab[aria-selected="true"], html.se-hc .ht-chip[aria-pressed="true"] { background: #ffe27a; color: #000; border-color: #fff; }
html.se-hc .ht-chip, html.se-hc .ht-clear { background: #000; border-color: #fff; color: #fff; }
html.se-hc .ht-tools, html.se-hc .ht-ladder__note { background: #000; border-color: #fff; }
html.se-hc .ht-search input, html.se-hc .ht-sel select { background-color: #000; border-color: #fff; color: #fff; }
html.se-hc .ht-stat, html.se-hc .ht-src li, html.se-hc .ht-reward, html.se-hc .ht-spec__cd { background: #000; color: #fff; }
html.se-hc .ht-ribbon, html.se-hc .ht-tag, html.se-hc .ht-dlg__tags li { border-color: #fff; color: #fff; }
html.se-hc .ht-jump a, html.se-hc .ht-btn-wood { background: #1a1008; border-color: #fff; color: #fff; }
html.se-hc .ht-bar__track { border-color: #000; }

@media (prefers-reduced-motion: reduce) {
  .ht-hero__sun, .ht-art__card, .ht-about__art img { animation: none; }
  .ht-panel, .ht-card, .ht-rank, .ht-mode, .ht-dlg__back, .ht-dlg__panel, .ht-toast { animation: none; }
  .ht-card:hover, .ht-mode:hover { transform: none; }
  .ht-pic::after, .ht-card--skel::after { animation: none; display: none; }
  .ht-bar__fill, .ht-pic img, .ht-mode__art img { transition: none; }
}
@media (forced-colors: active) {
  .ht-chip[aria-pressed="true"], .ht-tab[aria-selected="true"] { outline: 3px solid Highlight; }
}
