/* The Hatchery (src/hatchery.js; GDD v1.2 §8.4–8.6). Built from the Flock screen's art: fl_outer / fl_inner panels,
   fl_card bird cards, the game's buttons, the popup panel. Sizes are mock px × --m, like the rest of the Figma UI. */
#s-hatchery { --u: var(--m); }
.hx-bg { position: absolute; inset: 0; background: var(--img) 50% 0 / cover no-repeat; }
.hx-scroll { position: absolute; left: var(--colx); width: var(--colw); top: calc(var(--sat, 0px) + var(--m) * 153); bottom: calc(var(--sab, 0px) + var(--m) * 222);
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hx-scroll::-webkit-scrollbar { display: none; }
.hx-page { position: relative; padding: calc(var(--m) * 30) calc(var(--m) * 70) calc(var(--m) * 80); display: flex; flex-direction: column; gap: calc(var(--m) * 44); }
.hx-page button, .hx-layer button { border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; background-color: transparent; touch-action: manipulation; }
.hx-t { display: block; white-space: normal; }
.hx-sub { color: #cfe6ff; }
.hx-gold { color: #ffd23a; }
.hx-good { color: #9cf07a; }
.hx-note { text-align: center; color: #cfe6ff; padding: calc(var(--m) * 6) calc(var(--m) * 20); }
.hx-nine { position: absolute; inset: 0; pointer-events: none; box-sizing: border-box; }
.hx-img { display: inline-block; flex: none; }
.hx-btn { position: relative; flex: none; display: inline-grid; grid-auto-flow: column; gap: calc(var(--m) * 10); place-items: center; place-content: center; padding-bottom: calc(var(--m) * 8) !important; }
.hx-btn .hx-t { white-space: nowrap; }
.hx-btn.done { filter: grayscale(.5) brightness(.95); }

/* title rows */
.hx-title { display: flex; align-items: center; gap: calc(var(--m) * 30); }
.hx-title.solo { justify-content: center; text-align: center; }
.hx-title > div { display: flex; flex-direction: column; gap: calc(var(--m) * 12); }

/* a Flock-style panel */
.hx-panel { position: relative; padding: calc(var(--m) * 26) calc(var(--m) * 30) calc(var(--m) * 40); }
.hx-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: calc(var(--m) * 20); min-height: calc(var(--m) * 96); padding: 0 calc(var(--m) * 10) calc(var(--m) * 14); }
.hx-body { position: relative; display: flex; flex-direction: column; gap: calc(var(--m) * 22); }
.hx-inner { position: relative; padding: calc(var(--m) * 28); }
.hx-inner > :not(.hx-nine) { position: relative; }

/* nests */
.hx-nestrow { display: flex; align-items: center; gap: calc(var(--m) * 26); min-height: calc(var(--m) * 250); }
.hx-nestrow.locked { filter: saturate(.55) brightness(.9); }
.hx-seat { position: relative; flex: none; width: calc(var(--m) * 260); height: calc(var(--m) * 210); display: grid; place-items: end center; }
.hx-seat .hx-nest { position: absolute; left: 0; bottom: 0; }
.hx-seat .hx-egg { position: absolute; left: 50%; bottom: calc(var(--m) * 58); margin-left: calc(var(--m) * -60); }
.hx-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--m) * 12); }
.hx-lock { font-size: var(--f56); flex: none; --ow: 7; }
.hx-wait { flex: none; padding: calc(var(--m) * 14) calc(var(--m) * 22); border-radius: calc(var(--m) * 20); background: #0a4f8f; border: calc(var(--m) * 5) solid #062f57; }
.hx-bar { position: relative; display: block; width: calc(var(--m) * 462); height: calc(var(--m) * 50); }
.hx-bar .hx-img { position: absolute; inset: 0; }
.hx-bar > i:not(.hx-img) { position: absolute; left: calc(var(--m) * 6); top: calc(var(--m) * 5); bottom: calc(var(--m) * 9); max-width: calc(100% - var(--m) * 12); border-radius: 99px; background: #6fdc3a; border-bottom: calc(var(--m) * 6) solid #3f9c1e; }
.hx-nestrow.ready .hx-go { animation: hxPulse 1.1s ease-in-out infinite; }
@keyframes hxPulse { 50% { transform: scale(1.06); } }

/* the egg: chunky outline, flat colour, spots by tier (cream / blue / gold) */
.hx-egg { position: relative; display: inline-block; flex: none; box-sizing: border-box; background: #fff3d6; border: calc(var(--m) * 9) solid #000; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  box-shadow: inset calc(var(--m) * -14) calc(var(--m) * -16) 0 #0000001f; }
.hx-egg u { position: absolute; border-radius: 50%; background: #ffb52e; }
.hx-egg u:nth-child(1) { left: 22%; top: 30%; width: 24%; height: 19%; }
.hx-egg u:nth-child(2) { left: 58%; top: 50%; width: 20%; height: 16%; }
.hx-egg u:nth-child(3) { left: 30%; top: 66%; width: 14%; height: 11%; }
.hx-egg.e2 { background: #dff1ff; } .hx-egg.e2 u { background: #3f8cff; }
.hx-egg.e3 { background: #ffe07a; } .hx-egg.e3 u { background: #b455ff; }
.hx-egg.ghost { opacity: .35; }
.hx-egg.wob { animation: hxWob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes hxWob { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-7deg); } 80% { transform: rotate(7deg); } 90% { transform: rotate(-4deg); } }

/* shortcut tiles */
.hx-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--m) * 30); }
.hx-tile { position: relative; display: flex !important; flex-direction: column; align-items: center; gap: calc(var(--m) * 10); padding: calc(var(--m) * 30) calc(var(--m) * 20) calc(var(--m) * 34) !important; text-align: center; }
.hx-tile > :not(.hx-nine) { position: relative; }
.hx-tile:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.94); }
.hx-duo { display: flex; align-items: center; gap: calc(var(--m) * 12); height: calc(var(--m) * 162); }
.hx-badge { position: absolute !important; right: calc(var(--m) * -10); top: calc(var(--m) * -14); min-width: calc(var(--m) * 60); height: calc(var(--m) * 60); padding: 0 calc(var(--m) * 10); }

/* rarity pills, birds (GDD v1.4: copies have no tier, so no tier pips and no tier looks) */
.hx-rar { position: relative; display: inline-grid; place-items: center; flex: none; }
.hx-rar .hx-t { position: absolute; }
.hx-crow { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 12); }
.hx-crow.l { justify-content: flex-start; }
.hx-bird { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; box-sizing: border-box; }
.hx-bird canvas { display: block; image-rendering: pixelated; }
.hx-bird.sil canvas { opacity: .8; }

