/* Doctor Chat Module Styles - メディカライアンス寄せ (C2パターン) */
/* 配色: ティール(#009B95) + 黄(#FFDE16) アクセント、角丸 20px、統一シャドウ */

:root {
  --ml-50:  #eef8f7;
  --ml-100: #d4efeb;
  --ml-200: #a7ded6;
  --ml-300: #7accbe;
  --ml-400: #4eaca5;
  --ml-500: #009b95;
  --ml-600: #00807a;
  --ml-700: #005e5a;
  --ml-800: #003c3a;
  --ml-accent: #ffde16;
  --ml-accent-hover: #ffe94c;
  --ml-ink: #343434;
  --ml-ink-muted: #6b6b6b;
  --ml-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  --ml-shadow-soft: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

/* ========================================
 * ヒーローヘッダー (ml-hero)
 * ======================================== */
.ml-hero {
  background:
    radial-gradient(circle at 110% 30%, rgba(255, 222, 22, 0.5) 0%, rgba(255, 222, 22, 0) 80%),
    linear-gradient(45deg, #009B95 75%, #FFDE16 150%);
  color: #FFF;
}

[data-doctor-chat-logo-reset] {
  cursor: pointer;
  text-align: left;
}

/* ========================================
 * PC表示サイズ切替
 * ======================================== */
.dc-display-size-toggle {
  align-items: center;
  background: rgba(0, 60, 58, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 9999px;
  color: #fff;
  flex-shrink: 0;
  gap: 6px;
  padding: 5px 6px 5px 12px;
  white-space: nowrap;
}

.dc-display-size-toggle__label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.92;
}

.dc-display-size-toggle__button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid transparent;
  border-radius: 9999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 32px;
  min-width: 36px;
  padding: 0 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dc-display-size-toggle__button:hover,
.dc-display-size-toggle__button:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.64);
  outline: none;
}

.dc-display-size-toggle__button.is-active,
.dc-display-size-toggle__button[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--ml-700);
}

