.breeding-path {
  --path-cyan: #4de6ed;
  --path-panel: rgba(8, 29, 39, 0.92);
  --path-border: rgba(96, 193, 211, 0.32);
  color: #eaf8fa;
}

.breeding-path-heading,
.breeding-path-result > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.breeding-path-heading {
  margin: 0 0 1rem;
}

.breeding-path-heading h2,
.breeding-path-result h3,
.breeding-path-layout h3 {
  margin: 0.15rem 0 0;
}

.breeding-path-heading p {
  max-width: 58ch;
  margin: 0;
  color: #a8c2ca;
}

.breeding-path-assumption {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(77, 230, 237, 0.24);
  border-radius: 0.75rem;
  margin: 0 0 1rem;
  background: rgba(16, 65, 75, 0.28);
  color: #bdd4da;
}

.breeding-path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(15rem, 0.75fr);
  gap: 1rem;
}

.breeding-path .breeding-panel,
.breeding-path-result {
  border: 1px solid var(--path-border);
  border-radius: 1rem;
  background: var(--path-panel);
  box-shadow: 0 1.1rem 2.5rem rgba(0, 0, 0, 0.18);
}

.breeding-path .breeding-panel {
  min-width: 0;
  padding: 1rem;
}

.breeding-path .breeding-panel > header {
  margin-bottom: 0.9rem;
}

.breeding-path input,
.breeding-path select {
  width: 100%;
  border: 1px solid rgba(134, 198, 209, 0.36);
  border-radius: 0.55rem;
  background: rgba(2, 16, 24, 0.78);
  color: #f2fbfc;
  min-height: 2.65rem;
  padding: 0.6rem 0.75rem;
}

.breeding-path input:focus-visible,
.breeding-path select:focus-visible,
.breeding-path button:focus-visible {
  outline: 3px solid var(--path-cyan);
  outline-offset: 3px;
}

.breeding-path-search-results {
  position: relative;
  z-index: 4;
  max-height: 17rem;
  overflow: auto;
  border: 1px solid var(--path-border);
  border-radius: 0.65rem;
  margin-top: 0.4rem;
  background: #071821;
}

.breeding-path-search-results[hidden] {
  display: none;
}

.breeding-path-search-results button {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(96, 193, 211, 0.15);
  padding: 0.55rem 0.7rem;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.breeding-path-search-results button:hover {
  background: rgba(77, 230, 237, 0.1);
}

.breeding-path-search-results img,
.breeding-path-chip img,
.breeding-path-selected-card img,
.breeding-path-step-pal img {
  object-fit: contain;
  filter: drop-shadow(0 0.25rem 0.35rem rgba(0, 0, 0, 0.34));
}

.breeding-path-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5rem;
  min-height: 4.3rem;
  margin-top: 0.8rem;
}

.breeding-path-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-height: 2.25rem;
  padding: 0.2rem 0.25rem 0.2rem 0.45rem;
  border: 1px solid rgba(77, 230, 237, 0.3);
  border-radius: 999px;
  background: rgba(23, 86, 98, 0.42);
}

.breeding-path-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breeding-path-chip button,
.breeding-path-selected-card button {
  cursor: pointer;
}

.breeding-path-selected-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.5rem;
  margin-bottom: 0.8rem;
  padding: 0.55rem;
  border: 1px solid rgba(77, 230, 237, 0.25);
  border-radius: 0.75rem;
  background: rgba(15, 55, 66, 0.52);
}

.breeding-path-selected-card span,
.breeding-path-step-pal {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.breeding-path-selected-card small,
.breeding-path-step-pal small,
.breeding-path-search-results small {
  color: #91afb7;
}

.breeding-path-primary,
.breeding-path-save,
.breeding-path-clear,
.breeding-path-save-actions button {
  min-height: 2.6rem;
  border: 1px solid rgba(77, 230, 237, 0.34);
  border-radius: 0.55rem;
  background: rgba(18, 69, 80, 0.72);
  color: #ecfbfc;
  font-weight: 750;
  cursor: pointer;
}

.breeding-path-primary,
.breeding-path-save {
  width: 100%;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, #176b79, #1a8790);
}

.breeding-path-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.breeding-path-clear {
  width: 100%;
  margin-top: 0.5rem;
  background: transparent;
}

.breeding-path-save-name {
  margin-bottom: 0;
}

.breeding-path-saves select {
  margin-top: 0.3rem;
}

.breeding-path-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.breeding-path-storage-status,
.breeding-path-status,
.breeding-path-summary,
.breeding-path-empty {
  color: #a8c2ca;
}

.breeding-path-storage-status {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
}

.breeding-path-result {
  margin-top: 1rem;
  padding: 1rem;
}

.breeding-path-result > header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(96, 193, 211, 0.18);
}

.breeding-path-summary,
.breeding-path-status {
  margin: 0;
}

.breeding-path-status {
  padding: 0.8rem 0;
}

.breeding-path-route {
  display: grid;
  gap: 1rem;
}

.breeding-path-generation {
  min-width: 0;
}

.breeding-path-generation h4 {
  margin: 0 0 0.55rem;
  color: var(--path-cyan);
}

.breeding-path-generation ol {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breeding-path-step {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) auto minmax(9rem, 1fr) auto minmax(10rem, 1.15fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(96, 193, 211, 0.2);
  border-radius: 0.75rem;
  background: rgba(2, 18, 26, 0.54);
}

.breeding-path-step-pal {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.55rem;
}

.breeding-path-step-pal img,
.breeding-path-thumb-fallback {
  grid-row: 1 / 3;
}

.breeding-path-step-pal strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breeding-path-step-child {
  color: #fff;
}

.breeding-path-thumb-fallback {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(77, 230, 237, 0.14);
  color: var(--path-cyan);
  font-weight: 800;
}

.breeding-path-success,
.breeding-path-unreachable {
  padding: 1rem;
  border-radius: 0.7rem;
  background: rgba(54, 151, 110, 0.17);
  color: #c7f3dd;
}

.breeding-path-unreachable {
  background: rgba(178, 102, 65, 0.17);
  color: #f3d5c7;
}

@media (max-width: 980px) {
  .breeding-path-layout {
    grid-template-columns: 1fr 1fr;
  }

  .breeding-path-saves {
    grid-column: 1 / -1;
  }

  .breeding-path-step {
    grid-template-columns: 1fr auto 1fr;
  }

  .breeding-path-step > :nth-child(4) {
    display: none;
  }

  .breeding-path-step-child {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(96, 193, 211, 0.18);
    padding-top: 0.55rem;
  }
}

@media (max-width: 720px) {
  .breeding-path-layout {
    grid-template-columns: 1fr;
  }

  .breeding-path-saves {
    grid-column: auto;
  }

  .breeding-path-heading,
  .breeding-path-result > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .breeding-path-step {
    grid-template-columns: 1fr;
  }

  .breeding-path-step > span {
    display: none;
  }

  .breeding-path-step-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .breeding-path *,
  .breeding-path *::before,
  .breeding-path *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