/* bird cards (the Flock card art) */
.hx-grid { display: grid; grid-template-columns: repeat(4, calc(var(--m) * 300)); gap: calc(var(--m) * 20) calc(var(--m) * 13); justify-content: center; }
.hx-card { position: relative; width: calc(var(--m) * 300); height: calc(var(--m) * 364); display: flex !important; flex-direction: column; align-items: center; justify-content: flex-end; gap: calc(var(--m) * 8); padding-bottom: calc(var(--m) * 24) !important; box-sizing: border-box; }
.hx-card > .hx-img { position: absolute; inset: 0; }
.hx-card > :not(.hx-img) { position: relative; }
.hx-card .hx-bird { margin-bottom: auto; margin-top: calc(var(--m) * 34); }
.hx-card.on > .hx-img { filter: drop-shadow(0 0 0 #000); outline: calc(var(--m) * 10) solid #ffd23a; outline-offset: calc(var(--m) * -6); border-radius: calc(var(--m) * 26); }
.hx-card.off { filter: saturate(.4) brightness(.82); }
.hx-card.missing { cursor: default; }
.hx-card:not(:disabled):active { transform: translateY(calc(var(--m) * 4)); }
.hx-tag { position: absolute !important; left: 50%; top: calc(var(--m) * -14); transform: translateX(-50%); white-space: nowrap; padding: calc(var(--m) * 6) calc(var(--m) * 16); border-radius: 999px; border: calc(var(--m) * 5) solid #000;
  background: #5b6b86; color: #fff; font: 700 var(--f24)/1 var(--font-ui); --ow: 4; }
.hx-tag.sel { background: #3fbf2e; }
.hx-count { position: absolute !important; right: calc(var(--m) * 12); top: calc(var(--m) * 14); padding: calc(var(--m) * 4) calc(var(--m) * 12); border-radius: 999px; border: calc(var(--m) * 5) solid #000; background: #ffc531; color: #10213f; font: 700 var(--f24)/1 var(--font-ui); --ow: 4; }

/* pick parents */
.hx-pair { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 18); padding: calc(var(--m) * 10) 0; }
.hx-slot { position: relative; width: calc(var(--m) * 330); height: calc(var(--m) * 400); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: calc(var(--m) * 34); box-sizing: border-box; flex: none; }
.hx-slot > .hx-img { position: absolute; inset: 0; }
.hx-slot > :not(.hx-img) { position: relative; }
.hx-slot .hx-bird, .hx-slot .hx-q { margin-bottom: auto; margin-top: calc(var(--m) * 40); }
.hx-slot:not(.full) > .hx-img { filter: saturate(.5) brightness(.9); }
.hx-q { color: #9ecbf2; }
.hx-cost { display: flex; align-items: center; justify-content: space-around; gap: calc(var(--m) * 20); }
.hx-res { display: inline-flex; align-items: center; gap: calc(var(--m) * 12); }
.hx-oddhead { text-align: center; color: #ffd23a; }
.hx-odds { display: flex; flex-direction: column; gap: calc(var(--m) * 10); }
.hx-odd { display: grid; grid-template-columns: calc(var(--m) * 96) calc(var(--m) * 300) calc(var(--m) * 110) 1fr calc(var(--m) * 200); align-items: center; gap: calc(var(--m) * 14); padding: calc(var(--m) * 6) calc(var(--m) * 16); border-radius: calc(var(--m) * 22); background: #0a5aa3; }
.hx-oname { text-align: left; }
.hx-opct { text-align: right; }
.hx-otag { justify-self: start; padding: calc(var(--m) * 5) calc(var(--m) * 14); border-radius: 999px; border: calc(var(--m) * 4) solid #000; background: #5fd0ff; color: #10213f; font: 700 var(--f24)/1 var(--font-ui); --ow: 4; }
.hx-otag.new { background: #6fdc3a; }
.hx-obar { height: calc(var(--m) * 30); border-radius: 99px; background: #063d70; overflow: hidden; }
.hx-obar i { display: block; height: 100%; max-width: 100%; border-radius: 99px; background: #ffc531; }
.hx-actions { display: flex; flex-direction: column; align-items: center; gap: calc(var(--m) * 20); }
.hx-lay:disabled { filter: grayscale(.7) brightness(.9); }

/* a bird's page */
.hx-hero { display: flex; align-items: center; gap: calc(var(--m) * 50); padding: calc(var(--m) * 60) calc(var(--m) * 60); }
.hx-heroinfo { display: flex; flex-direction: column; gap: calc(var(--m) * 20); align-items: flex-start; }
.hx-copyrow { display: flex; align-items: center; gap: calc(var(--m) * 30); padding: calc(var(--m) * 34) calc(var(--m) * 40); }
.hx-pop { animation: hxPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes hxPop { from { transform: scale(.6); } }

/* popups and the reveal */
.hx-layer { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: #051a33cc; }
.hx-layer[hidden] { display: none; }
.hx-layer.full { background: #0b3a6a; }
.hx-layer > .hx-pop { position: relative; width: calc(var(--m) * 1000); padding: calc(var(--m) * 60) calc(var(--m) * 50) calc(var(--m) * 80); display: flex; flex-direction: column; align-items: center; gap: calc(var(--m) * 26); }
.hx-layer > .hx-pop > :not(.hx-nine) { position: relative; }
.hx-popin { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: calc(var(--m) * 16); padding: calc(var(--m) * 40); }
.hx-sellart { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 16); padding: calc(var(--m) * 30) 0 calc(var(--m) * 20); }
.hx-line { display: flex; justify-content: space-between; align-items: center; gap: calc(var(--m) * 20); padding: calc(var(--m) * 12) calc(var(--m) * 20); border-radius: calc(var(--m) * 18); background: #0a5aa3; }
.hx-popbtns { display: flex; justify-content: center; gap: calc(var(--m) * 24); flex-wrap: wrap; }
.hx-reveal { position: absolute; left: var(--colx); width: var(--colw); top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--m) * 26); text-align: center; overflow: hidden; }
.hx-reveal > :not(.hx-revbg):not(.hx-spark) { position: relative; }
.hx-revbg { position: absolute; left: 50%; top: 50%; width: calc(var(--m) * 1581); height: calc(var(--m) * 2809); transform: translate(-50%, -50%); }
.hx-spark { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); animation: hxSpin 14s linear infinite; }
@keyframes hxSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hx-revtitle { color: #ffd23a; animation: hxPop .5s cubic-bezier(.2, 1.6, .4, 1); }
.hx-revnest { position: relative; display: grid; place-items: center; width: calc(var(--m) * 764); height: calc(var(--m) * 700); }
.hx-revnest .hx-img { position: absolute; left: 0; bottom: 0; }
.hx-revnest .hx-bird { position: absolute; left: 50%; bottom: calc(var(--m) * 250); transform: translateX(-50%); animation: hxHatch .8s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
@keyframes hxHatch { from { transform: translateX(-50%) translateY(calc(var(--m) * 200)) scale(.2); } }
.hx-revnote { color: #cfe6ff; }
@media (prefers-reduced-motion: reduce) { .hx-egg.wob, .hx-spark, .hx-nestrow.ready .hx-go, .hx-revtitle, .hx-revnest .hx-bird, .hx-pop { animation: none; } }
/* small copy reads 25% larger than its mock size: this screen has sentences, not just labels */
.hx-sub, .hx-note, .hx-oddhead { font-size: calc(var(--m) * var(--fs, 28) * 1.25); line-height: 1.15; }
.hx-title .hx-sub { max-width: calc(var(--m) * 1000); }

/* ---- the Bird Market (11 Nov, Phase B) ---- */
.hx-mkt { flex-direction: row !important; text-align: left; gap: calc(var(--m) * 26) !important; padding: calc(var(--m) * 26) calc(var(--m) * 40) !important; width: 100%; box-sizing: border-box; }
.hx-mkt .hx-mid { flex: 1; display: flex; flex-direction: column; gap: calc(var(--m) * 8); }
.hx-mkt.locked { filter: saturate(.5) brightness(.88); }
.hx-mktart { position: relative; display: inline-flex; align-items: flex-end; gap: calc(var(--m) * -10); flex: none; }
.hx-mktart .hx-egg + .hx-egg { margin-left: calc(var(--m) * -22); }
.hx-tok .hx-egg { border-width: calc(var(--m) * 5); }
.hx-wallet { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--m) * 30); padding: calc(var(--m) * 30) calc(var(--m) * 44); }
.hx-wallet .hx-mid { display: flex; flex-direction: column; gap: calc(var(--m) * 8); }
.hx-wallet .hx-mid.r { align-items: flex-end; text-align: right; }
.hx-order, .hx-chest { display: flex; align-items: center; gap: calc(var(--m) * 28); padding: calc(var(--m) * 26) calc(var(--m) * 36); min-height: calc(var(--m) * 170); }
.hx-order .hx-mid, .hx-chest .hx-mid { flex: 1; display: flex; flex-direction: column; gap: calc(var(--m) * 8); }
.hx-slotn { flex: none; width: calc(var(--m) * 84); height: calc(var(--m) * 84); display: grid; place-items: center; border-radius: 50%; border: calc(var(--m) * 7) solid #000; background: #ffc531; }
.hx-seat.sm { width: calc(var(--m) * 120); height: calc(var(--m) * 140); display: grid; place-items: center; flex: none; }
.hx-seat.sm .hx-egg { position: static; margin: 0; }
.hx-buy { display: flex; flex-direction: column; align-items: center; gap: calc(var(--m) * 10); flex: none; }
.hx-sell .hx-crow { gap: calc(var(--m) * 10); }
.hx-choose { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--m) * 14); }
.hx-chip { position: relative; padding: calc(var(--m) * 8) !important; border-radius: calc(var(--m) * 24); border: calc(var(--m) * 6) solid #000 !important; background: #0a5aa3 !important; display: flex !important; flex-direction: column; align-items: center; gap: calc(var(--m) * 4); }
.hx-chip.on { background: #ffc531 !important; }

/* ---- 12 Nov polish (Roby's review): Trophy Road locks, the Starter Egg gift, the cracking egg ---- */
.hx-bar.tr > i:not(.hx-img) { background: #ffc531; border-bottom-color: #d98a06; }
.hx-nestrow .hx-go .hx-img { margin-right: calc(var(--m) * 8); }
.hx-nestrow .hx-go { display: inline-flex !important; align-items: center; justify-content: center; }
.hx-wrap { white-space: normal; line-height: 1.2; text-align: left; }
.hx-copyrow .hx-duo { height: auto; flex: none; gap: calc(var(--m) * 2); }
.hx-copyrow .hx-duo .hx-bird + .hx-bird { margin-left: calc(var(--m) * -44); }
.hx-gift .hx-popin { align-items: center; }
.hx-giftegg { position: relative; display: grid; place-items: center; width: calc(var(--m) * 420); height: calc(var(--m) * 330); }
.hx-giftegg > * { grid-area: 1 / 1; }
.hx-giftegg .hx-spark { position: static; transform: none; animation: hxSpin2 14s linear infinite; }
@keyframes hxSpin2 { to { transform: rotate(360deg); } }
.hx-giftegg .hx-img:not(.hx-spark) { align-self: end; }
.hx-giftegg .hx-egg { align-self: start; margin-top: calc(var(--m) * 20); }
.hx-pop.hx-gift { animation: hxPop .4s cubic-bezier(.2, 1.5, .4, 1); }
/* the Market: the set in demand as a band of its birds; a price is the button (greyed when short) */
.hx-demand { display: flex; align-items: center; }
.hx-demand .hx-bird + .hx-bird { margin-left: calc(var(--m) * -30); }
.hx-price { display: inline-flex !important; align-items: center; justify-content: center; flex: none; }
.hx-price .hx-t:empty { display: none; }
.hx-price:disabled { filter: grayscale(1) brightness(.8); }
/* hatching: three rocks, each harder, cracks drawing in, then the burst */
.hx-egg.hx-hatching { position: absolute; left: 50%; bottom: calc(var(--m) * 210); margin-left: calc(var(--m) * -210); transform-origin: 50% 92%; animation: hxRock 2.1s cubic-bezier(.4, 0, .6, 1) both; }
@keyframes hxRock {
  0%, 9% { transform: rotate(0); } 12% { transform: rotate(-6deg); } 16% { transform: rotate(6deg); } 20% { transform: rotate(-3deg); } 24%, 35% { transform: rotate(0); }
  38% { transform: rotate(-11deg); } 42% { transform: rotate(11deg); } 46% { transform: rotate(-7deg); } 50%, 61% { transform: rotate(0) scale(1.03); }
  64% { transform: rotate(-16deg) scale(1.06); } 68% { transform: rotate(16deg) scale(1.06); } 72% { transform: rotate(-12deg) scale(1.08); } 76% { transform: rotate(10deg) scale(1.1); }
  82% { transform: rotate(0) scale(1.14, .9); } 92% { transform: rotate(0) scale(.94, 1.16); opacity: 1; } 100% { transform: rotate(0) scale(1.5); opacity: 0; }
}
.hx-egg.hx-hatching svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hx-egg.hx-hatching path { fill: none; stroke: #000; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; }
.hx-egg.hx-hatching .c1 { animation: hxCrack .3s ease-out .28s forwards; }
.hx-egg.hx-hatching .c2 { animation: hxCrack .3s ease-out .82s forwards; }
.hx-egg.hx-hatching .c3 { animation: hxCrack .3s ease-out 1.36s forwards; }
@keyframes hxCrack { to { stroke-dashoffset: 0; } }
.hx-reveal.crack .hx-revtitle { animation: hxPulse 0.7s ease-in-out infinite; color: #fff; }
@keyframes hxPulse { 50% { transform: scale(1.06); } }
.hx-skip { opacity: .8; }
.hx-flash { position: absolute !important; inset: 0; background: #fff; pointer-events: none; animation: hxFlash .55s ease-out forwards; z-index: 3; }
@keyframes hxFlash { from { opacity: 1; } to { opacity: 0; } }
.hx-shell { position: absolute !important; bottom: calc(var(--m) * 250); width: calc(var(--m) * 150); height: calc(var(--m) * 120); background: #fff3d6; border: calc(var(--m) * 9) solid #000; z-index: 1; }
.hx-reveal.t2 .hx-shell { background: #dff1ff; } .hx-reveal.t3 .hx-shell { background: #ffe07a; }
.hx-shell.l { left: 50%; margin-left: calc(var(--m) * -200); border-radius: 60% 10% 40% 60% / 80% 20% 40% 60%; animation: hxShellL .8s cubic-bezier(.2, .8, .4, 1) forwards; }
.hx-shell.r { left: 50%; margin-left: calc(var(--m) * 50); border-radius: 10% 60% 60% 40% / 20% 80% 60% 40%; animation: hxShellR .8s cubic-bezier(.2, .8, .4, 1) forwards; }
@keyframes hxShellL { to { transform: translate(calc(var(--m) * -230), calc(var(--m) * 190)) rotate(-70deg); opacity: 0; } }
@keyframes hxShellR { to { transform: translate(calc(var(--m) * 230), calc(var(--m) * 190)) rotate(70deg); opacity: 0; } }
.hx-reveal.out .hx-revnest .hx-bird { z-index: 2; }
.hx-reveal.out .hx-revname { animation: hxUp .4s ease-out .35s both; }
.hx-reveal.out .hx-revrow { animation: hxUp .4s ease-out .5s both; }
.hx-reveal.out .hx-revnote { animation: hxUp .4s ease-out .65s both; }
.hx-reveal.out .hx-popbtns { animation: hxUp .4s ease-out .9s both; }
@keyframes hxUp { from { opacity: 0; transform: translateY(calc(var(--m) * 40)); } }
@media (prefers-reduced-motion: reduce) { .hx-egg.hx-hatching, .hx-flash, .hx-shell, .hx-reveal.out *, .hx-pop.hx-gift { animation: none; } .hx-flash, .hx-shell { display: none; } }
/* Egg Tokens in the top bar */
.fc-pill .cp-tok { background: 50% 50% / contain no-repeat; }

/* the Hatchery banner on Birds (between the care chest and the flock) and the egg bubble on Home */
.fbr-hatchery { display: block; text-align: left; }
.fbr-hatchery:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.95); }
.fbr-hatchery .hx-egg { border-width: calc(var(--m) * 8); }
.fbr-hatchery.ready .fbr-hline { color: #ffd23a; }
.fbr-hatchery.ready .fbr-hgo { animation: hxPulse .9s ease-in-out infinite; }
.fbr-hsub { color: #cfe6ff; white-space: normal; line-height: 1.15; }
.fbr-hcount { justify-content: flex-end !important; color: #cfe6ff; }
.fbr-hgo { background: var(--img) 0 0 / 100% 100% no-repeat; }
.fh-eggico { display: grid; place-items: center; width: 100%; height: 100%; }
.fh-eggico .hx-egg { width: calc(var(--m) * 92); height: calc(var(--m) * 118); border-width: calc(var(--m) * 8); }
.fh-tile.t-hatch.ready .hx-egg { animation: hxWob 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
@media (prefers-reduced-motion: reduce) { .fh-tile.t-hatch.ready .hx-egg, .fbr-hatchery.ready .fbr-hgo { animation: none; } }
.hx-reveal.crack .hx-revtitle { margin-bottom: calc(var(--m) * 170); }

/* 12 Nov audit: the hatch reveal is a full-screen moment (over the top bar and the nav), its art covering the screen */
.hx-layer.full { position: fixed; inset: 0; z-index: 70; background: #5a2bd6; }
.hx-layer.full .hx-reveal { left: 50%; width: calc(var(--m) * 1440); transform: translateX(-50%); overflow: visible; }
.hx-layer.full .hx-revbg { position: fixed; inset: 0; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; transform: none; background: var(--img) 50% 50% / cover no-repeat; }
/* text: the game's label sizes (nothing under 30 mock px), short ALL-CAPS lines */
.hx-sub, .hx-note, .hx-wrap { text-transform: uppercase; }

/* GDD v1.4: the full Market (orders, demand, Golden Egg) waits on Trophy Road at 120: a locked row with the count */
.hx-mkt.locked { filter: none; }
.hx-mkt.locked > .hx-nine, .hx-mkt.locked .hx-mid > .hx-t:first-child { filter: saturate(.45) brightness(.9); }
.hx-lockat { display: flex; align-items: center; gap: calc(var(--m) * 12); flex: none; }

/* 12 Nov review (Roby): the all-blue Hatchery felt sterile for hatching eggs. Its panels take the nest's colours, green
   with yellow, like the world around it: the panel art is hue-shifted (text, birds and eggs are not), and the flat
   blues become greens. Buttons keep the game's own colours. */
#s-hatchery .hx-nine, #s-hatchery .hx-card > .hx-img, #s-hatchery .hx-slot > .hx-img, .hx-layer .hx-pop > .hx-nine { filter: hue-rotate(-96deg) saturate(.9) brightness(.97); }
#s-hatchery .hx-slot:not(.full) > .hx-img { filter: hue-rotate(-100deg) saturate(.5) brightness(.9); }
#s-hatchery .hx-sub, #s-hatchery .hx-note, .hx-layer .hx-sub, .hx-layer .hx-note, .hx-revnote { color: #f3ffd9; }
#s-hatchery .hx-q { color: #d9f6b4; }
#s-hatchery .hx-wait { background: #2f7d1d; border-color: #174a0c; }
#s-hatchery .hx-chip { background: #2f8a22 !important; }
#s-hatchery .hx-chip.on { background: #ffc531 !important; }
#s-hatchery .hx-obar { background: #1d5a12; }
#s-hatchery .hx-otag { background: #ffd23a; }
#s-hatchery .hx-tag { background: #4f6b2c; }
.hx-layer.full:not(.hx-reveal) { background: #2b6b1a; }
.hx-line { background: #2f7d1d; }
#s-hatchery .hx-good, .hx-layer .hx-good { color: #ffe46b; }
.fbr-hatchery .hx-nine, .fbr-hatchery > .fimg { filter: hue-rotate(-96deg) saturate(.9) brightness(.97); }
/* 12 Nov QA (PC): the reveal's background only covered the right half. The reveal now spans the whole layer (its
   background fills it); its content stays the width of the play column. */
.hx-layer.full .hx-reveal, .hx-reveal { left: 0; width: 100%; transform: none; }
.hx-reveal > :not(.hx-revbg):not(.hx-spark):not(.hx-flash) { max-width: var(--colw); }
.hx-layer.full .hx-reveal > .hx-revbg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* GDD v1.4 (13 Nov): the Bond strip opens the Bond list; Bond 200 / 600 play an extra pet / feed reaction (the
   Birds banner's MARKET chip of v1.4 is the bottom bar's MARKET tab on dev/island's screens) */
.fbr-bondtap { background: none; border: 0; padding: 0; cursor: pointer; }
.fbr-petfx { animation: hxPop .45s cubic-bezier(.2, 1.6, .4, 1); }
.fbr-feedfx { animation: hxWob .8s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .fbr-petfx, .fbr-feedfx { animation: none; } }

/* 22 Nov (owner items 8, 10) ------------------------------------------------------------------------------------
   (24 Nov 2026, Basil: back to the Market mock, Frames 31-32: the orange backdrop, the purple EGG TOKEN SHOP and the beige
   YOUR BIRDS panel; the 22 Nov navy "shared look" is removed. The sellability marks below stay.) */
/* sellability on the grid: SELL tag + "N TO SELL" on birds with spares; the others dimmed, NOT FOR SALE */
.mk-selltag { background: linear-gradient(#50de06, #0ec12a); border-radius: calc(var(--m) * 26); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -8) 0 #038623; z-index: 2; pointer-events: none; }
.mk-sellable .mk-spares { background: #2f9e22; }
.fbr-bird.mk-nosale > :not(.mk-nosaletag) { filter: grayscale(.85) brightness(.82); opacity: .6; }
.mk-nosaletag { background: #0b1636cc; }
/* "Extra <bird>: sell it in the Market" (a tap opens the Market) */
#toasts .spare-note { pointer-events: auto; white-space: normal; text-align: center; max-width: min(92vw, 420px); border-radius: 18px; cursor: pointer; animation-duration: 4s; border: 2px solid #ffd23a; font-size: var(--f40); padding: 7px 16px; --ow: 5.5; }
