
.incubator-stack {
  display: grid;
  gap: var(--space-6);
}

.incubator-bay {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(11rem, 0.62fr);
  gap: 0;
  /* Set: flush (frame-set registry). */
  overflow: visible;
  background: var(--slate-window);
}
.incubator-bay > .set1-sign-band--sip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* Under the wood rim (z 4–5) so the ropes tuck behind the top beam. */
  z-index: 3;
}
/* Incubator Sip plaque · dynamic width, clear of the outer wood rim. */
.incubator-bay > .set1-sign-band--sip .set1-plaque-wrap {
  top: 0.55rem;
  /* Keep the plaque clear of the room art / egg rail. 40px left of the sip nudge. */
  left: 0.35rem;
  transform: translateX(calc(var(--set1-sign-nudge, 90px) - 40px));
}
.incubator-bay > .set1-sign-band--sip .set1-plaque.carved-plaque {
  width: fit-content;
  max-width: min(12.5rem, calc(100% - 1rem));
  min-width: 0;
}
.incubator-bay.pixel-frame::after {
  z-index: 4;
}
.incubator-bay__main {
  position: relative;
  display: grid;
  /* Hatch room, then egg pager + timer rail. */
  /* Desktop: incubator takes the extra width freed by a 5-column egg rail. */
  grid-template-columns: minmax(0, 1.2fr) minmax(16.5rem, 1fr);
  gap: var(--space-4);
  /* Bleed past bay pad on top/left/bottom so the room plate meets the rim. */
  margin: var(--frame-bleed) 0 var(--frame-bleed) var(--frame-bleed);
  /* Extra right inset clears rim vines from the timer rail (equipped sidebar stays outside). */
  padding: calc(var(--space-3) + var(--frame-rim)) calc(var(--space-3) + 18px) calc(var(--space-3) + var(--frame-rim)) calc(var(--space-4) + var(--frame-rim));
  border-right: 0;
  min-width: 0;
  align-items: stretch;
  overflow: hidden;
  box-shadow: none;
  /* Square incubator room (not the 16:9 wide plate). */
  background: url("/assets/placeholders/scenes/incubator-room.webp?v=3") center / cover no-repeat;
  image-rendering: pixelated;
}
@media (max-width: 56rem) {
  .incubator-bay__main {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
  }
}


