/* Goose Chase — royal storybook. Soft skies, candy buttons, frosted cards. */

:root {
  --ink: #3b2a4a;
  --sub: #8c7a96;
  --cream: #fff8f1;
  --pink-1: #ff9cc2;
  --pink-2: #ff5f9b;
  --pink-edge: #d43f7c;
  --gold: #ffcf5c;
  --gold-edge: #c98a1e;
  --mint: #5fd3a0;
  --mint-edge: #33a273;
  --glass: rgba(255, 255, 255, 0.82);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 2px 0 rgba(90, 50, 90, 0.06), 0 10px 28px rgba(90, 50, 90, 0.12);
  --soft-shadow: 0 6px 18px rgba(90, 50, 90, 0.1);
  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, -apple-system, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.ico {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  display: inline-block;
  vertical-align: -0.2em;
}

#app {
  position: fixed;
  inset: 0;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}
@media (min-width: 600px) {
  body {
    background: radial-gradient(circle at 50% 0, #ffe3ee, #fff3e8 60%);
  }
  #app {
    box-shadow: 0 0 60px rgba(90, 50, 90, 0.12);
  }
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(var(--st) + 8px) 16px calc(var(--sb) + 12px);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: linear-gradient(180deg, #fff1ea 0%, var(--cream) 30%);
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #fbf4f8);
  font-weight: 800;
  font-size: 16px;
  box-shadow: inset 0 -2px 0 rgba(90, 50, 90, 0.06), 0 4px 0 #ead9e4, 0 8px 18px rgba(90, 50, 90, 0.1);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.2s;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 -2px 0 rgba(90, 50, 90, 0.06), 0 1px 0 #ead9e4, 0 3px 8px rgba(90, 50, 90, 0.1);
}
.btn.primary {
  color: white;
  background: linear-gradient(180deg, var(--pink-1) 0%, var(--pink-2) 100%);
  text-shadow: 0 1.5px 0 rgba(170, 30, 90, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(150, 20, 70, 0.12), 0 5px 0 var(--pink-edge), 0 14px 26px rgba(212, 63, 124, 0.32);
}
.btn.primary:active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 2px 0 var(--pink-edge), 0 6px 12px rgba(212, 63, 124, 0.3);
}
.btn.primary::after {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  top: 3px;
  height: 40%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn.big {
  min-height: 58px;
  font-size: 19px;
  width: 100%;
}
.btn.huge {
  min-height: 72px;
  font-size: 26px;
  width: 100%;
  border-radius: 28px;
  letter-spacing: 0.01em;
}
.btn.huge .ico {
  width: 26px;
  height: 26px;
}
.btn small {
  font-weight: 800;
  font-size: 13px;
  opacity: 0.9;
}
.btn.huge small {
  font-size: 15px;
  background: rgba(255, 255, 255, 0.24);
  padding: 4px 11px;
  border-radius: 999px;
  text-shadow: none;
}
.btn.big small {
  display: block;
  font-size: 12px;
}
.btn.ghost {
  background: transparent;
  box-shadow: none;
  color: var(--sub);
}
.btn.ghost:active {
  transform: scale(0.97);
}
.btn.small {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
}
.btn.danger {
  color: #c8324a;
}
.btn.danger:not(.ghost) {
  background: linear-gradient(#ef5a72, #c8324a);
  color: white;
  box-shadow: 0 4px 0 #8f1f33;
}
.btn[disabled] {
  filter: grayscale(0.9);
  opacity: 0.55;
  pointer-events: none;
}
.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 0 rgba(90, 50, 90, 0.08), 0 6px 16px rgba(90, 50, 90, 0.1);
  font-size: 20px;
  color: var(--ink);
}
.icon-btn:active {
  transform: translateY(2px) scale(0.97);
}
.icon-btn.small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}
.row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}
.row .btn {
  flex: 1;
}
.small {
  font-size: 14px;
  color: var(--sub);
}

/* ---------- top bars ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  flex: none;
  position: relative;
  z-index: 3;
}
.topbar .title {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 7px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 3px 0 rgba(90, 50, 90, 0.08), 0 6px 16px rgba(90, 50, 90, 0.1);
  font-variant-numeric: tabular-nums;
}
.wallet .ico {
  width: 26px;
  height: 26px;
}

/* ---------- ribbon banner ---------- */

