


































.embed-surface:has(.dash-body[data-active-tab="techtree"]) {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.site-main:has(.dash-body[data-active-tab="techtree"]) {
  height: 100vh;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.embed-surface:has(.dash-body[data-active-tab="techtree"]) section.dashboard,
.site-main:has(.dash-body[data-active-tab="techtree"]) section.dashboard {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.embed-surface:has(.dash-body[data-active-tab="techtree"]) .dash-body,
.site-main:has(.dash-body[data-active-tab="techtree"]) .dash-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.embed-surface:has(.dash-body[data-active-tab="techtree"]) #tt-root,
.site-main:has(.dash-body[data-active-tab="techtree"]) #tt-root {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}







.embed-surface:has(.dash-body[data-active-tab="techtree"]) .tt-tree-panel,
.site-main:has(.dash-body[data-active-tab="techtree"]) .tt-tree-panel {
  flex: 1;
  min-height: 362px;
}






@media (max-width: 600px), (max-height: 560px) {
  .embed-surface:has(.dash-body[data-active-tab="techtree"]) .tt-sub,
  .site-main:has(.dash-body[data-active-tab="techtree"]) .tt-sub,
  .embed-surface:has(.dash-body[data-active-tab="techtree"]) .tt-footer-row,
  .site-main:has(.dash-body[data-active-tab="techtree"]) .tt-footer-row {
    display: none;
  }
  .embed-surface:has(.dash-body[data-active-tab="techtree"]) .tt-tree-panel,
  .site-main:has(.dash-body[data-active-tab="techtree"]) .tt-tree-panel {
    min-height: 200px;
  }












  .embed-surface:has(.dash-body[data-active-tab="techtree"]) .tt-tree-wrap,
  .site-main:has(.dash-body[data-active-tab="techtree"]) .tt-tree-wrap {
    min-height: 200px;
  }
}




















.embed-surface.ct-embed-mount:has(.dash-body[data-active-tab="techtree"]) {
  height: auto;
  overflow: hidden;
  padding-bottom: 0;
}







.embed-surface.ct-embed-mount:has(.dash-body[data-active-tab="techtree"]) #tt-root {
  border: none;
  background: none;
  padding: 0;
}






.tt-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82em;
}
.tt-bar-sp {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cur-skill);
  font-weight: 700;
}
.tt-bar-sp .tt-pglyph { display: inline-flex; }




.tt-bar-wp {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--yellow);
  font-weight: 700;
}
.tt-bar-wp .tt-pglyph { display: inline-flex; }
.tt-bar-prog {
  flex: 1 1 auto;
  min-width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}












.tt-bar-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}





.tt-bar-row .tt-bar {
  flex: 1 1 auto;
  margin-bottom: 0;
  height: 40px;
}
@media (max-width: 600px) {
  .tt-bar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tt-bar-row .tt-bar {
    flex: 0 0 auto;
    height: 44px;
  }
}











.tt-bar-row .subnav-desk-pick.tt-tree-desk-pick {
  border-radius: 8px;
  border-color: var(--line);
}
.tt-bar-row .subnav-pick.tt-tree-pick {
  border-radius: 8px;
  border-color: var(--line);
  background: var(--panel);
}
.tt-bar-prog i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  background: var(--cur-skill);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.tt-bar-more { position: relative; flex: 0 0 auto; }
.tt-bar-more > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0 -10px;
  color: var(--muted);
  font-size: 1.15em;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.tt-bar-more > summary::-webkit-details-marker { display: none; }
.tt-bar-more > summary::marker { content: ''; }
.tt-bar-more > summary:hover,
.tt-bar-more > summary:focus-visible { color: var(--cyan); }
.tt-bar-more[open] > summary { color: var(--cyan); }



