  :root{ --bg1:#ffe9a8; --bg2:#ffc7d9; --ink:#4a2c6b; --accent:#ff7a3d; --accent2:#7c5cff; --ok:#34c47c; --bad:#ff4d6d; }
  *{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
  html,body{margin:0;height:100%;height:100dvh;overflow:hidden;overscroll-behavior:none;position:fixed;inset:0;width:100%;}
  body{font-family:"Rubik","Varela Round","IBM Plex Sans Hebrew","Arial Rounded MT Bold","Segoe UI",Arial,sans-serif;color:var(--ink);
    background:linear-gradient(135deg,var(--bg1),var(--bg2));user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;}
  button{font-family:inherit;color:inherit;cursor:pointer;border:none;touch-action:manipulation;}
  #cv{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none;}
  #gl3d{position:fixed;inset:0;width:100%;height:100%;display:none;pointer-events:none;touch-action:none}body.gl3 #gl3d{display:block}
  .iconbtn{width:46px;height:46px;border-radius:50%;background:#fff;box-shadow:0 4px 0 #0002;font-size:23px;display:flex;align-items:center;justify-content:center;flex:none;transition:transform .1s;padding:0}
  .iconbtn:active{transform:translateY(3px);box-shadow:0 1px 0 #0002;}
  .iconbtn.off{opacity:.5}
  .hidden{display:none !important}
  .an-menu{--an-accent:#b34510}
body .an-menu{z-index:30}
  #mFace svg,#doneHero svg,#overHero svg{width:72px;height:72px;display:block}
  .chars{display:flex;gap:8px;justify-content:center}
  .ch{flex:1 1 0;min-width:0;max-width:136px;background:var(--an-card);color:var(--an-ink);border:1.5px solid var(--an-line);border-radius:var(--an-r);padding:8px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;font-weight:700;font-size:14px;line-height:1.15;min-height:44px}
  .ch svg{width:70%;height:auto}
  .ch.sel{background:var(--an-tint);border-color:var(--an-accent)}
  .ch.locked{opacity:.6}
  .ch small{font-size:.85em;opacity:.85;font-weight:600}
  .foes{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
  .foe{display:flex;flex-direction:column;align-items:center;font-size:13px;font-weight:600;width:78px;line-height:1.1}
  .foe canvas{width:56px;height:56px}
  .lvsel{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
  .lvb{width:56px;height:60px;border-radius:14px;background:var(--w,#ffa8cb);border:3px solid transparent;color:#fff;font-weight:900;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;text-shadow:0 1px 0 #0004}
  .lvb small{font-size:12px;color:#ffe066;letter-spacing:-1px}.lvb small i{font-style:normal;color:#fff8}
  .lvb.sel{border-color:var(--an-ink);box-shadow:0 0 0 2px var(--an-card) inset}
  .lvb.locked{filter:grayscale(.8);opacity:.6}
  .stars{font-size:40px;letter-spacing:6px;line-height:1.1;color:#d9d2c6;direction:ltr}
  .stars span.on{color:#e6a800;display:inline-block;animation:starpop .5s cubic-bezier(.3,1.8,.5,1) both}
  @keyframes starpop{0%{transform:scale(0) rotate(-90deg)}100%{transform:scale(1) rotate(0)}}
  .rec{font-size:20px;font-weight:700;color:var(--an-accent)}.rec:empty{display:none}
  .sub{font-size:16px;font-weight:400;color:var(--an-soft)}
  .jumpers{display:flex;gap:8px;justify-content:center}
  .jumpers svg{width:64px;height:64px}
  .keys.an-note{display:none}.desk .keys.an-note{display:block}
  #an-more-slot:empty{display:none}
  #hud{position:fixed;left:0;right:0;top:0;z-index:10;padding:max(6px,env(safe-area-inset-top)) 6px 6px;display:flex;align-items:center;gap:5px;
       background:linear-gradient(#ffffffb0,#ffffff70);border-bottom:3px solid #ffffffcc;box-shadow:0 4px 12px #0001}
  .pill{background:#fff;border-radius:999px;padding:4px 10px;font-size:clamp(15px,4.2vw,21px);font-weight:800;box-shadow:0 3px 0 #0002;white-space:nowrap;display:flex;align-items:center;gap:4px;height:42px}
  .pill b{color:var(--accent);font-size:1.1em}
  .grow{flex:1 0 auto;justify-content:center}
  #hud .iconbtn{width:44px;height:44px}
  @media (max-width:380px){#hud{gap:3px}#hud .pill{padding-left:6px;padding-right:6px;min-width:0}#hud .pill.lives{letter-spacing:-2px}#hud .grow{flex:1 1 auto}}
  .lives{display:flex;gap:0}
  .lives svg{width:26px;height:26px}
  .pausebtn{font-size:0}
  .pausebtn::before,.pausebtn::after{content:"";width:6px;height:18px;border-radius:3px;background:var(--ink);margin:0 3px}
  #toast{position:fixed;left:50%;z-index:20;pointer-events:none;background:#fff;border-radius:22px;padding:6px 18px;font-size:clamp(19px,5.2vw,28px);font-weight:900;
         box-shadow:0 0 0 4px var(--accent),0 6px 0 #0002;transform:translate(-50%,0) scale(0);transition:transform .3s cubic-bezier(.3,1.7,.5,1);white-space:nowrap;max-width:94vw;overflow:hidden;text-overflow:ellipsis}
  #toast.show{transform:translate(-50%,0) scale(1)}
  #pad{position:fixed;z-index:12;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;direction:ltr}
  #pad button{border-radius:50%;background:#ffffffd8;box-shadow:0 4px 0 #0002;font-size:0;display:flex;align-items:center;justify-content:center;touch-action:none}
  #pad button::after{content:"";width:0;height:0;border:14px solid transparent;border-bottom:20px solid var(--accent2);margin-top:-18px}
  #pad button.on{background:#ffe36b;transform:translateY(2px);box-shadow:0 2px 0 #0002}
  #pad .u{grid-area:1/2} #pad .l{grid-area:2/1;transform:rotate(-90deg)} #pad .r{grid-area:2/3;transform:rotate(90deg)} #pad .d{grid-area:3/2;transform:rotate(180deg)}
  #pad .l.on{transform:rotate(-90deg) translateY(2px)} #pad .r.on{transform:rotate(90deg) translateY(2px)} #pad .d.on{transform:rotate(180deg) translateY(2px)}
  #pad .mid{grid-area:2/2;border-radius:50%;background:#fff5}
  #confetti{position:fixed;inset:0;pointer-events:none;z-index:50;width:100%;height:100%}
.keys{display:none;font-size:15px;font-weight:700;opacity:.75;background:#fff9;border-radius:14px;padding:5px 14px;max-width:560px}
  .desk .keys{display:block}
  #keysPlay{position:fixed;left:50%;bottom:8px;transform:translateX(-50%);z-index:4;display:none;font-size:14px;font-weight:700;background:#fffd;border-radius:999px;padding:4px 14px;pointer-events:none;white-space:nowrap;transition:opacity .6s}
  .desk.playing #keysPlay{display:block}
  .desk #keysPlay.fade{opacity:0}
  .desk #cv{cursor:default}
  .desk .iconbtn{width:48px;height:48px}.desk #hud .iconbtn{width:48px;height:48px}
