/* Fable Runner · web: el sistema de piezas (16-10-2026). Estilo A «Madera del juego», elegido por el usuario entre dos
   maquetas (docs/maquetas/web-2026-10-16): el de los menús del juego, «Bosque de madera» (tablones, pergamino, cinta
   verde y contorno de letra marrón #3d2208). Las piezas se llaman como en la web de Fable Match (barra, seccion,
   contenedor, btn, cab-sec, pie…), de la que se copió todo lo de dentro. Solo modo oscuro, como la de Fable Match: el
   bosque es oscuro por naturaleza. */

/* ---- Fuentes (locales, sin Google Fonts) ---- */
@font-face { font-family: Lilita; font-weight: 400; font-display: swap; src: url('/assets/fuentes/lilita-one-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url('/assets/fuentes/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url('/assets/fuentes/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: Nunito; font-weight: 900; font-display: swap; src: url('/assets/fuentes/nunito-latin-900-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --f-disp: Lilita, system-ui, sans-serif;
  --f-ui: Nunito, system-ui, sans-serif;
  --ancho: 1240px;
  --tinta: #3d2208;          /* el contorno de las letras, como Ui.Contorno del juego */
  --tinta-oro: #3d2208;
  --crema: #f3e4c2;          /* el texto sobre el bosque */
  --crema-2: #dcc69c;
  --tinta-p: #5a3510;        /* el texto sobre el pergamino */
  --tinta-p2: #8a5a20;
  --bosque: #16361a;
  --bosque-2: #112b16;
  --verde: #4cc424;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; min-width: 320px; overflow-x: hidden; color: var(--crema);
  font: 600 16px/1.55 var(--f-ui); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse 60% 30% at 50% 0%, rgba(140,210,90,.14), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 3px, transparent 3px 140px),
    linear-gradient(180deg, var(--bosque) 0%, var(--bosque) 30%, var(--bosque-2) 100%) var(--bosque);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
:focus-visible { outline: 3px solid #ffd34d; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .contenedor { padding: 0 32px; } }
.estrecho { max-width: 880px; }

/* ---- Tipografía ---- */
/* Los rótulos, como los del juego: Lilita blanca con contorno marrón y caída. El trazo va debajo del relleno
   (paint-order), así que se ve la mitad. */
.ty-disp { font-family: var(--f-disp); font-weight: 400; line-height: 1.04; color: #fff;
  -webkit-text-stroke: .15em var(--tinta); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--tinta), 0 .12em .14em rgba(0,0,0,.3); }
.contorno { font-family: var(--f-disp); font-weight: 400; color: #fff; -webkit-text-stroke: 4px var(--tinta); paint-order: stroke fill; }
/* Oro en el texto: el contorno y la caída con drop-shadow (el trazo taparía el oro) */
.oro-t { background: linear-gradient(180deg, #fff8d8 0%, #ffe07a 45%, #f2b126 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 0; text-shadow: none;
  filter: drop-shadow(2px 0 0 var(--tinta-oro)) drop-shadow(-2px 0 0 var(--tinta-oro)) drop-shadow(0 2px 0 var(--tinta-oro)) drop-shadow(0 -2px 0 var(--tinta-oro)) drop-shadow(0 3.5px 0 var(--tinta-oro)); }

/* ---- Materiales del juego ---- */
.madera { background: linear-gradient(180deg, rgba(0,0,0,.09) 0 2px, transparent 2px 100%) 0 0/100% 26px, linear-gradient(90deg, rgba(255,255,255,.04), rgba(0,0,0,.05) 50%, rgba(255,255,255,.04)), linear-gradient(#b67c3e, #94602a 55%, #7a4c1e); }
.madera-o { background: linear-gradient(90deg, rgba(0,0,0,.12) 0 2px, transparent 2px 100%) 0 0/48px 100%, linear-gradient(#7a4c22, #5e3a18 60%, #4a2c12); }
.pergamino { background: radial-gradient(ellipse at 50% 30%, #fff7df, #f6e3b8 70%, #ecd29a); color: var(--tinta-p); }
/* Marco de madera con el pergamino dentro (.marco.madera > .in.pergamino), como las ventanas del juego */
.marco { position: relative; border-radius: 22px; padding: 7px; box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 6px 0 #3d2208, 0 14px 24px rgba(0,0,0,.4); }
.marco > .in { position: relative; border-radius: 16px; height: 100%; box-shadow: inset 0 0 0 2px rgba(122,76,30,.25); }
/* El tablón oscuro con su marco (las novedades y la clasificación) */
.tablon { border-radius: 20px; box-shadow: 0 0 0 7px #a06a30, 0 0 0 10px #3d2208, 0 14px 24px rgba(0,0,0,.45); }
.placa { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 14px; line-height: 1.25; border-radius: 9px; box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 3px 0 #3d2208; }
.placa span { font: 900 12px/1 var(--f-ui); letter-spacing: 1.4px; text-transform: uppercase; color: #ffe9b8; }
/* La cinta verde de los títulos, con sus puntas */
.cinta-wrap { position: relative; z-index: 0; display: inline-block; max-width: calc(100% - 52px); }
.cinta { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 6px 40px; border-radius: 14px;
  background: linear-gradient(#a8f56c, #4cc424 55%, #2f9a14); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 5px 0 #217a0c, 0 10px 16px rgba(0,0,0,.3); }
.cinta::before, .cinta::after { content: ''; position: absolute; top: 12px; width: 40px; height: calc(100% - 6px); z-index: -1; background: linear-gradient(#3fa81c, #237a0c); }
.cinta::before { left: -26px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); }
.cinta::after { right: -26px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); }
.cinta .ty-disp { --tinta: #1d5a12; font-size: 32px; }
.chincheta { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9a8a, #e2301e 60%, #8e160a); box-shadow: 0 2px 2px rgba(0,0,0,.5); z-index: 2; }

/* ---- Píldoras como las del juego (Pintor.Pildora): degradado de 3 colores, filo blanco arriba y canto macizo
   debajo, sin aro ---- */
.btn { --c1: #a8f56c; --c2: #4cc424; --c3: #2f9a14; --edge: #1d5a12;
  position: relative; isolation: isolate; border: 0; height: 50px; padding: 0 28px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; text-decoration: none;
  font-family: var(--f-disp); font-weight: 400; font-size: 24px; line-height: 1; color: #fff;
  -webkit-text-stroke: .16em var(--edge); paint-order: stroke fill; text-shadow: 0 2px 0 var(--edge);
  background: linear-gradient(180deg, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 5px 0 var(--edge), 0 10px 16px rgba(0,0,0,.28);
  transition: transform .12s ease, filter .12s ease; }
.btn::before { content: ''; position: absolute; left: 12px; right: 12px; top: 3px; height: 42%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.05)); z-index: -1; pointer-events: none; }
a.btn:hover, button.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
a.btn:active, button.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 2px 0 var(--edge), 0 4px 8px rgba(0,0,0,.28); }
.btn.a { --c1: #ffe97a; --c2: #ffbf1a; --c3: #f09000; --edge: #8a4300; }
.btn.r { --c1: #ff8a6a; --c2: #ec3b2c; --c3: #c62818; --edge: #6a0a00; }
.btn.z { --c1: #8fd0ff; --c2: #3a8cff; --c3: #2266d8; --edge: #0d2366; }
.btn.gr { --c1: #f1e6cf; --c2: #cbb894; --c3: #a8946c; --edge: #5a4626; }
.btn.xl { height: 64px; padding: 0 38px; font-size: 31px; }
.btn.s { height: 40px; padding: 0 18px; font-size: 19px; box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 var(--edge), 0 6px 10px rgba(0,0,0,.25); }
.btn .tri { flex: none; width: 0; height: 0; border-left: 17px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  filter: drop-shadow(0 2px 0 var(--edge)) drop-shadow(1px 0 0 var(--edge)) drop-shadow(-1px 0 0 var(--edge)); }
.btn.xl .tri { border-left-width: 21px; border-top-width: 13px; border-bottom-width: 13px; }
/* Sin ficha en Google Play todavía: «Muy pronto», sin enlace */
.btn.pronto { --c1: #e6d4ae; --c2: #b99a66; --c3: #94784a; --edge: #4a3416; cursor: default; }

/* ---- Pastillas hundidas (las del juego: marrón oscuro con el icono saliendo por la izquierda) ---- */
.chip { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 14px 0 34px; border-radius: 99px; white-space: nowrap;
  background: linear-gradient(#3a2210, #573519); box-shadow: inset 0 2px 4px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.22); }
.chip img { position: absolute; left: -9px; top: 50%; width: 40px; height: 40px; margin-top: -20px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.chip .punto { position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #8ff06a; box-shadow: 0 0 0 3px rgba(143,240,106,.25), 0 0 10px #8ff06a; }
.chip .v { font: 400 20px/1 var(--f-disp); color: #fff; font-variant-numeric: tabular-nums; }
.chip .l { margin-left: 6px; font: 800 12px/1 var(--f-ui); color: #e8cf9a; }

/* ---- Etiquetas de las novedades ---- */
.n-etq { display: inline-block; padding: 4px 9px 3px; border-radius: 7px; font: 900 11px/1.2 var(--f-ui); letter-spacing: .8px; text-transform: uppercase; color: #fff; background: #3a9a1c; }
.e-actualizacion { background: #2a6fd6; } .e-niveles { background: #d97a0a; } .e-evento { background: #8a45e8; } .e-regalodeldia { background: #c9361e; }

/* ---- Marco de móvil vertical para las capturas ---- */
.movil { position: relative; border-radius: 30px; padding: 8px; aspect-ratio: 600 / 1067; background: linear-gradient(160deg, #3a3f4c, #101318 45%, #23272f);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 26px 50px -16px rgba(0,0,0,.6); }
.movil img { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; }

/* ---- Avatar de la clasificación: iniciales sobre su color (como en el juego, sin personajes) ---- */
.ini { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font: 400 16px/1 var(--f-disp); color: #fff;
  -webkit-text-stroke: 3px rgba(0,0,0,.35); paint-order: stroke fill; background: var(--av, #3a8cff); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 2px 0 rgba(0,0,0,.25); }

/* ---- Formularios (sobre pergamino) ---- */
.form-web { display: grid; gap: 14px; margin-top: 18px; padding: 18px; border-radius: 16px; background: rgba(122,76,30,.1); box-shadow: inset 0 0 0 2px rgba(122,76,30,.25); }
.form-web label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 900; }
.form-web small { font-weight: 700; color: var(--tinta-p2); }
.form-web input:not([type=checkbox]), .form-web textarea { width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: 12px; font: 800 16px var(--f-ui); color: #3d2208;
  background: #fffaf0; box-shadow: inset 0 2px 5px rgba(61,34,8,.35), inset 0 0 0 2px rgba(122,76,30,.35); }
.form-web textarea { height: 84px; padding-top: 10px; resize: vertical; }
.form-web input::placeholder, .form-web textarea::placeholder { color: #b89a6a; }
.casilla { display: flex !important; gap: 10px; align-items: flex-start; font-size: 14px !important; line-height: 1.45; }
.casilla input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--verde); }
.form-web .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