.tt-bar-detail {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 5;
  width: min(320px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 12px;
}



.tt-bar-exact,
.tt-bar-wp-note {
  font-size: 0.92em;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 8px;
}
.tt-bar-detail .tt-sub { margin: 0 0 8px; }
.tt-bar-detail .tt-weapons { margin: 0; }





.embed-surface.ct-embed-mount .tt-zoom {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.embed-surface.ct-embed-mount .tt-zoom:hover,
.embed-surface.ct-embed-mount .tt-zoom:focus-within,
.embed-surface.ct-embed-mount .tt-zoom:active {
  opacity: 1;
}






.tt-panel { display: flex; flex-direction: column; gap: 0; }

.tt-headrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.tt-title { margin: 0; font-size: 1.15em; color: var(--cyan); }
.tt-glyph { font-size: 1.2em; }




.tt-pills {
  display: flex;
  gap: 8px;
}
.tt-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(13, 19, 34, 0.8);
  font-size: 0.82em;
  white-space: nowrap;
}
.tt-pill-global .tt-pglyph { color: var(--cur-skill); font-size: 1.1em; }
.tt-pill-weapon .tt-pglyph { color: var(--yellow); font-size: 1.1em; }
.tt-pv { font-weight: 700; font-size: 1.05em; min-width: 1.2em; text-align: center; }
.tt-plbl { color: var(--muted); font-size: 0.85em; }







.tt-pts-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.tt-spent-row {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78em;
  color: var(--muted);
  white-space: nowrap;
}
.tt-spent-row .tt-pv {
  font-size: 1em;
  min-width: 0;
  color: var(--text-dim);
}



.tt-spent-tip--hidden {
  display: none;
}








.tt-pts-global { color: var(--cur-skill); font-weight: 600; }
.tt-pts-weapon { color: var(--yellow);  font-weight: 600; }


.tt-sub {
  margin: 6px 0;
  font-size: 0.82em;
  color: var(--muted);
  line-height: 1.5;
}
.tt-sub strong { color: var(--text-dim); }




.tt-info-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 2px;
}
.tt-info-row .tt-sub {
  flex: 1 1 auto;
  margin: 0;
}
.tt-info-row .tt-metercol {
  flex: 0 0 320px;
}
.tt-info-row .cs-hexa-progress {
  margin: 0;
}
@media (max-width: 760px) {
  .tt-info-row {
    flex-direction: column;
    gap: 10px;
  }
  .tt-info-row .tt-metercol {
    flex-basis: auto;
    width: 100%;
  }
}





.tt-weapons {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 0 0 0.6em;
}
.tt-wchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.4em 0.9em;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 0.88em;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tt-wchip:hover {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(56, 225, 255, 0.08);
}
.tt-wchip.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.10);
  text-shadow: 0 0 8px rgba(56, 225, 255, 0.3);
}

.tt-wglyph {
  font-size: 1.1em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}


.tt-wglyph svg.wpn-icon, .tt-cand-glyph svg.wpn-icon, .tt-preview-glyph svg.wpn-icon,
.tt-hint-glyph svg.wpn-icon, .tt-toast-glyph svg.wpn-icon {
  display: block; vertical-align: middle; width: 1.35em; height: 1.35em; margin: -0.15em 0;
}
.tt-wglyph svg.research-icon, .tt-hint-glyph svg.research-icon { display: block; width: 18px; height: 18px; }



.tt-wglyph--pakt { color: var(--cur-skill); }

.tt-wlabel { font-size: 0.9em; }















#tt-root .tt-wchip.locked { opacity: 0.55; border-style: dashed; cursor: pointer; }

.tt-tree-locked-status { display: inline-flex; align-items: center; gap: 3px; }
.tt-tree-lock { color: var(--muted); vertical-align: -1px; }



.tt-tree-eq,
.tt-tree-open { color: var(--green); }



.tt-tree-desk-note {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 0.82em;
  color: var(--yellow);
}




.tt-tree-desk-note:empty {
  display: none;
}





.tt-headrow:has(.subnav-desk) { justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
.tt-headrow:has(.subnav-desk) .subnav-desk { margin-left: auto; }











#tt-root .tt-wchip .tt-stand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: normal;
  text-align: right;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
#tt-root .tt-wchip--task.active .tt-stand { color: var(--cyan); }
.tt-stand-n { color: var(--cyan); }

.tt-new {
  flex: none;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--cyan);
  color: var(--text-on-accent);
  font-size: var(--fs-caption);
  font-weight: 700;
}

.tt-pick-lock { display: inline-flex; vertical-align: middle; color: var(--text-dim); }
.tt-pick-lock .tt-tree-lock { color: inherit; }


