/* AI電話窓口のモーダル（contact.html）。色はサイトのブランドに合わせる。 */
.phone-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px; color: #1a1f1d; background: #fff; box-shadow: 0 16px 48px rgb(0 0 0 / 0.24); }
.phone-dialog::backdrop { background: rgb(10 20 16 / 0.55); }
.phone-dialog__inner { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.phone-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e3e7e5; }
.phone-dialog__title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.phone-dialog__close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: #1a1f1d; background: #f0f2f1; cursor: pointer; }
.phone-dialog__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 20px; line-height: 1.7; word-break: auto-phrase; }
.phone-dialog__lead { margin: 0 0 12px; color: #5a6663; font-size: 0.92rem; }
.phone-notice { margin: 0 0 12px; padding: 12px 16px; border-radius: 10px; background: #f4f6f5; font-size: 0.88rem; }
.phone-notice h3 { margin: 0; font-size: 0.95rem; }
.phone-notice ul { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; }
.phone-notice li { display: list-item; }
.phone-notice p { margin: 6px 0 0; }
.phone-notice a { color: #00764a; }
.phone-agree { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; font-size: 0.92rem; }
.phone-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* 操作ボタンは本文の外の下端に固定する。通話中、会話が長くなっても「通話を終了する」がいつも見える。 */
.phone-dialog__foot { flex: none; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #e3e7e5; background: #fff; }
.phone-btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 12px 24px; cursor: pointer; }
.phone-btn--call { color: #fff; background: #00764a; }
.phone-btn--hang { color: #fff; background: #c0392b; }
.phone-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.phone-btn[hidden] { display: none; }
.phone-status { font-size: 0.9rem; color: #5a6663; }
.phone-status.is-error { color: #c0392b; }
.phone-status.is-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #c0392b; vertical-align: 1px; animation: phone-pulse 1.2s ease-in-out infinite; }
@keyframes phone-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .phone-status.is-live::before { animation: none; } }
.phone-log { margin-top: 16px; min-height: 120px; max-height: 40vh; overflow-y: auto; padding: 8px; border: 1px solid #e3e7e5; border-radius: 10px; }
.phone-log:empty::before { content: "会話がここに文字で表示されます。"; color: #8a9491; font-size: 0.85rem; }
.phone-m { padding: 8px 12px; border-radius: 10px; margin: 6px 0; max-width: 85%; white-space: pre-wrap; font-size: 0.92rem; }
.phone-m--ai { background: #e3f5ec; }
.phone-m--me { background: #eef0ef; margin-left: auto; }
.phone-m--sys { max-width: none; color: #5a6663; font-size: 0.8rem; text-align: center; }
@media (max-width: 600px) {
  .phone-dialog { width: 100%; max-width: none; height: 100dvh; inset: 0; max-height: none; margin: 0; border-radius: 0; }
  .phone-dialog__inner { height: 100%; max-height: none; }
  .phone-log { max-height: none; flex: 1; }
}
.phone-fields { margin: 0 0 8px; padding: 0; border: 0; }
.phone-fields legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.phone-fields label { display: block; margin: 8px 0 2px; font-size: 0.85rem; color: #5a6663; }
.phone-fields input:not([type=hidden]) { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #cfd6d3; border-radius: 8px; }
.phone-req { margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 0.72rem; color: #8a2a1f; background: #fbe9e7; }
