/* Cake Copy — the bakery is one canvas in the stage; the picture buttons live in the dock. */

.bk-scene { background: var(--lapis-deep); direction: ltr; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }

body[data-game="bakery"] { --bk: clamp(42px, 13.2vw, 56px); }
body[data-game="bakery"] .fa-dock { direction: ltr; padding: 8px 6px 10px; }

.bk-pal { display: grid; grid-template-columns: repeat(2, auto); gap: 6px; justify-content: center; transition: opacity 0.25s; }
.bk-pal.is-off { opacity: 0.3; }

.bk-group { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(255, 246, 227, 0.08); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.15s, background 0.15s; }
.bk-group.is-locked { opacity: 0.22; }
.bk-group.is-ok { background: rgba(155, 211, 176, 0.3); box-shadow: inset 0 0 0 3px var(--w-mint); }
.bk-group.is-bad { background: rgba(240, 82, 61, 0.3); box-shadow: inset 0 0 0 3px var(--w-tomato); animation: bk-shake 0.3s; }

.bk-opt { width: var(--bk); height: var(--bk); padding: 0; border: 0; border-radius: 12px; background: var(--lapis-raise); box-shadow: inset 0 0 0 2px rgba(255, 246, 227, 0.12); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.12s, background 0.12s; }
.bk-opt canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.bk-opt:active { transform: scale(0.92); }
.bk-opt[disabled] { cursor: default; }
.bk-opt.is-on { background: #5B6B40; box-shadow: inset 0 0 0 3px var(--gold); transform: scale(1.04); }
.bk-opt.is-want { box-shadow: inset 0 0 0 3px var(--w-cream); background: #5B6B40; animation: bk-pulse 0.7s ease-in-out infinite alternate; }
.bk-opt:focus-visible, .bk-done:focus-visible { outline: 3px solid var(--w-cream); outline-offset: 2px; }

/* The very first cake: the icing buttons wave to show where to start. */
.bk-pal.is-hint .bk-group:first-child .bk-opt { animation: bk-pulse 0.6s ease-in-out infinite alternate; }
.bk-pal.is-hint .bk-group:first-child .bk-opt:nth-child(2) { animation-delay: 0.2s; }
.bk-pal.is-hint .bk-group:first-child .bk-opt:nth-child(3) { animation-delay: 0.4s; }

/* The tick: "my cake is ready". It sits on the counter, at the corner of the scene. */
.bk-done { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 60px; height: 60px; padding: 12px; border: 0; border-radius: 50%; background: #3FA36C; color: var(--w-cream); box-shadow: 0 4px 0 #2A7049, 0 8px 16px rgba(0, 0, 0, 0.3); cursor: pointer; -webkit-tap-highlight-color: transparent; animation: bk-pulse 0.55s ease-in-out infinite alternate; }
.bk-done svg { display: block; width: 100%; height: 100%; }
.bk-done:active { transform: translateY(3px); box-shadow: 0 1px 0 #2A7049; }
.bk-done[disabled] { background: rgba(23, 28, 18, 0.55); color: rgba(255, 246, 227, 0.45); box-shadow: none; animation: none; cursor: default; }
.bk-done[hidden] { display: none; }

@keyframes bk-pulse { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes bk-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Wide screens and phones on their side: three trays in a row. */
@media (min-width: 620px) { .bk-pal { grid-template-columns: repeat(3, auto); gap: 8px; } }
@media (max-height: 480px) { body[data-game="bakery"] { --bk: 42px; } .bk-done { width: 52px; height: 52px; } }

@media (max-width: 360px) {
  body[data-game="bakery"] .fa-bar { gap: 5px; }
  body[data-game="bakery"] .fa-title { font-size: 0.95rem; }
}
/* Short phones (320 x 568): a tighter start panel, so Play shows without scrolling. */
@media (max-height: 600px) {
  body[data-game="bakery"] .kit-start .fa-panel { padding: 14px 18px; }
  body[data-game="bakery"] .kit-start .fa-panel__art { margin: 0 0 6px; }
  body[data-game="bakery"] .kit-start .kit-art { max-width: 104px; border-radius: 12px; }
  body[data-game="bakery"] .kit-start .fa-panel__title { margin: 2px 0 4px; font-size: 1.5rem; }
  body[data-game="bakery"] .kit-start .fa-panel__text { margin-bottom: 10px; font-size: 0.88rem; line-height: 1.35; }
  body[data-game="bakery"] .kit-start .fa-panel__body { margin-bottom: 12px; }
  body[data-game="bakery"] .kit-start .fa-howto { gap: 5px; margin: 0; font-size: 0.88rem; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) { .bk-opt, .bk-done, .bk-group { animation: none !important; } }