.tt-hintline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 7px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  font-size: var(--fs-small);
  color: var(--text-dim);
}
.tt-hintline .tt-tree-lock { flex: none; }
.tt-hint-glyph { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.tt-hint-txt { min-width: 0; }
.tt-hint-n { color: var(--cyan); font-weight: 700; font-variant-numeric: tabular-nums; }
.tt-hint-go {
  margin-left: auto;
  flex: none;
  color: var(--cyan);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}



.tt-status-bar { flex: 1; height: 10px; overflow: hidden; border-radius: 99px; background: var(--line); }
.tt-status-bar i {
  display: block;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 45%, transparent);
  transition: width 0.22s;
}
.tt-status-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-status-num span { color: var(--muted); font-weight: 500; }
.tt-status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--cyan);
  color: var(--text-on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.tt-status-btn:hover { filter: brightness(1.08); }
.tt-status-btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.tt-status-why { margin: 8px 0 0; font-size: var(--fs-caption); line-height: 1.5; color: var(--muted); }









#tt-root .tt-wchip--choose { border-style: dashed; border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
#tt-root .tt-wchip--choose.active,
#tt-root .tt-wchip--choose[aria-selected="true"] { border-color: var(--cyan); }
#tt-root .tt-wchip--choose .tt-stand { color: var(--muted); }
.tt-wglyph--choose { color: var(--cyan); }
.tt-hint-glyph--choose { color: var(--cyan); }


.tt-chip-proto {
  flex: none;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  border-radius: 99px;
  color: var(--green);
  font-size: var(--fs-caption);
  font-weight: 700;
}
.tt-status-btn--ghost { background: transparent; color: var(--cyan); border: 1px solid var(--line-2); }

.tt-chip-got {
  flex: none;
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  border-radius: 99px;
  color: var(--green);
  font-size: var(--fs-caption);
  font-weight: 700;
}


.tt-choose { position: absolute; inset: 0; padding: 18px; overflow: auto; }
.tt-choose-title { margin: 0 0 2px; font-size: var(--fs-h3); font-weight: 700; color: var(--text); }
.tt-choose-title small {
  display: block;
  margin-bottom: 2px;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.tt-choose-lead, .tt-choose-empty { max-width: 60ch; margin: 0 0 10px; font-size: var(--fs-small); color: var(--text-dim); }
.tt-choose-empty { color: var(--muted); }
.tt-cand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-2) 90%, transparent);
}
.tt-cand--soon { opacity: 0.6; }
.tt-cand-glyph { flex: none; width: 20px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.tt-cand-info { flex: 1; min-width: 0; }
.tt-cand-info small { display: block; font-size: var(--fs-caption); color: var(--muted); }
.tt-cand-start { color: var(--cyan); font-variant-numeric: tabular-nums; }


.tt-preview-panel .tt-tree-wrap { opacity: 0.3; filter: grayscale(0.5); }
.tt-preview-panel .tt-node { animation: none; }
.tt-preview-box {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 28px);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.tt-preview-head { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 8px; }
.tt-preview-head b { white-space: nowrap; }
.tt-preview-glyph { display: inline-flex; align-items: center; justify-content: center; width: 20px; }
.tt-preview-back { margin-left: auto; font-size: var(--fs-small); font-weight: 600; color: var(--cyan); text-decoration: none; cursor: pointer; white-space: nowrap; }
small.tt-preview-back { font-size: var(--fs-caption); font-weight: 400; color: var(--muted); cursor: default; }

.tt-pcards { flex: 0 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-content: start; gap: 8px; margin-bottom: 10px; overflow: auto; }
.tt-pcard {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-size: var(--fs-small);
}
.tt-pcard-txt { padding: 0 2px 2px; }
.tt-pcard-txt b { color: var(--text); }
.tt-pcard-txt small { display: block; font-size: var(--fs-caption); color: var(--muted); }
.tt-pcard--empty { grid-column: 1 / -1; }

.tt-pcard--scene .tt-scene { order: -1; height: 100px; }
.tt-scene {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.tt-scene canvas { display: block; width: 100%; height: 100%; }


.tt-commit { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.tt-commit .tt-status-why { margin: 0; }
.tt-commit-err { color: var(--text); }
.tt-status-btn.tt-confirm {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 35%, transparent);
  animation: tt-confirm-pulse 1s ease-in-out infinite alternate;
}
@keyframes tt-confirm-pulse {
  from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 25%, transparent); }
  to { box-shadow: 0 0 0 5px color-mix(in srgb, var(--cyan) 45%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .tt-status-btn.tt-confirm { animation: none; }
}
.tt-confirm-cancel, .tt-pop-link { padding: 4px 2px; border: 0; background: none; font: inherit; color: var(--cyan); cursor: pointer; }


.tt-rstand { flex: none; display: grid; gap: 6px; }
.tt-rstand-task { margin: 0; font-size: var(--fs-small); color: var(--text-dim); }
.tt-rstand-task b { color: var(--text); }
.tt-rstand-row { display: flex; align-items: center; gap: 12px; }
.tt-rstand-row .tt-status-btn { margin-left: 6px; }
.tt-rstand .tt-status-why { max-width: 760px; margin: 0; }


.tt-toast--started { border-color: var(--cyan); }


@media (max-width: 600px) {
  .tt-choose { padding: 12px; }
  .tt-pcards { grid-template-columns: 1fr; }
  .tt-pcard--scene .tt-scene { order: 0; height: 96px; }
  .tt-preview-box { left: 8px; right: 8px; bottom: 8px; max-height: calc(100% - 16px); }

  .tt-rstand-row { flex-wrap: wrap; gap: 8px 10px; }
  .tt-rstand-row .tt-status-btn { margin-left: 0; width: 100%; }
}

@media (max-height: 560px) {
  .tt-rstand-task { display: none; }
}



.tt-tree-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.tt-disc-pill {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(13, 19, 34, 0.85);
  border: 1px solid var(--line-2);
  font-size: 0.75em;
  color: var(--muted);
  z-index: 2;
  white-space: nowrap;
}
.tt-disc-v { font-weight: 700; color: var(--cyan); }


.tt-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: rgba(13, 19, 34, 0.85);
  backdrop-filter: blur(2px);
}
.tt-zoom button {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.tt-zoom button + button { border-top: 1px solid var(--line-2); }
.tt-zoom button:hover { background: rgba(56, 225, 255, 0.10); color: var(--cyan); }
.tt-zoom button:active { background: rgba(56, 225, 255, 0.18); }
.tt-zoom button:disabled { color: var(--muted); opacity: 0.5; cursor: default; background: transparent; }
.tt-zoom button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

.tt-zoom #tt-zoom-reset { font-size: 1.05rem; }


.tt-tree-wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%; min-height: 360px;
  cursor: grab;
  touch-action: none;



  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.tt-tree-wrap.is-panning { cursor: grabbing; }
#tt-world {
  position: absolute; top: 0; left: 0;
  width: 2316px;
  height: 3080px;
  transform-origin: 0 0;
  will-change: transform;

}


#tt-edges {
  position: absolute;
  top: 0; left: 0;
  width: 2316px; height: 3080px;
  pointer-events: none;
  overflow: visible;
}
.tt-edge {
  stroke: var(--line-2);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke .2s, stroke-dasharray .2s;
}
.tt-edge-hidden { opacity: 0; }
.tt-edge-open {
  stroke: rgba(56, 225, 255, 0.4);
  stroke-dasharray: 5 4;
}
.tt-edge-lit {
  stroke: var(--cyan);
  stroke-width: 4;
  opacity: 0.8;
}


