/* Kibble lookup — scoped under .kbApp */

.kbApp {
  --kb-text: #e8f3f2;
  --kb-muted: rgba(233, 243, 241, 0.5);
  --kb-accent: #bbff77;
  --kb-gap: 1.25rem;
  padding-bottom: 3rem;
  color: var(--kb-text);
}

.kbAd {
  margin: 0.5rem 0 1.25rem;
  overflow: hidden;
  min-height: 0;
}

.kbCards {
  display: grid;
  gap: 1.25rem;
}

.kbCardHome[hidden],
.kbCards[hidden],
.kbDinoView[hidden],
.kbSideSlot[hidden],
.kbEmpty[hidden] {
  display: none !important;
}

.kbCardWrap > br {
  display: none;
}

.kbDinoHead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.kbDinoHeadImg {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: none;
}

.kbDinoHead h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.kbDinoGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--kb-gap);
  align-items: start;
}

.kbSection {
  min-width: 0;
}

.kbSection--full {
  grid-column: 1 / -1;
}

.kbSectionHeading {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--kb-text);
  line-height: 1.2;
}

.kbEmpty {
  color: var(--kb-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0.25rem 0 0;
}

/* Full kibble chart */
.kbChartWrap {
  display: grid;
  gap: 1rem;
}
.kbChartFilters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: 0.35rem;
}
.kbChartFilterSearch {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
  max-width: 20rem;
}
.kbChartCreatureFilter {
  flex: 0 0 auto;
}
.kbChart {
  display: grid;
  gap: 1.15rem;
}
.kbChart > .dx-ad {
  grid-column: 1 / -1;
  margin: 0;
}
.kbChartBox.tip {
  margin-bottom: 0;
  padding: 0;
  overflow: visible;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.kbChartBox.isRelevant {
  border-color: color-mix(in srgb, #bbff77 55%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 0 0 1px color-mix(in srgb, #bbff77 45%, transparent),
    0 10px 28px color-mix(in srgb, #bbff77 18%, transparent),
    0 7px 22px rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, color-mix(in srgb, #bbff77 14%, rgba(255, 255, 255, 0.08)) 0%, rgba(255, 255, 255, 0.04) 100%);
}
.kbChartBox.isDimmed {
  opacity: 0.42;
}
.kbChartHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px 16px 0 0;
  background: color-mix(in srgb, var(--kb-tier, var(--kb-accent)) 22%, transparent);
  overflow: hidden;
}
.kbChartHeadMain {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.kbChartHead img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}
.kbChartHead h3 {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kbChartHead .ibRecipe-permalink {
  width: 26px;
  margin-left: 2px;
  opacity: 1;
  pointer-events: auto;
}
.kbChartShowRecipe {
  margin: 0 0 0 auto;
  flex: none;
  align-self: flex-end;
}
.kbChartShowRecipe .toggleRight {
  font-size: 13px;
  font-weight: 600;
  color: rgba(232, 243, 242, 0.75);
  white-space: nowrap;
}
.kbChartCols {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr minmax(10rem, 0.65fr);
  gap: 0 0;
  align-items: stretch;
  padding: 0;
  overflow: visible;
}
.kbChartCol {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}
.kbChartCol[data-chart-col="prefer"],
.kbChartCol[data-chart-col="produce"] {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.kbChartCol h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(232, 243, 242, 0.78);
}
.kbChartCol.isHot h4 {
  color: #bbff77;
}
.kbChartNotice {
  margin: 0 0 0.25rem;
}
.kbChartNotice[hidden] {
  display: none !important;
}
.kbChartCol .ibFavCreature {
  position: relative;
  box-sizing: border-box;
  width: 84px;
  padding: 6px 4px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 11px;
  color: rgba(232, 243, 242, 0.85);
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity 0.15s ease, filter 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.kbChartCol .kbChartCreature:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.kbChartCol .ibFavCreature img {
  width: 52px;
  height: 52px;
}
.kbChartCol .ibFavCreature > span:not(.kbChartCreatureTip) {
  display: block;
  width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.kbChartCreatureTip {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  bottom: auto;
  transform: translateX(-50%);
  z-index: 3;
  white-space: nowrap;
  pointer-events: auto;
}
.kbChartCreatureTip[hidden] {
  display: none !important;
}
.kbChartCreatureTipInner {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0a1516 88%, #bbff77);
  border: 1px solid color-mix(in srgb, #bbff77 40%, transparent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}
.kbChartCreatureTipBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(233, 243, 241, 0.72);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.kbChartCreatureTipBtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.kbChartCreatureTipBtn.isActive {
  color: #bbff77;
  background: color-mix(in srgb, #bbff77 18%, transparent);
}
.kbChartCreatureTipBtn[data-chart-fav].isActive {
  color: #ffd166;
  background: color-mix(in srgb, #ffd166 18%, transparent);
}
.kbChartCreatureTipLink {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: #bbff77;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.kbChartCreatureTipLink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.kbChartCreatureTipLink .bxf {
  font-size: 12px;
}
.kbChart--filtering .ibFavCreature.isDull {
  opacity: 0.5;
  filter: grayscale(0.44) blur(3px);
}
.kbChart--filtering .ibFavCreature.isFocus {
  opacity: 1;
  filter: none;
  color: #bbff77;
  background: color-mix(in srgb, #bbff77 16%, transparent);
  border-color: color-mix(in srgb, #bbff77 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #bbff77 20%, transparent);
}
.kbChartRecipe {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.kbChartRecipeHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  min-height: 0;
}
.kbChartRecipeHead h4 {
  margin: 0;
  line-height: 1.2;
  padding-top: 0;
}
.kbChartRecipeHead .dx-stepper {
  flex: none;
  margin: 0;
  /* Nudge so control sits flush with the Recipe title top */
  margin-top: -0.15rem;
}
.kbChartIngs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kbChartIngs li {
  margin: 0 0 0.35rem;
}
.kbChartIngs .item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.kbChartIngs .itemImage {
  flex: none;
  width: 28px;
  height: 28px;
}
.kbChartIngs .itemImage img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.kbChartNoteMark {
  margin-left: 1px;
  color: #bbff77;
  font-weight: 700;
}
.kbChartColNotes {
  margin: auto 0 0;
  padding: 0.85rem 0 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(232, 243, 242, 0.62);
}
.kbChartColNotes li {
  margin: 0 0 0.35rem;
}
.kbChartColNotes .kbChartNoteMark {
  margin-right: 0.2em;
  margin-left: 0;
}
.kbChartIngs .itemLabel {
  font-size: 0.9rem;
  color: var(--kb-text);
}
.kbChartIngs .itemLabel a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.kbChartIngs .itemLabel a:hover {
  color: #fff;
}
.kbChartFoot {
  margin: 0.35rem 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(232, 243, 242, 0.72);
}
.kbChart--hideRecipes .kbChartCols {
  grid-template-columns: 1fr 1fr;
}
.kbChart--hideRecipes .kbChartCol--recipe {
  display: none;
}
.kbChartJump {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  max-width: calc(100vw - 1.5rem);
  pointer-events: none;
}
.kbChartJumpBtns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}
.kbChartJump[hidden] {
  display: none !important;
}
.kbChartJumpCreature {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  width: calc(26px + 1.1rem + 2px);
  height: calc(26px + 1.1rem + 2px);
  border-radius: 999px;
  background: color-mix(in srgb, #0a1516 72%, #bbff77);
  border: 1px solid color-mix(in srgb, #bbff77 50%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.kbChartJumpCreature img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.kbChartJumpBtn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-sizing: border-box;
  height: calc(26px + 1.1rem + 2px);
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #bbff77 50%, transparent);
  background: color-mix(in srgb, #0a1516 72%, #bbff77);
  color: #e8f3f2;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px color-mix(in srgb, #bbff77 20%, transparent);
}
.kbChartJumpBtn:hover {
  background: color-mix(in srgb, #0a1516 55%, #bbff77);
  color: #fff;
}
.kbChartJumpBtn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.kbChartJumpRel {
  color: #bbff77;
  font-size: 0.8rem;
  font-weight: 700;
}
.kbChartJumpBtn .bxf {
  opacity: 0.8;
}

@media (max-width: 960px) {
  .kbChartCols {
    grid-template-columns: 1fr 1fr;
  }
  .kbChartCol--recipe {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .kbChartCol[data-chart-col="produce"] {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .kbChart--hideRecipes .kbChartCols,
  .kbChartCols {
    grid-template-columns: 1fr;
  }
  .kbChartShowRecipe {
    margin-left: 0;
    align-self: flex-start;
  }
  .kbChartFilterSearch {
    flex: none;
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .kbChartCol[data-chart-col="prefer"],
  .kbChartCol[data-chart-col="produce"] {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .kbChartCol--recipe {
    border-top: 0;
  }
  .kbChartFilters {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kbTier {
    transition: none;
  }
}

@media (max-width: 900px) {
  .kbDinoGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .kbDinoHeadImg {
    width: 48px;
    height: 48px;
  }

  .kbDinoHead h2 {
    font-size: 1.15rem;
  }

  .kbSectionHeading {
    font-size: 1.1rem;
  }

  .kbTier {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
  }

  .kbTierImg {
    width: 22px;
    height: 22px;
  }
}
