.build-panel {
  color:var(--ink);
  overflow:hidden;
  font-size:13px;
  font-variant-numeric:tabular-nums;
}
.build-panel :focus-visible { outline-offset:-2px; }
.build-empty { padding:34px 22px; color:var(--muted); text-align:center; }
.build-note { padding:8px 16px; color:var(--muted); border-top:1px solid var(--faint); font-size:12px; }
.game-tools,.game-tools-main,.preset-buttons { display:flex; align-items:center; flex-wrap:wrap; }
.game-tools { justify-content:space-between; gap:8px 18px; min-height:46px; padding:7px 15px; border-bottom:1px solid var(--line); }
.game-tools-main { gap:7px 18px; }
.game-tools-main,.game-metric { color:var(--muted); font-size:12px; }
.game-metric { white-space:nowrap; }
.game-metric b { color:var(--ink); margin-left:3px; font-weight:700; }
.preset-buttons { gap:4px; }
.preset-button { position:relative; min-width:31px; padding:0 9px; font-size:12px; font-weight:600; }
.preset-button[aria-pressed=true] { color:var(--mint); border-color:var(--mint); background:var(--ground); }
.preset-dot { width:4px; height:4px; position:absolute; top:3px; right:3px; background:var(--gold); border-radius:50%; }
.game-art { position:relative; flex:none; display:inline-grid; place-items:center; vertical-align:middle; width:100%; height:100%; overflow:hidden; background:var(--ground); border-radius:inherit; }
.game-art img { position:absolute; inset:0; width:100%; height:100%; display:block; object-fit:cover; }
.art-fallback { color:var(--muted); font-weight:700; font-size:12px; }
.game-art:has(>img:not([hidden])) > .art-fallback { visibility:hidden; }
.build-hint { --grade:var(--mint); }
.build-hint img { object-fit:cover; }

.glyph-matrix { display:grid; grid-template-columns:repeat(var(--glyph-columns),minmax(0,1fr)); }
.glyph-column {
  min-width:0;
  background:repeating-linear-gradient(to bottom,transparent 0 66px,var(--faint) 66px 67px);
}
.glyph-column + .glyph-column { border-left:1px solid var(--line); }
.glyph-row { display:flex; align-items:stretch; min-height:67px; border-bottom:1px solid var(--faint); background:var(--surface); }
.glyph-skill { width:71px; flex:none; display:grid; place-items:center; border-right:1px solid var(--faint); background:var(--ground); }
.glyph-skill button,.glyph-node { border:none; padding:0; background:transparent; }
.glyph-skill button { width:54px; height:54px; border:1px solid var(--line); border-radius:6px; }
.glyph-skill button:hover,.glyph-skill button.selected { outline:1px solid var(--mint); }
.glyph-nodes { display:flex; align-items:center; flex-wrap:wrap; gap:2px 4px; padding:5px 7px; }
.glyph-node { width:41px; height:43px; position:relative; display:grid; place-items:center; border-radius:50%; }
.glyph-orb { width:34px; height:34px; border:1px solid var(--line); border-radius:50%; background:var(--ground); }
.glyph-node:not(.is-active) .glyph-orb img { filter:grayscale(1) brightness(.63); }
.glyph-node.is-active .glyph-orb { border-color:var(--mint); }
.glyph-node:hover .glyph-orb,.glyph-node.selected .glyph-orb,.glyph-node:focus-visible .glyph-orb { outline:1px solid var(--mint); outline-offset:1px; }
.glyph-cost { position:absolute; bottom:0; right:0; min-width:12px; padding:0 2px; border-radius:2px; background:var(--ground); color:var(--dim); font-size:11px; font-weight:600; line-height:15px; }
.glyph-node.is-active .glyph-cost { color:var(--gold); }
.glyph-footer { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; padding:8px 14px; min-height:45px; border-top:1px solid var(--line); }
.glyph-pager { display:flex; align-items:center; gap:15px; grid-column:2; font-size:12px; font-weight:650; }
.glyph-pager .page-arrow { width:28px; min-height:27px; }
.glyph-footer .game-metric { justify-self:end; }.glyph-footer b,.advance-progress b { color:var(--gold); }

