/* SHIYATI V3 — PHONE-ONLY APP SHELL
   Visual styling only. No connector, route, auth, notification, theme, tablet or desktop behavior changes. */
@media (max-width: 599px) {
  html,body{max-width:100%;overflow-x:clip}
  body{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .app-shell{
    width:100%!important;min-height:100dvh!important;margin:0!important;
    padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  }
  .mobile-dock{display:none!important}
  .command-header{
    height:62px!important;min-height:62px!important;top:max(6px,env(safe-area-inset-top))!important;
    grid-template-columns:44px minmax(0,1fr) auto!important;gap:8px!important;padding:8px!important;
    border-radius:20px!important;margin:0!important;
  }
  .hud-icon{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border-radius:14px!important}
  .brand-lockup{gap:8px!important;min-width:0!important}
  .brand-core{width:42px!important;height:42px!important;flex:0 0 42px!important}
  .brand-copy{min-width:0!important}.brand-copy b{font-size:13px!important;letter-spacing:.18em!important;white-space:nowrap!important}.brand-copy small{display:none!important}
  .header-actions{gap:6px!important}.header-actions .hud-icon:nth-of-type(1){display:grid!important}
  .tomi-chip{height:44px!important;max-width:92px!important;padding:0 9px!important;font-size:10px!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .view{min-height:calc(100dvh - 76px)!important;padding:14px 0 22px!important;min-width:0!important}
  .page-shell,#view,.section,.crescent-stage{min-width:0!important;max-width:100%!important}

  /* Home becomes a compact native-app dashboard instead of a compressed desktop canvas. */
  .hero{
    grid-template-columns:1fr!important;min-height:0!important;gap:14px!important;
    padding:18px 14px 18px!important;border-radius:24px!important;overflow:hidden!important;
  }
  .hero:after{inset:10px!important;border-radius:18px!important}
  .hero-core-wrap{order:1!important;min-height:228px!important}
  .hero-core{width:min(68vw,258px)!important;max-width:258px!important}
  .hero-copy{order:2!important;max-width:100%!important;min-width:0!important;width:100%!important}
  .eyebrow{font-size:10px!important;letter-spacing:.17em!important;gap:7px!important;max-width:100%!important;white-space:normal!important}
  .eyebrow:before{width:28px!important;flex:0 0 28px!important}
  .hero h1{font-size:clamp(40px,13vw,54px)!important;line-height:.96!important;margin:12px 0 12px!important;letter-spacing:-.045em!important}
  .hero p{font-size:15px!important;line-height:1.62!important;max-width:100%!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .pillars{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:14px!important}
  .pillar{min-width:0!important;padding:10px 8px!important;border-radius:14px!important;text-align:center!important}
  .pillar b{font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .pillar small{font-size:9px!important;line-height:1.25!important;margin-top:3px!important;overflow-wrap:anywhere!important}

  /* Current Galaxy/TOMI/Time/Weather nodes stay the same; only their phone layout changes. */
  #view .hero .hero-copy .hero-actions.sh-v3-final-row{
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    align-items:stretch!important;gap:10px!important;width:100%!important;max-width:100%!important;
    margin-top:16px!important;overflow:visible!important;
  }
  #view .hero .hero-copy .hero-actions .sh-galaxy-home-entry{
    width:100%!important;max-width:none!important;min-width:0!important;aspect-ratio:1!important;
    border-radius:18px!important;align-self:stretch!important;
  }
  #view .hero .hero-copy .hero-actions .sh-v3-side-stack{
    width:100%!important;max-width:100%!important;min-width:0!important;gap:8px!important;align-self:stretch!important;
  }
  #view .hero .hero-copy .hero-actions .sh-v3-tomi-relocated{min-width:0!important;border-radius:16px!important}
  #view .hero .hero-copy .hero-actions .sh-v3-side-stack>.home-status.sh-v3-home-status-relocated{
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:4px!important;
    min-width:0!important;width:100%!important;padding:5px!important;border-radius:15px!important;
  }
  .status-time{min-width:0!important;padding:6px 7px!important}
  .status-time b{font-size:14px!important}.status-time small{font-size:8px!important;white-space:normal!important;line-height:1.2!important}
  .weather-chip{min-width:0!important;padding:6px!important;column-gap:5px!important;border-radius:11px!important;overflow:hidden!important}
  .weather-chip>span{font-size:18px!important}.weather-chip b{font-size:10px!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}.weather-chip small{font-size:8px!important;overflow:hidden!important;text-overflow:ellipsis!important}

  /* Rail keeps its behavior/geometry logic; the phone presentation is tightened. */
  .section{margin-top:20px!important}
  .section-head{display:block!important;margin:0 4px 12px!important;min-width:0!important}
  .section-head h2{font-size:28px!important;line-height:1.06!important}.section-head p{font-size:13px!important;line-height:1.5!important;margin-top:6px!important;overflow-wrap:anywhere!important}.section-head .signal-line{display:none!important}
  .crescent-stage{min-height:326px!important;padding:17px 0 42px!important;border-radius:24px!important}
  .crescent-stage:before{top:196px!important;height:390px!important}
  .crescent-track{height:266px!important}
  .future-card{width:min(226px,70vw)!important;height:252px!important;border-radius:23px!important;padding:15px!important}
  .future-card.active{--scale:1.045!important}.future-card.near{opacity:.66!important}
  .card-visual{inset:39px 12px 62px!important;border-radius:18px!important}.card-bottom h3{font-size:20px!important;line-height:1.05!important}.card-bottom small{font-size:11px!important}
  .rail-controls{bottom:9px!important;gap:5px!important;max-width:calc(100% - 18px)!important}
  .rail-arrow{width:38px!important;height:34px!important;border-radius:11px!important;flex:0 0 38px!important}.rail-dot{width:7px!important;height:7px!important}.rail-dot.on{width:22px!important}

  /* Native-app spacing and readable touch/form geometry across internal pages. */
  .page-head{grid-template-columns:1fr!important;gap:10px!important;margin:2px 2px 16px!important}
  .back-btn{min-width:0!important;min-height:44px!important;width:max-content!important;padding:10px 14px!important;border-radius:14px!important}
  .page-title h1{font-size:clamp(28px,9vw,38px)!important;line-height:1.05!important}.page-title p{font-size:13px!important;line-height:1.55!important}
  .panel,.module-card,.future-id,.completed-id,.signal-command-rail,.signal-feature-card,.signal-social-panel{border-radius:22px!important}
  .panel-grid,.panel-grid.two,.legal-grid,.form-grid.two,.team-grid,.money-grid,.profile-layout,.user-complete-layout{grid-template-columns:1fr!important}
  .form-grid input,label input,label textarea,.admin-input,select{font-size:16px!important;min-height:48px!important;border-radius:15px!important}
  label textarea{min-height:132px!important}
  .primary-btn,.secondary-btn,.gold-btn,.tiny-btn{min-height:44px!important}
  .completed-id,.future-id{padding:18px 16px!important}.id-primary-number{font-size:clamp(38px,13vw,56px)!important;line-height:1!important;overflow-wrap:anywhere!important}.id-detail-grid{grid-template-columns:1fr!important}
  .hud-dialog{width:calc(100vw - 12px)!important;max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)))!important;border-radius:24px!important}
  .hud-dialog form{padding:16px!important}.dialog-head{gap:12px!important;margin-bottom:14px!important}.dialog-head h2{font-size:24px!important}
  .drawer{left:6px!important;right:6px!important;top:max(6px,env(safe-area-inset-top))!important;bottom:max(6px,env(safe-area-inset-bottom))!important;width:auto!important;border-radius:24px!important;padding:16px!important}
  .drawer-grid button{min-height:48px!important;border-radius:14px!important}
  .toast{bottom:max(18px,env(safe-area-inset-bottom))!important;max-width:calc(100vw - 24px)!important;text-align:center!important}
  .sh-home-footer-frame-wrap{margin:22px auto 4px!important;padding:0 6px 0!important}.sh-home-footer-frame{height:76px!important}.sh-home-footer-label{font-size:10px!important;padding:0 58px!important}

  img,svg,canvas{max-width:100%}
}
