*{box-sizing:border-box;margin:0;padding:0}
html,body{overflow-x:hidden}
body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;color:#23262b;min-height:100vh;
 background:radial-gradient(circle at 10% 0,#fff 0,transparent 45%),linear-gradient(#e8f4f8,#f7f6f4 45%,#fff);
 touch-action:manipulation;-webkit-user-select:none;user-select:none}
.top{text-align:center;padding:10px 12px 4px}
.links{display:flex;justify-content:space-between;gap:8px;max-width:1100px;margin:0 auto 4px}
.links a{font-weight:600;color:#C8102E;text-decoration:none;background:#fff;padding:8px 16px;border-radius:999px;box-shadow:0 3px 0 #C8102E55;font-size:16px}
.links a:hover,.links a:focus-visible{background:#fbe9ec}
.gtitle{font-weight:700;line-height:.95;font-size:clamp(30px,4.6vw,56px);-webkit-text-stroke:.06em #fff;paint-order:stroke fill;
 text-shadow:0 .03em 0 #fff,0 .07em 0 rgba(40,20,90,.35),0 .1em .2em rgba(0,0,0,.2)}
.gtitle .line{display:inline}.gtitle .w{display:inline-block;white-space:nowrap}
.sub{font-weight:600;color:#C8102E;font-size:clamp(17px,2vw,22px)}
main{max-width:1100px;margin:0 auto;padding:6px 10px 20px}
.hud{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 14px;margin:6px 0 10px;font-size:18px}
.hud span{background:#fff;border-radius:14px;padding:6px 12px;box-shadow:0 3px 0 #00b3ff44}
.btn{font:inherit;font-weight:700;border:0;cursor:pointer;color:#fff;border-radius:999px;padding:8px 18px;min-height:44px;
 background:linear-gradient(90deg,#C8102E,#C8102E);box-shadow:0 4px 0 #4b2bb0}
.btn:active{transform:translateY(2px)}
.btn.big{font-size:22px;padding:12px 32px}
.btn.alt{background:linear-gradient(90deg,#00b3ff,#C8102E);box-shadow:0 4px 0 #2654a8}
.win{position:fixed;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;background:rgba(191,233,255,.85);padding:16px;overflow:auto}
.win[hidden]{display:none}
.panel{position:relative;z-index:2;background:#fff;border-radius:28px;padding:20px 26px 26px;text-align:center;max-width:440px;width:100%;
 border:5px solid #C8102E;box-shadow:0 10px 0 #C8102E,0 20px 40px rgba(0,0,0,.2);animation:in .5s cubic-bezier(.3,1.5,.5,1)}
@keyframes in{from{transform:scale(.5);opacity:0}}
.panel img{width:min(200px,46vw);height:auto;animation:bob 1.2s ease-in-out infinite alternate}
@keyframes bob{to{transform:translateY(-10px) rotate(4deg)}}
.panel h2{color:#C8102E;font-size:clamp(22px,5vw,32px)}
.cheer{font-size:20px;font-weight:600;color:#C8102E;margin:4px 0 10px}
.how{font-size:16px;line-height:1.35;margin:0 0 16px;color:#23262b}
.stats{font-size:18px;margin-bottom:16px}
.confetti i{position:absolute;top:-20px;width:10px;height:16px;border-radius:2px;animation:fall linear infinite}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
@media (max-width:640px){
 .hud{font-size:15px;gap:6px}
 .links a{font-size:14px;padding:7px 12px}
}
@media (prefers-reduced-motion:reduce){.panel,.panel img,.confetti i{animation:none}}


.room{position:relative;min-height:min(420px,62vh);background:linear-gradient(#1b2845,#3a2a58 55%,#23262b);
 border-radius:28px;border:4px solid #d63fa0;box-shadow:0 8px 0 #8a1860;overflow:hidden}
.sleeper{position:absolute;left:50%;top:50%;width:min(200px,42vw);height:auto;transform:translate(-50%,-50%);
 z-index:2;filter:drop-shadow(0 8px 0 rgba(0,0,0,.25));pointer-events:none}
.sleeper.worried{animation:toss .35s ease-in-out infinite alternate}
.sleeper.awake{filter:drop-shadow(0 0 12px #ffd000)}
@keyframes toss{to{transform:translate(-50%,-54%) rotate(-3deg)}}
.zzz{position:absolute;left:54%;top:22%;z-index:3;pointer-events:none;color:#fff;font-weight:700}
.zzz i{display:inline-block;margin:0 2px;opacity:.85;animation:floatz 1.6s ease-in-out infinite}
.zzz i:nth-child(2){animation-delay:.3s;font-size:22px}
.zzz i:nth-child(3){animation-delay:.6s;font-size:28px}
@keyframes floatz{50%{transform:translateY(-12px);opacity:1}}
.noise{position:absolute;z-index:4;width:110px;min-height:88px;border:0;cursor:pointer;border-radius:18px;
 background:#fff;box-shadow:0 5px 0 #C8102E66;display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:2px;padding:8px 6px;font:inherit;font-weight:700;color:#23262b}
.noise .em{font-size:28px;line-height:1}
.noise .nm{font-size:13px}
.noise .meter{width:86%;height:10px;background:#eadffc;border-radius:999px;overflow:hidden;margin-top:4px}
.noise .meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2ecc40,#ffd000,#ff3b3b);border-radius:999px}
.noise:focus-visible{outline:4px solid #ffd000;outline-offset:2px}
.hint{text-align:center;margin-top:10px;font-weight:600;color:#C8102E}
@media (max-width:640px){
 .room{min-height:360px}
 .sleeper{width:min(150px,40vw)}
 .noise{width:96px;min-height:80px}
 .noise .em{font-size:24px}
 .noise .nm{font-size:11px}
}
@media (prefers-reduced-motion:reduce){.sleeper,.zzz i{animation:none}}


.brand{display:inline-flex;align-items:center;margin:4px 0}
.brand img{height:44px;width:auto;display:block}
.sub{font-weight:700;color:#C8102E;font-size:clamp(17px,2vw,22px)}
.btn,.btn.big{background:#C8102E;color:#fff;border:0;border-radius:999px;padding:12px 24px;font:inherit;font-weight:700;cursor:pointer}
.btn:hover{background:#9d0c24}
