/* Pixel Pet Studio mobile shell alpha.24.8.0
   Full-screen world, thumb dock, draggable sheets, safe-area support.
   Simulation remains shared with desktop; this file changes presentation only. */

:root{
  color-scheme:dark;
  --m-bg:#041018;
  --m-panel:rgba(7,24,35,.965);
  --m-panel-soft:rgba(8,31,42,.88);
  --m-panel-glass:rgba(5,24,33,.72);
  --m-line:rgba(150,225,201,.18);
  --m-line-strong:rgba(110,239,190,.48);
  --m-text:#f4fff9;
  --m-muted:#a7c5ba;
  --m-accent:#63edac;
  --m-accent-2:#55cbea;
  --m-warn:#ffbd66;
  --m-danger:#ff7d79;
  --m-shadow:0 22px 64px rgba(0,0,0,.55);
  --m-radius:24px;
  --m-topbar-h:58px;
  --m-dock-h:72px;
  --m-vv-height:100dvh;
  --m-spring:cubic-bezier(.2,.8,.2,1);
  --m-fast:140ms;
  --m-normal:240ms;
}

*,
*::before,
*::after{box-sizing:border-box}

html{
  width:100%;
  height:100%;
  overflow:hidden;
  background:#02090d;
  overscroll-behavior:none;
}

