/* v1035 Edge-to-Edge Luxury Scaffold
   The viewport is the application canvas. Rounded elevation belongs to
   meaningful components, never to an entire mobile screen. */
@media (max-width:720px){
  html[data-design-authority="v1024"] body:where(.surface-home,.surface-contacts,.surface-profile){
    width:100%;max-width:none;background:var(--surface-primary)!important;
  }
  html[data-design-authority="v1024"] body:where(.surface-home,.surface-contacts,.surface-profile) .shell{
    width:100%;max-width:none;margin:0!important;
    padding:0 0 var(--navigation-reserve)!important;
    background:var(--surface-primary)!important;
  }
  html[data-design-authority="v1024"] #app-screen{
    width:100%;max-width:none;margin:0!important;background:var(--surface-primary)!important;
  }

  /* Home owns the full canvas; internal cards retain restrained elevation. */
  html[data-design-authority="v1024"] body.surface-home #app-screen>.profile-hero{
    margin:0!important;padding:12px 16px!important;
    border-width:0 0 1px!important;border-radius:0!important;
    background:color-mix(in srgb,var(--surface-elevated) 96%,transparent)!important;
    box-shadow:0 5px 18px rgba(15,23,42,.055)!important;
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  }
  html[data-design-authority="v1024"] #home-view:not(.hidden){
    width:100%;max-width:none;margin:0!important;padding:12px 14px 18px!important;
    border:0!important;border-radius:0!important;background:var(--surface-primary)!important;
    box-shadow:none!important;backdrop-filter:none!important;
  }
  html[data-design-authority="v1024"] #home-view .home-command-deck{width:100%;max-width:none;margin:0!important}
  html[data-design-authority="v1024"] #home-view .home-welcome-panel{border-radius:20px!important;box-shadow:var(--shadow-1)!important}

  /* Directory header and list now meet the device edges as one screen. */
  html[data-design-authority="v1024"] #contacts-view[data-directory-layout="atelier"]{
    width:100%;max-width:none;margin:0!important;
    border:0!important;border-radius:0!important;background:var(--surface-primary)!important;
    box-shadow:none!important;backdrop-filter:none!important;
  }
  html[data-design-authority="v1024"] .contact-directory-command{
    padding:14px 16px 10px!important;border-radius:0!important;
    border-width:0 0 1px!important;box-shadow:0 4px 16px rgba(15,23,42,.045)!important;
  }
  html[data-design-authority="v1024"] .contact-directory-scroll{
    width:100%;padding:10px 12px max(82px,calc(env(safe-area-inset-bottom) + 74px))!important;
  }
  html[data-design-authority="v1024"] .contact-directory-scroll .contact{
    border-radius:15px!important;box-shadow:0 3px 12px rgba(15,23,42,.05)!important;
  }

  /* Profile is a screen, not a card inside a screen. */
  html[data-design-authority="v1024"] #profile-view:not(.hidden){
    width:100%;max-width:none;margin:0!important;padding:12px 14px 8px!important;
    border:0!important;border-radius:0!important;background:var(--surface-primary)!important;
    box-shadow:none!important;backdrop-filter:none!important;
  }
  html[data-design-authority="v1024"] #profile-view>.profile-panel{padding-inline:0!important}

  /* A full-width navigation dock visually anchors every primary screen. */
  html[data-design-authority="v1024"] .bottom-nav{
    left:0!important;right:0!important;bottom:0!important;transform:none!important;
    width:100%!important;max-width:none!important;margin:0!important;
    padding:6px 12px max(6px,env(safe-area-inset-bottom))!important;
    border-width:1px 0 0!important;border-radius:0!important;
    background:color-mix(in srgb,var(--surface-elevated) 96%,transparent)!important;
    box-shadow:0 -8px 28px rgba(15,23,42,.08)!important;
    backdrop-filter:blur(22px) saturate(1.08);-webkit-backdrop-filter:blur(22px) saturate(1.08);
  }
  html[data-design-authority="v1024"] .bottom-nav button{min-height:52px!important;border-radius:16px!important}
  html[data-design-authority="v1024"] .bottom-nav button.active{box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 4px 12px rgba(140,85,20,.1)!important}

  /* Chat history and composer also use the complete mobile canvas. */
  html[data-design-authority="v1024"] body.chat-open .shell{padding:0!important}
  html[data-design-authority="v1024"] body.chat-open .chat-panel{
    width:100%;height:var(--visual-height,100dvh);margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
  }
}

@media (min-width:721px){
  html[data-design-authority="v1024"] body:where(.surface-home,.surface-contacts,.surface-profile) .shell{
    max-width:1180px;
  }
}
