/* Odd Goose: paper-cut storybook pond. Cut craft paper, soft layer shadows, chunky paper buttons.
   One phone passed round the table: everything big, one decision per screen. */
@font-face { font-family: 'Lilita'; src: url('/fonts/lilita.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }

:root {
  --ink: #17324a; --ink-soft: #4b6278; --paper: #fffaf0; --paper-2: #f3ead6; --paper-edge: #d9ccb0;
  --sun: #ffcf3f; --sun-edge: #c9971a; --sky: #2b7fa8; --teal: #145a6e; --deep: #0d3a4c;
  --goose: #ff7a1a; --goose-edge: #a84a08; --leaf: #3f9d63; --red: #d9473a;
  --display: 'Lilita', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .22 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--deep); color: var(--ink); font-family: var(--body); overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }

#app { position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; }
.bg { position: absolute; inset: 0; background: #7cc0d8 url('/art/pond.webp') center bottom / cover no-repeat; transition: filter .5s, transform 1.2s cubic-bezier(.2,.8,.2,1); }
.bg.title { background-image: url('/art/title.webp'); }
.bg.dim { filter: saturate(.9) brightness(.82); }
.bg.goose { filter: saturate(1.15) brightness(.78) sepia(.25); }

/* top bar */
.bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); }
.bar-title { font-family: var(--display); font-size: 18px; color: #fff; text-shadow: 0 2px 0 var(--teal); letter-spacing: .02em; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 250, 240, .9); box-shadow: 0 3px 0 var(--paper-edge), 0 6px 14px rgba(13, 58, 76, .25); display: grid; place-items: center; cursor: pointer; }
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.round-btn .spk { fill: var(--ink); }
#sound[aria-pressed="true"] .mute, #sound[aria-pressed="false"] .wave { display: none; }
.round-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--paper-edge); }

/* screens */
#stage { position: relative; z-index: 2; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; overflow-y: auto; overflow-x: hidden;
  padding: 14px max(18px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 18px) max(18px, env(safe-area-inset-left, 0px));
  animation: in .38s cubic-bezier(.2, .9, .3, 1.15) both; }
