/* Case Files 0.1.3: gameplay additions (kept out of index.html so the visual pass and the gameplay pass never touch the same lines).
   - fb-right / fb-wrong: instant feedback on every checked tap (src/ui/fb.js adds the class for ~0.7 s).
     Right = a gold flash. Wrong = a gentle shake, never red, never an X. Reduced motion (the Parent Zone / device setting): no shake, a calm color pulse.
   - word chips above the keyboard, the report frame, the desk note, "Solve it again", the briefing top padding. */

/* ---------- feedback on a tap ---------- */
@keyframes fbGold {
  0% { box-shadow: 0 0 0 0 rgba(255, 214, 102, 0); background-color: rgba(255, 214, 102, 0); }
  30% { box-shadow: 0 0 0 5px rgba(255, 214, 102, .9), 0 0 20px 6px rgba(255, 196, 60, .65); background-color: rgba(255, 214, 102, .85); }
  100% { box-shadow: 0 0 0 0 rgba(255, 214, 102, 0); background-color: rgba(255, 214, 102, 0); }
}
@keyframes fbShake { 0%, 100% { transform: translateX(0); } 18% { transform: translateX(-5px); } 36% { transform: translateX(5px); } 54% { transform: translateX(-4px); } 72% { transform: translateX(3px); } }
@keyframes fbShakeInline { 0%, 100% { left: 0; } 18% { left: -4px; } 36% { left: 4px; } 54% { left: -3px; } 72% { left: 2px; } }
@keyframes fbPulse { 0%, 100% { background-color: rgba(168, 148, 220, 0); } 35% { background-color: rgba(168, 148, 220, .55); } }
.fb-right.fb-right { animation: fbGold .7s ease-out; border-radius: 5px; }
.fb-wrong.fb-wrong { animation: fbShake .42s ease-in-out; }
.s.fb-wrong.fb-wrong, .tok.fb-wrong.fb-wrong { position: relative; animation-name: fbShakeInline; }
.reduced-motion .fb-wrong.fb-wrong, .reduced-motion .s.fb-wrong.fb-wrong, .reduced-motion .tok.fb-wrong.fb-wrong { animation: fbPulse .7s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .fb-wrong.fb-wrong, .s.fb-wrong.fb-wrong, .tok.fb-wrong.fb-wrong { animation: fbPulse .7s ease-out !important; }
  .fb-right.fb-right { animation-duration: .7s !important; }
}

/* ---------- the briefing: nothing clipped under the header (the first bubble's glow and border) ---------- */
#screen-case[data-beat="brief"] .pane-scroll { padding-top: 12px; scroll-padding-top: 12px; }
#screen-case[data-beat="investigate"] .pane-scroll { padding-top: 8px; scroll-padding-top: 8px; }

/* ---------- word chips (the case report): tap the clue's words instead of typing ---------- */
.kbwrap { flex-direction: column; align-items: center; }
.word-chips { width: min(100%, 720px); display: flex; flex-wrap: wrap; gap: 6px; margin: 0 auto 8px; max-height: 146px; overflow-y: auto; touch-action: pan-y; }
.word-chips[hidden] { display: none; }
.word-chip { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--manila-edge); background: var(--manila); color: var(--manila-ink); font: 700 17px/1 var(--font-body); box-shadow: 0 3px 0 var(--manila-edge); cursor: pointer; }
.word-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--manila-edge); background: #fff3c8; }
@media (orientation: landscape) and (max-height: 500px) {
  .word-chips { flex-wrap: nowrap; overflow: auto hidden; max-height: none; touch-action: pan-x; margin-bottom: 4px; scrollbar-width: none; }
  .word-chip { min-height: 44px; font-size: 16px; }
}

/* ---------- the report sentence: the clue on its own line, the period stays with the blank ---------- */
.frame .dot { font-weight: 400; }
.frame .frame-clue { display: block; margin-top: 4px; }
.frame .frame-clue .blank { display: block; margin: 4px 0 0; }

/* ---------- the desk ---------- */
.desk-note { margin: 0; padding: 8px 12px; border-radius: 6px; background: rgba(220, 171, 74, .16); border: 2px solid var(--brass); font: 400 16px/1.4 var(--font-body); }
.desk-note[data-needed="0"] { background: rgba(47, 209, 192, .12); border-color: var(--accent); }

/* ---------- a closed case file: "Solve it again" ---------- */
.file-foot { padding-top: 8px; }
.replay-note { margin: 0; text-align: center; font: 400 16px/1.3 var(--font-type); letter-spacing: .04em; color: var(--brass); }
