/* BetterBuilder — "arcane constellation".
 * The tree is the page; everything else floats over it.
 *
 * Three rules this file holds to:
 *   1. Gold and silver mean *currency*, never chrome. Neutral --chrome does
 *      brand, hover, focus and tabs, so the two essences stay meaningful.
 *   2. Glow budget of two: lit constellation links, and the search pulse.
 *      Everything else emphasises with weight, rule and density.
 *   3. Data is monospace; display is small-caps serif; prose is humanist sans.
 */

:root {
  --void: #101017;
  --glass: rgba(24, 24, 33, 0.78);

  /* currencies — two metals on one artifact */
  --gold: #d9a441;
  --gold-lit: #f0cd83;
  --gold-deep: #6d4c1c;
  --silver: #b9c6d6;
  --silver-lit: #e6eef7;
  --silver-deep: #5c6775;

  /* chrome is deliberately NOT a currency colour */
  --chrome: #a89a83;
  --chrome-lit: #ded3c0;
  --bronze: #3b332a;
  --bad: #e2716f;

  --text: #e9e3d6;
  --dim: #9c9384;
  --faint: #6f6859;

  --edge: rgba(233, 227, 214, 0.13);
  --edge-soft: rgba(233, 227, 214, 0.06);

  /* sized so two 11-wide trees sit side by side without much panning */
  --cell: 50px;
  --gap: 16px;

  --display: "Cormorant SC", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

/* Every number in the UI is mono — the single fastest way to stop reading
   as a luxury-fantasy landing page and start reading as an instrument. */
.num,
.pips,
.tag,
.orb-val,
.rank,
.spent,
.tab-spent,
.gate-row,
#results-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- the void */

.void {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 620px at 22% 12%, rgba(64, 52, 102, 0.42), transparent 62%),
    radial-gradient(760px 560px at 82% 82%, rgba(104, 70, 40, 0.28), transparent 60%),
    radial-gradient(1500px 1000px at 50% 46%, #1c1c28 0%, var(--void) 76%);
}
.void::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.26;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Each layer tiles at its own near-prime size, so the field repeats without a
   readable rhythm. Without background-size these paint once each — seven stars
   on the whole viewport, which is what this used to be. */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1.4px 1.4px at 22% 31%, rgba(255, 240, 210, 0.95), transparent 100%),
    radial-gradient(1px 1px at 74% 12%, rgba(200, 220, 255, 0.8), transparent 100%),
    radial-gradient(1.6px 1.6px at 41% 78%, rgba(255, 236, 200, 0.85), transparent 100%),
    radial-gradient(1px 1px at 88% 63%, rgba(210, 225, 255, 0.7), transparent 100%),
    radial-gradient(1.2px 1.2px at 9% 54%, rgba(255, 245, 220, 0.65), transparent 100%),
    radial-gradient(1px 1px at 57% 41%, rgba(232, 240, 255, 0.6), transparent 100%),
    radial-gradient(1.8px 1.8px at 33% 7%, rgba(255, 232, 190, 0.55), transparent 100%);
  background-size: 191px 191px, 313px 313px, 437px 437px, 271px 271px, 359px 359px,
    503px 503px, 617px 617px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 45%, transparent 62%, rgba(4, 4, 8, 0.58) 100%);
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* -------------------------------------------------------------- the HUD */

/* Engraver's double rule — a plate border, not a chamfered sci-fi panel.
   The inner rule is what reads as "printed", and no template ships it. */
.hud {
  position: fixed;
  z-index: 10;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid var(--edge);
  outline: 1px solid var(--edge-soft);
  outline-offset: -5px;
}

.hud-top {
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 20px;
  border-width: 0 0 1px;
  outline: 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 0 0 auto;
}
.sigil {
  color: var(--chrome);
  font-size: 15px;
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--chrome-lit);
}
.brand-realm {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.seek {
  position: relative;
  flex: 1 1 auto;
  max-width: 440px;
}
#search {
  width: 100%;
  padding: 7px 34px 7px 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--edge);
  border-radius: 0;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
