:root {
  color-scheme: light;
  --ink: #24372c;
  --muted: #64736a;
  --cream: #fffdf6;
  --yellow: #ffd94f;
  --yellow-dark: #e6a718;
  --orange: #f58b2a;
  --red: #e95042;
  --green: #71b94a;
  --green-dark: #42863e;
  --sky: #bde9ef;
  --line: rgba(39, 68, 50, 0.13);
  font-family: "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #f6f3e8;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.95) 0 5%, transparent 16%),
    linear-gradient(180deg, #fbf9f0 0%, #f3eee0 100%);
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.page-shell {
  width: 100%;
  margin: 0 auto;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 64px);
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.9), rgba(255, 253, 246, 0));
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: #7a887f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 47% 53%;
  background: var(--yellow);
  box-shadow: 3px 4px 0 rgba(36, 55, 44, 0.12);
  transform: rotate(-3deg);
}

.brand-eye {
  position: absolute;
  top: 16px;
  width: 4px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.brand-eye-left { left: 13px; }
.brand-eye-right { left: 27px; }

.brand-beak {
  position: absolute;
  top: 25px;
  left: 17px;
  width: 12px;
  height: 7px;
  border: 2px solid var(--ink);
  border-radius: 70% 20% 70% 20%;
  background: var(--orange);
  transform: rotate(8deg);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 42px;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #44564b;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 10px rgba(51, 75, 60, 0.05);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  border-color: rgba(52, 82, 61, 0.25);
  background: #fff;
  transform: translateY(-2px);
}

.icon-button:active {
  transform: translateY(0) scale(0.97);
}

.icon-button > span:first-child,
.sound-off {
  font-size: 18px;
  font-weight: 900;
}

.control-label {
  font-size: 12px;
  font-weight: 800;
}

.sound-off { display: none; }
.icon-button[aria-pressed="true"] .sound-on { display: none; }
.icon-button[aria-pressed="true"] .sound-off { display: inline; }

.game-card {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--cream);
  box-shadow:
    0 28px 70px rgba(49, 73, 56, 0.13),
    0 3px 0 rgba(255, 255, 255, 0.85) inset;
}

.scoreboard {
  position: absolute;
  z-index: 20;
  top: 86px;
  left: 50%;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  width: min(680px, calc(100% - 40px));
  min-height: 92px;
  padding: 0 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 246, 0.86);
  box-shadow: 0 12px 35px rgba(42, 73, 53, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.score-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 13px;
  padding: 15px 24px;
  border-left: 1px solid var(--line);
}

.score-item:first-child {
  justify-content: flex-start;
  padding-left: 2px;
  border-left: 0;
}

.score-item small,
.score-item strong {
  display: block;
}

.score-item small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.score-item strong {
  font-size: clamp(24px, 3vw, 35px);
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
}

.score-primary strong {
  color: #d88912;
}

.score-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #f2a617;
  background: #fff4c8;
  font-size: 19px;
}

.chick-symbol {
  position: relative;
  color: var(--yellow);
  text-shadow: 0 1px 0 var(--yellow-dark);
  background: #eef8dd;
}

.chick-symbol::before,
.chick-symbol::after {
  position: absolute;
  top: 9px;
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.chick-symbol::before { left: 11px; }
.chick-symbol::after { right: 11px; }

.egg-mini {
  display: block;
  width: 29px;
  height: 38px;
  border: 2px solid #d7b36a;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: #fffaf0;
  box-shadow: 2px 3px 0 rgba(87, 66, 34, 0.1);
  transform: rotate(-9deg);
}

.score-bump {
  animation: score-bump 260ms cubic-bezier(0.2, 1.6, 0.4, 1);
}

.scene {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, transparent 0 35%, rgba(99, 177, 78, 0.2) 35%),
    linear-gradient(180deg, #c9eef1 0%, var(--sky) 32%, #82c75c 32%, #67ad49 100%);
}

.scene::before {
  position: absolute;
  z-index: 2;
  right: -4%;
  bottom: -22%;
  left: -4%;
  height: 67%;
  border-radius: 50% 47% 0 0 / 32% 35% 0 0;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.15) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 27%, rgba(255, 255, 255, 0.13) 0 2px, transparent 3px),
    #68b34a;
  background-size: 54px 47px, 71px 59px, auto;
  content: "";
}

