/* CompyDoeNy Forever — la web es la ventana del addon.
   Todo el relieve sale de las texturas reales del addon (assets/img/tex), nunca de sombras o degradados CSS. */

@font-face { font-family: "Philosopher"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/philosopher-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Philosopher"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/philosopher-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Philosopher"; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/philosopher-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Philosopher"; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/philosopher-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --tex: "/assets/img/tex";
  --suelo: #0b0a08;        /* fuera de la ventana */
  --panel: #0d0f16;        /* dentro del panel, como el addon */
  --tarjeta: #12141c;
  --oro: #ffd100;          /* «CompyDoeNy» */
  --verde: #9ad86e;        /* «Forever» */
  --oro-palido: #f1dc9a;   /* textos de la barra */
  --texto: #ece7da;
  --texto-2: #c3bba8;
  --tinta-pergamino: #2b1d0e;
  --rojo-texto: #ffe7b0;
  --azul: #6fb6ff;
  --display: "Philosopher", "Trebuchet MS", serif;
  --texto-fam: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --lateral: 248px;
  --xp-alto: 48px;
  --margen: clamp(16px, 2.4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--xp-alto) + 16px); }
body {
  margin: 0;
  overflow-x: clip;
  min-height: 100vh;
  background: var(--suelo) url("/assets/img/tex/fondo.png") repeat;
  color: var(--texto);
  font: 400 18px/1.55 var(--texto-fam);
  padding-top: var(--xp-alto);
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--oro-palido); text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { color: var(--oro); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
::selection { background: var(--oro); color: #1a1205; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--oro); color: #1a1205; padding: 8px 14px; font-weight: 700; }
.saltar:focus { top: calc(var(--xp-alto) + 8px); }

/* ---------- Barra de experiencia (fija arriba) ---------- */
.xp {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--xp-alto);
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  background: #07060a; padding: 4px 10px;
}
.xp__cap { height: 40px; background: center / contain no-repeat; }
.xp__cap--i { background-image: url("/assets/img/tex/k_xpcapl.png"); }
.xp__cap--d { background-image: url("/assets/img/tex/k_xpcapr.png"); }
.xp__pista {
  position: relative; height: 34px; overflow: hidden;
  border-style: solid; border-width: 8px 0;
  border-image: url("/assets/img/tex/k_xprail.png") 16 0 fill / 8px 0 repeat;
  background: #150c22;
}
.xp__relleno {
  position: absolute; inset: 0 auto 0 0; width: 1.6%;
  background: url("/assets/img/tex/k_xpmarble.png") left center / auto 100% repeat-x;
  transform-origin: left;
}
.xp__relleno::after { /* chispa blanca al final, la del addon */
  content: ""; position: absolute; right: -12px; top: -8px; width: 24px; height: 34px;
  background: url("/assets/img/tex/k_xpspark.png") center / contain no-repeat;
}
.xp__texto {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 0 24px; font: 700 15px/1 var(--texto-fam); color: #fff; letter-spacing: .02em; text-shadow: 0 1px 0 #000;
  font-variant-numeric: tabular-nums;
}

/* ---------- La ventana del addon ---------- */
.ventana {
  display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr);
  width: min(1500px, 100% - 40px); margin: 18px auto 40px; min-height: calc(100vh - var(--xp-alto) - 58px);
}

/* Columna de piedra con el medallón */
.lateral {
  position: relative; z-index: 2;
  background:
    url("/assets/img/tex/k_side_top.png") left top / 248px auto no-repeat,
    url("/assets/img/tex/k_side_bot.png") left bottom / 248px auto no-repeat,
    url("/assets/img/tex/k_side_mid.png") left top / 232px auto repeat-y;
  padding: 236px 22px 250px 18px;
  display: flex; flex-direction: column; gap: 22px;
}
.medallon { position: absolute; left: 75px; top: 64px; width: 124px; height: 124px; border-radius: 50%; overflow: hidden; display: block; }
.medallon img { width: 100%; height: 100%; object-fit: cover; }
.chapa { /* el escudito del nivel bajo el anillo */
  position: absolute; left: 121px; top: 189px; width: 34px; text-align: center;
  font: 700 15px/1 var(--display); color: var(--oro-palido);
}

