:root {
  /* Brand & LINE-inspired Modern Palette (Chatbot Widget) */
  --primary-blue: #0068b7;
  --primary-blue-dark: #004b87;
  --primary-blue-light: #ebf5ff;
  --primary-blue-border: #9ecaff;

  --line-green: #06c755;
  --line-green-dark: #05a847;
  --line-green-light: #e8fbf0;

  --danger-red: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;

  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --surface-white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.15);

  /* Animation Curves */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.support-launcher-btn,
.chat-viewport,
.chat-popup-overlay,
.modal-overlay {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  line-height: 1.55;
  letter-spacing: normal;
  -webkit-tap-highlight-color: transparent;
}

.support-launcher-btn *,
.chat-viewport *,
.chat-popup-overlay *,
.modal-overlay * {
  box-sizing: border-box;
  letter-spacing: normal;
}

/* =========================================================
   Bottom-Right Floating Launcher Button (Supporter Icon Only)
   - Default: Web Production LP Theme (Bold Ink Frame)
   - .is-calm-theme: Corporate Top, Media & Works Theme (Clean Navy/Teal Ring)
   z-index: 850 (kept behind mobile hamburger drawer at 1200)
   ========================================================= */
.support-launcher-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 850;
  width: 68px;
  height: 68px;
  background: #ffffff;
  border: 3.5px solid #0d1f38;
  border-radius: 50%;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 5px 5px 0 #0d1f38;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s ease;
}

.support-launcher-btn:hover {
  background: #ffffff;
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #0d1f38;
}

.support-launcher-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 #0d1f38;
}

.support-launcher-btn:not(.is-past-fv),
.support-launcher-btn.is-hidden,
.support-launcher-btn.is-popup-active {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.94);
}

.launcher-icon-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.support-launcher-btn:hover .launcher-icon-wrap {
  transform: scale(1.06);
}

.launcher-icon-wrap img,
.launcher-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.launcher-icon-wrap svg {
  width: 28px;
  height: 28px;
  display: block;
}

.launcher-status-dot {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #06c755;
  border: 2.5px solid #0d1f38;
  z-index: 2;
}

/* Calm Corporate Theme (Top page index.php, Media & Works pages) */
.support-launcher-btn.is-calm-theme {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border: 2.5px solid #2c5f7f;
  padding: 2px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.24),
    0 0 0 3px rgba(102, 212, 196, 0.25);
}

.support-launcher-btn.is-calm-theme:hover {
  background: #ffffff;
  border-color: #66d4c4;
  transform: translateY(-3px);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.3),
    0 0 0 4px rgba(102, 212, 196, 0.35);
}

.support-launcher-btn.is-calm-theme:active {
  transform: translateY(-1px);
}

.support-launcher-btn.is-calm-theme .launcher-icon-wrap {
  background: #ffffff;
  border: none;
  box-shadow: none;
}

