:root{color-scheme:dark;font:16px system-ui;background:#101b22;color:#e9f1f2}
body{max-width:1020px;margin:auto;padding:18px 24px 60px}
header{padding:24px 0}h1{font-size:clamp(30px,5vw,49px);margin:0}h2,h3,a{color:#a2e3db}
a:focus-visible,input:focus-visible{outline:3px solid #eac286}
nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}
nav a{background:#23414b;padding:7px 11px;border-radius:8px;text-decoration:none}
input{font:inherit;padding:9px;border:1px solid #698895;border-radius:6px;background:#162830;color:inherit}
p{line-height:1.55}td,th{padding:10px;text-align:left;vertical-align:top}thead{background:#294e5a}
tbody tr:nth-child(odd){background:#1b303a}table{width:100%;border-collapse:collapse}.table{overflow-x:auto}
section{scroll-margin-top:16px}section[hidden],tr[hidden]{display:none}label{display:block;margin:10px 0}
font{filter:brightness(1.85)}
.cards{display:flex;flex-wrap:wrap;gap:12px;padding:10px}.card{width:130px;background:#1b303a;padding:10px;text-align:center;border-radius:8px}.card img,.gem img{display:block;height:56px;width:90px;object-fit:contain;margin:auto}.card strong,.gem strong,.card small,.gem small{display:block}.card details{font-size:12px;text-align:left}.loadout{padding:10px;border-bottom:1px solid #3a5966}.gemgroup{width:100%;background:#1b303a;padding:10px}.chain{display:flex;flex-wrap:wrap;gap:13px;margin-top:8px}.gem{position:relative;width:105px;text-align:center;font-size:12px;border:2px solid #52be88;border-radius:8px;padding:5px}.gem.B{border-color:#5eb6ff}.gem.R{border-color:#ff8588}.gem+.gem:before{content:"";position:absolute;left:-15px;top:40px;width:13px;border-top:3px solid #d8b583}.gem.separate:before{display:none}.tree{background:#14252d;overflow:auto}.tree > svg{display:block;width:100%;max-height:650px}.tree > svg[data-ascendancy-order]{height:300px}.tree.wide > svg:first-child{width:1450px;max-height:none}.edge{stroke:#394c54;stroke-width:9}.edge.on{stroke:#76dec6;stroke-width:14}.node circle{fill:#243841;stroke:#637681;stroke-width:8}.node image{opacity:.35}.node.on image{opacity:1}.node.on circle{fill:#497968;stroke:#8ce4c8}.node.new circle{stroke:#ffcf75;stroke-width:17}.node.removed circle{stroke:#ff9294;stroke-width:15}#progress{width:65%}button{cursor:pointer}#state{padding:8px;font-weight:bold}
.inventory{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.slot{min-height:118px;background:#12242c;border:1px solid #547781;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;padding:6px;overflow-wrap:anywhere}.slot.empty{opacity:.55}.slot img{height:54px;max-width:86%;object-fit:contain}.slot small{color:#add6d4}.slot strong{font-size:.82rem}.slot:hover,.gem[role=button]:hover{border-color:#f5cb86}.gem[role=button]{cursor:pointer}.gem[role=button]:focus-visible,.slot:focus-visible{outline:2px solid #f5cb86}dialog{background:#142830;border:1px solid #85c3c3;color:#f3f7f8;border-radius:12px;padding:20px;width:min(520px,88vw);max-height:82vh}dialog::backdrop{background:#000a}dialog header{display:flex;justify-content:space-between;align-items:center;padding:0;gap:12px}dialog img{display:block;height:75px;max-width:120px;object-fit:contain;margin:10px auto}dialog pre{white-space:pre-wrap;font:inherit;line-height:1.55;color:#d6edf1}.stagebar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:12px 0}.stagebar select{max-width:100%;padding:7px;background:#162830;color:#edf7f8}.stagebar a{padding:8px;background:#234652;border-radius:6px}.step-note{font-size:.85rem;color:#aed1d5}@media(max-width:570px){.inventory{grid-template-columns:repeat(3,minmax(0,1fr))}.slot{min-height:98px}}
.tree .node{cursor:pointer}.tree .node:focus circle,.tree .next-choice circle{stroke:#ffd48b;stroke-width:14}.tree > svg{touch-action:none}#planner-info{color:#b6e4db;min-height:1.6em}
.guide-content { --bg: #14252d; --edge: #547781; --muted: #d6edf1; }
.guide-content .equipment-cards article { background: #12242c; border: 1px solid #547781; border-radius: 8px; overflow-wrap: anywhere; }

.guide-content .gem-links li { margin: 0; background: #1b303a; }
.guide-content .planner-toolbar { margin-top: 12px; }
.guide-content input[type="range"] { min-width: 0; box-sizing: border-box; }
.guide-content .build-tree { grid-template-columns: minmax(0, 1fr); }
.guide-content .build-tree figure + figure > svg { height: min(300px, 85vw); }
.guide-content .build-tree .tree-search-match circle { stroke: #91f3e5; stroke-width: 26; }
.guide-content .build-tree .tree-search-match > .passive-icon { opacity: 1; }
nav a[aria-current="location"] { background: #345b65; color: #fff; }
nav a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid #eac286; }

.thumbnail-symbol {
  display: grid;
  place-items: center;
  height: 54px;
  min-width: 48px;
  color: #b6d6d1;
  font: 1.8rem system-ui, sans-serif;
}
.thumbnail-preview .thumbnail-symbol { margin-block: 10px; }
.gem-links.thumbnail-chain { gap: 13px; }
.gem-links.thumbnail-chain li { padding: 0; border: 0; background: none; }
.thumbnail-chain .gem { height: 100%; color: inherit; background: #1b303a; }
.thumbnail-chain li + li .gem::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 40px;
  width: 13px;
  border-top: 3px solid #d8b583;
  pointer-events: none;
}
.thumbnail-chain .gem.R .thumbnail-symbol { color: #ff8588; }
.thumbnail-chain .gem.G .thumbnail-symbol { color: #52be88; }
.thumbnail-chain .gem.B .thumbnail-symbol { color: #5eb6ff; }
