:root {
  --sd-guide-navy: #111827;
  --sd-guide-green: #166534;
  --sd-guide-bright: #22c55e;
  --sd-guide-pale: #ecfdf5;
  --sd-guide-yellow: #facc15;
}

.sd-guide-launcher {
  position: fixed;
  right: 14px;
  bottom: max(94px, calc(env(safe-area-inset-bottom) + 78px));
  z-index: 18000;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 2px solid var(--sd-guide-bright);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  overflow: visible;
  transition: width 240ms ease, height 240ms ease, border-radius 240ms ease, transform 160ms ease, box-shadow 160ms ease, right 240ms ease;
}

@keyframes sd-skado-arrive {
  from {
    opacity: 0;
    transform: translateX(110px) rotate(12deg) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }
}

.sd-guide-launcher[data-intro="arriving"] {
  animation: sd-skado-arrive 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sd-guide-launcher:hover,
.sd-guide-launcher:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.34);
}

.sd-guide-launcher img {
  display: block;
  width: 68px;
  height: 68px;
  margin: 1px auto 0;
  object-fit: contain;
  border-radius: 50%;
  transition: opacity 220ms ease, transform 260ms ease;
}

.sd-guide-launcher[data-intro="departing"] img {
  opacity: 0;
  transform: translateX(100px) scaleX(-1) rotate(-10deg) scale(0.84);
  transition: opacity 620ms ease 80ms, transform 700ms cubic-bezier(0.55, 0, 1, 0.45);
}

.sd-guide-compact-label {
  display: none;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sd-guide-launcher[data-compact="true"] {
  right: -2px;
  width: 42px;
  height: 74px;
  border-color: var(--sd-guide-bright);
  border-radius: 22px 0 0 22px;
  background: var(--sd-guide-green);
}

.sd-guide-launcher[data-compact="true"] img {
  position: absolute;
  opacity: 0;
  transform: translateX(88px) rotate(18deg) scale(0.7);
  pointer-events: none;
}

.sd-guide-launcher[data-compact="true"] .sd-guide-compact-label {
  display: inline-block;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  transform: rotate(-90deg);
  line-height: 1;
}

.sd-guide-nudge {
  position: absolute;
  right: 62px;
  bottom: 48px;
  width: max-content;
  max-width: 170px;
  padding: 8px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 12px 12px 3px 12px;
  background: white;
  color: var(--sd-guide-navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.18);
}

.sd-guide-launcher:hover .sd-guide-nudge,
.sd-guide-launcher:focus-visible .sd-guide-nudge,
.sd-guide-launcher[data-nudge="true"] .sd-guide-nudge {
  opacity: 1;
  transform: translateY(0);
}

.sd-guide-launcher[data-compact="true"] .sd-guide-nudge {
  opacity: 0;
  transform: translateX(40px);
}

.sd-guide-panel {
  position: fixed;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 19000;
  display: none;
  width: min(390px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 28px));
  overflow: hidden;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  background: white;
  color: var(--sd-guide-navy);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.34);
}

.sd-guide-panel[aria-hidden="false"] {
  display: flex;
  flex-direction: column;
}

.sd-guide-panel-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: var(--sd-guide-navy);
  color: white;
}

.sd-guide-panel-header img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
}

.sd-guide-panel-header h2 {
  margin: 0;
  color: white;
  font-size: 19px;
}

.sd-guide-panel-header p {
  margin: 2px 0 0;
  color: #d1fae5;
  font-size: 12px;
}

.sd-guide-close,
.sd-guide-tour-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 25px;
  font-weight: 800;
  cursor: pointer;
}

.sd-guide-close:hover,
.sd-guide-close:focus-visible,
.sd-guide-tour-close:hover,
.sd-guide-tour-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.sd-guide-panel-body {
  overflow-y: auto;
  padding: 15px;
}

.sd-guide-tour-start {
  display: none;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--sd-guide-green);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sd-guide-tour-start[data-available="true"] {
  display: block;
}