.support-launcher-btn.is-calm-theme .launcher-status-dot {
  top: 0px;
  right: 0px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.launcher-text-col,
.launcher-sub,
.launcher-label,
.launcher-stamp,
.launcher-arrow {
  display: none !important;
}

/* =========================================================
   Contact Section Trigger Card & Button (#contact)
   ========================================================= */
.contact-chat-trigger-card {
  background: #ffffff;
  color: #0d1f38;
  border: 4px solid #0d1f38;
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: 10px 10px 0 #0d1f38;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.contact-chat-trigger-badge {
  display: inline-block;
  background: #ffe100;
  color: #0d1f38;
  border: 2px solid #0d1f38;
  box-shadow: 2px 2px 0 #0d1f38;
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.contact-chat-trigger-title {
  font-family: "M PLUS 1p", "Noto Sans JP", sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 900;
  color: #0d1f38;
  line-height: 1.35;
  margin: 0;
}

.contact-chat-trigger-desc {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  line-height: 1.7;
  max-width: 440px;
  margin: 0 0 4px;
}

.contact-chat-installment-note {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  color: #92400e;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 460px;
  margin: 0 0 6px;
}

.contact-chat-installment-note strong {
  color: #b45309;
  font-weight: 800;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-installment-note {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-installment-note strong {
  color: #14532d;
}

.contact-chat-trigger-btn {
  width: 100%;
  max-width: 380px;
  background: #f2491d;
  color: #ffffff;
  border: 3px solid #0d1f38;
  border-radius: 999px;
  padding: 18px 26px;
  font-family: "M PLUS 1p", "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 5px 5px 0 #0d1f38;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.contact-chat-trigger-btn:hover {
  background: #e03c11;
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #0d1f38;
}

.contact-chat-trigger-btn__arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffe100;
  color: #0d1f38;
  border: 2px solid #0d1f38;
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Calm Corporate Theme for Contact Trigger Card (Top page & Works pages) */
.contact-chat-trigger-card.is-calm-theme {
  border: 1.5px solid #d5e3ec;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(31, 44, 61, 0.08);
  padding: 36px 28px;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-badge {
  background: #d6efea;
  color: #1f2c3d;
  border: 1px solid #66d4c4;
  box-shadow: none;
  font-weight: 700;
  font-size: 12.5px;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-title {
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  color: #1f2c3d;
  font-weight: 700;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-desc {
  color: #475569;
  font-weight: 500;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-btn {
  max-width: 480px;
  background: linear-gradient(135deg, #1f2c3d 0%, #2c5f7f 100%);
  color: #ffffff;
  border: 2px solid #66d4c4;
  box-shadow: 0 14px 32px rgba(31, 44, 61, 0.26);
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 21px 32px;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-btn:hover {
  background: #66d4c4;
  color: #1f2c3d;
  border-color: #66d4c4;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(31, 44, 61, 0.32);
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-btn__arrow {
  background: #66d4c4;
  color: #1f2c3d;
  border: none;
  width: 34px;
  height: 34px;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-btn:hover .contact-chat-trigger-btn__arrow {
  background: #1f2c3d;
  color: #66d4c4;
}

@media (max-width: 500px) {
  .contact-chat-trigger-card,
  .contact-chat-trigger-card.is-calm-theme {
    padding: 28px 18px;
    border-radius: 18px;
  }
  .contact-chat-trigger-desc {
    font-size: 14px;
  }
  .contact-chat-trigger-btn,
  .contact-chat-trigger-card.is-calm-theme .contact-chat-trigger-btn {
    max-width: 100%;
    padding: 19px 22px;
    font-size: 17px;
  }
}

/* =========================================================
   Foreground Chat Popup Overlay (Centered Modal in Foreground)
   ========================================================= */
.chat-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(13, 31, 56, 0.58);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  animation: fadeIn 0.2s ease;
}

.chat-popup-overlay.is-open {
  display: flex;
}

/* =========================================================
   Chat Viewport (Embedded inside #contact OR Foreground Popup)
   ========================================================= */
.chat-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 680px;
  background: var(--surface-white);
  border: 4px solid #0d1f38;
  border-radius: 24px;
  box-shadow: 10px 10px 0 #0d1f38;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1 !important;
  transform: none !important;
}

.chat-viewport.is-popup-mode {
  width: min(760px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  max-height: 820px;
  box-shadow: 0 24px 48px rgba(13, 31, 56, 0.35), 8px 8px 0 #0d1f38;
  animation: slideFadeUp 0.25s var(--ease-out-expo);
}

.chat-viewport.is-calm-theme {
  border: 1.5px solid #d5e3ec;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(31, 44, 61, 0.12);
}

.chat-viewport.is-calm-theme.is-popup-mode {
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  box-shadow: 0 24px 52px rgba(31, 44, 61, 0.32);
}

/* =========================================================
   Top Progress Bar (STEP 1 > STEP 2 > STEP 3) + Close & Back
   ========================================================= */
.progress-container {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 16px 12px;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.progress-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  width: 100%;
}

.chat-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #0d1f38;
  background: #ffe100;
  color: #0d1f38;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 #0d1f38;
  transition: all 0.18s ease;
}

.chat-close-btn:hover {
  background: #f2491d;
  color: #ffffff;
}

.chat-viewport.is-calm-theme .chat-close-btn {
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2c3d;
  box-shadow: none;
  font-weight: 700;
}

.chat-viewport.is-calm-theme .chat-close-btn:hover {
  background: #1f2c3d;
  color: #ffffff;
  border-color: #1f2c3d;
}

.chat-viewport:not(.is-popup-mode) .chat-close-btn {
  display: none;
}

.chat-close-btn--sp {
  display: none;
}

.stepper-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
  transition: color 0.3s ease;
}

.step-item.active {
  color: var(--primary-blue);
  font-weight: 700;
}

.step-item.completed {
  color: var(--line-green-dark);
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.step-item.active .step-badge {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.16);
}

.step-item.completed .step-badge {
  background: var(--line-green);
  color: #fff;
}

.sp-br {
  display: none;
}

.step-label {
  white-space: nowrap;
  line-height: 1.25;
}

.step-arrow {
  color: #94a3b8;
  font-size: 11px;
  margin: 0 1px;
  flex-shrink: 0;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--line-green) 100%);
  border-radius: 999px;
  width: 15%;
  transition: width 0.55s var(--ease-out-expo);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-sub);
  margin-top: 9px;
  width: 100%;
}

#progressStepText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-mini-btn {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  color: #1e293b;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.nav-mini-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.nav-mini-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* =========================================================
   Chat Timeline Area (LINE-like Conversation Feed)
   ========================================================= */
.chat-timeline {
  flex: 1;
  position: relative;
  background-color: #d9e3f0;
  background-image: linear-gradient(180deg, #dde6f3 0%, #d2deee 100%);
  padding: 18px 14px 24px;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Message Row Animations (Slide & Fade-in) */
@keyframes slideFadeUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes botBubbleFromAvatar {
  0% {
    opacity: 0;
    transform: translate(-12px, -4px) scale(0.84);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.msg-row.bot {
  justify-content: flex-start;
}

.msg-row.user {
  justify-content: flex-end;
  animation: slideFadeUp 0.35s var(--ease-out-expo) forwards;
}

/* Bot Avatar */
.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
  flex-shrink: 0;
  margin-top: 2px;
}

.bot-avatar svg,
.bot-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.msg-content-col {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.bot-sender-name {
  font-size: 13px;
  color: #334155;
  font-weight: 700;
  margin-bottom: 4px;
  margin-left: 2px;
}

.bubble-wrap {
  display: flex;
  align-items: flex-end;
}

/* Chat Bubbles (Large, Clear Typography for 50s+) */
.chat-viewport .chat-bubble {
  position: relative;
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 16.5px;
  line-height: 1.65;
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  display: block;
  width: auto;
}

.msg-row.bot .chat-bubble {
  background: #ffffff;
  color: var(--text-main);
  border-top-left-radius: 4px;
  transform-origin: top left;
  animation: botBubbleFromAvatar 0.45s var(--ease-out-expo) forwards;
}

.msg-row.bot .chat-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 8px solid #ffffff;
  border-left: 8px solid transparent;
}

.msg-row.user .chat-bubble {
  background: var(--line-green);
  color: #ffffff;
  border-top-right-radius: 4px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(6, 199, 85, 0.22);
}

.msg-row.user .chat-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  right: -6px;
  width: 0;
  height: 0;
  border-top: 8px solid var(--line-green);
  border-right: 8px solid transparent;
}

/* =========================================================
   Typing Indicator (・・・ Bouncing Animation)
   ========================================================= */
.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 15px 18px;
  background: #ffffff;
  border-radius: 16px;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.1s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    background: #94a3b8;
  }
  30% {
    transform: translateY(-6px);
    background: var(--primary-blue);
  }
}

/* =========================================================
   Choice Panel & Selectable Buttons (Large Tap Targets & Clear Text)
   ========================================================= */
.interaction-block {
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 0 0 2px rgba(0, 104, 183, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideFadeUp 0.42s var(--ease-out-expo) forwards;
}

.choice-panel-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-blue);
  padding: 0 2px 6px;
  border-bottom: 1.5px solid #e2e8f0;
  margin-bottom: 2px;
}

.choice-panel-header svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.option-btn {
  width: 100%;
  background: #f8fbff;
  border: 2px solid var(--primary-blue-border);
  border-radius: 13px;
  padding: 14px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 0 rgba(0, 104, 183, 0.1);
  transition:
    transform 0.15s var(--ease-spring),
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
  font-family: inherit;
}

/* Radio Circle Indicator */
.option-radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid var(--primary-blue);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.option-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-blue);
  transform: scale(0);
  transition: transform 0.18s var(--ease-spring);
}

.option-btn:hover {
  border-color: var(--primary-blue);
  background: var(--primary-blue-light);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 104, 183, 0.16);
}

.option-btn:hover .option-radio::after {
  transform: scale(1);
}

.option-btn:active,
.option-btn.tapped {
  transform: scale(0.97) translateY(1px);
  background: #dbeafe;
  border-color: var(--primary-blue-dark);
  box-shadow: none;
}

.option-btn.tapped .option-radio {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.option-btn.tapped .option-radio::after {
  background: #ffffff;
  transform: scale(1);
}

/* Free Input Trigger Button */
.option-btn.free-input-trigger {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  box-shadow: none;
}

.option-btn.free-input-trigger .option-radio {
  border-color: #64748b;
}

.option-btn.free-input-trigger:hover {
  border-color: var(--primary-blue);
  background: #f1f5f9;
}

/* Emergency / Red-Card Choice Styling */
.option-btn.danger-trigger {
  background: #fffafa;
  border-color: #fca5a5;
}

.option-btn.danger-trigger .option-radio {
  border-color: var(--danger-red);
}

.option-btn.danger-trigger:hover {
  border-color: var(--danger-red);
  background: var(--danger-bg);
}

.option-btn.danger-trigger:hover .option-radio::after {
  background: var(--danger-red);
}

.option-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.option-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-blue-dark);
  line-height: 1.45;
}

.option-btn.danger-trigger .option-title {
  color: #b91c1c;
}

.option-btn.free-input-trigger .option-title {
  color: #1e293b;
}

.option-sub {
  font-size: 13.5px;
  color: var(--text-sub);
  font-weight: 500;
  line-height: 1.45;
}

.option-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--primary-blue-border);
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.option-chevron svg {
  width: 15px;
  height: 15px;
}

