/* 1.0.078: side areas outside the real content boundary. */
.sga{--saams-scene-ready:1}
.sga.saams-scene-enabled{position:relative}
.sga .saams-scene[hidden],.sga .saams-scene [hidden]{display:none!important}
.sga .saams-scene{position:absolute;z-index:1;overflow:hidden;isolation:isolate;pointer-events:none;margin:0;padding:0;border:0;min-height:0;box-sizing:border-box}
.sga .saams-scene-left,.sga .saams-scene-right{position:absolute;top:0;max-height:100%;overflow:hidden;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px;box-sizing:border-box;pointer-events:none}
.sga .saams-scene-left{left:0;width:var(--scene-left,0px)}.sga .saams-scene-right{right:0;width:var(--scene-right,0px)}
.sga .saams-scene .world-mascot-figure{position:relative;width:100%;height:clamp(100px,23vw,292px);max-height:100%;flex:none;overflow:hidden;display:grid;place-items:center;margin:0}
.sga .saams-scene img{display:block;max-width:100%;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 4px 4px #0004);transform-origin:center 90%;pointer-events:none}
.sga .saams-scene-message{width:100%;display:grid;gap:6px;text-align:center;padding:6px 2px;color:#e3eaff;font-size:12px;overflow-wrap:anywhere}
.sga .saams-scene-message strong{color:#f1eaff;font-size:15px;line-height:1.2}.sga .saams-scene-message p{line-height:1.3}.sga .saams-scene-message button{pointer-events:auto;font-size:12px;padding:4px;min-height:44px;width:100%;background:#1c2d45;border-radius:9px}
.sga .saams-scene .sw-victory-inline{position:absolute;inset:0;pointer-events:none;overflow:hidden;background:none}
.sga .saams-scene .sw-confetti{width:4px;height:7px;animation-name:saams-small-confetti}
@keyframes saams-small-confetti{from{transform:translateY(0);opacity:.9}to{transform:translate(var(--dx),160px);opacity:0}}
.sga .saams-scene[data-mascot-motion=cheer] img.mascot-reacting{animation:saams-cheer .85s ease-in-out 1}.sga .saams-scene[data-mascot-motion=greet] img.mascot-reacting,.sga .saams-scene[data-mascot-motion=encourage] img.mascot-reacting{animation:saams-nod 1.1s ease-in-out 1}
@keyframes saams-cheer{0%,100%{transform:none}30%,65%{transform:translateY(-5px) rotate(2deg)}}@keyframes saams-nod{0%,100%{transform:none}40%{transform:rotate(-2deg)}}
@media(min-width:1440px){.sga.saams-scene-enabled:not(.world-fullscreen-active) .world-home{max-width:min(1440px,calc(100% - 300px))}}
.sga.world-fullscreen-active .saams-scene,.sga.sga-guest-awaiting .saams-scene{display:none!important}
@media(prefers-reduced-motion:reduce){.sga .saams-scene img{animation:none!important}.sga .saams-scene .sw-victory-inline{display:none!important}}
.sga .online-child-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;line-height:1.35;font-size:16px;color:#f1f5ff;margin-block:0 12px}.sga .online-child-note span[aria-hidden=true]{font-size:22px;flex:none}.sga .online-child-note strong{font-size:16px;font-weight:750}

.sga .saams-hero-name{font-size:11px;letter-spacing:2px;font-weight:850;color:#bdb5ff}

/* 1.0.080: quieter secondary characters, always confined to the available right rail. */
.sga .saams-scene-right{padding:12px 6px;gap:16px;align-items:stretch;pointer-events:none}
.sga .saams-family-figure{position:relative;flex:none;margin:0;width:100%;height:var(--family-height,100px);max-width:100%;overflow:hidden;display:grid;place-items:center}
.sga .saams-family-figure img{width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 3px #0003);opacity:.94}
.sga .saams-family-figure[data-family=avina] img{object-position:35% bottom}
.sga .saams-family-figure[data-family=mila] img{object-position:70% bottom}
.sga .saams-family-figure{display:block;min-height:0}
.sga .saams-family-figure img{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain}

/* 1.0.081: brief side activities, no motion outside the measured rail. */
.sga .saams-motion-setting{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:12px;cursor:pointer;color:inherit}
.sga .saams-motion-setting input{width:20px;height:20px;accent-color:#8c73f0;flex:none}
.sga .saams-family-figure img{inset:3px 6px;width:calc(100% - 12px);height:calc(100% - 6px);transition:object-position .65s ease-in-out}
.sga .saams-butterfly{display:none;position:absolute;right:3%;top:8%;width:clamp(16px,19%,28px);height:auto;pointer-events:none;overflow:visible}
.sga .saams-butterfly-wings{transform-origin:50% 50%;animation:saams-butterfly-wings .27s ease-in-out 8}
@keyframes saams-family-look{0%,100%{transform:none}45%{transform:rotate(-2deg)}}
@keyframes saams-butterfly-float{0%{opacity:0;transform:translate(-5px,8px)}20%,65%{opacity:1}45%{transform:translate(0,-3px)}100%{opacity:0;transform:translate(-9px,-9px)}}
@keyframes saams-butterfly-wings{50%{transform:scaleX(.36)}}
.sga[data-saams-motion=off] .saams-scene *{animation:none!important;transition:none!important}
.sga[data-saams-motion=off] .saams-scene .sw-victory-inline{display:none!important}
@media(prefers-reduced-motion:reduce){.sga .saams-scene *{animation:none!important;transition:none!important}.sga .saams-scene .saams-butterfly{display:none!important}}

/* 1.0.082: an explicit image rectangle prevents intrinsic grid clipping. */
.sga .saams-scene-left{gap:10px;padding:8px}
.sga .saams-scene .world-mascot-figure{display:block;min-height:0;width:100%;height:220px;max-height:none;flex:0 0 auto;overflow:hidden}
.sga .saams-scene .world-mascot-figure>img{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom}
.sga .saams-scene-message{position:relative;box-sizing:border-box;flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 6px;padding:10px 8px;border:1px solid #46577e;border-radius:13px;background:#1a2940;text-align:left}
.sga .saams-scene-message:before{content:"";position:absolute;top:-6px;left:50%;width:10px;height:10px;background:#1a2940;border-left:1px solid #46577e;border-top:1px solid #46577e;transform:rotate(45deg)}
.sga .saams-hero-name{grid-column:1/-1;line-height:1.1;font-size:10px}
.sga .saams-scene-message strong{font-size:14px;grid-column:1/-1}
.sga .saams-scene-message p{font-size:12px;grid-column:1;line-height:1.35;margin:0}
.sga .saams-scene-message button{grid-column:2;grid-row:3;min-width:44px;width:44px;min-height:44px;height:44px;padding:0;display:grid;place-items:center;font-size:17px;flex:none}
.sga .saams-scene-message button:focus-visible{outline:2px solid #d7c7ff;outline-offset:2px}
.sga .saams-family-figure[data-pose=reading] img{object-position:center center}
.sga .saams-family-figure[data-pose=sitting] img{object-position:center bottom}
.sga[data-saams-motion=on] .saams-family-figure[data-pose=running] img{animation:saams-run-pose 1.7s ease-in-out 1}
@keyframes saams-run-pose{0%,100%{transform:none}30%{transform:translate(-3px,-4px) rotate(-1deg)}62%{transform:translate(3px,-2px) rotate(1deg)}}
.sga .saams-scene[data-mascot-motion=think] img.mascot-reacting,.sga .saams-scene[data-mascot-motion=wait] img.mascot-reacting{animation:saams-nod 1.1s ease-in-out 1}
@media(prefers-reduced-motion:reduce){.sga .saams-scene *{animation:none!important;transition:none!important}}

/* Keep transient hero transforms entirely inside the image rectangle. */
.sga .saams-scene .world-mascot-figure>img{transform-origin:center center}
@keyframes saams-cheer{0%,100%{transform:none}30%,65%{transform:scale(.94) translateY(-3px) rotate(1deg)}}
@keyframes saams-nod{0%,100%{transform:none}40%{transform:scale(.95) rotate(-1deg)}}

/* 1.0.084: independent bounded positions and brief decorative activities. */
.sga .saams-scene-right{display:block;padding:0;overflow:hidden}
.sga .saams-scene-right .saams-family-figure{position:absolute;left:0;width:100%;height:var(--family-height,100px);margin:0;overflow:hidden;transition:none}
.sga[data-saams-motion=on] .saams-scene-right .saams-family-figure[data-moving=true]{transition:top .55s ease-in-out}
.sga .saams-scene-right .saams-family-figure[data-family] img{inset:3px 6px;width:calc(100% - 12px);height:calc(100% - 6px);object-position:var(--family-x,50%) bottom;transition:object-position .55s ease-in-out}
.sga .saams-scene-right .saams-family-figure[data-pose=reading] img{object-position:var(--family-x,50%) center}
.sga[data-saams-motion=on] .saams-family-figure img.saams-pose-arrive{animation:saams-pose-arrive .48s ease-out 1}
.sga[data-saams-motion=on] .saams-family-figure[data-pose=running] img.saams-pose-arrive{animation:saams-pose-arrive .48s ease-out 1,saams-run-pose 1.7s ease-in-out 1}
@keyframes saams-pose-arrive{from{opacity:.25}to{opacity:.94}}
.sga[data-saams-motion=on] .saams-family-figure[data-activity=butterfly] .saams-butterfly{display:block;animation:saams-butterfly-float 2.2s ease-in-out 1 both}
.sga .saams-bubbles{display:none;position:absolute;inset:0;pointer-events:none;overflow:hidden}
.sga .saams-bubbles i{position:absolute;display:block;width:14px;height:14px;border:1px solid #bfe6f0;border-radius:50%;background:radial-gradient(circle at 28% 25%,#fff9 0 12%,#a7e1f337 25%,#b9a1ff38 63%,#8fe3ee7a 98%);opacity:0;right:12%;top:38%}
.sga .saams-bubbles i:nth-child(2){right:26%;top:45%;width:10px;height:10px;animation-delay:.3s!important}
.sga .saams-bubbles i:nth-child(3){right:5%;top:50%;width:18px;height:18px;animation-delay:.6s!important}
.sga[data-saams-motion=on] .saams-family-figure[data-activity=bubbles] .saams-bubbles{display:block}
.sga[data-saams-motion=on] .saams-family-figure[data-activity=bubbles] .saams-bubbles i{animation:saams-bubble-float 2.5s ease-out 1 both}
@keyframes saams-bubble-float{0%{opacity:0;transform:translateY(6px) scale(.65)}25%{opacity:.8}75%{opacity:.65}100%{opacity:0;transform:translate(-9px,-25px) scale(1.15)}}
.sga[data-saams-motion=off] .saams-scene-right .saams-bubbles,.sga[data-saams-motion=off] .saams-scene-right .saams-butterfly{display:none!important}
@media(prefers-reduced-motion:reduce){.sga .saams-scene-right .saams-bubbles,.sga .saams-scene-right .saams-butterfly{display:none!important}}

/* 1.0.085: brief, event-driven feedback inside Saam's existing rail. */
.sga .saams-scene .saams-cue-icon{position:absolute;right:4px;top:4px;z-index:1;display:grid;place-items:center;width:34px;height:34px;border:1px solid #a4e9bb;border-radius:50%;background:#173b35;color:#d0ffe0;font-size:21px;font-weight:800;pointer-events:none}
.sga .saams-scene[data-cue-tone=positive] .saams-scene-message{border-color:#75cda3;background:#172f32}
.sga .saams-scene[data-cue-tone=encourage] .saams-scene-message{border-color:#e2bf77}
.sga .saams-scene[data-cue-tone=encourage] .saams-cue-icon,.sga .saams-scene[data-cue-tone=neutral] .saams-cue-icon{border-color:#e2bf77;background:#382f24;color:#ffdf9a}
.sga[data-saams-motion=on] .saams-scene[data-cue-tone=positive] .world-mascot-figure>img.mascot-cue{animation:saams-event-cheer .85s ease-in-out 1}
.sga[data-saams-motion=on] .saams-scene[data-cue-tone=encourage] .world-mascot-figure>img.mascot-cue,.sga[data-saams-motion=on] .saams-scene[data-cue-tone=neutral] .world-mascot-figure>img.mascot-cue{animation:saams-nod .9s ease-in-out 1}
.sga[data-saams-motion=on] .saams-scene[data-mascot-cue] .saams-cue-icon{animation:saams-cue-icon-in .42s ease-out 1}
@keyframes saams-event-cheer{0%,100%{transform:none}28%{transform:scale(.94) rotate(-1deg) translateY(-2px)}60%{transform:scale(.94) rotate(1deg) translateY(-2px)}}
@keyframes saams-cue-icon-in{from{opacity:0;transform:scale(.65)}to{opacity:1;transform:scale(1)}}