@media (max-width: 1023px) {
  .dc-display-size-toggle {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  html[data-doctor-chat-display-size="small"] {
    --dc-display-text-3xl: 1.375rem;
    --dc-display-text-2xl: 1.125rem;
    --dc-display-text-xl: 0.9375rem;
    --dc-display-text-lg: 0.875rem;
    --dc-display-text-base: 0.8125rem;
    --dc-display-text-sm: 0.6875rem;
    --dc-display-text-xs: 0.625rem;
  }

  html[data-doctor-chat-display-size="medium"] {
    --dc-display-text-3xl: 1.5rem;
    --dc-display-text-2xl: 1.25rem;
    --dc-display-text-xl: 1rem;
    --dc-display-text-lg: 1rem;
    --dc-display-text-base: 0.875rem;
    --dc-display-text-sm: 0.75rem;
    --dc-display-text-xs: 0.6875rem;
  }

  html[data-doctor-chat-display-size="large"] {
    --dc-display-text-3xl: 1.625rem;
    --dc-display-text-2xl: 1.375rem;
    --dc-display-text-xl: 1.125rem;
    --dc-display-text-lg: 1.0625rem;
    --dc-display-text-base: 0.9375rem;
    --dc-display-text-sm: 0.8125rem;
    --dc-display-text-xs: 0.75rem;
  }

  html[data-doctor-chat-display-size="small"] body main {
    font-size: 0.8125rem;
  }

  html[data-doctor-chat-display-size="medium"] body main {
    font-size: 0.875rem;
  }

  html[data-doctor-chat-display-size="large"] body main {
    font-size: 0.9375rem;
  }

  html[data-doctor-chat-display-size="small"] body main .text-3xl,
  html[data-doctor-chat-display-size="medium"] body main .text-3xl,
  html[data-doctor-chat-display-size="large"] body main .text-3xl {
    font-size: var(--dc-display-text-3xl) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-2xl,
  html[data-doctor-chat-display-size="medium"] body main .text-2xl,
  html[data-doctor-chat-display-size="large"] body main .text-2xl {
    font-size: var(--dc-display-text-2xl) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-xl,
  html[data-doctor-chat-display-size="medium"] body main .text-xl,
  html[data-doctor-chat-display-size="large"] body main .text-xl {
    font-size: var(--dc-display-text-xl) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-lg,
  html[data-doctor-chat-display-size="medium"] body main .text-lg,
  html[data-doctor-chat-display-size="large"] body main .text-lg {
    font-size: var(--dc-display-text-lg) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-base,
  html[data-doctor-chat-display-size="medium"] body main .text-base,
  html[data-doctor-chat-display-size="large"] body main .text-base {
    font-size: var(--dc-display-text-base) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-sm,
  html[data-doctor-chat-display-size="medium"] body main .text-sm,
  html[data-doctor-chat-display-size="large"] body main .text-sm {
    font-size: var(--dc-display-text-sm) !important;
  }

  html[data-doctor-chat-display-size="small"] body main .text-xs,
  html[data-doctor-chat-display-size="medium"] body main .text-xs,
  html[data-doctor-chat-display-size="large"] body main .text-xs {
    font-size: var(--dc-display-text-xs) !important;
  }

  html[data-doctor-chat-display-size] .dc-ai-message-body {
    font-size: var(--dc-display-text-xl) !important;
  }

  html[data-doctor-chat-display-size="small"] .dc-pill-label,
  html[data-doctor-chat-display-size="small"] .dc-specialty-search,
  html[data-doctor-chat-display-size="small"] .dc-specialty-option,
  html[data-doctor-chat-display-size="medium"] .dc-pill-label,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-search,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-option,
  html[data-doctor-chat-display-size="large"] .dc-pill-label,
  html[data-doctor-chat-display-size="large"] .dc-specialty-search,
  html[data-doctor-chat-display-size="large"] .dc-specialty-option {
    font-size: var(--dc-display-text-sm);
  }

  html[data-doctor-chat-display-size="small"] .dc-specialty-chip,
  html[data-doctor-chat-display-size="small"] .dc-specialty-chip-remove,
  html[data-doctor-chat-display-size="small"] .dc-specialty-group-title,
  html[data-doctor-chat-display-size="small"] .dc-specialty-no-results,
  html[data-doctor-chat-display-size="small"] .dc-input-accuracy-label,
  html[data-doctor-chat-display-size="small"] .dc-input-accuracy-count,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-chip,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-chip-remove,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-group-title,
  html[data-doctor-chat-display-size="medium"] .dc-specialty-no-results,
  html[data-doctor-chat-display-size="medium"] .dc-input-accuracy-label,
  html[data-doctor-chat-display-size="medium"] .dc-input-accuracy-count,
  html[data-doctor-chat-display-size="large"] .dc-specialty-chip,
  html[data-doctor-chat-display-size="large"] .dc-specialty-chip-remove,
  html[data-doctor-chat-display-size="large"] .dc-specialty-group-title,
  html[data-doctor-chat-display-size="large"] .dc-specialty-no-results,
  html[data-doctor-chat-display-size="large"] .dc-input-accuracy-label,
  html[data-doctor-chat-display-size="large"] .dc-input-accuracy-count {
    font-size: var(--dc-display-text-xs);
  }

  html[data-doctor-chat-display-size="small"] .dc-thinking-bubble,
  html[data-doctor-chat-display-size="medium"] .dc-thinking-bubble,
  html[data-doctor-chat-display-size="large"] .dc-thinking-bubble {
    font-size: var(--dc-display-text-sm);
  }

}

/* ========================================
 * カード / バブル
 * ======================================== */
.ml-card {
  background: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow);
}

.ml-card-soft {
  background: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow-soft);
}

.ml-bubble-ai {
  background: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow-soft);
}

.ml-bubble-user {
  background: linear-gradient(135deg, #009B95 0%, #4EACA5 100%);
  color: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow);
}

/* ========================================
 * 会話型オンボーディング
 * ======================================== */
.dc-onboarding {
  width: 100%;
}

.dc-user-bubble.dc-onboarding-form {
  background: #f8fcfb;
  border: 1px solid rgba(0, 155, 149, 0.35);
  box-shadow: 0 4px 14px rgba(0, 60, 58, 0.08);
  color: var(--ml-ink);
}

.dc-onboarding-form {
  padding: 20px;
}

.dc-onboarding-prompt {
  color: var(--ml-ink);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.dc-onboarding-field + .dc-onboarding-field {
  margin-top: 14px;
}

.dc-onboarding-label {
  color: var(--ml-ink);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dc-onboarding-input {
  background: #fff;
  border: 1px solid rgba(0, 155, 149, 0.35);
  border-radius: 10px;
  color: var(--ml-ink);
  font-size: 16px;
  min-height: 46px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.dc-onboarding-input:focus {
  border-color: var(--ml-500);
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.16);
}

.dc-onboarding-results {
  background: #fff;
  border: 1px solid rgba(0, 155, 149, 0.28);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 60, 58, 0.08);
  color: var(--ml-ink);
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  width: 100%;
}

.dc-onboarding-option {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--ml-100);
  color: var(--ml-ink);
  cursor: pointer;
  display: block;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.dc-onboarding-option:last-child {
  border-bottom: 0;
}

.dc-onboarding-option:hover,
.dc-onboarding-option[aria-selected="true"] {
  background: var(--ml-50);
}

.dc-onboarding-option-name,
.dc-onboarding-option-address {
  display: block;
}

.dc-onboarding-option-name {
  font-weight: 700;
}

.dc-onboarding-option-address {
  color: var(--ml-ink-muted);
  font-size: 13px;
  margin-top: 3px;
}

.dc-onboarding-results-empty {
  color: var(--ml-ink-muted);
  font-size: 14px;
  padding: 11px 12px;
}

.dc-onboarding-link {
  background: transparent;
  border: 0;
  color: var(--ml-700);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  padding: 0;
  text-decoration: underline;
}

.dc-onboarding-consent {
  align-items: flex-start;
  color: var(--ml-ink);
  display: flex;
  font-size: 14px;
  gap: 8px;
  line-height: 1.5;
  margin-top: 14px;
}

.dc-onboarding-consent input {
  accent-color: var(--ml-500);
  cursor: pointer;
  flex: 0 0 auto;
  height: 18px;
  margin-top: 1px;
  width: 18px;
}

.dc-onboarding-consent-text {
  white-space: nowrap;
}

.dc-onboarding-notes {
  color: var(--ml-ink-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}

.dc-onboarding-error {
  color: #9b3a3a;
  font-size: 14px;
  min-height: 21px;
  padding-top: 8px;
}

.dc-onboarding-submit {
  align-items: center;
  background: var(--ml-accent);
  border: 0;
  border-radius: 9999px;
  color: var(--ml-800);
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
}

.dc-onboarding-submit:disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
}

.dc-onboarding-form input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.dc-onboarding-modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  height: 100vh;
  height: 100dvh;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 60;
}

.dc-onboarding-modal[hidden] {
  display: none;
}

.dc-onboarding-modal-open {
  overflow: hidden;
}

.dc-onboarding-modal-card {
  background: #fff;
  border-radius: 14px;
  color: var(--ml-ink);
  display: flex;
  flex-direction: column;
  max-height: min(760px, calc(100vh - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  max-width: 720px;
  min-height: 0;
  width: 100%;
}

.dc-onboarding-modal-header,
.dc-onboarding-modal-footer {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  padding: 16px 20px;
}

.dc-onboarding-modal-header {
  border-bottom: 1px solid var(--ml-100);
}

.dc-onboarding-modal-footer {
  border-top: 1px solid var(--ml-100);
  justify-content: flex-end;
}

.dc-onboarding-modal-body {
  flex: 1 1 auto;
  line-height: 1.7;
  min-height: 0;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.dc-onboarding-modal-body h4,
.dc-onboarding-modal-body h5 {
  font-weight: 700;
}

.dc-onboarding-modal-close,
.dc-onboarding-modal-button {
  border: 0;
  cursor: pointer;
}

.dc-onboarding-modal-close {
  align-items: center;
  background: transparent;
  color: var(--ml-700);
  display: inline-flex;
  font-size: 24px;
  justify-content: center;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
}

.dc-onboarding-modal-button {
  background: #fff;
  border: 1px solid rgba(0, 155, 149, 0.35);
  border-radius: 9999px;
  color: var(--ml-700);
  font-weight: 700;
  padding: 8px 20px;
}

@media (max-width: 639px) {
  .dc-onboarding-modal {
    align-items: stretch;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .dc-onboarding-modal-card {
    max-height: 100%;
  }

  .dc-onboarding-modal-header {
    padding: 10px 10px 10px 16px;
  }

  .dc-onboarding-modal-footer {
    padding: 12px 16px;
  }

  .dc-onboarding-modal-button {
    min-height: 44px;
    width: 100%;
  }

  .dc-onboarding .max-w-\[85\%\] {
    max-width: 94%;
  }

  .dc-ai-bubble-shell {
    width: 75%;
    max-width: 75%;
    min-width: 0;
  }

  .dc-onboarding-form,
  .dc-onboarding-modal-body {
    padding: 16px;
  }

  .dc-onboarding-results {
    max-height: 180px;
  }
}

/* ========================================
 * CTA ボタン群
 * ======================================== */
/* 黄色ピル + ˅矢印先頭 (メディカライアンス実物準拠) */
.ml-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ml-accent);
  color: var(--ml-800);
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.ml-cta:hover { background: var(--ml-accent-hover); transform: translateY(-1px); }
.ml-cta::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ml-800);
  border-bottom: 2px solid var(--ml-800);
  transform: rotate(45deg) translateY(-2px);
}

/* 枠付きセカンダリ (アウトライン) */
.ml-cta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
  color: var(--ml-500);
  border: 2px solid var(--ml-500);
  font-weight: 700;
  border-radius: 999px;
  transition: all 0.2s;
  cursor: pointer;
}
.ml-cta-outline:hover { background: var(--ml-50); }

/* ========================================
 * アクセス集中ステータス
 * ======================================== */
.dc-access-status {
  display: none;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 155, 149, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--ml-shadow-soft);
}

.dc-access-status.is-visible {
  display: block;
}

.dc-access-status [hidden],
.dc-access-status .hidden {
  display: none !important;
}

.dc-access-status__bar {
  height: 4px;
  overflow: hidden;
  background: var(--ml-100);
}

.dc-access-status__bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--ml-500), var(--ml-accent));
  animation: dc-access-status-bar 1.6s ease-in-out infinite;
}