.option-btn:hover .option-chevron {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #ffffff;
  transform: translateX(2px);
}

/* =========================================================
   Seamless Inline Free-Text Drawer
   ========================================================= */
.inline-free-input-box {
  background: #ffffff;
  border: 2px solid var(--primary-blue);
  border-radius: 12px;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: slideFadeUp 0.28s var(--ease-out-expo) forwards;
}

.inline-free-input-box.open {
  display: flex;
}

.inline-free-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-blue);
}

.inline-textarea,
.inline-text-input {
  width: 100%;
  border: 1.5px solid #94a3b8;
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inline-textarea:focus,
.inline-text-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.15);
}

.inline-submit-btn {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease;
}

.inline-submit-btn:hover {
  background: var(--primary-blue-dark);
}

.inline-submit-btn:active {
  transform: scale(0.97);
}

/* =========================================================
   Q4 Optional URL & Screenshot Attachment Card
   ========================================================= */
.optional-form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.optional-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  margin-left: 8px;
}

.form-field-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.maker-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.maker-chip {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.maker-chip:hover,
.maker-chip.selected {
  background: var(--primary-blue-light);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  font-weight: 700;
}

.photo-upload-zone {
  border: 2px dashed #94a3b8;
  border-radius: 11px;
  padding: 16px 14px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-upload-zone:hover {
  border-color: var(--primary-blue);
  background: var(--primary-blue-light);
}

.photo-preview-box {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  gap: 10px;
  margin-top: 8px;
}

.photo-preview-box.has-file {
  display: flex;
}

.photo-preview-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
}

.skip-primary-btn {
  width: 100%;
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 104, 183, 0.24);
  transition: transform 0.16s var(--ease-spring), background 0.2s ease;
}

