/* Gingy's Kitchen: the Christmas baking mini game (kitchen.html) */
.gk-page {
  --gk-red: #6E1622; --gk-deep: #521019; --gk-green: #143823; --gk-gold: #C9A24A; --gk-cream: #F7EEDC;
  background: var(--gk-red); color: var(--gk-cream); margin: 0;
  background-image: radial-gradient(circle at 20% 0%, rgba(201, 162, 74, 0.16), transparent 50%);
}
.gk-top { background: var(--gk-deep); }
.gk-top-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.gk-top .back-link, .gk-top .scu-brand { color: var(--gk-cream); }
.gk-top .scu-brand { display: inline-flex; align-items: center; gap: 10px; }
.gk-top a:focus-visible, .gk-page button:focus-visible, .gk-page a:focus-visible { outline: 3px solid var(--gk-gold); outline-offset: 3px; }

.gk-main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; }
.gk-intro { text-align: center; margin: 0 auto 16px; max-width: 640px; }
.gk-intro .kicker { color: var(--gk-gold); }
.gk-intro h1 { font-family: 'Fraunces', Georgia, serif; font-variation-settings: "SOFT" 100; font-weight: 700; font-size: clamp(32px, 6vw, 52px); line-height: 1.05; margin: 6px 0 8px; }
.gk-intro p { margin: 0; color: #F1DCC6; }

.gk-play { display: grid; gap: 14px; justify-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .gk-play { grid-template-columns: auto 340px; align-items: start; justify-content: center; }
}
.gk-stage {
  position: relative; width: min(100%, calc((100svh - 140px) * 8 / 9)); min-width: min(100%, 300px);
  aspect-ratio: 8 / 9; border-radius: 26px; overflow: hidden; background: #7E1F2B;
  box-shadow: 0 0 0 6px var(--gk-gold), 0 18px 40px rgba(0, 0, 0, 0.35);
}
@media (max-width: 999px) { .gk-stage { width: min(100%, calc((100svh - 230px) * 8 / 9)); } }
.gk-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gk-scene { transform-origin: 50% 77%; transition: transform 1.2s cubic-bezier(.6, 0, .3, 1), opacity 1.2s; }
.gk-scene.zoom { transform: scale(2.6); opacity: 0; }
.gk-closeup { opacity: 0; transform: scale(0.4); transform-origin: 50% 77%; transition: transform 1.2s cubic-bezier(.6, 0, .3, 1), opacity 1s; pointer-events: none; touch-action: none; }
.gk-closeup.show { opacity: 1; transform: none; pointer-events: auto; }

/* the dock under (or beside) the stage */
.gk-dock { width: min(100%, 640px); min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1000px) { .gk-dock { width: 340px; background: var(--gk-deep); border-radius: 22px; padding: 20px; } }
.gk-say { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 700; min-height: 2.9em; }
.gk-say b { color: var(--gk-gold); }
.gk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gk-btn, .gk-actions button {
  font: 800 16px 'Nunito', system-ui, sans-serif; min-height: 48px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--gk-cream); border: 2px solid rgba(247, 238, 220, 0.55);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.gk-actions button.primary, .gk-btn { background: var(--gk-gold); color: #3A2018; border-color: var(--gk-gold); }
.gk-actions button.primary:hover, .gk-btn:hover { filter: brightness(1.07); }
.gk-actions button:active { transform: scale(0.97); }
.gk-actions button.holding { background: #E7B13F; border-color: #E7B13F; color: #3A2018; }

/* decorating tray */
.gk-tray { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gk-tray-label { font-weight: 800; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gk-gold); }
.gk-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
@media (min-width: 1000px) { .gk-row { flex-wrap: wrap; overflow: visible; } }
.gk-swatch, .gk-tool {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; cursor: pointer; padding: 0;
  border: 3px solid transparent; display: grid; place-items: center; touch-action: manipulation;
}
.gk-swatch { border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15); }
.gk-tool { background: #F7EEDC; }
.gk-tool svg { width: 38px; height: 38px; }
.gk-swatch[aria-pressed="true"], .gk-tool[aria-pressed="true"] { border-color: var(--gk-gold); box-shadow: 0 0 0 3px var(--gk-deep), 0 0 0 5px var(--gk-gold); }

/* the recipe book */
.gk-book { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(30, 10, 8, 0.55); z-index: 3; }
.gk-book[hidden] { display: none; }
.gk-book-in {
  width: 100%; max-height: 100%; overflow-y: auto; background: #FBF1DF; color: #3A2018; border-radius: 18px; padding: 18px;
  box-shadow: 0 0 0 7px #9E2B3A, 0 0 0 10px var(--gk-gold), 0 20px 40px rgba(0, 0, 0, 0.4);
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(158, 43, 58, 0.09) 27px 28px);
}
.gk-book-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gk-book h2 { font-family: 'Fraunces', Georgia, serif; font-variation-settings: "SOFT" 100; font-size: clamp(21px, 4.4vw, 28px); margin: 0; color: #9E2B3A; }
.gk-book-sub { margin: 2px 0 12px; font-weight: 700; color: #6B2E1E; }
.gk-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #9E2B3A; color: #FBF1DF; font-size: 26px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.gk-recipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gk-recipe {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 10px 12px; cursor: pointer;
  background: #FFF8EE; border: 2px dashed rgba(158, 43, 58, 0.35); border-radius: 16px; font: inherit; color: inherit;
}
.gk-recipe:hover { border-style: solid; border-color: #9E2B3A; background: #FFFDF8; }
.gk-recipe svg { width: 100%; max-width: 130px; aspect-ratio: 1; background: #F4D9C6; border-radius: 12px; }
.gk-recipe strong { font-family: 'Fraunces', Georgia, serif; font-variation-settings: "SOFT" 100; font-size: 17px; line-height: 1.15; color: #3A2018; }
.gk-recipe span { font-size: 13.5px; line-height: 1.35; color: #6B2E1E; }

.gk-closed { text-align: center; padding: 40px 0; display: grid; gap: 12px; justify-items: center; }
.gk-closed[hidden] { display: none; }
.gk-closed h2 { font-family: 'Fraunces', Georgia, serif; margin: 0; font-size: 30px; }
.gk-closed p { margin: 0; }

/* animations inside the drawings */
#scene .gk-snow { animation: gk-fall linear infinite; }
@keyframes gk-fall { from { transform: translateY(-40px); } to { transform: translateY(330px); } }
.gk-twinkle { animation: gk-twinkle 1.8s ease-in-out infinite alternate; }
@keyframes gk-twinkle { from { opacity: 1; } to { opacity: 0.35; } }
.gk-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: gk-flicker 0.7s ease-in-out infinite alternate; }
@keyframes gk-flicker { from { transform: scale(1, 1); } to { transform: scale(0.85, 1.12); } }
.gk-blink { transform-box: fill-box; transform-origin: center; animation: gk-blink 4.6s infinite; }
@keyframes gk-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
.gk-pulse { animation: gk-pulse 1.4s ease-in-out infinite; }
@keyframes gk-pulse { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.65; } }
#gingy .gk-leg-f, #gingy .gk-leg-b, #gingy .gk-arm-f, #gingy .gk-arm-b { transform-box: fill-box; transform-origin: 50% 10%; }
#gingy.walking .gk-leg-f, #gingy.walking .gk-arm-b { animation: gk-swing 0.44s ease-in-out infinite alternate; }
#gingy.walking .gk-leg-b, #gingy.walking .gk-arm-f { animation: gk-swing 0.44s ease-in-out infinite alternate-reverse; }
@keyframes gk-swing { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
#gingy.walking .gk-bob { animation: gk-bob 0.22s ease-in-out infinite alternate; }
@keyframes gk-bob { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
#gingy.carrying .gk-arm-f { animation: none; transform: rotate(70deg); }
#gingy .gk-wave { transform-box: fill-box; transform-origin: 0% 60%; }
#gingy.waving .gk-wave { animation: gk-wave 0.5s ease-in-out 4 alternate; }
@keyframes gk-wave { to { transform: rotate(28deg); } }
.gk-steam { animation: gk-steam 2.4s ease-in-out infinite; }
@keyframes gk-steam { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(-8px); opacity: 0.25; } }
.gk-glowpulse { animation: gk-pulse 1.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .gk-page *, .gk-page *::before { animation: none !important; transition: none !important; }
}

/* wide screens: the stage gets a definite width so it sits beside the dock */
@media (min-width: 1000px) {
  .gk-stage { width: min(calc((100svh - 120px) * 8 / 9), calc(100vw - 32px - 340px - 14px), 760px); min-width: 420px; }
}

/* the door to Jolly's Workshop, in Gingy's Kitchen */
.gk-door { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #F7EEDC; background: #3E2416; border-radius: 16px; padding: 10px 14px; box-shadow: 0 0 0 3px #C9A24A; font-weight: 800; }
.gk-door svg { width: 42px; height: 56px; flex: 0 0 auto; }
.gk-door small { display: block; font-weight: 700; color: #E9C99A; }
.gk-door:hover { color: #F7EEDC; filter: brightness(1.12); }
.gk-door[hidden] { display: none; }