.ribbon {
  position: relative;
  display: inline-block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 6px 10px rgba(212, 63, 124, 0.25));
}
.ribbon span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 9px 28px 11px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff94bf, #ff5f9b);
  color: white;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(170, 30, 90, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(150, 20, 70, 0.15);
}
.ribbon::before,
.ribbon::after {
  content: '';
  position: absolute;
  top: 9px;
  bottom: -9px;
  width: 34px;
  background: #e2468a;
  z-index: 0;
}
.ribbon::before {
  left: -22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%);
}
.ribbon::after {
  right: -22px;
  clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%);
}
.ribbon.small span {
  font-size: 12px;
  padding: 5px 16px 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ribbon.small::before,
.ribbon.small::after {
  top: 6px;
  bottom: -6px;
  width: 22px;
}
.ribbon.small::before {
  left: -14px;
}
.ribbon.small::after {
  right: -14px;
}
.ribbon.sad span {
  background: linear-gradient(180deg, #b3a6ff, #8a78f0);
  text-shadow: 0 2px 0 rgba(70, 50, 160, 0.35);
}
.ribbon.sad::before,
.ribbon.sad::after {
  background: #7563dc;
}
.ribbon.sad {
  filter: drop-shadow(0 6px 10px rgba(117, 99, 220, 0.25));
}

/* ---------- home ---------- */

#home {
  background: linear-gradient(180deg, #ffd6e7 0%, #ffe6de 40%, #fff1e6 70%, var(--cream) 100%);
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}
#home .topbar {
  padding: 0 16px;
}
.logo {
  margin: -2px 0 0;
  text-align: center;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 2;
  flex: none;
}
.logo .l1,
.logo .l2 {
  display: block;
}
.logo .l1 {
  font-size: clamp(50px, 15.5vw, 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(90, 50, 90, 0.15);
}
.logo .l2 {
  font-size: clamp(46px, 14.5vw, 68px);
  background: linear-gradient(180deg, #ff8fbb, #ff4f92);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(255, 255, 255, 0.95)) drop-shadow(0 8px 14px rgba(212, 63, 124, 0.25));
  margin-top: 2px;
}
.logo .oo {
  display: inline-flex;
  align-items: center;
  margin: 0 0.03em;
}
.logo .oo i {
  width: 0.52em;
  height: 0.52em;
  border-radius: 50%;
  display: block;
  margin-top: 0.15em;
  box-shadow: inset 0 -0.05em 0 rgba(0, 0, 0, 0.12), 0 0.06em 0 rgba(255, 255, 255, 0.9);
}
.logo .oo em {
  width: 0.34em;
  height: 0.11em;
  display: block;
  margin: 0.15em -0.05em 0;
  border-radius: 1em;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: -14px;
}
.scene {
  position: absolute;
  inset: 0 0 -30px 0;
  pointer-events: none;
}
.scene-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.scene .cloud {
  animation: drift 22s ease-in-out infinite alternate;
}
.scene .cloud-b {
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}
.scene .cloud-c {
  animation-duration: 26s;
}
@keyframes drift {
  to {
    transform: translateX(26px);
  }
}
.scene .flag {
  animation: flag 1.6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: left center;
}
@keyframes flag {
  to {
    transform: scaleX(0.75) skewY(6deg);
  }
}
.stage .side {
  position: absolute;
  bottom: 2px;
  width: 27%;
  max-width: 128px;
  z-index: 2;
  filter: drop-shadow(0 6px 6px rgba(60, 90, 50, 0.22));
}
.stage .king-mini {
  left: 3%;
  animation: sway 4s ease-in-out infinite;
}
.stage .princess-mini {
  right: 3%;
  animation: sway 4s ease-in-out -2s infinite;
}
@keyframes sway {
  50% {
    transform: translateY(-3px) rotate(1.5deg);
  }
}
.stage .side svg {
  width: 100%;
  display: block;
}
.throne {
  position: relative;
  z-index: 3;
  width: 50%;
  max-width: 230px;
  margin-bottom: -6px;
}
.home-goose {
  position: relative;
  z-index: 2;
  width: 86%;
  margin: 0 auto -16%;
  filter: drop-shadow(0 6px 6px rgba(90, 50, 90, 0.18));
  cursor: pointer;
}
.cushion svg {
  width: 100%;
  display: block;
}
.hearts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.pet-heart {
  position: absolute;
  color: #ff5f9b;
  font-size: 28px;
  animation: heartUp 1.1s ease-out forwards;
  filter: drop-shadow(0 2px 2px rgba(212, 63, 124, 0.3));
}
@keyframes heartUp {
  from {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--dx)), -150px) scale(1.25);
    opacity: 0;
  }
}
.speech {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 74%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  background: white;
  padding: 8px 14px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: var(--soft-shadow);
  pointer-events: none;
}
.speech::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: white;
}
.speech.show {
  animation: speech 2.6s ease forwards;
}
@keyframes speech {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.6);
  }
  10%,
  80% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(1);
  }
}
.home-panel {
  position: relative;
  z-index: 4;
  flex: none;
  background: var(--cream);
  border-radius: 34px 34px 0 0;
  padding: 18px 16px calc(var(--sb) + 14px);
  box-shadow: 0 -10px 30px rgba(90, 50, 90, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chase {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.chase-head small {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink-edge);
}
.chase-head b {
  font-size: 18px;
  font-weight: 900;
}
.chase-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #f2e6ee;
  margin: 14px 34px 4px 8px;
  box-shadow: inset 0 2px 3px rgba(90, 50, 90, 0.1);
}
.chase-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb3d0, #ff5f9b);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
.chase-p {
  position: absolute;
  top: 50%;
  width: 40px;
  transform: translate(-50%, -62%);
  filter: drop-shadow(0 2px 2px rgba(90, 50, 90, 0.2));
}
.chase-p svg {
  width: 100%;
  display: block;
}
.chase-goose {
  position: absolute;
  right: -38px;
  top: 50%;
  width: 50px;
  transform: translateY(-64%);
  animation: tease 1.8s ease-in-out infinite;
}
@keyframes tease {
  50% {
    transform: translateY(-72%) rotate(-6deg);
  }
}
.chase-note {
  color: var(--sub);
  font-weight: 700;
  font-size: 13px;
}
.dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
}
.dock-btn span {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: white;
  box-shadow: 0 3px 0 #efdfe9, 0 8px 16px rgba(90, 50, 90, 0.08);
  color: var(--pink-2);
  transition: transform 0.1s;
}
.dock-btn span .ico {
  width: 28px;
  height: 28px;
}
.dock-btn:active span {
  transform: translateY(2px) scale(0.96);
}
.dock-btn.glow span {
  background: linear-gradient(180deg, #fff7d9, #ffe9a3);
  color: #c4801a;
  box-shadow: 0 3px 0 #ecca73, 0 8px 18px rgba(201, 138, 30, 0.25);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  50% {
    transform: scale(1.06);
  }
}
.badge {
  position: absolute;
  top: -5px;
  right: calc(50% - 34px);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pink-2);
  color: white;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 var(--pink-edge), 0 0 0 2.5px var(--cream);
}
.badge.ok {
  background: var(--mint);
  box-shadow: 0 2px 0 var(--mint-edge), 0 0 0 2.5px var(--cream);
}
.badge .ico {
  width: 13px;
  height: 13px;
  color: white;
}
.install-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #fff3c9;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
}
.install-hint .ico {
  color: #3d8be0;
}

