/* mobile-first shell — iOS-style home grid + bottom dock + fullscreen apps */

.c95-mobile-dock{display:none;position:fixed;left:0;right:0;bottom:0;height:64px;background:rgba(10,10,10,.92);border-top:1px solid var(--border);align-items:center;justify-content:space-around;z-index:9998;padding:0 12px;backdrop-filter:blur(20px)}
.c95-mobile-dock::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:var(--g);opacity:.7}
.c95-mobile-dock button{background:transparent;border:none;color:var(--white);font:600 11px var(--jb);text-transform:uppercase;letter-spacing:.06em;padding:8px;border-radius:10px;cursor:pointer;min-width:48px;min-height:48px;display:flex;flex-direction:column;align-items:center;gap:3px;transition:background .12s;-webkit-tap-highlight-color:transparent}
.c95-mobile-dock button:active{background:rgba(255,255,255,.08);transform:scale(.96)}
.c95-mobile-dock button .ic{font-size:18px;line-height:1}
.c95-mobile-dock button .lb{font-size:9px;color:var(--sub)}
.c95-mobile-dock button.home .ic{font-size:14px}

.c95-mobile-status{display:none;position:fixed;top:0;left:0;right:0;height:32px;background:rgba(10,10,10,.92);backdrop-filter:blur(20px);align-items:center;justify-content:space-between;padding:0 14px;z-index:9997;font-family:var(--jb);font-size:11px;color:var(--white);border-bottom:1px solid var(--border)}
.c95-mobile-status .lhs{display:flex;align-items:center;gap:6px}
.c95-mobile-status .lhs .av{width:18px;height:18px;border-radius:50%;background:var(--g);background-size:200% 100%;animation:gradPulse 8s ease-in-out infinite}
.c95-mobile-status .clk{color:var(--white);font-weight:600}
.c95-mobile-status .pln{color:var(--sub);text-transform:uppercase;letter-spacing:.08em;font-size:10px}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) {
  body.c95-mobile .c95-mobile-dock{display:flex}
  body.c95-mobile .c95-mobile-status{display:flex}
  body.c95-mobile.c95-with-banner .c95-mobile-status{top:38px}

  /* iOS-style home grid */
  body.c95-mobile .desktop{padding-top:32px;padding-bottom:64px}
  body.c95-mobile .desktop-icons{position:fixed;top:38px;left:14px;right:14px;bottom:74px;display:grid!important;grid-template-columns:repeat(4,1fr)!important;grid-auto-rows:min-content;gap:18px 8px;overflow:auto;align-content:start;flex-wrap:initial!important;flex-direction:initial!important}
  body.c95-mobile.c95-with-banner .desktop-icons{top:70px}
  body.c95-mobile .icon{width:auto!important;flex-direction:column!important;background:transparent!important;border:none!important;padding:0!important;gap:6px!important}
  body.c95-mobile .icon-glyph{width:56px!important;height:56px!important;font-size:18px!important;border-radius:14px!important;background:var(--card)!important;border:1px solid var(--border)!important;box-shadow:0 4px 14px rgba(0,0,0,.3)}
  body.c95-mobile .icon-label{font-size:11px!important;color:var(--white)!important;text-shadow:0 1px 2px #000}
  body.c95-mobile .icon:active .icon-glyph{transform:scale(.92);transition:transform .1s}

  /* hide desktop-only chrome */
  body.c95-mobile .taskbar{display:none}
  body.c95-mobile .widgets-layer{display:none}
  body.c95-mobile .start-menu{display:none}

  /* fullscreen windows */
  body.c95-mobile .win{position:fixed!important;left:0!important;top:32px!important;right:0!important;bottom:64px!important;width:100%!important;height:auto!important;border-radius:0!important;border-left:none!important;border-right:none!important;z-index:100!important}
  body.c95-mobile.c95-with-banner .win{top:70px!important}
  body.c95-mobile .win-titlebar{padding:10px 14px;height:auto;font-size:13px}
  body.c95-mobile .win-titlebar .win-glyph{width:24px;height:24px;font-size:13px}
  body.c95-mobile .win-controls .min,body.c95-mobile .win-controls .max{display:none}
  body.c95-mobile .win-controls .close{width:30px;height:30px;font-size:14px}
  body.c95-mobile .win-statusbar{display:none}
  body.c95-mobile .win-body{padding:0}

  /* taller form inputs across modals */
  body.c95-mobile .c95-mask input,body.c95-mobile .c95-mask button{padding:14px 12px!important;font-size:15px!important}

  /* RoadTrip mobile */
  body.c95-mobile .rt-root{grid-template-columns:1fr!important}
  body.c95-mobile .rt-side{display:flex;flex-direction:column;border-right:none;border-bottom:1px solid var(--border);height:auto}
  body.c95-mobile .rt-side .hd{padding:8px 12px}
  body.c95-mobile .rt-agents{flex-wrap:nowrap;overflow-x:auto;max-height:none;padding:6px 8px;scrollbar-width:none}
  body.c95-mobile .rt-agents::-webkit-scrollbar{display:none}
  body.c95-mobile .rt-agent{flex-shrink:0}
  body.c95-mobile .rt-tip{display:none}
  body.c95-mobile .rt-threads{display:none}
  body.c95-mobile .rt-head .rt-discuss,body.c95-mobile .rt-head #rtVoice{padding:6px 8px;font-size:10px}
  body.c95-mobile .rt-bar textarea{font-size:16px}

  /* Files mobile — bigger rows, hide secondary cols */
  body.c95-mobile .fx-row{grid-template-columns:18px 1fr 60px;gap:10px;padding:12px 14px}
  body.c95-mobile .fx-row .mt{display:none}
  body.c95-mobile .fx-bar{padding:10px 12px;flex-wrap:wrap}
  body.c95-mobile .fx-bar input{width:100%;order:99;flex-basis:100%}
  body.c95-mobile .fx-bar button{padding:8px 12px;font-size:11px}

  /* Notes mobile */
  body.c95-mobile .nt-root{grid-template-columns:1fr!important}
  body.c95-mobile .nt-side{display:none}
  body.c95-mobile.show-list .nt-side{display:flex!important}
  body.c95-mobile.show-list .nt-pane{display:none!important}

  /* Settings mobile */
  body.c95-mobile .set-root{grid-template-columns:1fr!important}
  body.c95-mobile .set-side{border-right:none;border-bottom:1px solid var(--border);display:flex;overflow-x:auto;flex-direction:row}
  body.c95-mobile .set-side button{flex-shrink:0;font-size:11px;padding:8px 12px}

  /* spotlight mobile */
  body.c95-mobile .c95-spot{padding-top:10vh}
  body.c95-mobile .c95-spot-card{width:calc(100vw - 24px)}

  /* start menu hidden, dock home button is the new entry */
  body.c95-mobile .c95-start{position:fixed!important;left:8px!important;right:8px!important;bottom:74px!important;width:auto!important}

  /* code editor mobile */
  body.c95-mobile .cd-root .cd-bar{flex-wrap:wrap}

  /* bookmarks/todos/calendar — bigger touch */
  body.c95-mobile .bm-bar,body.c95-mobile .td-bar{grid-template-columns:1fr!important;gap:6px}
  body.c95-mobile .cal-c{min-height:60px}
  body.c95-mobile .cal-h{font-size:9px;padding:4px}

  /* games — fit screen */
  body.c95-mobile .snk canvas{width:90vw;height:90vw;max-width:480px;max-height:480px}
  body.c95-mobile .sol .tableau{grid-template-columns:repeat(7,minmax(40px,1fr));gap:3px}
  body.c95-mobile .sol .card{width:100%;height:60px;font-size:10px;padding:2px}
  body.c95-mobile .sol .slot{width:42px;height:60px}

  /* whiteboard tools wrap */
  body.c95-mobile .wb-bar{flex-wrap:wrap;gap:4px}

  /* activity */
  body.c95-mobile .ac-grid{grid-template-columns:1fr!important}

  /* user chip in taskbar — n/a since taskbar hidden */
}

/* Even tighter for very small phones */
@media (max-width: 380px) {
  body.c95-mobile .desktop-icons{grid-template-columns:repeat(3,1fr)!important;gap:14px 6px}
  body.c95-mobile .icon-glyph{width:50px!important;height:50px!important}
}

/* Override BR95's old mobile rule that was flex-wrap pills */
@media (max-width: 600px) {
  body.c95-mobile .desktop-icons{display:grid!important}
  body.c95-mobile .icon{width:auto!important}
  body.c95-mobile .icon-glyph{width:56px!important;height:56px!important;font-size:18px!important}
  body.c95-mobile .icon-label{font-size:11px!important}
}
