/* IBM Plex Sans Arabic + IBM Plex Sans (Latin) — SIL OFL 1.1, self-hosted subsets (see /fonts/OFL.txt). Weights 400/700 only. Same-origin => CSP font-src 'self'. */
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/plex-ar-400.woff2?v=2) format("woff2");unicode-range:U+0600-0605,U+060C,U+061B,U+061F,U+0621-0655,U+0660-066C,U+066E-06D3,U+06D5,U+200C-200F,U+FDFC,U+25CC}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/plex-lat-400.woff2?v=2) format("woff2");unicode-range:U+0020-007E,U+00A0-00FF,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+20AC,U+2212}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/plex-ar-700.woff2?v=2) format("woff2");unicode-range:U+0600-0605,U+060C,U+061B,U+061F,U+0621-0655,U+0660-066C,U+066E-06D3,U+06D5,U+200C-200F,U+FDFC,U+25CC}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/plex-lat-700.woff2?v=2) format("woff2");unicode-range:U+0020-007E,U+00A0-00FF,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+20AC,U+2212}
/* Muhraverse play shell: kid bottom bar (side bar in short landscape), start screen, safe areas, no zoom/selection/bounce. */
:root{--mvbar-h:89px;--mv-ink:#3B3355;--mv-card:#fff;--mv-line:#E7DFF3;--mv-bg:#FBF6EE;--mv-gold:#F3C969;--mv-lav:#CDBFF2}
html[data-theme=dark]{--mv-ink:#EDE9F7;--mv-card:#2A2D55;--mv-line:#3c3f72;--mv-bg:#1B1D3A;--mv-lav:#4a4a82;color-scheme:dark}
@media (prefers-color-scheme:dark){html:not([data-theme=light]){--mv-ink:#EDE9F7;--mv-card:#2A2D55;--mv-line:#3c3f72;--mv-bg:#1B1D3A;--mv-lav:#4a4a82;color-scheme:dark}}
html,body{background:var(--mv-bg);overscroll-behavior:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;padding-bottom:calc(var(--mvbar-h) + env(safe-area-inset-bottom))!important;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
body img{-webkit-user-drag:none;user-drag:none}
#root{height:calc(100vh - var(--mvbar-h) - env(safe-area-inset-bottom))!important;height:calc(100dvh - var(--mvbar-h) - env(safe-area-inset-bottom))!important;min-height:0!important}
#root *{overscroll-behavior:contain}
.mvbar{position:fixed;left:0;right:0;bottom:0;height:calc(var(--mvbar-h) + env(safe-area-inset-bottom));padding:0 max(6px,env(safe-area-inset-left)) env(safe-area-inset-bottom);z-index:2147483000;display:flex;align-items:stretch;justify-content:space-around;gap:4px;background:var(--mv-card);border-top:2px solid var(--mv-line);box-shadow:0 -4px 18px rgba(91,70,150,.12);font:700 13px/1.1 system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif}
.mvbar .mvb{flex:1 1 0;min-width:72px;max-width:150px;margin:5px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--mv-ink);background:transparent;border:0;border-radius:16px;text-decoration:none;font:inherit;cursor:pointer;position:relative;-webkit-appearance:none;appearance:none}
.mvbar .mvb .i{font-size:28px;line-height:1}.mvbar .mvb b{font-weight:700;font-size:13px}
.mvbar .mvb:active{background:var(--mv-lav)}.mvbar .mvb[aria-current=page]{background:var(--mv-lav)}
.mvbar .mvb:focus-visible,#mvsplash button:focus-visible{outline:4px solid #6b57b5;outline-offset:2px}
.mvbar .hot{background:var(--mv-gold);color:#2c2540}
.mvbar #mvs-par.holding::after{content:"";position:absolute;inset:2px;border-radius:18px;border:4px solid var(--mv-gold);animation:mvhold 1.2s linear forwards}
@keyframes mvhold{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@media (max-width:519px) and (orientation:portrait){.mvbar #mvs-fs{display:none!important}}
.mvbar [hidden]{display:none!important}
@media (min-width:520px){.mvbar{justify-content:space-evenly;gap:10px}.mvbar .mvb{max-width:240px}}
#root{background:var(--mv-bg)}   /* edge-to-edge, also under the safe areas */
/* phones turned sideways: the bar moves to the side so the game keeps its height */
@media (orientation:landscape) and (max-height:520px){
  :root{--mvbar-w:76px}
  .mvbar{left:auto;right:0;top:0;bottom:0;height:auto;width:calc(var(--mvbar-w) + env(safe-area-inset-right));flex-direction:column;padding:6px env(safe-area-inset-right) 6px 4px;border-top:0;border-left:2px solid var(--mv-line);box-shadow:-4px 0 18px rgba(91,70,150,.12)}
  html[dir=rtl] .mvbar{right:auto;left:0;border-left:0;border-right:2px solid var(--mv-line);padding:6px 4px 6px env(safe-area-inset-left)}
  .mvbar .mvb{margin:0;max-width:none;min-height:72px}
  body{padding-bottom:0!important;padding-right:calc(var(--mvbar-w) + env(safe-area-inset-right))!important;padding-left:0}
  html[dir=rtl] body{padding-right:0!important;padding-left:calc(var(--mvbar-w) + env(safe-area-inset-left))!important}
  #root{height:100vh!important;height:100dvh!important}
}
/* start screen */
#mvsplash{position:fixed;inset:0;z-index:2147483100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;text-align:center;background:var(--mv-bg);color:var(--mv-ink);font:700 20px/1.5 "IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif}
#mvsplash img{width:min(46vw,200px);height:auto;border-radius:42px;box-shadow:0 8px 28px rgba(0,0,0,.25);animation:mvfloat 3.2s ease-in-out infinite}
@keyframes mvfloat{50%{transform:translateY(-10px)}}
@media (prefers-reduced-motion:reduce){#mvsplash img,.mvbar #mvs-par.holding::after{animation:none}}
#mvsplash h1{margin:0;font-size:28px}#mvsplash #mvs-msg{margin:0;font-size:18px;min-height:1.6em;opacity:.85}
#mvs-go{min-width:min(78vw,320px);min-height:89px;padding:0 26px;border:0;border-radius:26px;background:var(--mv-gold);color:#2c2540;font:800 28px/1 "IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;box-shadow:0 6px 0 #c9a24a;cursor:pointer}
#mvs-go:disabled{opacity:.5;box-shadow:none;cursor:progress}#mvs-go:active:not(:disabled){transform:translateY(4px);box-shadow:0 4px 0 #c9a24a}
#mvs-inst{min-height:55px;padding:0 26px;border-radius:26px;border:2px solid var(--mv-line);background:var(--mv-card);color:var(--mv-ink);font:700 17px "IBM Plex Sans Arabic",system-ui,sans-serif;cursor:pointer}
#mvs-help{max-width:340px;font-size:15px;font-weight:600;opacity:.8;margin:0}
#mvs-help:empty{display:none}#mvsplash [hidden]{display:none!important}
html.mv-go #mvsplash{display:none}
html.mv-fs .mvb#mvs-fs .i{filter:grayscale(.3)}
@media (orientation:landscape) and (max-height:520px){#mvsplash{flex-direction:row;flex-wrap:wrap;gap:8px 22px}#mvsplash img{width:110px}}
@media (orientation:landscape) and (max-height:430px){.mvbar{overflow-y:auto;scrollbar-width:none}.mvbar .mvb{min-height:58px;flex:1 0 58px}.mvbar .mvb b{font-size:10px}.mvbar .mvb .i{font-size:24px}}

@media (max-width:420px) and (orientation:portrait){.mvbar{gap:2px;padding-inline:2px}.mvbar .mvb{min-width:0;flex:1 1 0}.mvbar .mvb b{font-size:11px}.mvbar .mvb .i{font-size:26px}}
input,textarea{-webkit-user-select:text;user-select:text}

.mvbar .mvb small.hold{font-size:11px;font-weight:600;opacity:.85;line-height:1.1}
/* one family for the whole site and the games (fonts.css ships it; the Expo web build sets no font of its own) */
body,#root,#root *,.mvbar,.mvbar *{font-family:"IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif}

/* ---- device classes: mouse / keyboard / big screens (owner 2026-11-25) ---- */
body{padding-top:env(safe-area-inset-top)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
#root [role=button],.mvbar .mvb{cursor:pointer}
#root [role=button]:focus-visible,#root a:focus-visible,#root [tabindex]:focus-visible{outline:4px solid #6b57b5;outline-offset:3px;border-radius:18px}
@media (hover:hover) and (pointer:fine){
  #root [role=button]:hover:not([aria-disabled=true]){filter:brightness(1.04) saturate(1.05)}
  #root [role=button]:active:not([aria-disabled=true]){filter:brightness(.97)}
  .mvbar .mvb:hover{background:var(--mv-lav)}
}
/* very wide screens: the games stay a centred stage (the app caps it too); the bar keeps its usual place */

/* zoom mode (see playscale.js): 100vh would be the unzoomed height, so the layout height comes from --mv-lh */
html.mv-zoom #root{height:calc(var(--mv-lh) - var(--mvbar-h) - env(safe-area-inset-bottom))!important}

/* immersive play (playshell.js sets html.mv-ingame inside an activity): no tab bar, the game gets the whole height, notch / home-indicator padding only */
html.mv-ingame .mvbar{display:none!important}
html.mv-ingame[dir] body{padding-bottom:env(safe-area-inset-bottom)!important;padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important}
html.mv-ingame[dir] #root{height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}
html.mv-ingame.mv-zoom[dir] #root{height:calc(var(--mv-lh) - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}

/* exit button inside a game: always reachable, never blocks play (corner, semi-transparent until touched) */
.mv-exit{position:fixed;top:max(10px,env(safe-area-inset-top));inset-inline-end:max(10px,env(safe-area-inset-right));z-index:2147483000;width:56px;height:56px;border-radius:50%;border:2px solid rgba(255,255,255,.55);background:rgba(27,29,74,.62);color:#fff;font:700 24px/1 system-ui,sans-serif;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.mv-exit:active,.mv-exit:focus-visible{background:rgba(27,29,74,.92);outline:3px solid #f2c96b}
html.mv-zoom .mv-exit{width:64px;height:64px}

/* parents tab: one-time «press & hold» hint (ring + finger) until used once; calm / reduced-motion = static */
.mvbar #mvs-par{position:relative}
.mvbar #mvs-par.hint::before{content:"";position:absolute;inset:1px;border-radius:18px;border:3px solid var(--mv-gold);animation:mvpulse 1.8s ease-in-out infinite;pointer-events:none}
.mvbar #mvs-par.hint small.hold{font-size:13px;font-weight:800;opacity:1}
.mvbar #mvs-par .mvfinger{display:none}
.mvbar #mvs-par.hint .mvfinger{display:block;position:absolute;top:4px;inset-inline-end:6px;font-size:20px;line-height:1;pointer-events:none;animation:mvtap 1.8s ease-in-out infinite}
.mvbar #mvs-par.hint.still::before,.mvbar #mvs-par.hint.still .mvfinger{animation:none}
@keyframes mvpulse{0%,100%{opacity:.35;transform:scale(1)}50%{opacity:1;transform:scale(1.04)}}
@keyframes mvtap{0%,100%{transform:translateY(4px)}50%{transform:translateY(-2px)}}
@media (prefers-reduced-motion:reduce){.mvbar #mvs-par.hint::before,.mvbar #mvs-par .mvfinger{animation:none!important}}
/* inside a game: no accidental pull-to-refresh / back-swipe from a toddler's drag (the game's own scroll areas still scroll) */
html.mv-ingame,html.mv-ingame body{overscroll-behavior:none}
html.mv-ingame #root{touch-action:manipulation}
