/* Renderer styles: shared by the overlay and every in-site preview */
.sn-root { --sn-w: 384px; position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; }
.sn-stage { position: relative; }
.sn-screen { position: relative; overflow: hidden; line-height: 0; }
.sn-canvas { display: block; max-width: 100%; height: auto; }
.sn-root, .sn-stage, .sn-screen { max-width: 100%; }

/* frame: nursery window */
.frame-window .sn-screen { border-radius: 26px; border: 8px solid #fff; box-shadow: 0 0 0 4px #ffb7d2, 0 10px 28px rgba(160, 80, 130, .25); }

/* frame: classic egg-shaped handheld */
.frame-handheld { padding: 34px 34px 64px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: radial-gradient(circle at 30% 25%, #ffe3ef, #ffb7d2 60%, #f59bc0); box-shadow: inset -6px -10px 0 rgba(200, 80, 140, .25), 0 12px 30px rgba(160, 80, 130, .3); }
.frame-handheld .sn-screen { border-radius: 14px; border: 6px solid #fff6fa; box-shadow: inset 0 0 0 3px #e98fb6; }
.sn-buttons { display: none; }
.frame-handheld .sn-buttons { display: flex; gap: 22px; position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); }
.frame-handheld .sn-buttons i { width: 22px; height: 22px; border-radius: 50%; background: #fff6fa; box-shadow: inset -2px -3px 0 #e8a8c4, 0 2px 0 #d27ea4; }

.frame-none .sn-screen { border-radius: 0; }

.sn-name { position: absolute; left: 10px; top: 8px; line-height: 1; font-size: 13px; font-weight: 600; color: #8a4f73; background: rgba(255, 255, 255, .82); padding: 4px 9px; border-radius: 999px; }
.frame-none .sn-name { display: none; }

/* HUD */
.sn-hud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sn-stat { display: flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 4px 9px 4px 6px; box-shadow: 0 2px 6px rgba(160, 80, 130, .18); font-size: 15px; }
.sn-bar { width: 44px; height: 8px; border-radius: 99px; background: #f3e4ec; overflow: hidden; }
.sn-bar > div { height: 100%; border-radius: 99px; transition: width .6s ease; background: #ff8fb8; }
.sn-fresh b { font-size: 12px; color: #d4588e; }
.sn-needs { animation: sn-wiggle .8s ease-in-out infinite; }
.sn-meters { display: flex; gap: 6px; flex-direction: column; align-items: center; }
.sn-meter { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8a4f73; background: rgba(255, 255, 255, .92); padding: 3px 9px; border-radius: 999px; }
.sn-meter .sn-bar { width: 80px; }
.sn-meter .sn-bar > div { background: linear-gradient(90deg, #ffb7d2, #b9a3f0); }

/* toasts */
.sn-feed { position: absolute; top: -6px; left: 100%; margin-left: 12px; display: flex; flex-direction: column; gap: 6px; width: 230px; pointer-events: none; }
.sn-toast { background: #fff; color: #6d3b5c; border-radius: 14px; padding: 7px 12px; font-size: 15px; font-weight: 500; box-shadow: 0 4px 12px rgba(160, 80, 130, .22); border: 2px solid #ffd3e4; animation: sn-in .35s cubic-bezier(.2, 1.4, .4, 1); }
.sn-toast.sn-out { opacity: 0; transform: translateY(-6px); transition: all .5s; }
.sn-feed-below .sn-feed { position: static; margin: 0; width: auto; align-items: center; }

/* speech bubble */
.sn-bubble { position: absolute; left: 50%; top: 10%; transform: translate(-50%, 8px) scale(.9); opacity: 0; max-width: 78%; background: #fff; color: #6d3b5c; line-height: 1.3; font-size: 16px; font-weight: 500; padding: 8px 14px; border-radius: 16px; box-shadow: 0 4px 14px rgba(120, 60, 100, .25); transition: all .25s; text-align: center; pointer-events: none; }
.sn-bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.sn-bubble.sn-show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.sn-bubble.sn-story { font-size: 15px; max-width: 88%; }

/* particles */
.sn-fx { position: absolute; inset: 0; pointer-events: none; }
.sn-particle { position: absolute; bottom: 30%; font-size: 22px; line-height: 1; opacity: 0; animation: sn-float 2s ease-out forwards; }

/* away */
.sn-away { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; line-height: 1.25; }
.sn-is-away .sn-away { display: flex; }
.sn-note { background: #fffdf4; color: #6d3b5c; border-radius: 6px; padding: 12px 16px; font-size: 15px; text-align: center; transform: rotate(-3deg); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 2px; border-top: 10px solid #ffb7d2; }
.sn-note b { font-size: 18px; }

@keyframes sn-float { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift), -140px) scale(1.15); } }
@keyframes sn-in { from { opacity: 0; transform: translateX(-12px) scale(.9); } }
@keyframes sn-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .sn-particle, .sn-toast, .sn-needs { animation: none; } }
