/* Continuum Automations mobile editor focus v8.
   Mobile-first density pass based on real-device review. Keeps the authoring controls readable while getting the user into the actual step sooner. */

@media (max-width:760px){
  body:has(.v3-editor-page) .v3-topbar{
    min-height:58px;
    padding:6px 12px;
    gap:8px;
  }

  body:has(.v3-editor-page) .v3-topbar .brand-mark{
    width:38px;
    height:38px;
    border-radius:11px;
  }

  body:has(.v3-editor-page) .v3-topbar .brand-mark::before{
    font-size:20px;
  }

  body:has(.v3-editor-page) .v3-brand .brand-copy{
    gap:0;
  }

  body:has(.v3-editor-page) .v3-brand .brand-copy strong{
    font-size:13px;
    line-height:1.05;
  }

  body:has(.v3-editor-page) .v3-brand .brand-copy small{
    display:none;
  }

  body:has(.v3-editor-page) .v3-top-actions{
    gap:6px;
    min-width:0;
  }

  body:has(.v3-editor-page) .v3-lab-pill{
    min-height:32px;
    padding:0 8px;
    gap:5px;
    max-width:84px;
    font-size:0;
    overflow:hidden;
  }

  body:has(.v3-editor-page) .v3-lab-pill::after{
    content:"LAB · OFF";
    font-size:7px;
    font-weight:900;
    letter-spacing:.08em;
    white-space:nowrap;
  }

  body:has(.v3-editor-page) .v3-theme{
    min-width:52px;
    min-height:34px;
    padding:0 8px;
    border-radius:10px;
    font-size:9px;
  }

  .v3-editor-page[data-operations-v7="ready"]{
    padding-bottom:72px;
  }

  /* A full sticky editor header is too expensive on a phone. The global bar remains available; the editor chrome scrolls away with the page. */
  .v3-editor-page[data-operations-v7="ready"] .v3-editor-head{
    position:static;
    top:auto;
    backdrop-filter:none;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-title-row{
    width:100%;
    grid-template-columns:44px minmax(0,1fr) 62px;
    gap:9px;
    padding:8px 12px 6px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-close,
  .v3-editor-page[data-operations-v7="ready"] .v3-save{
    min-height:44px;
    border-radius:11px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-title-button{
    gap:1px;
    padding:2px 0;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-title-button>span{
    font-size:7px;
    line-height:1.1;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-title-button>strong{
    font-size:16px;
    line-height:1.08;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-title-button>small{
    font-size:9px;
    line-height:1.15;
  }

  /* Keep all four truth/status values visible without spending two full rows of phone height. */
  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:3px;
    margin:3px 8px 5px;
    padding:3px;
    border-radius:9px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status>span{
    min-width:0;
    min-height:38px;
    display:grid;
    align-content:center;
    justify-content:stretch;
    gap:2px;
    padding:4px 5px;
    border-radius:7px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status small{
    min-width:0;
    font-size:5.5px;
    line-height:1;
    letter-spacing:.05em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status strong{
    min-width:0;
    font-size:7px;
    line-height:1.1;
    text-align:left;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-rail{
    gap:4px;
    padding:4px 8px 6px;
    scroll-padding-inline:8px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-rail button{
    min-width:88px;
    min-height:44px;
    gap:6px;
    padding:4px 6px;
    border-radius:10px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-rail button>b{
    width:26px;
    height:26px;
    border-radius:8px;
    font-size:8px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-rail small{
    font-size:5.5px;
    line-height:1;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-rail strong{
    font-size:9px;
    line-height:1.05;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-shell{
    padding-top:0;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-main{
    padding:12px 14px 24px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-step-context{
    display:none;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-section{
    gap:12px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-section>header{
    padding:0 0 10px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-section>header>span{
    display:block;
    margin:0 0 6px;
    font-size:9px;
    line-height:1;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-section>header h2{
    margin:0 0 6px;
    font-size:30px;
    line-height:1.02;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-stage-section>header p{
    font-size:12px;
    line-height:1.45;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-footer{
    padding:6px 10px calc(6px + env(safe-area-inset-bottom));
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-footer>div{
    width:100%;
    gap:8px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-footer button{
    min-height:48px;
    border-radius:12px;
  }
}

@media (max-width:390px){
  body:has(.v3-editor-page) .v3-topbar{
    padding-left:10px;
    padding-right:10px;
  }

  body:has(.v3-editor-page) .v3-topbar .brand-mark{
    width:36px;
    height:36px;
  }

  body:has(.v3-editor-page) .v3-brand .brand-copy strong{
    font-size:12px;
  }

  body:has(.v3-editor-page) .v3-lab-pill{
    max-width:72px;
    padding:0 6px;
  }

  body:has(.v3-editor-page) .v3-lab-pill::after{
    content:"LAB · OFF";
    font-size:6.5px;
  }

  body:has(.v3-editor-page) .v3-theme{
    min-width:48px;
    padding:0 7px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v3-editor-title-row{
    grid-template-columns:42px minmax(0,1fr) 58px;
    padding-left:10px;
    padding-right:10px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status{
    margin-left:6px;
    margin-right:6px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status small{
    font-size:5px;
  }

  .v3-editor-page[data-operations-v7="ready"] .v7-editor-status strong{
    font-size:6.5px;
  }
}