.aff {
  --aff-ink: #e8ecf7;
  --aff-dim: #7d89aa;
  --aff-green: #5fd45f;
  --aff-green-d: #15321f;
  --aff-green-m: #22573a;
  --aff-blue: #8fb0dd;
  --aff-blue-d: #15213f;
  --aff-blue-m: #22315a;
  --aff-void: #04060c;
  --aff-brass: #b8953f;
  --aff-switch: 260px;
  container-type: inline-size;
  width: 100%;
  color: var(--aff-ink);
  font-weight: 700;
}
.aff-nm {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.58rem;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.aff-pc {
  font-size: 0.72rem;
  color: var(--aff-green);
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}
.aff-t2.is-active .aff-pc { color: var(--aff-blue); }
.is-empty .aff-nm,
.is-locked .aff-nm { color: var(--aff-dim); }
.is-empty .aff-pc,
.is-locked .aff-pc { color: var(--aff-dim); opacity: 0.8; }
.aff-mdl {
  position: relative;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--aff-brass);
  background: radial-gradient(circle at 38% 32%, #1d2a50, #080d1c);
  box-shadow:
    inset 0 0 0 1px var(--aff-void),
    inset 0 0 0 2px #6f5a26,
    0 0 0 1px var(--aff-void);
}
.aff-t2.is-active .aff-mdl { border-color: #9fb1cf; }
.is-empty .aff-mdl,
.is-locked .aff-mdl { border-color: #4a5578; }
.aff-mdl .aff-ico,
.aff-mdl img {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  image-rendering: pixelated;
}
.aff-empty,
.aff-lock {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
}
.aff-empty {
  border: 2px dashed #3b4a78;
  color: #3b4a78;
}
.aff-empty::before { content: "+"; }
.aff-lock {
  border: 2px solid #3b4a78;
  color: #9aa5c4;
  font-size: 0.7rem;
}
.aff-lock::before { content: ""; }
.aff-flag { display: block; filter: drop-shadow(0 2px 0 var(--aff-void)); }
.aff-fl {
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 1.45rem;
  padding-bottom: 0.28rem;
  font-family: Georgia, serif;
  font-size: 0.62rem;
  color: #06210f;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  background-color: var(--aff-green);
}
.aff-t2.is-active .aff-fl { background-color: var(--aff-blue); color: #0b1020; }
.is-empty .aff-fl,
.is-locked .aff-fl { background-color: #3a456a; color: #9aa5c4; }
.aff-full { display: flex; flex-direction: column; gap: 0.4rem; }
.aff-slot { position: relative; display: flex; align-items: center; }
.aff-plate {
  flex: 1;
  min-width: 0;
  height: 1.65rem;
  margin-left: -0.4rem;
  padding: 0 1.85rem 0 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.28rem;
  border: 2px solid var(--aff-void);
  background: linear-gradient(var(--aff-blue-m), var(--aff-blue-d));
}
.aff-t1.is-active .aff-plate {
  background: linear-gradient(var(--aff-green-m), var(--aff-green-d));
}
.is-empty .aff-plate,
.is-locked .aff-plate {
  background: linear-gradient(#141d38, #0c1328);
}
.aff-slot .aff-flag { position: absolute; right: 0.45rem; top: 0; z-index: 3; }
.aff-slot .aff-fl { height: 1.75rem; }
/* Equipped rail · keep ribbon + circle, squeeze job names harder. */
.incubator-bay__active .aff-nm { font-size: 0.52rem; letter-spacing: 0.03em; }
.incubator-bay__active .aff-pc { font-size: 0.64rem; }
.incubator-bay__active .aff-mdl {
  width: 1.55rem;
  height: 1.55rem;
}
.incubator-bay__active .aff-mdl .aff-ico,
.incubator-bay__active .aff-mdl img {
  width: 0.82rem;
  height: 0.82rem;
}
.incubator-bay__active .aff-plate {
  height: 1.45rem;
  padding: 0 1.55rem 0 0.55rem;
}
.incubator-bay__active .aff-slot .aff-fl { height: 1.55rem; width: 0.85rem; font-size: 0.55rem; }
.aff-compact { display: none; }
.aff-strip { display: flex; }
.aff-seg {
  flex: 1;
  min-width: 0;
  height: 2.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.7rem 0 0.45rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  background: linear-gradient(var(--aff-blue-m), var(--aff-blue-d));
}
.aff-seg + .aff-seg { margin-left: -0.3rem; padding-left: 1.1rem; }
.aff-seg.aff-t1.is-active { background: linear-gradient(var(--aff-green-m), var(--aff-green-d)); }
.aff-seg.is-empty,
.aff-seg.is-locked { background: linear-gradient(#141d38, #0c1328); }
.aff-bd {
  position: absolute;
  right: -0.3rem;
  bottom: -0.3rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 0.62rem;
  color: #0b1020;
  background: #c9a548;
}
.aff-caps {
  display: flex;
  margin-top: 0.28rem;
  font-size: 0.52rem;
  color: var(--aff-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.aff-caps span {
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@container (max-width: 259px) {
  .aff-full { display: none; }
  .aff-compact { display: block; }
}
/* Equipped sidebar · always the plate (concept 15), even when the rail is narrow. */
.incubator-bay__active .aff .aff-full { display: flex; }
.incubator-bay__active .aff .aff-compact { display: none; }
.incubator-bay__active .incubator-bay__affinities {
  width: 100%;
}
/* Socket chips · New_Affinity_Placing-and-Style (primary left, secondary right). */
.aff-corners {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  pointer-events: none;
}
.aff-corners--corners {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  /* Sky band · 30px above the 2.85rem sit so the plates clear the rim without dropping into the nest. */
  top: calc(2.85rem - 20px);
  bottom: auto;
  z-index: 6;
  width: auto;
}
/* Equipped bay uses the same corner sit as roster scenes (no tighter inset). */
.aff-corners--row {
  position: relative;
  z-index: 2;
}
.aff-socket {
  position: relative;
  container-type: inline-size;
  width: auto;
  max-width: 38%;
  aspect-ratio: 156 / 78;
  flex: 0 1 38%;
  min-width: 0;
  pointer-events: auto;
  opacity: 0.85;
}
.aff-socket__fit {
  position: absolute;
  left: 0;
  top: 0;
  width: 156px;
  height: 78px;
  /* Fill the socket · JS --aff-scale wins once the box has a real width. */
  transform: scale(var(--aff-scale, calc(100cqi / 156px)));
  transform-origin: top left;
}
.aff-chip {
  position: relative;
  width: 156px;
  height: 78px;
  font: 700 24px/1 Georgia, "Times New Roman", serif;
  filter: drop-shadow(0 3px 0 #000b);
}
.aff-chip__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.aff-chip__slot {
  position: absolute;
  top: 0;
  z-index: 3;
  height: 78px;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aff-chip.l .aff-chip__slot { left: 0; }
.aff-chip.r .aff-chip__slot { right: 0; }
.aff-chip__slot img,
.aff-chip__slot canvas {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 0 #0009);
}
.aff-chip__val {
  position: absolute;
  z-index: 3;
  top: 21px;
  height: 57px;
  width: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
  letter-spacing: -1.5px;
  text-shadow:
    -2px 0 #000, 2px 0 #000, 0 -2px #000, 0 2px #000,
    -2px -2px #000, 2px -2px #000, -2px 2px #000, 2px 2px #000,
    0 4px #0007;
}
/* Left plate · nudge % + digits ~10px toward the octagon (right plate stays put). */
.aff-chip.l .aff-chip__val { left: 62px; justify-content: flex-start; padding-left: 8px; }
.aff-chip.r .aff-chip__val { left: 0; justify-content: flex-end; padding-right: 8px; }
.aff-chip .acc {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 0 #0009);
}
.aff-chip .acc.behind { z-index: 1; }
.aff-chip .acc.line {
  filter:
    drop-shadow(1px 0 0 #120a04) drop-shadow(-1px 0 0 #120a04)
    drop-shadow(0 -1px 0 #120a04) drop-shadow(0 1px 0 #120a04);
}


/* Nested vine frame · outer bay keeps beams; equipped column is outside this host. */
.incubator-bay__main.pixel-frame {
  box-shadow: none;
}
.incubator-bay__main.pixel-frame::after {
  z-index: 3;
}
.incubator-bay__main.pixel-frame > .pixel-frame__fx {
  z-index: 4;
}
/* Side-by-side · drop the main's right rim. The equipped column owns that beam. */
@media (min-width: 56.01rem) {
  .incubator-bay__main.pixel-frame::after,
  .incubator-bay__main.pixel-frame > .pixel-frame__fx {
    clip-path: inset(0 var(--frame-rim) 0 0);
  }
}
.incubator-bay__stage {
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
  align-self: stretch;
  justify-items: center;
  align-content: center;
  background: transparent;
}
.incubator-bay__scene {
  position: relative;
  /* Meet in the middle · a bit right of the last left park. */
  width: 72%;
  max-width: 17rem;
  margin: 1.55rem auto 0 30%;
  transform: translateX(0.35rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
/* Idle nest: red heat + side glow dim until an egg is placed. */
.incubator-bay__scene--dim .incubator-scene__svg {
  filter: brightness(0.52) saturate(0.55) contrast(0.92);
  transition: filter 0.45s ease;
}
.incubator-bay__scene--dim .rim,
.incubator-bay__scene--dim .glow {
  animation: none !important;
  opacity: 0.12;
}
/* Lightning probe (SVG g.bulb) · dim when empty, solid on when loaded, flash when ready. */
.incubator-bay__scene--dim .bulb {
  filter: brightness(0.28) saturate(0.45);
}
.incubator-bay__scene:not(.incubator-bay__scene--dim) .bulb {
  filter: brightness(1.22) saturate(1.15);
}
.incubator-bay__scene--ready .bulb {
  /* Two-phase tip flash · dropped the old brightest (1.75) stop. */
  animation: incubator-bulb-flash 1.05s steps(2, end) infinite;
}
@keyframes incubator-bulb-flash {
  0%, 100% { filter: brightness(0.85) saturate(1.05); }
  50% { filter: brightness(1.32) saturate(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .incubator-bay__scene--ready .bulb {
    animation: none !important;
    filter: brightness(1.22) saturate(1.15);
  }
}
html:not([data-full-quality="1"]) .incubator-bay__scene--ready .bulb {
  animation: none !important;
  filter: brightness(1.22) saturate(1.15);
}
/* Covers the baked chimney status lights · continuous hatch progress. */
.incubator-bay__status-meter {
  position: absolute;
  /* viewBox 0 -20 160 260 · bar at SVG (62,28) size 36×4 */
  left: 38.75%;
  top: 18.46%;
  width: 22.5%;
  height: 1.55%;
  z-index: 2;
  overflow: hidden;
  background: #2a1b0e;
  box-shadow: inset 0 0 0 1px #0b0704;
  pointer-events: none;
  image-rendering: pixelated;
}
.incubator-bay__status-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(
      90deg,
      #ffe08a 0 10%,
      #f0b43c 10% 55%,
      #c98a24 55% 100%
    );
  box-shadow: inset 0 -1px 0 #8a5a16;
}
.incubator-bay__status-meter--off .incubator-bay__status-meter-fill {
  width: 0% !important;
  opacity: 0;
}
.incubator-bay__shell-slot {
  position: absolute;
  left: 50%;
  /* Upper straw pedestal · +8px (2px×4) down toward the nest. */
  top: 74%;
  z-index: 1;
  width: min(46%, 8.1rem);
  transform: translate(-50%, calc(-100% + 8px));
  pointer-events: none;
  image-rendering: pixelated;
}
/*
 * Claim-ready: egg shell is 16 cells wide, hatch-peek chickling is 24.
 * Same data-* scale (7) keeps source cells equal; CSS must size by cell
 * ratio (24/16 = 150%) so displayed pixel blocks match. Shell slot is a
 * bit narrower so the half-shell is not oversized next to the chick.
 */
.incubator-bay__shell-slot--claim {
  width: min(30%, 5.35rem);
}
.incubator-bay__hatch-peek {
  display: block;
  /* 24/16 of the shell width · meet-in-the-middle vs full 150%. */
  width: 138%;
  max-width: none;
  height: auto;
  margin: 0 auto -72%;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 50% 100%;
  /* One pixel-block hop (stepped), not a smooth ease. */
  animation: hatch-peek-bob 0.85s steps(1, end) infinite;
}
@keyframes hatch-peek-bob {
  0%, 49.999% { transform: translateX(-50%) translateY(0); }
  50%, 100% { transform: translateX(-50%) translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .incubator-bay__hatch-peek { animation: none; }
}
html:not([data-full-quality="1"]) .incubator-bay__hatch-peek {
  animation: none;
}
.incubator-bay__shell-anim {
  width: 100%;
  position: relative;
  z-index: 2;
  transform-origin: 50% 100%;
}
.incubator-bay__shell-anim.inc-wob { animation: inc-wobble 1.6s steps(1) infinite; }
.incubator-bay__shell-anim.inc-fw { animation: inc-wobble .5s steps(1) infinite; }
.incubator-bay__shell-anim.inc-bnc { animation: inc-bounce 1s ease-in-out infinite; }
.incubator-bay__shell-anim.inc-chg { animation: inc-charge .5s steps(1) infinite; }
.incubator-bay__shell-slot .egg-token {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.incubator-bay__shell-slot canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  image-rendering: pixelated;
}
.incubator-bay__scene .incubator-scene {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  display: block;
}
.incubator-bay__scene .incubator-scene__svg {
  width: 100%;
  height: auto;
  aspect-ratio: 160 / 260;
  display: block;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}
.incubator-bay__vines,
.incubator-bay__vine {
  display: none;
}
.incubator-bay__controls { display: none; }
.incubator-bay__rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.incubator-bay__eggs {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  height: 100%;
  margin-top: 0;
  /* Clear the right vine rim · left edge lines up with the grid gutter. */
  margin-right: 0.65rem;
  margin-left: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.incubator-bay__stats {
  display: grid;
  gap: var(--space-2);
  width: 100%;
  margin: 0;
  justify-items: stretch;
  text-align: center;
}
/* Timer + Next phase · slate well · width = label/meter/button only. */
.incubator-bay__progress-frame {
  display: grid;
  gap: var(--space-2);
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.65rem 0.7rem 0.7rem;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  justify-items: stretch;
  background:
    linear-gradient(180deg, color-mix(in srgb, #2a3a4e 70%, #0c1218), #121a24);
  color: #e8eef6;
  box-shadow:
    inset 0 0 0 2px #cdb47c,
    inset 0 0 0 4px #4a2e1a,
    inset 0 0 0 5px #241409,
    0 3px 0 rgb(18 9 4 / 45%);
}
.incubator-bay__progress-frame .incubator-bay__timer {
  width: max-content;
  max-width: 100%;
}
.incubator-bay__progress-frame .incubator-bay__meter-row {
  grid-template-columns: auto 7.25rem;
  width: max-content;
}
.incubator-bay__admin { margin-top: 0.15rem; }
.incubator-bay__admin .btn {
  width: 100%;
  min-width: 0;
}
.incubator-bay__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.incubator-bay__timer {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  justify-items: stretch;
}
.incubator-bay__timer-label {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.incubator-bay__meter-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}
.incubator-bay__pct {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--ink-strong);
  min-width: 2.6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.incubator-bay__meter-row .meter {
  width: 100%;
  height: 0.85rem;
}
.incubator-bay__remain {
  justify-self: center;
  margin: 0.15rem 0 0;
  padding: 0.35rem 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
/*
 * Egg pager · one frosted glass layer on the outer wood rim.
 * Pane stays clear so we do not stack a second tint/blur over the room.
 */
.egg-window.pixel-frame {
  /* Set: card (frame-set registry). */
  --frame-pad-y: 0.7rem;
  --frame-pad-x: 0.85rem;
  flex: 1 1 auto;
  width: 100%;
  min-height: 78%;
  height: 100%;
  display: flex;
  background: color-mix(in srgb, #f4f0e8 34%, transparent);
  -webkit-backdrop-filter: blur(11px) saturate(1.2);
  backdrop-filter: blur(11px) saturate(1.2);
}
html[data-quality="low"] .egg-window.pixel-frame {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: color-mix(in srgb, #f4f0e8 78%, var(--ink));
}
.egg-window__pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
  padding: 0.25rem 0.1rem 0.1rem;
  background: transparent;
  overflow: visible;
}
.egg-lineup {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.4rem, 1fr));
  justify-content: center;
  justify-items: stretch;
  gap: var(--space-2);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}
@media (max-width: 56rem) {
  .egg-lineup {
    grid-template-columns: repeat(3, minmax(3.4rem, 1fr));
  }
}
@media (max-width: 45rem) {
  .egg-lineup {
    grid-template-columns: repeat(2, minmax(3.4rem, 1fr));
  }
}
.egg-lineup-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.15rem;
}
.egg-lineup-pager[hidden] { display: none; }
.egg-lineup-pager__status {
  min-width: 3.2rem;
  text-align: center;
  font-family: var(--font-pixel, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #f0e0c0;
  text-shadow: 0 1px 0 #2a1810;
}
.egg-lineup-pager__btn {
  min-width: 2.2rem;
  padding: 0.2rem 0.45rem;
}
.egg-lineup-pager__btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}
.egg-lineup__item {
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow: visible;
}
.egg-lineup__slot .egg-lineup__pick {
  margin-bottom: 0;
}
.egg-lineup__pick {
  position: relative;
  container-type: inline-size;
  display: grid;
  align-content: end;
  justify-items: center;
  width: 100%;
  min-width: 2.05rem;
  aspect-ratio: 1;
  height: auto;
  max-height: none;
  margin-bottom: 0.2rem;
  /* Extra top air so halos and horns clear the gold rim. */
  --pick-pad-x: 0.32rem;
  --pick-pad-b: 0.22rem;
  padding: 0.7rem var(--pick-pad-x) var(--pick-pad-b);
  overflow: visible;
  border: 0;
  /* Softest corner cut · gold rim reads 2px thick. */
  border-radius: 2px;
  /* Dotted night bed. The egg itself uses the slate well. */
  background: var(--slate-window);
  box-shadow:
    inset 0 0 0 1px #150b05,
    inset 0 0 0 3px #e0b050,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 6px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 3px 0 rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}
.egg-lineup__pick:not(:disabled) *,
.egg-lineup__pick:not(:disabled) canvas {
  cursor: pointer;
}
.egg-lineup__pick:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(1px);
  box-shadow:
    inset 0 0 0 1px #150b05,
    inset 0 0 0 3px #f0c45a,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 6px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent);
}
.egg-lineup__pick:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 1px #150b05,
    inset 0 0 0 3px #e0b050,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 6px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 1px 0 rgba(0, 0, 0, 0.55);
}
.egg-lineup__pick:disabled {
  cursor: not-allowed;
  /* Dim art only · qty badge stays bright (parent opacity cannot be undone). */
}
/* Empty hold · lighter brown frame (not selectable). */
.egg-lineup__pick--empty {
  box-shadow:
    inset 0 0 0 1px #3a2818,
    inset 0 0 0 3px #5a4028,
    inset 0 0 0 5px #2a1a10,
    0 3px 0 rgba(0, 0, 0, 0.45);
  filter: saturate(0.88) brightness(0.96);
}
.egg-lineup__pick--empty:hover:not(:disabled),
.egg-lineup__pick--empty:disabled {
  box-shadow:
    inset 0 0 0 1px #3a2818,
    inset 0 0 0 3px #5a4028,
    inset 0 0 0 5px #2a1a10,
    0 3px 0 rgba(0, 0, 0, 0.45);
}
.egg-lineup__pick:disabled .egg-token canvas,
.egg-lineup__pick:disabled .egg-token__art {
  opacity: 0.72;
  filter: grayscale(0.25) brightness(0.9);
}
.egg-lineup__pick:disabled .typing-badge {
  opacity: 0.72;
  filter: grayscale(0.25) brightness(0.9);
}
.egg-lineup__pick:disabled .egg-token__count {
  opacity: 1;
  filter: none;
}
.egg-lineup__pick--active {
  box-shadow:
    inset 0 0 0 1px #150b05,
    inset 0 0 0 3px #f0c45a,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 6px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 3px 0 rgba(0, 0, 0, 0.55),
    0 0 0 2px color-mix(in srgb, var(--gold) 70%, transparent);
}
.egg-lineup__pick .egg-token {
  width: auto;
  height: 62%;
  max-width: 68%;
  aspect-ratio: 4 / 5;
  border: 0;
  background: transparent;
  box-shadow: none;
}
/* Qty badge · brighter gold plate, larger type, pinned nearer the corner. */
.egg-lineup__pick .egg-token__count {
  right: -0.5rem;
  top: -0.22rem;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.28rem;
  font-size: 1.05rem;
  color: #fffef6;
  background:
    linear-gradient(180deg, #ffe9a8 0 1px, #f0c84a 1px calc(100% - 2px), #a87428 calc(100% - 2px) 100%);
  text-shadow:
    0 1px 0 #150b05,
    1px 0 0 #150b05,
    -1px 0 0 #150b05,
    0 -1px 0 #150b05,
    0 0 6px rgb(255 220 120 / 55%);
  box-shadow:
    inset 0 0 0 1px #150b05,
    0 0 0 1px color-mix(in srgb, #ffe9a8 55%, transparent),
    0 1px 0 rgba(0, 0, 0, 0.45);
}
.egg-lineup__pick .egg-token canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain;
  margin: 0 auto;
  image-rendering: pixelated;
  transform-origin: 50% 85%;
  transition: transform 0.12s ease, filter 0.18s ease;
}
.egg-lineup__pick .egg-token canvas.egg-token__art--hover {
  animation: egg-token-bob 0.55s ease-in-out infinite;
}
.egg-lineup__pick .egg-token canvas.egg-token__art--awake {
  filter: brightness(1.18) saturate(1.15) drop-shadow(0 0 6px rgb(255 220 120 / 55%));
}
@keyframes egg-token-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .egg-lineup__pick .egg-token canvas.egg-token__art--hover { animation: none; }
}
/* Enchanted Incubator · typing glyph (gold plate optional · eggs use bare). */
.typing-badge {
  position: absolute;
  left: 5px;
  top: 6px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #f3d98a 0 1px, #e0b050 1px calc(100% - 2px), #7a5522 calc(100% - 2px) 100%);
  box-shadow:
    inset 0 0 0 1px #150b05,
    0 1px 0 rgba(0, 0, 0, 0.45);
  clip-path: polygon(
    0 18%, 18% 0, 82% 0, 100% 18%,
    100% 82%, 82% 100%, 18% 100%, 0 82%
  );
}
.typing-badge .affinity-chip__glyph {
  width: 0.95rem;
  height: 0.95rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
/* Egg slots · glyph only, no gold plate, slightly larger. */
.egg-lineup__pick .typing-badge,
.typing-badge.typing-badge--bare {
  left: 3px;
  top: 3px;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
  border-radius: 0;
}
.egg-lineup__pick .typing-badge .affinity-chip__glyph,
.typing-badge.typing-badge--bare .affinity-chip__glyph {
  width: 1.08rem;
  height: 1.08rem;
  filter:
    drop-shadow(0 0 0.5px #150b05)
    drop-shadow(0 1px 0 #150b05);
}
.incubator-bay__info {
  display: grid;
  gap: var(--space-2);
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  min-width: 0;
}
.incubator-bay__active {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  width: calc(100% + 10px);
  max-width: none;
  /* Bleed to the outer rim. Left -14px covers the retired main-side seam. */
  margin: var(--frame-bleed) calc(var(--frame-bleed) - 8px) var(--frame-bleed) var(--frame-bleed);
  /* Half the previous top inset. Right is the outer beam only. */
  padding:
    6px
    6px
    calc(var(--space-2) + 8px)
    18px;
  box-sizing: border-box;
  /* Dotted night slate · same bed as the roster body. */
  background: var(--slate-window);
  text-align: center;
  border: 0;
  border-image: none !important;
  /* Kill any inherited soft rim / gradient leftover on this column. */
  box-shadow: none;
}
/* Left edge of the equipped column · header gold, not the wood beam. */
.incubator-bay__split.wood-beam-v {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 8px !important;
  height: auto !important;
  pointer-events: none;
  background: linear-gradient(90deg, #2a1604 0, #e6b450 18%, #fff0b0 40%, #c38a2a 65%, #7a4c12 85%, #2a1604 100%) !important;
  box-shadow: none !important;
}
.incubator-bay__active::before,
.incubator-bay__active::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  border-image: none !important;
  background: none !important;
  box-shadow: none !important;
}
/* Metal nameplate · same language as roster .incubator-head / affinity demo .head. */
.incubator-bay__head.incubator-head {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  width: 100%;
  min-height: 1.65rem;
  margin: 0;
  padding: 0.28rem 0.5rem 0.32rem;
  box-sizing: border-box;
  border-bottom: 2px solid #2a2e34;
  box-shadow: inset 0 1px 0 #b8c0c8, inset 0 -1px 0 #3a4048;
  background-image:
    linear-gradient(#2e333a, #2e333a), linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a), linear-gradient(#2e333a, #2e333a),
    linear-gradient(#7a848e, #7a848e), linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e), linear-gradient(#7a848e, #7a848e),
    linear-gradient(#d4d6e0, #d4d6e0), linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0), linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#9aa3ae, #6f7882 42%, #4a525c);
  background-size: 4px 4px, 4px 4px, 4px 4px, 4px 4px, 3px 3px, 3px 3px, 3px 3px, 3px 3px, 2px 2px, 2px 2px, 2px 2px, 2px 2px, auto;
  background-position:
    3px 2px, calc(100% - 3px) 2px, 3px calc(100% - 2px), calc(100% - 3px) calc(100% - 2px),
    3.5px 2.5px, calc(100% - 3.5px) 2.5px, 3.5px calc(100% - 2.5px), calc(100% - 3.5px) calc(100% - 2.5px),
    4px 3px, calc(100% - 4px) 3px, 4px calc(100% - 3px), calc(100% - 4px) calc(100% - 3px), 0 0;
  background-repeat: no-repeat;
  border-radius: 0;
}
.incubator-bay__head .incubator-bay__name,
.incubator-bay__head .incubator-type__name {
  margin: 0;
  width: 100%;
  font: 700 1.15rem/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  color: #eef2f6;
  text-align: center;
  text-shadow:
    0 1px 0 #1a1e24, 1px 0 0 #1a1e24, -1px 0 0 #1a1e24, 0 -1px 0 #1a1e24, 1px 1px 0 #1a1e24;
}
/* Rarity rail under the nameplate (demo .rar). */
.incubator-bay__rar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.5rem;
  box-sizing: border-box;
  background: #14100c;
  border-bottom: 2px solid #000;
}
.incubator-bay__rar i {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rar, #cdb47c));
  position: relative;
  opacity: 0.8;
}
.incubator-bay__rar i:last-child {
  background: linear-gradient(270deg, transparent, var(--rar, #cdb47c));
}
.incubator-bay__rar i::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 6px;
  height: 6px;
  background: var(--rar, #cdb47c);
  transform: rotate(45deg);
}
.incubator-bay__rar i:first-child::after { right: -1px; }
.incubator-bay__rar i:last-child::after { left: -1px; }
.incubator-bay__rar > span {
  flex: 0 0 auto;
  font: 700 0.78rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.14em;
  color: var(--rar, #cdb47c);
  text-shadow: 0 1px 0 #000;
  text-transform: uppercase;
}
.incubator-bay__display {
  position: relative;
  display: grid;
  place-items: stretch;
  align-self: start;
  /* Full column width · left under split beam, top/right meet outer rim. */
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-image: none;
  box-shadow: none;
  /* Match the equipped column's dotted slate under the wood beams. */
  background: var(--slate-window);
  image-rendering: pixelated;
}
/* Overlay · Shift / Age + type mark under corner affinity chips. */
.incubator-bay__scene-chrome {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.incubator-bay__rarity-row {
  display: none;
}
.incubator-bay__facts {
  position: absolute;
  top: auto;
  bottom: 0.45rem;
  left: 0.45rem;
  right: 0.4rem;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.4rem;
}
.incubator-bay__facts--mark-only {
  justify-content: flex-end;
}
/* Shift + Age under FP · one row. */
.incubator-bay__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.35rem 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.2rem 0.35rem 0.1rem 0.55rem;
  box-sizing: border-box;
  flex: 0 0 auto;
  background: color-mix(in srgb, #0c1218 72%, transparent);
  border-top: 1px solid color-mix(in srgb, #cdb47c 35%, transparent);
}
.incubator-bay__meta .incubator-bay__fact {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.2rem 0.15rem;
  text-align: left;
}
.incubator-bay__meta .incubator-bay__fact-label {
  flex: 0 0 auto;
  color: #f6dc8e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}
.incubator-bay__meta .incubator-bay__shift-timer,
.incubator-bay__meta .incubator-bay__age-badge {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}
@media (max-width: 45rem) {
  .incubator-bay__meta .incubator-bay__fact {
    flex: 1 1 0;
  }
}
.incubator-bay__fact {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}
.incubator-bay__fact-label {
  flex: 0 0 auto;
  color: #f6dc8e;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
}
.incubator-bay__shift-timer {
  position: absolute;
  top: calc(0.55rem + 8px);
  left: 0.45rem;
  z-index: 5;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow:
    0 0 1px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000;
}
.incubator-bay__age-badge {
  position: absolute;
  top: calc(0.55rem + 8px + 1.9rem);
  right: 0.45rem;
  left: auto;
  bottom: auto;
  z-index: 5;
  margin: 0;
  padding: 0.12rem 0.35rem;
  border: 1px solid rgb(0 0 0 / 55%);
  border-radius: 0.2rem;
  background: rgb(8 6 4 / 55%);
  color: #f4ecd8;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 1px 0 #000;
}
.incubator-bay__rarity-badge {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  z-index: 5;
  pointer-events: none;
}
.item-kind.item-kind--rarity.shop-rarity--common {
  --item-kind-bg: color-mix(in srgb, var(--rarity-common) 72%, #1a1008);
  --item-kind-border: var(--rarity-common-border);
  --item-kind-ink: var(--rarity-common-ink);
}
.item-kind.item-kind--rarity.shop-rarity--uncommon {
  --item-kind-bg: color-mix(in srgb, var(--rarity-uncommon) 72%, #1a1008);
  --item-kind-border: var(--rarity-uncommon-border);
  --item-kind-ink: var(--rarity-uncommon-ink);
}
.item-kind.item-kind--rarity.shop-rarity--rare {
  --item-kind-bg: color-mix(in srgb, var(--rarity-rare) 72%, #1a1008);
  --item-kind-border: var(--rarity-rare-border);
  --item-kind-ink: var(--rarity-rare-ink);
}
.item-kind.item-kind--rarity.shop-rarity--epic {
  --item-kind-bg: color-mix(in srgb, var(--rarity-epic) 72%, #1a1008);
  --item-kind-border: var(--rarity-epic-border);
  --item-kind-ink: var(--rarity-epic-ink);
}
.item-kind.item-kind--rarity.shop-rarity--legendary {
  --item-kind-bg: color-mix(in srgb, var(--rarity-legendary) 72%, #1a1008);
  --item-kind-border: var(--rarity-legendary-border);
  --item-kind-ink: var(--rarity-legendary-ink);
}
.item-kind.item-kind--rarity.shop-rarity--event {
  --item-kind-bg: color-mix(in srgb, var(--rarity-event) 72%, #1a1008);
  --item-kind-border: var(--rarity-event-border);
  --item-kind-ink: var(--rarity-event-ink);
}
/* Scene fills the square flush · wood-beam-v overlays the left edge. */
.incubator-bay__active .incubator-bay__display > .visual-asset {
  transform: none;
  transform-origin: 50% 100%;
}
/* Fancy horizontal timber under the equipped portrait (above name / stars). */
.incubator-bay__shelf.wood-beam-h {
  position: relative;
  z-index: 3;
  align-self: stretch;
  width: 100%;
  height: var(--frame-rim);
  max-height: var(--frame-rim);
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  flex: 0 0 auto;
}
.incubator-bay__body {
  display: grid;
  gap: var(--space-2);
  justify-items: stretch;
  align-content: start;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.08rem 0.4rem;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}
/* Tall viewports · center name + affinities in the leftover rail. */
@media (min-height: 52rem) {
  .incubator-bay__active .incubator-bay__body {
    align-content: center;
    justify-items: center;
  }
  .incubator-bay__active .incubator-bay__name-row,
  .incubator-bay__active .incubator-bay__affinities {
    width: 100%;
  }
}
.incubator-bay__name-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin: 0.15rem 0 0;
  padding: 0 0.15rem;
  width: 100%;
}
.incubator-bay__name-row .incubator-bay__name {
  margin: 0;
  width: 100%;
  text-align: center;
}
.incubator-bay__name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink-strong);
  text-align: center;
}
.incubator-bay__name-row .chiken-shift-row,
.incubator-head .chiken-shift-row {
  justify-content: center;
}
.incubator-bay__equipped-tag {
  position: absolute;
  top: calc(0.55rem + 8px);
  right: 0.45rem;
  z-index: 5;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  padding: 0.28rem 0.7rem 0.28rem 0.45rem;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, #4a2e1a, #2e1b0e);
  box-shadow:
    inset 0 0 0 1px #e0b050,
    inset 0 0 0 2px #7a5522,
    inset 0 0 0 3px #150b05,
    0 2px 0 rgba(0, 0, 0, 0.45);
  color: #f6dc8e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000;
  pointer-events: none;
}
.incubator-bay__equipped-tag::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 180, 0.35), transparent);
  animation: incubator-equipped-sheen 4.5s ease-in-out infinite;
}
@keyframes incubator-equipped-sheen {
  0%, 70% { left: -40%; }
  100% { left: 130%; }
}
.incubator-bay__equipped-glyph {
  position: relative;
  left: auto;
  top: auto;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}
/* Type mark beside Shift + Age · glyph only, no gold plate. */
.incubator-bay__facts .incubator-bay__type-mark.typing-badge {
  position: relative;
  left: auto;
  top: auto;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
}
.incubator-bay__facts .incubator-bay__type-mark .affinity-chip__glyph {
  width: 1.7rem;
  height: 1.7rem;
  filter:
    drop-shadow(0 0 0.5px #150b05)
    drop-shadow(0 1px 0 #150b05);
}
.incubator-bay__equipped-glyph .affinity-chip__glyph {
  width: 0.68rem;
  height: 0.68rem;
}
@media (prefers-reduced-motion: reduce) {
  .incubator-bay__equipped-tag::after { animation: none; }
}
.incubator-hatch {
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
  margin-top: 0.85rem;
}
.incubator-hatch__plaque {
  position: relative;
  z-index: 1;
  margin-bottom: -8px;
  padding: 0.42rem 1.65rem;
  font-family: Literata, Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6e6c0;
  text-shadow: 0 2px 0 #2a1208;
  border-radius: 0;
  /* Square wood plaque · gold bolt rim on all 4 corners. */
  background:
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 5px, #7a5522 5px 6px, #150b05 6px 7px) 2px 2px / 7px 7px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 5px, #7a5522 5px 6px, #150b05 6px 7px) calc(100% - 9px) 2px / 7px 7px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 5px, #7a5522 5px 6px, #150b05 6px 7px) 2px calc(100% - 9px) / 7px 7px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 5px, #7a5522 5px 6px, #150b05 6px 7px) calc(100% - 9px) calc(100% - 9px) / 7px 7px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, #fff 12%, transparent), transparent 45%),
    linear-gradient(180deg, #241810, #120b07);
  clip-path: none;
  box-shadow:
    inset 0 0 0 1px #150b05,
    inset 0 0 0 3px #e0b050,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 6px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 3px 0 rgba(0, 0, 0, 0.55);
}
.incubator-hatch__frame {
  position: relative;
  width: min(100%, 15.75rem);
  padding: 0.85rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 8%, transparent), transparent 40%),
    var(--wood-plank-dark);
  box-shadow:
    inset 0 0 0 1px #cdb47c,
    inset 0 0 0 2px #b98448,
    inset 0 0 0 3px #94653a,
    inset 0 0 0 5px #6c4728,
    inset 0 0 0 7px #4a2e1a,
    inset 0 0 0 8px #241409,
    0 6px 12px rgba(0, 0, 0, 0.55);
}
.incubator-hatch__frame .btn {
  width: 100%;
  min-height: 2.65rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.incubator-bay__active .incubator-bay__display > .visual-asset {
  margin: 0;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}
/* Portrait canvases only · never size wood-beam__fx with these rules. */
.incubator-bay__active .incubator-bay__display canvas.chikling-portrait {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  margin: 0 !important;
  image-rendering: pixelated;
  object-fit: fill;
}
.incubator-bay__active .incubator-bay__display .visual-asset--chickling {
  display: grid;
  place-items: stretch center;
  width: 100%;
  height: 100%;
}
.incubator-bay__active .star-counts {
  justify-content: center;
}
.incubator-bay__phase {
  display: flex;
  justify-content: center;
  width: 100%;
}
.incubator-bay__phase .growth-badge {
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  gap: 0.45rem;
  box-shadow: none;
}
.incubator-bay__affinities {
  width: 100%;
  display: flex;
  justify-content: stretch;
}
/* Affinity crystal layout lives on .activity-card__aff-hill--crystal (modal.css). */
.incubator-bay__affinities .activity-card__aff-hill--crystal {
  width: 100%;
  max-width: 100%;
}
.incubator-bay__affinities .activity-card__aff-half--empty {
  min-height: 4.5rem;
  justify-content: center;
}
.incubator-bay__affinities .activity-card__aff-half--empty em {
  font-size: 1.1rem;
  opacity: 0.55;
}
.incubator-bay__affinities.steward__affinities--locked .activity-card__aff-hill {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.affinity-tip {
  position: relative;
  display: block;
  width: 100%;
  overflow: visible;
}
.affinity-tip__pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  /* Above shop EGG/hatch badges and card neighbors (tip-place also portals). */
  z-index: var(--z-tip, 5000);
  width: max-content;
  min-width: 9.5rem;
  max-width: min(16rem, 90vw);
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  border: 1px solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: visible;
  box-sizing: border-box;
  transform: translateX(-50%) translateY(0.2rem);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.affinity-tip.tip--below .affinity-tip__pop::after,
.affinity-tip.tip--above .affinity-tip__pop::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 0.35rem solid transparent;
}
.affinity-tip.tip--above .affinity-tip__pop::after {
  top: 100%;
  border-top-color: var(--line-alt, var(--line));
}
.affinity-tip.tip--below .affinity-tip__pop::after {
  bottom: 100%;
  border-bottom-color: var(--line-alt, var(--line));
}
.affinity-tip.tip--open .affinity-tip__pop,
.affinity-tip:focus-within .affinity-tip__pop,
.affinity-tip__pop.tip-bubble--live {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.affinity-tip__meta {
  margin: 0 0 0.3rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.25;
  white-space: nowrap;
}


/* Incubator egg tip · roster-like nameplate stacked over date-stamp hatch. */
.affinity-tip__head {
  display: grid;
  gap: 0.35rem;
  justify-items: stretch;
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-soft);
}
.affinity-tip__nameplate {
  position: relative;
  margin: 0;
  min-height: 1.55rem;
  padding: 0.26rem 0.55rem 0.3rem;
  border-bottom: 2px solid #2a2e34;
  box-shadow:
    inset 0 1px 0 #b8c0c8,
    inset 0 -1px 0 #3a4048;
  background-image:
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#9aa3ae, #6f7882 42%, #4a525c);
  background-size:
    4px 4px, 4px 4px, 4px 4px, 4px 4px,
    3px 3px, 3px 3px, 3px 3px, 3px 3px,
    2px 2px, 2px 2px, 2px 2px, 2px 2px,
    auto;
  background-position:
    3px 2px, calc(100% - 3px) 2px, 3px calc(100% - 2px), calc(100% - 3px) calc(100% - 2px),
    3.5px 2.5px, calc(100% - 3.5px) 2.5px, 3.5px calc(100% - 2.5px), calc(100% - 3.5px) calc(100% - 2.5px),
    4px 3px, calc(100% - 4px) 3px, 4px calc(100% - 3px), calc(100% - 4px) calc(100% - 3px),
    0 0;
  background-repeat: no-repeat;
  text-align: center;
}
.affinity-tip__name {
  display: block;
  color: #eef2f6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-shadow:
    0 1px 0 #1a1e24,
    1px 0 0 #1a1e24,
    -1px 0 0 #1a1e24,
    0 -1px 0 #1a1e24,
    1px 1px 0 #1a1e24;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.affinity-tip__hatch.date-stamp {
  justify-self: center;
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem 0.22rem 0.5rem;
}
.affinity-tip__held {
  justify-self: center;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.affinity-tip__stat {
  justify-self: center;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffe3a8;
}
.affinity-tip__head .growth-badge {
  justify-self: center;
}
.affinity-tip__fp {
  justify-self: center;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffe3a8;
  letter-spacing: 0.02em;
  text-align: center;
}
.affinity-tip__fp-bar {
  width: 100%;
  margin: 0 0 0.45rem;
}
.affinity-tip__fp-bar .fp-meter {
  width: 100%;
  height: 1.15rem;
  border-radius: 0.15rem;
}
.affinity-tip__fp-bar .fp-meter__text {
  font-size: 0.55rem;
}
/* Shop / admin egg tips sit above dense card grids. */
.shop-card .affinity-tip,
.admin-inv-card .affinity-tip {
  width: 100%;
}
.admin-inv-card__top .affinity-tip {
  flex: 1 1 auto;
  min-width: 0;
}
.affinity-tip__orbs {
  width: 100%;
  max-width: none;
  overflow: visible;
}
.affinity-tip__orbs .activity-card__aff-hill--crystal {
  justify-content: center;
}
.affinity-tip__orbs .activity-card__aff-half {
  --aff-orb-w: 4.6rem;
}
.affinity-tip__orbs .activity-card__aff-stage,
.affinity-tip__orbs .activity-card__aff-gem.reward-orb {
  width: 2.35rem;
  height: 2.35rem;
}
.affinity-tip__orbs .activity-card__aff-gem .reward-orb__icon,
.affinity-tip__orbs .activity-card__aff-gem .icon,
.affinity-tip__orbs .activity-card__aff-gem svg {
  width: 1.15rem;
  height: 1.15rem;
}
.affinity-tip__orbs .activity-card__aff-skill {
  min-height: 1.85rem;
  padding: 0.16rem 0.22rem 0.14rem;
}
.affinity-tip__orbs .activity-card__aff-skill > span:not(.activity-card__aff-mult) {
  font-size: 0.62rem;
}
.affinity-tip__orbs .activity-card__aff-mult {
  font-size: 0.7rem;
}
.egg-lineup__item .affinity-tip {
  height: 100%;
}
.egg-lineup__item .affinity-tip__pop {
  min-width: 8.5rem;
}
.incubator-hero__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: center;
}
.incubator-hero__portrait {
  flex: 0 0 auto;
  margin-inline: auto;
}
.incubator-hero__portrait .visual-asset {
  margin: 0;
}





/* Incubator hatch scene (ported from logs/.assets/Demos/Incubator scenes.html) */
.incubator-scene {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}
.incubator-scene__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  shape-rendering: crispEdges;
  transition: filter 0.45s ease;
}
.hatch-claim {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  text-align: center;
}
/* Shrink scene + v2 wood on all sides; FP bar full-width under the portrait. */
.hatch-claim__frame.pixel-frame {
  width: min(100%, 10.25rem);
  /* Set: flush (frame-set registry). */
  border: 0;
  border-radius: 0;
  background: #5c3a20;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  overflow: hidden;
  box-sizing: border-box;
}
.hatch-claim__portrait {
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  flex: 0 0 auto;
}
.hatch-claim__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--ink-strong);
}
.hatch-claim__stars {
  margin: 0;
  justify-content: center;
}
.hatch-claim__phase {
  margin: 0;
}
.hatch-claim__affinities {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 16rem;
}
.hatch-claim__affinities .affinity-chips {
  justify-content: center;
  width: 100%;
}
.hatch-claim__actions {
  margin: 0.25rem 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(2.5rem + var(--btn-depth-rest, 7px));
}
.hatch-claim__actions .btn {
  margin-bottom: var(--btn-depth-rest, 7px);
}
.place-egg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  /* Slate body · wood stays on modal-wood-head / panel chrome. */
  background: var(--panel-strong);
  color: var(--ink);
  min-height: 16rem;
  padding: var(--space-4) var(--space-4) var(--space-3);
  box-sizing: border-box;
}
.place-egg__preview {
  margin: 0;
}
.place-egg__preview .egg-token {
  width: 4.5rem;
  height: auto;
}
.place-egg__preview canvas {
  width: 100% !important;
  height: auto !important;
  image-rendering: pixelated;
}
.place-egg__name {
  margin: 0;
  font-weight: 700;
  color: var(--ink-strong);
}
.place-egg .date-stamp {
  margin: 0.1rem 0 0;
}
.place-egg__held {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.place-egg__affinities {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 16rem;
  margin: 0.15rem 0 0;
}
.place-egg__affinities .affinity-chips {
  justify-content: center;
  width: 100%;
}
.place-egg__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: auto;
  padding: var(--space-3) 0;
}
.place-egg__actions .btn,
.place-egg__actions button.btn {
  margin-bottom: 0.25rem;
}
dialog.modal.modal--place-egg .btn--cancel,
dialog.modal.modal--place-egg button.btn.btn--cancel {
  color: #000;
}
dialog.modal.modal--place-egg .btn--cancel:hover,
dialog.modal.modal--place-egg button.btn.btn--cancel:hover,
dialog.modal.modal--place-egg .btn--cancel:active,
dialog.modal.modal--place-egg button.btn.btn--cancel:active {
  color: #000;
}
dialog.modal.modal--place-egg {
  width: min(28.25rem, calc(100vw - 2rem));
  max-width: 28.25rem;
}
dialog.modal.modal--place-egg .modal__panel.pixel-frame,
dialog.modal.modal--hatch-claim .modal__panel.pixel-frame {
  background: var(--wood-plank);
  color: #e8dcc4;
}
dialog.modal.modal--place-egg .modal__panel {
  max-width: 28.25rem;
  overflow: hidden;
}
dialog.modal.modal--place-egg .modal__body.place-egg,
dialog.modal.modal--hatch-claim .modal__body.hatch-claim {
  background: var(--panel-strong);
}
dialog.modal.modal--hatch-claim {
  max-width: min(24rem, calc(100vw - 2rem));
}
.inc-glow { animation: inc-flicker 3.4s steps(1) infinite; }
@keyframes inc-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .8; } 70% { opacity: .93; } }
.inc-e { transform-box: fill-box; transform-origin: 50% 100%; }
.inc-wob { animation: inc-wobble 1.6s steps(1) infinite; }
.inc-fw { animation: inc-wobble .5s steps(1) infinite; }
@keyframes inc-wobble { 0% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 50% { transform: rotate(0); } 75% { transform: rotate(4deg); } }
.inc-bnc { animation: inc-bounce 1s ease-in-out infinite; }
@keyframes inc-bounce {
  0%, 100% { transform: scale(1.08, .9); }
  30% { transform: translateY(-8px) scale(.97, 1.04); }
  55% { transform: translateY(-8px) scale(1); }
  80% { transform: translateY(0) scale(1.06, .93); }
}
.inc-hl { animation: inc-pulse 1.6s steps(1) infinite; }
.inc-fp { animation-duration: .5s; }
@keyframes inc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.inc-chg { animation: inc-charge .5s steps(1) infinite; }
@keyframes inc-charge { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.4); } }
.inc-spin { transform-origin: 80px 146px; animation: inc-rotate 10s steps(48) infinite; }
@keyframes inc-rotate { to { transform: rotate(360deg); } }
.inc-tw { transform-box: fill-box; transform-origin: center; animation: inc-twinkle 1.2s steps(1) infinite; }
@keyframes inc-twinkle { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .4; } }
.inc-fall { animation: inc-drift 4.5s linear infinite; opacity: 0; }
@keyframes inc-drift {
  0% { transform: translateY(-4px); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .inc-e, .inc-hl, .inc-chg, .inc-spin, .inc-tw, .inc-fall, .inc-glow,
  .incubator-bay__shell-anim.inc-wob,
  .incubator-bay__shell-anim.inc-fw,
  .incubator-bay__shell-anim.inc-bnc,
  .incubator-bay__shell-anim.inc-chg { animation: none !important; }
  .inc-fall { opacity: 1; }
}
/* Quality: Low · still frames keep stage pose (cracks / glow), no motion. */
html:not([data-full-quality="1"]) .inc-e,
html:not([data-full-quality="1"]) .inc-hl,
html:not([data-full-quality="1"]) .inc-chg,
html:not([data-full-quality="1"]) .inc-spin,
html:not([data-full-quality="1"]) .inc-tw,
html:not([data-full-quality="1"]) .inc-fall,
html:not([data-full-quality="1"]) .inc-glow,
html:not([data-full-quality="1"]) .inc-wob,
html:not([data-full-quality="1"]) .inc-fw,
html:not([data-full-quality="1"]) .inc-bnc,
html:not([data-full-quality="1"]) .incubator-bay__shell-anim.inc-wob,
html:not([data-full-quality="1"]) .incubator-bay__shell-anim.inc-fw,
html:not([data-full-quality="1"]) .incubator-bay__shell-anim.inc-bnc,
html:not([data-full-quality="1"]) .incubator-bay__shell-anim.inc-chg {
  animation: none !important;
}
html:not([data-full-quality="1"]) .inc-fall { opacity: 1; }
html:not([data-full-quality="1"]) .moon-bar--nebula .moon-fill {
  animation: none !important;
  filter: none !important;
}

.moon-bar {
  position: relative;
  height: 31px;
  margin: var(--space-3) auto 0;
  max-width: 28rem;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid #393a47;
  background: #151722;
  box-shadow: inset 0 2px 5px rgb(0 0 0 / 65%);
}
.moon-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  background: linear-gradient(90deg, #43456b, #7278ad, #9ea5df);
}
.moon-fill::after {
  content: "·  ✦  ·  ✧  ·";
  position: absolute;
  inset: 6px 0 0 8px;
  font-size: 9px;
  letter-spacing: 6px;
  color: rgb(245 247 255 / 72%);
}
.moon-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgb(255 255 255 / 18%) 48%, transparent 70%);
}
/* Nebula Pulse EP meter (experience_bars.html · purple / blue / pink). */
.moon-bar--nebula,
.moon-bar--cloud {
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(88, 28, 135, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    #080612;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(129, 140, 248, 0.08);
}
.moon-bar--nebula .moon-fill,
.moon-bar--cloud .moon-fill {
  background: linear-gradient(90deg, #1e1b4b, #312e81, #4f46e5, #a78bfa, #f0abfc, #818cf8, #1e1b4b);
  background-size: 320% 100%;
  filter: none;
  animation: nebula-flow 5s ease-in-out infinite, nebula-brightness 3.2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.45), inset 0 -10px 24px rgba(0, 0, 0, 0.45);
}
.moon-bar--nebula .moon-fill::after,
.moon-bar--cloud .moon-fill::after {
  content: "";
  inset: 0;
  font-size: 0;
  letter-spacing: 0;
  color: transparent;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    radial-gradient(rgba(244, 114, 182, 0.55) 1px, transparent 1px);
  background-size: 38px 38px, 62px 62px;
  background-position: 0 0, 19px 31px;
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: nebula-stars 8s linear infinite;
}
.moon-bar--nebula .moon-sheen,
.moon-bar--cloud .moon-sheen {
  width: 3px;
  left: auto;
  right: 0;
  background: linear-gradient(180deg, transparent, #e9d5ff, #f0abfc, #c4b5fd, transparent);
  box-shadow: 0 0 20px #c4b5fd, 0 0 40px rgba(167, 139, 250, 0.45);
  mix-blend-mode: normal;
  animation: nebula-edge-pulse 3.2s ease-in-out infinite;
}
@keyframes nebula-flow {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}
@keyframes nebula-brightness {
  0%, 100% { filter: brightness(0.55) saturate(1.2); }
  35% { filter: brightness(1.05) saturate(1.35); }
  65% { filter: brightness(1.45) saturate(1.5); }
}
@keyframes nebula-stars {
  0% { opacity: 0.25; }
  50% { opacity: 0.5; }
  100% { opacity: 0.25; }
}
@keyframes nebula-edge-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .moon-bar--nebula .moon-fill,
  .moon-bar--cloud .moon-fill,
  .moon-bar--nebula .moon-fill::after,
  .moon-bar--cloud .moon-fill::after,
  .moon-bar--nebula .moon-sheen,
  .moon-bar--cloud .moon-sheen {
    animation: none;
    filter: none;
  }
}
.incubator-hero__stats {
  flex: 1 1 16rem;
  display: grid;
  gap: var(--space-3);
}
.incubator-pick { margin: 0; }
.incubator-pick .incubator-type,
.incubator-pick > .affinity-tip > .incubator-type {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}
.egg-lineup__pick:not(:disabled),
.egg-lineup__pick:not(:disabled) * {
  cursor: pointer;
}
.incubator-type {
  text-align: center;
  padding: 0;
  border-width: var(--border-width);
  border-style: solid;
  border-color: var(--line-alt, var(--line));
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.incubator-type--open {
  border-color: var(--line-alt, var(--line));
}
.incubator-type--equipped {
  border-color: var(--gold);
}
.incubator-type--locked {
  border-style: dotted;
  border-color: rgb(226 59 59 / 72%);
  background: color-mix(in srgb, rgb(180 32 32) 10%, var(--panel));
}
.incubator-type__name {
  margin: 0;
  flex: 1 1 auto;
  text-align: center;
  font-size: 1.32rem;
  line-height: 1.15;
  white-space: nowrap;
}
.incubator-head, .incubator-foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.2rem 0.4rem;
  background: var(--bg-elevated);
  border-radius: 0;
}
.incubator-head {
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  border-bottom: 0;
}
.incubator-head .shop-card__rarity {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1;
}
.incubator-type__rarity.shop-card__hatch {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 4;
  margin: 0;
  max-width: calc(100% - 0.5rem);
  padding: 0.12rem 0.32rem;
  border-width: 1px;
  border-style: solid;
  border-radius: 0.2rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 1px 3px rgb(0 0 0 / 35%);
}
.incubator-foot {
  justify-content: center;
  border-top: 0;
  min-height: 2.2rem;
}
.incubator-type--locked .incubator-head,
.incubator-type--locked .incubator-foot {
  border: 0;
}
/* Red veil is full-card (::before on .incubator-type--locked in roster-house). */
.incubator-type--locked .incubator-head::before,
.incubator-type--locked .incubator-foot::before {
  content: none;
  display: none;
}
.incubator-foot__lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 72%);
  pointer-events: none;
}
.incubator-foot__lock svg { display: block; }
.incubator-type__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.4rem;
  gap: var(--space-1);
  align-items: stretch;
}
.incubator-type__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.incubator-type__col--left {
  align-items: flex-start;
  justify-content: space-between;
  align-self: stretch;
  text-align: left;
  gap: var(--space-2);
}
.incubator-type__col--mid {
  align-items: center;
  justify-content: center;
  align-self: center;
}
.incubator-type__col--right {
  align-items: flex-end;
  justify-content: flex-start;
  align-self: stretch;
  text-align: right;
  gap: var(--space-1);
}
/* Scene column: square portrait + FP rail (always present · synced roster height). */
.incubator-type__scene {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  justify-content: flex-start;
}
.incubator-type__portrait {
  display: block;
  /* Do not flex-grow · growing past 1:1 left a cream band above the FP rail. */
  flex: 0 0 auto;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: linear-gradient(#2a2016, #14100c);
  /* Clip scene to the portrait box - never paints over the card/wood border. */
  overflow: hidden;
  isolation: isolate;
}
.incubator-type__portrait[data-roster="ghost"],
.incubator-type__portrait[data-roster="space"] {
  background: linear-gradient(#2c1b66, #120a2e);
}
.incubator-type__portrait[data-roster="barnyard"],
.incubator-type__portrait[data-roster="basic_down"] {
  /* Match opaque yard sky so any sub-pixel edge does not show a dark rim. */
  background: #8aabd0;
}
.incubator-type__portrait[data-roster="grass"] {
  /* Peckleaf: bright morning sky (scene paints sun + trees on top). */
  background: linear-gradient(#8ec8f8 0%, #c8e4ff 45%, #ffe8b0 100%);
}
.incubator-type__portrait[data-roster="ice"],
.incubator-type__portrait[data-roster="aqua"] {
  background: linear-gradient(#16306a, #0a1838);
}
.incubator-type__portrait[data-roster="electric"] {
  /* Voltarc: stormy night base under blue/purple clouds. */
  background: linear-gradient(#2a1858 0%, #121028 55%, #080612 100%);
}
.incubator-type__portrait[data-roster="light"] {
  background: linear-gradient(#2a2208, #100c04);
}
.incubator-type__portrait[data-roster="mega"] {
  /* Bulkhen: night city under a short skyline. */
  background: linear-gradient(#0c1830 0%, #081020 60%, #040810 100%);
}
.incubator-type__portrait[data-roster="boxing"] {
  /* Haymaker: warm dojo interior. */
  background: linear-gradient(#4a3020 0%, #2a1810 55%, #140c08 100%);
}
.incubator-type__portrait[data-roster="rock"] {
  background: linear-gradient(#2a221a, #14100c);
}
.incubator-type__portrait[data-roster="fire"],
.incubator-type__portrait[data-roster="dragon"] {
  background: linear-gradient(#3a140c, #140804);
}
.incubator-type__portrait[data-roster="fairy"],
.incubator-type__portrait[data-roster="rainbow"] {
  background: linear-gradient(#2a1438, #120818);
}
.incubator-type__portrait::before {
  /* Removed the soft radial inset - it read as a dark ghost band above the hay. */
  content: none;
  display: none;
}
/* Shared portrait scene fill: canvas stretches to the portrait host (roster,
   equipped sidebar, hatch claim, tips). Parent must overflow:hidden. */
.incubator-type__portrait .visual-asset {
  margin: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: grid;
  place-items: stretch center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.incubator-type__portrait canvas {
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  object-fit: fill;
}
/* Affinity socket canvases live in the portrait · do not stretch them to the scene. */
.incubator-type__portrait .aff-chip canvas.aff-chip__frame {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
}
.incubator-type__portrait .aff-chip canvas.acc {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: none !important;
}
.incubator-type__portrait .aff-chip .aff-chip__slot canvas {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}
.roster-hay {
  position: absolute;
  inset: 0;
  /* Overlay kept for mount order; floor straw paints mid-scene under the hen. */
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}
.roster-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}
/* Embers under the hen canvas (z:1 visual-asset). */
.roster-fx--back {
  z-index: 0;
}
/* Embers over the hen (full strength). */
.roster-fx--front {
  z-index: 2;
}
.incubator-type__portrait .visual-asset--chickling {
  display: grid;
  place-items: stretch center;
  width: 100%;
  height: 100%;
}
.incubator-type__portrait .visual-asset--chickling canvas {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  object-fit: fill;
}
.incubator-type__portrait .visual-asset:not(.visual-asset--chickling) canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill;
}
.star-counts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 2px;
  font-family: Arial, Helvetica, sans-serif;
}
.star-pip {
  position: relative;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  color: var(--star, #ffe98a);
}
.star-pip__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0.5px 0 #0b0b0f) drop-shadow(0 -0.5px 0 #0b0b0f) drop-shadow(0.5px 0 0 #0b0b0f) drop-shadow(-0.5px 0 0 #0b0b0f);
}
.star-pip__n {
  fill: #fff;
  stroke: #0b0b0f;
  stroke-width: 2.4px;
  paint-order: stroke fill;
  font-size: 7.2px;
  font-weight: 800;
  font-family: Arial, Helvetica, sans-serif;
}
.star-pip__count {
  position: absolute;
  top: calc(-0.12rem + 4px);
  right: calc(-0.18rem + 7px);
  min-width: 0.72rem;
  height: 0.72rem;
  padding: 0 0.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  line-height: 0.72rem;
  text-align: center;
  box-shadow: 0 0 0 1px #0b0b0f;
}
.incubator-type__pct {
  font-size: 0.95rem;
}
.incubator-type__pct {
  margin-top: auto;
}
.incubator-type__col--right .btn {
  width: 100%;
  min-width: 0;
  padding-inline: var(--space-2);
  font-size: var(--text-xs);
}

.incubator-bay__display::after {
  content: none;
  display: none;
}

@keyframes chiken-house-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .incubator-bay__vine { animation: none; }
}
html:not([data-full-quality="1"]) .incubator-bay__vine,
html:not([data-full-quality="1"]) .modal__vine,
html:not([data-full-quality="1"]) .modal__vine-leaf,
html:not([data-full-quality="1"]) .modal__vine-flower {
  animation: none !important;
}
/* Compact hatch + clear hanging Incubator sign under ~1200px. */
@media (max-width: 1200px) {
  .incubator-bay > .set1-sign-band--sip .set1-plaque-wrap {
    top: 1.2rem;
  }
  .incubator-bay__main {
    padding-top: calc(var(--space-3) + var(--frame-rim) + 2.1rem);
  }
  .incubator-bay__scene {
    width: 68%;
    max-width: 15.75rem;
  }
}
@media (max-width: 56rem) {
  .incubator-bay {
    grid-template-columns: 1fr;
  }
  .incubator-bay__main {
    /* Stacked: still meet outer rim on top/sides; keep gap before equipped. */
    margin: var(--frame-bleed) var(--frame-bleed) 0 var(--frame-bleed);
    border-right: 0;
    border-bottom: 0;
    padding-top: calc(var(--space-3) + var(--frame-rim) + 2.35rem);
  }
  .incubator-bay__active {
    margin: 0 var(--frame-bleed) var(--frame-bleed) var(--frame-bleed);
    padding: 14px 6px calc(var(--space-2) + 8px);
  }
  .incubator-bay__scene {
    width: 62%;
    max-width: 14.25rem;
  }
  .incubator-bay__split.wood-beam-v {
    /* Horizontal wood seam when equipped stacks under the main bay. */
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto !important;
    height: 8px !important;
    background: linear-gradient(180deg, #2a1604 0, #fff0b0 1px, #f0c862 22%, #b57d22 50%, #7a4c12 62%, #e8b752 82%, #3a2006 100%) !important;
    box-shadow: none !important;
  }
}
@media (max-width: 45rem) {
  .incubator-bay > .set1-sign-band--sip .set1-plaque-wrap {
    top: 0.2rem;
    left: 0;
  }
  .incubator-bay__main {
    /* Extra clear so egg buttons sit under the Sip plaque. */
    padding-top: calc(var(--space-3) + var(--frame-rim) + 3.15rem);
  }
  .incubator-bay__scene {
    width: 76%;
    max-width: 16.25rem;
    margin-left: 22%;
  }
  .egg-lineup__pick .typing-badge .affinity-chip__glyph,
  .typing-badge.typing-badge--bare .affinity-chip__glyph {
    width: 0.92rem;
    height: 0.92rem;
  }
}


.incubator-bay .egg-panel-toggle { display: none; }
@media (max-width: 45rem) {
  .incubator-bay { grid-template-columns: minmax(0, 1fr); }
  .incubator-bay__main {
    grid-template-columns: minmax(0, 1fr);
    margin-right: var(--frame-bleed);
    justify-items: center;
  }
  .incubator-bay__stage { width: min(100%, 24rem); }
  .incubator-bay__scene {
    width: min(100%, 22rem);
    max-width: none;
    margin: 0.35rem auto 0;
    transform: none;
  }
  .incubator-bay .egg-panel-toggle {
    display: inline-flex;
    position: absolute;
    z-index: 6;
    top: 0.45rem;
    right: 0.45rem;
  }
  .incubator-bay .egg-window.pixel-frame { display: none; }
  .incubator-bay.is-eggs-open .egg-window.pixel-frame {
    display: flex;
    position: fixed;
    z-index: calc(var(--z-modal, 400) + 2);
    left: 0.7rem;
    right: 0.7rem;
    top: 50%;
    translate: 0 -50%;
    width: auto;
    height: auto;
    max-height: min(78dvh, 34rem);
    min-height: 0;
    margin: 0;
  }
  .incubator-bay.is-eggs-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal, 400) + 1);
    background: rgb(2 6 16 / 55%);
  }
  /* Equipped column · clear the left beam and close the right gap. */
  .incubator-bay__active {
    width: calc(100% + 22px);
    max-width: none;
    padding-left: calc(var(--frame-rim) + 10px);
    margin-right: calc(var(--frame-bleed) - var(--frame-rim));
  }
}



/* Outer rim comes from shared .pixel-frame (flush to box edge). */
.chiken-house.pixel-frame {
  /* Visible so the sign chick can sit over the wood rim (not under it). */
  margin-top: 10px;
  overflow: visible;
  /* Inner clear for 14px rim + house gutters. */
  padding: 10.4rem 5rem 4.5rem;
  /* Dotted night slate · coop v3 --slate-window. Sky band stays on .chiken-house__sky. */
  background: var(--slate-window);
}
.chiken-house.pixel-frame::after {
  /* Above card faces; tip popovers live in the grid (also above hen). */
  z-index: 7;
}
/* Painted rim canvas · keep above the hanging sign so the plaque hangs from the wood. */
.chiken-house.pixel-frame > .pixel-frame__fx {
  z-index: 7;
}
.chiken-house::before {
  content: none;
  position: absolute;
  inset: var(--frame-rim);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    linear-gradient(#1d110a, #1d110a) 0 0 / 100% 1px no-repeat,
    linear-gradient(#1d110a, #1d110a) 0 12px / 100% 1px no-repeat,
    linear-gradient(#1d110a, #1d110a) 0 24px / 100% 1px no-repeat,
    linear-gradient(#1d110a, #1d110a) 0 36px / 100% 1px no-repeat,
    repeating-linear-gradient(
      180deg,
      transparent 0 36px,
      #1d110a 36px 37px
    );
}

/*
 * Stack (low → high): sky/beam → fx (clouds/vines) → chains → sign → hen → grid → chick.
 * Clouds/header décor must stay under the sign and ropes.
 */
.chiken-house__fx {
  position: absolute;
  /* Bleed past the 14px wood inset so floor hay undercrops the roster sides. */
  left: 2px;
  right: 2px;
  top: var(--frame-rim);
  bottom: 6px;
  z-index: 3;
  width: auto;
  height: auto;
  max-width: calc(100% - 4px);
  max-height: calc(100% - 20px);
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  overflow: hidden;
  border-radius: 0;
}

.chiken-house__sky {
  position: absolute;
  left: var(--frame-rim);
  right: var(--frame-rim);
  top: var(--frame-rim);
  /* Track beam when the header drops another 6px. */
  height: calc(9.6rem + 6px);
  overflow: hidden;
  background: linear-gradient(#0b1430, #223a6e);
  pointer-events: none;
  z-index: 1;
}
/* Flush to the inner face of the 14px wood rim · painted v2 via mountWoodBeam. */
.chiken-house__beam {
  position: absolute;
  left: var(--frame-rim);
  right: var(--frame-rim);
  top: calc(9.55rem + 12px);
  /* height from .wood-beam-h (14px v2) */
  pointer-events: none;
  z-index: 2;
  margin: 0;
  padding: 0;
}
/* Title sign · hanging plaque tokens. */
.chiken-house__sign.carved-plaque {
  --title-sign-gold: #f3d98a;
  --title-sign-gold-mid: #b98a3a;
  position: absolute;
  /* Under the wood rim (z 7) so the plaque hangs from the border, not over it. */
  z-index: 6;
  left: 50%;
  top: calc(var(--frame-rim) + 2.35rem + 10px);
  transform: translateX(-50%);
  min-width: 10.4rem;
  padding: 0.72rem 2.55rem;
  border-width: 3px;
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  letter-spacing: 0.14em;
  text-align: center;
  color: #f6e6b8;
  pointer-events: none;
  align-self: auto;
  box-shadow:
    0 -3px 0 #150b05,
    0 3px 0 #150b05,
    -3px 0 0 #150b05,
    3px 0 0 #150b05,
    0 0 0 2px var(--title-sign-gold),
    0 0 0 4px var(--title-sign-gold-mid),
    0 0 0 5px #150b05,
    inset 3px 3px 0 color-mix(in srgb, #cdb47c 55%, transparent),
    inset -3px -3px 0 #3e2616;
}
.chiken-house__sign.carved-plaque::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 2px, #7a5522 2px 3px, #150b05 3px 4px) 0 0 / 4px 4px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 2px, #7a5522 2px 3px, #150b05 3px 4px) 100% 0 / 4px 4px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 2px, #7a5522 2px 3px, #150b05 3px 4px) 0 100% / 4px 4px no-repeat,
    linear-gradient(180deg, #f3d98a 0 1px, #b98a3a 1px 2px, #7a5522 2px 3px, #150b05 3px 4px) 100% 100% / 4px 4px no-repeat;
}
/* Ropes tuck under the rim and end at the sign. */
.chiken-house__chain {
  position: absolute;
  z-index: 6;
  top: 4px;
  width: 3px;
  height: calc(var(--frame-rim) + 2.35rem + 0.35rem + 10px);
  background: repeating-linear-gradient(180deg, #c5ccd6 0 4px, #6a7078 4px 6px);
  box-shadow: 1px 0 0 #3a3f48;
  pointer-events: none;
}
.chiken-house__chain--l {
  left: calc(50% - 5.2rem + 1.15rem);
}
.chiken-house__chain--r {
  left: calc(50% + 5.2rem - 1.15rem - 3px);
}
.chiken-house__sign::before,
.chiken-house__sign::after {
  content: none;
  display: none;
}

/* Roster animations + prestige (left) and age preview (right), on the top wood. */
.chiken-house__modes {
  position: absolute;
  z-index: 9;
  top: calc(var(--frame-rim) + 8px);
  left: calc(var(--frame-rim) + 0.75rem);
  right: calc(var(--frame-rim) + 0.75rem);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.85rem;
  max-width: none;
}
.chiken-house__modes .chiken-house__adult-toggle.btn {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
}
.chiken-house__stage-toggles {
  position: absolute;
  z-index: 9;
  top: calc(var(--frame-rim) + 8px);
  right: calc(var(--frame-rim) + 0.75rem + 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
  max-width: min(14rem, 42vw);
}
.chiken-house__anim-toggle.btn,
.chiken-house__prestige-toggle.btn,
.chiken-house__adult-toggle.btn {
  position: absolute;
  z-index: 9;
  top: calc(var(--frame-rim) + 8px);
  right: calc(var(--frame-rim) + 0.75rem + 48px);
  min-height: 2rem;
  margin: 0;
  margin-bottom: 0;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  --btn-face: #8f5d32;
  --btn-lip: #5a3519;
  --btn-shell: color-mix(in srgb, #5a3519 70%, #140a04);
  color: #f6e6b8;
}
.chiken-house__modes .chiken-house__anim-toggle.btn,
.chiken-house__modes .chiken-house__prestige-toggle.btn {
  position: static;
  left: auto;
  right: auto;
  top: auto;
}
.chiken-house__modes .chiken-house__adult-toggle.btn {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
}
.chiken-house__anim-toggle.btn[aria-pressed="true"],
.chiken-house__adult-toggle.btn[aria-pressed="true"] {
  --btn-face: #6a8f3a;
  --btn-lip: #3d5a1f;
  --btn-shell: color-mix(in srgb, #3d5a1f 70%, #0a1404);
  color: #f0f6e0;
}
/* Unarmed · follows Graphics · gray wood until clicked to override. */
.chiken-house__anim-toggle.btn.is-muted {
  --btn-face: #6a5a48;
  --btn-lip: #3d3228;
  --btn-shell: color-mix(in srgb, #3d3228 70%, #140e0a);
  color: #c8b8a0;
  opacity: 0.72;
}
.chiken-house__anim-toggle.btn.is-muted[aria-pressed="true"] {
  --btn-face: #5a6850;
  --btn-lip: #3a4434;
  --btn-shell: color-mix(in srgb, #3a4434 70%, #0e120c);
  color: #d0d8c4;
}
.chiken-house__prestige-toggle.btn[aria-pressed="true"] {
  --btn-face: #c9a227;
  --btn-lip: #7a5a12;
  --btn-shell: color-mix(in srgb, #7a5a12 70%, #140a04);
  color: #fff6d8;
}
.chiken-house__anim-toggle.btn:hover,
.chiken-house__anim-toggle.btn:focus-visible,
.chiken-house__prestige-toggle.btn:hover,
.chiken-house__prestige-toggle.btn:focus-visible,
.chiken-house__adult-toggle.btn:hover,
.chiken-house__adult-toggle.btn:focus-visible {
  --btn-face: color-mix(in srgb, #8f5d32 88%, #fff);
}
.chiken-house__anim-toggle.btn[aria-pressed="true"]:hover,
.chiken-house__anim-toggle.btn[aria-pressed="true"]:focus-visible,
.chiken-house__adult-toggle.btn[aria-pressed="true"]:hover,
.chiken-house__adult-toggle.btn[aria-pressed="true"]:focus-visible {
  --btn-face: color-mix(in srgb, #6a8f3a 88%, #fff);
}
.chiken-house__prestige-toggle.btn[aria-pressed="true"]:hover,
.chiken-house__prestige-toggle.btn[aria-pressed="true"]:focus-visible {
  --btn-face: color-mix(in srgb, #c9a227 88%, #fff);
}

/* White hen above the sign; gold chick above the wood rim (overflow exception).
   Grid stays above the hen so affinity tips still clear the walker. */
.chiken-house__hen {
  position: absolute;
  z-index: 9;
  left: calc(50% - 12.2rem);
  /* White hen sits ~10px lower than the gold chick's counter-nudge. */
  top: calc(8.35rem - 26px);
  width: 3.65rem;
  height: 3.65rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.chiken-house__chick {
  position: absolute;
  z-index: 11;
  left: 50%;
  /* Gold chick · one pixel higher than the +19px sit. */
  top: calc(-0.85rem + 18px);
  margin-left: -1.55rem;
  width: 3.2rem;
  height: 3.2rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.chiken-house__hen canvas,
.chiken-house__chick canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.chiken-house__pager--foot { margin-top: 0.85rem; }
.chiken-house__pager {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.1rem 0 0;
}
.chiken-house__pager-status {
  min-width: 3.2rem;
  text-align: center;
  font-family: var(--font-pixel, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #f0e0c0;
  text-shadow: 0 1px 0 #2a1810;
}
.chiken-house__pager-btn {
  --btn-pad-x: 0.28rem;
  min-width: 1.75rem;
  padding: 0.2rem 0.22rem;
}
/* Admin slot for a bird with no art yet: dimmed, pressed in, struck-through name. */
.chiken-house .incubator-type--placeholder {
  filter: grayscale(1) brightness(0.55);
  opacity: 0.7;
  pointer-events: none;
  box-shadow: inset 0 4px 10px rgb(0 0 0 / 55%);
}
.incubator-type--placeholder .incubator-type__name s {
  text-decoration-thickness: 3px;
  text-decoration-color: #c23b3b;
}
.incubator-type__scene--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 11rem;
  background: rgb(10 8 6 / 55%);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 70%);
}
.incubator-placeholder__note {
  margin: 0;
  font-family: var(--font-pixel, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b8a890;
}
.chiken-house__pager-btn--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chiken-house__grid {
  position: relative;
  /* Above white hen so affinity tip popovers clear the walker; below gold chick. */
  z-index: 10;
  gap: 0.85rem;
  margin-top: 0.75rem;
  /* Keep card pixels inside the house when the shell itself is overflow:visible. */
  overflow: visible;
}
/* Wave C · four cards max · one desktop row (no tall scroll). */
.chiken-house__grid.style-grid--roster-page {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Outer card: real v2 wood via .pixel-frame--beams (14px painted rim). */
.chiken-house .incubator-type {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--frame-rim);
  border: 0;
  border-image: none;
  border-radius: 0;
  background: #5c3a20;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  overflow: hidden;
  /* content-visibility removed · broke nested dialogs / click targets in Chromium. */
}
.chiken-house .incubator-type > .pixel-frame__fx {
  z-index: 6;
}
.chiken-house .incubator-type--equipped {
  /* No pink/gold outer card ring · active state is gold nameplate + scene pulse. */
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}
/* Equipped nameplate · silver → brushed gold (same bolt layout). */
.chiken-house .incubator-type--equipped .incubator-head {
  border-bottom-color: #5a3c18;
  box-shadow:
    inset 0 1px 0 #f3d98a,
    inset 0 -1px 0 #7a5522;
  background-image:
    linear-gradient(#5a3c18, #5a3c18),
    linear-gradient(#5a3c18, #5a3c18),
    linear-gradient(#5a3c18, #5a3c18),
    linear-gradient(#5a3c18, #5a3c18),
    linear-gradient(#c9a24a, #c9a24a),
    linear-gradient(#c9a24a, #c9a24a),
    linear-gradient(#c9a24a, #c9a24a),
    linear-gradient(#c9a24a, #c9a24a),
    linear-gradient(#f6e6b0, #f6e6b0),
    linear-gradient(#f6e6b0, #f6e6b0),
    linear-gradient(#f6e6b0, #f6e6b0),
    linear-gradient(#f6e6b0, #f6e6b0),
    linear-gradient(#e0b050, #b8862e 42%, #7a5522);
}
.chiken-house .incubator-type--equipped .incubator-type__name {
  color: #fff8e8;
  text-shadow:
    0 1px 0 #3a2410,
    1px 0 0 #3a2410,
    -1px 0 0 #3a2410,
    0 -1px 0 #3a2410;
}
/* Static gold inset on equipped scene (no infinite pulse · Chromium paint cost). */
.chiken-house .incubator-type--equipped .incubator-type__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(224, 176, 80, 0.55);
}
/* Unlocked · unequipped · same bolt layout / brightness as equipped, green plate. */
.chiken-house .incubator-type--open .incubator-head {
  border-bottom-color: #1e4a2c;
  box-shadow:
    inset 0 1px 0 #c8f5d4,
    inset 0 -1px 0 #1a5530;
  background-image:
    linear-gradient(#1a3c22, #1a3c22),
    linear-gradient(#1a3c22, #1a3c22),
    linear-gradient(#1a3c22, #1a3c22),
    linear-gradient(#1a3c22, #1a3c22),
    linear-gradient(#4aaa62, #4aaa62),
    linear-gradient(#4aaa62, #4aaa62),
    linear-gradient(#4aaa62, #4aaa62),
    linear-gradient(#4aaa62, #4aaa62),
    linear-gradient(#c8f5d4, #c8f5d4),
    linear-gradient(#c8f5d4, #c8f5d4),
    linear-gradient(#c8f5d4, #c8f5d4),
    linear-gradient(#c8f5d4, #c8f5d4),
    linear-gradient(#50c06a, #2e8a48 42%, #1a5530);
}
.chiken-house .incubator-type--open .incubator-type__name {
  color: #f2fff4;
  text-shadow:
    0 1px 0 #14301a,
    1px 0 0 #14301a,
    -1px 0 0 #14301a,
    0 -1px 0 #14301a;
}
.chiken-house .incubator-type--locked .incubator-foot {
  display: none;
}
.chiken-house .incubator-type--locked {
  background: #5c3a20;
  /* Same v2 wood rim as open cards · red veil (::before) marks locked. */
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}
/* Full-body red veil under scene + name; stars under; lock above. */
.chiken-house .incubator-type--locked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgb(140 28 32 / 58%);
  pointer-events: none;
}
.chiken-house .incubator-type--locked .incubator-head::before,
.chiken-house .incubator-type--locked .incubator-foot::before {
  content: none !important;
  display: none !important;
  background: none !important;
}
.chiken-house .incubator-head,
.chiken-house .incubator-foot {
  border: 0;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
  image-rendering: pixelated;
}
/* Metal nameplate: brushed steel plate + 4 corner bolts (dark rim / mid / lite).
 * Plate reads ~85% opaque · wood rim / vine décor on the card stay full strength. */
.chiken-house .incubator-head {
  position: relative;
  z-index: 4;
  margin: 0;
  min-height: 1.65rem;
  padding: 0.28rem 0.5rem 0.32rem;
  flex: 0 0 auto;
  opacity: 0.85;
  border-bottom: 2px solid #2a2e34;
  box-shadow:
    inset 0 1px 0 #b8c0c8,
    inset 0 -1px 0 #3a4048;
  background-image:
    /* Bolt dark rims (4px) */
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    linear-gradient(#2e333a, #2e333a),
    /* Bolt mid faces (3px) */
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    linear-gradient(#7a848e, #7a848e),
    /* Bolt highlights (2px) */
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    linear-gradient(#d4d6e0, #d4d6e0),
    /* Plate */
    linear-gradient(#9aa3ae, #6f7882 42%, #4a525c);
  background-size:
    4px 4px, 4px 4px, 4px 4px, 4px 4px,
    3px 3px, 3px 3px, 3px 3px, 3px 3px,
    2px 2px, 2px 2px, 2px 2px, 2px 2px,
    auto;
  background-position:
    3px 2px, calc(100% - 3px) 2px, 3px calc(100% - 2px), calc(100% - 3px) calc(100% - 2px),
    3.5px 2.5px, calc(100% - 3.5px) 2.5px, 3.5px calc(100% - 2.5px), calc(100% - 3.5px) calc(100% - 2.5px),
    4px 3px, calc(100% - 4px) 3px, 4px calc(100% - 3px), calc(100% - 4px) calc(100% - 3px),
    0 0;
  background-repeat: no-repeat;
}
.chiken-house .incubator-foot {
  position: relative;
  z-index: 1;
  margin: 0.35rem 0 0;
  padding: 0.28rem 0.4rem;
  border-bottom: 0;
  border-top: 2px solid #2a170c;
  background: linear-gradient(#4a2c18, #2a170c);
  flex: 0 0 auto;
  box-shadow: none;
}
.chiken-house .incubator-type--locked .incubator-foot__lock {
  z-index: 5;
  color: #fff;
}
.chiken-house .incubator-type__name {
  color: #eef2f6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-shadow:
    0 1px 0 #1a1e24,
    1px 0 0 #1a1e24,
    -1px 0 0 #1a1e24,
    0 -1px 0 #1a1e24,
    1px 1px 0 #1a1e24;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Portrait fills the card body between head and foot, inside the wood gutter. */
.chiken-house .incubator-type__portrait {
  position: relative;
  z-index: 3;
  width: 100%;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
  aspect-ratio: auto;
  min-height: 12rem;
  align-self: stretch;
  overflow: hidden;
}
.chiken-house .incubator-type__portrait::before {
  content: none;
  display: none;
}
.chiken-house .incubator-type__portrait .visual-asset {
  place-items: stretch center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  margin: 0;
  /* Flush to the wood frame · nestLift handles hen height, not CSS scale. */
  transform: none;
}
.chiken-house .incubator-type__portrait .visual-asset--chickling {
  display: grid;
  place-items: stretch center;
  width: 100%;
  height: 100%;
  margin: 0;
}
.chiken-house .incubator-type__portrait .visual-asset--chickling canvas,
.chiken-house .incubator-type__portrait .visual-asset:not(.visual-asset--chickling) canvas {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: fill;
  transform: none;
}
.chiken-house .incubator-type__portrait .roster-hay {
  z-index: 3;
}
.chiken-house .incubator-type__portrait .roster-fx--back {
  z-index: 0;
}
.chiken-house .incubator-type__portrait .roster-fx--front,
.chiken-house .incubator-type__portrait .roster-fx:not(.roster-fx--back) {
  z-index: 2;
}

@keyframes chiken-house-chick-hop {
  0%, 55%, 100% { transform: translateY(0); }
  70% { transform: translateY(-0.85rem); }
  85% { transform: translateY(0); }
}
@keyframes chiken-house-hen-pace {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(2.1rem); }
  50% { transform: translateX(2.1rem) scaleX(-1); }
  95% { transform: translateX(0) scaleX(-1); }
}
@media (prefers-reduced-motion: reduce) {
  .chiken-house__chick,
  .chiken-house__hen { animation: none; }
}
/* Header hens/chicks animate on Medium and High; only Low freezes them. */
html[data-quality="low"] .chiken-house__chick,
html[data-quality="low"] .chiken-house__hen {
  animation: none !important;
}
@media (max-width: 45rem) {
  .chiken-house.pixel-frame {
    display: flex;
    flex-direction: column;
    padding: 0.65rem 0.7rem 1.5rem;
  }
  .chiken-house__sky,
  .chiken-house__beam,
  .chiken-house__chain,
  .chiken-house__hen { display: none; }
  .chiken-house__pager { order: 2; }
  .chiken-house__grid { order: 3; }
  .chiken-house__pager--foot { order: 4; }
  .chiken-house__sign.carved-plaque {
    position: static;
    transform: none;
    order: 1;
    z-index: 1;
    min-width: 0;
    margin: 0.35rem 0 0.15rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    color: #f6e6c0;
    text-shadow: 0 2px 0 rgb(0 0 0 / 75%);
  }
  .chiken-house__sign.carved-plaque::after { content: none; }
  .chiken-house__modes {
    position: static;
    order: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.28rem;
    width: 100%;
    max-width: none;
    right: auto;
  }
  .chiken-house__modes .chiken-house__anim-toggle.btn,
  .chiken-house__modes .chiken-house__prestige-toggle.btn,
  .chiken-house__modes .chiken-house__adult-toggle.btn {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    font-size: 0.52rem;
    min-height: 1.6rem;
    padding: 0.16rem 0.2rem;
  }
  .chiken-house__chick.is-on-stage {
    position: absolute;
    left: 50%;
    top: auto;
    bottom: 0.15rem;
    margin-left: -1.55rem;
    z-index: 5;
    width: 3.1rem;
    height: 3.1rem;
  }
  .chiken-house__grid {
    gap: 0.55rem;
    margin-top: 0.65rem;
  }
  .chiken-house__grid.style-grid,
  .chiken-house__grid.style-grid--five,
  .chiken-house__grid.style-grid--roster-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chiken-house .incubator-type {
    font-size: 0.9em;
  }
  .chiken-house .incubator-type__portrait {
    min-height: 7.5rem;
  }
}
