/* Toura Passport STAGING 009D — Partner Studio Public Presence mobile reorganization.
   Mobile presentation/navigation only. Canonical Public Presence controllers remain authoritative. */
@media (max-width:760px){
  /* 009C intentionally forced Home into a grid while active. On module change that
     declaration must not keep Home mounted underneath the selected workspace. */
  body.tp009d-partner-presence #dashboard .partner-module:not(.active){display:none!important}
  body.tp009d-partner-presence #partnerModule-home:not(.active){display:none!important}

  body.tp009d-partner-presence #partnerModule-card.active{
    display:flex!important;flex-direction:column!important;gap:0!important;
    width:100%!important;min-width:0!important;padding:0!important;background:transparent!important;
    border:0!important;box-shadow:none!important;
  }

  /* Public Presence becomes a compact phone control center. */
  body.tp009d-partner-presence #partnerModule-card .public-presence-v38-head{
    order:1!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;
    gap:0!important;margin:0 0 10px!important;padding:14px!important;min-height:0!important;
    border:1px solid #dfe9e3!important;border-radius:16px!important;background:#fff!important;
    box-shadow:0 8px 24px rgba(19,55,39,.045)!important;
  }
  body.tp009d-partner-presence .public-presence-v38-heading .public-presence-kicker{
    font-size:7.5px!important;letter-spacing:.15em!important;color:#36805a!important;
  }
  body.tp009d-partner-presence .public-presence-v38-heading h2{
    margin:4px 0 2px!important;font-size:22px!important;line-height:1.04!important;letter-spacing:-.025em!important;color:#173044!important;
  }
  body.tp009d-partner-presence .tp009d-presence-purpose{
    display:block;margin:0 0 7px;color:#476158;font-size:10.5px;font-weight:800;line-height:1.35;
  }
  body.tp009d-partner-presence .public-presence-v38-heading p{
    margin:0!important;max-width:none!important;min-height:0!important;color:#7d8b84!important;font-size:9px!important;line-height:1.4!important;
  }

  body.tp009d-partner-presence .tp009d-presence-status{
    display:flex;align-items:center;gap:5px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1ee;
    color:#49675a;font-size:8px;font-weight:850;letter-spacing:.035em;
  }
  body.tp009d-partner-presence .tp009d-presence-status b{color:#1e6d49;font-size:8px;text-transform:uppercase;letter-spacing:.08em}
  body.tp009d-partner-presence .tp009d-status-dot{width:7px;height:7px;border-radius:50%;background:#2a9a61;box-shadow:0 0 0 3px #e8f5ed}
  body.tp009d-partner-presence .tp009d-presence-status.is-editing .tp009d-status-dot{background:#c69222;box-shadow:0 0 0 3px #fbf2d8}
  body.tp009d-partner-presence .tp009d-presence-status.is-editing b{color:#765818}

  body.tp009d-partner-presence #partnerModule-card .public-presence-v38-actions{
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%!important;max-width:none!important;margin-top:10px!important;
  }
  body.tp009d-partner-presence #partnerModule-card .public-presence-v38-actions .public-presence-v38-state{display:none!important}
  body.tp009d-partner-presence #partnerModule-card .public-presence-v38-actions>*{
    width:100%!important;min-width:0!important;min-height:42px!important;margin:0!important;border-radius:11px!important;
    font-size:8.5px!important;font-weight:900!important;
  }
  body.tp009d-partner-presence #publicPresenceEditStartBtn,
  body.tp009d-partner-presence #publicPresenceExitLockBtn,
  body.tp009d-partner-presence #publicPresenceSaveProxyBtn,
  body.tp009d-partner-presence #publicPresenceSubmitProxyBtn{
    grid-column:1/-1!important;min-height:46px!important;
  }
  body.tp009d-partner-presence #publicPresenceEditStartBtn{background:#ffdc69!important;border-color:#ffdc69!important;color:#173044!important;box-shadow:none!important}
  body.tp009d-partner-presence #publicPresencePreviewLiveBtn{background:#08233b!important;border-color:#08233b!important;color:#fff!important}
  body.tp009d-partner-presence #publicPresenceExplorerLink{background:#fff!important;border:1px solid #d8e3dd!important;color:#2d6c4c!important}

  /* Retire the desktop tab matrix on phone. 009D's rows proxy the exact same canonical controls. */
  body.tp009d-partner-presence #publicPresenceTabs{display:none!important}

  /* Overview/live preview is the first operational answer after the header. */
  body.tp009d-partner-presence #publicPresenceOverview{order:2!important;margin:0 0 10px!important}
  body.tp009d-partner-presence .public-presence-v38-preview-panel{
    width:100%!important;max-width:none!important;margin:0!important;padding:12px!important;border:1px solid #dfe9e3!important;
    border-radius:16px!important;background:#fff!important;box-shadow:0 8px 24px rgba(19,55,39,.04)!important;
  }
  body.tp009d-partner-presence .public-presence-preview-head{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:9px!important;
  }
  body.tp009d-partner-presence .public-presence-preview-head span{font-size:7px!important;letter-spacing:.14em!important;color:#75867d!important}
  body.tp009d-partner-presence .public-presence-preview-head b{font-size:9px!important;color:#1e6949!important}
  body.tp009d-partner-presence .public-presence-v38-preview-viewport{
    width:100%!important;height:480px!important;min-height:400px!important;border-radius:13px!important;
  }
  body.tp009d-partner-presence .public-presence-v38-watermark{display:none!important}

  /* Management rows replace the five desktop-like tabs. */
  body.tp009d-partner-presence .tp009d-presence-manage{
    order:3!important;margin:0 0 10px;padding:12px 12px 6px;border:1px solid #dfe9e3;border-radius:16px;background:#fff;
    box-shadow:0 8px 24px rgba(19,55,39,.035);
  }
  body.tp009d-partner-presence .tp009d-manage-head{padding:1px 2px 9px}
  body.tp009d-partner-presence .tp009d-manage-head span{display:block;color:#6e8177;font-size:7px;font-weight:900;letter-spacing:.15em}
  body.tp009d-partner-presence .tp009d-manage-head b{display:block;margin-top:3px;color:#173044;font-size:13px;line-height:1.2}
  body.tp009d-partner-presence .tp009d-manage-list{display:grid}
  body.tp009d-partner-presence .tp009d-manage-list button{
    position:relative;display:grid;grid-template-columns:minmax(0,1fr) 20px;align-items:center;gap:8px;width:100%;min-height:58px;
    padding:10px 4px;border:0;border-top:1px solid #edf1ee;background:transparent;color:#173044;text-align:left;box-shadow:none;
  }
  body.tp009d-partner-presence .tp009d-manage-list button:first-child{border-top:0}
  body.tp009d-partner-presence .tp009d-manage-list button>span{min-width:0;display:grid;gap:3px}
  body.tp009d-partner-presence .tp009d-manage-list button b{font-size:11.5px;line-height:1.15;color:#173044}
  body.tp009d-partner-presence .tp009d-manage-list button small{font-size:8px;line-height:1.25;color:#839087}
  body.tp009d-partner-presence .tp009d-manage-list button i{font-style:normal;font-size:22px;line-height:1;color:#6e897a;text-align:center}
  body.tp009d-partner-presence .tp009d-manage-list button.active b{color:#1d754f}
  body.tp009d-partner-presence .tp009d-manage-list button.active:before{
    content:"";position:absolute;left:-12px;top:13px;bottom:13px;width:3px;border-radius:0 3px 3px 0;background:#2c9162;
  }
  body.tp009d-partner-presence .tp009d-manage-list button.is-protected small{color:#7f8e86}

  /* Editing / publishing surfaces remain canonical, but are ordered below the mobile rows. */
  body.tp009d-partner-presence #publicPresenceEditorShell{order:4!important}
  body.tp009d-partner-presence #publicPresencePublishing{order:4!important;margin:0!important}
  body.tp009d-partner-presence #partnerCardModeLayout{order:5!important;margin:0!important}
  body.tp009d-partner-presence #partnerModule-card>.my-card-command-row{order:6!important}

  /* When Overview is hidden by the canonical controller, the rows rise directly under the header. */
  body.tp009d-partner-presence #publicPresenceOverview.hidden + .tp009d-presence-manage{margin-top:0!important}
}

@media (max-width:370px){
  body.tp009d-partner-presence #partnerModule-card .public-presence-v38-head{padding:12px!important}
  body.tp009d-partner-presence .public-presence-v38-heading h2{font-size:20px!important}
  body.tp009d-partner-presence .public-presence-v38-preview-viewport{height:440px!important;min-height:380px!important}
  body.tp009d-partner-presence .tp009d-presence-manage{padding-left:10px;padding-right:10px}
  body.tp009d-partner-presence .tp009d-manage-list button.active:before{left:-10px}
}