.dc-access-status__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.dc-access-status__copy h3 {
  margin: 0 0 4px;
  color: var(--ml-800);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.dc-access-status__copy p {
  margin: 0;
  color: var(--ml-ink-muted);
  font-size: 13px;
  line-height: 1.55;
}

.dc-access-status__retry {
  margin-top: 4px !important;
  color: var(--ml-600) !important;
  font-weight: 700;
}

.dc-access-status__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.dc-access-status__retry-button,
.dc-access-status__contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dc-access-status__retry-button {
  border: 1px solid var(--ml-500);
  color: var(--ml-700);
  background: #fff;
}

.dc-access-status__retry-button:disabled {
  border-color: #d6d6d6;
  color: #999;
  cursor: not-allowed;
}

.dc-access-status__contact {
  color: var(--ml-800);
  background: var(--ml-accent);
}

@keyframes dc-access-status-bar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

@media (max-width: 640px) {
  .dc-access-status__body {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .dc-access-status__actions {
    justify-content: flex-start;
  }
}

.dc-entry-limit {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid rgba(0, 155, 149, 0.22);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ml-shadow-soft);
}

.dc-entry-limit__bar {
  height: 5px;
  overflow: hidden;
  background: var(--ml-100);
}

.dc-entry-limit__bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--ml-500), var(--ml-accent));
  animation: dc-access-status-bar 1.6s ease-in-out infinite;
}

.dc-entry-limit__body {
  padding: 28px;
}

