/* Create By Asking: baby keyboard game (projects/baby-keyboard-game.html).
   Loaded after style.css and tools.css; reuses .tool-shell, .btn and .chip-dark. */

.bk-stage { position: relative; height: clamp(320px, 58vh, 560px); border-radius: 14px; overflow: hidden; background: #15151A; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.bk-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bk-stage:fullscreen, .bk-stage.cba-fs { border-radius: 0; width: 100vw; height: 100vh; height: 100dvh; background: #15151A; }
.bk-stage:-webkit-full-screen { border-radius: 0; width: 100vw; height: 100vh; }
.bk-on .bk-stage { cursor: pointer; }

/* before Start: the big button over the stage */
.bk-start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; text-align: center; background: rgba(21, 21, 26, 0.3); z-index: 2; }
.bk-start[hidden] { display: none; }
.bk-go { font: 800 clamp(1.2rem, 3.4vw, 1.7rem)/1 var(--body); padding: 18px 34px; border: 0; border-radius: 999px; background: #FFC93C; color: #1F1E1C; cursor: pointer; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6); }
.bk-go:hover { background: #FFD666; }
.bk-go:focus-visible, .bk-start .chip-dark:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bk-start p { margin: 0; max-width: 34ch; color: #E5E4E2; font: 600 0.95rem/1.4 var(--body); }

/* while playing: the first-time hint and the grown-ups' exit button */
.bk-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: clamp(3rem, 12vmin, 7rem); pointer-events: none; opacity: 0; transition: opacity 0.4s; z-index: 1; }
.bk-on .bk-hint { opacity: 1; animation: bk-bob 1.2s ease-in-out infinite; }
.bk-on .bk-hint.off { opacity: 0; animation: none; }
@keyframes bk-bob { 50% { transform: translate(-50%, -58%); } }

.bk-exit { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; border: 0; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6); font: 600 0.78rem/1.2 var(--body); cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.bk-exit[hidden] { display: none; }
.bk-touch-txt { display: none; }
@media (hover: none) and (pointer: coarse) { .bk-keys-txt { display: none; } .bk-touch-txt { display: inline; } }
.bk-ring { --p: 0; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#FFC93C calc(var(--p) * 360deg), rgba(255, 255, 255, 0.18) 0); }
.bk-ring::after { content: "✕"; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #15151A; color: #fff; font-size: 0.8rem; }
.bk-holding .bk-exit { background: rgba(255, 255, 255, 0.18); color: #fff; }
.bk-hold { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; margin: 0; padding: 9px 16px; border-radius: 999px; background: #FFC93C; color: #1F1E1C; font: 800 0.95rem/1.2 var(--body); white-space: nowrap; pointer-events: none; }
.bk-hold[hidden] { display: none; }

/* under the stage: the grown-ups' card */
.bk-parent { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px 22px; align-items: start; }
.bk-parent h3 { margin: 0 0 6px; font: 800 1.05rem/1.3 var(--body); color: #fff; }
.bk-parent ol { margin: 0; padding-left: 1.3em; color: #CDCCCA; font-size: var(--step--1); line-height: 1.55; }
.bk-parent li + li { margin-top: 4px; }
.bk-parent b { color: #fff; }
.bk-parent kbd { font: 700 0.8rem/1 var(--mono); background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 5px; padding: 2px 6px; }
.bk-side { display: grid; gap: 10px; justify-items: start; }
.bk-side .tool-note { margin: 0; }

@media (max-width: 640px) {
  .bk-stage { height: clamp(360px, 62vh, 520px); }
  .bk-parent { grid-template-columns: 1fr; }
  .bk-go { padding: 16px 28px; }
}
