.smart-guide-launcher {
  position: fixed; right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100;
  display: inline-flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px);
  padding: 13px 18px; border: 1px solid #0a6657; border-radius: 999px;
  background: #0c7462; color: #fff; font: inherit; font-weight: 700;
  box-shadow: 0 8px 30px #0b50452b; cursor: pointer;
}
.smart-guide-launcher[hidden] { display: none; }
.smart-guide-launcher:not([hidden]) { animation: smart-guide-rise 520ms cubic-bezier(.2,.75,.25,1) both; }
.smart-guide-launcher svg { width: 26px; height: 26px; flex: none; transform-origin: 50% 15%; }
.smart-guide-launcher:not([hidden]) svg { animation: smart-guide-ring 700ms ease-in-out 380ms both; }
@keyframes smart-guide-rise {
  from { opacity: 0; transform: translateY(calc(100% + 32px)); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes smart-guide-ring {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(12deg); }
  40%, 80% { transform: rotate(-12deg); }
}
@media (prefers-reduced-motion: reduce) {
  .smart-guide-launcher:not([hidden]), .smart-guide-launcher:not([hidden]) svg { animation: none; }
}
.smart-guide-launcher small { font-size: 11px; background: #ffffff26; padding: 2px 7px; border-radius: 20px; }
.smart-guide-launcher:hover { background: #095b4e; }
.smart-guide-dialog {
  box-sizing: border-box; position: fixed; inset: auto 20px 90px auto; margin: 0;
  width: 390px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 110px);
  padding: 0; border: 1px solid #dce8e4; border-radius: 20px;
  background: #fff; color: #202a28; font: inherit; text-align: right;
  box-shadow: 0 20px 70px #0b2b3333; overflow: auto; overscroll-behavior: contain;
}
.smart-guide-dialog::backdrop { background: #102c2940; }
.smart-guide-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; background: #0c7462; color: white; }
.smart-guide-header strong { display: block; font-size: 17px; }
.smart-guide-header span { display: block; font-size: 12px; margin-top: 4px; opacity: .9; }
.smart-guide-header button { flex: none; width: 40px; height: 40px; border: 1px solid #ffffff55; border-radius: 12px; background: transparent; color: white; font-size: 26px; cursor: pointer; }
.smart-guide-notice { margin: 14px; padding: 11px; border: 1px solid #e5d8b5; border-radius: 10px; background: #fffaf0; font-size: 12px; line-height: 1.9; }
.smart-guide-messages { padding: 0 14px; max-height: 220px; overflow-y: auto; }
.smart-guide-message { width: fit-content; max-width: 100%; box-sizing: border-box; padding: 12px; margin: 10px 0; background: #f0f6f4; border-radius: 12px 12px 3px 12px; font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-wrap; }
.smart-guide-message.is-visitor { background: #eaf0fa; margin-right: auto; border-radius: 12px 12px 12px 3px; }
.smart-guide-message a { display: block; margin-top: 8px; color: #075b4d; text-decoration: underline; }
.smart-guide-examples { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px; }
.smart-guide-examples button { border: 1px solid #d5e3dd; background: #fff; color: #145f50; border-radius: 20px; padding: 8px 10px; font: inherit; font-size: 11px; cursor: pointer; }
.smart-guide-form { padding: 14px; border-top: 1px solid #e7edea; }
.smart-guide-form label { display: block; margin-bottom: 7px; font-size: 12px; }
.smart-guide-form > div { display: flex; gap: 8px; }
.smart-guide-form input { box-sizing: border-box; min-width: 0; flex: 1; width: 100%; border: 1px solid #cbd9d3; border-radius: 10px; padding: 11px; font: inherit; font-size: 13px; }
.smart-guide-form button { flex: none; border: 0; border-radius: 10px; padding: 10px 14px; background: #0c7462; color: #fff; font: inherit; cursor: pointer; }
.smart-guide-dialog :focus-visible, .smart-guide-launcher:focus-visible { outline: 3px solid #e09c25; outline-offset: 3px; }
@media (max-width: 480px) {
  .smart-guide-launcher { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); padding: 12px 15px; }
  .smart-guide-dialog { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-height: calc(100dvh - 32px); }
}