.dc-entry-limit__eyebrow {
  margin: 0 0 8px;
  color: var(--ml-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.dc-entry-limit h1 {
  margin: 0 0 10px;
  color: var(--ml-900);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.dc-entry-limit__message {
  margin: 0;
  color: var(--ml-ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.dc-entry-limit__retry {
  margin: 12px 0 0;
  color: var(--ml-600);
  font-size: 13px;
  font-weight: 700;
}

.dc-entry-limit__actions {
  display: flex;
  margin-top: 20px;
}

.dc-entry-limit__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ml-500);
  border-radius: 999px;
  color: var(--ml-700);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dc-entry-limit__button--accent {
  border-color: var(--ml-accent);
  color: var(--ml-800);
  background: var(--ml-accent);
}

@media (max-width: 640px) {
  .dc-entry-limit__body {
    padding: 22px;
  }

  .dc-entry-limit h1 {
    font-size: 19px;
  }
}

/* 送信ボタン (グラデ) */
.ml-cta-send {
  background: linear-gradient(45deg, #009b95 75%, #ffde16 150%);
  color: #FFF;
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.ml-cta-send:hover { transform: translateY(-1px); }
.ml-cta-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========================================
 * マーカー (蛍光ペン風)
 * .ml-marker および AI バブル内の <strong> (=Markdownの **強調**) に適用
 * ======================================== */
.ml-marker,
.dc-ai-bubble strong {
  background: linear-gradient(transparent 60%, rgba(255, 222, 22, 0.6) 60%);
  font-weight: 700;
}

/* ========================================
 * 入力エリア
 * ======================================== */
.ml-input {
  border: 2px solid var(--ml-200);
  border-radius: 16px;
  background: #FFF;
}
.ml-input:focus {
  border-color: var(--ml-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.2);
}

/* ========================================
 * AI思考中バウンスドット
 * ======================================== */
@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.thinking-dots span {
  width: 6px;
  height: 6px;
  background-color: var(--ml-500);
  border-radius: 50%;
  display: inline-block;
  animation: bounce-dot 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
.thinking-dots span:nth-child(3) { animation-delay: 0s; }

/*
 * 考え中ステータスのフェードイン
 */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.thinking-status {
  animation: fade-in-up 0.4s ease-out forwards;
}

/*
 * メッセージバブルの出現アニメーション
 */
@keyframes bubble-slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bubble-enter {
  animation: bubble-slide-in 0.3s ease-out forwards;
}

/*
 * ストリーミング中のカーソル点滅
 */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--ml-500);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.8s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .streaming-cursor {
    animation: none;
  }
}

/*
 * プロフィールカード - アバターホバー時に表示
 */
.profile-card {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.group:hover > .profile-card,
.profile-card-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 639px) {
  .profile-card {
    left: 50%;
    transform: translateX(-50%);
  }

  .dc-profile-card {
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px) !important;
  }
}

/*
 * 音声再生ボタン
 */
.dc-audio-btn {
  background-color: #fff;
  border: 2px solid var(--ml-200);
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dc-audio-btn:hover {
  background-color: var(--ml-50);
}

.dc-audio-play-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ml-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.dc-audio-label {
  color: var(--ml-700);
}

.dc-audio-sublabel {
  color: var(--ml-ink-muted);
}

.dc-audio-btn.playing {
  background-color: var(--ml-500);
  border-color: var(--ml-500);
}

.dc-audio-btn.playing .dc-audio-play-icon {
  background: rgba(255, 255, 255, 0.2);
  animation: dc-audio-pulse 1.5s ease-in-out infinite;
}

.dc-audio-btn.playing .dc-audio-label {
  color: white;
}

.dc-audio-btn.playing .dc-audio-sublabel {
  color: rgba(255, 255, 255, 0.75);
}

.dc-audio-btn.playing:hover {
  background-color: var(--ml-600);
}

@keyframes dc-audio-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
}

/*
 * 予約ボタン
 */
.booking-btn {
  transition: background-color 0.2s ease;
}

.booking-btn:hover {
  opacity: 0.88;
}

/* ========================================
 * AI回答精度ゲージ
 * ======================================== */
.dc-accuracy-bar {
  transition: width 0.6s ease;
  background: linear-gradient(45deg, #009b95 75%, #ffde16 150%) !important;
}

/* ========================================
 * 左サイドバー - カテゴリカード（アコーディオン）
 * ======================================== */
.dc-sidebar-card {
  position: relative;
  background: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow-soft);
  transition: box-shadow 0.2s ease;
}

.dc-sidebar-card:hover {
  box-shadow: var(--ml-shadow);
}

.dc-sidebar-card label {
  transition: background-color 0.2s ease;
}

.dc-text-input {
  border: 2px solid var(--ml-200);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dc-text-input:focus {
  border-color: var(--ml-500);
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.2);
  outline: none;
}

.dc-accordion-header {
  cursor: pointer;
  user-select: none;
}

.dc-accordion-chevron {
  transition: transform 0.25s ease;
}

.dc-accordion-closed .dc-accordion-chevron {
  transform: rotate(-90deg);
}

.dc-accordion-body {
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}

.dc-sidebar-card:not(.dc-accordion-closed) .dc-accordion-body {
  overflow: visible;
}

.dc-sidebar-card[data-field="specialty"]:not(.dc-accordion-closed) .dc-accordion-header {
  padding-bottom: 10px;
}

.dc-accordion-closed .dc-accordion-body {
  max-height: 0;
  opacity: 0;
}

/* ピル型選択ボタン */
.dc-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dc-pill-group input[type="radio"],
.dc-pill-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.dc-pill-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 14px;
  color: var(--ml-ink);
  background: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1.3;
}

.dc-pill-label:hover {
  background-color: var(--ml-50);
  border-color: var(--ml-300);
}

.dc-pill-label:has(input:focus-visible) {
  border-color: var(--ml-500);
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.18);
}

.dc-pill-label:has(input:checked) {
  background-color: var(--ml-100);
  border-color: var(--ml-500);
  color: var(--ml-700);
  font-weight: 700;
}

.dc-specialty-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dc-specialty-selected {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dc-specialty-selected:empty {
  display: none;
}

.dc-specialty-chip {
  align-items: center;
  background: var(--ml-100);
  border: 1px solid var(--ml-300);
  border-radius: 9999px;
  color: var(--ml-800);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  line-height: 1.3;
  max-width: 100%;
  padding: 5px 8px 5px 10px;
}

.dc-specialty-chip span {
  overflow-wrap: anywhere;
}

.dc-specialty-chip-remove {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ml-200);
  border-radius: 9999px;
  color: var(--ml-700);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 20px;
}

.dc-specialty-chip-remove:hover {
  background: var(--ml-50);
  border-color: var(--ml-500);
}

.dc-specialty-no-results {
  color: var(--ml-ink-muted);
  font-size: 13px;
}

.dc-specialty-toolbar {
  display: flex;
}

.dc-specialty-search {
  background: #fff;
  border: 1px solid var(--ml-200);
  border-radius: 10px;
  color: var(--ml-ink);
  flex: 1 1 auto;
  font-size: 14px;
  min-width: 0;
  padding: 9px 11px;
}

.dc-specialty-search:focus {
  border-color: var(--ml-500);
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.12);
  outline: none;
}

.dc-specialty-extra-input {
  display: none;
}

.dc-specialty-list {
  border: 1px solid var(--ml-100);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}

.dc-specialty-group[hidden],
.dc-specialty-option[hidden],
.dc-specialty-no-results[hidden] {
  display: none;
}

.dc-specialty-group + .dc-specialty-group {
  border-top: 1px solid var(--ml-100);
  margin-top: 8px;
  padding-top: 8px;
}

.dc-specialty-group-title {
  color: var(--ml-700);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dc-specialty-options {
  display: grid;
  gap: 4px;
}

.dc-specialty-option {
  align-items: center;
  border-radius: 8px;
  color: var(--ml-ink);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 8px;
  line-height: 1.4;
  padding: 7px 8px;
}

.dc-specialty-option:hover {
  background: var(--ml-50);
}

.dc-specialty-option input {
  accent-color: var(--ml-600);
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.dc-specialty-option:has(input:checked) {
  background: var(--ml-100);
  color: var(--ml-800);
  font-weight: 700;
}

/* ========================================
 * プロフィールカードのメッセージブロック
 * ======================================== */
.dc-profile-message {
  background: var(--ml-50);
  border-left: 3px solid var(--ml-500);
  border-radius: 8px;
}

/* ========================================
 * プロフィールカード本体
 * ======================================== */
.dc-profile-card {
  border-radius: 20px;
  box-shadow: var(--ml-shadow);
}

/* ========================================
 * メッセージバブル (旧クラス互換: ml-bubble-* と同等)
 * ======================================== */
.dc-ai-bubble {
  background: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow-soft);
}

.dc-ai-message-body {
  font-size: 1.125rem;
}

.dc-ai-mobile-icon {
  align-items: center;
  background: #fff;
  border: 2px solid var(--ml-500);
  border-radius: 9999px;
  color: var(--ml-700);
  display: none;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  width: 34px;
}

.dc-ai-mobile-icon__image {
  background: #fff;
  border-radius: inherit;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  width: 100%;
}

@media (max-width: 1023px) {
  :root {
    --dc-mobile-text-xl: 1rem;
    --dc-mobile-text-lg: 0.9375rem;
    --dc-mobile-text-base: 0.8125rem;
    --dc-mobile-text-sm: 0.75rem;
    --dc-mobile-text-xs: 0.6875rem;
  }

  .dc-ai-message-body {
    font-size: var(--dc-mobile-text-xl);
    line-height: 1.65;
  }

  .dc-ai-mobile-icon {
    display: inline-flex;
    font-size: var(--dc-mobile-text-sm);
  }

  body main .dc-ai-bubble-header .text-lg {
    font-size: var(--dc-mobile-text-lg) !important;
  }

  .dc-onboarding-form {
    padding: 18px;
  }

  .dc-onboarding-label {
    font-size: var(--dc-mobile-text-base);
  }

  .dc-onboarding-option {
    padding: 10px 12px;
  }

  .dc-onboarding-option-address {
    font-size: var(--dc-mobile-text-sm);
  }

  .dc-onboarding-results-empty,
  .dc-onboarding-consent,
  .dc-onboarding-error {
    font-size: var(--dc-mobile-text-base);
  }

  .dc-onboarding-prompt {
    font-size: var(--dc-mobile-text-lg);
  }

  .dc-onboarding-notes {
    font-size: var(--dc-mobile-text-sm);
  }

  .dc-onboarding-submit {
    font-size: var(--dc-mobile-text-lg);
  }

  .dc-access-status__copy h3 {
    font-size: var(--dc-mobile-text-lg);
    line-height: 1.4;
  }

  .dc-access-status__copy p,
  .dc-access-status__retry-button,
  .dc-access-status__contact {
    font-size: var(--dc-mobile-text-sm);
  }

  .dc-mobile-profile-note {
    padding: 13px 15px;
  }

  .dc-mobile-profile-note h3 {
    font-size: var(--dc-mobile-text-lg);
    line-height: 1.4;
  }

  .dc-mobile-profile-note p,
  .dc-mobile-contact-menu__lead,
  .dc-mobile-profile-meter-count,
  .dc-input-accuracy-label,
  .dc-input-accuracy--mobile .dc-input-accuracy-count {
    font-size: var(--dc-mobile-text-sm);
  }

  .dc-mobile-profile-meter-label,
  .dc-input-accuracy-count {
    font-size: var(--dc-mobile-text-xs);
  }

  .dc-input-accuracy-ring-caption {
    font-size: 9px;
  }

  .dc-faq-btn {
    font-size: var(--dc-mobile-text-sm) !important;
    line-height: 1.35;
  }

  .dc-mobile-contact-menu__action {
    font-size: var(--dc-mobile-text-base);
  }

  .dc-disclaimer,
  .dc-disclaimer-detail {
    font-size: var(--dc-mobile-text-xs);
  }
}

.dc-user-bubble {
  background: linear-gradient(135deg, #009B95 0%, #4EACA5 100%);
  color: #FFF;
  border-radius: 20px;
  box-shadow: var(--ml-shadow);
}

.dc-user-bubble:not(.dc-onboarding-form) * {
  color: #FFF !important;
}

/* ========================================
 * 送信取り消しアイコン（ゴミ箱）
 * ======================================== */
.dc-undo-icon {
  display: block;
  margin-left: auto;
  width: fit-content;
  padding-top: 4px;
  background: none;
  border: none;
  color: var(--ml-200);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.group:hover > .dc-undo-icon {
  opacity: 1;
}

.dc-undo-icon:hover {
  color: var(--ml-600);
}

/* 送信取り消し通知（一時表示 → フェードアウト） */
.dc-undo-notice {
  text-align: center;
  font-size: 12px;
  color: var(--ml-ink-muted);
  padding: 8px 0;
  animation: dc-undo-notice-fade 3s ease forwards;
}

@keyframes dc-undo-notice-fade {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}

/* ========================================
 * 右サイドバー - CTAカード & ボタン
 * ======================================== */
.dc-cta-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--ml-shadow-soft);
}

/* 旧 dc-cta-btn: 黄色ピル CTA に置換 */
.dc-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ml-accent);
  color: var(--ml-800) !important;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.dc-cta-btn:hover {
  background: var(--ml-accent-hover);
  transform: translateY(-1px);
}

.dc-cta-btn::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ml-800);
  border-bottom: 2px solid var(--ml-800);
  transform: rotate(45deg) translateY(-2px);
}