#search::placeholder {
  color: var(--faint);
}
#search:focus {
  border-color: var(--chrome);
  background: rgba(0, 0, 0, 0.5);
}
#search::-webkit-search-cancel-button {
  filter: invert(0.6);
}
.seek-key {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  pointer-events: none;
}
#search:focus ~ .seek-key {
  opacity: 0;
}

.actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.btn {
  padding: 5px 14px;
  border: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dim);
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.btn:hover {
  color: var(--chrome-lit);
  border-color: var(--chrome);
  background: rgba(233, 227, 214, 0.05);
}
.btn-ghost {
  border-color: transparent;
}
.icon-btn {
  padding: 2px 8px;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
}
.icon-btn:hover {
  color: var(--chrome-lit);
}

/* ------------------------------------------------------------ class rail */

.rail {
  top: 56px;
  left: 0;
  bottom: 0;
  width: 196px;
  padding: 14px 8px 20px;
  overflow-y: auto;
  border-width: 0 1px 0 0;
  outline: 0;
}
.rail-title,
.panel-title {
  margin: 2px 10px 12px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--chrome);
}
.class-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 10px;
  text-align: left;
  font-size: 14.5px;
  color: var(--dim);
  border-left: 2px solid transparent;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.class-btn:hover {
  color: var(--text);
  background: rgba(233, 227, 214, 0.05);
}
.class-btn.on {
  color: var(--chrome-lit);
  border-left-color: var(--chrome);
  background: linear-gradient(90deg, rgba(233, 227, 214, 0.09), transparent);
}
.class-btn .spent {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
}

/* ------------------------------------------------------------- tab strip */

.hud-tabs {
  top: 72px;
  left: 212px;
  display: flex;
  gap: 0;
  padding: 3px;
}
.tab-btn {
  padding: 6px 16px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--faint);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}
.tab-btn:hover {
  color: var(--dim);
}
.tab-btn.on {
  color: var(--chrome-lit);
  border-bottom-color: var(--chrome);
}
.tab-btn .tab-spent {
  margin-left: 8px;
  font-size: 10.5px;
  color: var(--faint);
}

/* --------------------------------------------------- the constellation */

.canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: auto;
  padding: 126px 360px 116px 250px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  scrollbar-width: none;
}
.canvas::-webkit-scrollbar {
  display: none;
}
.aura {
  position: fixed;
  left: 50%;
  top: 52%;
  width: 1100px;
  height: 900px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(217, 164, 65, 0.05), transparent 70%);
}
.trees {
  display: flex;
  align-items: flex-start;
  gap: 54px;
  flex: 0 0 auto;
}
/* a hairline between the shared Class tree and the spec tree */
.trees .pane + .pane {
  padding-left: 54px;
  border-left: 1px solid var(--edge-soft);
}
.pane-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--edge);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--chrome);
}
.pane-spent {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
}
.tree {
  position: relative;
  flex: 0 0 auto;
}
.links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
/* an undrawn constellation is just points — dotted until you connect it */
.links line {
  stroke: #38322a;
  stroke-width: 1.25;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.links line.lit {
  stroke: var(--gold);
  stroke-width: 1.75;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 3px rgba(217, 164, 65, 0.55)); /* glow 1 of 2 */
}
.links line.lit.ae {
  stroke: var(--silver);
  filter: drop-shadow(0 0 3px rgba(185, 198, 214, 0.5));
}
.cell {
  position: absolute;
  width: var(--cell);
  height: var(--cell);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cell.choice {
  width: calc(var(--cell) * 1.62);
  margin-left: calc(var(--cell) * -0.31);
}
.cell.choice::before {
  content: "";
  position: absolute;
  inset: auto 6px -7px 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze) 22%, var(--bronze) 78%, transparent);
}