body.m-shell{
  position:fixed;
  inset:0;
  width:100%;
  height:var(--m-vv-height);
  min-height:0;
  margin:0;
  overflow:hidden!important;
  color:var(--m-text);
  background:var(--m-bg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;
  touch-action:manipulation;
  isolation:isolate;
}

button,
input{font:inherit}

button{
  color:inherit;
  -webkit-tap-highlight-color:transparent;
}

button:focus{outline:none}
button:focus-visible{
  outline:2px solid rgba(99,237,172,.95);
  outline-offset:3px;
}

/* ---------- top status bar ---------- */

body.m-shell .m-topbar{
  position:absolute;
  z-index:45;
  top:0;
  left:0;
  right:0;
  height:calc(var(--m-topbar-h) + env(safe-area-inset-top,0px));
  padding:env(safe-area-inset-top,0px) max(10px,env(safe-area-inset-right,0px)) 0 max(10px,env(safe-area-inset-left,0px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:0;
  border-bottom:1px solid rgba(141,225,197,.15);
  background:
    radial-gradient(circle at 20% -80%,rgba(89,232,167,.30),transparent 65%),
    linear-gradient(115deg,rgba(4,18,28,.91),rgba(6,42,53,.88));
  box-shadow:0 10px 30px rgba(0,0,0,.33);
  backdrop-filter:blur(18px) saturate(1.2);
  -webkit-backdrop-filter:blur(18px) saturate(1.2);
}

.m-brand-button{
  min-width:0;
  height:44px;
  padding:0 8px 0 4px;
  display:flex;
  align-items:center;
  gap:9px;
  border:0;
  border-radius:15px;
  background:transparent;
  text-align:left;
}

.m-brand-button:active{background:rgba(255,255,255,.055)}

.brand-mark{
  position:relative;
  width:22px;
  height:34px;
  flex:0 0 22px;
  filter:drop-shadow(0 0 9px rgba(56,239,149,.56));
}

.brand-mark::before,
.brand-mark::after{
  content:"";
  position:absolute;
  left:4px;
  width:14px;
  height:14px;
  border-radius:3px;
  transform:rotate(45deg);
  background:linear-gradient(145deg,#a7ffd0 0%,#35e894 45%,#087653 100%);
  box-shadow:inset 1px 1px rgba(255,255,255,.38);
}

.brand-mark::before{top:1px}
.brand-mark::after{bottom:1px;opacity:.82}

.brand-copy{
  min-width:0;
  display:grid;
  line-height:1.05;
}

.brand-copy strong{
  font-size:15px;
  letter-spacing:.045em;
  text-transform:uppercase;
  white-space:nowrap;
}

.brand-copy small{
  margin-top:4px;
  max-width:34vw;
  overflow:hidden;
  color:var(--m-muted);
  font-size:10px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.m-top-status{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}

.m-weather-chip,
body.m-shell .pps-time-chip{
  min-height:36px!important;
  height:36px;
  padding:0 10px!important;
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid rgba(157,231,206,.22)!important;
  border-radius:13px!important;
  background:rgba(2,16,24,.52)!important;
  color:var(--m-text)!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:750!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.m-weather-chip:active,
body.m-shell .pps-time-chip:active{transform:scale(.97)}

.m-weather-icon{font-size:15px}
.m-weather-temp{font-variant-numeric:tabular-nums}
body.m-shell .pps-time-chip .pps-time-icon{display:none}
body.m-shell .pps-time-chip .pps-time-phase{display:none}
body.m-shell .pps-time-chip .pps-time-clock{white-space:nowrap}

body.m-shell .m-topbar .top-right{
  display:flex;
  align-items:center;
  gap:6px;
}

body.m-shell .m-topbar .map-badge,
body.m-shell .m-topbar .ver{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* ---------- world viewport ---------- */

.m-app{
  /* Mobile map-stage ownership: presentation overlays must never replace this
     absolute viewport anchor with an inline `position:relative`. */
  position:absolute!important;
  z-index:1;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0;
  overflow:hidden;
  transform:none;
  background:#07130f;
  contain:none;
}

#mgame{
  position:absolute!important;
  z-index:2!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:2px;
  min-height:2px;
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  contain:none!important;
  background:#07130f;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}

.m-render-status{
  position:absolute;
  z-index:34;
  inset:0;
  padding:20px;
  display:grid;
  place-items:center;
  background:linear-gradient(155deg,rgba(2,15,23,.82),rgba(4,25,30,.92));
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.m-render-status[hidden]{display:none!important}

.m-render-status__card{
  width:min(330px,100%);
  padding:22px;
  border:1px solid rgba(255,151,136,.34);
  border-radius:22px;
  background:rgba(8,28,38,.96);
  box-shadow:0 24px 70px rgba(0,0,0,.5);
  text-align:center;
}

.m-render-status__icon{
  width:44px;
  height:44px;
  margin:0 auto 10px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:rgba(255,151,136,.12);
  color:#ffb6aa;
  font-size:24px;
}

.m-render-status__card strong{display:block;font-size:17px}
.m-render-status__card p{margin:8px 0 16px;color:var(--m-muted);font-size:12px;line-height:1.45}
.m-render-status__card button{
  min-height:44px;
  padding:0 18px;
  border:0;
  border-radius:14px;
  background:linear-gradient(145deg,#81f2bb,#43d99c);
  color:#05291e;
  font-weight:850;
}

.m-world-hint{
  position:absolute;
  z-index:18;
  left:50%;
  bottom:calc(var(--m-dock-h) + env(safe-area-inset-bottom,0px) + 14px);
  width:max-content;
  max-width:calc(100vw - 30px);
  min-height:34px;
  padding:7px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid rgba(166,232,209,.22);
  border-radius:999px;
  background:rgba(3,17,25,.72);
  color:#e8fff4;
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  font-size:11px;
  transform:translate(-50%,14px);
  opacity:0;
  pointer-events:none;
  transition:opacity var(--m-normal),transform var(--m-normal) var(--m-spring);
}

.m-world-hint[data-visible="1"]{
  opacity:1;
  transform:translate(-50%,0);
}

.m-active-tool{
  position:absolute;
  z-index:24;
  left:max(12px,env(safe-area-inset-left,0px));
  right:max(12px,env(safe-area-inset-right,0px));
  bottom:calc(var(--m-dock-h) + env(safe-area-inset-bottom,0px) + 10px);
  min-height:48px;
  padding:7px 10px 7px 8px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 28px;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,189,102,.46);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(70,38,17,.92),rgba(20,29,33,.94));
  color:#fff8e9;
  box-shadow:0 14px 35px rgba(0,0,0,.38);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  text-align:left;
  animation:mToolIn .24s var(--m-spring);
}

.m-active-tool[hidden]{display:none}

.m-active-tool-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:rgba(255,176,78,.14);
  font-size:18px;
}

.m-active-tool-copy{min-width:0;display:grid}
.m-active-tool-copy small{
  color:#e4c89f;
  font-size:9px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.m-active-tool-copy strong{
  overflow:hidden;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.m-active-tool-close{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:rgba(255,255,255,.07);
  font-size:18px;
}

@keyframes mToolIn{
  from{opacity:0;transform:translateY(10px) scale(.98)}
  to{opacity:1;transform:none}
}

/* ---------- bottom dock ---------- */

.m-dock{
  position:fixed;
  z-index:60;
  left:max(10px,env(safe-area-inset-left,0px));
  right:max(10px,env(safe-area-inset-right,0px));
  bottom:calc(7px + env(safe-area-inset-bottom,0px));
  height:var(--m-dock-h);
  padding:7px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
  gap:4px;
  border:1px solid rgba(163,230,207,.19);
  border-radius:23px;
  background:
    radial-gradient(circle at 50% -60%,rgba(77,214,166,.18),transparent 65%),
    rgba(3,17,26,.88);
  box-shadow:0 18px 48px rgba(0,0,0,.48);
  backdrop-filter:blur(22px) saturate(1.2);
  -webkit-backdrop-filter:blur(22px) saturate(1.2);
  transition:transform var(--m-normal) var(--m-spring),opacity var(--m-normal);
}

body.m-shell[data-panel="tools"] .m-dock,
body.m-shell[data-panel="menu"] .m-dock,
body.m-shell[data-panel="inspector"] .m-dock{
  transform:translateY(calc(100% + 28px));
  opacity:0;
  pointer-events:none;
}

.m-dock-button{
  position:relative;
  min-width:0;
  min-height:56px;
  padding:4px 2px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:0;
  border-radius:17px;
  background:transparent;
  color:#afc7be;
  font-size:10px;
  font-weight:750;
  letter-spacing:.015em;
  transition:transform var(--m-fast),background var(--m-fast),color var(--m-fast);
}

.m-dock-button:active{transform:scale(.94)}
.m-dock-button[aria-pressed="true"],
.m-dock-button[aria-expanded="true"]{
  background:rgba(95,229,173,.11);
  color:#eafff5;
}

.m-dock-button--primary{
  background:linear-gradient(145deg,rgba(72,230,166,.96),rgba(34,174,128,.96));
  color:#05271d;
  box-shadow:0 8px 22px rgba(32,208,144,.24),inset 0 1px rgba(255,255,255,.38);
}

.m-dock-button--primary[aria-expanded="true"]{
  background:linear-gradient(145deg,#8ff5c7,#4fdda4);
  color:#05271d;
}

.m-dock-icon{
  min-height:20px;
  display:grid;
  place-items:center;
  font-size:19px;
  line-height:1;
}

.m-dock-button--primary .m-dock-icon{font-size:21px}

/* ---------- shared sheet primitives ---------- */

.m-sheet-scrim{
  position:fixed;
  z-index:68;
  inset:0;
  background:rgba(0,8,12,.52);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity var(--m-normal);
}

.m-sheet-scrim[data-open="1"]{
  opacity:1;
  pointer-events:auto;
}

.m-sheet-handle{
  height:24px;
  display:grid;
  place-items:center;
  touch-action:none;
  cursor:grab;
}

.m-sheet-handle span{
  width:44px;
  height:5px;
  border-radius:999px;
  background:rgba(185,216,207,.34);
}

.m-sheet-heading{
  min-height:58px;
  padding:2px 16px 11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.m-sheet-kicker{
  margin:0 0 2px;
  color:#72d9b3;
  font-size:9px;
  font-weight:850;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.m-sheet-heading h2{
  margin:0;
  font-size:19px;
  line-height:1.15;
}

.m-sheet-close{
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(174,224,207,.17)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.045)!important;
  color:#effff8!important;
  font-size:23px!important;
  line-height:1!important;
}

.m-sheet-close:active{transform:scale(.94)!important}

/* ---------- toolbox becomes a true bottom sheet ---------- */

body.m-shell .pps-bottom-toolbar{
  position:fixed!important;
  z-index:72!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-height:min(82dvh,760px,calc(var(--m-vv-height,100dvh) - 8px))!important;
  padding:0 max(12px,env(safe-area-inset-right,0px)) calc(14px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow:hidden!important;
  border:1px solid rgba(142,229,198,.18)!important;
  border-bottom:0!important;
  border-radius:28px 28px 0 0!important;
  background:
    radial-gradient(circle at 15% -15%,rgba(73,218,163,.17),transparent 42%),
    linear-gradient(180deg,rgba(8,32,43,.985),rgba(4,18,28,.995))!important;
  box-shadow:0 -24px 70px rgba(0,0,0,.52)!important;
  backdrop-filter:blur(24px) saturate(1.15)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.15)!important;
  transform:translateY(calc(100% + 24px))!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:transform .32s var(--m-spring),opacity .2s ease!important;
}

body.m-shell .pps-bottom-toolbar[data-mobile-open="1"]{
  transform:translateY(0)!important;
  opacity:1!important;
  pointer-events:auto!important;
}

body.m-shell .pps-bottom-toolbar[data-mobile-open="1"] .pps-toolbox-workspace{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  max-height:calc(min(82dvh,760px,var(--m-vv-height,100dvh)) - 76px)!important;
}
body.m-shell .pps-toolbox-content{
  min-height:0!important;
}
body.m-shell .pps-toolbox-controls{
  grid-template-columns:minmax(0,1fr) auto!important;
}
body.m-shell .pps-toolbox-path{
  display:none!important;
}
body.m-shell .pps-toolbox-search{
  position:relative!important;
  min-height:44px!important;
  padding:0 12px!important;
  border-radius:14px!important;
}
body.m-shell .pps-toolbox-search > span{
  display:none!important;
}
body.m-shell .pps-toolbox-search input{
  min-height:42px!important;
  font-size:16px!important; /* avoids iOS focus zoom */
}
body.m-shell .pps-toolbox-count{
  align-self:center!important;
}

body.m-shell .pps-bottom-toolbar::before{
  content:"";
  flex:0 0 auto;
  align-self:center;
  width:44px;
  height:5px;
  margin-top:10px;
  border-radius:999px;
  background:rgba(185,216,207,.34);
}

body.m-shell .pps-bottom-toolbar__header{
  min-height:50px!important;
  align-items:center!important;
  padding:0 2px!important;
}

body.m-shell .pps-toolbox-identity{
  min-width:0!important;
  flex:1 1 auto!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  grid-template-rows:auto auto auto!important;
  column-gap:8px!important;
  align-items:center!important;
}
body.m-shell .pps-toolbox-eyebrow{
  grid-row:1/4!important;
}
body.m-shell .pps-toolbox-status{
  max-width:42vw!important;
}
body.m-shell .pps-toolbox-wallet{
  grid-column:2!important;
}

body.m-shell .pps-bottom-toolbar__title{
  grid-area:title;
  padding:0!important;
  font-size:19px!important;
  font-weight:850!important;
  letter-spacing:-.02em!important;
}

body.m-shell .pps-bottom-toolbar__header-right{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}

body.m-shell .pps-bottom-toolbar__header-right > .pps-bottom-toolbar__btn{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border:1px solid rgba(174,224,207,.17)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.045)!important;
  font-size:15px!important;
}
body.m-shell .pps-bottom-toolbar__header-right .pps-action-label,
body.m-shell .pps-bottom-toolbar__header-right .pps-collapse-label{
  display:none!important;
}
body.m-shell .pps-bottom-toolbar__header-right .pps-collapse-btn{
  order:99;
  font-size:0!important;
}
body.m-shell .pps-bottom-toolbar__header-right .pps-collapse-btn > *{
  display:none!important;
}
body.m-shell .pps-bottom-toolbar__header-right .pps-collapse-btn::after{
  content:"×";
  display:block;
  color:#effff8;
  font-size:23px;
  line-height:36px;
}

body.m-shell .pps-toolbox-search,
body.m-shell .pps-bottom-toolbar.collapsed .pps-toolbox-search{
  flex:0 0 auto!important;
  display:block!important;
  color:transparent!important;
}

body.m-shell .pps-toolbox-search > span{display:none!important}

body.m-shell .pps-toolbox-search input{
  width:100%!important;
  min-height:46px!important;
  padding:0 14px 0 42px!important;
  border:1px solid rgba(163,224,204,.16)!important;
  border-radius:15px!important;
  background:
    linear-gradient(90deg,transparent 0 40px,rgba(255,255,255,.045) 40px 41px,transparent 41px),
    rgba(1,13,20,.48)!important;
  color:#f3fff9!important;
  font-size:16px!important;
  box-shadow:none!important;
}

body.m-shell .pps-toolbox-search::before{
  content:"⌕";
  position:absolute;
  margin:8px 0 0 13px;
  color:#8fb7aa;
  font-size:24px;
  pointer-events:none;
}

body.m-shell .pps-bottom-toolbar__tabs,
body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__tabs,
body.m-shell .pps-bottom-toolbar__groups,
body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__groups{
  flex:0 0 auto!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  padding:0 0 3px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x proximity;
  scroll-padding-inline:8px;
  scrollbar-width:none;
  touch-action:pan-x;
}

body.m-shell .pps-bottom-toolbar__tabs::-webkit-scrollbar,
body.m-shell .pps-bottom-toolbar__groups::-webkit-scrollbar{display:none}

body.m-shell .pps-tab-btn,
body.m-shell .pps-group-btn{
  flex:0 0 auto!important;
  min-height:38px!important;
  padding:0 14px!important;
  border:1px solid rgba(161,221,201,.15)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.035)!important;
  color:#b9d1c8!important;
  font-size:12px!important;
  font-weight:750!important;
  scroll-snap-align:start;
}

body.m-shell .pps-group-btn{min-height:32px!important;padding:0 12px!important;font-size:11px!important}

body.m-shell .pps-tab-btn.active,
body.m-shell .pps-group-btn.active{
  border-color:rgba(99,237,172,.48)!important;
  background:rgba(49,195,140,.17)!important;
  color:#effff8!important;
  box-shadow:inset 0 0 0 1px rgba(99,237,172,.06)!important;
}

body.m-shell .pps-bottom-toolbar__tools,
body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__tools{
  min-height:112px!important;
  max-height:min(40dvh,360px)!important;
  padding:1px 1px 3px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y;
  scroll-padding-block:6px;
}

body.m-shell .pps-tool-btn,
body.m-shell .pps-bottom-toolbar.collapsed .pps-tool-btn{
  min-width:0!important;
  min-height:66px!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  gap:2px 9px!important;
  border:1px solid rgba(163,224,204,.14)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.035)!important;
  color:#f0fff8!important;
  text-align:left!important;
  box-shadow:none!important;
  transition:transform var(--m-fast),background var(--m-fast),border-color var(--m-fast)!important;
}

body.m-shell .pps-tool-btn:active{transform:scale(.97)!important}

body.m-shell .pps-tool-btn.active{
  border-color:rgba(99,237,172,.56)!important;
  background:linear-gradient(135deg,rgba(59,198,144,.23),rgba(39,102,102,.17))!important;
}

body.m-shell .pps-tool-icon{
  grid-column:1!important;
  grid-row:1/3!important;
  width:34px;
  height:34px;
  display:grid!important;
  place-items:center;
  border-radius:11px;
  background:rgba(255,255,255,.055);
  font-size:18px!important;
}

body.m-shell .pps-tool-copy{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
}

body.m-shell .pps-tool-label,
body.m-shell .pps-bottom-toolbar.collapsed .pps-tool-label{
  display:block!important;
  min-width:0;
  overflow:hidden;
  font-size:13px!important;
  font-weight:800!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.m-shell .pps-tool-description,
body.m-shell .pps-bottom-toolbar.collapsed .pps-tool-description{
  grid-column:2!important;
  grid-row:2!important;
  display:block!important;
  min-width:0;
  overflow:hidden;
  color:#9bbab0!important;
  font-size:10px!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.m-shell .pps-tool-empty{
  grid-column:1/-1;
  padding:28px 16px;
  color:var(--m-muted);
  text-align:center;
}

body.m-shell #mgame{bottom:0!important}

/* ---------- inspector ---------- */

#drawer.m-inspector-sheet{
  position:fixed!important;
  z-index:71!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-height:min(78dvh,700px,calc(var(--m-vv-height,100dvh) - 8px))!important;
  padding:0 max(12px,env(safe-area-inset-right,0px)) calc(14px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))!important;
  overflow:hidden!important;
  border:1px solid rgba(142,229,198,.18)!important;
  border-bottom:0!important;
  border-radius:28px 28px 0 0!important;
  background:
    radial-gradient(circle at 12% -10%,rgba(77,214,166,.16),transparent 42%),
    linear-gradient(180deg,rgba(8,32,43,.99),rgba(4,18,28,.995))!important;
  box-shadow:0 -24px 70px rgba(0,0,0,.52)!important;
  backdrop-filter:blur(24px)!important;
  -webkit-backdrop-filter:blur(24px)!important;
  transform:translateY(calc(100% + 24px))!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:transform .32s var(--m-spring),opacity .2s ease!important;
}

#drawer.m-inspector-sheet[data-open="1"],
#drawer.m-inspector-sheet.open{
  transform:translateY(0)!important;
  opacity:1!important;
  pointer-events:auto!important;
}

#drawer .grab{display:none!important}

#drawer #mInspector{
  max-height:calc(min(78dvh,700px) - 104px)!important;
  padding:4px 4px 16px!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  touch-action:pan-y;
  font-size:13px!important;
}

#drawer .m-ins-close{display:none!important}

#drawer .tips{
  padding:18px 8px 22px;
  color:var(--m-muted);
  text-align:center;
}

#drawer .tips-title{
  color:var(--m-text);
  font-weight:800;
}

#drawer .tips-body{margin:6px auto 0;max-width:280px;font-size:12px}

#mInspector .ins-tabs{
  position:sticky;
  z-index:2;
  top:0;
  padding:4px 0 8px;
  background:linear-gradient(180deg,rgba(8,32,43,.99) 72%,transparent);
}

#mInspector .ins-tab{
  min-height:36px!important;
  padding:0 12px!important;
  border-radius:12px!important;
}

#mInspector .ins-block{
  border-color:rgba(164,226,205,.12)!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.03)!important;
}