.dc-sidebar-contact-link {
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--ml-100);
  border-radius: 12px;
  color: var(--ml-800);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 82px;
  padding: 13px 12px;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  width: 100%;
}

.dc-sidebar-contact-link:hover,
.dc-sidebar-contact-link:focus-visible {
  background: linear-gradient(90deg, #f7fcfb 0%, #eef8f7 100%);
  border-color: var(--ml-200);
  outline: none;
  transform: translateY(-1px);
}

.dc-sidebar-contact-link__lead {
  color: var(--ml-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  text-align: center;
}

.dc-sidebar-contact-link__action {
  background: var(--ml-accent);
  border-radius: 9999px;
  color: var(--ml-800);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  padding: 9px 12px;
  white-space: nowrap;
  width: 100%;
}

/* ========================================
 * 営業担当者バストアップ写真（チャットエリア左下に固定配置）
 * ======================================== */
.dc-salesperson-fixed {
  align-items: center;
  flex-direction: column;
  gap: 1px;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
}

.dc-salesperson-img {
  display: block;
  width: 180px;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  object-position: left bottom;
  transition: opacity 0.15s ease;
}

.dc-salesperson-label {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 9999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  max-width: 180px;
  padding: 6px 14px;
}

/* 名札: 写真とは重ねず、画像下の白背景ラベルとして表示 */
.dc-salesperson-name {
  color: #005e5a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  max-width: 152px;
  overflow-wrap: break-word;
  text-align: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .dc-salesperson-fixed {
    display: flex;
  }

  .dc-has-salesperson {
    padding-left: 190px;
    padding-bottom: 0;
  }

  /* 営業担当者写真がある場合、PC幅では名前をイラスト直下に出すため吹き出し内ヘッダーを隠す */
  .dc-has-salesperson .dc-ai-bubble-header {
    display: none;
  }
}

/* ========================================
 * サイドバー (aside) スクロールバー: ティール
 * ======================================== */
aside.overflow-y-auto::-webkit-scrollbar {
  width: 8px;
}
aside.overflow-y-auto::-webkit-scrollbar-track {
  background: transparent;
}
aside.overflow-y-auto::-webkit-scrollbar-thumb {
  background-color: var(--ml-200);
  border-radius: 4px;
}
aside.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background-color: var(--ml-400);
}
aside.overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: var(--ml-200) transparent;
}