.sky-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 39px;
  right: 8%;
  width: 67px;
  height: 67px;
  border: 3px solid rgba(151, 112, 23, 0.25);
  border-radius: 50%;
  background: #ffe36a;
  box-shadow: 0 0 0 12px rgba(255, 230, 107, 0.18);
  animation: sun-breathe 4s ease-in-out infinite;
}

.sun span,
.sun::before,
.sun::after {
  position: absolute;
  top: 29px;
  left: 13px;
  width: 38px;
  height: 3px;
  border-radius: 10px;
  background: rgba(243, 184, 45, 0.36);
  content: "";
}

.sun::before { transform: rotate(60deg); }
.sun::after { transform: rotate(-60deg); }

.cloud {
  position: absolute;
  width: 108px;
  height: 38px;
  opacity: 0.82;
}

.cloud i {
  position: absolute;
  bottom: 0;
  display: block;
  border: 2px solid rgba(71, 129, 135, 0.12);
  border-radius: 50% 50% 42% 42%;
  background: #fffef7;
}

.cloud i:nth-child(1) { left: 0; width: 52px; height: 27px; }
.cloud i:nth-child(2) { left: 30px; width: 55px; height: 43px; }
.cloud i:nth-child(3) { right: 0; width: 51px; height: 25px; }
.cloud-one { top: 67px; left: 9%; animation: cloud-drift 7s ease-in-out infinite; }
.cloud-two { top: 135px; right: 23%; transform: scale(0.68); animation: cloud-drift 9s 1.5s ease-in-out infinite reverse; }

.distant-hill {
  position: absolute;
  bottom: 49%;
  width: 57%;
  height: 33%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: #91d06d;
}

