/* Talent calculator (talents.html) */
.tc { max-width: 1440px; margin: 0 auto; padding: 34px 16px 10px; }
.tc-head { text-align: center; }
.tc-head h1 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: 1.5px; color: #f3ead0;
  font-size: clamp(28px, 4vw, 42px); }
.tc-head p { margin: 10px auto 22px; color: var(--muted); max-width: 640px; }

/* class picker */
.tc-classes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px; }
.tc-cls { --cc: var(--gold); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--cc); border-radius: 10px; background: #131828; border: 1px solid #2a3150;
  transition: border-color .15s, background .15s, transform .15s; }
.tc-cls svg { width: 22px; height: 22px; }
.tc-cls:hover, .tc-cls:focus-visible { border-color: color-mix(in srgb, var(--cc) 60%, transparent); transform: translateY(-1px); outline: none; }
.tc-cls[aria-selected="true"] { background: color-mix(in srgb, var(--cc) 16%, #131828); border-color: var(--cc);
  box-shadow: 0 0 0 1px var(--cc) inset, 0 0 18px color-mix(in srgb, var(--cc) 25%, transparent); }

/* toolbar */
.tc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 0 0 16px;
  padding: 10px 16px; border-radius: 12px; background: #11151f; border: 1px solid #232a40; }
.tc-bar label { display: inline-flex; align-items: center; gap: 8px; color: #c9cfdf; font-weight: 600; }
.tc-bar select { font: inherit; color: var(--text); background: #1a2033; border: 1px solid #343b57; border-radius: 8px; padding: 6px 10px; }
.tc-sum { color: #c9cfdf; }
.tc-sum b { color: var(--gold); font-size: 17px; }
.tc-sum .split { color: var(--muted); margin-left: 6px; }
.tc-btn { font: inherit; font-weight: 700; cursor: pointer; padding: 7px 14px; border-radius: 8px; color: #e6e1cf;
  background: #1a2033; border: 1px solid #343b57; }
.tc-btn:hover { border-color: var(--gold-dim); }
.tc-btn[aria-pressed="true"] { color: #1b1300; background: linear-gradient(#ffcc33, #e0a000); border-color: var(--gold); }
.tc-warn { margin: -6px 0 14px; text-align: center; color: #ff9b8a; }
.tc-note { margin: -6px auto 14px; max-width: 900px; text-align: center; color: #e8c674; font-size: 13.5px; }
.tc-loading { text-align: center; color: var(--muted); padding: 60px 0; grid-column: 1 / -1; }
.tc-loading.err { color: #ff9b8a; }

/* the three trees */
.tc-trees { --cell: 58px; --gap: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tree { border-radius: 6px; overflow: hidden; background: #161616; border: 1px solid #2c2c2c; min-width: 0; }
.tree-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px 11px; background: #2a2a2b; }
.tree-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid #8a7440; background: #111;
  display: grid; place-items: center; }
.tree-ic img { width: 100%; height: 100%; object-fit: cover; }
.tree-nm { flex: 1; min-width: 0; }
.tree-nm h2 { margin: 0; font-size: 18px; line-height: 1.1; color: #f2f2f2; }
.tree-nm small { color: #9a9a9a; font-size: 12px; }
.tree-pts { color: #d9d9d9; font-size: 16px; white-space: nowrap; }
.tree-pts b { color: var(--gold); }
.tree-reset { font: inherit; font-size: 18px; line-height: 1; color: #9a9a9a; background: none; border: 0; cursor: pointer; padding: 4px 2px 4px 8px; }
.tree-reset:hover { color: #fff; }
.tree-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #1d1d1d; }
.tree-bar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.tree-body { padding: 14px 10px 18px 10px;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--cc) 14%, transparent), transparent 70%),
    radial-gradient(90% 60% at 50% 100%, rgba(255, 160, 40, .06), transparent 70%),
    linear-gradient(180deg, #1b1712, #0f0d0b); }
.tree:nth-child(2) .tree-body { background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--cc) 10%, transparent), transparent 70%),
    radial-gradient(90% 60% at 50% 100%, rgba(255, 90, 30, .08), transparent 70%),
    linear-gradient(180deg, #1d1410, #100c0a); }
.tree:nth-child(3) .tree-body { background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--cc) 10%, transparent), transparent 70%),
    radial-gradient(90% 60% at 50% 100%, rgba(80, 140, 200, .08), transparent 70%),
    linear-gradient(180deg, #12171b, #0b0e10); }
.tree-grid { position: relative; display: grid; grid-template-columns: repeat(4, var(--cell)) 34px; column-gap: var(--gap); row-gap: 24px;
  justify-content: center; }
.tr-line { grid-column: 1 / -1; align-self: start; margin-top: -12px; border-top: 1px dashed rgba(255, 255, 255, .12); }
.tr-need { grid-column: 5; justify-self: end; align-self: start; margin: -20px 0 0 0; z-index: 3; font-size: 11px; font-weight: 700;
  color: #8b8b8b; background: #1c1c1c; border-radius: 4px; padding: 0 4px; line-height: 15px; }
.tr-need.open { color: #d0b05a; }
.tr-need.next { color: #fff; background: #111; border: 1px solid #555; }

/* talent icons */
.ti { position: relative; z-index: 2; width: var(--cell); height: var(--cell); padding: 0; cursor: pointer; border-radius: 5px;
  background: #0b0b0b; border: 2px solid #4b4b4b; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.ti img, .ti .ti-letter { display: block; width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.ti .ti-letter { display: grid; place-items: center; font-family: var(--display); font-size: 22px; font-weight: 800; color: #cfc6a6;
  background: radial-gradient(circle at 40% 30%, #3a3f55, #15182a); }
/* rank under the icon's bottom-right corner, as in game: "0/3", "2/3", "5/5" */
.ti-rank { position: absolute; left: calc(100% - 20px); top: calc(100% - 9px); min-width: 30px; padding: 0 4px; font-size: 12px;
  font-weight: 800; line-height: 17px; text-align: center; white-space: nowrap; color: #b5b5b5; background: #000;
  border: 1px solid #3a3a3a; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, .8); z-index: 3; }
.ti.locked img, .ti.locked .ti-letter { filter: grayscale(1) brightness(.55); }
.ti.locked { border-color: #3d3d3d; }
.ti.open { border-color: #3fbf3f; }
.ti.open .ti-rank { color: #e6e6e6; }
.ti.some { border-color: #3fbf3f; }
.ti.some .ti-rank { color: #4cff4c; }
.ti.max { border-color: #e9b81d; box-shadow: 0 0 0 1px rgba(233, 184, 29, .3), 0 2px 6px rgba(0, 0, 0, .6); }
.ti.max .ti-rank { color: #ffd23a; border-color: #6a5414; }
.ti:hover, .ti:focus-visible { outline: none; filter: brightness(1.18); }
.ti.open:hover { box-shadow: 0 0 12px rgba(63, 191, 63, .45); }
.ti.max:hover, .ti.some:hover { box-shadow: 0 0 12px rgba(233, 184, 29, .45); }
.tree-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.tree-arrows .arw { fill: none; stroke: #8f8f8f; stroke-width: 3; }
.tree-arrows .arh { fill: #8f8f8f; }
.tree-arrows .arw.on { stroke: #f2b705; }
.tree-arrows .arh.on { fill: #f2b705; }

/* tooltip */
.tc-tip { position: fixed; z-index: 50; max-width: 320px; padding: 10px 12px; pointer-events: none; border-radius: 6px;
  background: rgba(8, 10, 26, .97); border: 1px solid #5d6177; box-shadow: 0 8px 26px rgba(0, 0, 0, .6); font-size: 13.5px; }
.tt-name { font-weight: 800; font-size: 15px; color: #fff; }
.tt-rank { color: #d8d8d8; margin-bottom: 4px; }
.tt-req { color: #ff4040; }
.tt-desc { color: #ffd100; margin-top: 4px; }
.tt-next { color: #fff; margin-top: 8px; }
.tt-hint { margin-top: 8px; font-size: 12.5px; }
.tt-hint.ok { color: #4cff4c; }
.tt-hint.rm { color: #ff7b7b; }

/* share and sim */
.tc-foot { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin: 16px 0 0; padding: 16px 18px;
  border-radius: 12px; background: #11151f; border: 1px solid #232a40; }
.tc-share label { display: block; font-weight: 700; color: #f3ead0; margin-bottom: 6px; }
.tc-share-row { display: flex; gap: 8px; }
.tc-share-row input { flex: 1; min-width: 0; font: inherit; font-size: 13.5px; color: var(--text); background: #0c0f19;
  border: 1px solid #343b57; border-radius: 8px; padding: 9px 11px; }
.tc-share small { display: block; margin-top: 6px; color: var(--muted); }
.tc-share small a { color: var(--gold); }
.tc-sim { font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; padding: 12px 26px; border-radius: 10px; border: 0;
  color: #1b1300; background: linear-gradient(#ffcc33, #e0a000); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tc-sim svg { width: 18px; height: 18px; }
.tc-sim:hover { filter: brightness(1.07); }
.tc-sim-msg { grid-column: 1 / -1; margin: 0; color: #e8c674; font-size: 13.5px; text-align: right; }
.tc-credit { margin: 12px 0 0; text-align: center; color: #7d8398; font-size: 12.5px; }
.tc-credit a { color: #b9a46a; }
.tc-help { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 1240px) { .tc-trees { --cell: 50px; --gap: 18px; } }
@media (max-width: 1100px) {
  .tc-trees { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; --cell: 58px; --gap: 26px; }
}
@media (max-width: 560px) {
  .tc-trees { --cell: 50px; --gap: 14px; }
  .tree-body { padding: 14px 6px 18px 6px; }
  .tc-cls { padding: 7px 10px 7px 8px; font-size: 13.5px; }
  .tc-cls svg { width: 18px; height: 18px; }
  .tc-foot { grid-template-columns: 1fr; }
  .tc-sim { justify-content: center; }
  .tc-sim-msg { text-align: center; }
}
@media (max-width: 380px) { .tc-trees { --cell: 44px; --gap: 10px; } }