.dc-mobile-header-profile-toggle,
.dc-mobile-header-contact-toggle {
  align-items: center;
  background: var(--ml-accent);
  border: none;
  border-radius: 9999px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: var(--ml-800);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.25;
  min-height: 42px;
  padding: 10px 18px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.dc-mobile-header-icon {
  flex-shrink: 0;
  height: 16px;
  margin-right: 9px;
  width: 16px;
}

.dc-mobile-header-profile-toggle:hover,
.dc-mobile-header-profile-toggle[aria-expanded="true"],
.dc-mobile-header-contact-toggle:hover,
.dc-mobile-header-contact-toggle[aria-expanded="true"] {
  background: var(--ml-accent-hover);
  transform: translateY(-1px);
}

.dc-mobile-contact-menu {
  display: none;
}

.dc-mobile-sidebar-panel {
  background-color: #fff;
  border-top: 1px solid #d4efeb;
  max-height: 45vh;
  overflow-y: auto;
  padding-top: 16px;
  position: relative;
}

.dc-mobile-profile-sticky {
  position: relative;
}

.dc-mobile-profile-close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ml-200);
  border-radius: 9999px;
  color: var(--ml-700);
  display: none;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  width: 36px;
  z-index: 1;
}

.dc-mobile-profile-close:hover {
  background: var(--ml-50);
  border-color: var(--ml-400);
  color: var(--ml-800);
}

.dc-mobile-profile-close svg {
  height: 18px;
  width: 18px;
}

.dc-mobile-profile-note {
  background: #eef8f7;
  border: 1px solid var(--ml-200);
  border-radius: 16px;
  color: var(--ml-800);
  padding: 14px 16px;
}

.dc-mobile-profile-note p {
  color: var(--ml-700);
  line-height: 1.6;
}

.dc-mobile-profile-note-dot {
  background: var(--ml-500);
  border-radius: 9999px;
  height: 8px;
  width: 8px;
}

.dc-mobile-profile-meter {
  margin-top: 12px;
}

.dc-mobile-profile-meter-label {
  color: var(--ml-700);
  font-size: 12px;
  font-weight: 700;
}

.dc-mobile-profile-meter-count {
  color: var(--ml-800);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
}

.dc-mobile-profile-meter-track {
  background: #d8eeeb;
  border-radius: 9999px;
  height: 7px;
  margin-top: 6px;
  overflow: hidden;
}

.dc-input-accuracy {
  background: #eef8f7;
  border: 1px solid var(--ml-200);
  border-radius: 14px;
  display: block;
  margin-bottom: 10px;
  padding: 8px 11px 9px;
  text-align: left;
  width: 100%;
}

.dc-input-accuracy--mobile {
  display: none;
}

.dc-input-accuracy--sidebar {
  display: none;
  margin-bottom: 16px;
}

.dc-input-accuracy:hover {
  background: var(--ml-50);
  border-color: var(--ml-400);
}

.dc-input-accuracy-label {
  color: var(--ml-800);
  font-size: 13px;
  font-weight: 700;
}

.dc-input-accuracy-count {
  color: var(--ml-700);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}

.dc-input-accuracy-track {
  background: #d8eeeb;
  border-radius: 9999px;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .dc-input-accuracy {
    cursor: default;
  }

  .dc-input-accuracy--desktop {
    display: none;
  }

  .dc-input-accuracy--sidebar {
    display: block;
  }
}

