/* Game-style Overall skill tree — applies to desktop and mobile. */
.game-overall-panel {
  align-items: start !important;
}

.game-skill-tree-wrap {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 0 32px !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 16% 12%, rgba(201, 154, 50, .10), transparent 25%),
    linear-gradient(180deg, #f8f4eb 0%, #f2ede2 100%) !important;
}

.game-tree-shell {
  margin: 0 0 18px;
  display: grid;
  gap: 14px;
}

.game-tree-summary {
  min-height: 116px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  border: 1px solid #d7cebd;
  border-radius: 18px;
  background: rgba(255, 253, 249, .96);
  box-shadow: 0 12px 30px rgba(47, 38, 22, .08);
}

.game-tree-progress {
  --tree-progress: 0deg;
  width: 92px;
  height: 92px;
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: conic-gradient(#b8892e var(--tree-progress), #e7dfd2 0);
}

.game-tree-progress::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: #fffdf9;
}

.game-tree-progress strong,
.game-tree-progress span {
  position: relative;
  z-index: 1;
}

.game-tree-progress strong {
  color: #14201e;
  font: 700 24px/1 "DM Sans", sans-serif;
}

.game-tree-progress span {
  margin-top: 5px;
  color: #777268;
  font-size: 11px;
}

.game-tree-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.game-tree-stats > span {
  min-width: 0;
  padding: 2px 18px;
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 7px;
  border-left: 1px solid #e7dfd2;
}