#mInspector .vital-row{
  grid-template-columns:68px minmax(0,1fr) 38px!important;
  margin:7px 0!important;
}

#mInspector .vital-bar{height:9px!important}

/* ---------- menu sheet ---------- */

body.m-shell .m-nav-sheet{
  position:fixed!important;
  z-index:72!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-height:min(88dvh,780px,calc(var(--m-vv-height,100dvh) - 8px))!important;
  padding:0 max(12px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))!important;
  display:block!important;
  overflow:auto!important;
  border:1px solid rgba(142,229,198,.18)!important;
  border-bottom:0!important;
  border-radius:28px 28px 0 0!important;
  background:
    radial-gradient(circle at 82% -15%,rgba(69,187,218,.16),transparent 42%),
    linear-gradient(180deg,rgba(8,32,43,.99),rgba(4,18,28,.995))!important;
  box-shadow:0 -24px 70px rgba(0,0,0,.52)!important;
  backdrop-filter:blur(24px)!important;
  -webkit-backdrop-filter:blur(24px)!important;
  transform:translateY(calc(100% + 24px))!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:transform .32s var(--m-spring),opacity .2s ease!important;
}

body.m-shell .m-nav-sheet[data-open="1"]{
  transform:translateY(0)!important;
  opacity:1!important;
  pointer-events:auto!important;
}

