.back-to-top {
  --scroll-progress: 0;
  position: fixed;
  right: clamp(18px, 3vw, 36px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 10045;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #174f40;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .25s ease, visibility .25s ease, transform .3s cubic-bezier(.2,.75,.25,1.25);
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top__surface {
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 116, 91, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 20px rgba(7, 53, 41, .18), inset 0 0 0 1px rgba(255,255,255,.8);
  backdrop-filter: blur(8px);
  overflow: hidden;
  isolation: isolate;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.back-to-top__surface::before,
.back-to-top__surface::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18%;
  width: 136%;
  border-radius: 44% 52% 46% 50%;
  pointer-events: none;
}

.back-to-top__surface::before {
  bottom: -31%;
  height: 49%;
  background: rgba(56, 178, 139, .15);
  animation: backToTopWater 4.2s linear infinite;
}

.back-to-top__surface::after {
  bottom: -35%;
  height: 47%;
  background: rgba(30, 132, 101, .09);
  animation: backToTopWater 5.4s linear infinite reverse;
}

.back-to-top:hover .back-to-top__surface,
.back-to-top:focus-visible .back-to-top__surface {
  animation: none;
  background: #edf9f4;
  box-shadow: 0 10px 25px rgba(7, 53, 41, .24), inset 0 0 0 1px #fff;
  transform: scale(1.06);
}

.back-to-top:active .back-to-top__surface { transform: scale(.96); }

.back-to-top:focus-visible {
  outline: 3px solid rgba(50, 159, 124, .35);
  outline-offset: 4px;
}

.back-to-top__arrow {
  position: relative;
  z-index: 2;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top__meter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(12, 75, 57, .16));
}

.back-to-top__track,
.back-to-top__progress {
  fill: none;
  stroke-width: 3.5;
}

.back-to-top__track {
  stroke: rgba(38, 105, 84, .15);
  animation: backToTopRingTide 2.4s ease-in-out infinite;
}

.back-to-top__progress {
  stroke: url(#backToTopProgressGradient);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 32px 32px;
  will-change: stroke-dashoffset;
}

.back-to-top__boat {
  will-change: transform;
}

.back-to-top__boat-vessel {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: backToTopBoatBob 1.55s ease-in-out infinite;
}

.back-to-top__boat-hull {
  fill: #124f3e;
  stroke: #fff;
  stroke-width: .75;
  stroke-linejoin: round;
}

.back-to-top__boat-sail {
  fill: #fff;
  stroke: #124f3e;
  stroke-width: .85;
  stroke-linejoin: round;
}

.back-to-top__boat-mast { stroke: #124f3e; stroke-width: .95; stroke-linecap: round; }

.back-to-top__boat-wave {
  fill: none;
  stroke: #36a983;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-dasharray: 2.2 1.7;
  animation: backToTopWaveFlow .8s linear infinite;
}

@keyframes backToTopBoatBob {
  0%, 100% { transform: translateY(.25px) rotate(-2deg); }
  50% { transform: translateY(-.25px) rotate(2deg); }
}

@keyframes backToTopWaveFlow {
  to { stroke-dashoffset: -7.8; }
}

@keyframes backToTopWater {
  to { transform: rotate(360deg); }
}

@keyframes backToTopRingTide {
  0%, 100% { stroke-opacity: .75; }
  50% { stroke-opacity: 1; }
}

@media (max-width: 600px) {
  .back-to-top { box-sizing: border-box; width: 50px; height: 50px; right: 14px; bottom: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .back-to-top__surface,
  .back-to-top__progress,
  .back-to-top__boat { transition-duration: .01ms; }
  .back-to-top__boat-vessel,
  .back-to-top__boat-wave,
  .back-to-top__surface,
  .back-to-top__surface::before,
  .back-to-top__surface::after,
  .back-to-top__track { animation: none !important; }
}

/* iTour AI tourism assistant */
.itour-ai-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.itour-ai-launcher {
  position: fixed;
  z-index: 10046;
  right: clamp(18px, 3vw, 36px);
  bottom: clamp(18px, 3vw, 34px);
  min-width: 142px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px 0 9px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: #176f58;
  color: #fff;
  box-shadow: 0 10px 28px rgba(7, 53, 41, .25);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  transition: right .24s ease, width .22s ease, min-width .22s ease, padding .22s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.itour-ai-launcher__label { flex: 0 0 auto; font-family: inherit !important; font-size: inherit !important; font-style: normal !important; font-weight: 800 !important; line-height: inherit !important; letter-spacing: 0 !important; white-space: nowrap !important; }
body.back-to-top-visible .itour-ai-launcher { right: calc(clamp(18px, 3vw, 36px) + 58px); }
.itour-ai-launcher:hover { background: #0f5c48; box-shadow: 0 13px 32px rgba(7, 53, 41, .31); transform: translateY(-2px); }
.itour-ai-launcher:focus-visible { outline: 3px solid rgba(63, 175, 139, .34); outline-offset: 3px; }
.itour-ai-launcher__assistant {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.itour-ai-launcher svg,
.itour-ai-panel svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.itour-ai-launcher__assistant svg { width: 20px; height: 20px; }
.itour-ai-launcher__close { display: none; }
.itour-ai-launcher__close svg { width: 21px; height: 21px; }
.itour-ai-launcher.is-open { min-width: 50px; width: 50px; padding: 0; background: #123f33; transform: none; }
.itour-ai-launcher.is-open .itour-ai-launcher__assistant,
.itour-ai-launcher.is-open .itour-ai-launcher__label { display: none; }
.itour-ai-launcher.is-open .itour-ai-launcher__close { display: grid; place-items: center; }

@media (min-width: 601px) {
  .itour-ai-launcher {
    box-sizing: border-box !important;
    width: 142px !important;
    min-width: 142px !important;
    height: 50px !important;
    padding: 0 15px 0 9px !important;
    font-size: 12px !important;
  }
  .itour-ai-launcher.is-open {
    width: 50px !important;
    min-width: 50px !important;
    padding: 0 !important;
  }
}

.itour-ai-panel[hidden] { display: none !important; }
.itour-ai-panel {
  position: fixed;
  z-index: 10047;
  right: clamp(18px, 3vw, 36px);
  bottom: 88px;
  width: min(410px, calc(100vw - 28px));
  max-height: min(610px, calc(100dvh - 108px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(179, 211, 201, .72);
  border-radius: 18px;
  background: #fff;
  color: #183e33;
  box-shadow: 0 26px 70px rgba(5, 42, 32, .30);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  transform-origin: right bottom;
  animation: itourAiPanelIn .22s cubic-bezier(.2, .75, .25, 1) both;
}
@keyframes itourAiPanelIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.itour-ai-panel__header {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  background: #103f33;
  color: #fff;
}
.itour-ai-panel__avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #1e8063; }
.itour-ai-panel__avatar svg { width: 23px; height: 23px; }
.itour-ai-panel__header h2 { margin: 0; color: #fff; font-size: 14px; font-weight: 800; line-height: 1.3; }
.itour-ai-panel__header p { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; color: #cae2da; font-size: 9px; }
.itour-ai-panel__header p i { width: 7px; height: 7px; border-radius: 50%; background: #65d492; box-shadow: 0 0 0 3px rgba(101, 212, 146, .12); }
.itour-ai-panel__powered { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid rgba(255, 255, 255, .17); border-radius: 999px; color: #d7e8e2; font-size: 7.5px; font-weight: 750; white-space: nowrap; }
.itour-ai-panel .itour-ai-gemini-logo { width: 12px; height: 12px; flex: 0 0 12px; fill: url(#itourAiGeminiGradient); stroke: none; }

.itour-ai-panel__messages {
  flex: 1 1 auto;
  min-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 15px;
  background: #f5f9f7;
  scrollbar-width: thin;
  scrollbar-color: #2a8067 transparent;
}
.itour-ai-panel__messages::-webkit-scrollbar { width: 5px; }
.itour-ai-panel__messages::-webkit-scrollbar-track { background: transparent; }
.itour-ai-panel__messages::-webkit-scrollbar-thumb { border-radius: 999px; background: #2a8067; }

.itour-ai-welcome { padding: 14px; border: 1px solid #dce9e4; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(20, 66, 52, .05); }
.itour-ai-welcome strong { display: block; color: #174f3f; font-size: 12px; }
.itour-ai-welcome p { margin: 7px 0 0; color: #4f6960; font-size: 11px; line-height: 1.6; }
.itour-ai-suggestions { display: grid; gap: 7px; margin-top: 13px; }
.itour-ai-suggestions > span { width: max-content; padding: 3px 6px; border-radius: 999px; background: #dfede8; color: #28644f; font-size: 7px; font-weight: 800; }
.itour-ai-suggestions button { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #d8e6e1; border-radius: 9px; background: #fff; color: #29483e; font-family: inherit; font-size: 10.5px; font-weight: 650; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.itour-ai-suggestions button:hover { border-color: #74aa97; background: #edf6f2; transform: translateX(2px); }

.itour-ai-message { display: flex; margin-top: 10px; }
.itour-ai-message--user { justify-content: flex-end; }
.itour-ai-message__bubble { max-width: 84%; padding: 10px 12px; border-radius: 12px 12px 12px 4px; background: #fff; color: #34554a; box-shadow: 0 3px 11px rgba(20, 66, 52, .07); font-size: 10.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.itour-ai-message--assistant:not(.is-pending) .itour-ai-message__bubble,
.itour-ai-message--error .itour-ai-message__bubble { width: 84%; }
.itour-ai-message__bubble.is-formatted { white-space: normal; }
.itour-ai-message__bubble.is-formatted p { margin: 0; }
.itour-ai-message__bubble.is-formatted p + p { margin-top: 7px; }
.itour-ai-message__bubble.is-formatted ul { margin: 7px 0 0; padding-left: 17px; }
.itour-ai-message__bubble.is-formatted li + li { margin-top: 4px; }
.itour-ai-message__bubble.is-formatted strong { color: #174f3f; font-weight: 800; }
.itour-ai-message__link { color: #12684f; font-weight: 800; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; cursor: pointer; }
.itour-ai-message__link:hover { color: #0a4d3a; }
.itour-ai-message__link:focus-visible { border-radius: 3px; outline: 2px solid #2b8063; outline-offset: 2px; }
.itour-ai-message--user .itour-ai-message__bubble { border-radius: 12px 12px 4px 12px; background: #176f58; color: #fff; }
.itour-ai-message--error .itour-ai-message__bubble { border: 1px solid #eccfd2; background: #fff4f5; color: #923c46; }
.itour-ai-message.is-pending .itour-ai-message__bubble { display: flex; gap: 4px; padding: 13px 14px; }
.itour-ai-message.is-pending span { width: 6px; height: 6px; border-radius: 50%; background: #4d967f; animation: itourAiTyping .9s ease-in-out infinite; }
.itour-ai-message.is-pending span:nth-child(2) { animation-delay: .12s; }
.itour-ai-message.is-pending span:nth-child(3) { animation-delay: .24s; }
@keyframes itourAiTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

.itour-ai-panel__form { flex: 0 0 auto; padding: 11px 13px 10px; border-top: 1px solid #dfeae6; background: #fff; }
.itour-ai-panel__input-wrap { min-height: 43px; display: flex; align-items: center; gap: 7px; padding: 5px 5px 5px 12px; border: 1px solid #cdded8; border-radius: 11px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.itour-ai-panel__input-wrap:focus-within { border-color: #2b8063; box-shadow: 0 0 0 3px rgba(43, 128, 99, .11); }
.itour-ai-panel__input-wrap textarea { box-sizing: border-box; flex: 1; min-width: 0; height: 34px; max-height: 104px; resize: none; overflow-y: auto; padding: 7px 0; border: 0; outline: 0; appearance: none; background: transparent; color: #29483e; font-family: inherit; font-size: 10.5px; font-weight: 500; line-height: 20px; scrollbar-width: none; }
.itour-ai-panel__input-wrap textarea::-webkit-scrollbar { display: none; width: 0; height: 0; }
.itour-ai-panel__input-wrap textarea::placeholder { color: #8a9b95; }
.itour-ai-panel__input-wrap button { width: 34px; height: 34px; flex: 0 0 34px; align-self: flex-end; display: grid; place-items: center; border: 0; border-radius: 9px; background: #176f58; color: #fff; cursor: pointer; }
.itour-ai-panel__input-wrap button:hover { background: #0f5c48; }
.itour-ai-panel__input-wrap button:disabled { opacity: .55; cursor: wait; }
.itour-ai-panel__input-wrap button svg { width: 17px; height: 17px; }
.itour-ai-panel__form > small { display: block; margin-top: 6px; color: #80918b; font-size: 7.5px; line-height: 1.4; text-align: center; }

@media (max-width: 600px) {
  .itour-ai-launcher { box-sizing: border-box; right: 14px; bottom: 16px; min-width: 50px; width: 50px; height: 50px; padding: 0; font-size: 11px; }
  body.back-to-top-visible .itour-ai-launcher { right: 14px; }
  .itour-ai-launcher__assistant { width: 32px; height: 32px; flex-basis: 32px; }
  .itour-ai-launcher__label { display: none; }
  .itour-ai-launcher.is-open { width: 50px; min-width: 50px; }
  .itour-ai-panel { right: 12px; bottom: 76px; width: calc(100vw - 24px); max-height: calc(100dvh - 94px); border-radius: 16px; }
  .itour-ai-panel__header { min-height: 66px; padding: 11px 12px; }
  .itour-ai-panel__messages { min-height: 225px; padding: 12px; }
  body.itour-ai-chat-open .back-to-top,
  body.itour-ai-chat-open .mobile-floating-book,
  body.itour-ai-chat-open .about-mobile-floating-book,
  body.itour-ai-chat-open .des_mobile-floating-book,
  body.itour-ai-chat-open .mobile-floating-reserve {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.itour-ai-chat-open .itour-ai-launcher { right: 14px; bottom: 16px; }
  body.itour-ai-chat-open .itour-ai-panel {
    bottom: 76px;
    max-height: calc(100dvh - 94px);
  }
  body.mobile-nav-open .back-to-top,
  body.mobile-nav-open .itour-ai-launcher,
  body.mobile-nav-open .mobile-floating-book,
  body.mobile-nav-open .about-mobile-floating-book,
  body.mobile-nav-open .des_mobile-floating-book,
  body.mobile-nav-open .mobile-floating-reserve {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 360px) {
  .itour-ai-launcher { min-width: 50px; width: 50px; padding: 0; }
  .itour-ai-launcher__label { display: none; }
  .itour-ai-panel__powered { padding: 5px; }
  .itour-ai-panel__powered span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .itour-ai-panel { animation: none; }
  .itour-ai-message.is-pending span { animation-duration: 1.8s; }
}