.advance-layout { display:grid; grid-template-columns:minmax(0,52%) minmax(0,1fr); }
.advance-list { min-width:0; border-right:1px solid var(--line); }
.advance-row {
  display:grid; grid-template-columns:19% 72px minmax(0,1fr); align-items:center; text-align:left; gap:clamp(16px,2.3vw,34px);
  width:100%; min-height:112px; padding:0 14px 0 0; border:0; border-bottom:1px solid var(--line); background:transparent;
}
.advance-row:last-child { border-bottom:0; }
.advance-row:hover { background:var(--raised); }
.advance-row[aria-pressed=true] { background:var(--raised); box-shadow:inset 3px 0 var(--mint); }
.required-level { align-self:stretch; display:grid; place-items:center; color:var(--muted); border-right:1px solid var(--line); font-size:12px; }
.advance-symbol { position:relative; width:72px; height:72px; border-radius:6px; }
.advance-symbol > .game-art,.advance-title > .game-art { border:1px solid var(--line); }
.advance-badge { position:absolute; right:-7px; bottom:-9px; width:35px; height:35px; border-radius:50%; border:2px solid var(--muted); background:var(--ground); display:grid; place-items:center; }
.advance-badge .game-art { border-radius:50%; }
.max-rank { color:var(--gold); border-color:var(--gold); font-weight:800; font-size:11px; }
.advance-label strong,.advance-title h3 { font-family:var(--head); font-size:15px; line-height:1.3; }
.advance-label small,.advance-title small { display:block; margin-top:5px; font-size:12px; color:var(--muted); }
.advance-detail { min-width:0; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:28px; background:var(--ground); }
.advance-detail.has-selection { align-items:stretch; justify-content:flex-start; }
.advance-prompt { color:var(--muted); text-align:center; }
.advance-title { display:flex; gap:16px; align-items:center; padding-bottom:16px; border-bottom:1px solid var(--line); }
.advance-title > .game-art { width:60px; height:60px; border-radius:6px; }
.advance-title small { margin:0 0 3px; }.advance-title h3 { font-size:20px; }
.rank-current { margin:20px 0 9px; color:var(--muted); }.rank-current b { color:var(--gold); margin-left:8px; }
.advance-copy { line-height:1.65; white-space:pre-line; overflow-wrap:anywhere; color:var(--ink); }
.ranks { margin-top:18px; font-size:12px; }
.ranks summary { color:var(--mint); width:fit-content; }
.ranks ol { max-height:245px; overflow:auto; overscroll-behavior:contain; list-style:none; padding:0 8px 0 0; margin:8px 0 0; }
.ranks li { display:flex; align-items:baseline; gap:8px; padding:5px 0; border-top:1px solid var(--faint); }
.ranks li b { min-width:22px; color:var(--muted); }.ranks li strong { color:var(--gold); }
.effect-options { display:flex; flex-wrap:wrap; gap:15px; margin:24px 0 10px; }
.effect-option { width:68px; height:68px; position:relative; padding:4px; border:2px solid var(--line); border-radius:50%; background:var(--raised); }
.effect-option .game-art { border-radius:50%; }
.effect-option.locked .game-art { filter:grayscale(.9) brightness(.65); }
.effect-option[aria-pressed=true],.effect-option:hover { border-color:var(--mint); }
.effect-mark { display:grid; place-items:center; position:absolute; bottom:-2px; right:0; height:17px; width:17px; background:var(--gold); color:var(--ground); border:1px solid var(--ground); border-radius:50%; }
.effect-name { font:700 16px/1.4 var(--head); margin:9px 0 2px; }
.effect-status { color:var(--gold); font-size:12px; margin-bottom:10px; }
.advance-progress { padding:13px 18px 15px; border-top:1px solid var(--line); }
.advance-progress > div { display:flex; justify-content:space-between; gap:8px; }
.advance-progress progress { appearance:none; display:block; width:100%; height:8px; margin:13px 0 0; background:var(--ground); border:1px solid var(--line); border-radius:4px; overflow:hidden; accent-color:var(--mint); }
.advance-progress progress::-webkit-progress-bar { background:var(--ground); }
.advance-progress progress::-webkit-progress-value { background:var(--mint); }
.advance-progress progress::-moz-progress-bar { background:var(--mint); }

.card-gallery { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:start; gap:10px; padding:16px 18px; }
.collection-card {
  position:relative; display:block; width:100%; aspect-ratio:220/316; background:var(--ground); padding:0; border:0; border-radius:2px;
  container-type:inline-size;
}
.collection-card:hover,.collection-card.selected,.collection-card:focus-visible { outline:2px solid var(--mint); outline-offset:2px; }
.collection-card img { position:absolute; pointer-events:none; }
.card-art { left:7%; top:5%; width:86%; height:64%; object-fit:cover; }
.card-frame { inset:0; width:100%; height:100%; }
.card-emblem { left:7.5%; top:5.2%; width:14%; height:10.8%; object-fit:contain; }
.card-cost,.card-name,.card-effects { position:absolute; display:flex; justify-content:center; align-items:center; text-align:center; line-height:1.2; }
.card-cost { top:18%; left:6.4%; width:16.8%; height:9.2%; color:var(--ink); font-size:clamp(11px,5.8cqw,16px); font-weight:700; }
.card-name,.card-effects { left:2px; right:2px; padding-inline:5px; }
.card-name { top:68%; height:9%; background:var(--raised); color:var(--ink); border-block:1px solid var(--line); font:700 clamp(11px,5.7cqw,15px)/1.12 var(--head); }
.card-effects { top:77%; bottom:2px; flex-direction:column; gap:2px; background:var(--surface); color:var(--muted); font-size:clamp(11px,5.1cqw,13px); }
.card-effects b { color:var(--mint); font-weight:720; }
.unframed { border:1px solid var(--line); }