.m-menu-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  padding:2px 0 6px;
}

.m-menu-card{
  min-width:0;
  min-height:82px;
  padding:12px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  align-items:center;
  gap:9px;
  border:1px solid rgba(163,224,204,.14);
  border-radius:17px;
  background:rgba(255,255,255,.035);
  color:var(--m-text);
  text-align:left;
  transition:transform var(--m-fast),background var(--m-fast),border-color var(--m-fast);
}

.m-menu-card:active{
  transform:scale(.975);
  background:rgba(255,255,255,.065);
}

.m-menu-card--wide{grid-column:1/-1;min-height:70px}
.m-menu-card--accent{
  border-color:rgba(99,237,172,.36);
  background:linear-gradient(135deg,rgba(57,207,148,.19),rgba(255,255,255,.025));
}

.m-menu-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.055);
  color:#78e5ba;
  font-size:18px;
}

.m-menu-card > span:last-child{min-width:0;display:grid}
.m-menu-card strong{
  overflow:hidden;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.m-menu-card small{
  margin-top:3px;
  overflow:hidden;
  color:var(--m-muted);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ---------- time/calendar mobile sheet ---------- */

body.m-shell .pps-time-modal{
  z-index:12000!important;
  align-items:end!important;
  padding:0!important;
  background:rgba(0,8,12,.56)!important;
  backdrop-filter:blur(3px)!important;
}

body.m-shell .pps-time-dialog{
  width:100%!important;
  max-width:none!important;
  max-height:min(90dvh,800px)!important;
  margin:0!important;
  border:1px solid rgba(142,229,198,.18)!important;
  border-bottom:0!important;
  border-radius:28px 28px 0 0!important;
  background:
    radial-gradient(circle at 15% -12%,rgba(73,218,163,.17),transparent 42%),
    linear-gradient(180deg,rgba(8,32,43,.995),rgba(4,18,28,.998))!important;
  box-shadow:0 -24px 70px rgba(0,0,0,.52)!important;
  animation:mSheetUp .32s var(--m-spring);
}

body.m-shell .pps-time-header{
  padding:18px 16px 12px!important;
  border-bottom-color:rgba(142,229,198,.12)!important;
  background:rgba(8,32,43,.96)!important;
}

body.m-shell .pps-time-header h2{font-size:19px!important}
body.m-shell .pps-time-subtitle{font-size:11px!important}
body.m-shell .pps-time-close{
  width:40px!important;
  height:40px!important;
  border-radius:14px!important;
}

body.m-shell .pps-time-body{padding:14px 14px calc(22px + env(safe-area-inset-bottom,0px))!important}
body.m-shell .pps-time-now{border-radius:17px!important}
body.m-shell .pps-time-big{font-size:28px!important}
body.m-shell .pps-speed-button{min-height:42px!important;border-radius:13px!important}
body.m-shell .pps-forecast-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.m-shell .pps-forecast-card,
body.m-shell .pps-event{border-radius:14px!important}

@keyframes mSheetUp{
  from{transform:translateY(18px);opacity:.72}
  to{transform:none;opacity:1}
}

/* ---------- tap-to-wake ---------- */

.m-tap-overlay{
  position:fixed;
  z-index:13000;
  inset:0;
  padding:calc(26px + env(safe-area-inset-top,0px)) 20px calc(26px + env(safe-area-inset-bottom,0px));
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 25%,rgba(59,216,159,.24),transparent 36%),
    linear-gradient(160deg,rgba(1,16,24,.92),rgba(3,25,31,.98));
  opacity:1;
  transition:opacity .35s ease,visibility .35s;
}

.m-tap-overlay[data-hidden="1"]{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.m-tap-card{
  width:min(360px,100%);
  padding:28px 24px 22px;
  border:1px solid rgba(164,232,208,.20);
  border-radius:28px;
  background:linear-gradient(155deg,rgba(11,42,52,.90),rgba(3,18,27,.95));
  box-shadow:0 28px 90px rgba(0,0,0,.52);
  text-align:center;
  animation:mWakeCard .55s var(--m-spring);
}

@keyframes mWakeCard{
  from{opacity:0;transform:translateY(18px) scale(.97)}
  to{opacity:1;transform:none}
}

.m-tap-logo{
  position:relative;
  width:46px;
  height:62px;
  margin:0 auto 14px;
  display:block;
  filter:drop-shadow(0 0 18px rgba(65,239,159,.46));
}

.m-tap-logo i{
  position:absolute;
  left:11px;
  width:24px;
  height:24px;
  border-radius:5px;
  transform:rotate(45deg);
  background:linear-gradient(145deg,#c5ffdd,#40e99a 48%,#087453);
}
.m-tap-logo i:first-child{top:3px}
.m-tap-logo i:last-child{bottom:3px;opacity:.8}

.m-tap-kicker{
  margin:0 0 6px!important;
  color:#72d9b3!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
}

.m-tap-card h1{
  margin:0;
  font-size:30px;
  letter-spacing:-.04em;
}

.m-tap-card > p:not(.m-tap-kicker){
  margin:10px auto 20px;
  color:var(--m-muted);
  font-size:13px;
  line-height:1.5;
}

.m-primary-button{
  width:100%;
  min-height:50px;
  padding:0 17px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:0;
  border-radius:16px;
  background:linear-gradient(145deg,#81f2bb,#43d99c);
  color:#05291e;
  box-shadow:0 12px 28px rgba(43,207,143,.22),inset 0 1px rgba(255,255,255,.46);
  font-weight:850;
}

.m-primary-button:active{transform:scale(.98)}

/* ---------- inventory and toast cleanup ---------- */

body.m-shell #ppsItemHud_v1{
  z-index:26!important;
  left:12px!important;
  right:12px!important;
  bottom:calc(var(--m-dock-h) + env(safe-area-inset-bottom,0px) + 10px)!important;
  max-width:none!important;
  pointer-events:none;
  transition:opacity var(--m-fast),transform var(--m-fast);
}

body.m-shell #ppsItemHud_v1[data-empty="1"],
body.m-shell:has(#mActiveTool:not([hidden])) #ppsItemHud_v1{
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
}

body.m-shell #ppsItemHud_v1 .row{
  width:max-content;
  max-width:100%;
  margin:auto;
  padding:6px 8px!important;
  overflow-x:auto;
  flex-wrap:nowrap!important;
  border-color:rgba(164,230,207,.17)!important;
  border-radius:15px!important;
  background:rgba(3,17,25,.72)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  backdrop-filter:blur(12px)!important;
  -webkit-backdrop-filter:blur(12px)!important;
  pointer-events:auto;
}

body.m-shell #ppsItemHud_v1 .chip{
  flex:0 0 auto;
  padding:5px 7px!important;
  border-radius:10px!important;
}

.m-needs-toast{
  position:fixed;
  z-index:14000;
  left:50%;
  bottom:calc(var(--m-dock-h) + env(safe-area-inset-bottom,0px) + 18px);
  width:max-content;
  max-width:calc(100vw - 28px);
  padding:9px 13px;
  border:1px solid rgba(99,237,172,.32);
  border-radius:14px;
  background:rgba(4,20,29,.94);
  color:#effff8;
  box-shadow:0 16px 40px rgba(0,0,0,.4);
  font-size:12px;
  text-align:center;
  opacity:0;
  transform:translate(-50%,12px);
  pointer-events:none;
  transition:opacity var(--m-normal),transform var(--m-normal) var(--m-spring);
}

.m-needs-toast[data-show="1"]{
  opacity:1;
  transform:translate(-50%,0);
}

/* ---------- keyboard, landscape, accessibility ---------- */

body.m-shell[data-keyboard="1"] .m-dock{transform:translateY(calc(100% + 30px));opacity:0}
body.m-shell[data-keyboard="1"] .pps-bottom-toolbar{max-height:calc(var(--m-vv-height) - 8px)!important}

@media (max-width:420px){
  body.m-shell .pps-bottom-toolbar__tools,
  body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__tools{
    grid-template-columns:1fr!important;
  }
  body.m-shell .pps-bottom-toolbar__header{
    gap:8px!important;
  }
  body.m-shell .pps-toolbox-status{
    max-width:30vw!important;
  }
  body.m-shell .pps-bottom-toolbar__header-right{
    gap:4px!important;
  }
  body.m-shell .pps-bottom-toolbar__header-right > .pps-bottom-toolbar__btn{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
  }
}

@media (max-width:360px){
  :root{--m-dock-h:68px}
  .m-dock{left:6px;right:6px;bottom:calc(5px + env(safe-area-inset-bottom,0px));padding:5px}
  .m-dock-button{min-height:54px;font-size:9px}
  .brand-copy strong{font-size:13px}
  .m-weather-chip{display:none}
  body.m-shell .pps-bottom-toolbar__tools,
  body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__tools{grid-template-columns:1fr!important}
}

@media (orientation:landscape) and (max-height:560px){
  :root{--m-topbar-h:46px;--m-dock-h:58px}
  body.m-shell .m-topbar{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .m-brand-button{height:38px}
  .brand-copy small{display:none}
  .m-weather-chip,
  body.m-shell .pps-time-chip{height:32px;min-height:32px!important}
  .m-dock{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));height:58px;padding:5px}
  .m-dock-button{min-height:46px;flex-direction:row;gap:6px;font-size:10px}
  .m-dock-icon{font-size:16px}
  body.m-shell .pps-bottom-toolbar{max-height:calc(var(--m-vv-height,100dvh) - 6px)!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
  body.m-shell .pps-bottom-toolbar__tools,
  body.m-shell .pps-bottom-toolbar.collapsed .pps-bottom-toolbar__tools{max-height:35dvh!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.m-shell .m-nav-sheet{max-height:calc(var(--m-vv-height,100dvh) - 6px)!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
  .m-menu-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .m-menu-card--wide{grid-column:span 2}
  #drawer.m-inspector-sheet{max-height:calc(var(--m-vv-height,100dvh) - 6px)!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
}

@media (min-width:720px){
  body.m-shell .pps-bottom-toolbar,
  body.m-shell .m-nav-sheet,
  #drawer.m-inspector-sheet,
  body.m-shell .pps-time-dialog{
    left:50%!important;
    right:auto!important;
    width:min(680px,calc(100vw - 24px))!important;
    transform:translate(-50%,calc(100% + 24px))!important;
    border-radius:28px 28px 0 0!important;
  }
  body.m-shell .pps-bottom-toolbar[data-mobile-open="1"],
  body.m-shell .m-nav-sheet[data-open="1"],
  #drawer.m-inspector-sheet[data-open="1"],
  #drawer.m-inspector-sheet.open{
    transform:translate(-50%,0)!important;
  }
  .m-dock{left:50%;right:auto;width:440px;transform:translateX(-50%)}
  body.m-shell[data-panel="tools"] .m-dock,
  body.m-shell[data-panel="menu"] .m-dock,
  body.m-shell[data-panel="inspector"] .m-dock{transform:translate(-50%,calc(100% + 28px))}
}

@media (orientation:landscape) and (max-height:560px){
  body.m-shell .pps-bottom-toolbar::before{margin-top:5px!important}
  body.m-shell .pps-bottom-toolbar__header{min-height:44px!important}
  body.m-shell .pps-toolbox-search input{min-height:40px!important}
  body.m-shell .pps-tool-btn,
  body.m-shell .pps-bottom-toolbar.collapsed .pps-tool-btn{min-height:54px!important;padding:7px 9px!important}
  #drawer .m-sheet-heading,
  body.m-shell .m-nav-sheet .m-sheet-heading{min-height:48px}
}

body.m-shell :is(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid rgba(112,242,189,.92);
  outline-offset:2px;
}

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}

@media (prefers-contrast:more){
  :root{--m-line:rgba(230,255,246,.42);--m-line-strong:rgba(230,255,246,.8)}
  .m-dock,
  .m-topbar,
  body.m-shell .pps-bottom-toolbar,
  body.m-shell .m-nav-sheet,
  #drawer.m-inspector-sheet{border-color:var(--m-line-strong)!important}
}


/* Alpha.24.8.0 front-door/mobile parity finishing rules. */
body.m-shell .m-menu-card[hidden]{display:none!important}
@media (max-width:390px){
  body.m-shell .m-topbar{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
  .brand-copy small{max-width:40vw}
  .m-weather-chip{padding:0 8px!important}
}


/* Alpha 24.65 — mobile-first compositor budget.
   These are presentation-only overrides selected by m/app.js. */
body.m-shell[data-mobile-performance="smooth"] .m-topbar,
body.m-shell[data-mobile-performance="smooth"] .m-dock,
body.m-shell[data-mobile-performance="smooth"] .m-weather-chip,
body.m-shell[data-mobile-performance="smooth"] .pps-time-chip,
body.m-shell[data-mobile-performance="smooth"] .m-world-hint,
body.m-shell[data-mobile-performance="smooth"] #ppsItemHud_v1 .row{
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

body.m-shell[data-mobile-performance="smooth"] .pps-bottom-toolbar,
body.m-shell[data-mobile-performance="smooth"] .m-nav-sheet,
body.m-shell[data-mobile-performance="smooth"] #drawer.m-inspector-sheet{
  backdrop-filter:blur(12px)!important;
  -webkit-backdrop-filter:blur(12px)!important;
}

body.m-shell[data-mobile-performance="constrained"] .m-topbar,
body.m-shell[data-mobile-performance="constrained"] .m-dock,
body.m-shell[data-mobile-performance="constrained"] .m-weather-chip,
body.m-shell[data-mobile-performance="constrained"] .pps-time-chip,
body.m-shell[data-mobile-performance="constrained"] .m-world-hint,
body.m-shell[data-mobile-performance="constrained"] .m-active-tool,
body.m-shell[data-mobile-performance="constrained"] .m-sheet-scrim,
body.m-shell[data-mobile-performance="constrained"] .pps-bottom-toolbar,
body.m-shell[data-mobile-performance="constrained"] .m-nav-sheet,
body.m-shell[data-mobile-performance="constrained"] #drawer.m-inspector-sheet,
body.m-shell[data-mobile-performance="constrained"] .pps-time-modal,
body.m-shell[data-mobile-performance="constrained"] #ppsItemHud_v1 .row,
body.m-shell[data-mobile-performance="lite"] .m-topbar,
body.m-shell[data-mobile-performance="lite"] .m-dock,
body.m-shell[data-mobile-performance="lite"] .m-weather-chip,
body.m-shell[data-mobile-performance="lite"] .pps-time-chip,
body.m-shell[data-mobile-performance="lite"] .m-world-hint,
body.m-shell[data-mobile-performance="lite"] .m-active-tool,
body.m-shell[data-mobile-performance="lite"] .m-sheet-scrim,
body.m-shell[data-mobile-performance="lite"] .pps-bottom-toolbar,
body.m-shell[data-mobile-performance="lite"] .m-nav-sheet,
body.m-shell[data-mobile-performance="lite"] #drawer.m-inspector-sheet,
body.m-shell[data-mobile-performance="lite"] .pps-time-modal,
body.m-shell[data-mobile-performance="lite"] #ppsItemHud_v1 .row{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

body.m-shell[data-mobile-performance="constrained"] .m-active-tool,
body.m-shell[data-mobile-performance="constrained"] .m-tap-card,
body.m-shell[data-mobile-performance="lite"] .m-active-tool,
body.m-shell[data-mobile-performance="lite"] .m-tap-card{
  animation:none!important;
}

body.m-shell .pps-bottom-toolbar,
body.m-shell .m-nav-sheet,
body.m-shell #drawer.m-inspector-sheet{
  content-visibility:auto;
  contain-intrinsic-size:1px 520px;
}


