/* FREEZE score input, microphone state and checkout confirmation. */
.freeze-dart-input { display: contents; }
.freeze-score-input { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 6px; }
.freeze-score-input .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
.freeze-score-input .compact-input { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.freeze-score-input .checkout-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 8px; flex-shrink: 0; }
.freeze-score-input .checkout-actions .player-action-btn { min-height: 44px; padding: 8px; color: rgb(23,37,44); background: rgb(237,243,204); border-color: rgb(202,215,156); font-size: 15px; line-height: 1; }
.freeze-score-input .checkout-actions .player-action-btn:disabled { opacity: 1; color: rgb(131,144,150); background: rgb(247,249,250); border-color: rgb(220,226,229); }
.freeze-score-input .keypad { display: grid; flex: 1; width: 100%; margin: 0 auto; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); gap: 4px; min-height: 0; }
.freeze-score-input .keypad button { min-height: 0; padding: 1px 6px; color: rgb(36,75,93); background: #fff; border: 0 solid currentColor; border-width: 0 1px 1px 0; border-right-color: rgb(184,204,213); border-bottom-color: rgb(184,204,213); font-size: 25px; font-weight: 800; box-shadow: none; touch-action: manipulation; }
.freeze-score-input .keypad .key-clear { color: rgb(189,72,81); background: rgb(255,247,247); }
.freeze-score-input .keypad .key-enter { font-size: 17px; color: #17252c; background: #c3d825; }
.freeze-score-input .quick-score { margin-top: 6px; padding: 0; border: 0; background: transparent; flex-shrink: 0; }
.freeze-score-input .quick-score > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
.freeze-score-input .quick-score button { min-height: 28px; padding: 2px; font-size: clamp(11px,1.4cqw,17px); color: #eee; background: #24282a; border-color: #4a5053; }
.freeze-score-input .keypad-toggle { display: none; }
.freeze-score-input .mic-btn { display: flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; width: 100%; min-height: 34px; padding: 6px; border: 1px solid #454748; color: #fff; background: #191b1dcc; font-size: clamp(11px,1cqw,14px); text-align: center; font-weight: 400; line-height: normal; cursor: pointer; }
.freeze-score-input .mic-dot { display: block; width: 9px; height: 9px; margin: 0; border-radius: 50%; background: rgb(155,176,186); }
.freeze-score-input .mic-btn.listening .mic-dot { background: rgb(23,161,209); box-shadow: rgba(23,161,209,.13) 0 0 0 7px; animation: micPulse 1.2s ease-in-out infinite; }

.freeze-score-input .mic-btn[data-mic-active="true"] {
  background:#EB6238;
  border-color:#EB6238;
  color:#fff;
  box-shadow:none;
}
body button[data-mic-active="true"] * { color:#fff; }
body button[data-mic-active="true"] .mic-dot { background:#fff;box-shadow:none;animation:none; }
@keyframes micPulse { 50% { transform: scale(1.18); } }
.freeze-checkout-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px; background: #090b0de8; }
.freeze-checkout-modal .checkout-darts-card { max-height:calc(100dvh - 24px); width: min(420px,100%); text-align: center; }
.freeze-checkout-modal .checkout-darts-card h2 { font-size: 20px; }
.freeze-checkout-modal .checkout-darts-choices { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 18px 0; }
.freeze-checkout-modal .checkout-darts-choices .btn { min-height: 56px; font-size: 17px; background: #c3d825; color: #17252c; }
.freeze-checkout-modal #cancelCheckoutDartsBtn { min-height: 40px; padding: 8px; }
@media (pointer: coarse), (max-width: 920px) {
  .freeze-score-input .compact-input .keypad button { padding: 3px; color: #eee; background: #24282a; border: 1px solid #4a5053; font-size: clamp(19px,2.7cqw,34px); }
  .freeze-score-input .compact-input .keypad .key-enter { font-size: clamp(10px,1.3cqw,17px); color: #17252c; background: #c3d825; }
  .freeze-score-input .checkout-actions { gap: 4px; margin-bottom: 6px; }
  .freeze-score-input .checkout-actions .player-action-btn { min-height: 28px; padding: 3px; font-size: clamp(10px,1.2cqw,15px); }
  .freeze-score-input .quick-score { display: none; }
  .freeze-score-input .mic-btn { min-height: 0; line-height: 1.2; height: calc((max(clamp(48px,15cqh,64px), calc(clamp(30px,6cqw,110px) + clamp(4px,1cqw,14px) * 2 + 1px)) - 12px) / 2); padding: 2px; font-size: clamp(9px,1.15cqw,13px); }
  .freeze-score-input #micLabel { font-size: 0; }
  .freeze-score-input #micLabel::after { content: "音声入力"; font-size: clamp(9px,1.15cqw,13px); }
  .voice-input .freeze-score-input .keypad-toggle { display: block; align-self: flex-end; flex-shrink: 0; width: calc((100% - 8px) / 3); min-height: 28px; margin-bottom: 6px; padding: 2px; border: 1px solid #4a5053; background: #24282a; color: #eee; font-size: clamp(9px,1.1cqw,13px); cursor: pointer; }
  .voice-input:not(.keypad-expanded) .freeze-score-input .keypad { display: none; }
}