.talent-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); grid-auto-rows:1fr; gap:16px; padding:24px; }
.talent-tile { min-width:0; min-height:175px; padding:0 0 10px; display:flex; flex-direction:column; align-items:center; border:1px solid var(--line); border-radius:7px; overflow:hidden; background:var(--raised); }
.talent-tile:hover,.talent-tile.selected { border-color:var(--mint); }
.talent-skill { width:100%; min-height:32px; display:flex; align-items:center; gap:5px; padding:3px 7px; background:var(--surface); border-bottom:1px solid var(--line); color:var(--muted); font:650 11px/1.25 var(--head); text-align:left; }
.talent-skill img { width:24px; height:24px; border:1px solid var(--line); border-radius:4px; }
.talent-medal { width:76px; height:76px; margin:20px 0 13px; padding:7px; position:relative; border:1px solid var(--dim); border-radius:50%; background:var(--ground); box-shadow:0 0 0 3px var(--line); display:grid; place-items:center; }
.talent-medal .game-art { width:56px; height:56px; border-radius:50%; }
.talent-level { position:absolute; bottom:-3px; right:-5px; height:27px; min-width:27px; display:grid; place-items:center; padding:1px 4px; border:1px solid var(--dim); border-radius:50%; background:var(--ground); color:var(--ink); font-size:12px; font-weight:700; }
.talent-tile strong { flex:1; display:grid; place-items:center; padding:3px 6px; font:700 13px/1.25 var(--head); overflow-wrap:anywhere; }
.build-panel[data-view=ep] .game-metric b { color:var(--mint); }

.passive-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(var(--rows-three),auto); grid-auto-flow:column; margin:0 -1px -1px 0; }
.passive-row { min-height:62px; display:flex; align-items:center; gap:11px; text-align:left; padding:8px 12px; background:transparent; border:0; border-right:1px solid var(--line); border-bottom:1px solid var(--faint); }
.passive-row:hover,.passive-row.selected { background:var(--raised); }
.passive-row.selected strong { color:var(--mint); }
.passive-row .game-art { width:42px; height:42px; border:1px solid var(--line); border-radius:5px; }
.passive-row.inactive .game-art { filter:grayscale(.8) brightness(.72); }
.passive-row strong { font:650 13px/1.35 var(--head); overflow-wrap:anywhere; }

@media(max-width:1050px) {
  .talent-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:16px; }
}
@media(max-width:960px) {
  .card-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .glyph-skill { width:58px; }.glyph-skill button { width:47px; height:47px; }
  .glyph-nodes { gap:0 1px; padding-inline:4px; }.glyph-node { width:35px; }.glyph-orb { width:30px; height:30px; }
}
@media(max-width:760px) {
  .advance-layout { grid-template-columns:minmax(0,1fr); }
  .advance-list { border-right:0; }.advance-row { min-height:86px; grid-template-columns:18% 56px minmax(0,1fr); gap:19px; }
  .advance-symbol { width:56px; height:56px; }.advance-badge { width:31px; height:31px; bottom:-5px; right:-5px; }
  .advance-detail { border-top:1px solid var(--line); min-height:80px; padding:18px; }
  .advance-progress > div { flex-wrap:wrap; }.effect-option { width:60px; height:60px; }
  .talent-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .passive-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(var(--rows-two),auto); }
}
@media(max-width:560px) {
  .game-tools { padding:9px 11px; }.game-tools-main { gap:5px 12px; }
  .preset-button,.page-arrow { min-width:33px; height:32px; }
  .glyph-column { background:none; }.glyph-row:last-child { border-bottom:0; }
  .glyph-skill { width:62px; }.glyph-skill button { width:48px; height:48px; }
  .glyph-nodes { gap:2px; padding-inline:8px; }.glyph-node { width:42px; }.glyph-orb { width:34px; height:34px; }
  .glyph-footer { grid-template-columns:auto 1fr; gap:10px; padding-inline:10px; }.glyph-pager { grid-column:1; gap:8px; }
  .card-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; }
  .talent-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:11px; }
  .talent-tile { min-height:157px; }.talent-medal { margin:14px 0 9px; width:70px; height:70px; padding:5px; }.talent-medal .game-art { width:54px; height:54px; }
  .passive-grid { grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-auto-flow:row; }
}
@media(max-width:360px) {
  .card-gallery { grid-template-columns:minmax(0,1fr); padding-inline:20px; }
}