.menu { display: grid; gap: 8px; }
.menu a {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px;
  border-style: solid; border-width: 10px 16px;
  border-image: url("/assets/img/tex/k_nav_off.png") 20 32 fill / 10px 16px stretch;
  color: var(--texto); text-decoration: none; font: 700 17px/1.1 var(--display);
  margin: -2px 0;
}
.menu a:hover { color: var(--oro); }
.menu a[aria-current="page"] { /* aro dorado, interior oscuro y texto claro, como en el addon */
  border-image: url("/assets/img/tex/k_nav_on.png") 20 32 / 10px 16px stretch;
  background: #0b0a10; background-clip: padding-box;
  color: #fff;
}
.lateral__pie { display: grid; gap: 14px; margin-top: 10px; padding: 0 8px; }
.idiomas { display: flex; gap: 8px; }
.idiomas button {
  flex: 1; min-height: 40px; cursor: pointer; color: var(--texto); background: none;
  border-style: solid; border-width: 8px 12px;
  border-image: url("/assets/img/tex/k_tab_off.png") 18 28 fill / 8px 12px stretch;
  font: 700 15px/1 var(--display);
}
.idiomas button[aria-pressed="true"] { border-image-source: url("/assets/img/tex/k_tab_on.png"); color: #fff; }
.social { color: var(--texto-2); font-size: 16px; }

/* Panel principal con su marco de piedra */
.principal {
  position: relative; min-width: 0;
  background: var(--panel);
  margin-left: -26px; padding: 46px 64px 70px 56px;
}
.principal::before, .principal::after, .borde { content: ""; position: absolute; pointer-events: none; }
.principal::before { /* borde superior */
  left: 0; right: 0; top: -22px; height: 50px;
  background: url("/assets/img/tex/k_bar_top.png") left top / auto 64px repeat-x;
}
.principal::after { /* borde inferior */
  left: 0; right: 0; bottom: -26px; height: 52px;
  background: url("/assets/img/tex/k_bar_bot.png") left bottom / auto 64px repeat-x;
}
.borde--dcha { top: 0; bottom: 0; right: -18px; width: 52px; background: url("/assets/img/tex/k_bar_right.png") right top / 64px auto repeat-y; }
.borde--esq-sup { top: -40px; right: -26px; width: 190px; height: 190px; background: url("/assets/img/tex/k_tr.png") right top / contain no-repeat; z-index: 3; }
.borde--esq-inf { bottom: -34px; right: -26px; width: 170px; height: 170px; background: url("/assets/img/tex/k_br.png") right bottom / contain no-repeat; z-index: 3; }

.cabecera { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 34px; padding-right: 110px; }
.titulo { font: 700 clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.005em; }
.titulo .c { color: var(--oro); }
.titulo .f { color: var(--verde); }
.cabecera__datos { color: var(--texto); font-family: var(--display); font-size: 18px; }

/* ---------- Piezas del addon ---------- */
.tarjeta { /* borde dorado del addon */
  border-style: solid; border-width: 10px 14px;
  border-image: url("/assets/img/tex/k_tile.png") 18 28 / 10px 14px stretch;
  background: #08080d; background-clip: padding-box;
  padding: 10px 12px;
}
.pergamino {
  border-style: solid; border-width: 10px 22px;
  border-image: url("/assets/img/tex/k_paper.png") 14 34 fill / 10px 22px stretch;
  color: var(--tinta-pergamino); padding: 8px 14px 8px 20px;
}
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 24px;
  border-style: solid; border-width: 10px 14px;
  border-image: url("/assets/img/tex/k_red.png") 10 18 fill / 10px 14px stretch;
  background: none; color: var(--rojo-texto); font: 700 21px/1.1 var(--display); text-decoration: none; cursor: pointer;
  transition: transform .14s cubic-bezier(.22,1,.36,1), filter .18s ease;
}
.boton:hover { color: #fff; filter: brightness(1.12); }
.boton:active { transform: scale(.97); }
.boton--peq { min-height: 44px; font-size: 17px; padding: 0 16px; }
.enlace-plano { font: 700 18px/1.2 var(--display); }
.marco-oro { /* marco dorado de icono, ampliado */
  border-style: solid; border-width: 12px;
  border-image: url("/assets/img/tex/k_iconframe.png") 14 fill / 12px stretch;
  background: #000;
}

.seccion { margin-top: clamp(64px, 7vw, 104px); }
.seccion__titulo { display: flex; align-items: center; gap: 12px; font-size: clamp(30px, 3vw, 42px); color: var(--oro); margin-bottom: 26px; }
.seccion__titulo img { width: 34px; height: 34px; }
.entradilla { max-width: 62ch; color: var(--texto); font-size: 19px; }

/* ---------- Pie ---------- */
.pie { max-width: 1500px; margin: 0 auto 60px; padding: 0 var(--margen) 0 calc(var(--lateral) + 30px); color: var(--texto-2); font-size: 16px; display: grid; gap: 10px; }
.pie a { color: var(--texto); }

/* ---------- Móvil y tablet ---------- */
.menu-boton { display: none; }
@media (max-width: 960px) {
  :root { --xp-alto: 42px; }
  .ventana { grid-template-columns: 1fr; margin-top: 0; width: 100%; }
  .lateral {
    background: #0e0c0a url("/assets/img/tex/k_side_mid.png") left top / 100% auto;
    padding: 12px 16px; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px;
    position: sticky; top: var(--xp-alto); z-index: 30;
  }
  .medallon { position: static; width: 56px; height: 56px; }
  .chapa { display: none; }
  .titulo-movil { display: block !important; font: 700 22px/1 var(--display); }
  .menu-boton { display: inline-flex; min-height: 44px; }
  .menu, .lateral__pie { display: none; grid-column: 1 / -1; }
  .lateral.abierto .menu, .lateral.abierto .lateral__pie { display: grid; }
  .lateral.abierto { padding-bottom: 18px; }
  .principal { margin-left: 0; padding: 34px var(--margen) 60px; }
  .principal::before, .principal::after, .borde { display: none; }
  .cabecera { padding-right: 0; margin-bottom: 24px; }
  .cabecera .titulo { display: none; }
  .pie { padding: 0 var(--margen); }
}
.titulo-movil { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* En móvil el lema del addon quedaba encima del titular como una etiqueta; ahí sobra */
@media (max-width: 700px) { .cabecera__datos { display: none; } }