.tt-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 104px; height: 104px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: filter .15s;
}
.tt-node:focus-visible .tt-hexb { box-shadow: 0 0 0 3px var(--cyan); }
.tt-node:hover { filter: brightness(1.2); }
.tt-node.tt-hidden { display: none; }




.tt-hexb {
  position: absolute;
  width: 100%; height: 100%;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: var(--bg-2);
  border: 0;
  transition: background .2s;
}

.tt-node.tt-unlocked .tt-hexb { background: color-mix(in srgb, var(--bg-2) 72%, rgba(94,255,138,1) 28%); }
.tt-node.tt-avail .tt-hexb    { background: color-mix(in srgb, var(--bg-2) 78%, rgba(56,225,255,1) 22%); }
.tt-node.tt-expensive .tt-hexb{ background: color-mix(in srgb, var(--bg-2) 82%, rgba(255,77,110,1) 18%); }
.tt-node.tt-leveled .tt-hexb  { background: color-mix(in srgb, var(--bg-2) 72%, rgba(255,216,74,1) 28%); }
.tt-node.tt-special .tt-hexb  { background: color-mix(in srgb, var(--bg-2) 68%, rgba(255,216,74,1) 32%); }


.tt-node::before {
  content: '';
  position: absolute;
  width: 108px; height: 108px;
  top: -2px; left: -2px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: transparent;
  border: 3px solid var(--line);
  pointer-events: none;
}
.tt-node.tt-unlocked::before  { border-color: var(--green); }
.tt-node.tt-avail::before     { border-color: var(--cyan); }
.tt-node.tt-expensive::before { border-color: var(--red); opacity: .6; }
.tt-node.tt-leveled::before   { border-color: var(--yellow); }
.tt-node.tt-special::before   { border-color: var(--yellow); }