.node {
  position: relative;
  width: var(--cell);
  height: var(--cell);
  flex: 0 0 auto;
}
/* size carries rank the way shape carries type — a uniform grid is a spreadsheet */
.node.tier-minor {
  width: calc(var(--cell) * 0.84);
  height: calc(var(--cell) * 0.84);
}
.node.tier-key {
  width: calc(var(--cell) * 1.22);
  height: calc(var(--cell) * 1.22);
}
.cell.choice .node {
  width: calc(var(--cell) * 0.74);
  height: calc(var(--cell) * 0.74);
}

/* the metal plate behind the icon; clip-path makes it follow the node shape */
.node::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(160deg, #4a4034, #221d18 55%, #100d0b);
  transition: background 0.18s, filter 0.18s;
}
.node.tier-key::before {
  inset: -4px;
}

.art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.art img {
  width: 100%;
  height: 100%;
  display: block;
  /* No zoom. These icons are full-bleed art with no baked border, so scaling
     up only threw away the edges of the illustration. */
  /* Locked nodes are pulled back, not drained: the art stays legible and keeps
     most of its colour. Full greyscale here made the whole tree unreadable. */
  filter: saturate(0.62) brightness(0.78) contrast(1.04);
  transition: filter 0.18s;
}
/* a whisper of shared ink so the muddiest icons don't clash — not a repaint */
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #8a6a3c;
  mix-blend-mode: color;
  opacity: 0.22;
  transition: opacity 0.18s;
}
.node.ae .art::after {
  background: #6c7686;
}

.node.circle::before,
.node.circle .art {
  border-radius: 50%;
}
.node.circle .art {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9);
}
/* Octagon, not a diamond. A diamond inscribed in the icon keeps only half its
   area, so the art had to be zoomed 1.42x to fill it and lost ~30% off every
   edge. An octagon takes just the corners and still reads as "not a circle". */
.node.square::before,
.node.square .art {
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
/* only 5 keystones use this; widened to the full box so it crops as little as
   the shape allows while staying unmistakably not-a-circle */
.node.hex::before,
.node.hex .art {
  clip-path: polygon(50% 0, 100% 27%, 100% 73%, 50% 100%, 0 73%, 0 27%);
}

/* unlocked, not yet taken */
.node.open::before {
  background: linear-gradient(160deg, #7d6a48, #55462f 55%, #241d14);
}
/* unlocked reads at nearly full strength — these are your live choices */
.node.open .art img {
  filter: saturate(0.95) brightness(1) contrast(1.02);
}
.node.open .art::after {
  opacity: 0.08;
}

/* hover emphasises the plate, never the bitmap — scaling low-res JPEG mud is
   the worst thing you can do to it */
.node:hover {
  z-index: 5;
}
.node:hover::before {
  background: linear-gradient(160deg, var(--chrome-lit), var(--chrome) 50%, #6a6152);
}
.node:hover .art img,
.node.on .art img {
  filter: saturate(1.08) brightness(1.06) contrast(1.02);
}
.node:hover .art::after,
.node.on .art::after {
  opacity: 0;
}

/* taken. Talents are a solid gilded plate; abilities an inscribed hollow ring,
   so the two currencies survive a grayscale screenshot. */
.node.on::before {
  background: linear-gradient(160deg, var(--gold-lit), var(--gold) 46%, var(--gold-deep));
}
.node.on.ae::before {
  background: radial-gradient(
    closest-side,
    transparent 60%,
    var(--silver-lit) 63%,
    var(--silver) 82%,
    var(--silver-deep) 100%
  );
}
.node.partial::before {
  background: linear-gradient(160deg, var(--gold) 0 50%, #3a3128 50%);
}
.node.partial.ae::before {
  background: linear-gradient(160deg, var(--silver) 0 50%, #2b3138 50%);
}

.node .pips {
  position: absolute;
  right: -7px;
  bottom: -7px;
  z-index: 2;
  min-width: 20px;
  padding: 0 3px;
  background: #08080b;
  border: 1px solid var(--bronze);
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
  color: var(--dim);
}
.node.on .pips {
  border-color: var(--gold);
  color: var(--gold-lit);
}
.node.on.ae .pips {
  border-color: var(--silver);
  color: var(--silver-lit);
}

/* search: the tree itself answers the query */
.trees.seeking .node {
  opacity: 0.2;
  transition: opacity 0.2s;
}
.trees.seeking .links line {
  opacity: 0.2;
}
.trees.seeking .node.match {
  opacity: 1;
}
.trees.seeking .node.match::before {
  background: linear-gradient(160deg, #fff3d0, var(--gold-lit) 50%, var(--gold));
  filter: drop-shadow(0 0 10px rgba(240, 205, 131, 0.8)); /* glow 2 of 2 */
  animation: pulse 2s ease-in-out infinite;
}
.trees.seeking .node.match .art img {
  filter: contrast(1.04);
}
.trees.seeking .node.match .art::after {
  opacity: 0;
}
@keyframes pulse {
  50% {
    filter: drop-shadow(0 0 20px rgba(240, 205, 131, 0.95));
  }
}
.node.hit::before {
  animation: pulse 0.85s ease-in-out 3;
}

/* gate divider, drawn like a chart graticule: the label sits in a gap */
.gate-row {
  position: absolute;
  left: -34px;
  right: -34px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 1px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--faint);
  white-space: nowrap;
}
.gate-row::before,
.gate-row::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze) 24%, var(--bronze) 76%, transparent);
}
.gate-row.met {
  color: var(--gold);
}
.gate-row.met::before,
.gate-row.met::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217, 164, 65, 0.42) 24%,
    rgba(217, 164, 65, 0.42) 76%,
    transparent
  );
}