/* ---------- Goose ---------- */

.goose svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.goose .eyes,
.goose .mouth,
.goose .brows,
.goose .blush,
.goose .g-zzz {
  display: none;
}
.goose[data-mood='idle'] .eyes-open,
.goose[data-mood='idle'] .mouth-w,
.goose[data-mood='happy'] .eyes-happy,
.goose[data-mood='happy'] .mouth-open,
.goose[data-mood='happy'] .blush,
.goose[data-mood='excited'] .eyes-big,
.goose[data-mood='excited'] .mouth-open,
.goose[data-mood='excited'] .blush,
.goose[data-mood='sleepy'] .eyes-closed,
.goose[data-mood='sleepy'] .mouth-w,
.goose[data-mood='sleepy'] .g-zzz,
.goose[data-mood='sad'] .eyes-big,
.goose[data-mood='sad'] .mouth-flat,
.goose[data-mood='sad'] .brows,
.goose[data-mood='surprised'] .eyes-big,
.goose[data-mood='surprised'] .mouth-o,
.goose[data-mood='love'] .eyes-happy,
.goose[data-mood='love'] .mouth-w,
.goose[data-mood='love'] .blush {
  display: inline;
}
.goose.blink[data-mood='idle'] .eyes-open {
  display: none;
}
.goose.blink[data-mood='idle'] .eyes-closed {
  display: inline;
}
.goose.still *,
.goose.still {
  animation: none !important;
}
.goose .pupil {
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform 0.12s ease-out;
}
.goose[data-mood='sad'] .pupil {
  transform: translate(0, -2px);
}
.goose .g-tail {
  transform-origin: 140px 186px;
  transform-box: view-box;
  animation: tail 3.2s ease-in-out infinite;
}
@keyframes tail {
  0%,
  100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(-9deg);
  }
}
.goose .g-ear-l {
  transform-origin: 66px 64px;
  transform-box: view-box;
  animation: earL 7s ease-in-out infinite;
}
@keyframes earL {
  0%,
  92%,
  100% {
    transform: none;
  }
  95% {
    transform: rotate(-12deg);
  }
}
.goose .g-head {
  transform-origin: 100px 140px;
  transform-box: view-box;
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(1.2px) rotate(0.6deg);
  }
}
.goose[data-mood='sleepy'] .g-head {
  animation: snooze 3s ease-in-out infinite;
}
@keyframes snooze {
  0%,
  100% {
    transform: rotate(-3deg) translateY(2px);
  }
  50% {
    transform: rotate(-5deg) translateY(4px);
  }
}
.goose .g-zzz {
  animation: zzz 2.4s ease-in-out infinite;
}
@keyframes zzz {
  0% {
    opacity: 0;
    transform: translate(0, 6px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(6px, -8px);
  }
}
.goose .float {
  animation: halo 2.6s ease-in-out infinite;
}
@keyframes halo {
  50% {
    transform: translateY(-3px);
  }
}
.goose.hop {
  animation: hop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes hop {
  30% {
    transform: translateY(-14%) scale(1.04, 0.96);
  }
  60% {
    transform: translateY(0) scale(1.06, 0.92);
  }
}
.goose.wiggle {
  animation: wiggle 0.5s ease;
}
@keyframes wiggle {
  25% {
    transform: rotate(-5deg) scale(1.03);
  }
  60% {
    transform: rotate(4deg) scale(1.02);
  }
}
.goose.pounce {
  animation: pounce 0.6s ease;
}
@keyframes pounce {
  30% {
    transform: translateY(6%) scale(1.08, 0.88);
  }
  55% {
    transform: translateY(-12%) scale(0.95, 1.08);
  }
}

/* ---------- game ---------- */

#game {
  padding-left: 12px;
  padding-right: 12px;
  gap: 8px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, var(--g1, #ffe9d2) 0%, var(--g2, #ffd3a8) 100%);
}
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
}
.hud-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}
.hud-title small {
  font-size: 11px;
  color: color-mix(in srgb, var(--gi, #8c7a96) 85%, black);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hud-title b {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.hud-score {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: 0 3px 0 rgba(90, 50, 90, 0.08);
  min-width: 70px;
}
.hud-score .ico {
  width: 22px;
  height: 22px;
}
.hud2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 8px 12px 8px 8px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
}
.moves {
  position: relative;
  width: 66px;
  height: 66px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.moves .ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.moves .ring circle {
  fill: none;
  stroke-width: 6;
}
.moves .ring .track {
  stroke: rgba(59, 42, 74, 0.08);
}
.moves .ring .fill {
  stroke: var(--pink-2);
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}
.moves b {
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.moves small {
  font-size: 8.5px;
  color: var(--sub);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}
.moves.low .ring .fill {
  stroke: #ff6a4d;
}
.moves.low b {
  color: #e8463a;
  animation: pulse 0.9s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    transform: scale(1.14);
  }
}
.goals {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.goal-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  background: white;
  font-weight: 900;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 0 rgba(90, 50, 90, 0.07), inset 0 0 0 1.5px rgba(59, 42, 74, 0.04);
  transition: background 0.3s;
}
.goal-chip .gi {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.goal-chip .gi .ico {
  width: 28px;
  height: 28px;
}
.goal-chip b {
  min-width: 18px;
  text-align: center;
}
.goal-chip b .ico {
  width: 20px;
  height: 20px;
  color: white;
}
.goal-chip.done {
  background: var(--mint);
  color: white;
  box-shadow: 0 2px 0 var(--mint-edge);
}
.goal-chip.bump .gi {
  animation: bump 0.25s ease;
}
@keyframes bump {
  50% {
    transform: scale(1.32);
  }
}
.goal-chip.big {
  flex-direction: column;
  padding: 10px 14px 8px;
  border-radius: 20px;
  gap: 2px;
  font-size: 22px;
}
.goal-chip.big .gi,
.goal-chip.big .gi .ico {
  width: 40px;
  height: 40px;
}
.goal-chip.big b .ico {
  color: var(--mint);
}
.sq-ico {
  color: var(--pink-2);
  display: inline-flex;
}
.board-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: none;
}
.board-bg {
  position: absolute;
  border-radius: 28px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 4px rgba(255, 255, 255, 0.55), 0 16px 34px rgba(90, 50, 90, 0.16);
}
canvas.board {
  position: absolute;
  inset: 0;
  touch-action: none;
  z-index: 1;
}
.hud-goose {
  position: absolute;
  z-index: 2;
  cursor: pointer;
  filter: drop-shadow(0 4px 4px rgba(90, 50, 90, 0.2));
}
.banner {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) scale(0.6) rotate(-4deg);
  opacity: 0;
  font-weight: 900;
  font-size: 34px;
  white-space: nowrap;
  color: white;
  background: linear-gradient(180deg, #ff94bf, #ff5f9b);
  padding: 14px 28px;
  border-radius: 22px;
  text-shadow: 0 2px 0 rgba(170, 30, 90, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 6px 0 var(--pink-edge), 0 20px 40px rgba(212, 63, 124, 0.35);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.3, 1.7, 0.5, 1), opacity 0.2s;
}
.banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-4deg);
}
.tools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  padding: 0 6px;
}
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
}
.tool-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  box-shadow: 0 4px 0 rgba(90, 50, 90, 0.1), 0 10px 20px rgba(90, 50, 90, 0.12);
  color: #a8865f;
  transition: transform 0.12s, background 0.2s;
}
.tool-ico .ico {
  width: 30px;
  height: 30px;
}
.tool[data-tool='zoomies'] .tool-ico {
  color: #e2a21c;
}
.tool b {
  position: absolute;
  top: -3px;
  right: 2px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 2.5px white;
}
.tool small {
  font-size: 12px;
  font-weight: 900;
  color: color-mix(in srgb, var(--gi, #3b2a4a) 70%, black);
}
.tool:active .tool-ico {
  transform: translateY(2px) scale(0.95);
}
.tool.active .tool-ico {
  background: linear-gradient(180deg, var(--pink-1), var(--pink-2));
  color: white;
  box-shadow: 0 4px 0 var(--pink-edge), 0 0 0 6px rgba(255, 95, 155, 0.2);
  animation: glow 1.2s ease-in-out infinite;
}
.tool-hint {
  flex: 1;
  align-self: center;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: color-mix(in srgb, var(--gi, #3b2a4a) 75%, black);
  min-height: 1em;
}
.flyer {
  position: fixed;
  z-index: 50;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 2px white, 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ---------- board backgrounds ---------- */

.bg-plain {
  background: #ffffff;
}
.bg-gingham {
  background-color: #fff7f9;
  background-image: linear-gradient(90deg, rgba(255, 143, 177, 0.18) 50%, transparent 50%), linear-gradient(rgba(255, 143, 177, 0.18) 50%, transparent 50%);
  background-size: 28px 28px;
}
.bg-polka {
  background-color: #fffaf0;
  background-image: radial-gradient(rgba(246, 193, 67, 0.35) 18%, transparent 20%), radial-gradient(rgba(246, 193, 67, 0.35) 18%, transparent 20%);
  background-size: 34px 34px;
  background-position: 0 0, 17px 17px;
}
.bg-stripes {
  background: repeating-linear-gradient(45deg, #fff6fa 0 16px, #ffe8f1 16px 32px);
}
.bg-meadow {
  background-color: #f1faec;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 158, 192, 0.5) 3px, transparent 4px), radial-gradient(circle at 70% 70%, rgba(255, 211, 110, 0.6) 3px, transparent 4px), radial-gradient(circle at 80% 20%, rgba(143, 196, 255, 0.5) 2.5px, transparent 3.5px);
  background-size: 60px 60px, 80px 80px, 50px 50px;
}
.bg-clouds {
  background-color: #eaf6ff;
  background-image: radial-gradient(ellipse 40px 18px at 30% 40%, rgba(255, 255, 255, 0.9) 98%, transparent), radial-gradient(ellipse 30px 14px at 75% 75%, rgba(255, 255, 255, 0.9) 98%, transparent);
  background-size: 140px 120px;
}
.bg-hearts {
  background-color: #fff5f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 28s-7-4.3-8.6-8.7C10.2 15.8 12.6 13 15.6 13.4 17.6 13.7 20 16 20 16s2.4-2.3 4.4-2.6c3-.4 5.4 2.4 4.2 5.9C27 23.7 20 28 20 28z' fill='%23ffc2d6' fill-opacity='.55'/%3E%3C/svg%3E");
}
.bg-quilt {
  background-color: #fff8ef;
  background-image: linear-gradient(45deg, rgba(255, 158, 192, 0.18) 25%, transparent 25%, transparent 75%, rgba(255, 158, 192, 0.18) 75%), linear-gradient(45deg, rgba(143, 196, 255, 0.18) 25%, transparent 25%, transparent 75%, rgba(143, 196, 255, 0.18) 75%);
  background-size: 48px 48px;
  background-position: 0 0, 24px 24px;
}
.bg-night {
  background-color: #1f1b3a;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 1px, transparent 1.5px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.6) 1px, transparent 1.5px), radial-gradient(circle at 40% 80%, rgba(255, 230, 150, 0.7) 1.2px, transparent 1.8px);
  background-size: 70px 70px, 90px 90px, 110px 110px;
}
.bg-damask {
  background-color: #3a1f45;
  background-image: radial-gradient(circle at 50% 50%, rgba(246, 193, 67, 0.16) 20%, transparent 22%), radial-gradient(circle at 0 0, rgba(246, 193, 67, 0.12) 12%, transparent 13%), radial-gradient(circle at 100% 100%, rgba(246, 193, 67, 0.12) 12%, transparent 13%);
  background-size: 44px 44px;
}

/* ---------- map ---------- */

#map {
  padding-bottom: 0;
  background: linear-gradient(180deg, #ffe3ee, #fff4ea 50%, #ffeedd);
}
.map-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px calc(var(--sb) + 30px);
}
.map-inner {
  display: flex;
  flex-direction: column-reverse;
  gap: 22px;
  padding-top: 12px;
}
.earlier {
  margin: 0 auto 20px;
}
.chapter {
  position: relative;
  border-radius: 32px;
  background-color: var(--c1);
  padding: 18px 14px 22px;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.55), 0 12px 30px rgba(90, 50, 90, 0.12);
  outline: 2.5px dashed rgba(255, 255, 255, 0.95);
  outline-offset: -12px;
}
.chapter.pat-gingham {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--c2) 55%, transparent) 50%, transparent 50%), linear-gradient(color-mix(in srgb, var(--c2) 55%, transparent) 50%, transparent 50%);
  background-size: 34px 34px;
}
.chapter.pat-polka {
  background-image: radial-gradient(var(--c2) 18%, transparent 20%), radial-gradient(var(--c2) 18%, transparent 20%);
  background-size: 36px 36px;
  background-position: 0 0, 18px 18px;
}
.chapter.pat-stripes {
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--c2) 60%, transparent) 14px 28px);
}
.chapter.pat-quilt,
.chapter.pat-stars {
  background-image: linear-gradient(45deg, var(--c2) 25%, transparent 25%, transparent 75%, var(--c2) 75%), linear-gradient(45deg, var(--c2) 25%, transparent 25%, transparent 75%, var(--c2) 75%);
  background-size: 56px 56px;
  background-position: 0 0, 28px 28px;
}
.chapter.pat-hearts {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M22 31s-7.5-4.6-9.2-9.3C11.5 18 14 15 17.2 15.4 19.4 15.7 22 18.2 22 18.2s2.6-2.5 4.8-2.8C30 15 32.5 18 31.2 21.7 29.5 26.4 22 31 22 31z' fill='white' fill-opacity='.55'/%3E%3C/svg%3E");
}
.chapter-head {
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 0 14px 12px;
  margin: 8px auto 6px;
  max-width: 290px;
  position: relative;
  z-index: 2;
  box-shadow: var(--soft-shadow);
}
.chapter-head .ribbon {
  margin: -12px 0 4px;
  filter: none;
}
.chapter-head .ribbon span {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 70%, white), var(--ink));
  text-shadow: none;
}
.chapter-head .ribbon::before,
.chapter-head .ribbon::after {
  background: color-mix(in srgb, var(--ink) 80%, black);
}
.chapter-head h3 {
  margin: 2px 0;
  font-size: 22px;
  font-weight: 900;
}
.chapter-head p {
  margin: 0;
  font-size: 13px;
  color: var(--sub);
  font-weight: 700;
}
.nodes {
  position: relative;
}
.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.trail polyline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 13;
}
.node {
  position: absolute;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  color: white;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 75%, white), var(--ink));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 5px 0 color-mix(in srgb, var(--ink) 65%, black), 0 10px 16px rgba(0, 0, 0, 0.12);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
  z-index: 1;
}
.node:active {
  transform: translateY(3px);
}
.node.locked {
  background: rgba(255, 255, 255, 0.72);
  color: color-mix(in srgb, var(--ink) 45%, white);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05), 0 4px 0 rgba(0, 0, 0, 0.06);
  text-shadow: none;
}
.node.current {
  background: linear-gradient(180deg, var(--pink-1), var(--pink-2));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 5px 0 var(--pink-edge), 0 0 0 7px rgba(255, 255, 255, 0.9);
  animation: nodePulse 1.6s ease-in-out infinite;
  z-index: 3;
}
@keyframes nodePulse {
  50% {
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 5px 0 var(--pink-edge), 0 0 0 13px rgba(255, 255, 255, 0.45);
  }
}
.node.catch {
  width: 76px;
  height: 76px;
  margin-left: -38px;
  margin-top: -9px;
  background: linear-gradient(180deg, #fff3c4, #ffd56b);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 5px 0 var(--gold-edge), 0 0 0 5px white, 0 12px 20px rgba(201, 138, 30, 0.3);
}
.node.catch.locked {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.06), 0 0 0 4px rgba(255, 255, 255, 0.6);
}
.node .catch-goose {
  width: 66px;
  display: block;
  margin-top: 8px;
}
.node.locked .catch-goose {
  filter: grayscale(0.4) opacity(0.75);
}
.node .stars {
  position: absolute;
  bottom: -15px;
  display: flex;
  gap: 1px;
}
.node .stars i {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
}
.node .stars i.on {
  color: var(--gold);
}
.node .me {
  position: absolute;
  bottom: 48px;
  width: 70px;
  animation: bob 1.4s ease-in-out infinite;
  pointer-events: none;
}
.node .me svg {
  width: 100%;
  display: block;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.18));
}
@keyframes bob {
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- sheets ---------- */

#layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}
.modal-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px calc(var(--sb) + 10px);
  background: rgba(60, 30, 60, 0);
  pointer-events: auto;
  transition: background 0.28s;
}
.modal-wrap.open {
  background: rgba(60, 30, 60, 0.4);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100% - var(--st) - 10px);
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #fffdfb, var(--cream));
  border-radius: 34px;
  padding: 26px 18px 18px;
  box-shadow: 0 24px 60px rgba(60, 30, 60, 0.32), inset 0 2px 0 white;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.2, 1.25, 0.4, 1);
  text-align: center;
}
.modal::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 9px;
  background: rgba(59, 42, 74, 0.12);
}
.modal-wrap.open .modal {
  transform: none;
}
.modal-wrap.closing .modal {
  transform: translateY(110%);
  transition-duration: 0.22s;
}
@media (min-height: 760px) and (min-width: 600px) {
  .modal-wrap {
    align-items: center;
  }
}
.modal h2 {
  margin: 4px 0 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.modal p {
  margin: 6px 0 12px;
  font-weight: 650;
  line-height: 1.38;
}
.modal .row {
  margin-top: 10px;
}
.intro-region {
  display: block;
  font-weight: 900;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  margin-bottom: 8px;
}
.decree {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  margin: 2px 0 12px;
}
.decree .king {
  width: 84px;
  flex: none;
  filter: drop-shadow(0 4px 4px rgba(90, 50, 90, 0.18));
}
.decree .king svg {
  width: 100%;
  display: block;
}
.scroll {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, #fff8e4, #fff0cf);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 2px rgba(201, 138, 30, 0.22), 0 6px 14px rgba(201, 138, 30, 0.14);
}
.scroll::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  margin-top: -9px;
  border: 9px solid transparent;
  border-left: 0;
  border-right-color: #fff4da;
}
.scroll p {
  margin: 0 !important;
  font-weight: 800 !important;
  font-size: 15.5px;
  color: #6b4a1f;
  font-style: italic;
}
.intro-goals {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 2px;
}
.intro-moves {
  font-size: 17px;
  color: var(--sub);
  font-weight: 800 !important;
}
.intro-moves b {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}
.tip {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #fff3c9;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 750 !important;
}
.tip span {
  flex: none;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: #6b4a1f;
  padding: 3px 8px;
  border-radius: 999px;
}
.intro.catching .ribbon span {
  background: linear-gradient(180deg, #ffe08a, #f5b83d);
  color: #6b4a1f;
  text-shadow: 0 1.5px 0 rgba(255, 255, 255, 0.5);
}
.intro.catching .ribbon::before,
.intro.catching .ribbon::after {
  background: #e0a22a;
}
.win-stage,
.catch-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 156px;
  margin: 2px 0 2px;
}
.sunburst {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 207, 92, 0.32) 0deg 9deg, rgba(255, 207, 92, 0) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
  mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: spin 16s linear infinite;
  pointer-events: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.win-p,