.tt-node.tt-preview { opacity: .6; }
.tt-node.tt-preview:hover,
.tt-node.tt-preview:focus-visible { opacity: 1; }
.tt-node.tt-preview .tt-hexb  { background: var(--bg-2); }
.tt-node.tt-preview::before   { border-color: var(--line-2); border-style: dashed; }
.tt-node.tt-preview .tt-ncost { color: var(--muted); }
.tt-node.tt-preview::after    { content: none; }



.tt-edge-preview { stroke: var(--line-2); stroke-dasharray: 5 4; opacity: .3; }


.tt-hexi {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 88px;
  gap: 0;
}
.tt-nglyph { font-size: 32px; line-height: 1; }





.tt-nname  { font-size: 14px; color: var(--text); line-height: 1.1; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }



.tt-sink:not(.tt-sink-group) .tt-nname { white-space: normal; hyphens: manual; overflow: visible; text-overflow: clip; line-height: 1.08; }
.tt-ncost  { font-size: 14px; color: var(--muted); }
.tt-cost-red { color: var(--red); }


.tt-ncheck {
  position: absolute;
  top: 2px; right: -2px;
  font-size: 18px;
  color: var(--green);
  opacity: 0;
  z-index: 3;
}
.tt-node.tt-unlocked .tt-ncheck { opacity: 1; }


.tt-nlvl {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  color: var(--yellow);
  font-weight: 700;
  white-space: nowrap;
  z-index: 3;
}


.tt-nstack {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 3;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.tt-nstack .tt-nstack-sep {
  color: var(--muted);
  font-weight: 400;
  margin: 0 1px;
}

.tt-node.tt-full .tt-nstack {
  color: var(--green);
}
.tt-node.tt-full .tt-nstack .tt-nstack-sep {
  color: var(--green);
  opacity: 0.6;
}



.tt-sink .tt-inf {
  position: absolute;
  top: -2px;
  left: -2px;
  font-size: 16px;
  line-height: 1;
  color: var(--yellow);
  font-weight: 700;
  z-index: 3;
  text-shadow: 0 0 4px rgba(0,0,0,.8);
}


@keyframes tt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(56, 225, 255, 0.55); }
  60%  { box-shadow: 0 0 0 14px rgba(56, 225, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 225, 255, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .tt-node.tt-avail::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: tt-pulse 1.8s ease infinite;
    pointer-events: none;
  }
}


@keyframes tt-reveal {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.65); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .tt-node.tt-reveal {
    animation: tt-reveal .35s ease-out both;
  }
}


@keyframes tt-shake {
  0%,100% { transform: translate(-50%, -50%); }
  20%     { transform: translate(calc(-50% + 4px), -50%); }
  40%     { transform: translate(calc(-50% - 4px), -50%); }
  60%     { transform: translate(calc(-50% + 3px), -50%); }
  80%     { transform: translate(calc(-50% - 2px), -50%); }
}
@media (prefers-reduced-motion: no-preference) {
  .tt-node.tt-shake { animation: tt-shake .35s ease both; }
}