.sd-guide-disclosure {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 9px;
  background: var(--sd-guide-pale);
  color: #14532d;
  font-size: 12px;
  line-height: 1.4;
}

.sd-guide-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 96px;
  max-height: 250px;
  overflow-y: auto;
  padding: 3px 2px 10px;
}

.sd-guide-message {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sd-guide-message.bot {
  align-self: flex-start;
  border: 1px solid #d1fae5;
  border-radius: 4px 12px 12px 12px;
  background: #f0fdf4;
}

.sd-guide-message.user {
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
  background: var(--sd-guide-navy);
  color: white;
}

.sd-guide-message strong {
  display: block;
  margin-bottom: 4px;
}

.sd-guide-message span {
  white-space: pre-wrap;
}

.sd-guide-message a {
  display: inline-block;
  margin-top: 7px;
  color: var(--sd-guide-green);
  font-weight: 800;
}

.sd-guide-question-label {
  display: block;
  margin: 5px 0 7px;
  font-weight: 800;
}

.sd-guide-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sd-guide-form input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #94a3b8;
  border-radius: 9px;
  color: var(--sd-guide-navy);
  background: white;
  font: inherit;
}

.sd-guide-form button {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--sd-guide-green);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sd-guide-form button:disabled,
.sd-guide-form input:disabled {
  cursor: wait;
  opacity: 0.68;
}

.sd-guide-question-note {
  margin: 8px 0 0;
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}

.sd-guide-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.sd-guide-suggestion {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: white;
  color: #14532d;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sd-guide-suggestion:hover,
.sd-guide-suggestion:focus-visible {
  background: var(--sd-guide-pale);
}

.sd-tour-screen {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: transparent;
}

.sd-tour-spotlight {
  position: fixed;
  z-index: 30001;
  border: 4px solid var(--sd-guide-yellow);
  border-radius: 13px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
  pointer-events: none;
  transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease;
}

.sd-tour-card {
  position: fixed;
  z-index: 30002;
  width: min(390px, calc(100vw - 28px));
  padding: 20px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: white;
  color: var(--sd-guide-navy);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

.sd-guide-tour-close {
  position: absolute;
  top: 7px;
  right: 7px;
  color: var(--sd-guide-navy);
}

.sd-guide-tour-close:hover,
.sd-guide-tour-close:focus-visible {
  background: #e5e7eb;
}

.sd-tour-progress {
  margin: 0 38px 7px 0;
  color: var(--sd-guide-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sd-tour-card h2 {
  margin: 0 36px 9px 0;
  font-size: 22px;
}

.sd-tour-card p {
  margin: 0;
  line-height: 1.5;
}

.sd-tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}

.sd-tour-actions button {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sd-tour-back,
.sd-tour-skip {
  background: #e5e7eb;
  color: var(--sd-guide-navy);
}

.sd-tour-next {
  margin-left: auto;
  background: var(--sd-guide-green);
  color: white;
}

body.sd-tour-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .sd-guide-launcher {
    right: 9px;
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 74px));
    width: 66px;
    height: 66px;
  }

  .sd-guide-launcher img {
    width: 60px;
    height: 60px;
  }


  .sd-guide-launcher[data-compact="true"] {
    right: -2px;
    width: 40px;
    height: 70px;
  }

  .sd-guide-nudge {
    right: 56px;
    bottom: 41px;
  }

  .sd-guide-panel {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px - env(safe-area-inset-bottom));
  }

  .sd-tour-card {
    left: 14px !important;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: auto;
  }

  .sd-tour-actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-guide-launcher,
  .sd-guide-launcher img,
  .sd-guide-nudge,
  .sd-tour-spotlight {
    transition: none;
  }

  .sd-guide-launcher[data-intro="arriving"] {
    animation: none;
  }

  .sd-guide-launcher[data-intro="departing"] img {
    transform: none;
  }
}

@media (forced-colors: active) {
  .sd-guide-launcher,
  .sd-guide-panel,
  .sd-tour-card,
  .sd-tour-spotlight {
    border: 2px solid ButtonText;
  }
}
