.pd-skillcalc-token {
  color: #5fa8ff !important;
  text-decoration: none;
  border-bottom: 1px dotted rgba(95, 168, 255, 0.52);
  cursor: pointer;
}

.pd-skillcalc-token:hover,
.pd-skillcalc-token:focus {
  color: #8ac1ff !important;
  border-bottom-color: rgba(138, 193, 255, 0.78);
}

.pd-skillcalc-token--icon {
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pd-skillcalc-token__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(95, 168, 255, 0.5);
  object-fit: cover;
  background: #120d09;
  flex: 0 0 auto;
}

.pd-skillcalc-token__icon--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5fa8ff;
  font-size: 0.8rem;
}

.pd-skillcalc-link {
  color: #5fa8ff !important;
  text-decoration: underline;
}

.pd-skillcalc-link:hover,
.pd-skillcalc-link:focus {
  color: #8ac1ff !important;
}

.pd-skillcalc-inline {
  display: grid;
  gap: 0.45rem;
  margin: 0.4rem 0 0.75rem;
}

.pd-skillcalc-inline__tree-wrap {
  width: min(100%, 760px);
  border: 1px solid rgba(95, 168, 255, 0.46);
  border-radius: 0.45rem;
  overflow: hidden;
  background: #120d09;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
  padding: 0.65rem;
}

.pd-skillcalc-inline__tree-wrap.is-error {
  color: #f0d4a2;
  font-size: 0.92rem;
}

.pd-sc-tree {
  display: grid;
  gap: 0.45rem;
}

.pd-sc-tree__title {
  color: #f5e6bf;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.pd-sc-tree__stage {
  position: relative;
  width: min(100%, 650px);
  min-width: 320px;
  min-height: 620px;
  aspect-ratio: 897 / 1100;
  margin: 0 auto;
}

.pd-sc-tree__tabs {
  position: absolute;
  inset: 0% 6% auto 6%;
  height: 9%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pd-sc-tree__tab {
  border: none;
  background: transparent !important;
  color: #9c8c70 !important;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
  padding: 0.52rem 0.42rem 0.1rem;
  text-align: center;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pd-sc-tree__tab.is-active {
  color: #dfccaa !important;
}

.pd-sc-tree__tab:hover {
  color: #dfccaa !important;
}

.pd-sc-tree__tab:disabled {
  opacity: 1;
  cursor: default;
}

.pd-sc-tree__panel {
  position: relative;
  width: min(100%, 650px);
  min-width: 320px;
  min-height: 620px;
  aspect-ratio: 897 / 1100;
  margin: 0 auto;
  border: 1px solid rgba(124, 106, 61, 0.5);
  background: radial-gradient(circle at 50% 0%, rgba(117, 148, 95, 0.18), transparent 45%);
  overflow: hidden;
}

.pd-sc-tree__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pd-sc-panel-image);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  opacity: 0.95;
  pointer-events: none;
}

.pd-sc-tree__panel::after {
  content: '';
  position: absolute;
  inset: 1% 6% 6% 6%;
  background-image: var(--pd-sc-tree-backdrop);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: top;
  opacity: 0.98;
  pointer-events: none;
}

.pd-sc-tree__grid {
  position: absolute;
  inset: 12.5% 11.8% 5% 11.5%;
  gap: 1.5rem 0rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  z-index: 2;
}

.pd-sc-tree__cell {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: start;
  justify-items: center;
}

.pd-sc-tree__cell.is-empty {
  pointer-events: none;
}

.pd-sc-tree__skill {
  width: 100%;
  max-width: 4.7rem;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: default;
  position: relative;
}

.pd-sc-tree__skill:disabled {
  opacity: 1;
}

.pd-sc-tree__icon {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.18rem;
  overflow: hidden;
  border: 1px solid rgba(98, 83, 54, 0.72);
  background: rgba(12, 8, 6, 0.82);
}

.pd-sc-tree__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-sc-tree__level {
  position: absolute;
  top: 3.7rem;
  left: 6.6rem;
  color: #dec58f;
  font-size: 0.79rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.82);
}

.pd-sc-tree__name {
  margin-top: 0.08rem;
  color: #dfd2b3;
  font-size: 0.63rem;
  text-align: center;
  line-height: 1.06;
  min-height: 2em;
  max-width: 5.2rem;
  overflow-wrap: anywhere;
}

.pd-sc-tree__skill.is-locked .pd-sc-tree__icon img {
  filter: grayscale(0.95) brightness(0.72);
}

@media (max-width: 640px) {
  .pd-skillcalc-inline__tree-wrap {
    padding: 0.45rem;
  }

  .pd-sc-tree__tabs {
    gap: 0.25rem;
  }

  .pd-sc-tree__tab {
    font-size: 0.73rem;
    padding: 0.32rem 0.22rem 0.06rem;
  }

  .pd-sc-tree__stage {
    min-width: 290px;
    min-height: 560px;
  }
}

.pd-skillcalc-tooltip {
  position: absolute;
  z-index: 2147483000;
  width: min(92vw, 560px);
  max-height: min(82vh, 760px);
  border: 1px solid rgba(95, 168, 255, 0.55);
  background: #120d09;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  border-radius: 0.45rem;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.pd-skillcalc-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pd-skillcalc-tooltip__content {
  width: 100%;
  min-height: 2rem;
}

.pd-skillcalc-tooltip__header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.72rem 0.52rem;
  border-bottom: 1px solid rgba(112, 90, 56, 0.52);
  background: linear-gradient(180deg, rgba(42, 30, 20, 0.9), rgba(18, 12, 9, 0.92));
}

.pd-skillcalc-tooltip__header-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.22rem;
  border: 1px solid rgba(153, 126, 79, 0.72);
  background: #0f0a07;
  object-fit: cover;
  flex: 0 0 auto;
}

.pd-skillcalc-tooltip__header-icon--fallback {
  display: inline-block;
}

.pd-skillcalc-tooltip__header-title {
  color: #f2e3c2;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.pd-skillcalc-tooltip__body {
  width: 100%;
}

.pd-skillcalc-tooltip__message {
  padding: 0.7rem 0.75rem;
  color: #e2d2b5;
  font-size: 0.9rem;
}

.pd-skillcalc-tooltip__mount {
  width: 100%;
}