.catch-p {
  position: relative;
  width: 118px;
  margin-right: -18px;
  filter: drop-shadow(0 6px 5px rgba(90, 50, 90, 0.18));
}
.win-goose,
.catch-stage .catch-goose {
  position: relative;
  width: 148px;
  filter: drop-shadow(0 6px 5px rgba(90, 50, 90, 0.18));
}
.win-stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  font-size: 48px;
  margin: 2px 0 6px;
}
.win-stars i {
  color: #eadfd3;
  transform: scale(0);
  animation: starIn 0.55s cubic-bezier(0.3, 1.9, 0.5, 1) forwards;
  animation-delay: var(--d);
  filter: drop-shadow(0 3px 0 #d8cabb);
}
.win-stars i:nth-child(2) {
  font-size: 62px;
  margin-bottom: 8px;
}
.win-stars i.on {
  color: var(--gold);
  filter: drop-shadow(0 3px 0 var(--gold-edge)) drop-shadow(0 6px 10px rgba(201, 138, 30, 0.35));
}
@keyframes starIn {
  0% {
    transform: scale(0) rotate(-40deg);
  }
  to {
    transform: scale(1) rotate(0);
  }
}
.win-score small,
.win-earned small {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.win-score b {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.win-earned {
  margin: 10px auto 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 10px 28px;
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}
.win-earned .ico {
  width: 32px;
  height: 32px;
}
.win-earned b {
  font-size: 32px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.honor-note .ico {
  color: var(--gold-edge);
}
.lose-goose,
.gift-goose,
.run-goose {
  width: 150px;
  margin: 0 auto;
  filter: drop-shadow(0 6px 5px rgba(90, 50, 90, 0.18));
}
.lose .btn.big {
  flex-direction: column;
  gap: 0;
  min-height: 66px;
}
.gift-box {
  font-size: 96px;
  animation: giftShake 1.2s ease-in-out infinite;
  margin: 6px auto 4px;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(212, 63, 124, 0.3));
}
@keyframes giftShake {
  0%,
  70%,
  100% {
    transform: none;
  }
  75% {
    transform: rotate(-8deg) scale(1.04);
  }
  85% {
    transform: rotate(8deg) scale(1.04);
  }
}
.run-goose {
  animation: runAway 1.8s ease-in-out infinite;
}
@keyframes runAway {
  0%,
  100% {
    transform: translateX(-12px) rotate(-3deg);
  }
  50% {
    transform: translateX(12px) rotate(3deg);
  }
}
.story-art {
  width: 176px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 5px rgba(90, 50, 90, 0.18));
}
.story-art svg {
  width: 100%;
  display: block;
}
.bubble {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.35;
  box-shadow: var(--card-shadow);
}
.story .bubble {
  margin-bottom: 16px;
}
.story .bubble::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  margin-left: -9px;
  border: 9px solid transparent;
  border-top: 0;
  border-bottom-color: white;
}
.toggles {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.toggle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 18px;
  background: white;
  color: #c3b7c4;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 3px 0 #efe3ea;
}
.toggle .ico {
  width: 26px;
  height: 26px;
}
.toggle.on {
  color: var(--pink-2);
  background: #fff0f6;
  box-shadow: 0 3px 0 #ffd2e4, inset 0 0 0 2px #ffd2e4;
}
.pause .btn.big {
  margin-bottom: 4px;
}
.offer-ico {
  font-size: 64px;
  color: #a8865f;
}
.daily h2 .ico {
  color: var(--pink-2);
}
.cal-head {
  font-weight: 900;
  margin: 8px 0 6px;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 0 0 8px;
}
.cal b {
  font-size: 11px;
  color: var(--sub);
}
.cal i {
  font-style: normal;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: white;
  font-weight: 800;
  font-size: 13px;
  color: var(--sub);
  box-shadow: 0 2px 0 #f0e6ec;
}
.cal i.blank {
  background: none;
  box-shadow: none;
}
.cal i.stamp {
  background: linear-gradient(180deg, var(--pink-1), var(--pink-2));
  color: white;
  box-shadow: 0 2px 0 var(--pink-edge);
}
.cal i.stamp .ico {
  width: 18px;
  height: 18px;
}
.cal i.today {
  box-shadow: inset 0 0 0 2.5px var(--ink);
  color: var(--ink);
}
.done-note {
  color: #2f8f62;
}
.backup textarea {
  width: 100%;
  height: 110px;
  border-radius: 16px;
  border: 2px solid #efe3ea;
  padding: 10px;
  font: 13px ui-monospace, monospace;
  -webkit-user-select: text;
  user-select: text;
  resize: none;
  background: white;
}
#toast {
  position: fixed;
  left: 50%;
  top: calc(var(--st) + 10px);
  transform: translate(-50%, -150%);
  z-index: 60;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(45, 30, 50, 0.3);
  transition: transform 0.32s cubic-bezier(0.2, 1.4, 0.4, 1), visibility 0.32s;
  pointer-events: none;
  visibility: hidden;
}
#toast.show {
  transform: translate(-50%, 0);
  visibility: visible;
}
#toast .ico {
  color: var(--gold);
}