/* -------------------------------------------------------------- essence */

.hud-essence {
  left: 212px;
  bottom: 18px;
  display: flex;
  gap: 20px;
  padding: 11px 18px;
}
.orb {
  min-width: 136px;
}
.orb-label {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--dim);
}
.orb-val {
  float: right;
  font-size: 12.5px;
  color: var(--text);
}
.orb-val i {
  font-style: normal;
  color: var(--faint);
}
#meter-ae .orb-label {
  color: var(--silver);
}
#meter-te .orb-label {
  color: var(--gold);
}
.orb-bar {
  clear: both;
  height: 3px;
  margin-top: 7px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 0 0 1px var(--edge-soft);
}
.orb-bar span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
#meter-ae .orb-bar span {
  background: linear-gradient(90deg, var(--silver-deep), var(--silver-lit));
}
#meter-te .orb-bar span {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-lit));
}
.orb.full .orb-bar span {
  background: linear-gradient(90deg, #6d2b2b, var(--bad));
}

/* ------------------------------------------------------------ build list */

.hud-build {
  right: 0;
  top: 56px;
  bottom: 0;
  width: 300px;
  padding: 14px 12px 24px;
  overflow-y: auto;
  border-width: 0 0 0 1px;
  outline: 0;
}
.build-group {
  margin-bottom: 18px;
}
.build-group > h4 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 6px 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--edge);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--chrome);
}
.build-group > h4 span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.build-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 6px;
  text-align: left;
  font-size: 14px;
  color: var(--dim);
}
.build-item:hover {
  color: var(--text);
  background: rgba(233, 227, 214, 0.05);
}
.build-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--bronze);
  flex: 0 0 auto;
}
.build-item .rank {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
}

/* ---------------------------------------------------------------- drawer */

.drawer {
  position: fixed;
  z-index: 14;
  right: 0;
  top: 56px;
  bottom: 0;
  width: 420px;
  display: flex;
  flex-direction: column;
  background: rgba(9, 9, 13, 0.92);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--edge);
  animation: slide 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes slide {
  from {
    transform: translateX(26px);
    opacity: 0;
  }
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 11px;
  font-size: 12px;
  color: var(--chrome);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--edge);
}
.chip {
  padding: 2px 11px;
  border: 1px solid var(--edge);
  font-size: 13px;
  color: var(--dim);
  transition: color 0.16s, border-color 0.16s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--chrome);
}
.chip.on {
  color: var(--chrome-lit);
  border-color: var(--chrome);
  background: rgba(233, 227, 214, 0.08);
}
.results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 8px 24px;
}

