/* Public egg catalogue and detail pages. */

.eggs-public-body {
  background:
    radial-gradient(900px 520px at 16% -8%, rgba(255, 176, 88, 0.09), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(157, 223, 253, 0.06), transparent 55%),
    url("/static/res/icons/pet_background.webp") repeat,
    #141821;
  background-blend-mode: normal, normal, overlay, normal;
}

.eggs-public-page,
.egg-detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 70px;
}

.eggs-public-head {
  display: block;
  margin-bottom: 10px;
}

.eggs-public-head h1,
.egg-hero-copy h1 {
  margin: 0;
  /* Matches the pet page's lighter display weight. */
  font-weight: 600;
  color: #fff;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1;
  text-align: left;
  letter-spacing: -0.8px;
  text-shadow: none;
}

.egg-hero-copy h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.eggs-public-head .web-muted {
  max-width: 620px;
  margin: 9px 0 0;
}

.eggs-public-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.eggs-public-bar {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  overflow: visible;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.09));
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: var(--glass-fill);
  box-shadow: var(--glass-shadow, 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.eggs-public-tools {
  gap: 6px 7px;
}

.eggs-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 210px;
  height: 30px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.065));
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: var(--glass-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.eggs-search svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #7f889a;
  stroke-width: 2;
}

.eggs-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dce1ea;
  font: inherit;
  font-size: 11px;
}

.eggs-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7f889a;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

/* The chevron is drawn with gradients, as hatches does, so the native OS arrow
   does not leak through and the two pages read as one interface. */
.eggs-sort select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 30px;
  box-sizing: border-box;
  padding: 0 24px 0 7px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.065));
  border-radius: 7px;
  outline: 0;
  background-color: rgba(0, 0, 0, 0.2);
  background-image:
    linear-gradient(45deg, transparent 50%, #c9d6ea 50%),
    linear-gradient(135deg, #c9d6ea 50%, transparent 50%);
  background-position:
    calc(100% - 13px) 55%,
    calc(100% - 9px) 55%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  color: #dce1ea;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.eggs-sort select option {
  color: #fff;
  background: #2b3646;
}

/* `.icon-button` is styled in collection.v1.css, which this page does not
   load, so the direction toggle rendered as a bare native button. */
.eggs-public-tools .icon-button {
  flex: none;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.065));
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: var(--glass-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #dce1ea;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.eggs-public-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 0;
  color: #8b94a6;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.eggs-public-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.egg-public-card {
  --egg: #ffcf70;
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background:
    radial-gradient(95% 70% at 50% 0%, color-mix(in srgb, var(--egg) 10%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.032));
  color: inherit;
  text-decoration: none;
  animation: egg-card-in 220ms ease both;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.egg-public-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--egg) 55%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--egg) 16%, transparent);
}

@keyframes egg-card-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.egg-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 14px;
  overflow: hidden;
}

.egg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11px;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.4));
  transition: transform 180ms ease;
}

.egg-public-card:hover .egg-card-media img {
  transform: scale(1.035);
}

.egg-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px 12px;
}

.egg-card-body h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.egg-card-cost {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #8b94a6;
  font-size: 10px;
}

.egg-card-cost b {
  color: #dce1ea;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.egg-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.egg-chip {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #8b94a6;
  font-size: 8px;
}

.egg-chip.accent {
  background: color-mix(in srgb, var(--egg) 12%, transparent);
  color: color-mix(in srgb, var(--egg) 72%, #fff);
}

.egg-public-skeleton {
  aspect-ratio: 0.8;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.04) 60%);
  background-size: 220% 100%;
  animation: egg-shimmer 1.4s linear infinite;
}

@keyframes egg-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}

.eggs-public-empty {
  padding: 46px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #8b94a6;
  font-size: 12px;
  text-align: center;
}

/* Detail */

.egg-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #737d90;
  font-size: 10px;
}

.egg-crumbs a {
  color: #a8b1c2;
  text-decoration: none;
}

.egg-crumbs a:hover {
  color: #fff;
}

.egg-crumbs span::before {
  margin-right: 10px;
  color: #4d5565;
  content: "•";
}

.egg-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 18px;
}

.egg-hero-media {
  --egg: #ffcf70;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    radial-gradient(70% 65% at 50% 45%, color-mix(in srgb, var(--egg) 12%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.18));
}

.egg-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.45));
}

