/* Mobile layer (loaded after moveo-system.css). Everything here is scoped to small screens
   or to elements that only exist/open on small screens, so desktop rendering is unchanged. */

/* ---------- mobile nav sheet (js/mnav.js) ---------- */
.mnx{display:none}
.mnx.on{display:flex;position:fixed;inset:0;z-index:1000;flex-direction:column;background:#fff;color:var(--ink,#17171A);
  height:100vh;height:100dvh;font-family:var(--sans,inherit);animation:mnxIn .18s ease-out}
@keyframes mnxIn{from{opacity:0;transform:translate3d(0,-8px,0)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.mnx.on{animation:none}}
.mnx-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 12px 20px;border-bottom:2px solid var(--ink,#17171A)}
.mnx-top .logo{display:inline-flex;align-items:center;height:44px}
.mnx-top .logo svg{height:30px;width:auto}
.mnx-x{width:48px;height:48px;border-radius:999px;border:2px solid var(--ink,#17171A);background:#fff;display:grid;place-items:center;color:inherit;cursor:pointer;padding:0}
.mnx-x svg{width:18px;height:18px}
.mnx-list{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 12px 16px}
.mnx-l,.mnx-h{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;padding:0 12px;border:0;background:none;
  font:700 19px/1.2 var(--display,var(--sans,inherit));color:inherit;text-decoration:none;text-align:start;cursor:pointer;border-bottom:1px solid rgba(23,23,26,.1);border-radius:0}
.mnx-h svg{width:16px;height:16px;flex:none;transition:transform .2s}
.mnx-g.on .mnx-h svg{transform:rotate(180deg)}
.mnx-p{display:grid;grid-template-rows:0fr;transition:grid-template-rows .22s ease}
.mnx-p>div{overflow:hidden;min-height:0}
.mnx-g.on .mnx-p{grid-template-rows:1fr}
.mnx-g.on .mnx-p>div{padding:6px 0 10px}
.mnx-i{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:48px;padding:8px 14px;margin:2px 0;border-radius:14px;color:inherit;text-decoration:none}
.mnx-i b{font:600 16px/1.25 var(--sans,inherit)}
.mnx-i small{font:400 13px/1.3 var(--sans,inherit);color:var(--mute,#5f5f6b)}
.mnx-i[aria-current="page"],.mnx-i:active{background:rgba(23,23,26,.06)}
.mnx-all b{text-decoration:underline;text-underline-offset:3px}
.mnx-l[aria-current="page"]{text-decoration:underline;text-underline-offset:4px}
.mnx-foot{flex:none;display:flex;flex-wrap:wrap;gap:10px;padding:14px 16px calc(14px + env(safe-area-inset-bottom));border-top:2px solid var(--ink,#17171A);background:#fff}
.mnx-lang{flex-basis:100%;display:flex;align-items:center;justify-content:center;min-height:44px;font:600 15px/1 var(--sans,inherit);color:inherit}
.mnx-btn{flex:1 1 0;display:flex;align-items:center;justify-content:center;min-height:52px;padding:0 16px;border-radius:999px;border:2px solid var(--ink,#17171A);
  font:700 16px/1 var(--sans,inherit);color:var(--ink,#17171A);text-decoration:none;background:#fff;cursor:pointer}
.mnx-cta{flex-grow:1.6;background:var(--g,#EBFF00);box-shadow:4px 4px 0 var(--ink,#17171A)}
html.mnx-lock,html.mnx-lock body{overflow:hidden}
html.mnx-lock body{position:fixed!important;left:0;right:0;width:100%}
@media (min-width:981px){.mnx.on{display:none}}

/* ---------- Moments: stable heights on mobile (URL bar show/hide must not re-layout the pinned year) ---------- */
@media (max-width:980px){
  .yr-stage{height:100vh;height:100svh}
  .mo-sky{bottom:auto;height:100vh;height:100lvh}
}
.mnx-row{display:flex;align-items:stretch;border-bottom:1px solid rgba(23,23,26,.1)}
.mnx-hl{flex:1;display:flex;align-items:center;min-height:56px;padding:0 12px;font:700 19px/1.2 var(--display,var(--sans,inherit));color:inherit;text-decoration:none}
.mnx-row .mnx-hc{flex:none;width:56px;min-height:56px;justify-content:center;padding:0;border-bottom:0;border-inline-start:1px solid rgba(23,23,26,.1)}

/* ---------- Slack frames: desktop design size, scaled uniformly (js/mframe.js) ---------- */
@media (max-width:980px){
  .slx{position:relative;width:100%;overflow:hidden}
  .slx.on>*{position:absolute;top:0;left:0;transform-origin:0 0;max-width:none!important;min-width:0!important;aspect-ratio:auto!important;margin:0!important}
}
@media (max-width:980px){
  /* inside a scaled frame, undo the phone-only reflow rules so the layout is the desktop one */
  .slx.on>.sl{border:2px solid var(--ink)!important;border-radius:var(--r20,20px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .slx.on .sl-body{height:auto;max-height:none}
  .slx.on .msg{padding:8px 16px;grid-template-columns:36px minmax(0,1fr)}
  .slx.on .msg .av{width:36px;height:36px}
  .slx.on .cat-grid .ci{width:calc((100% - 20px)/3)}
  .slx.on .pbar{grid-template-columns:16px 28px minmax(0,1.1fr) minmax(0,1fr) 46px}
  .slx.on .rb-r{grid-template-columns:16px 46px minmax(0,1fr) auto auto}
  .slx.on .rb-legs{display:flex}
  .slx.on .pbar img{width:28px;height:28px}
  .slx.on .cat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .slx.on .shop{grid-template-columns:repeat(2,minmax(0,1fr))}
  .slx.on .gr-ms{padding:0 14px}
  .gr-scr .slx.on .gr-ms{height:300px}
  .slx.on .gr-cp{margin:0 12px 12px}
  .slx.on .gr-bd{grid-template-columns:44px minmax(0,1fr)}
  .slx.on .gr-sd b{width:26px;height:26px;font-size:12px;border-radius:8px}
  .slx.on .gr-sd i{width:20px}
  .slx.on .gr-sd i:nth-of-type(2){width:14px}
  .slx.on .gr-board div{grid-template-columns:70px minmax(0,1fr) 44px}
  .slx.on .cf-2{grid-template-columns:1.3fr 1fr}
  .slx.on .cat-foot{padding:12px 14px}
  /* the step card: frame keeps its own border, so the card around it goes light */
  .pane .mcard:has(.slx.on){border:0;border-radius:0;background:none;overflow:visible}
  .pane .mcard .slx.on{overflow:visible}
  .pane .mcard .slx.on>.sl{box-shadow:none}
  .pane .mcard .mtext{border-bottom:0;padding:4px 2px 12px}
}

/* ---------- general phone polish ---------- */
@media (max-width:760px){
  main table:not(.ck-table table){display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media (max-width:430px){
  /* keep the floating pill header compact */
  #bar .rt .btn{padding:9px 14px!important;font-size:14px!important}
  #bar .logo svg{height:30px;width:auto}
  #bar .mnav{width:44px;height:44px}
}
@media (max-width:370px){
  #bar .rt .btn{padding:8px 12px!important;font-size:13px!important}
}
@media (max-width:430px){
  .rf-tabs{gap:6px}
  .rf-tabs button{flex:1 1 auto;padding-left:10px!important;padding-right:10px!important;font-size:13px!important;white-space:nowrap}
}