.tt-tip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  padding: 10px 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
  pointer-events: none;
  font-size: 0.8em;
}
.tt-tip-name  { font-weight: 700; color: var(--cyan); margin-bottom: 3px; }
.tt-tip-kind  { color: var(--muted); font-size: 0.88em; margin-bottom: 5px; }
.tt-tip-desc  { color: var(--text-dim); margin-bottom: 6px; line-height: 1.4; }
.tt-tip-cost  { color: var(--text-dim); font-size: 0.9em; margin-bottom: 4px; }
.tt-tip-state { color: var(--cyan); font-weight: 600; font-size: 0.88em; }
.tt-tip-muted { color: var(--muted); font-weight: 400; }
.tt-tip-pool  { font-size: 0.9em; line-height: 1.4; margin-bottom: 6px; }

.tt-tip.tt-tip--scene { width: 260px; box-sizing: border-box; }
.tt-tip .tt-scene { height: 100px; margin: 2px 0 7px; }


.tt-toasts {
  position: fixed;



  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));






  z-index: 270;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 320px;
}
.tt-toast {
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.55);
  font-size: 0.82em;
  pointer-events: auto;
}
.tt-toast.tt-warn  { border-left-color: var(--red); }
.tt-toast.tt-gold  { border-left-color: var(--yellow); }
.tt-toast.tt-sinkc { border-left-color: var(--yellow); }
.tt-toast-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.tt-toast-glyph { font-size: 1.2em; display: inline-flex; align-items: center; }
.tt-toast-sub  { color: var(--text-dim); font-size: 0.9em; line-height: 1.4; }


.tt-toast--research { display: flex; align-items: center; gap: 10px; border-color: var(--cyan); }
.tt-toast--research .tt-toast-glyph { flex: none; color: var(--cyan); }
.tt-rt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tt-rt-body b { color: var(--text); }
.tt-rt-go,
.tt-rt-x {
  flex: none;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.tt-rt-go { color: var(--cyan); font-weight: 700; white-space: nowrap; }
.tt-rt-x { min-width: 32px; color: var(--muted); }
.tt-rt-x:hover, .tt-rt-x:focus-visible { color: var(--text); }


@media (max-width: 600px) {
  .tt-toasts {
    left: 12px;
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
  .tt-toasts .tt-toast { align-self: flex-end; max-width: 320px; }
  .tt-toasts .tt-toast--research { align-self: stretch; max-width: none; }
}


.tt-footer-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78em;
}
.tt-perm-warn {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 77, 110, 0.07);
  border: 1px solid rgba(255, 77, 110, 0.3);
  border-radius: 7px;
  color: var(--text-dim);
  flex: 1;
  min-width: 220px;
}
.tt-warn-glyph { color: var(--red); font-size: 1.1em; margin-top: 1px; }
.tt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  align-content: flex-start;
  flex: 1;
  min-width: 180px;
}


