
      /* misma paleta clara que el juego y que legal.html / credits.html */
      :root { --blue-1: #6f8fd8; --blue-2: #3a5bb4; --blue-3: #24418e; --panel: #f6f8fd; --panel-2: #eaeff9; --line: #d3dbef; --border: #6b7ba8; --text: #24304f; --muted: #6c7896; --green: #3f9a55; }
      * { box-sizing: border-box; }
      body {
        margin: 0; min-height: 100vh; font-family: Nunito, 'Segoe UI', Tahoma, sans-serif; font-weight: 600; font-size: 15px; line-height: 1.5; color: var(--text);
        background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.6), transparent 70%), linear-gradient(180deg, #b9cdf2 0%, #8fa8de 55%, #6b86c6 100%) fixed;
        padding: 24px 16px 48px;
      }
      main { max-width: 1180px; margin: 0 auto; background: linear-gradient(180deg, #fdfdff, var(--panel) 60%, #eef2fa); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(36, 65, 142, 0.3); overflow: hidden; }
      header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; color: #fff; background: linear-gradient(180deg, #97b1e6 0%, #7d9ad6 45%, #5f7fc0 55%, #3a559a 100%); }
      header h1 { margin: 0; flex: 1; font-size: 20px; font-weight: 900; text-shadow: 0 1px 0 #2f4a8a; }
      header a.home { color: #fff; font-weight: 900; text-decoration: none; font-size: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
      .lang { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); }
      .lang button { border: 0; background: none; font: inherit; font-weight: 900; font-size: 13px; color: var(--muted); padding: 3px 10px; border-radius: 999px; cursor: pointer; }
      .lang button.active { background: var(--blue-2); color: #fff; }
      article { padding: 14px 20px 24px; }
      .lead { margin: 4px 0 14px; color: var(--muted); }
      .loading { padding: 40px; text-align: center; color: var(--muted); }

      /* clases: cada 1st job con sus 2nd jobs */
      #jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 16px; }
      /* arriba el 1st job; debajo, un poco metidos, sus 2nd jobs (siempre dos filas, aunque no tenga) */
      .line { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
      .line .seconds { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 32px; padding-left: 14px; border-left: 2px solid var(--line); margin-left: 15px; }
      .line .none { font-size: 12px; color: var(--muted); padding: 0 6px; }
      .job { flex: none; align-self: auto; height: 32px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; font: inherit; font-weight: 800; font-size: 13px; color: var(--text); padding: 3px 9px 3px 4px; border-radius: 999px; cursor: pointer; }
      .job img { width: 24px; height: 24px; image-rendering: pixelated; object-fit: contain; }
      .job.first { font-weight: 900; color: var(--blue-3); }
      .job:hover { background: var(--panel-2); }
      .job.active { background: var(--blue-2); color: #fff; border-color: var(--blue-3); }

      /* la clase elegida */
      .jobhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
      .jobhead img { width: 32px; height: 32px; image-rendering: pixelated; object-fit: contain; }
      .jobhead h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--blue-3); }
      .tag { font-size: 12px; font-weight: 900; padding: 1px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
      .tag.dev { background: #fff4dd; border-color: #e8c98a; color: #8a5a00; }
      .jobdesc { margin: 0 0 6px; }
      .rule { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
      .skills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 12px; }
      .skills > span { font-weight: 900; color: var(--muted); font-size: 13px; margin-right: 4px; }
      .skill { width: 34px; height: 34px; padding: 3px; border-radius: 8px; background: #fff; border: 1px solid var(--line); cursor: help; }
      .skill img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; }

      /* ficha del talento (o skill) señalado */
      /* ficha flotante del talento o la skill señalados (talentpage.ts point) */
      #tip { position: fixed; z-index: 20; display: none; max-width: min(340px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(36, 65, 142, 0.25); font-size: 13px; line-height: 1.45; pointer-events: none; }
      #tip.show { display: block; }
      #tip b.n { color: var(--blue-3); font-weight: 900; }
      #tip .muted, .muted { color: var(--muted); font-size: 13px; }
      #tip .req { color: #a0522d; }
      #tip .wpn { color: var(--blue-2); }

      /* árboles */
      .trees { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
      .tree { border-radius: 12px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
      .tree-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: #fff; font-weight: 900; background: linear-gradient(180deg, #8eaaf0, var(--blue-2)); }
      .tree-head img { width: 24px; height: 24px; image-rendering: pixelated; }
      .tree-head .pts { margin-left: auto; font-size: 12px; background: rgba(255, 255, 255, 0.22); padding: 0 8px; border-radius: 8px; }
      .tree-desc { padding: 6px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); min-height: 38px; }
      .paths { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
      .paths span { font-size: 11px; font-weight: 900; padding: 0 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--blue-2); cursor: help; }
      .board { position: relative; margin: 6px 8px 10px 26px; }
      .board svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
      .tier { position: absolute; left: -22px; width: calc(100% + 22px); border-top: 1px dashed var(--line); }
      .tier span { position: absolute; left: 0; top: 1px; font-size: 10px; font-weight: 900; color: var(--muted); }
      .talent { position: absolute; width: 42px; height: 42px; transform: translate(-50%, -50%); padding: 3px; border-radius: 9px; background: var(--panel); border: 2px solid var(--line); cursor: pointer; }
      .talent img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; }
      .talent .rk { position: absolute; right: -6px; bottom: -6px; font-size: 10px; font-weight: 900; line-height: 1; padding: 2px 4px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
      .talent.learn { border-color: var(--green); background: #eef8f0; }
      .talent.learn .rk { color: var(--green); border-color: var(--green); }
      .talent.final { border-color: #c79a3a; }
      .talent:hover, .talent.on { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(58, 91, 180, 0.25); }
      .talent .w { position: absolute; left: -6px; top: -7px; font-size: 11px; }
      /* calculadora: puntos puestos, como en el panel del juego */
      .calc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
      .calc > b { font-weight: 900; color: var(--blue-3); }
      .calc button { border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 900; font-size: 13px; color: var(--blue-2); padding: 2px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
      .calc .mode { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--panel-2); }
      .calc .mode button { border: 0; background: none; }
      .calc .mode button.active { background: var(--blue-2); color: #fff; }
      .talent.can { border-color: var(--blue-1); }
      .talent.some { border-color: var(--green); background: #eef8f0; }
      .talent.maxed { border-color: #c79a3a; background: #fff4dd; }
      .talent.some .rk, .talent.maxed .rk { color: var(--text); border-color: currentColor; }
      /* apagados sin transparencia: con opacity las flechas se veían a través de las casillas */
      .talent.locked img { filter: grayscale(1) opacity(0.45); }
      .talent.closed { background: #eceff5; border-style: dashed; }
      .talent.closed img { filter: grayscale(1) opacity(0.25); }
      .tree.off .tree-head { filter: grayscale(1); }
      .tree.off .board, .tree.off .tree-desc { filter: grayscale(1) contrast(0.6) brightness(1.15); }
      .tier.open { border-top-color: var(--green); }
      .tier.open span { color: var(--green); }
      .legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
      .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--line); vertical-align: -1px; margin-right: 4px; }
      .legend i.l { border-color: var(--green); background: #eef8f0; }
      .legend i.f { border-color: #c79a3a; }
      footer { margin-top: 18px; font-size: 13px; color: var(--muted); }
      @media (max-width: 520px) {
        article { padding: 12px; } body { padding: 10px 8px 30px; }
        /* en el móvil, dos líneas de clases por fila para no llenar la pantalla antes de los árboles */
        #jobs { grid-template-columns: 1fr 1fr; gap: 6px; }
        .line { padding: 4px; }
        .line .seconds { flex-direction: column; align-items: flex-start; padding-left: 4px; margin-left: 6px; }
        .job { font-size: 12px; height: 28px; padding: 2px 7px 2px 3px; gap: 4px; }
        .job img { width: 20px; height: 20px; }
      }
    