/* First-run intro overlay (see first-run-intro.mjs). The clips carry their
   own black bars, so the stage is black and the hint sits in the lower bar. */
.first-run-intro{position:fixed;inset:0;z-index:1000;background:#000;overflow:hidden;opacity:1;transition:opacity .5s ease}
.first-run-intro[hidden]{display:none}
.first-run-intro::after{content:"";position:absolute;inset:0;z-index:7;background:#fff;opacity:0;pointer-events:none;transition:opacity .7s ease}
.first-run-intro[data-stage="white"]::after,.first-run-intro[data-stage="reveal"]::after{opacity:1}
.first-run-intro[data-stage="reveal"]{opacity:0;pointer-events:none}
.intro-clip{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .3s ease;pointer-events:none}
.intro-clip.is-visible{opacity:1}
.intro-clip[data-intro-clip="sleep"]{z-index:1}
.intro-clip[data-intro-clip="hello"]{z-index:2}
.intro-touch{position:absolute;inset:0;z-index:4;width:100%;height:100%;margin:0;padding:0;border:0;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
.intro-touch:focus-visible{outline:3px solid rgba(255,255,255,.7);outline-offset:-6px}
.first-run-intro:not([data-stage="sleeping"]) .intro-touch{cursor:default}
/* A. The pill sits in the clip's own bottom black bar (10.7% of the 9:16 frame), so on short phones it
   never covers Mame's face (2026-10-30 audit at 320x460). Frame height = min(100dvh, 16/9 of the width). */
.intro-hint{position:absolute;left:50%;bottom:calc((100dvh - min(100dvh, 177.78vw)) / 2 + min(100dvh, 177.78vw) * 0.012);z-index:5;margin:0;padding:6px 16px;translate:-50% 0;white-space:nowrap;text-align:center;color:#4F3D30;background:rgba(255,248,230,.94);border-radius:999px;box-shadow:0 0 0 2px #BF7F4E,0 4px 14px rgba(0,0,0,.35);font-size:clamp(13px, 3.8vw, 16px);font-weight:700;letter-spacing:.06em;opacity:0;pointer-events:none;transition:opacity .6s ease}
.first-run-intro[data-hint="on"] .intro-hint{opacity:1}
/* 2026-10-29 user: an inviting touch cue on Mame herself. A paw pats her head and a soft ring
   spreads, the way a finger would. The frame matches the contained 9:16 clip so the paw stays
   on her head on any screen; it leaves as soon as she is touched. */
.intro-frame{position:absolute;left:50%;top:50%;z-index:5;width:min(100vw,100dvh * 9 / 16);aspect-ratio:9/16;translate:-50% -50%;pointer-events:none}
.intro-paw{position:absolute;left:33%;top:58%;width:84px;height:84px;margin:-42px 0 0 -42px;opacity:0;transition:opacity .5s ease;filter:drop-shadow(0 0 6px rgba(255,214,120,.9))}
.intro-paw svg{display:block;width:100%;height:100%;transform-origin:50% 80%}
.intro-paw-ring{position:absolute;left:50%;top:62%;width:92px;height:92px;margin:-46px 0 0 -46px;border:3px solid rgba(255,236,190,.95);border-radius:50%;opacity:0}
.first-run-intro[data-hint="on"] .intro-paw{opacity:1}
.first-run-intro[data-hint="on"] .intro-paw svg{animation:intro-paw-pat 1.6s ease-in-out infinite}
.first-run-intro[data-hint="on"] .intro-paw-ring{animation:intro-paw-ring 1.6s ease-out infinite}
@keyframes intro-paw-pat{0%,100%{transform:translateY(-10px) rotate(-8deg) scale(1)}35%{transform:translateY(4px) rotate(-8deg) scale(.88)}50%{transform:translateY(4px) rotate(-8deg) scale(.88)}}
@keyframes intro-paw-ring{0%,30%{transform:scale(.3);opacity:0}38%{opacity:1}100%{transform:scale(1.5);opacity:0}}
@media (prefers-reduced-motion:reduce){.first-run-intro[data-hint="on"] .intro-paw svg,.first-run-intro[data-hint="on"] .intro-paw-ring{animation:none}}
.intro-skip{position:absolute;top:calc(12px + env(safe-area-inset-top));right:16px;z-index:6;min-height:44px;padding:0 14px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:rgba(0,0,0,.35);color:rgba(255,255,255,.85);font:inherit;font-size:.85rem;cursor:pointer}

/* Entry screen Mame: greeting after the intro, goodbye after logout, silent
   waiting loop otherwise. The clips play inside the door window (app-shell.css,
   design/door-frame.mjs); buttons wait until Mame finishes speaking (max 4s). */
.entry-clip{transition:opacity .3s ease}
.entry-clip:not(.is-visible){opacity:0}
#entry-voice{z-index:2}
/* 2026-10-29 user: no empty board while Mame greets, so the login buttons stay in place from the start. */
.entry-actions{transition:opacity .4s ease}
.entry-bye{display:none;margin:0;text-align:center}
[data-screen="entry"][data-entry-mode="bye"] .entry-bye{display:block}
@media (prefers-reduced-motion:reduce){.entry-clip,.entry-actions{transition:none}}

/* Public info links (KG payment review: terms and tokushoho reachable from every page).
   Outside .entry-actions so they stay visible while Mame greets. */
.entry-legal{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;margin-top:18px;font-size:12px;line-height:1.6}
.entry-legal a{color:var(--muted);text-underline-offset:3px}