.screen.out { animation: out .22s ease-in both; pointer-events: none; }
.screen > * { flex: none; }
.screen { scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.sticky-foot { position: sticky; bottom: 0; z-index: 2; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.sticky-foot::before { content: ''; position: absolute; inset: -18px -40px calc(-1 * (env(safe-area-inset-bottom, 0px) + 18px)); background: linear-gradient(transparent, rgba(13, 58, 76, .55) 45%); z-index: -1; pointer-events: none; }
.spacer { flex: 1 1 0 !important; min-height: 8px; }
@keyframes in { from { opacity: 0; transform: translateY(26px) scale(.98); } }
@keyframes out { to { opacity: 0; transform: translateY(-18px) scale(.98); } }

/* paper */
.paper { background: var(--paper) var(--grain); border-radius: var(--r); box-shadow: 0 2px 0 #fff inset, 0 4px 0 var(--paper-edge), 0 14px 30px rgba(13, 58, 76, .28); }
.sheet { width: 100%; max-width: 460px; padding: 20px 20px 22px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1; letter-spacing: .01em; text-wrap: balance; }
.kicker { font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.lead { font-size: 17px; font-weight: 700; line-height: 1.35; text-align: center; max-width: 34ch; }
.on-pond { color: #fff; text-shadow: 0 2px 0 var(--teal), 0 0 14px rgba(13, 58, 76, .55); }

/* buttons: thick paper with a darker edge */
.btn { appearance: none; border: 0; cursor: pointer; width: 100%; max-width: 420px; min-height: 58px; border-radius: 18px; padding: 12px 18px;
  font-family: var(--display); font-size: 23px; letter-spacing: .02em; color: var(--ink); background: var(--sun) var(--grain);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .55) inset, 0 6px 0 var(--sun-edge), 0 12px 22px rgba(13, 58, 76, .3);
  transition: transform .08s, box-shadow .08s, opacity .2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn:active:not([disabled]) { transform: translateY(5px); box-shadow: 0 2px 0 rgba(255, 255, 255, .55) inset, 0 1px 0 var(--sun-edge), 0 4px 10px rgba(13, 58, 76, .3); }
.btn.paperish { background: var(--paper) var(--grain); box-shadow: 0 2px 0 #fff inset, 0 6px 0 var(--paper-edge), 0 12px 22px rgba(13, 58, 76, .25); }
.btn.paperish:active { box-shadow: 0 1px 0 var(--paper-edge); }
.btn.goose { background: var(--goose) var(--grain); color: #fff; text-shadow: 0 2px 0 var(--goose-edge); box-shadow: 0 2px 0 rgba(255, 255, 255, .35) inset, 0 6px 0 var(--goose-edge), 0 12px 22px rgba(13, 58, 76, .3); }
.btn.goose:active { box-shadow: 0 1px 0 var(--goose-edge); }
.btn.small { min-height: 46px; font-size: 18px; border-radius: 14px; }
.btn[disabled] { background: rgba(255, 250, 240, .55); color: rgba(23, 50, 74, .55); box-shadow: 0 4px 0 rgba(217, 204, 176, .6); text-shadow: none; cursor: default; }
.link { appearance: none; background: none; border: 0; padding: 8px 10px; font-weight: 800; font-size: 15px; color: #fff; text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 1px 0 var(--teal); cursor: pointer; }
.link.dark { color: var(--ink-soft); text-shadow: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ------------------------------------------------------------------ title */
.wordmark { margin-top: 4vh; text-align: center; transform: rotate(-3deg); }
.wordmark .w { font-family: var(--display); display: block; line-height: .82; color: var(--sun);
  text-shadow: 0 4px 0 var(--sun-edge), 0 7px 0 var(--teal), 0 14px 24px rgba(13, 58, 76, .45); -webkit-text-stroke: 1.5px var(--teal); }
.wordmark .w1 { font-size: clamp(64px, 21vw, 112px); }
.wordmark .w2 { font-size: clamp(76px, 25vw, 136px); color: #fff; text-shadow: 0 4px 0 #cfd7dc, 0 7px 0 var(--teal), 0 14px 24px rgba(13, 58, 76, .45); }
.tagline { font-weight: 900; font-size: 17px; text-align: center; color: var(--ink); background: var(--paper) var(--grain); padding: 9px 16px; border-radius: 14px; box-shadow: 0 3px 0 var(--paper-edge); transform: rotate(1.5deg); max-width: 32ch; }
.brand-foot { font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .85); letter-spacing: .06em; text-shadow: 0 1px 0 var(--teal); }

/* ------------------------------------------------------------------ manual */
.manual h2 { font-size: 34px; text-align: center; margin-bottom: 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 16px; font-weight: 700; line-height: 1.35; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 19px; background: var(--sun); box-shadow: 0 3px 0 var(--sun-edge); }
.steps b { color: var(--goose-edge); }

/* ------------------------------------------------------------------ setup */
.setup h2 { font-size: 30px; text-align: center; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 2px; }
.stepper .num { font-family: var(--display); font-size: 84px; line-height: 1; min-width: 1.4em; text-align: center; color: var(--ink); text-shadow: 0 4px 0 var(--paper-edge); }
.stepper button { width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; font-family: var(--display); font-size: 40px; line-height: 1; padding-bottom: 4px; background: var(--sun) var(--grain); box-shadow: 0 5px 0 var(--sun-edge), 0 10px 18px rgba(13, 58, 76, .2); }
.stepper button:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 1px 0 var(--sun-edge); }
.stepper button[disabled] { opacity: .35; }
.flock { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; min-height: 64px; padding: 4px 0 2px; }
.flock img { width: 50px; height: 54px; object-fit: contain; margin: 0 -4px; filter: drop-shadow(0 3px 2px rgba(13, 58, 76, .25)); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.2) translateY(10px); opacity: 0; } }
.group-label { font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 12px 0 8px; }
.packs { display: flex; flex-wrap: wrap; gap: 8px; }
.pack { appearance: none; border: 2px solid var(--paper-edge); background: var(--paper-2); border-radius: 12px; padding: 8px 12px; font-weight: 900; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.pack[aria-pressed="true"] { background: var(--sky); border-color: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal); }
.pack .n { font-weight: 700; font-size: 12px; opacity: .7; }
.pack .adult { font-size: 11px; background: var(--red); color: #fff; border-radius: 6px; padding: 1px 5px; }
.toggles { display: grid; gap: 4px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; border-top: 1.5px dashed var(--paper-edge); }
.toggle:first-child { border-top: 0; }
.toggle .t { font-weight: 900; font-size: 16px; }
.toggle .d { display: block; font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-top: 1px; }
.toggle .sw { flex: none; width: 54px; height: 32px; border-radius: 16px; background: var(--paper-edge); position: relative; transition: background .2s; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .12); }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, .2); transition: transform .22s cubic-bezier(.3, 1.5, .5, 1); }
.toggle[aria-checked="true"] .sw { background: var(--leaf); }
.toggle[aria-checked="true"] .sw::after { transform: translateX(22px); }
.toggle[disabled] { opacity: .45; cursor: default; }

/* ------------------------------------------------------------------ duck badge */
.duck-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.duck-badge img { width: 120px; height: 130px; object-fit: contain; filter: drop-shadow(0 6px 4px rgba(13, 58, 76, .3)); }
.duck-badge .name { font-family: var(--display); font-size: 34px; color: #fff; text-shadow: 0 3px 0 var(--teal), 0 0 16px rgba(13, 58, 76, .5); }
.duck-badge .name small { display: block; text-align: center; font-family: var(--body); font-weight: 900; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; text-shadow: 0 1px 0 var(--teal); }
.bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }

/* ------------------------------------------------------------------ the secret card (hold to peek) */
.card-zone { width: 100%; max-width: 360px; aspect-ratio: 5 / 4; perspective: 1100px; cursor: pointer; touch-action: none; position: relative; }
.card-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .34s cubic-bezier(.3, 1.35, .5, 1); }
.card-zone.held .card-flip { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; }
.face.back { background: repeating-linear-gradient(45deg, #ffd34d 0 16px, #ffc52e 16px 32px); border: 5px solid #fff6d6; box-shadow: 0 6px 0 var(--sun-edge), 0 16px 28px rgba(13, 58, 76, .3); }
.face.back .emblem { width: 112px; height: 112px; border-radius: 50%; background: var(--paper) var(--grain); display: grid; place-items: center; box-shadow: 0 4px 0 var(--sun-edge); }
.face.back .emblem img { width: 82px; height: 88px; object-fit: contain; }
.face.back .hold { font-family: var(--display); font-size: 25px; color: var(--ink); text-shadow: 0 2px 0 #fff2c0; }
.face.back .hold small { display: block; font-family: var(--body); font-weight: 900; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.face.front { transform: rotateY(180deg); background: var(--paper) var(--grain); border: 5px solid #fff; box-shadow: 0 6px 0 var(--paper-edge), 0 16px 28px rgba(13, 58, 76, .3); }
.face.front .word { font-family: var(--display); font-size: clamp(34px, 11vw, 52px); line-height: 1; color: var(--ink); overflow-wrap: anywhere; }
.face.front.is-goose { background: radial-gradient(circle at 50% 35%, #ffb35c, #e8641a 60%, #b3400b) ; border-color: #ffd8b0; box-shadow: 0 6px 0 #8e3308, 0 16px 28px rgba(13, 58, 76, .3); color: #fff; }
.face.front.is-goose img { width: 38%; max-height: 52%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(80, 20, 0, .35)); }
.face.front.is-goose .word { color: #fff; font-size: clamp(26px, 8.4vw, 38px); text-shadow: 0 3px 0 #8e3308; }
.face.front .hint { font-weight: 900; font-size: 15px; background: rgba(255, 255, 255, .22); padding: 4px 10px; border-radius: 10px; }
.peek-hint { font-weight: 900; font-size: 15px; min-height: 20px; text-align: center; }

/* ------------------------------------------------------------------ clues + pointing */
.round-tag { font-family: var(--display); font-size: 22px; background: var(--paper) var(--grain); padding: 6px 18px 8px; border-radius: 999px; box-shadow: 0 4px 0 var(--paper-edge); transform: rotate(-2deg); }
.big-call { font-family: var(--display); font-size: clamp(34px, 11vw, 54px); text-align: center; line-height: 1.02; }
.price { font-weight: 800; font-size: 14px; text-align: center; color: var(--ink-soft); }
.count { font-family: var(--display); font-size: min(52vw, 300px); line-height: 1; color: var(--sun); -webkit-text-stroke: 3px var(--teal); text-shadow: 0 8px 0 var(--sun-edge), 0 14px 0 var(--teal); animation: slam .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.count.point { font-size: min(30vw, 170px); color: #fff; text-shadow: 0 8px 0 var(--goose-edge), 0 14px 0 var(--teal); }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } 60% { opacity: 1; } }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; width: 100%; max-width: 460px; }
.pick { appearance: none; border: 0; cursor: pointer; background: var(--paper) var(--grain); border-radius: 18px; padding: 8px 4px 10px; box-shadow: 0 4px 0 var(--paper-edge), 0 8px 16px rgba(13, 58, 76, .2); display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--display); font-size: 20px; }
.pick img { width: 64px; height: 68px; object-fit: contain; }
.pick:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
.pick.out { opacity: .35; pointer-events: none; }
.pick.out::after { content: 'caught'; font-family: var(--body); font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }

/* ------------------------------------------------------------------ reveal + results */
.reveal-img { width: min(54vw, 250px); height: auto; filter: drop-shadow(0 10px 8px rgba(13, 58, 76, .35)); animation: rise .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.reveal-img.duck { width: min(42vw, 200px); }
@keyframes rise { from { transform: translateY(60px) scale(.6) rotate(-8deg); opacity: 0; } }
.stamp { margin-top: 10px; font-family: var(--display); font-size: clamp(40px, 13vw, 64px); text-align: center; line-height: .95; transform: rotate(-4deg); animation: stamp .5s .35s cubic-bezier(.2, 1.8, .4, 1) both; }
.stamp.goose { color: #fff; text-shadow: 0 4px 0 var(--goose-edge), 0 8px 0 var(--teal); }
.stamp.duck { color: var(--sun); text-shadow: 0 4px 0 var(--sun-edge), 0 8px 0 var(--teal); }
@keyframes stamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
.word-reveal { font-weight: 900; font-size: 16px; text-align: center; }
.word-reveal b { font-family: var(--display); font-weight: 400; font-size: 26px; display: block; color: var(--ink); }

.drink-card { width: 100%; max-width: 460px; padding: 18px 16px 16px; text-align: center; background: var(--goose) var(--grain); color: #fff; border-radius: var(--r);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .3) inset, 0 6px 0 var(--goose-edge), 0 16px 30px rgba(13, 58, 76, .35); animation: drinkin .9s .6s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes drinkin { from { transform: translateY(50px) scale(.7) rotate(4deg); opacity: 0; } }
.drink-card h3 { font-size: clamp(38px, 12vw, 58px); text-shadow: 0 4px 0 var(--goose-edge); animation: throb 1.6s 1.6s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.06); } }
.drinkers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 10px; }
.drinker { display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 13px; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.drinker img { width: 52px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(80, 20, 0, .35)); }
.drinker .sips { font-family: var(--display); font-weight: 400; font-size: 20px; }
.scores { width: 100%; max-width: 460px; padding: 12px 14px; }
.scores .row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 5px 2px; border-top: 1.5px dashed var(--paper-edge); font-weight: 900; }
.scores .row:first-of-type { border-top: 0; }
.scores img { width: 38px; height: 40px; object-fit: contain; }
.scores .pts { font-family: var(--display); font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.scores .plus { color: var(--leaf); font-size: 15px; margin-right: 6px; }
.scores .lead-tag { font-size: 11px; background: var(--sun); border-radius: 6px; padding: 1px 6px; margin-left: 6px; letter-spacing: .06em; }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(13, 58, 76, .55); animation: fade .2s both; }
.modal .sheet { animation: in .3s cubic-bezier(.2, .9, .3, 1.15) both; display: grid; gap: 12px; text-align: center; }
.modal h2 { font-size: 30px; }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (min-height: 760px) { .duck-badge img { width: 140px; height: 150px; } }
.scores img.was-goose { width: 24px; height: 26px; vertical-align: -6px; margin-left: 6px; }
.modal { grid-template-columns: minmax(0, 460px); justify-content: center; }
.modal .sheet { min-width: 0; max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal .pick-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.modal .pick img { width: 52px; height: 56px; }