/* ---------- wardrobe ---------- */

#wardrobe {
  padding-bottom: 0;
  background: linear-gradient(180deg, #ffe3ee, var(--cream) 34%);
}
.ward-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 162px;
  flex: none;
  margin: 0 -16px;
  background: radial-gradient(60% 80% at 50% 100%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
}
.ward-p {
  width: 104px;
  filter: drop-shadow(0 5px 4px rgba(90, 50, 90, 0.16));
}
.ward-goose {
  width: 146px;
  filter: drop-shadow(0 5px 4px rgba(90, 50, 90, 0.16));
}
.ward-board {
  width: 118px;
  height: 78px;
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 8px;
  flex: none;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  padding: 9px 15px;
  border-radius: 999px;
  background: white;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 3px 0 #efe3ea;
}
.tab.on {
  background: var(--ink);
  color: white;
  box-shadow: 0 3px 0 #1d1522;
}
.ward-body {
  flex: 1;
  overflow-y: auto;
  margin: 0 -16px;
  padding: 0 16px calc(var(--sb) + 100px);
}
.ward-body h4 {
  margin: 14px 2px 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sub);
}
.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 10px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 3px 0 #efe3ea, 0 6px 14px rgba(90, 50, 90, 0.05);
  font-size: 12.5px;
  font-weight: 800;
  transition: transform 0.1s;
}
.item:active {
  transform: scale(0.97);
}
.item small {
  font-size: 11.5px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 3px;
}
.item small .ico {
  width: 14px;
  height: 14px;
}
.item.wearing small {
  color: #2f8f62;
}
.item.trying {
  box-shadow: 0 0 0 3px var(--pink-2), 0 3px 0 #efe3ea;
}
.thumb {
  height: 66px;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.thumb:has(.mini-goose) {
  place-items: start center;
}
.mini-goose {
  width: 100px;
}
.mini-goose.neck {
  margin-top: -52px;
}
.mini-goose.face {
  margin-top: -20px;
}
.swatches {
  display: flex;
  gap: 3px;
}
.swatches i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}
.shape-row {
  display: flex;
  gap: 2px;
}
.shape-row .ico {
  width: 24px;
  height: 24px;
}
.board-swatch {
  width: 80%;
  height: 54px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.trail-swatch {
  width: 86%;
  height: 40px;
}
.dress-swatch {
  width: 44px;
  height: 54px;
  background: linear-gradient(var(--b) 0 30%, var(--a) 30%);
  clip-path: polygon(30% 0, 70% 0, 72% 30%, 100% 100%, 0 100%, 28% 30%);
}
.tiara-thumb {
  width: 80px;
}
.items.helpers {
  grid-template-columns: 1fr;
}
.item.helper {
  flex-direction: row;
  text-align: left;
  padding: 12px;
  gap: 10px;
}
.item.helper .thumb {
  width: 52px;
  height: 52px;
  font-size: 34px;
  color: #a8865f;
}
.item.helper .meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item.helper .meta small {
  display: block;
}
.ward-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--sb) + 12px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(60, 30, 60, 0.2);
  transform: translateY(160%);
  transition: transform 0.32s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.ward-bar.show {
  transform: none;
}
.ward-bar .btn {
  flex: 1;
}
.ward-bar .btn.primary {
  flex: 2;
  white-space: nowrap;
}
.ward-bar .btn .ico {
  width: 22px;
  height: 22px;
}
.ward-bar .need {
  width: 100%;
  text-align: center;
  color: var(--sub);
  font-weight: 700;
}