.skip-primary-btn:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-1px);
}

.skip-primary-btn:active {
  transform: scale(0.97);
}

/* =========================================================
   Q5 Estimated Price Card
   ========================================================= */
.estimate-card {
  background: #f8fbff;
  border: 2px solid var(--primary-blue-border);
  border-radius: 13px;
  padding: 15px;
  margin-bottom: 4px;
}

.estimate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.estimate-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-blue);
}

.estimate-price-main {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  white-space: pre-wrap;
}

.estimate-price-main span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}

.estimate-installment-box {
  margin-top: 10px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.estimate-installment-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: #d97706;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.4;
}

.estimate-installment-price {
  font-size: 14.5px;
  font-weight: 800;
  color: #92400e;
  line-height: 1.45;
  white-space: pre-wrap;
}

.estimate-breakdown {
  font-size: 14px;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #ffffff;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
}

/* =========================================================
   Q10 One-Tap Agreement & TimeRex CTA
   ========================================================= */
.agreement-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
}

.agreement-list li {
  font-size: 15px;
  color: #0f172a;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.55;
}

.agreement-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--primary-blue-light);
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.timerex-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, #f39800 0%, #e07b00 100%);
  color: #ffffff;
  border: none;
  border-radius: 13px;
  padding: 16px 14px;
  font-size: 16.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.45;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(243, 152, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.16s var(--ease-spring), box-shadow 0.2s ease;
}

