:root {
  --ink: #2f3325;
  --muted: #697066;
  --paper: rgba(255, 255, 255, 0.72);
  --paper-solid: #fffdf8;
  --line: rgba(255, 255, 255, 0.82);
  --teal: #28a99b;
  --teal-dark: #147b78;
  --gold: #f7a936;
  --rose: #e96d8f;
  --green: #63bd68;
  --sky: #4db8df;
  --purple: #9964d8;
  --shadow: 0 16px 38px rgba(50, 71, 67, 0.15);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(135deg, #f5ffdf 0%, #d8f7ff 48%, #ffe4ee 100%);
  min-width: 320px;
  overflow: hidden;
}

button,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.screen {
  min-height: 100%;
  padding: max(18px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-screen,
.result-screen {
  align-items: center;
  text-align: center;
}

.home-screen {
  justify-content: flex-start;
  min-height: 0;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.result-screen {
  justify-content: center;
}

.result-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.topbar-title {
  flex: 1;
  text-align: left;
}

.topbar-title h1,
.topbar-title h2 {
  margin: 0;
}

.topbar-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: clamp(2.55rem, 13vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 750;
}

.home-topbar {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 12px;
  align-items: start;
  text-align: left;
}

.settings-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 18px rgba(40, 70, 64, 0.08);
}

.settings-button span {
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal-dark);
  display: block;
}

.home-art {
  margin: 6px 0 0;
}

.challenge-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px var(--line);
}

.challenge-card strong {
  color: var(--teal-dark);
  font-size: 1.2rem;
}

.challenge-card span {
  color: var(--muted);
  font-weight: 800;
}

.action-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-tile {
  min-height: 158px;
  padding: 12px;
  border-radius: 8px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  place-items: center;
  text-align: center;
  color: white;
  box-shadow: var(--shadow);
}

.action-tile strong {
  font-size: 1rem;
  line-height: 1.05;
}

.action-tile small {
  min-height: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  font-size: 0.76rem;
  line-height: 1.15;
}

.tile-art {
  width: 100%;
  min-height: 76px;
  display: grid;
  place-items: center;
}

.hatch-tile { background: linear-gradient(180deg, #3abfad, #177d78); }
.hunt-tile { background: linear-gradient(180deg, #8d72d6, #5a3f9d); }
.guide-tile { background: linear-gradient(180deg, #f1a947, #cf7229); }
.practice-tile { background: linear-gradient(180deg, #4fb8df, #267da9); }

.hunt-tile.is-locked {
  background: linear-gradient(180deg, #aeb8b3, #78837f);
}

.hunt-tile.is-locked .tile-art {
  opacity: 0.72;
}

.home-egg-stack {
  width: 116px;
  height: 76px;
  position: relative;
  display: block;
}

.home-egg-stack .bird-egg {
  position: absolute;
  transform: scale(0.72);
  transform-origin: bottom center;
}

.home-egg-stack .bird-egg:nth-child(1) { left: 2px; top: 3px; }
.home-egg-stack .bird-egg:nth-child(2) { left: 30px; top: -4px; }
.home-egg-stack .bird-egg:nth-child(3) { right: 2px; top: 4px; }

.home-egg-stack em {
  position: absolute;
  right: -2px;
  bottom: 2px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: rgba(255,255,255,0.9);
  font-style: normal;
  font-weight: 1000;
}

.guide-art,
.practice-art {
  width: 74px;
  height: 66px;
  position: relative;
}

.guide-art {
  border-radius: 8px;
  background: rgba(255,255,255,0.88);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
}

.guide-art span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 5px;
  border-radius: 999px;
  background: #cf7229;
}

.guide-art span:nth-child(1) { top: 18px; }
.guide-art span:nth-child(2) { top: 31px; }
.guide-art span:nth-child(3) { top: 44px; }

.practice-art {
  display: grid;
  gap: 6px;
}

.practice-art span {
  display: block;
  height: 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
}

.home-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-stats span {
  min-width: 0;
  min-height: 54px;
  padding: 7px 4px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px var(--line);
}

.home-stats strong {
  max-width: 100%;
  color: var(--teal-dark);
  font-size: clamp(1rem, 8vw, 1.45rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.home-stats small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.05;
}

.button-stack {
  width: 100%;
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button,
.answer-button,
.quiet-button,
.icon-button {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 900;
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 58px;
  color: white;
  font-size: 1.18rem;
  box-shadow: var(--shadow);
}

.primary-button {
  background: linear-gradient(180deg, #37bfaf, #17877d);
}

.secondary-button {
  background: linear-gradient(180deg, #fabb52, #e88628);
}

.quiet-button,
.icon-button {
  background: rgba(255, 255, 255, 0.54);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-button {
  width: 62px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex: 0 0 auto;
}

button:active {
  transform: scale(0.98);
}

.stats-row {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
  justify-content: center;
  flex-wrap: wrap;
}

.egg-wrap {
  width: min(68vw, 250px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.nest {
  position: absolute;
  width: 80%;
  height: 26%;
  left: 10%;
  bottom: 14%;
  border-radius: 50%;
  background: #8e5c31;
  box-shadow: inset 0 -9px 0 rgba(69, 39, 18, 0.22);
}

.nest::before {
  content: "";
  position: absolute;
  inset: 12% 9% 28%;
  border-radius: 50%;
  background: #c89250;
}

.twig {
  position: absolute;
  width: 45%;
  height: 4%;
  left: 27%;
  bottom: 23%;
  border-radius: 999px;
  background: #6c421f;
  transform-origin: center;
}

.twig:nth-child(2) { transform: translate(-44%, 4px) rotate(28deg); }
.twig:nth-child(3) { transform: translate(-22%, -4px) rotate(-18deg); background: #b17437; }
.twig:nth-child(4) { transform: translate(8%, 6px) rotate(13deg); }
.twig:nth-child(5) { transform: translate(29%, -1px) rotate(-29deg); background: #b17437; }
.twig:nth-child(6) { transform: translate(-4%, 14px) rotate(4deg); }

.egg {
  width: 48%;
  height: 68%;
  z-index: 2;
  border-radius: 48% 48% 52% 52% / 58% 58% 42% 42%;
  background: linear-gradient(180deg, #fffef8, #ffdf99);
  box-shadow: inset -14px -22px 28px rgba(235, 158, 58, 0.2), inset 7px 10px 0 rgba(255, 255, 255, 0.55), 0 12px 24px rgba(144, 105, 40, 0.13);
  position: relative;
  transition: filter 250ms ease, transform 250ms ease;
}

.egg-common {
  background: linear-gradient(180deg, #fffef8, #ffdf99);
}

.egg-uncommon {
  background: linear-gradient(180deg, #f7ffff, #9ee4f2);
  box-shadow: inset -14px -22px 28px rgba(49, 174, 218, 0.2), inset 7px 10px 0 rgba(255, 255, 255, 0.55), 0 12px 24px rgba(34, 130, 169, 0.16);
}

.egg-rare {
  background: linear-gradient(180deg, #fff9ff, #d6b1ff);
  box-shadow: inset -14px -22px 28px rgba(117, 67, 170, 0.22), inset 7px 10px 0 rgba(255, 255, 255, 0.58), 0 12px 24px rgba(117, 67, 170, 0.18);
}

.egg-legendary {
  background: linear-gradient(180deg, #f8fff6, #8ef0b7);
  box-shadow: inset -14px -22px 28px rgba(25, 139, 104, 0.23), inset 7px 10px 0 rgba(255, 255, 255, 0.58), 0 0 30px rgba(232, 144, 45, 0.32), 0 12px 24px rgba(25, 139, 104, 0.18);
}

.egg::before {
  content: "";
  position: absolute;
  width: 25%;
  height: 14%;
  left: 28%;
  top: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
}

.egg[style*="--egg-base"] {
  background:
    radial-gradient(circle at 35% 31%, rgba(255,255,255,0.72) 0 10%, transparent 11%),
    linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0) 42%),
    var(--egg-base);
}

.hatch-egg-spots {
  position: absolute;
  inset: 13% 15% 12%;
  border-radius: inherit;
  opacity: 0.72;
}

.hatch-egg-speckled .hatch-egg-spots {
  background:
    radial-gradient(circle at 25% 25%, var(--egg-spots) 0 5px, transparent 6px),
    radial-gradient(circle at 57% 38%, var(--egg-spots) 0 3px, transparent 4px),
    radial-gradient(circle at 42% 61%, var(--egg-spots) 0 4px, transparent 5px),
    radial-gradient(circle at 69% 70%, var(--egg-spots) 0 5px, transparent 6px),
    radial-gradient(circle at 33% 78%, var(--egg-spots) 0 2px, transparent 3px);
}

.hatch-egg-spotted .hatch-egg-spots {
  background:
    radial-gradient(circle at 29% 31%, var(--egg-spots) 0 9px, transparent 10px),
    radial-gradient(circle at 63% 48%, var(--egg-spots) 0 7px, transparent 8px),
    radial-gradient(circle at 44% 73%, var(--egg-spots) 0 8px, transparent 9px);
}

.hatch-egg-plain .hatch-egg-spots {
  background: radial-gradient(circle at 42% 36%, rgba(255,255,255,0.24) 0 18%, transparent 19%);
}

.egg-fact-scroll {
  position: absolute;
  inset: 17% 14% 18%;
  overflow: hidden;
  border-radius: 999px;
  opacity: 0.62;
  transform: rotate(-8deg);
}

.egg-fact-scroll div {
  display: grid;
  gap: 8px;
  color: rgba(91, 76, 43, 0.75);
  font-size: 0.62rem;
  font-weight: 1000;
  animation: factDrift 7s linear infinite;
}

.egg-fact-scroll span {
  white-space: nowrap;
}

.egg.glow {
  filter: drop-shadow(0 0 22px rgba(255, 186, 75, 0.52));
}

.egg.wiggle {
  animation: wiggle 420ms ease;
}

.egg.shake {
  animation: shake 360ms ease;
}

.crack {
  position: absolute;
  width: 42%;
  height: 46%;
  left: 33%;
  top: 31%;
  fill: none;
  stroke: #74472c;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bird {
  position: relative;
  z-index: 3;
  width: 66%;
  height: 66%;
  animation: popIn 520ms cubic-bezier(.2, 1.35, .4, 1);
}

.bird-body,
.bird-head,
.bird-wing,
.bird-eye,
.bird-pupil,
.bird-beak,
.bird-leg {
  position: absolute;
}

.bird-body {
  width: 52%;
  height: 58%;
  left: 24%;
  top: 28%;
  border-radius: 50%;
  background: var(--bird-main, #ef7049);
  transform: rotate(-7deg);
}

.bird-wing {
  width: 33%;
  height: 46%;
  left: 14%;
  top: 38%;
  border-radius: 50%;
  background: var(--bird-wing, rgba(239, 112, 73, 0.72));
  transform: rotate(-35deg);
}

.bird-head {
  width: 38%;
  height: 38%;
  left: 46%;
  top: 12%;
  border-radius: 50%;
  background: var(--bird-main, #ef7049);
}

.bird-beak {
  width: 0;
  height: 0;
  left: 80%;
  top: 27%;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 26px solid #eea438;
}

.bird-eye {
  width: 13%;
  height: 13%;
  left: 61%;
  top: 22%;
  border-radius: 50%;
  background: white;
}

.bird-pupil {
  width: 6%;
  height: 6%;
  left: 65%;
  top: 25%;
  border-radius: 50%;
  background: #111;
}

.bird-leg {
  width: 4%;
  height: 22%;
  bottom: 1%;
  border-radius: 999px;
  background: #4a321e;
}

.bird-leg.one { left: 43%; transform: rotate(8deg); }
.bird-leg.two { left: 57%; transform: rotate(-8deg); }

.rarity-common { --bird-main: #ef7049; --bird-wing: #dd5c43; }
.rarity-uncommon { --bird-main: #31aeda; --bird-wing: #197ea6; }
.rarity-rare { --bird-main: #9e62d6; --bird-wing: #7543aa; }
.rarity-legendary { --bird-main: #2db875; --bird-wing: #198b68; }

.progress {
  width: 100%;
  height: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.74), 0 8px 18px rgba(40, 70, 64, 0.1);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55b973, #f9bc4f);
  transition: width 300ms ease;
}

.progress.tier-common .progress-fill { background: linear-gradient(90deg, #55b973, #f9bc4f); }
.progress.tier-uncommon .progress-fill { background: linear-gradient(90deg, #27a7d4, #7de3f2); }
.progress.tier-rare .progress-fill { background: linear-gradient(90deg, #955ccd, #d7a8ff); }
.progress.tier-legendary .progress-fill { background: linear-gradient(90deg, #e8902d, #2db875); }

.hatch-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 1000;
  margin-bottom: -6px;
}

.timer {
  width: min(100%, 300px);
  height: 28px;
  position: relative;
  align-self: center;
}

.question-timer-card {
  width: min(100%, 330px);
  align-self: center;
  display: grid;
  gap: 3px;
  padding: 8px 12px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px var(--line);
}

.question-timer-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: left;
}

.timer-track,
.timer-fill {
  position: absolute;
  left: 0;
  top: 6px;
  height: 16px;
  border-radius: 999px;
}

.timer-track {
  width: 100%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px var(--line);
}

.timer-fill {
  width: 100%;
  min-width: 18px;
  background: linear-gradient(90deg, #4568dc, #35c2a4);
  transition: width 80ms linear;
}

.feather {
  position: absolute;
  top: 0;
  width: 30px;
  height: 28px;
  transform: translateX(-8px);
  transition: left 80ms linear;
}

.feather::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 25px;
  left: 7px;
  top: 1px;
  border-radius: 100% 0 100% 0;
  background: #4568dc;
  transform: rotate(28deg);
}

.game-screen {
  gap: 11px;
}

.question {
  text-align: center;
  font-size: clamp(2.65rem, 15vw, 4.3rem);
  font-weight: 1000;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

.fact-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fact-score span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px var(--line);
}

.answer-grid {
  display: grid;
  gap: 11px;
}

.answer-button {
  height: 64px;
  color: white;
  font-size: 2rem;
  background: linear-gradient(180deg, #58c3e4, #268eb6);
  box-shadow: 0 10px 20px rgba(34, 130, 169, 0.18);
}

.answer-button.correct {
  background: linear-gradient(180deg, #74ca72, #3d9b45);
}

.answer-button.wrong {
  background: linear-gradient(180deg, #ee89a4, #d34e76);
}

.answer-button.dim {
  opacity: 0.55;
}

.feedback {
  min-height: 28px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.result-card {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.result-card h1 {
  margin: 0 0 8px;
  font-size: clamp(2.25rem, 12vw, 3.5rem);
  line-height: 0.98;
}

.celebration-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.celebration-burst span {
  position: absolute;
  width: 16px;
  height: 42px;
  border-radius: 999px;
  background: #f9bc4f;
  animation: confettiFall 1.7s ease-in-out infinite;
}

.celebration-burst span:nth-child(1) { left: 15%; top: -10%; background: #27a7d4; animation-delay: 0s; }
.celebration-burst span:nth-child(2) { left: 34%; top: -14%; background: #955ccd; animation-delay: .2s; }
.celebration-burst span:nth-child(3) { left: 53%; top: -12%; background: #55b973; animation-delay: .1s; }
.celebration-burst span:nth-child(4) { left: 72%; top: -16%; background: #e8902d; animation-delay: .35s; }
.celebration-burst span:nth-child(5) { left: 86%; top: -11%; background: #e96d8f; animation-delay: .48s; }

.result-photo-wrap {
  width: min(76vw, 270px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 28px rgba(40, 70, 64, 0.12);
}

.result-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bird-name {
  margin: 10px 0 4px;
  font-size: 1.8rem;
  line-height: 1.05;
}

.rarity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: white;
  font-size: 0.9rem;
  font-weight: 1000;
  background: var(--teal);
}

.rarity-pill.common { background: #55b973; }
.rarity-pill.uncommon { background: #27a7d4; }
.rarity-pill.rare { background: #955ccd; }
.rarity-pill.legendary { background: #e8902d; }

.fact {
  margin: 10px auto 4px;
  max-width: 34ch;
  color: var(--muted);
  font-weight: 700;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mini-stat {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 8px;
  font-weight: 900;
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
}

.collection-screen {
  padding-left: 14px;
  padding-right: 14px;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.collection-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px 4px max(28px, env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bird-card {
  min-height: 230px;
  padding: 10px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 18px rgba(40, 70, 64, 0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  border: 0;
  color: inherit;
}

.bird-card:focus-visible {
  outline: 3px solid rgba(20, 123, 120, 0.55);
  outline-offset: 3px;
}

.bird-card-art {
  height: 92px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.bird-card .bird {
  width: 86px;
  height: 86px;
}

.photo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
}

.photo-fallback .bird {
  display: none;
  width: 86px;
  height: 86px;
}

.photo-fallback.photo-missing img {
  display: none;
}

.photo-fallback.photo-missing .bird {
  display: block;
}

.result-photo-wrap .photo-fallback .bird {
  width: 170px;
  height: 170px;
}

.bird-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.locked-egg {
  width: 66px;
  height: 84px;
  border-radius: 48% 48% 52% 52% / 58% 58% 42% 42%;
  background: linear-gradient(180deg, #f8f8f8, #c9c9c9);
  opacity: 0.72;
}

.bird-egg {
  width: 66px;
  height: 84px;
  border-radius: 48% 48% 52% 52% / 58% 58% 42% 42%;
  background:
    radial-gradient(circle at 35% 31%, rgba(255,255,255,0.72) 0 10%, transparent 11%),
    linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0) 42%),
    var(--egg-base);
  box-shadow: inset -8px -14px 18px rgba(70, 50, 30, 0.13), 0 7px 13px rgba(70, 50, 30, 0.14);
  position: relative;
}

.bird-egg::after {
  content: "";
  position: absolute;
  inset: 14% 16% 12%;
  border-radius: inherit;
  opacity: 0.75;
}

.bird-egg-speckled::after {
  background:
    radial-gradient(circle at 25% 25%, var(--egg-spots) 0 3px, transparent 4px),
    radial-gradient(circle at 57% 38%, var(--egg-spots) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 61%, var(--egg-spots) 0 2px, transparent 3px),
    radial-gradient(circle at 69% 70%, var(--egg-spots) 0 3px, transparent 4px),
    radial-gradient(circle at 33% 78%, var(--egg-spots) 0 1px, transparent 2px);
}

.bird-egg-spotted::after {
  background:
    radial-gradient(circle at 29% 31%, var(--egg-spots) 0 5px, transparent 6px),
    radial-gradient(circle at 63% 48%, var(--egg-spots) 0 4px, transparent 5px),
    radial-gradient(circle at 44% 73%, var(--egg-spots) 0 5px, transparent 6px);
}

.bird-egg-plain::after {
  background: radial-gradient(circle at 42% 36%, rgba(255,255,255,0.35) 0 18%, transparent 19%);
}

.bird-egg-large {
  width: min(52vw, 158px);
  height: min(66vw, 202px);
}

.mystery-nest {
  width: 92px;
  height: 72px;
  position: relative;
  display: grid;
  place-items: center;
}

.mystery-nest::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 36px;
  bottom: 8px;
  border-radius: 50%;
  background: #9a6638;
  box-shadow: inset 0 -8px 0 rgba(69, 39, 18, 0.22);
}

.mystery-nest::after {
  content: "";
  position: absolute;
  width: 62px;
  height: 20px;
  bottom: 19px;
  border-radius: 50%;
  background: #c89250;
}

.mystery-nest strong {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 48% 48% 52% 52% / 58% 58% 42% 42%;
  background: rgba(255, 255, 255, 0.76);
  color: var(--teal-dark);
  font-size: 2rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.86), 0 8px 14px rgba(70, 50, 30, 0.12);
}

.mystery-twig {
  position: absolute;
  z-index: 1;
  width: 50px;
  height: 5px;
  bottom: 24px;
  border-radius: 999px;
  background: #6c421f;
}

.mystery-twig:nth-child(1) { transform: rotate(18deg) translateX(-14px); }
.mystery-twig:nth-child(2) { transform: rotate(-21deg) translateX(10px); background: #b17437; }
.mystery-twig:nth-child(3) { transform: rotate(5deg) translateY(9px); }

.mystery-nest-large {
  transform: scale(1.7);
}

.bird-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.08;
}

.bird-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  font-weight: 700;
}

.bird-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(47, 51, 37, 0.42);
}

.bird-modal-card {
  width: min(100%, 430px);
  max-height: min(88dvh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  border-radius: 8px;
  background: var(--paper-solid);
  box-shadow: 0 22px 58px rgba(38, 58, 54, 0.26);
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.modal-photo-wrap {
  width: 100%;
  aspect-ratio: 1;
  margin: 38px 0 14px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(139, 215, 203, 0.18);
  display: grid;
  place-items: center;
}

.modal-photo-wrap .photo-fallback .bird {
  width: 180px;
  height: 180px;
}

.modal-photo-wrap.locked-detail {
  background: rgba(255, 255, 255, 0.65);
}

.bird-modal-card h2 {
  margin: 4px 0 8px;
  font-size: 2rem;
  line-height: 1.04;
}

.bird-modal-card p {
  margin: 12px auto 4px;
  max-width: 32ch;
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.35;
}

.wrong-facts-screen {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.wrong-facts-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.wrong-fact-row,
.empty-state {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px var(--line);
}

.full-row {
  grid-column: 1 / -1;
}

.wrong-fact-row strong {
  font-size: 1.25rem;
}

.wrong-fact-row span,
.empty-state span {
  color: var(--muted);
  font-weight: 850;
}

.empty-state {
  flex-direction: column;
  text-align: center;
}

.pause-panel {
  min-height: 196px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}

.pause-panel strong {
  color: var(--teal-dark);
  font-size: 1.55rem;
}

.pause-panel span {
  max-width: 28ch;
  color: var(--muted);
  font-weight: 850;
}

.hunt-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
}

.egg-result-wrap {
  display: grid;
  place-items: center;
}

.options-screen {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.options-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.option-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px var(--line);
}

.option-group h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.1;
}

.segmented-options,
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segment-option,
.check-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.segment-option input,
.check-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal-dark);
  flex: 0 0 auto;
}

.segment-option:has(input:checked),
.check-option:has(input:checked) {
  color: var(--teal-dark);
  background: rgba(216, 247, 255, 0.72);
}

.check-option.wide {
  width: 100%;
}

.range-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
}

.range-option strong {
  color: var(--teal-dark);
  font-size: 1.25rem;
}

.range-option input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--teal-dark);
}

.hidden {
  display: none !important;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  24% { transform: rotate(-6deg); }
  55% { transform: rotate(5deg); }
  78% { transform: rotate(-2deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  55% { transform: translateX(6px); }
  78% { transform: translateX(-3px); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.68) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes factDrift {
  from { transform: translateY(72%); }
  to { transform: translateY(-100%); }
}

@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(108vh) rotate(320deg); }
}

@media (max-height: 700px) {
  .screen {
    gap: 10px;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .egg-wrap {
    width: min(52vw, 205px);
  }

  .answer-button {
    height: 56px;
  }

  .title {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }
}