/* ---------- honors / album / settings ---------- */

.list,
.settings {
  flex: 1;
  overflow-y: auto;
  margin: 0 -16px;
  padding: 4px 16px calc(var(--sb) + 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.honor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 22px;
  box-shadow: 0 3px 0 #efe3ea, 0 6px 14px rgba(90, 50, 90, 0.05);
}
.medal {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: #f4ede6;
  color: #c9bbac;
  flex: none;
}
.medal i {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px white;
}
.medal.t1 {
  background: linear-gradient(#f8e3cf, #ecc7a3);
  color: #a86f3a;
}
.medal.t2 {
  background: linear-gradient(#f1f3f6, #d8dde5);
  color: #7b8696;
}
.medal.t3,
.medal.t4,
.medal.t5 {
  background: linear-gradient(#fff4c7, #ffd56b);
  color: #b37a12;
}
.honor .meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.honor .meta small {
  color: var(--sub);
  font-weight: 700;
  font-size: 12.5px;
}
.honor .bar {
  height: 9px;
  background: #f3ebf0;
  border-radius: 999px;
  overflow: hidden;
}
.honor .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffb3d0, var(--pink-2));
  border-radius: 999px;
}
.honor .num {
  font-variant-numeric: tabular-nums;
}
.honor.complete .bar i {
  background: linear-gradient(90deg, #ffe08a, var(--gold));
}
.album-note {
  font-weight: 700;
  color: var(--sub);
  margin: 4px 0 12px;
  text-align: center;
}
.album {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
  align-content: start;
  padding: 6px 4px calc(var(--sb) + 20px);
}
.sticker {
  position: relative;
  background: var(--bg);
  border-radius: 22px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 0 4px white, 0 8px 16px rgba(61, 47, 69, 0.14);
  transform: rotate(-2.5deg);
}
.sticker:nth-child(2n) {
  transform: rotate(2.5deg);
}
.sticker .goose {
  width: 90%;
}
.sticker span {
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}
.sticker em {
  color: var(--gold-edge);
  font-style: normal;
}
.sticker.locked {
  background: #f1eae2;
  color: #bcae9f;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65);
}
.sticker.locked .q {
  font-size: 46px;
  font-weight: 900;
  height: 96px;
  display: grid;
  place-items: center;
}
.sticker.big {
  width: 172px;
  margin: 8px auto;
}
.card {
  background: white;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 3px 0 #efe3ea, 0 6px 14px rgba(90, 50, 90, 0.05);
}
.card h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
}
.card p {
  margin: 6px 0;
  line-height: 1.4;
}
.card .toggles {
  margin-top: 0;
}
.card .toggle {
  background: var(--cream);
  box-shadow: none;
}
.card .toggle.on {
  background: #fff0f6;
}
.portrait-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0 10px;
}
.portrait-row + .portrait-row {
  border-top: 2px dashed #f0e6ec;
  padding-top: 12px;
}
.pp {
  width: 92px;
  flex: none;
  text-align: center;
  font-size: 13px;
}
.pp svg {
  width: 100%;
  display: block;
}
.opts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.opt small {
  font-weight: 800;
  color: var(--sub);
  font-size: 12px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}
.chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cream);
  font-weight: 800;
  font-size: 12.5px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