.hill-one { left: -17%; transform: rotate(5deg); }
.hill-two { right: -20%; width: 65%; height: 28%; background: #83c562; transform: rotate(-4deg); }

.flower {
  position: absolute;
  z-index: 4;
  color: #fff8e5;
  font-size: 19px;
  text-shadow: 0 1px 0 rgba(68, 105, 49, 0.25);
}

.flower::after {
  position: absolute;
  top: 16px;
  left: 8px;
  width: 2px;
  height: 30px;
  background: var(--green-dark);
  content: "";
}

.flower-one { bottom: 19%; left: 8%; transform: rotate(-8deg); }
.flower-two { right: 11%; bottom: 24%; color: #ffe1eb; transform: scale(0.8) rotate(11deg); }
.flower-three { right: 27%; bottom: 15%; color: #fff1a8; transform: scale(0.7) rotate(-5deg); }

.scene-message {
  position: absolute;
  z-index: 10;
  top: 192px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(63, 103, 75, 0.13);
  border-radius: 99px;
  color: #486255;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 5px 18px rgba(63, 93, 71, 0.08);
  font-size: 12px;
  font-weight: 800;
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
}

.message-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79bd48;
  box-shadow: 0 0 0 4px rgba(121, 189, 72, 0.16);
}

.hen-button {
  --hen-direction: 1;
  position: absolute;
  z-index: 8;
  bottom: 16%;
  left: 50%;
  width: 110px;
  height: 110px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
  transition:
    left 1050ms cubic-bezier(0.42, 0, 0.28, 1),
    bottom 1050ms cubic-bezier(0.42, 0, 0.28, 1);
  will-change: left, bottom;
}

.hen-button.faces-right {
  --hen-direction: -1;
}

.hen-button:focus-visible .hen {
  filter: drop-shadow(0 0 0.4rem #fff) drop-shadow(0 0 0.45rem #3d8060);
}

.hen-button:hover .hen {
  transform: translateX(-50%) translateY(-2px) rotate(1deg) scale(0.35) scaleX(var(--hen-direction));
}

.hen-button:active .hen {
  transform: translateX(-50%) translateY(2px) scale(0.33) scaleX(var(--hen-direction));
}

.hen {
  position: absolute;
  top: -115px;
  left: 50%;
  display: block;
  width: 205px;
  height: 225px;
  transform: translateX(-50%) scale(0.34) scaleX(var(--hen-direction));
  transform-origin: 50% 100%;
  transition: transform 170ms ease;
}

.hen-shadow {
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 62px;
  height: 10px;
  border-radius: 50%;
  background: rgba(41, 86, 41, 0.21);
  filter: blur(1px);
  transform: translateX(-50%);
}

.hen-body {
  position: absolute;
  z-index: 3;
  right: 5px;
  bottom: 29px;
  width: 155px;
  height: 145px;
  border: 4px solid var(--ink);
  border-radius: 58% 48% 50% 53% / 60% 54% 48% 44%;
  background: var(--yellow);
  box-shadow:
    inset -14px -13px 0 rgba(224, 163, 27, 0.14),
    7px 9px 0 rgba(43, 70, 50, 0.1);
  transform: rotate(5deg);
}

.hen-wing {
  position: absolute;
  right: 26px;
  bottom: 24px;
  width: 81px;
  height: 75px;
  border: 3px solid var(--ink);
  border-radius: 58% 42% 60% 40% / 60% 50% 50% 40%;
  background: #f5ba35;
  transform: rotate(-9deg);
  transform-origin: 75% 35%;
}

.hen-wing i {
  position: absolute;
  right: 7px;
  width: 28px;
  height: 3px;
  border-radius: 10px;
  background: var(--ink);
  opacity: 0.65;
  transform-origin: right;
}

.hen-wing i:nth-child(1) { top: 26px; transform: rotate(-15deg); }
.hen-wing i:nth-child(2) { top: 37px; width: 34px; }
.hen-wing i:nth-child(3) { top: 49px; transform: rotate(17deg); }

.hen-head {
  position: absolute;
  z-index: 6;
  top: 27px;
  left: 10px;
  width: 104px;
  height: 105px;
  border: 4px solid var(--ink);
  border-radius: 50% 51% 45% 55% / 54% 50% 50% 46%;
  background: #ffe05f;
  box-shadow: inset -8px -8px 0 rgba(229, 169, 28, 0.12);
  transform: rotate(-7deg);
}

.hen-eye {
  position: absolute;
  top: 36px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.hen-eye::after {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: white;
  content: "";
}

.hen-eye-one { left: 27px; }
.hen-eye-two { left: 52px; }

.hen-cheek {
  position: absolute;
  top: 53px;
  left: 55px;
  width: 15px;
  height: 9px;
  border-radius: 50%;
  background: rgba(239, 109, 80, 0.42);
}

.hen-beak {
  position: absolute;
  z-index: 2;
  top: 52px;
  left: -22px;
  width: 36px;
  height: 24px;
  border: 4px solid var(--ink);
  border-radius: 80% 18% 75% 20%;
  background: var(--orange);
  transform: rotate(8deg) skewX(-8deg);
}

.hen-beak::after {
  position: absolute;
  top: 8px;
  right: 2px;
  left: 3px;
  height: 2px;
  border-radius: 4px;
  background: rgba(112, 62, 24, 0.5);
  content: "";
}

.comb {
  position: absolute;
  z-index: -1;
  top: -17px;
  width: 31px;
  height: 37px;
  border: 4px solid var(--ink);
  border-radius: 55% 55% 45% 45%;
  background: var(--red);
}

.comb-one { left: 15px; transform: rotate(-20deg); }
.comb-two { top: -24px; left: 37px; height: 42px; }
.comb-three { top: -16px; left: 61px; transform: rotate(20deg); }

.hen-tail {
  position: absolute;
  z-index: 1;
  right: -23px;
  bottom: 73px;
  width: 72px;
  height: 54px;
  border: 4px solid var(--ink);
  border-radius: 65% 45% 55% 45%;
  background: #f7bf34;
  transform-origin: left center;
}

.hen-tail-one { transform: rotate(-29deg); }
.hen-tail-two { right: -35px; bottom: 50px; transform: rotate(2deg); }
.hen-tail-three { right: -23px; bottom: 29px; transform: rotate(28deg); }

.hen-leg {
  position: absolute;
  z-index: 2;
  bottom: 3px;
  width: 4px;
  height: 39px;
  border-radius: 5px;
  background: var(--ink);
}

.hen-leg-one { left: 89px; }
.hen-leg-two { left: 139px; }

.hen-leg i,
.hen-leg::before,
.hen-leg::after {
  position: absolute;
  bottom: -1px;
  left: -12px;
  width: 18px;
  height: 4px;
  border-radius: 5px;
  background: var(--ink);
  content: "";
  transform-origin: right;
}

.hen-leg::before { transform: rotate(-23deg); }
.hen-leg::after { transform: rotate(23deg); }
.hen-leg i { transform: rotate(2deg); }

.tap-hint {
  position: absolute;
  top: -2px;
  right: -28px;
  padding: 5px 9px;
  border: 1px solid rgba(60, 92, 66, 0.11);
  border-radius: 10px 10px 10px 2px;
  color: #51685a;
  background: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hen-button:hover .tap-hint,
.hen-button:focus-visible .tap-hint {
  opacity: 1;
  transform: translateY(0);
}

.hen.is-laying {
  animation: hen-lay 360ms cubic-bezier(0.35, 0.1, 0.3, 1.4);
}

.hen-button.is-walking .hen-leg-one {
  animation: leg-step 260ms ease-in-out infinite alternate;
}

.hen-button.is-walking .hen-leg-two {
  animation: leg-step 260ms 130ms ease-in-out infinite alternate-reverse;
}

.hen-button.is-walking .hen-shadow {
  animation: walking-shadow 520ms ease-in-out infinite;
}

.hen.is-laying .hen-wing {
  animation: wing-flap 340ms ease-out;
}

.hen.is-laying .hen-tail {
  animation: tail-wiggle 340ms ease-in-out;
}

.hen.is-laying .hen-beak {
  animation: beak-cluck 230ms ease-in-out;
}

.eggs-layer,
.chicks-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.egg {
  position: absolute;
  z-index: var(--egg-z, 1);
  width: clamp(17px, 2vw, 27px);
  aspect-ratio: 0.76;
  border: 2px solid #b89456;
  border-radius: 50% 50% 46% 46% / 62% 62% 39% 39%;
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.95) 0 8%, transparent 9%),
    linear-gradient(135deg, #fffdf5, #f5e6c4);
  box-shadow: 2px 4px 0 rgba(49, 75, 48, 0.12);
  transform: translate(-50%, -50%) rotate(var(--egg-tilt, 0deg));
  transform-origin: center bottom;
}

.egg::before,
.egg::after {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(178, 132, 73, 0.32);
  content: "";
}

.egg::before { top: 20px; left: 8px; }
.egg::after { top: 12px; right: 7px; }

.egg.is-hatching {
  animation: egg-hatch 620ms ease-in-out forwards;
}

.chick {
  position: absolute;
  z-index: var(--chick-z, 4);
  width: clamp(34px, 4.4vw, 51px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 52% 48% 47% 53%;
  background: #ffdc4d;
  box-shadow: inset -4px -4px 0 rgba(211, 145, 22, 0.12), 3px 4px 0 rgba(43, 75, 43, 0.1);
  transform: translate(-50%, -50%);
  animation: chick-arrive 480ms cubic-bezier(0.25, 1.7, 0.5, 1) both, chick-bob 1.8s 500ms ease-in-out infinite;
}

.chick::before,
.chick::after {
  position: absolute;
  top: 36%;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.chick::before { left: 26%; }
.chick::after { right: 26%; }

.chick-beak {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 11px;
  height: 7px;
  border: 1.5px solid var(--ink);
  border-radius: 60% 20% 60% 20%;
  background: var(--orange);
  transform: translateX(-50%) rotate(7deg);
}

.chick-tuft {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 10px;
  border-top: 2px solid var(--ink);
  border-radius: 50%;
  transform: translateX(-50%) rotate(-12deg);
}

.grass-foreground {
  position: absolute;
  z-index: 9;
  right: 0;
  bottom: 0;
  left: 0;
  height: 24px;
  pointer-events: none;
}

.grass-foreground i {
  position: absolute;
  bottom: -4px;
  width: 2px;
  height: 28px;
  border-radius: 100% 0 0 0;
  background: #3f8d3d;
  transform: rotate(18deg);
}

.grass-foreground i:nth-child(1) { left: 5%; }
.grass-foreground i:nth-child(2) { left: 22%; height: 18px; transform: rotate(-24deg); }
.grass-foreground i:nth-child(3) { left: 37%; height: 35px; }
.grass-foreground i:nth-child(4) { right: 36%; height: 21px; transform: rotate(-17deg); }
.grass-foreground i:nth-child(5) { right: 18%; height: 32px; }
.grass-foreground i:nth-child(6) { right: 4%; height: 19px; transform: rotate(-25deg); }

.game-controls {
  position: absolute;
  z-index: 22;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px 32px 20px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0), rgba(255, 253, 246, 0.9) 30%);
  pointer-events: none;
}

.game-controls > * {
  pointer-events: auto;
}

.lay-button {
  position: relative;
  display: flex;
  align-items: center;
  width: min(600px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 12px 20px;
  border: 3px solid var(--ink);
  border-radius: 21px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow:
    0 7px 0 #c88d20,
    0 10px 16px rgba(70, 67, 36, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.lay-button:hover {
  background: #ffe267;
  transform: translateY(-2px);
  box-shadow:
    0 9px 0 #c88d20,
    0 13px 19px rgba(70, 67, 36, 0.17),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.lay-button:active,
.lay-button.is-pressed {
  transform: translateY(5px) scale(0.995);
  box-shadow:
    0 2px 0 #c88d20,
    0 4px 8px rgba(70, 67, 36, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.lay-button:focus-visible,
.icon-button:focus-visible {
  outline: 4px solid rgba(55, 126, 94, 0.28);
  outline-offset: 3px;
}

.button-egg {
  width: 37px;
  height: 47px;
  flex: 0 0 auto;
  margin: 0 18px 0 4px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 46% 46% / 62% 62% 39% 39%;
  background: #fffdf3;
  box-shadow: inset -4px -5px 0 #f3e4bb;
  transform: rotate(-7deg);
}

.button-copy {
  min-width: 0;
  text-align: left;
}

.button-copy strong,
.button-copy small {
  display: block;
}

.button-copy strong {
  font-size: 19px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.button-copy small {
  margin-top: 2px;
  color: #6a5b2c;
  font-size: 11px;
  font-weight: 700;
}

.button-key {
  margin-left: auto;
  padding: 8px 11px 7px;
  border: 2px solid rgba(40, 55, 46, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 0 rgba(52, 55, 42, 0.32);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.tiny-note {
  margin: 19px 0 0;
  color: #7a857e;
  font-size: 11px;
  text-align: center;
}

.tiny-note span {
  margin: 0 8px;
  color: #bac0bc;
}

.tiny-note strong {
  color: #5b6a61;
}

footer {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 75px;
  gap: 10px;
  color: #869089;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer-egg {
  width: 9px;
  height: 12px;
  border: 1px solid #aeb5af;
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
}

.toast {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 17px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  color: var(--ink);
  background: #fff9d7;
  box-shadow: 0 8px 24px rgba(43, 62, 49, 0.2);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -15px) scale(0.96);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast > span:first-child {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 15px;
  border-radius: 12px;
  color: #fff;
  background: #8c3f36;
  text-align: center;
}

@keyframes hen-lay {
  0%, 100% { transform: translateX(-50%) scale(0.34) scaleX(var(--hen-direction)); }
  24% { transform: translateX(-50%) translateY(-5px) rotate(-4deg) scale(0.34) scaleX(var(--hen-direction)); }
  55% { transform: translateX(-50%) translateY(4px) rotate(3deg) scale(0.34, 0.32) scaleX(var(--hen-direction)); }
  78% { transform: translateX(-50%) translateY(-2px) scale(0.34) scaleX(var(--hen-direction)); }
}

@keyframes leg-step {
  from { transform: rotate(-11deg); }
  to { transform: rotate(11deg); }
}

@keyframes walking-shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.9; }
  50% { transform: translateX(-50%) scaleX(0.82); opacity: 0.65; }
}

@keyframes wing-flap {
  0%, 100% { transform: rotate(-9deg); }
  40% { transform: rotate(19deg) translateY(-7px); }
}

@keyframes tail-wiggle {
  0%, 100% { margin-right: 0; }
  35% { margin-right: 8px; }
  70% { margin-right: -3px; }
}

@keyframes beak-cluck {
  0%, 100% { clip-path: inset(0); }
  50% { clip-path: polygon(0 0, 100% 0, 100% 42%, 0 75%); }
}

@keyframes egg-hatch {
  0%, 45% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--egg-tilt, 0deg)) scale(1); }
  15%, 35% { transform: translate(-50%, -50%) rotate(calc(var(--egg-tilt, 0deg) - 11deg)) scale(1.04); }
  25%, 45% { transform: translate(-50%, -50%) rotate(calc(var(--egg-tilt, 0deg) + 11deg)) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes chick-arrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.1) rotate(-15deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes chick-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

@keyframes score-bump {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.28) rotate(-3deg); }
}

@keyframes cloud-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 16px 3px; }
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (max-width: 680px) {
  .page-shell {
    width: 100%;
  }

  .topbar {
    min-height: 76px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-eye { top: 13px; }
  .brand-eye-left { left: 11px; }
  .brand-eye-right { left: 24px; }
  .brand-beak { top: 22px; left: 14px; }

  .brand small,
  .control-label {
    display: none;
  }

  .icon-button {
    min-width: 41px;
    width: 41px;
    height: 41px;
    padding: 0;
  }

  .game-card {
    height: 100dvh;
    border-radius: 0;
  }

  .scoreboard {
    top: 74px;
    width: calc(100% - 20px);
    min-height: 76px;
    padding: 0 12px;
  }

  .score-item {
    gap: 6px;
    padding: 10px 8px;
  }

  .score-item:first-child {
    padding-left: 0;
  }

  .score-symbol,
  .egg-mini {
    display: none;
  }

  .score-item small {
    font-size: 9px;
    letter-spacing: 0;
  }

  .scene {
    height: 100dvh;
    min-height: 560px;
  }

  .hen-button {
    transform: translateX(-50%);
  }

  .scene-message {
    top: 158px;
  }

  .sun {
    top: 52px;
    right: 7%;
    transform: scale(0.8);
  }

  .cloud-one { left: 3%; transform: scale(0.72); }
  .cloud-two { display: none; }

  .game-controls {
    padding: 35px 12px 12px;
  }

  .lay-button {
    min-height: 70px;
    padding: 10px 14px;
    border-radius: 18px;
  }

  .button-egg {
    width: 31px;
    height: 41px;
    margin-right: 12px;
  }

  .button-copy strong { font-size: 17px; }
  .button-copy small { font-size: 9px; }
  .button-key { display: none; }

  .tiny-note {
    margin-top: 16px;
    line-height: 1.5;
  }

  .tiny-note span,
  .tiny-note span + * {
    display: none;
  }

  footer {
    min-height: 58px;
  }
}

@media (max-height: 720px) and (min-width: 681px) {
  .topbar { min-height: 74px; }
  .scoreboard { top: 68px; min-height: 76px; }
  .scene-message { top: 151px; }
  .scene { height: 100dvh; min-height: 560px; }
  .game-controls { padding-top: 35px; padding-bottom: 10px; }
  footer { min-height: 55px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
