.site-guide{position:fixed;z-index:40;inset-inline-end:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));display:grid;justify-items:end;gap:8px;color:#293c36;font:15px/1.45 Arial,sans-serif}
.site-guide [hidden]{display:none}
.site-guide button,.site-guide input{font:inherit}
.site-guide button{cursor:pointer}
.site-guide :focus-visible{outline:2px solid #9b452d;outline-offset:3px}
.guide-launch{display:grid;place-items:center;padding:0;border:0;border-radius:12px;background:transparent;color:inherit}
.guide-launch figure{width:76px;height:87px;overflow:hidden;margin:0;position:relative}
.guide-launch img{position:absolute;width:234px;max-width:none;height:auto;left:-85px;top:-21px;clip-path:polygon(37.988% 20.699%, 38.232% 19.713%, 39.209% 19.086%, 42.725% 18.548%, 49.707% 18.011%, 55.957% 18.011%, 61.182% 18.548%, 62.891% 19.176%, 63.574% 19.803%, 63.818% 20.878%, 62.988% 38.172%, 62.744% 40.771%, 62.744% 42.742%, 63.574% 43.817%, 63.965% 42.742%, 64.551% 40.233%, 64.355% 38.530%, 64.258% 36.470%, 64.453% 34.588%, 64.990% 32.527%, 65.771% 31.093%, 66.699% 30.466%, 67.432% 30.914%, 67.969% 31.900%, 68.262% 33.244%, 68.311% 34.767%, 68.066% 36.559%, 67.578% 38.082%, 66.846% 39.337%, 65.918% 40.591%, 65.674% 42.563%, 66.357% 43.190%, 66.797% 44.803%, 66.748% 47.133%, 66.211% 49.014%, 65.527% 49.910%, 64.990% 50.090%, 64.697% 52.599%, 64.355% 54.301%, 63.916% 54.659%, 63.477% 54.032%, 63.330% 52.867%, 63.574% 50.269%, 62.500% 48.925%, 61.816% 56.900%, 61.182% 64.337%, 60.889% 66.398%, 60.352% 67.473%, 59.375% 68.190%, 57.275% 68.817%, 57.568% 72.849%, 57.666% 77.061%, 58.496% 78.136%, 58.643% 79.749%, 59.180% 81.541%, 59.521% 83.602%, 59.082% 84.946%, 58.105% 85.573%, 56.201% 85.573%, 55.420% 84.588%, 55.029% 82.975%, 54.834% 80.645%, 54.883% 78.853%, 55.518% 77.240%, 55.371% 73.029%, 55.078% 69.265%, 47.510% 69.444%, 47.412% 73.297%, 47.266% 77.151%, 47.998% 77.957%, 48.096% 79.928%, 48.486% 82.258%, 48.389% 84.140%, 47.754% 85.125%, 46.582% 85.573%, 45.166% 85.394%, 44.580% 84.588%, 44.482% 83.244%, 44.775% 81.093%, 44.873% 78.495%, 45.264% 77.419%, 45.557% 73.118%, 45.654% 69.086%, 43.311% 68.548%, 41.895% 67.832%, 41.162% 66.846%, 40.869% 64.964%, 40.332% 58.781%, 39.990% 53.405%, 38.721% 52.509%, 37.695% 51.165%, 37.207% 49.731%, 37.012% 47.939%, 37.158% 46.147%, 37.598% 44.444%, 38.330% 43.190%, 39.258% 41.935%, 38.867% 35.932%, 38.477% 29.391%)}
.guide-panel{width:min(360px,calc(100vw - 24px));max-height:min(490px,calc(100dvh - 112px));overflow:auto;overscroll-behavior:contain;background:#faf8f2;border:1px solid #d5dbd1;border-radius:18px;box-shadow:0 7px 24px #293c3633;padding:16px}
.guide-heading{display:flex;align-items:center;gap:10px;justify-content:space-between}
.guide-heading h2{font:24px/1.12 Georgia,serif;margin:0}
.guide-close{min-width:44px;min-height:44px;border:0;border-radius:8px;background:#edece4;color:inherit;font-size:24px!important}
.guide-panel p{margin:7px 0 12px}
.guide-form label{display:block;font-weight:700;margin-bottom:5px}
.guide-form input{width:100%;min-height:44px;padding:8px 10px;border:1px solid #78877f;border-radius:8px;background:white;color:#293c36;font-size:16px}
.guide-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
.guide-actions button{min-height:44px;border:1px solid #35584a;border-radius:8px;padding:7px 10px;background:#35584a;color:white;font-weight:700}
.guide-actions button+button{background:transparent;color:#293c36}
.guide-results{list-style:none;margin:0;padding:0}
.guide-results a{display:block;padding:8px 0;border-top:1px solid #d5dbd1;text-decoration:underline;text-underline-offset:3px}
.guide-status:empty{display:none}

.site-guide{grid-template-columns:minmax(0,1fr) auto;align-items:end}
.guide-panel{grid-column:1/-1}
.guide-launch{grid-column:2;grid-row:2;transform:scale(.86);transform-origin:bottom right;transition:transform .2s ease-out}
.guide-welcome{
  position:relative;grid-column:1;grid-row:2;align-self:center;
  max-width:min(230px,calc(100vw - 120px));margin:0;padding:10px 13px;
  border:4px solid transparent;border-radius:14px;
  background:linear-gradient(#fff7e9,#fff7e9) padding-box,
    linear-gradient(120deg,#f5bc36,#e96b3d,#d65c89,#8e5cb8,#28a6ce,#61aa65,#f5bc36) border-box;
  color:#332015;font-size:16px;font-weight:700;line-height:1.3;
  box-shadow:0 3px 14px #293c3622;
}
.guide-welcome::after{
  content:"";position:absolute;top:50%;right:-8px;width:9px;height:9px;
  background:#fff7e9;border-top:4px solid #61aa65;border-right:4px solid #61aa65;
  transform:translateY(-50%) rotate(45deg);
}
.guide-welcome strong{display:block;font-size:18px;font-weight:800}
.guide-greeting .guide-launch{transform:scale(1)}
.guide-greeting .guide-launch figure{animation:guide-wave .8s ease-in-out;transform-origin:bottom center}
@keyframes guide-wave{0%,100%{transform:rotate(0)}25%{transform:rotate(-7deg)}65%{transform:rotate(6deg)}}
@media(prefers-reduced-motion:reduce){.guide-greeting .guide-launch figure{animation:none}.guide-launch{transition:none}}

/* A gentle idle bounce, followed by a small greeting, keeps the guide alive. */
.guide-launch figure{transform-origin:50% 92%}
.guide-launch[aria-expanded="false"] figure{animation:guide-alive 9s ease-in-out infinite}
.guide-greeting .guide-launch[aria-expanded="false"] figure{animation:guide-hello 1.5s ease-in-out,guide-alive 9s ease-in-out 1.5s infinite}
@media(hover:hover){.guide-launch[aria-expanded="false"]:hover figure{animation:guide-hello 1.25s ease-in-out infinite}}
.guide-launch[aria-expanded="false"]:focus-visible figure{animation:guide-hello 1.25s ease-in-out}
.guide-launch[aria-expanded="true"] figure{animation:none}
@keyframes guide-alive{
  0%,22%,48%,66%,100%{transform:translateY(0) rotate(0)}
  11%,37%{transform:translateY(-4px) rotate(-1.5deg)}
  72%{transform:translateY(-5px) rotate(-6deg)}
  78%{transform:translateY(-5px) rotate(5deg)}
  84%{transform:translateY(-4px) rotate(-4deg)}
  90%{transform:translateY(-2px) rotate(3deg)}
}
@keyframes guide-hello{
  0%,100%{transform:translateY(0) rotate(0)}
  18%{transform:translateY(-7px) rotate(-7deg)}
  38%{transform:translateY(-5px) rotate(6deg)}
  58%{transform:translateY(-6px) rotate(-5deg)}
  78%{transform:translateY(-3px) rotate(3deg)}
}
@media(prefers-reduced-motion:reduce){
  .site-guide .guide-launch figure{animation:none!important;transform:none!important}
}