.timerex-cta-main {
  display: block;
  text-align: center;
  line-height: 1.45;
}

.timerex-cta-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 7px 20px rgba(243, 152, 0, 0.45);
}

.timerex-cta-btn:active {
  transform: scale(0.97);
}

.timerex-cta-sub {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}

/* =========================================================
   Red Card / LINE Handoff Card
   ========================================================= */
.line-handoff-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.emergency-banner {
  background: var(--danger-bg);
  color: var(--danger-red);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  border: 1.5px solid var(--danger-border);
}

.prefill-preview-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 14px;
  color: #1e293b;
}

.prefill-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 7px;
}

.prefill-text-content {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: #0f172a;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  max-height: 170px;
  overflow-y: auto;
  word-break: break-word;
}

.line-cta-btn {
  width: 100%;
  background: var(--line-green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.16s var(--ease-spring), background 0.18s ease;
}

.line-cta-btn:hover {
  background: var(--line-green-dark);
  transform: translateY(-1px);
}

.line-cta-btn:active {
  transform: scale(0.97);
}

/* =========================================================
   Modals (PC LINE QR Modal & TimeRex Booking Calendar Modal)
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1350;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideFadeUp 0.28s var(--ease-out-expo);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-right: 40px;
  margin-bottom: 10px;
}

.modal-badge {
  display: inline-block;
  color: #ffffff;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.4;
}

.modal-badge.line-badge {
  background: #06c755;
}

.modal-badge.timerex-badge {
  background: #0068b7;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.modal-desc {
  font-size: 14px;
  color: #334155;
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 9px;
  margin-bottom: 12px;
  line-height: 1.55;
}

.qr-section-pc {
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #334155;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qr-grid-box {
  width: 176px;
  height: 176px;
  margin: 12px auto;
  padding: 12px;
  border: 2px solid var(--line-green);
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timerex-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.timerex-slot-btn {
  padding: 12px 10px;
  border: 2px solid #cbd5e1;
  border-radius: 11px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  font-size: 14.5px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.timerex-slot-btn:hover,
.timerex-slot-btn.selected {
  border-color: var(--primary-blue);
  background: var(--primary-blue-light);
  color: var(--primary-blue);
}

@media (max-width: 768px) {
  .support-launcher-btn,
  .support-launcher-btn.is-calm-theme {
    right: 16px;
    bottom: 16px;
    width: 58px;
    height: 58px;
    padding: 2px;
  }
  .launcher-icon-wrap {
    width: 100%;
    height: 100%;
  }
  .launcher-status-dot,
  .support-launcher-btn.is-calm-theme .launcher-status-dot {
    width: 13px;
    height: 13px;
  }
  /* スマホでは周囲の余白を消し、画面全体（フルスクリーン）にチャットを表示 */
  .chat-popup-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background: #ffffff;
    backdrop-filter: none;
  }
  .chat-viewport {
    height: 600px;
    border: 3px solid #0d1f38;
    border-radius: 18px;
    box-shadow: 5px 5px 0 #0d1f38;
  }
  .chat-viewport.is-calm-theme {
    border: 1.5px solid #d5e3ec;
    box-shadow: 0 12px 32px rgba(31, 44, 61, 0.12);
  }
  .chat-viewport.is-popup-mode,
  .chat-viewport.is-calm-theme.is-popup-mode {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  /* スマホ時はヘッダーのステップ（1 お悩み確認 ▶ 2 料金 ▶ 3 LINE）を削除し1行のコンパクトヘッダーに */
  .progress-container {
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .progress-top-row,
  .stepper-steps,
  .chat-close-btn--pc {
    display: none !important;
  }
  .progress-meta {
    order: 1;
    font-size: 12.5px;
    font-weight: 700;
    margin-top: 0;
    min-height: 32px;
  }
  .progress-bar-track {
    order: 2;
    height: 4px;
  }
  .nav-mini-actions {
    gap: 6px;
  }
  .nav-mini-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  /* 最初の質問（戻る不可）の時は「← 1つ戻る」ボタン自体を非表示にしてスッキリさせる */
  #backStepBtn:disabled {
    display: none;
  }
  .chat-close-btn--sp {
    display: inline-flex;
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-left: 2px;
  }
  .chat-timeline {
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .bot-avatar {
    width: 34px;
    height: 34px;
  }
  .bot-sender-name {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .chat-viewport .chat-bubble {
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 13px;
    border-radius: 13px;
  }
  .interaction-block {
    padding: 10px;
    gap: 7px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 0 0 1.5px rgba(0, 104, 183, 0.16);
  }
  /* ボットの吹き出しと重複するパネル見出しとラジオ丸をスマホでは非表示にしてノイズを削減 */
  .choice-panel-header {
    display: none;
  }
  .option-btn {
    padding: 11px 12px;
    gap: 8px;
    border-radius: 10px;
    border-width: 1.5px;
    box-shadow: none;
  }
  .option-radio {
    display: none;
  }
  .option-title {
    font-size: 14px;
    line-height: 1.35;
  }
  .option-sub {
    font-size: 11.5px;
    line-height: 1.35;
  }
  .option-chevron {
    width: 22px;
    height: 22px;
  }
  .modal-overlay {
    padding: 12px;
  }
  .modal-card {
    padding: 18px 16px;
    max-height: calc(100dvh - 24px);
  }
  .qr-section-pc,
  .pc-only-inline {
    display: none;
  }
  .prefill-text-content {
    max-height: 140px;
    font-size: 13px;
    line-height: 1.5;
  }
}
