/* Talents overlay (progression agent). Everything is scoped under .lft-root. */
.lft-root { position: fixed; inset: 0; z-index: 60; display: flex; padding: 12px; overflow: auto; background: rgba(0, 0, 0, 0.72); --lft-cell: 52px; }
.lft-panel { margin: auto; width: min(1100px, 100%); background: linear-gradient(#21170d, #120c07); border: 1px solid var(--gold2, #c9952f); border-radius: 6px;
  box-shadow: 0 0 0 3px #1a0f06, 0 0 0 4px var(--edge, #6b4f2a), 0 14px 50px rgba(0, 0, 0, 0.7); padding: 10px 14px 12px; color: var(--ink, #f3ead6); }
.lft-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--edge, #6b4f2a); }
.lft-title { font-size: 22px; letter-spacing: 0.5px; text-shadow: 0 2px 0 #000; }
.lft-free { color: var(--gold, #f2c14e); }
.lft-x { margin-left: auto; }
.lft-trees { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin: 10px 0; }
.lft-tree { border: 1px solid var(--edge2, #3a2814); border-radius: 5px; padding: 6px 8px 10px; background: radial-gradient(ellipse at 50% 20%, rgba(90, 60, 30, 0.35), rgba(0, 0, 0, 0.55)); min-width: 0; }
.lft-t.lft-choice { outline: 1px dashed #c9a24a; outline-offset: 1px; }
.lft-t.lft-choice.lft-other { opacity: .35; filter: grayscale(.8); }
.lft-t.lft-final { box-shadow: 0 0 0 2px #ff8000, 0 0 10px rgba(255, 128, 0, .6); }
.lft-t.lft-ov { position: relative; }
.lft-t.lft-ov::after { content: ""; position: absolute; right: 1px; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: #66ccff; box-shadow: 0 0 3px #000; }
.lft-ovn { margin-left: 8px; padding: 1px 6px; border: 1px solid #66ccff; border-radius: 3px; color: #66ccff; font-size: 11px; }
.lft-tree header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lft-tree header b { font-weight: normal; color: var(--gold, #f2c14e); font-size: 17px; }
.lft-gh { font-size: 18px; }
.lft-sp { margin-left: auto; min-width: 28px; text-align: center; border: 1px solid var(--edge, #6b4f2a); border-radius: 10px; padding: 0 6px; color: var(--ink, #f3ead6); background: #0f0a06; }
.lft-grid { display: grid; grid-template-columns: repeat(4, var(--lft-cell)); justify-content: center; gap: 10px 12px; position: relative; }
.lft-t { position: relative; width: var(--lft-cell); height: var(--lft-cell); padding: 0; border-radius: 6px; border: 2px solid #4a4038; background: linear-gradient(#2a2018, #15100b);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8); z-index: 1; }
.lft-g { font-size: 24px; line-height: 1; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', Georgia, serif; }
.lft-b { position: absolute; right: -6px; bottom: -7px; font: 11px/1 system-ui, sans-serif; padding: 2px 4px; border-radius: 4px; background: #000; border: 1px solid #555; color: #bbb; }
.lft-locked { filter: grayscale(1) brightness(0.5); }
.lft-open { filter: grayscale(0.6) brightness(0.8); }
.lft-can { border-color: #3ad34a; }
.lft-can .lft-b { color: #3ad34a; border-color: #3ad34a; }
.lft-some { border-color: #3ad34a; }
.lft-some .lft-b { color: #3ad34a; border-color: #3ad34a; }
.lft-max { border-color: var(--gold, #f2c14e); }
.lft-max .lft-b { color: var(--gold, #f2c14e); border-color: var(--gold, #f2c14e); }
.lft-ms { border-radius: 50%; }
.lft-cap { border-radius: 50%; box-shadow: 0 0 10px rgba(242, 193, 78, 0.35), inset 0 0 8px rgba(0, 0, 0, 0.8); }
.lft-sel { outline: 2px solid #fff3cf; outline-offset: 2px; }
.lft-t:hover { filter: none; border-color: #fff3cf; }
.lft-link { justify-self: center; width: 4px; background: #3a3028; border-radius: 2px; margin: -10px 0; z-index: 0; }
.lft-link.on { background: var(--gold2, #c9952f); }
.lft-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 14px; align-items: start; border-top: 1px solid var(--edge, #6b4f2a); padding-top: 10px; }
.lft-bar { height: 8px; margin: 6px 0; background: #0f0a06; border: 1px solid var(--edge, #6b4f2a); border-radius: 4px; overflow: hidden; }
.lft-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a5cff, #c9a0ff); }
.lft-sub { font-size: 13px; color: var(--dim, #a99f8a); }
.lft-detail { font-size: 14px; min-height: 60px; }
.lft-hint { color: var(--dim, #a99f8a); font-size: 13px; }
.lft-act { display: flex; gap: 8px; margin-top: 8px; }
.lft-btns { display: flex; gap: 8px; }
.lft-tip { position: fixed; z-index: 61; max-width: 320px; pointer-events: none; background: rgba(8, 6, 4, 0.96); border: 1px solid var(--gold2, #c9952f); border-radius: 5px; padding: 8px 10px; font-size: 14px; color: var(--ink, #f3ead6); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); }
.lft-tn { color: #fff; font-size: 16px; }
.lft-tr { color: var(--dim, #a99f8a); font-size: 13px; margin-bottom: 4px; }
.lft-tag { color: var(--gold, #f2c14e); margin-left: 4px; }
.lft-req { color: #ff6a5a; font-size: 13px; }
.lft-d { color: var(--gold, #f2c14e); margin-top: 4px; }
.lft-next { color: #fff; margin-top: 6px; font-size: 13px; }
.lft-maxr { color: var(--dim, #a99f8a); font-size: 13px; margin-top: 4px; }
@media (max-width: 900px) {
  .lft-root { --lft-cell: 44px; }
  .lft-trees { grid-auto-flow: row; grid-template-columns: 1fr; }
  .lft-foot { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lft-root { padding: 6px; --lft-cell: 40px; }
  .lft-grid { gap: 8px; }
}

/* original look: tree art, real icons, square cells, purple milestones */
.lft-root { background: rgba(0, 0, 0, 0.85); --lft-cell: 40px; }
.lft-panel { background: rgba(14, 10, 6, 0.9); border: 1px solid #5a4420; border-radius: 6px; box-shadow: 0 14px 50px rgba(0, 0, 0, 0.8); font-family: var(--fbody, Georgia, serif); }
.lft-head { border-bottom: 0; align-items: baseline; gap: 10px; }
.lft-title { font: 26px var(--ftitle, Georgia, serif); color: #f2c450; text-shadow: 0 2px 2px #000; }
.lft-cls { font-size: 15px; }
.lft-free { color: #9a8f7a; font-size: 13px; }
.lft-x, .lft-root button.small { height: auto; padding: 4px 14px; border: 1px solid #8a3a24; border-image: none; border-radius: 4px; background: linear-gradient(#5c100b, #2b0605); color: #f2c450; font: 13px/18px var(--fbody, Georgia, serif); }
.lft-root button.small:disabled { filter: grayscale(1) brightness(0.6); }
.lft-tree { position: relative; overflow: hidden; border: 1px solid #5a4420; border-radius: 4px; background: #070504; padding: 6px 8px 8px; }
.lft-tree > * { position: relative; z-index: 1; }
.lft-tree > .lft-art { position: absolute; inset: 0; z-index: 0; opacity: 0.85; pointer-events: none; }
.lft-art i { position: absolute; background-size: 100% 100%; }
.lft-tree header b { font: 17px var(--fbody, Georgia, serif); color: #ffd100; text-shadow: 0 1px 2px #000; }
.lft-tree header .lft-i { width: 22px; height: 22px; border: 1px solid #000; }
.lft-sp { border-color: #5a4420; background: rgba(0, 0, 0, 0.7); }
.lft-grid { gap: 12px 16px; }
.lft-t { border-radius: 2px; border: 1px solid #505050; background: #000; box-shadow: 0 0 0 1px #000; }
.lft-t .lft-i { width: 100%; height: 100%; border: 0; box-shadow: none; }
.lft-locked .lft-i, .lft-open .lft-i { filter: grayscale(1) brightness(0.55); }
.lft-locked, .lft-open { filter: none; }
.lft-can, .lft-some { border-color: #2ad42a; }
.lft-max { border-color: #ffd100; }
.lft-b { right: -5px; bottom: -6px; padding: 1px 3px; font-size: 10px; border-radius: 2px; }
.lft-ms, .lft-cap { border-radius: 2px; box-shadow: 0 0 0 1px #000, 0 0 10px 2px rgba(163, 53, 238, 0.75); }
.lft-link { width: 2px; background: rgba(120, 120, 120, 0.7); }
.lft-link.on { background: #ffd100; }
.lft-ms-list { margin-top: 10px; padding-top: 6px; border-top: 1px solid rgba(201, 162, 74, 0.25); font-size: 11px; color: #cfc6b4; text-shadow: 0 1px 1px #000; }
.lft-ms-list b { color: #c88cff; font-weight: normal; }
.lft-foot { border-top-color: #5a4420; }
.lft-root button.lft-t { width: var(--lft-cell); height: var(--lft-cell); padding: 0; border: 1px solid #505050; border-image: none; border-radius: 2px; background: #000; font: inherit; line-height: 1; }
.lft-root button.lft-t.lft-can, .lft-root button.lft-t.lft-some { border-color: #2ad42a; }
.lft-root button.lft-t.lft-max { border-color: #ffd100; }
.lft-root button.lft-t:hover { border-color: #fff3cf; filter: none; }
.lft-root button.lft-ms, .lft-root button.lft-cap { box-shadow: 0 0 0 1px #000, 0 0 10px 2px rgba(163, 53, 238, 0.8); }
.lft-rt { margin-left: 6px; padding: 0 6px; font-size: 11px; }
.lft-btns { flex-wrap: wrap; align-items: center; }
.lft-set.on { border-color: #c9a24a; color: #ffe9a8; }
.lft-search { width: 130px; padding: 2px 6px; font-size: 12px; }
.lft-hit { outline: 2px solid #3ce03c; outline-offset: 2px; }