/* ---------- Alpha 24.69 mobile compositor + safe-area budget ---------- */

/* Constrained phones spend their GPU budget on the forest canvas. Large,
   continuously composited backdrop blurs are decorative and can force costly
   offscreen passes while sheets animate or the world keeps moving underneath. */
body.m-shell[data-mobile-performance="lite"] .m-topbar,
body.m-shell[data-mobile-performance="lite"] .m-dock,
body.m-shell[data-mobile-performance="lite"] .m-sheet-scrim,
body.m-shell[data-mobile-performance="lite"] .m-active-tool,
body.m-shell[data-mobile-performance="lite"] .m-world-hint,
body.m-shell[data-mobile-performance="lite"] .pps-bottom-toolbar,
body.m-shell[data-mobile-performance="lite"] #drawer.m-inspector-sheet,
body.m-shell[data-mobile-performance="lite"] .m-nav-sheet,
body.m-shell[data-mobile-performance="constrained"] .m-sheet-scrim,
body.m-shell[data-mobile-performance="constrained"] .pps-bottom-toolbar,
body.m-shell[data-mobile-performance="constrained"] #drawer.m-inspector-sheet,
body.m-shell[data-mobile-performance="constrained"] .m-nav-sheet{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Keep thumb targets out of landscape notches and the home-indicator gutter.
   The main dock/topbar already consume these vars; sheets use matching inline
   paddings above so controls stay reachable on both sides. */
@supports (padding:max(0px,1px)){
  body.m-shell{
    --m-safe-left:max(0px,env(safe-area-inset-left,0px));
    --m-safe-right:max(0px,env(safe-area-inset-right,0px));
    --m-safe-bottom:max(0px,env(safe-area-inset-bottom,0px));
  }
  .m-world-hint{
    max-width:calc(100vw - var(--m-safe-left) - var(--m-safe-right) - 30px);
  }
}

/* Touch targets are deliberately >=44 CSS px even on compact landscape UI. */
.m-sheet-close,
.m-active-tool,
.m-dock-button,
.m-weather-chip,
.m-brand-button{
  touch-action:manipulation;
}