.egg-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.egg-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.egg-hero-fact {
  min-width: 100px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.egg-hero-fact > span {
  display: block;
  color: #737d90;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.egg-hero-fact b {
  display: block;
  margin-top: 2px;
  color: #e8ebf2;
  font-size: 13px;
  font-weight: 600;
}

.egg-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.egg-hero-links a {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #dce1ea;
  font-size: 10px;
  text-decoration: none;
}

.egg-hero-links a:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.egg-pool-panel {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.032));
}

.egg-pool-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.egg-pool-head h2 {
  margin: 0;
  color: #f2f4f8;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.egg-pool-head span {
  color: #6f7888;
  font-size: 9px;
}

.egg-pool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.egg-pool-card {
  --dot: #8b94a6;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}

.egg-pool-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.egg-pool-card img {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  object-fit: contain;
}

.egg-pool-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.egg-pool-copy b {
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.egg-pool-copy span {
  color: #7f889a;
  font-size: 8px;
}

.egg-pool-dot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 7px var(--dot);
}

.rarity-common { --dot: #fff; }
.rarity-unique { --dot: rgb(254,195,148); }
.rarity-rare { --dot: rgb(255,97,97); }
.rarity-epic { --dot: rgb(209,102,253); }
.rarity-legendary { --dot: #ff8000; }
.rarity-secret { --dot: rgb(247,0,255); }
.rarity-celestial { --dot: rgb(157,223,253); }
.rarity-infinity { --dot: rgb(100,1,255); }
.rarity-void { --dot: #2b00ff; }

.rarity-celestial .egg-pool-dot,
.rarity-infinity .egg-pool-dot,
.rarity-void .egg-pool-dot {
  background-size: 200% auto;
  animation: egg-rarity-wave 3.5s linear infinite;
}

.rarity-celestial .egg-pool-dot {
  background-image: linear-gradient(90deg, #9ddffd, #ff9bf7, #9ddffd);
}

.rarity-infinity .egg-pool-dot {
  background-image: linear-gradient(90deg, #ff0000, #6401ff, #ff0000);
}

.rarity-void .egg-pool-dot {
  background-image: linear-gradient(90deg, #2b0001, #2b00ff, #ea00ff, #2b00ff, #2b0001);
}

@keyframes egg-rarity-wave {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}

@media (max-width: 1100px) {
  .eggs-public-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .egg-pool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .eggs-public-tools { width: 100%; flex-wrap: wrap; }
  .eggs-public-bar { align-items: flex-start; }
  .eggs-search { flex: 1; min-width: 180px; }
  .eggs-public-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .egg-hero { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .eggs-public-page, .egg-detail-page { padding: 20px 12px 56px; }
  .eggs-public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .egg-hero { grid-template-columns: 1fr; }
  .egg-hero-media { width: min(100%, 340px); margin: 0 auto; }
  .egg-pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .egg-public-card, .egg-public-skeleton, .egg-card-media img,
  .egg-pool-dot { animation: none; transition: none; }
}

/* Dynamic glow from each egg's accent. */
.egg-card-media::before,
.egg-hero-media::before {
  position: absolute;
  inset: 8%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--egg) 32%, transparent), transparent 68%);
  content: "";
  filter: blur(18px);
  opacity: 0.5;
  pointer-events: none;
  animation: egg-glow-pulse 5s ease-in-out infinite;
}

.egg-card-media img,
.egg-hero-media img {
  position: relative;
  z-index: 1;
}

.egg-hero-media::before {
  inset: -6%;
  opacity: 0.62;
}

@keyframes egg-glow-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.4; }
  50% { transform: scale(1.05); opacity: 0.66; }
}

@media (prefers-reduced-motion: reduce) {
  .egg-card-media::before,
  .egg-hero-media::before { animation: none; }
}

.egg-hero-media {
  box-shadow: 0 0 42px -14px color-mix(in srgb, var(--egg) 60%, transparent);
}

.egg-hero-media img {
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--egg) 32%, transparent));
}

.egg-public-card {
  box-shadow: 0 0 30px -18px color-mix(in srgb, var(--egg) 50%, transparent);
}

.egg-accounts-panel {
  margin-bottom: 14px;
  border: 1px solid var(--surface-soft-border);
  border-radius: var(--surface-soft-radius);
  background: var(--surface-soft);
  box-shadow: none;
}

.egg-accounts-panel .egg-pool-head {
  padding: 13px 15px;
  border-bottom-color: var(--surface-soft-border);
}

.egg-accounts-panel .egg-pool-head h2 {
  font-size: 14px;
  letter-spacing: 0.2px;
}

.egg-accounts-panel .egg-pool-head span {
  font-size: 11px;
}

.egg-account-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.egg-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--surface-soft-border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #c8d0dc;
  font-size: 14px;
}

