/* Build 39 responsive containment. This is structural hardening, not manual phone acceptance. */
.piper-mobile-launcher,.piper-mobile-controls,.piper-mobile-dock{display:none}
.piper-mobile-accessible-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.build-health-disposition,.build-health-provenance{overflow-wrap:anywhere;font-size:12px;color:#d9bf85}
.build-health-owner-history{padding:12px;border:1px solid #6e592c;overflow-wrap:anywhere}
.build-health-owner-history article{border-top:1px solid #393d43;padding:8px 0}
@media(max-width:850px){
  #piperSideDock{display:none!important}
  #piperMobileDock{display:flex;gap:7px;align-items:center;position:fixed;z-index:145;right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}
  #piperMobileDock #piperMobileLauncher{position:static;right:auto;bottom:auto}
  .piper-mobile-mini{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;background:linear-gradient(145deg,#d9ad52,#95671c);color:white;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);font:700 9px/1 system-ui}
  .piper-mobile-mini span{display:grid;place-items:center;width:38px;height:38px;background:#17120a;clip-path:inherit}
  .piper-mobile-mini:focus-visible{background:white}
  .sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible;height:auto}
  .sidebar>.nav{width:100%;min-width:0;min-height:44px;padding:8px;font-size:12px;white-space:normal;align-items:center}
  .sidebar>.nav span{min-width:0;overflow-wrap:anywhere}
  .sidebar>.nav-label,.sidebar>.side-card{display:none}
  #piperMobileLauncher{display:grid;place-items:center;position:fixed;z-index:145;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:62px;height:62px;min-width:62px;min-height:62px;padding:0;border:0;color:#fff;background:linear-gradient(145deg,#d9ad52,#95671c);clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);font:700 13px/1.1 system-ui;cursor:pointer;filter:drop-shadow(0 2px 4px #0009)}
  #piperMobileLauncher .piper-mobile-face{display:grid;place-content:center;gap:4px;width:54px;height:54px;background:#17120a;clip-path:inherit}
  #piperMobileLauncher b{font-size:12px}
  .piper-mobile-wave{display:none;height:12px;align-items:center;justify-content:center;gap:3px}
  .piper-mobile-wave i{height:5px;width:3px;background:#f4d079;border-radius:2px}
  #piperMobileLauncher[data-piper-state="listening"] .piper-mobile-wave,#piperMobileLauncher[data-piper-state="speaking"] .piper-mobile-wave{display:flex}
  #piperMobileLauncher[data-piper-state="listening"] .piper-mobile-wave i,#piperMobileLauncher[data-piper-state="speaking"] .piper-mobile-wave i{animation:piper-mobile-bars .75s ease-in-out infinite alternate}
  .piper-mobile-wave i:nth-child(2){animation-delay:.15s!important}.piper-mobile-wave i:nth-child(3){animation-delay:.3s!important}.piper-mobile-wave i:nth-child(4){animation-delay:.45s!important}.piper-mobile-wave i:nth-child(5){animation-delay:.2s!important}
  .piper-mobile-spinner{display:none;justify-self:center;width:12px;height:12px;border:2px solid #5e471c;border-top-color:#f4d079;border-radius:50%}
  #piperMobileLauncher[data-piper-state="thinking"] .piper-mobile-spinner{display:block;animation:piper-mobile-spin 1s linear infinite}
  #piperMobileLauncher[data-piper-state="error"] .piper-mobile-face{background:#481e16}
  #piperMobileLauncher:focus-visible{background:#fff;outline:none}
  body.piper-chat-open{overflow:auto}
  body.piper-chat-open:before{display:none!important}
  #piperMobileControls{display:none!important}
  .piper-mobile-control-head{display:flex;align-items:center;justify-content:space-between;gap:6px;color:#f4d079}
  .piper-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}
  #piperMobileControls button{min-height:44px;font-size:12px;padding:6px;white-space:normal}
  #piperMobileControls p{font-size:12px;line-height:1.4;overflow-wrap:anywhere;margin:6px 0}
  #piperMobileControls small{font-size:11px;line-height:1.4;color:#bbb}
  main{padding-bottom:calc(86px + env(safe-area-inset-bottom))}
  #piperChatPanel{inset:auto 8px calc(82px + env(safe-area-inset-bottom))!important;top:auto!important;width:auto!important;max-width:calc(100vw - 16px);max-height:32dvh;box-sizing:border-box;overscroll-behavior:contain}
  #piperChatPanel .piper-chat-head{flex-wrap:wrap;gap:8px}
  #piperChatPanel .piper-chat-head h3{margin:0;font-size:18px}
  #piperChatPanel .piper-chat-head .eyebrow{display:none}
  #piperChatPanel[data-phone-panel="history"]{max-height:25dvh}
  #piperChatPanel[data-phone-panel="history"]>:not(.piper-chat-head):not(#piperHistoryPanel){display:none!important}
  #piperChatPanel[data-phone-panel="history"] #piperHistoryPanel{margin-top:8px}
  #piperChatPanel[data-phone-panel="history"] .piper-history-item{padding:6px;margin:4px 0}
  #piperChatPanel #newPiperConversation,#piperChatPanel #piperConversationHistory{display:none}
  #piperChatPanel button{min-height:44px;font-size:12px}
  #piperChatPanel textarea,#piperChatPanel input{font-size:16px;min-width:0;max-width:100%;box-sizing:border-box}
  #piperChatPanel .piper-live-room,#piperChatPanel .piper-voice-controls{display:none!important}
  #piperChatPanel .piper-live-transcript,#piperChatPanel .piper-messages{overflow-wrap:anywhere;min-width:0}
}
@keyframes piper-mobile-bars{from{height:4px}to{height:12px}}
@keyframes piper-mobile-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.piper-mobile-wave i,.piper-mobile-spinner{animation:none!important}.piper-mobile-wave i:nth-child(2n){height:10px}}
.atlas-recognized-text{white-space:pre-wrap;overflow-wrap:anywhere;padding:8px;border-left:2px solid #a37b2d;color:#f4d079;min-height:1.4em;font-size:13px}
#atlasVoiceStatus{display:block;padding:8px 0;line-height:1.4;font-size:13px}
#atlasVoiceStatus[data-voice-state="listening"],#atlasVoiceStatus[data-voice-state="thinking"]{color:#f4d079}
.topbar,.topbar .brand,.topbar .hive-brand-copy,.topbar .business-builder-title,.page-head,.panel-head,.workspace-context,main,.view{min-width:0}
.page-head h1,.page-head h2,.panel-head h1,.panel-head h2,.business-builder-title{max-width:100%;overflow-wrap:anywhere}
/* Keep the approved logo and HIVE together; descriptive copy follows their row. */
@media(max-width:850px){
  .topbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%;overflow:hidden}
  .topbar .brand{display:grid;grid-template-columns:86px minmax(0,1fr);gap:6px 12px;width:100%;max-width:100%;align-items:center}
  .topbar .hive-official-logo-wrap{grid-column:1;grid-row:1;width:86px;height:86px}
  .topbar .hive-brand-copy{display:contents}
  .topbar .brand .hive-brand-copy>strong{grid-column:2;grid-row:1;align-self:center;justify-self:start;font-size:clamp(32px,10vw,38px)}
  .topbar .brand .hive-brand-copy>.hive-expansion{grid-column:1/-1;grid-row:2}
  .topbar .brand .hive-brand-copy>.hive-tagline{grid-column:1/-1;grid-row:3}
  .topbar .brand .hive-brand-copy>.hive-is-live{grid-column:1/-1;grid-row:4}
  .topbar .brand .hive-brand-copy>span,.topbar .brand .hive-brand-copy>em{max-width:100%;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
  .topbar .business-builder-title{grid-column:1/-1;grid-row:5;width:auto;min-width:0;margin-left:0;padding:8px 0 0;border-left:0;border-top:1px solid #4e4329;white-space:normal}
  .topbar .top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"download refresh" "status status";width:100%;min-width:0}
  .topbar .top-actions>a{grid-area:download;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;white-space:normal;text-align:center}
  .topbar #refresh{grid-area:refresh;min-width:0;min-height:44px;white-space:normal}
  .topbar .status{grid-area:status;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:700px){
  .view{width:100%;max-width:100%;overflow-x:hidden}
  .page-head h1,.page-head h2,.panel-head h1,.panel-head h2{font-size:clamp(24px,9vw,38px);line-height:1.08}
}
.hive-self-build-roles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.55rem;margin:1rem 0}.hive-self-build-roles span{display:grid;gap:.25rem;border:1px solid rgba(212,175,55,.38);background:rgba(0,0,0,.32);padding:.65rem;border-radius:.45rem}.hive-self-build-roles small{color:#aaa}.hive-self-build .actions{display:flex;gap:.6rem;flex-wrap:wrap;margin:.8rem 0}.hive-self-build-check{display:grid;gap:.25rem;padding:.7rem;border-left:3px solid #b88a2b;background:rgba(0,0,0,.26)}.hive-self-build-check[data-state="PASS"]{border-left-color:#44b878}.hive-self-build-check[data-state="FAIL"]{border-left-color:#d45b5b}
