/* Guide iniziali: figure intere in primo piano, posizione indipendente per slide e dispositivo. */
#onboarding.is-spotlight #tourStage{z-index:116!important}
#onboarding.is-spotlight.tour-character-behind #tourStage{z-index:112!important}
#onboarding .tour-panel{z-index:3!important}
#onboarding #tourKei.tour-positioned{
 position:fixed!important;
 left:var(--tour-character-x,72%)!important;
 top:var(--tour-character-y,48%)!important;
 right:auto!important;bottom:auto!important;
 width:min(68vw,490px)!important;height:58dvh!important;
 max-height:none!important;max-width:none!important;margin:0!important;
 transform:translate(-50%,-50%) scale(var(--tour-character-scale,1)) scaleX(var(--tour-character-flip,1))!important;
 transform-origin:center center!important;
 object-fit:contain!important;object-position:center!important;
 z-index:4!important;
 filter:drop-shadow(0 12px 20px #00291c88);
 pointer-events:none!important;
}
@media(min-width:651px){
 #onboarding #tourKei.tour-positioned{width:min(43vw,600px)!important;height:74dvh!important}
}
#onboarding.layout-editing #tourKei.tour-positioned{
 pointer-events:auto!important;touch-action:none!important;cursor:grab!important;
 filter:drop-shadow(0 10px 24px #002d2199) drop-shadow(0 0 7px #ffd65b);
}
#onboarding.layout-editing #tourKei.tour-positioned:active{cursor:grabbing!important}
#onboarding.layout-editing .tour-stage{overflow:visible!important}
#onboarding.layout-editing .tour-panel{pointer-events:none!important}
#onboarding.layout-editing .tour-layout-toolbar{pointer-events:auto!important}
#onboarding .tour-layout-toolbar[hidden]{display:none!important}
#onboarding .tour-layout-toolbar{
 position:fixed;z-index:150;top:calc(8px + env(safe-area-inset-top,0px));left:50%;
 transform:translateX(-50%);width:min(710px,calc(100vw - 20px));
 padding:11px 14px;border:1px solid #9bcbac;border-radius:15px;
 background:#f8fffbee;box-shadow:0 10px 40px #03241a77;
 color:#15422f;max-height:44dvh;overflow:auto;
 font:13px 'Outfit',system-ui,sans-serif;
}
.tour-layout-heading{display:flex;align-items:center;gap:12px;justify-content:space-between}
.tour-layout-heading strong{font-size:15px}
.tour-layout-heading span{font-size:11px;color:#547c61}
.tour-layout-toolbar p{font-size:11px;margin:4px 0 8px;line-height:1.3;color:#4a6a57}
.tour-layout-sliders{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:10px}
.tour-layout-sliders label{display:flex;gap:5px;align-items:center;min-width:0;font-weight:700}
.tour-layout-sliders input{width:100%;min-width:0;accent-color:#08794c}
.tour-layout-extras{display:flex;gap:15px;align-items:center;margin:7px 0}
.tour-layout-extras label{display:flex;align-items:center;gap:5px}
.tour-layout-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.tour-layout-actions button{border-radius:9px;padding:8px 11px;border:1px solid #aed5bd;background:#fff;color:#18583a;font-weight:700}
#tourLayoutSave{background:#0e774c;color:#fff;border-color:#0e774c}
.tour-layout-open{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:8px 12px;border-radius:8px;border:1px solid #168653;background:#e7f6eb;color:#105638;font-weight:700}
@media(max-width:650px){
 #onboarding .tour-layout-toolbar{padding:9px 11px;top:calc(5px + env(safe-area-inset-top,0px));max-height:38dvh}
 .tour-layout-sliders{grid-template-columns:1fr 1fr}
 .tour-layout-sliders label:last-child{grid-column:1/-1}
 .tour-layout-actions{justify-content:space-between}
 .tour-layout-actions button{font-size:11px;padding:7px 8px}
}
/* Keep the draggable whole-body character visible outside the initial stage. */
#onboarding.tour-has-positioned #tourStage{overflow:visible!important}

/* Duo assets contain both characters: allow a wider viewport without changing solo sprites. */
#onboarding #tourKei.tour-positioned.tour-duo{
 width:min(92vw,760px)!important;
 height:min(64dvh,700px)!important;
 object-fit:contain!important;
 object-position:center!important;
}
@media(min-width:651px){
 #onboarding #tourKei.tour-positioned.tour-duo{
  width:min(60vw,940px)!important;
  height:min(74dvh,790px)!important;
 }
}