.game-tree-stats > span:first-child { border-left: 0; }
.game-tree-stats i {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #3f8c65;
  font-style: normal;
  font-weight: 800;
}
.game-tree-stats [data-tree-stat="milestone"] i { color: #523b0f; background: #d4a743; border-radius: 6px; transform: rotate(45deg); }
.game-tree-stats [data-tree-stat="challenge"] i { background: #b84d45; }
.game-tree-stats [data-tree-stat="locked"] i { background: #817d75; }
.game-tree-stats b { color: #14201e; font: 700 22px/1 "DM Sans", sans-serif; }
.game-tree-stats small { margin-top: 5px; color: #716d65; font-size: 12px; white-space: nowrap; }

.game-tree-toolbar {
  display: grid;
  grid-template-columns: minmax(330px, .9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: 18px;
}

.game-tree-filters {
  min-width: 0;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  border-radius: 999px;
  background: rgba(231, 224, 211, .74);
}

.game-tree-filters button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: #625f58;
  background: transparent;
  font-size: 13px;
}

.game-tree-filters button.active {
  color: #fffdf9;
  background: #122021;
  box-shadow: 0 6px 15px rgba(18, 32, 33, .16);
}

.game-tree-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.game-tree-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66645e;
  font-size: 12px;
  white-space: nowrap;
}

.game-tree-legend i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
}
.game-tree-legend [data-tree-legend="learn"] i { color: #3d72b4; }
.game-tree-legend [data-tree-legend="practice"] i { color: #3f8c65; }
.game-tree-legend [data-tree-legend="program"] i { color: #b84d45; }
.game-tree-legend [data-tree-legend="milestone"] i {
  color: #bd8b28;
  border-radius: 6px;
  transform: rotate(45deg);
}

.skill-canvas.game-skill-tree {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid #d8cfbf !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 0, rgba(214, 173, 77, .20), transparent 25%),
    radial-gradient(circle at 8% 64%, rgba(61, 114, 180, .07), transparent 28%),
    radial-gradient(circle at 92% 58%, rgba(63, 140, 101, .07), transparent 25%),
    linear-gradient(180deg, rgba(255, 253, 249, .99), rgba(246, 240, 229, .97)) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 18px 38px rgba(51, 40, 20, .08);
}

.skill-canvas.game-skill-tree::before,
.skill-canvas.game-skill-tree::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .26;
}
.skill-canvas.game-skill-tree::before {
  left: -140px;
  top: 220px;
  background: radial-gradient(circle, rgba(63, 140, 101, .18), transparent 68%);
}
.skill-canvas.game-skill-tree::after {
  right: -150px;
  bottom: 120px;
  background: radial-gradient(circle, rgba(184, 77, 69, .14), transparent 68%);
}

.game-skill-tree .map-scenery { display: none !important; }
.game-skill-tree .route-svg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
.game-skill-tree .route-shadow {
  fill: none !important;
  stroke: rgba(80, 69, 51, .12) !important;
  stroke-width: 13 !important;
  stroke-linecap: round !important;
}
.game-skill-tree .route-line {
  fill: none !important;
  stroke: #cfc5b4 !important;
  stroke-width: 5 !important;
  stroke-linecap: round !important;
  stroke-dasharray: 9 10 !important;
}
.game-skill-tree .route-line.passed {
  stroke: #c49838 !important;
  stroke-dasharray: none !important;
}
.game-skill-tree .route-line.available { filter: drop-shadow(0 0 4px rgba(196, 152, 56, .45)); }

.game-skill-tree .map-node {
  --node-color: #3d72b4;
  --node-dark: #285587;
  width: 170px !important;
  min-width: 170px !important;
  position: absolute !important;
  z-index: 3 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 10px !important;
  transform: translate(-50%, -50%) !important;
  transition: opacity .18s ease, filter .18s ease !important;
}

.game-skill-tree .map-node.node-learn,
.game-skill-tree .map-node.game-type-learn { --node-color: #3d72b4; --node-dark: #285587; }
.game-skill-tree .map-node.node-practice,
.game-skill-tree .map-node.game-type-practice { --node-color: #3f8c65; --node-dark: #286247; }
.game-skill-tree .map-node.node-program,
.game-skill-tree .map-node.game-type-program { --node-color: #b84d45; --node-dark: #86342f; }
.game-skill-tree .map-node.node-milestone,
.game-skill-tree .map-node.game-type-milestone { --node-color: #c99a32; --node-dark: #8f681c; }
.game-skill-tree .map-node.is-filter-dimmed { opacity: .14 !important; filter: grayscale(.75) !important; pointer-events: none; }

.game-skill-tree .node-orb {
  box-sizing: border-box !important;
  width: 86px !important;
  height: 86px !important;
  min-height: 86px !important;
  padding: 0 !important;
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  border: 5px solid #fffdf9 !important;
  border-radius: 50% !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 34% 27%, rgba(255,255,255,.34), transparent 28%),
    linear-gradient(145deg, var(--node-color), var(--node-dark)) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--node-color) 72%, #ffffff),
    0 9px 18px rgba(31, 29, 24, .18) !important;
}

.game-skill-tree .game-type-milestone .node-orb,
.game-skill-tree .node-milestone .node-orb {
  width: 92px !important;
  height: 92px !important;
  border-radius: 17px !important;
  transform: rotate(45deg) !important;
}
.game-skill-tree .game-type-milestone .node-orb > span,
.game-skill-tree .game-type-milestone .node-orb > small,
.game-skill-tree .game-type-milestone .node-orb > .game-node-state,
.game-skill-tree .node-milestone .node-orb > span,
.game-skill-tree .node-milestone .node-orb > small,
.game-skill-tree .node-milestone .node-orb > .game-node-state {
  transform: rotate(-45deg) !important;
}

.game-skill-tree .node-orb > span {
  grid-area: 1 / 1 !important;
  color: #fff !important;
  font: 800 28px/1 "DM Sans", sans-serif !important;
}
.game-skill-tree .node-orb > small {
  position: absolute !important;
  left: 50% !important;
  bottom: -25px !important;
  transform: translateX(-50%) !important;
  color: #867d6f !important;
  font: 700 10px/1 "DM Sans", sans-serif !important;
}
.game-skill-tree .game-node-state {
  width: 27px;
  height: 27px;
  position: absolute;
  right: -8px;
  bottom: -6px;
  display: grid;
  place-items: center;
  border: 3px solid #fffdf9;
  border-radius: 50%;
  color: #fff;
  background: #10201f;
  font: 800 12px/1 "DM Sans", sans-serif;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}

.game-skill-tree .map-node.completed .node-orb {
  box-shadow:
    0 0 0 3px rgba(201, 154, 50, .38),
    0 0 24px color-mix(in srgb, var(--node-color) 38%, transparent),
    0 10px 18px rgba(31, 29, 24, .18) !important;
}
.game-skill-tree .map-node.active .node-orb { animation: dojo-node-pulse 2.2s ease-in-out infinite; }
.game-skill-tree .map-node.locked { opacity: .55; filter: grayscale(.82); }
.game-skill-tree .map-node.locked .node-orb {
  background: linear-gradient(145deg, #aaa59a, #78766f) !important;
  box-shadow: 0 0 0 2px #c8c2b7, 0 7px 13px rgba(31, 29, 24, .10) !important;
}

.game-skill-tree .map-node-label {
  box-sizing: border-box !important;
  width: 170px !important;
  min-height: 72px !important;
  padding: 10px 12px !important;
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  border: 1px solid #ded5c6 !important;
  border-radius: 13px !important;
  background: rgba(255, 253, 249, .97) !important;
  box-shadow: 0 8px 20px rgba(43, 35, 22, .08) !important;
  text-align: center !important;
}
.game-skill-tree .map-node-label .game-node-type,
.game-skill-tree .map-node-label small {
  overflow: hidden !important;
  color: var(--node-dark) !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .7px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.game-skill-tree .map-node-label strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #14201e !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}
.game-skill-tree .node-menu { display: none !important; }

@keyframes dojo-node-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.065); }
}

@media (max-width: 1100px) {
  .game-tree-toolbar { grid-template-columns: 1fr; }
  .game-tree-legend { justify-content: flex-start; }
  .game-tree-summary { grid-template-columns: 94px minmax(0, 1fr); }
  .game-tree-stats > span { padding-inline: 10px; }
}

@media (max-width: 800px) {
  .game-skill-tree-wrap { padding: 0 12px 28px !important; }
  .game-tree-shell { margin: 8px 0 16px; gap: 12px; }
  .game-tree-summary {
    min-height: 118px;
    padding: 14px;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
  }
  .game-tree-progress { width: 78px; height: 78px; }
  .game-tree-progress strong { font-size: 20px; }
  .game-tree-progress span { font-size: 10px; }
  .game-tree-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
  .game-tree-stats > span {
    padding: 0;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto;
    justify-content: start;
    border-left: 0;
  }
  .game-tree-stats i { grid-row: auto; width: 24px; height: 24px; }
  .game-tree-stats b { font-size: 18px; }
  .game-tree-stats small { margin-top: 0; font-size: 11px; }
  .game-tree-toolbar { gap: 12px; }
  .game-tree-filters { display: flex; overflow-x: auto; scrollbar-width: none; background: transparent; padding: 0; }
  .game-tree-filters::-webkit-scrollbar { display: none; }
  .game-tree-filters button {
    flex: 0 0 auto;
    min-width: 74px;
    min-height: 38px;
    border: 1px solid #d2c9ba;
    background: #fffdf9;
  }
  .game-tree-filters button.active { border-color: #122021; background: #122021; }
  .game-tree-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .game-tree-legend span { display: grid; justify-items: center; gap: 4px; font-size: 10px; }
  .game-tree-legend i { width: 30px; height: 30px; }
  .game-skill-tree .map-node { width: 132px !important; min-width: 132px !important; gap: 8px !important; }
  .game-skill-tree .node-orb { width: 76px !important; height: 76px !important; min-height: 76px !important; }
  .game-skill-tree .game-type-milestone .node-orb,
  .game-skill-tree .node-milestone .node-orb { width: 82px !important; height: 82px !important; border-radius: 15px !important; }
  .game-skill-tree .node-orb > span { font-size: 24px !important; }
  .game-skill-tree .map-node-label { width: 132px !important; min-height: 64px !important; padding: 9px 10px !important; }
  .game-skill-tree .map-node-label strong { font-size: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .game-skill-tree .map-node.active .node-orb { animation: none !important; }
}