@media (max-width: 1023px) {
  .dc-mobile-contact-menu:not([hidden]) {
    display: block;
  }

  .dc-mobile-contact-menu {
    left: 0;
    padding: 0 14px;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: calc(var(--dc-mobile-header-height, 74px) - 14px);
    z-index: 61;
  }

  .dc-mobile-contact-menu__panel {
    background: #fff;
    border: 1px solid rgba(122, 204, 190, 0.72);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(0, 60, 58, 0.16);
    margin-left: auto;
    max-width: 332px;
    overflow: hidden;
    pointer-events: auto;
    width: min(100%, 332px);
  }

  .dc-mobile-contact-menu__item {
    align-items: center;
    background: #fff;
    border: 0;
    color: var(--ml-800);
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 64px;
    padding: 13px 16px 13px 18px;
    text-align: left;
    text-decoration: none;
    width: 100%;
  }

  .dc-mobile-contact-menu__item + .dc-mobile-contact-menu__item {
    border-top: 1px solid var(--ml-100);
  }

  .dc-mobile-contact-menu__item:hover,
  .dc-mobile-contact-menu__item:focus-visible {
    background: linear-gradient(90deg, #f7fcfb 0%, #eef8f7 100%);
    outline: none;
  }

  .dc-mobile-contact-menu__lead {
    color: var(--ml-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    min-width: 0;
  }

  .dc-mobile-contact-menu__action {
    align-items: center;
    color: var(--ml-700);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
    line-height: 1.3;
    white-space: nowrap;
  }

  .dc-mobile-contact-menu__chevron {
    align-items: center;
    background: var(--ml-50);
    border: 1px solid var(--ml-200);
    border-radius: 9999px;
    color: var(--ml-500);
    display: inline-flex;
    height: 22px;
    justify-content: center;
    width: 22px;
  }

  .dc-mobile-contact-menu__chevron svg {
    height: 14px;
    width: 14px;
  }

  #dc-mobile-profile-details[open] .dc-mobile-sidebar-panel {
    background: #f5f5f5;
    border-top: 1px solid #d4efeb;
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(0, 94, 90, 0.12);
    left: 0;
    max-height: none;
    overflow-y: auto;
    padding: 0 18px 28px !important;
    position: fixed;
    right: 0;
    top: var(--dc-mobile-header-height, 84px);
    z-index: 55;
  }

  #dc-mobile-profile-details[open] .dc-mobile-profile-sticky {
    background: #f5f5f5;
    border-bottom: 1px solid #d4efeb;
    margin: 0 -18px 14px;
    padding: 14px 18px 12px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  #dc-mobile-profile-details[open] .dc-mobile-profile-close {
    display: flex;
    right: 18px;
    top: 18px;
  }

  #dc-mobile-profile-details[open] .dc-mobile-profile-note {
    padding-right: 54px;
  }

  .dc-input-accuracy--desktop {
    display: none;
  }

  .dc-input-accuracy--mobile {
    align-items: center;
    background: transparent !important;
    border: 0;
    border-color: transparent !important;
    border-radius: 9999px;
    box-shadow: none;
    display: flex;
    flex: 0 0 68px;
    height: 68px;
    justify-content: center;
    margin: 0;
    max-width: 68px;
    min-width: 68px;
    padding: 0;
    position: absolute;
    right: 0;
    bottom: 38px;
    width: 68px !important;
  }

  .dc-input-accuracy--mobile:hover {
    background: transparent !important;
    border-color: transparent !important;
  }

  .dc-input-accuracy-ring {
    align-items: center;
    background: conic-gradient(var(--ml-500) var(--dc-accuracy-pct), #d8eeeb 0);
    border-radius: 9999px;
    box-shadow: 0 8px 18px rgba(0, 94, 90, 0.14);
    display: flex;
    height: 64px;
    justify-content: center;
    width: 64px;
  }

  .dc-input-accuracy-ring-inner {
    align-items: center;
    background: #eef8f7;
    border-radius: 9999px;
    color: var(--ml-800);
    display: flex;
    flex-direction: column;
    gap: 1px;
    height: 52px;
    justify-content: center;
    line-height: 1;
    text-align: center;
    width: 52px;
  }

  .dc-input-accuracy--mobile .dc-input-accuracy-count {
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    margin-top: 0;
  }

  .dc-input-accuracy-ring-caption {
    color: var(--ml-600);
    display: block;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.05;
    margin: 0 auto;
    max-width: 42px;
  }
}

@media (min-width: 1024px) {
  .dc-mobile-contact-menu {
    display: none !important;
  }
}

/* ========================================
 * FAQセクション & ボタン
 * ======================================== */
.dc-mobile-accuracy-strip {
  background: transparent;
  flex-basis: 0;
  height: 0;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0 !important;
  padding-top: 0 !important;
  pointer-events: none;
  position: relative;
  z-index: 10;
}

.dc-mobile-accuracy-strip .dc-input-accuracy--mobile {
  pointer-events: auto;
}

.dc-mobile-accuracy-strip .max-w-3xl {
  height: 0;
  position: relative;
}

@media (min-width: 1024px) {
  .dc-mobile-accuracy-strip {
    display: none !important;
  }
}

.dc-faq-section {
  background: #fff;
  border-top: 2px solid var(--ml-100) !important;
  overflow: visible;
  padding-top: 10px !important;
  position: relative;
  z-index: 8;
}

.dc-faq-section > .max-w-3xl {
  position: relative;
}

.dc-faq-row {
  align-items: center;
  display: flex;
  margin-top: 4px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.dc-faq-toggle {
  align-items: center;
  background: #fff;
  border: 2px solid var(--ml-200);
  border-bottom-color: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -3px 10px rgba(0, 94, 90, 0.08);
  color: var(--ml-700);
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 0;
  top: -44px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  width: 42px;
  z-index: 3;
}

.dc-faq-toggle:hover {
  background: var(--ml-50);
  border-color: var(--ml-500);
  border-bottom-color: var(--ml-50);
  color: var(--ml-800);
}

.dc-faq-toggle-icon {
  height: 16px;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
  width: 16px;
}

.dc-faq-scroller {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 2px;
}

.dc-faq-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  scrollbar-color: var(--ml-300) transparent;
  scrollbar-width: thin;
}

.dc-faq-list::-webkit-scrollbar {
  height: 5px;
}

.dc-faq-list::-webkit-scrollbar-track {
  background: transparent;
}

.dc-faq-list::-webkit-scrollbar-thumb {
  background: var(--ml-300);
  border-radius: 9999px;
}

.dc-faq-list::-webkit-scrollbar-thumb:hover {
  background: var(--ml-500);
}

.dc-faq-btn {
  background-color: white;
  color: var(--ml-ink);
  border: 2px solid var(--ml-200);
  border-radius: 9999px;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  padding: 6px 14px;
  white-space: nowrap;
}

.dc-faq-btn:hover {
  border-color: var(--ml-500);
  color: var(--ml-700);
  background-color: var(--ml-50);
}

.dc-faq-section--collapsed {
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}

.dc-faq-section--collapsed .dc-faq-row {
  height: 0;
  margin-top: 0;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
  width: 100%;
}

.dc-faq-section--collapsed .dc-faq-toggle {
  top: -30px;
}

.dc-faq-section--collapsed .dc-faq-toggle:hover {
  background: var(--ml-50);
  border-color: var(--ml-500);
  border-bottom-color: var(--ml-50);
}

