.skill-trees { padding: 12px 18px 16px; }
.skill-trees [hidden] { display: none; }
.tree-switches { display:flex; gap:2px; border-block:1px solid #5f4a32; background:#211b16; }
.tree-switches label { flex:1; min-width:0; position:relative; }
.tree-switches input { position:absolute; width:1px; height:1px; opacity:0; }
.tree-switches span { display:grid; place-items:center; text-align:center; min-height:40px; padding:4px; color:#c7b9a5; cursor:pointer; font-weight:600; line-height:1.1; }
.tree-switches input:checked + span { color:#f8dca6; background:linear-gradient(#453326,#2f261e); box-shadow:inset 0 -2px #c39a59; }
.tree-switches input:focus-visible + span { outline:2px solid #f6dfb1; outline-offset:-2px; }
.tree-legend { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px; margin:10px 0 8px; font-size:14px; color:var(--muted); }
.tree-legend span { margin-left:4px; color:#f3e7d4; font-weight:600; }
.tree-legend strong,.tree-ranks b:last-child { color:#f6c27b; }
.tree-legend i,.tree-ranks i { color:#a99881; font-style:normal; }
.tree-board { position:relative; width:min(100%, 388px); margin-inline:auto; overflow:hidden; border:1px solid #796143; box-shadow:0 0 0 3px #15120f; }
.tree-board > img { display:block; width:100%; height:auto; aspect-ratio:550 / 690; }
.tree-node { position:absolute; left:calc((18.18 + 30 * var(--col)) * 1%); top:calc((9.13 + 16.23 * var(--row)) * 1%); width:16.3%; height:12.9%; transform:translate(-50%,-50%); padding:0; min-width:0; min-height:0; border:2px solid transparent; border-radius:0; background:transparent; box-shadow:none; color:#f6e9d6; cursor:pointer; overflow:visible; }
.tree-board .tree-node:hover:not(:disabled),.tree-node:focus-visible,.tree-node[aria-expanded=true] { border-color:#e3bd7c; background:transparent; }
.tree-node:focus-visible { outline:2px solid #fff4de; outline-offset:2px; z-index:1; }
.tree-ranks { position:absolute; left:90%; top:62%; display:inline-flex; gap:2px; align-items:center; justify-content:center; background:#171410; border:1px solid #715b41; min-width:30px; padding:0 3px; border-radius:2px; font:600 clamp(12px, 1.1vw, 15px)/1.3 var(--body, sans-serif); font-variant-numeric:tabular-nums; white-space:nowrap; }
.tree-node[aria-expanded=true] .tree-ranks { border-color:#bf9b64; }
.tree-credit { display:block; margin-top:8px; text-align:center; color:var(--muted); font-size:12px; }
.tree-credit a { color:#c3ad8b; text-underline-offset:2px; }
@media(max-width:430px) { .skill-trees { padding-inline:12px; } .tree-switches span { font-size:14px; } }
.tree-unrecorded { color:var(--muted); font-size:13px; margin:-5px 0 9px; }
.tree-budget {font-size:13px;color:var(--gold);}
.tree-editor {position:absolute;z-index:2;left:50%;top:var(--position);transform:translate(-50%,calc(-1 * var(--position)));width:calc(100% - 16px);max-width:280px;background:#292219;border:1px solid #bd965e;border-radius:3px;padding:10px 12px;box-shadow:0 5px 20px #000b;}
.tree-editor-title {display:flex;align-items:center;justify-content:space-between;gap:5px;}
.tree-editor-title strong {font:600 16px var(--heading);color:#f9e4c2;}
.tree-editor-title button {border:0;background:transparent;color:var(--muted);font-size:21px;width:30px;line-height:28px;padding:0;}
.tree-editor p {margin:0 0 8px;color:var(--muted);font-size:13px;}
.tree-inputs {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:13px;}
.tree-inputs label {display:block;font-size:13px;color:#e5d4b9;}
.tree-inputs input {margin-top:3px;display:block;width:100%;height:36px;min-width:0;padding:3px 6px;text-align:center;}
.tree-stepper {display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:stretch;margin-top:3px;}
.tree-stepper input {border-radius:0;margin:0;appearance:textfield;}
.tree-stepper input::-webkit-inner-spin-button {appearance:none;}
.tree-stepper button {padding:0;font-size:19px;color:var(--gold);}
.tree-editor .primary {margin-top:10px;padding:5px 16px;min-height:34px;}