.egg-account-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.egg-account-row b {
  flex: none;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .egg-account-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .egg-account-list { grid-template-columns: 1fr; }
}

.eggs-public-tools .switch-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.065));
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: var(--glass-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #c8d0dc;
  font-size: 10px;
  white-space: nowrap;
}

.eggs-public-tools .switch-label input {
  margin: 0;
  accent-color: var(--ui-accent);
}

#eggs-public-hatches {
  color: #a8b1c2;
  font-variant-numeric: tabular-nums;
}

.egg-description {
  max-width: 620px;
  margin: 12px 0 0;
  color: #9aa3b4;
  font-size: 11px;
  line-height: 1.5;
}

.egg-cost-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -2px;
  object-fit: contain;
}

.egg-worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.egg-worlds button {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  color: #9aa3b4;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.egg-worlds button[aria-pressed="true"] {
  border-color: rgba(157, 223, 253, 0.4);
  background: rgba(157, 223, 253, 0.1);
  color: #dff4ff;
}

.egg-refresh {
  align-self: flex-start;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #c8d0dc;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.egg-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
}




.egg-pool-card img {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px;
  box-sizing: border-box;
}

.egg-cost-icon {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.egg-cost-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--currency, #dce1ea);
}

.infinity-card-world {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.infinity-card-world span {
  color: #737d90;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.infinity-card-world select {
  min-width: 0;
  flex: 1;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.2);
  color: #dce1ea;
  font: inherit;
  font-size: 9px;
}

.egg-world-select {
  display: none;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 12px 0 0;
  padding: 6px 8px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 7px;
  background: rgba(139, 92, 246, 0.08);
}

html.infinity-egg .egg-world-select {
  display: flex;
}