.dc-faq-section--collapsed .dc-faq-scroller {
  display: none;
  height: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.dc-faq-section--collapsed .dc-faq-list {
  height: 0;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.dc-faq-section--collapsed .dc-faq-toggle-icon {
  height: 13px;
  transform: rotate(0deg);
  width: 13px;
}

@media (min-width: 1024px) {
  .dc-faq-toggle {
    right: 20px;
  }

  .dc-faq-section--has-salesperson .dc-faq-toggle {
    right: -70px;
  }
}

/* ========================================
 * 入力エリア
 * ======================================== */
.dc-input-area {
  background: #fff;
  border-top: 2px solid var(--ml-100) !important;
}

.dc-input-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

@media (max-width: 1023px) {
  .dc-input-actions {
    display: none;
    justify-content: space-between;
  }
}

.dc-input-area textarea {
  border: 2px solid var(--ml-200) !important;
  border-radius: 16px !important;
  line-height: 1.35 !important;
  min-height: 49px;
  padding-bottom: 10px !important;
  padding-top: 10px !important;
}

.dc-input-area textarea:focus {
  border-color: var(--ml-500) !important;
  box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.2);
}

.dc-input-area textarea::placeholder {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-input-area textarea.dc-onboarding-composer-locked {
  min-height: 70px;
}

.dc-input-area textarea.dc-onboarding-composer-locked::placeholder {
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 640px) {
  .dc-input-area textarea {
    font-size: 16px !important;
    line-height: 1.35 !important;
    min-height: 46px;
    padding-left: 14px !important;
    padding-right: 52px !important;
    padding-bottom: 9px !important;
    padding-top: 9px !important;
  }

  .dc-input-area textarea::placeholder {
    font-size: 16px;
  }

  .dc-disclaimer-summary-text {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    overflow: hidden;
  }
}

.dc-input-area kbd {
  background: var(--ml-50);
  border: 1px solid var(--ml-200);
  color: var(--ml-700);
}

.dc-disclaimer {
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
  text-align: center;
}

.dc-disclaimer-summary {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
  max-width: 100%;
}

.dc-disclaimer-inline {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.dc-disclaimer-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: normal;
}

.dc-disclaimer-toggle {
  align-items: center;
  background: var(--ml-50);
  border: 1px solid var(--ml-200);
  border-radius: 9999px;
  color: var(--ml-600);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  width: 22px;
}

.dc-disclaimer-toggle:hover {
  background: #fff;
  border-color: var(--ml-500);
  color: var(--ml-800);
}

.dc-disclaimer-toggle svg {
  height: 14px;
  width: 14px;
}

.dc-disclaimer-detail {
  background: #f8fcfb;
  border: 1px solid var(--ml-100);
  border-radius: 10px;
  color: #8a94a3;
  font-size: 12px;
  line-height: 1.6;
  margin: 3px auto 0;
  max-width: 640px;
  padding: 8px 10px;
  text-align: left;
}

@media (max-width: 480px) {
  .dc-disclaimer {
    font-size: 11px;
    line-height: 1.4;
  }

  .dc-disclaimer-summary {
    gap: 3px;
  }

  .dc-disclaimer-inline {
    gap: 3px;
  }

  .dc-disclaimer-toggle {
    height: 20px;
    width: 20px;
  }

  .dc-disclaimer-toggle svg {
    height: 13px;
    width: 13px;
  }
}

@media (max-width: 1023px) {
  body main .dc-user-bubble .text-xl,
  body main .bg-red-50.border.border-red-200 .text-xl {
    font-size: 1rem !important;
    line-height: 1.6;
  }

  .dc-mobile-contact-menu__lead,
  .dc-input-accuracy-label {
    font-size: 12px;
  }

  .dc-mobile-profile-meter-label {
    font-size: 11px;
  }

  .dc-mobile-profile-meter-count {
    font-size: 12px;
  }

  .dc-onboarding-link {
    font-size: var(--dc-mobile-text-base);
  }

  .dc-disclaimer {
    font-size: 12px;
  }

  .dc-disclaimer-detail {
    font-size: 11px;
  }

  .dc-profile-panel > .space-y-3 > p.text-sm.text-gray-600 {
    font-size: 13px !important;
    line-height: 1.55;
  }

  .dc-sidebar-card .text-base.font-semibold.text-gray-700 {
    font-size: 14px !important;
    line-height: 1.5;
  }

  .dc-sidebar-card .dc-accordion-value.text-base {
    font-size: 15px !important;
    line-height: 1.45;
  }

  .dc-pill-label,
  .dc-specialty-search,
  .dc-specialty-option {
    font-size: 13px;
  }

  .dc-specialty-chip,
  .dc-specialty-chip-remove,
  .dc-specialty-no-results,
  .dc-specialty-group-title {
    font-size: 12px;
  }
}

/* ========================================
 * 予約モーダル
 * ======================================== */
#booking-modal {
  background-color: rgba(0, 0, 0, 0.4);
  /* backdrop-filter: blur() は #lead-inquiries 等の animate-pulse と組み合わさると
     毎フレーム全画面再ブラーが走り 4fps 級に落ちるため不採用 */
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#booking-modal > .bg-white {
  animation: modal-slide-in 0.25s ease-out forwards;
  border-radius: 20px !important;
  box-shadow: var(--ml-shadow) !important;
}

/*
 * 予約モーダルのスクロールバーカスタマイズ
 */
#booking-slots-container::-webkit-scrollbar {
  width: 4px;
}

#booking-slots-container::-webkit-scrollbar-track {
  background: var(--ml-50);
}

#booking-slots-container::-webkit-scrollbar-thumb {
  background-color: var(--ml-200);
  border-radius: 2px;
}

/*
 * モーダルのスクロールエリア
 */
#booking-modal .max-h-64 {
  scrollbar-width: thin;
  scrollbar-color: var(--ml-200) var(--ml-50);
}

/*
 * 考え中バブル（担当者の近くに表示される移動可能なバブル）
 */
@keyframes bubble-pop-in {
  0%   { opacity: 0; transform: scale(0.8) translateY(4px); }
  60%  { opacity: 1; transform: scale(1.03) translateY(-1px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.dc-thinking-bubble {
  background: #ffffff;
  border: 2px solid var(--ml-200);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--ml-shadow-soft);
  position: fixed;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  pointer-events: none;
  animation: bubble-pop-in 0.35s ease-out forwards;
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 吹き出しの下向きしっぽ（ボーダー付き） */
.dc-thinking-bubble::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 23px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid var(--ml-200);
  transition: opacity 0.2s;
}

.dc-thinking-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 24px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #ffffff;
  transition: opacity 0.2s;
}

.dc-thinking-bubble.is-moving::before,
.dc-thinking-bubble.is-moving::after {
  opacity: 0;
}
