/* MIRE · Remi under the wardrobe (2026-11-13).
 * The closed wardrobe is a real 3D wardrobe on legs (remi-wardrobe-3d-20261113.js, WebGL) and a small
 * 3D Remi lives in it: he wanders between and in front of the legs, looks around, waves, hops (and
 * bumps the wardrobe: it rattles), naps, and now and then opens the left door from inside and looks
 * out from the shelf. Tap him for a bubble to /remi; tap the wardrobe and it answers. Without WebGL
 * the CSS doors stand on CSS legs. Only while the doors are closed (.mw:not(.is-open));
 * remi-mire-20261113.js adds .rm-on. Reduced motion: he stands still, the tap still works. */
.rm-wd[hidden]{display:none!important}
.mw.rm-on:not(.is-open) .mw-stage{--rm-leg:clamp(82px,16%,138px)}
.mw.rm-on:not(.is-open) .mw-door{bottom:var(--rm-leg)}
.mw.rm-on:not(.is-open) .mw-gap{bottom:calc(var(--rm-leg) + 6%)}
/* the closed message sits on the doors, above the plinth */
.mw.rm-on:not(.is-open) .mw-closed,html.mw-locked .mw.rm-on:not(.is-open) .mw-closed{bottom:calc(var(--rm-leg) + clamp(16px,4%,34px))}
.mw.rm-on.rm-shake:not(.is-open) .mw-door{animation:rm-shake .42s cubic-bezier(.36,.07,.19,.97) both}
.mw.rm-on.rm-shake:not(.is-open) .mw-door.r{animation-delay:.04s}
@keyframes rm-shake{20%{translate:-2px 0}40%{translate:3px 0}60%{translate:-2px 0}80%{translate:1px 0}}
.mw.is-open .rm-wd{display:none}

.rm-wd{position:absolute;inset:0;pointer-events:none}
.rm-wd__base{position:absolute;left:0;right:0;bottom:0;height:var(--rm-leg);z-index:7;pointer-events:none}
.rm-wd__base::before{content:"";position:absolute;left:4%;right:4%;bottom:-6px;height:22px;border-radius:50%;background:radial-gradient(closest-side,rgba(8,2,5,.7),transparent)}
.rm-wd__plinth{position:absolute;left:0;right:0;top:0;height:11px;z-index:3;background:linear-gradient(#4a1a2b,#2a0d17);border:1px solid rgba(201,179,122,.35);border-top-color:rgba(201,179,122,.6);box-shadow:0 6px 14px rgba(0,0,0,.45)}
.rm-wd__leg{position:absolute;top:10px;bottom:0;width:clamp(16px,3.4%,30px);z-index:3;background:linear-gradient(90deg,#24090f,#5a2236 45%,#2a0d17);clip-path:polygon(0 0,100% 0,72% 100%,28% 100%)}
.rm-wd__leg::after{content:"";position:absolute;left:0;right:0;bottom:0;height:16%;background:linear-gradient(90deg,#8a6a2a,#e9cf86 45%,#8a6a2a)}
.rm-wd__leg.l{left:7%}.rm-wd__leg.r{right:7%}
.rm-wd__under{position:absolute;left:0;right:0;top:11px;bottom:0;z-index:2;overflow:hidden;background:linear-gradient(rgba(8,2,5,.55),rgba(8,2,5,0) 70%)}
/* the 3D wardrobe (WebGL): once it has drawn, it takes the place of the CSS doors and legs */
.rm-wd__scene{position:absolute;inset:0;z-index:5}
.rm-wd__scene canvas{position:absolute;inset:0;width:100%!important;height:100%!important;display:block;pointer-events:auto;cursor:pointer;opacity:0;transition:opacity .7s ease;-webkit-tap-highlight-color:transparent}
.rm-wd__scene.is-ready canvas{opacity:1}
.mw.rm-3d:not(.is-open) .mw-door,.mw.rm-3d:not(.is-open) .mw-gap,.mw.rm-3d:not(.is-open) .mw-ring,.mw.rm-3d:not(.is-open) .mw-beam,.mw.rm-3d:not(.is-open) .mw-floor,.mw.rm-3d .rm-wd__base{visibility:hidden}
.mw.rm-3d:not(.is-open) .mw-closed,html.mw-locked .mw.rm-3d:not(.is-open) .mw-closed{bottom:23%;text-shadow:0 1px 8px rgba(0,0,0,.6)}
.mw.rm-3d .mw-frame{background:radial-gradient(80% 60% at 50% 70%,rgba(112,36,63,.28),transparent)}

/* tap him: a pop-up card to his page (no 3D reaction) */
.rm-wd__bubble{position:absolute;z-index:9;left:50%;top:34%;transform:translate(-50%,-50%) scale(.6);display:inline-flex;align-items:center;gap:10px;padding:14px 22px;min-height:48px;border-radius:18px;background:#F6F1E8;color:#70243F!important;font:inherit;font-size:15px;font-weight:600;letter-spacing:.05em;text-decoration:none;white-space:nowrap;box-shadow:0 18px 50px rgba(0,0,0,.45),0 0 0 1px rgba(201,179,122,.5);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .25s,transform .45s cubic-bezier(.3,1.6,.5,1),visibility 0s .25s}
.rm-wd.is-bubble .rm-wd__bubble{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1);transition:opacity .25s,transform .45s cubic-bezier(.3,1.6,.5,1)}
.rm-wd__bubble:focus-visible{outline:2px solid #FFE497;outline-offset:3px}
.rm-wd__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;pointer-events:auto}
.rm-wd__sr:focus{width:auto;height:auto;clip:auto;left:12px;bottom:calc(var(--rm-leg) + 12px);z-index:9;padding:8px 12px;border-radius:8px;background:#F6F1E8;color:#70243F}
@media (prefers-reduced-motion:reduce){.mw.rm-on:not(.is-open) .mw-door{animation:none!important}.rm-wd__mini canvas,.rm-wd__bubble{transition:none!important}}

/* locked screen: never taller than the smallest visible viewport, so the "Ana sayfaya dön" button
 * below the wardrobe stays on screen on phones whose browser bars take room (2026-11-13) */
html.mw-locked .mw{height:calc(min(var(--mw-vh,100svh),100svh) - var(--mw-top,0px))}