.egg-world-select span {
  color: #b9a7e8;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.egg-world-select select {
  min-width: 170px;
  padding: 2px 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0ecff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.egg-world-select select option {
  background: #1a1724;
  color: #f0ecff;
}

/* Slightly brighter image glow. */
.egg-card-media::before,
.egg-hero-media::before {
  opacity: 0.62;
}

.egg-hero-media::before {
  opacity: 0.74;
}

@keyframes egg-glow-pulse-bright {
  0%, 100% { transform: scale(0.97); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.8; }
}

.egg-card-media::before,
.egg-hero-media::before {
  animation-name: egg-glow-pulse-bright;
}

.egg-public-card {
  box-shadow: 0 0 34px -14px color-mix(in srgb, var(--egg) 62%, transparent);
}

.egg-hero-media {
  box-shadow: 0 0 48px -10px color-mix(in srgb, var(--egg) 72%, transparent);
}


/* Slightly softer image glow than the previous pass. */
.egg-card-media::before,
.egg-hero-media::before {
  opacity: 0.56;
}

.egg-hero-media::before {
  opacity: 0.68;
}

@keyframes egg-glow-pulse-soft {
  0%, 100% { transform: scale(0.97); opacity: 0.46; }
  50% { transform: scale(1.05); opacity: 0.72; }
}

.egg-card-media::before,
.egg-hero-media::before {
  animation-name: egg-glow-pulse-soft;
}

.egg-public-card {
  box-shadow: 0 0 30px -15px color-mix(in srgb, var(--egg) 55%, transparent);
}

.egg-hero-media {
  box-shadow: 0 0 42px -12px color-mix(in srgb, var(--egg) 64%, transparent);
}

/* Match the pet-card rarity hover animation in egg pools. */
.egg-pool-card {
  position: relative;
}

.egg-pool-card::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.egg-pool-card.rarity-legendary::after {
  background-image: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff80, #0099ff, #ff0000);
  background-size: 200% 100%;
  animation: egg-rarity-wave 3.5s linear infinite;
}

.egg-pool-card.rarity-celestial::after {
  background-image: linear-gradient(90deg, #9ddffd, #ff9bf7, #9ddffd);
  background-size: 200% 100%;
  animation: egg-rarity-wave 3.5s linear infinite;
}

.egg-pool-card.rarity-infinity::after {
  background-image: linear-gradient(90deg, #ff0000, #6401ff, #ff0000);
  background-size: 200% 100%;
  animation: egg-rarity-wave 3.5s linear infinite;
}

.egg-pool-card.rarity-void::after {
  background-image: linear-gradient(90deg, #2b0001, #2b00ff, #ea00ff, #2b00ff, #2b0001);
  background-size: 200% 100%;
  animation: egg-rarity-wave 3.5s linear infinite;
}

/* Hover highlight uses each pet's pre-computed dominant hex. */
.egg-pool-card {
  position: relative;
}

.egg-pool-card:hover,
.egg-pool-card:focus-visible {
  border-color: color-mix(in srgb, var(--pet-hex, #ffffff) 55%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pet-hex, #ffffff) 22%, transparent),
    0 10px 26px -10px color-mix(in srgb, var(--pet-hex, #ffffff) 55%, transparent);
}

.egg-pool-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120% 90% at 50% 0%,
    color-mix(in srgb, var(--pet-hex, #ffffff) 20%, transparent),
    transparent 62%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.egg-pool-card:hover::before,
.egg-pool-card:focus-visible::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .egg-pool-card.rarity-legendary::after,
  .egg-pool-card.rarity-celestial::after,
  .egg-pool-card.rarity-infinity::after,
  .egg-pool-card.rarity-void::after {
    animation: none;
  }
}

/* Slightly larger egg-card typography for readability. */
.egg-card-body {
  gap: 6px;
  padding: 11px 13px 13px;
}

.egg-card-body h2 {
  font-size: 15px;
}

.egg-card-cost {
  gap: 6px;
  font-size: 12px;
}

.egg-card-cost b {
  font-size: 12px;
}

.egg-chip {
  padding: 3px 6px;
  font-size: 10px;
}

/* Follow-up readability pass. */
.egg-card-body h2 {
  font-size: 17px;
}

.egg-card-cost,
.egg-card-cost b {
  font-size: 14px;
}

.egg-chip {
  font-size: 11px;
}

.egg-cost-icon {
  width: 14px;
  height: 14px;
}


/* Detail cost uses the catalogue's coloured cost treatment, larger. */
.egg-hero-fact.egg-cost-fact {
  border-color: color-mix(in srgb, var(--currency, #ffcf70) 28%, transparent);
  background: color-mix(in srgb, var(--currency, #ffcf70) 7%, rgba(0, 0, 0, 0.14));
}

.egg-hero-fact.egg-cost-fact .egg-cost-value {
  gap: 6px;
  color: var(--currency, #dce1ea);
  font-size: 16px;
  font-weight: 650;
}

.egg-hero-fact.egg-cost-fact .egg-cost-icon {
  width: 16px;
  height: 16px;
}

/* Cost matches the pet-pool fact text; icon stays slightly smaller. */
.egg-hero-fact.egg-cost-fact .egg-cost-value {
  font-size: 13px;
}

.egg-hero-fact.egg-cost-fact .egg-cost-icon {
  width: 14px;
  height: 14px;
}


.egg-cost-amount {
  color: var(--currency, #dce1ea);
}

.egg-cost-currency {
  color: #fff;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.egg-cost-currency {
  color: #8b94a6;
}

/* Keep icon → amount → currency spacing even. */
.egg-cost-fact .egg-cost-value {
  gap: 4px;
}

.egg-cost-fact .egg-cost-icon {
  margin-right: 0;
}

/* Larger, quieter egg pool: three columns, bigger text, slimmer cards. */
.egg-pool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
}

.egg-pool-card {
  gap: 10px;
  padding: 7px 8px;
}

.egg-pool-card img {
  width: 56px;
  height: 56px;
}

.egg-pool-copy {
  gap: 3px;
}

.egg-pool-copy b {
  font-size: 12px;
}

.egg-pool-copy span {
  color: #a8b1c2;
  font-size: 9.5px;
}

.egg-pool-copy span:last-child {
  color: #c8d0dc;
  font-size: 10px;
}

@media (max-width: 720px) {
  .egg-pool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.egg-status-tag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}

.egg-status-tag.limited {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.egg-status-tag.permanent {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
}

.egg-status-dot {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 7px currentColor;
}

.egg-status-dot.limited {
  background: #4ade80;
  color: #4ade80;
}

.egg-status-dot.permanent {
  background: #ff6b6b;
  color: #ff6b6b;
}

.eggs-permanence-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 1px 0 auto;
  color: #8b94a6;
  font-size: 11px;
}

.eggs-permanence-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.eggs-permanence-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.eggs-permanence-legend i.limited {
  background: #4ade80;
  color: #4ade80;
}

.eggs-permanence-legend i.permanent {
  background: #ff6b6b;
  color: #ff6b6b;
}

/* On mobile the permanence key sits above the toolbar, right aligned, instead
   of consuming a third row inside it. */
@media (max-width: 760px) {
  .eggs-public-bar {
    margin-top: 24px;
  }

  .eggs-permanence-legend {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    margin: 0;
  }
}
