/* Centro de Breeding: drawer panel composed from the shared ui-* components. */
.drawer.breeding-drawer {
  width: min(calc(1100px + var(--ui-nav-rail-size)), 100%);
}
.breeding-panel {
  --breeding-gap: var(--ui-space-3);
  display: grid;
  gap: var(--breeding-gap);
  color: var(--ui-color-text);
}
.breeding-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: var(--breeding-gap);
  align-items: start;
}
.breeding-panel .ui-section {
  margin: 0;
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface-raised);
}
.breeding-muted {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.breeding-slots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--ui-space-2);
  align-items: center;
}
.breeding-plus {
  color: var(--ui-color-text-muted);
  font-weight: 800;
}
.breeding-slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 170px;
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
  text-align: center;
}
.breeding-slot[data-empty="true"] {
  border-style: dashed;
  align-content: center;
  color: var(--ui-color-text-muted);
}
.breeding-slot-label {
  justify-self: start;
  font-size: 11px;
  font-weight: 800;
  color: var(--ui-color-text-muted);
}
.breeding-slot-placeholder,
.breeding-mystery {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--ui-color-border);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 800;
  color: var(--ui-color-text-muted);
}
.breeding-slot-clear {
  position: absolute;
  top: 2px;
  right: 2px;
  min-height: 24px;
  padding: 0 8px;
}
.breeding-sprite,
.breeding-card-sprite,
.breeding-hatched-sprite {
  image-rendering: pixelated;
  object-fit: contain;
}
.breeding-sprite {
  width: 64px;
  height: 64px;
}
.breeding-sprite--hidden {
  filter: brightness(0) opacity(0.55);
}
.breeding-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.breeding-iv,
.breeding-quality,
.breeding-tier {
  padding: 1px 6px;
  border: 1px solid var(--ui-color-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.breeding-quality,
.breeding-tier {
  border-color: color-mix(in srgb, var(--quality-color) 55%, transparent);
  color: var(--quality-color);
}
.breeding-panel small .tier-weak,
.breeding-panel small [class*="tier-"],
.breeding-hatched dd[class*="tier-"] {
  color: var(--quality-color);
}
.breeding-type {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--type-color);
  color: var(--type-text);
  font-size: 11px;
  font-weight: 800;
}
.breeding-empty {
  display: grid;
  justify-items: center;
  gap: var(--ui-space-2);
  text-align: center;
  color: var(--ui-color-text-muted);
}
.breeding-steps {
  display: grid;
  gap: var(--ui-space-2);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: breeding-step;
  text-align: left;
}
.breeding-steps li {
  display: grid;
  padding: var(--ui-space-2) var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
}
.breeding-steps small {
  color: var(--ui-color-text-muted);
}
.breeding-analysis {
  display: grid;
  gap: var(--ui-space-3);
}
.breeding-child {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
}
.breeding-child .breeding-badges {
  justify-content: start;
  margin-top: 4px;
}
.breeding-inheritance {
  display: grid;
  gap: var(--ui-space-1);
}
.breeding-inheritance > .breeding-muted {
  margin: 0;
}
.breeding-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ui-space-2);
}
.breeding-meter {
  display: grid;
  gap: 4px;
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
}
.breeding-meter > span,
.breeding-projection-head > span {
  font-size: 11px;
  font-weight: 800;
  color: var(--ui-color-text-muted);
}
.breeding-meter strong {
  font-size: 13px;
}
.breeding-projection {
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
}
.breeding-projection-head {
  display: flex;
  justify-content: space-between;
  gap: var(--ui-space-2);
}
.breeding-projection-head strong {
  color: var(--ui-color-success);
}
.breeding-scale {
  position: relative;
  height: 10px;
  margin: var(--ui-space-2) 0 4px;
  border-radius: 999px;
  background: var(--ui-color-surface-control);
}
.breeding-scale-range {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 4px;
  border-radius: 999px;
  background: var(--ui-color-success);
}
.breeding-scale-lead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #f1c25e;
}
.breeding-scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--ui-color-text-muted);
}
.breeding-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--ui-space-2) 0 0;
  padding: 0;
  list-style: none;
}
.breeding-deltas li {
  padding: 2px 8px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  color: var(--ui-color-success);
  font-weight: 700;
}
.breeding-deltas small {
  color: var(--ui-color-text-muted);
  font-weight: 600;
}
.breeding-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ui-space-2);
}
.breeding-mode {
  display: grid;
  gap: 2px;
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface-control);
  color: var(--ui-color-text);
  text-align: center;
  cursor: pointer;
}
.breeding-mode small {
  color: var(--ui-color-text-muted);
}
.breeding-mode[aria-checked="true"] {
  border-color: var(--ui-color-accent-strong);
  box-shadow: inset 0 0 0 1px var(--ui-color-accent-strong);
}
.breeding-mode:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.breeding-double {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2);
  font-weight: 700;
}
.breeding-double small {
  color: #f1c25e;
  font-weight: 600;
}
.breeding-hatch-note {
  margin: 0;
  color: var(--ui-color-text-muted);
  font-size: 12px;
}
.breeding-costs {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breeding-cost {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ui-space-2);
  padding: 4px var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
}
.breeding-cost[data-enough="false"] {
  border-color: color-mix(in srgb, var(--ui-color-danger) 60%, transparent);
}
.breeding-cost[data-enough="false"] strong {
  color: var(--ui-color-danger);
}
.breeding-item {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  object-fit: contain;
}
.breeding-create {
  width: 100%;
}
.breeding-create .ui-icon,
.breeding-dialog h3 .ui-icon {
  width: 16px;
  height: 16px;
}
.breeding-incubator-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2);
}
.breeding-incubator-head .ui-section__title {
  margin: 0;
}
.breeding-incubator-head .ui-button {
  margin-left: auto;
  min-height: 28px;
}
.breeding-eggs {
  display: grid;
  gap: var(--ui-space-2);
  margin: var(--ui-space-2) 0 0;
  padding: 0;
  list-style: none;
}
.breeding-egg {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ui-space-2);
  padding: var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
}
.breeding-egg[data-empty="true"] {
  grid-template-columns: 28px minmax(0, 1fr);
  border-style: dashed;
  color: var(--ui-color-text-muted);
}
.breeding-egg-art {
  width: 24px;
  height: 24px;
  color: #e9e1c7;
}
.breeding-egg[data-empty="true"] .breeding-egg-art {
  color: var(--ui-color-text-muted);
}
.breeding-egg .ui-progress {
  margin: 4px 0 2px;
}
.breeding-egg .ui-button {
  min-height: 28px;
  padding: 2px 8px;
}
.breeding-box-head {
  margin-bottom: var(--ui-space-2);
}
.breeding-box-head .ui-section__title {
  margin: 0;
}
.breeding-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  align-items: end;
  gap: var(--ui-space-2);
}
.breeding-filter {
  display: grid;
  min-width: 0;
  gap: var(--ui-space-1);
  color: var(--ui-color-text-muted);
  font-size: 11px;
  font-weight: 700;
}
.breeding-filter .ui-number-field,
.breeding-search {
  width: 100%;
  min-width: 0;
}
.breeding-search {
  min-height: var(--ui-control-height);
  padding: 4px var(--ui-space-2);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
  font: inherit;
}
.breeding-search:focus-visible {
  outline: 2px solid var(--ui-color-focus);
  outline-offset: 2px;
}
.breeding-filter-summary {
  margin: var(--ui-space-1) 0;
}
.breeding-box-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
.breeding-collections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--breeding-gap);
  margin-top: var(--ui-space-3);
  align-items: start;
}
.breeding-collection {
  min-width: 0;
  padding: var(--ui-space-3);
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius);
  background: var(--ui-color-surface);
}
.breeding-collection > .ui-section__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2);
  margin: 0;
}
.breeding-collection > .ui-section__title:focus-visible {
  outline: 2px solid var(--ui-color-focus);
  outline-offset: 4px;
}
.breeding-collection-results {
  max-height: min(440px, 55vh);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin-top: var(--ui-space-2);
}
.breeding-collection .breeding-box-actions {
  margin-top: var(--ui-space-2);
}
.breeding-card-entry {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 2px;
}
.breeding-move {
  width: 100%;
  min-height: 32px;
  padding: 4px;
  font-size: 11px;
}
.breeding-box-actions:empty {
  display: none;
}
.breeding-dialogs {
  display: contents;
}
.breeding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ui-space-2);
  margin: var(--ui-space-2) 0 0;
  padding: 0;
  list-style: none;
}
.breeding-card {
  --team-portrait: 36px;
  position: relative;
  display: grid;
  grid-template-columns: var(--team-portrait) minmax(0, 1fr) 56px;
  align-items: center;
  width: 100%;
  gap: 6px;
  min-height: 86px;
  padding: 6px;
  border-left: 3px solid var(--quality-color, var(--ui-color-border));
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.breeding-card:hover:not(:disabled) {
  border-color: var(--ui-color-accent);
}
.breeding-card[aria-pressed="true"] {
  border-color: var(--ui-color-primary);
  border-left-color: var(--quality-color, var(--ui-color-primary));
  box-shadow: inset 0 0 0 1px var(--ui-color-primary);
}
.breeding-card[data-dim="true"] {
  opacity: 0.8;
}
.breeding-card:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}
.breeding-card .depot-metrics {
  grid-column: auto;
}
.breeding-card-lock {
  position: absolute;
  bottom: 4px;
  left: 29px;
  width: 12px;
  height: 12px;
  color: var(--ui-color-text-muted);
}
.breeding-card-slot {
  position: absolute;
  top: 4px;
  left: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ui-color-primary);
  color: var(--ui-color-on-primary);
  font-size: 12px;
  font-weight: 800;
}
.breeding-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--ui-space-4);
  background: #040910c4;
  overflow: auto;
  overscroll-behavior: contain;
}
.breeding-dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 3px solid var(--breeding-edge);
  border-radius: 0;
  background: var(--breeding-case);
  color: var(--ui-color-text);
  box-shadow: inset 1px 1px var(--breeding-case-light), 5px 5px 0 #08111b;
  font: 14px/1.45 var(--ui-font-body);
  text-align: left;
}
.breeding-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  margin: 10px 10px 0;
  padding: 10px 14px;
  border: 2px solid var(--breeding-edge);
  color: var(--breeding-case-ink);
  background: var(--breeding-eggshell);
  box-shadow: inset 1px 1px #fff8e5, 1px 1px var(--breeding-case-light);
}
.breeding-dialog-head > .ui-pixel-icon { flex: none; }
.breeding-dialog-head small { display: block; font-size: 11px; font-weight: 700; }
.breeding-dialog h3 {
  margin: 0;
  font: 32px/1.05 var(--ui-font-display);
  overflow-wrap: anywhere;
}
.breeding-dialog p { margin: 0; }
.breeding-dialog-body {
  display: grid;
  gap: 14px;
  margin: 12px;
  padding: 14px;
  border: 2px solid var(--breeding-edge);
  background: var(--breeding-lcd);
  box-shadow: inset 1px 1px #30404c, 1px 1px var(--breeding-case-light);
}
.breeding-review-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.breeding-review-parent {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: 0;
  height: 100%;
  padding: 10px 6px;
  border: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface);
  text-align: center;
}
.breeding-review-parent:first-child { border-color: var(--breeding-amber); }
.breeding-review-parent > small { color: var(--ui-color-text-muted); font-size: 11px; }
.breeding-review-parent:first-child > small { color: var(--breeding-amber); }
.breeding-review-parent > strong { font: 22px/1.05 var(--ui-font-display); overflow-wrap: anywhere; }
.breeding-review-parent > span { font-size: 11px; font-variant-numeric: tabular-nums; }
.breeding-review-sprite { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.breeding-review-cross { color: var(--breeding-amber); font: 28px/1 var(--ui-font-display); text-align: center; }
.breeding-review-prediction { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--breeding-eggshell); font-size: 13px; }
.breeding-inheritance-review { color: var(--ui-color-text-muted); font-size: 12px; line-height: 1.5; }
.breeding-dialog-resources { display: grid; gap: 7px; }
.breeding-dialog-resources > h4 { margin: 0; color: var(--ui-color-text-muted); font-size: 11px; font-weight: 600; }
.breeding-dialog-cost { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px; }
.breeding-dialog-resource { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--ui-color-border); background: var(--ui-color-surface); }
.breeding-dialog-resource > img { flex: none; }
.breeding-dialog-resource > span { display: grid; min-width: 0; gap: 2px; }
.breeding-dialog-resource small { color: var(--ui-color-text-muted); font-size: 10px; overflow-wrap: anywhere; }
.breeding-dialog-resource strong { font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.breeding-consumption-warning {
  padding: 9px 10px;
  border-left: 3px solid var(--ui-color-danger);
  background: color-mix(in srgb, var(--ui-color-danger) 10%, var(--breeding-lcd));
  font-size: 12px;
  line-height: 1.5;
}
.breeding-slot-upgrade { display: grid; grid-template-columns: 1fr 32px 1fr; align-items: center; gap: 10px; text-align: center; }
.breeding-slot-upgrade > div { display: grid; gap: 2px; }
.breeding-slot-upgrade small { color: var(--ui-color-text-muted); font-size: 11px; }
.breeding-slot-upgrade strong { font: 52px/1 var(--ui-font-display); }
.breeding-slot-upgrade > span { color: var(--breeding-amber); font: 30px/1 var(--ui-font-display); }
.breeding-slot-upgrade [data-new-slot] strong { color: var(--breeding-amber); }
.breeding-slot-bays { display: flex; justify-content: center; gap: 6px; }
.breeding-slot-bays > span { display: grid; place-items: center; width: 44px; height: 40px; border: 1px solid var(--ui-color-border); background: var(--ui-color-surface); }
.breeding-slot-bays [data-new-slot] { border-color: var(--breeding-amber); box-shadow: inset 0 -3px color-mix(in srgb, var(--breeding-amber) 35%, transparent); }
.breeding-slot-review { color: var(--ui-color-text-muted); font-size: 12px; text-align: center; }
.breeding-slot-balance strong { color: var(--breeding-eggshell); }
.breeding-dialog-lamp { width: 8px; height: 8px; margin-left: auto; border: 2px solid var(--breeding-edge); background: var(--ui-color-success); box-shadow: 2px 2px 0 #b4bf9c; }
.breeding-hatched { width: min(500px, 100%); }
.breeding-hatched-head { gap: 8px; }
.breeding-hatched-head > small { font-size: 12px; }
.breeding-hatch-observation {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 12px 12px 0;
  padding: 0 12px 14px;
  overflow: hidden;
  border: 2px solid var(--breeding-edge);
  background: var(--breeding-lcd);
  box-shadow: inset 1px 1px #30404c, 1px 1px var(--breeding-case-light);
  text-align: center;
}
.breeding-hatch-observation > h3 { justify-content: center; color: var(--breeding-eggshell); font-size: 34px; }
.breeding-hatch-seals { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.breeding-hatch-destination { padding: 2px 8px; border: 1px solid var(--ui-color-success); color: var(--ui-color-success); font-size: 11px; }
.breeding-hatch-results { margin-top: 8px; margin-bottom: 0; }
.breeding-hatched dl { display: grid; gap: 10px; margin: 0; }
.breeding-hatched dl > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.breeding-hatched dt { color: var(--ui-color-text-muted); font-size: 12px; }
.breeding-hatched dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.breeding-hatched .pokemon-iv-max { font-weight: 300; }
.breeding-dialog .ui-pixel-icon { flex-shrink: 0; }
.breeding-egg[data-empty="true"] .breeding-egg-art { opacity: .4; }
.breeding-dialog :is(button, input):focus-visible { outline: var(--ui-focus-width) solid var(--ui-color-focus); outline-offset: var(--ui-focus-offset); }
.breeding-dialog .pokemon-variant-prefix { vertical-align: middle; }
.breeding-dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--breeding-case);
}
.breeding-dialog-actions .ui-button { min-height: 44px; border-radius: 0; border-bottom-width: 3px; font-size: 14px; font-weight: 700; }
.breeding-dialog-actions .ui-button:not(.ui-button--primary) { border-color: var(--breeding-edge); background: var(--breeding-eggshell); color: var(--breeding-case-ink); box-shadow: inset 1px 1px #fff8e5, 1px 1px var(--breeding-edge); }
.breeding-hatch-actions { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 480px) {
  .breeding-dialog-backdrop { padding: 10px; }
  .breeding-dialog { max-height: calc(100dvh - 20px); }
  .breeding-dialog-head { gap: 8px; padding: 8px 10px; }
  .breeding-dialog h3 { font-size: 28px; }
  .breeding-dialog-body { padding: 10px; gap: 12px; }
  .breeding-review-pair { gap: 4px; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); }
  .breeding-review-parent { padding: 8px 4px; }
  .breeding-review-parent > strong { font-size: 20px; }
  .breeding-review-parent > span { font-size: 10px; }
  .breeding-hatch-observation { padding-inline: 8px; }
  .breeding-hatch-observation > h3 { font-size: 30px; }
}
/* A ready egg waits in its slot, rocking now and then. */
.breeding-egg[data-ready="true"] {
  border-color: color-mix(in srgb, var(--ui-color-success) 60%, transparent);
}
.breeding-egg[data-ready="true"] .breeding-egg-art {
  animation: breeding-egg-rock 2.4s steps(1, end) infinite;
  transform-origin: 50% 85%;
}
.breeding-egg-status {
  color: var(--ui-color-success);
  font-weight: 800;
}
/* Confirmed hatch, 6.6s: anticipation 0–2s, crack 2–3.2s, reveal
   3.2–4.2s, settle/details 4.2–4.7s, count 4.8–5.8s, seals 6–6.6s.
   Only ornamental transforms/opacity animate; Continue never waits. */
.breeding-hatch-stage {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(280px, 100%);
  height: 208px;
}
.breeding-hatch-stage > * { grid-area: 1 / 1; }
.breeding-hatch-platform {
  position: absolute;
  bottom: 30px;
  width: 184px;
  height: 20px;
  border: 2px solid #4e6872;
  border-bottom: 6px solid #253c48;
  background: #1d343e;
  box-shadow: 0 4px 0 #060c13;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 8px 4px);
}
.breeding-hatch-egg {
  position: relative;
  width: 128px;
  height: 128px;
  animation: breeding-hatch-shake 3.6s steps(1, end) both;
}
.breeding-hatch-shell { position: absolute; inset: 0; display: block; }
.breeding-hatch-shell > .ui-pixel-icon { display: block; }
.breeding-hatch-shell--top {
  animation: breeding-shell-top .8s steps(1, end) 3.04s both;
}
.breeding-hatch-shell--bottom {
  animation: breeding-shell-bottom .8s steps(1, end) 3.04s both;
}
.breeding-hatch-crack {
  position: absolute;
  top: 52px;
  left: 28px;
  width: 72px;
  height: 20px;
  background: #344a3c;
  clip-path: polygon(0 8px, 12px 8px, 12px 0, 28px 0, 28px 12px, 40px 12px, 40px 4px, 56px 4px, 56px 8px, 72px 8px, 72px 12px, 52px 12px, 52px 8px, 44px 8px, 44px 16px, 24px 16px, 24px 4px, 16px 4px, 16px 12px, 0 12px);
  animation: breeding-hatch-crack 1.4s steps(1, end) 2s both;
}
.breeding-hatch-glow {
  width: 160px;
  height: 160px;
  border: 8px solid #e3bd70;
  background: #e3bd7020;
  opacity: 0;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, calc(100% - 12px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 12px), 0 calc(100% - 12px), 0 12px, 12px 12px);
  animation: breeding-hatch-glow 1.6s steps(8, end) 2.8s both;
}
.breeding-hatch-spark {
  width: 8px;
  height: 8px;
  background: var(--breeding-amber);
  box-shadow: 0 -4px var(--breeding-eggshell), 0 4px var(--breeding-amber), -4px 0 var(--breeding-amber), 4px 0 var(--breeding-eggshell);
  opacity: 0;
  animation: breeding-hatch-spark 2.5s steps(8, end) var(--spark-delay) both;
}
.breeding-hatch-spark:nth-of-type(odd) { color: var(--ui-color-success); background: currentColor; }
.breeding-hatch-portrait {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  z-index: 1;
  animation: breeding-hatch-pop 1s steps(1, end) 3.2s both;
}
.breeding-hatch-portrait > .breeding-hatched-sprite { width: 128px; height: 128px; }
.breeding-hatch-caption {
  position: absolute;
  bottom: 4px;
  color: var(--breeding-amber);
  font-size: 11px;
  animation: breeding-hatch-caption 3.4s steps(1, end) both;
}
.breeding-hatch-observation > h3 { animation: breeding-hatch-fade .4s steps(4, end) 3.7s both; }
.breeding-hatch-stats { animation: breeding-hatch-fade .4s steps(4, end) 4.3s both; }
.breeding-hatch-from { color: var(--ui-color-text-muted); font-weight: 600; }
.breeding-hatch-delta {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--ui-color-success);
  background: color-mix(in srgb, var(--ui-color-success) 12%, var(--breeding-lcd));
  color: var(--ui-color-success);
  font-size: 12px;
}
.breeding-hatch-delta,
.breeding-hatch-seals { animation: breeding-hatch-fade .6s steps(6, end) 6s both; }
@keyframes breeding-egg-rock {
  0%, 20%, 100% { transform: none; }
  5%, 15% { transform: translateX(-4px); }
  10% { transform: translateX(4px); }
}
/* Hold final states through the last 1%: finished stepped animations may
   report a fractional progress just below 1 and otherwise retain a residue. */