.chip.on {
  background: var(--ink);
  color: white;
}
.chip .sw {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.chip:has(.sw) {
  padding: 5px;
}
.chip.on:has(.sw) {
  background: var(--pink-2);
}
.credits {
  text-align: center;
}
.credits p {
  font-weight: 800;
}
.credits .idiom {
  font: 400 11px ui-monospace, 'Geist Mono', monospace;
  color: var(--sub);
}
.credits .idiom a {
  color: inherit;
}

@media (max-height: 720px) {
  .logo .l1 {
    font-size: 48px;
  }
  .logo .l2 {
    font-size: 42px;
  }
  .stage {
    min-height: 170px;
  }
  .home-panel {
    gap: 10px;
    padding-top: 14px;
  }
  .btn.huge {
    min-height: 62px;
    font-size: 23px;
  }
  .dock-btn span {
    width: 48px;
    height: 48px;
  }
  .moves {
    width: 58px;
    height: 58px;
  }
  .moves b {
    font-size: 22px;
  }
  .goal-chip .gi,
  .goal-chip .gi .ico {
    width: 24px;
    height: 24px;
  }
  .tool-ico {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .goose .g-tail,
  .goose .g-head,
  .goose .g-ear-l,
  .node.current,
  .node .me,
  .scene .cloud,
  .scene .flag,
  .sunburst,
  .stage .side,
  .chase-goose,
  .dock-btn.glow span {
    animation: none;
  }
}