.tt-fly-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  background: var(--bg-2, #0d1322);
  border: 1px solid var(--cyan, #38e1ff);
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(56, 225, 255, .35), 0 6px 22px rgba(0, 0, 0, .5);
  z-index: 70;
}

.tt-fly-gold { border-color: var(--yellow, #ffd84a); }

.tt-fly-glyph { font-size: 18px; }
.tt-fly-tier  { font-size: var(--fs-caption); font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2, #2a334e); }


@keyframes tt-tab-catch {
  0%   { background: rgba(56, 225, 255, 0.3); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: no-preference) {
  .tt-tab-catch { animation: tt-tab-catch .5s ease-out both; }
}








.tt-pop {
  position: absolute;
  z-index: 5;
  width: 262px;
  max-width: calc(100% - 16px);






  max-height: calc(100vh - 16px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 12px 13px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);

  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
.tt-pop-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
}
.tt-pop-x:hover, .tt-pop-x:focus-visible { color: var(--cyan); }
.tt-pop-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  padding-right: 34px;
}

.tt-pop-name .tipwrap { margin-left: 2px; }
.tt-pop-kind { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.tt-pop-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }


.tt-pop-stages[hidden] { display: none; }
.tt-stages { display: grid; gap: 3px; margin-top: 7px; font-size: 12px; }
.tt-stage { display: flex; align-items: baseline; gap: 6px; color: var(--muted); }
.tt-stage-mark { flex: 0 0 12px; text-align: center; font-weight: 700; }
.tt-stage-name { flex: 1 1 auto; min-width: 0; }
.tt-stage-state { flex: 0 0 auto; font-size: 11px; }
.tt-stage.is-done { color: var(--text-dim); }
.tt-stage.is-done .tt-stage-mark, .tt-stage.is-done .tt-stage-state { color: var(--green); }
.tt-stage.is-next { color: var(--text); font-weight: 600; }
.tt-stage.is-next .tt-stage-mark, .tt-stage.is-next .tt-stage-state { color: var(--cyan); }
.tt-tip .tt-stages { margin: -2px 0 6px; }








.tt-pop-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.tt-pop-card-slot { position: relative; width: 122px; aspect-ratio: 3 / 4; flex: 0 0 auto; }


.tt-pop-card-slot--target { width: 142px; }
.tt-pop-card-slot--target ~ .tt-pop-side { flex: 1 1 80px; min-width: 80px; }

.tt-pop-card-slot.is-later .cs-card { filter: grayscale(1); opacity: .35; }
.tt-pop-later {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-weight: 800; font-size: 16px; color: var(--gold); text-shadow: 0 1px 6px rgba(0, 0, 0, .95); text-align: center;
}

.tt-pop-card--extra { border-top: 0; margin-top: 4px; padding-top: 0; }
.tt-pop-card--extra .tt-pop-side { display: grid; grid-template-columns: 1fr; }
.tt-pop-side { flex: 1 1 90px; min-width: 90px; display: grid; gap: 6px; align-content: start; font-size: 12.5px; }
.tt-pop-row .k { display: block; color: var(--muted); font-size: 11px; }
.tt-pop-row .v { color: var(--text); }


.tt-pop-row .v.gold { color: var(--gold); }
.tt-pop-row .v.ok { color: var(--green); }
.tt-pop-row .v.dim { color: var(--muted); }







.tt-pop-after {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(56, 225, 255, 0.06);
  border: 1px solid rgba(56, 225, 255, 0.18);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}
.tt-pop-after b { color: var(--text); }
.tt-pop-after .up { color: var(--gold); font-weight: 700; }

.tt-pop-cost {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}
.tt-pop-cost .tt-pop-cost-lbl { color: var(--muted); font-size: 12px; flex: 1 1 auto; }
.tt-pop-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  border-radius: 9px;
  border: none;
  background: var(--cyan);
  color: var(--text-on-accent);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.tt-pop-btn:disabled {
  background: var(--line-2);
  color: var(--muted);
  cursor: not-allowed;
}
.tt-pop-note { margin-top: 9px; font-size: 12px; text-align: center; }
.tt-pop-note.tt-pop-warn { color: var(--gold); }
.tt-pop-note.tt-pop-ok   { color: var(--green); font-size: 12.5px; }




.tt-pop-btn[hidden], .tt-pop-cost[hidden], .tt-pop-card[hidden] { display: none; }
.tt-pop-return[hidden] { display: none; }




.tt-pop-return { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tt-pop-return > .tt-pop-after { margin-top: 0; margin-bottom: 9px; }
.tt-pop-return > .tt-pop-cost { margin-top: 0; padding-top: 0; border-top: 0; }
.tt-pop-return > .tt-pop-note:first-child { margin-top: 0; }

.tt-pop-btn--ghost { background: transparent; color: var(--cyan); border: 1px solid var(--line-2); }
.tt-pop-btn--ghost:hover, .tt-pop-btn--ghost:focus-visible { border-color: var(--cyan); }

.tt-pop-note.tt-pop-dim { color: var(--muted); font-size: 11.5px; line-height: 1.45; }

.tt-pop-link { padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }




.tt-node.tt-pop-sel { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 16px; }


















@media (max-width: 600px) {














  .site-main:has(.dash-body[data-active-tab="techtree"]) {
    height: calc(100vh - (56px + env(safe-area-inset-bottom, 0px) + 12px));
    height: calc(100dvh - (56px + env(safe-area-inset-bottom, 0px) + 12px));
  }








  .tt-tree-wrap {
    scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 52px);
    scroll-margin-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px);
  }
}