@keyframes breeding-hatch-shake {
  0%, 16%, 32%, 50%, 68%, 82% { opacity: 1; transform: none; }
  20%, 38%, 56%, 72%, 86% { opacity: 1; transform: translateX(-4px); }
  24%, 42%, 60%, 76%, 90% { opacity: 1; transform: translateX(4px); }
  94% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}
@keyframes breeding-shell-top {
  0% { opacity: 1; transform: none; }
  35% { opacity: 1; transform: translate(-8px, -16px); }
  70% { opacity: 1; transform: translate(-16px, -32px); }
  99%, 100% { opacity: 0; transform: translate(-24px, -48px); }
}
@keyframes breeding-shell-bottom {
  0% { opacity: 1; transform: none; }
  35% { opacity: 1; transform: translate(8px, 12px); }
  70% { opacity: 1; transform: translate(16px, 24px); }
  99%, 100% { opacity: 0; transform: translate(24px, 36px); }
}
@keyframes breeding-hatch-crack {
  0% { opacity: 0; }
  14%, 84% { opacity: 1; }
  99%, 100% { opacity: 0; }
}
@keyframes breeding-hatch-glow {
  0% { opacity: 0; }
  45% { opacity: .35; }
  99%, 100% { opacity: 0; }
}
@keyframes breeding-hatch-spark {
  0% { opacity: 0; transform: none; }
  12% { opacity: .9; }
  40% { opacity: .9; transform: translate(var(--spark-x), var(--spark-y)); }
  99%, 100% { opacity: 0; transform: translate(var(--spark-x), calc(var(--spark-y) + 24px)); }
}
@keyframes breeding-hatch-pop {
  0% { opacity: 0; transform: translateY(16px); }
  20% { opacity: 1; transform: translateY(8px); }
  40% { opacity: 1; transform: none; }
  60% { opacity: 1; transform: translateY(-4px); }
  80% { opacity: 1; transform: none; }
  100% { opacity: 1; transform: none; }
}
@keyframes breeding-hatch-fade {
  0% { opacity: 0; transform: translateY(8px); }
  99%, 100% { opacity: 1; transform: none; }
}
@keyframes breeding-hatch-caption {
  0%, 88% { opacity: 1; }
  99%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .breeding-egg[data-ready="true"] .breeding-egg-art,
  .breeding-hatched * { animation: none !important; }
  .breeding-hatch-egg,
  .breeding-hatch-glow,
  .breeding-hatch-spark,
  .breeding-hatch-caption { display: none; }
  .breeding-hatch-portrait,
  .breeding-hatch-observation > h3,
  .breeding-hatch-stats,
  .breeding-hatch-delta,
  .breeding-hatch-seals { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .breeding-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .breeding-analysis {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 640px) {
  .breeding-columns,
  .breeding-collections,
  .breeding-meters,
  .breeding-modes {
    grid-template-columns: minmax(0, 1fr);
  }
  .breeding-analysis {
    grid-row: auto;
  }
  .breeding-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (pointer: coarse) {
  .breeding-move {
    min-height: 44px;
  }
}