.result {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 9px 8px;
  text-align: left;
  border-left: 2px solid transparent;
  transition: background 0.14s, border-color 0.14s;
}
.result:hover {
  background: rgba(233, 227, 214, 0.05);
  border-left-color: var(--chrome);
}
.result > img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--bronze);
  flex: 0 0 auto;
}
.result-body {
  min-width: 0;
  flex: 1 1 auto;
}
.result-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.result-title strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}
.result-where {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.result-snip {
  margin-top: 2px;
  color: var(--dim);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
mark {
  background: rgba(217, 164, 65, 0.22);
  color: var(--gold-lit);
  padding: 0 2px;
}
.empty {
  padding: 50px 24px;
  text-align: center;
  color: var(--faint);
  font-size: 13.5px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.tag {
  padding: 0 6px;
  border: 1px solid var(--edge-soft);
  font-size: 10.5px;
  line-height: 17px;
  color: var(--dim);
  white-space: nowrap;
}
.tag b {
  color: var(--text);
  font-weight: 500;
}
.tag.ae {
  color: var(--silver);
  border-color: rgba(185, 198, 214, 0.3);
}
.tag.te {
  color: var(--gold);
  border-color: rgba(217, 164, 65, 0.3);
}
.tag.cd {
  color: #f0a882;
  border-color: rgba(240, 168, 130, 0.28);
}

/* --------------------------------------------------------------- tooltip */

.tooltip {
  position: fixed;
  z-index: 60;
  width: 356px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 14px 16px;
  background: rgba(8, 8, 12, 0.98);
  border: 1px solid var(--edge);
  outline: 1px solid var(--edge-soft);
  outline-offset: -5px;
  pointer-events: none;
  font-size: 14px;
}
.tt-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.tt-head img.tt-main {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 0 0 2px var(--bronze);
  flex: 0 0 auto;
}
.tt-head h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--chrome-lit);
}
.tt-sub {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 10.5px;
}
.tt-body {
  margin-top: 11px;
  color: #cfc8ba;
  line-height: 1.56;
}
.tt-body .item-number {
  color: var(--gold-lit);
  font-weight: 700;
}
.tt-body .pop-inline-spell {
  margin-top: 10px;
  padding: 9px 11px;
  background: rgba(233, 227, 214, 0.03);
  border-left: 2px solid var(--edge);
}
.tt-body .pop-inline-spell hr {
  display: none;
}
.tt-body .pop-inline-spell .name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.tt-body .pop-inline-spell .desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--dim);
}
.tt-body .d-flex {
  display: flex;
  align-items: center;
}
.tt-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -5px;
  flex: 0 0 auto;
}
.tt-rank {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--edge);
}
.tt-rank-label,
.tt-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--faint);
}
.tt-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--edge);
  font-size: 13.5px;
  color: var(--bad);
}
.tt-hint {
  margin-top: 10px;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 9px 20px;
  background: rgba(12, 12, 17, 0.97);
  border: 1px solid var(--edge);
  outline: 1px solid var(--edge-soft);
  outline-offset: -4px;
  font-size: 14px;
  animation: slide 0.2s ease;
}

@media (max-width: 1400px) {
  .hud-build {
    display: none;
  }
  .canvas {
    padding-right: 120px;
  }
}
@media (max-width: 1040px) {
  .rail {
    display: none;
  }
  .hud-tabs,
  .hud-essence {
    left: 16px;
  }
  .canvas {
    padding: 126px 40px 116px;
  }
  .drawer {
    width: 100%;
  }
}
