#tool,
#tool form,
#tool fieldset,
#tool label,
#tool .fields > * {
  min-width: 0;
}
#tool :is(input, select, textarea, img) {
  max-width: 100%;
}
#tool :is(button, summary, th, td) {
  overflow-wrap: anywhere;
}
#tool .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
#tool [hidden] {
  display: none !important;
}
#vit-app {
  --paper: #112131;
  --soft: #18303b;
  --ink: #e9f0f6;
  --green: #8ce0cc;
  --line: #354d61;
  --muted: #b1c2d3;
  color: var(--ink);
  min-width: 0;
}
#vit-app
  :is(
    .vit-plan-card,
    .vit-tool,
    .vit-controls,
    .vit-refill,
    .vit-decor,
    .vit-special-card,
    .vit-rewards,
    .vit-stat,
    .vit-refill-total button,
    .vit-gem-steps span,
    .vit-tabs a
  ) {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
#vit-app .vit-reward-table td:last-child,
#vit-app .vit-stat.primary {
  background: var(--soft);
  color: var(--green);
}
#vit-app .vit-error,
#vit-app .vit-estimate {
  background: #332b20;
  color: #f2d49c;
  border-color: #7e6649;
}
#vit-app .vit-change {
  white-space: nowrap;
}
#vit-app .item-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
#vit-app .item-art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
#vit-app .item-art > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#vit-app .sprite-fit {
  display: block;
  position: relative;
  flex: none;
}
#vit-app .sprite-scale,
#vit-app .sprite-crop {
  display: block;
  position: absolute;
  transform-origin: 0 0;
}
#vit-app .sprite-scale {
  left: 0;
  top: 0;
}
#vit-app .sprite-crop {
  overflow: hidden;
}
#vit-app .sprite-crop img {
  position: absolute;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
}
@media (max-width: 540px) {
  #tool .fields.three {
    grid-template-columns: minmax(0, 1fr);
  }
  #vit-app .vit-controls {
    padding: 14px;
  }
  #vit-app .vit-cost-strip {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  #vit-app select {
    width: 100%;
  }
}
@media (max-width: 440px) {
  #tool .filters,
  #vit-app .vit-essential-fields,
  #vit-app .vit-essential-fields:has(#level-label[hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (min-width: 651px) {
  #vit-app .vit-essential-fields {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.35fr) minmax(0, 1fr);
  }
}
