/* Mobile-first field support: large targets, safe areas and explicit media consent. */
.mobile-bottom-nav{display:none}
/* Keep the voice toolbar out of the question's horizontal space. */
#agent-form>.agent-input-layout{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:end;gap:10px}
#agent-form textarea{grid-column:1/-1;width:100%;min-height:92px;font-size:14px;line-height:1.7;padding:4px;box-sizing:border-box}
#agent-form .voice-input-tools{grid-column:1;grid-row:2;min-width:0;margin-top:0;gap:6px}
#agent-form .agent-send{grid-column:2;grid-row:2;width:44px;height:44px;min-height:44px}
#agent-form textarea:focus-visible{outline:2px solid #08745b!important;outline-offset:2px;border-radius:4px}
.review-notice{padding:14px 16px;margin-bottom:22px;background:#fff3d8;border:2px solid #9b690e;border-radius:9px;color:#593d08;overflow-wrap:anywhere}
.review-notice strong{display:block;font-size:15px;line-height:1.6}
.review-notice p{font-size:13px;line-height:1.8;margin:5px 0 0}
.field-safety{display:flex;align-items:center;gap:9px;margin-bottom:18px;padding:12px 16px;background:#fff4de;border:1px solid #dec38f;border-radius:8px;color:#77521c;font-size:12px;font-weight:600}
.field-safety svg{flex-shrink:0;width:18px}
.field-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:22px}
.field-shortcuts>a,.field-shortcuts>button{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;padding:20px;border:1px solid #adcbbd;background:#e4f2eb;border-radius:10px;min-height:130px;color:#21583e}
.field-shortcuts>:nth-child(2){color:#633d89;border-color:#c6b2dd;background:#f1eafa}
.field-shortcuts>:nth-child(3){color:#315f86;border-color:#b2cbe0;background:#eaf2fa}
.field-shortcuts strong{font-size:15px}.field-shortcuts small{font-size:11px}.field-shortcuts svg{width:24px;height:24px}
.field-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:20px;align-items:start}
.field-compose,.field-assist{padding:24px}
.field-compose>header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.field-compose h2,.field-assist h2{font-size:17px}
.field-compose>p,.field-assist>p{color:#47634e;font-size:12px;line-height:1.9;margin-bottom:19px}
.field-compose form{display:grid;gap:16px}
.field-compose textarea{line-height:1.9}
.field-draft-hint{font-size:11px;color:#596d59;margin:0}
.field-draft-actions{display:flex;gap:10px}
.field-save{min-height:46px;white-space:normal}
.field-assist>.app-icon{margin-bottom:15px}
.field-assist h2{line-height:1.9;margin-bottom:12px}
.field-assist ol{margin:0 0 20px;padding-left:22px;color:#4e6754;font-size:12px;line-height:2.3}
.field-assist>small{display:block;color:#5e6c59;line-height:1.9;font-size:11px;margin:16px 0}
.field-contacts{margin-top:26px}
.field-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.field-contact-grid article{display:flex;align-items:center;gap:10px;padding:15px;background:#fff;border:1px solid var(--line);border-radius:8px}
.field-contact-grid article>div{min-width:0;flex:1}
.field-contact-grid strong{display:block;font-size:12px;overflow-wrap:anywhere}
.field-contact-grid small{display:block;color:#596e5d;font-size:10px;margin-top:4px}
.voice-input-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.voice-input-tools small{font-size:10px;color:#526b58}
.voice-input-button{min-height:40px;white-space:nowrap}
.voice-input-button[aria-pressed=true]{background:#a52d38;color:#fff;border-color:#83252e}
.voice-live-status{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:10px 16px;border-radius:8px;background:#183d2d;color:#fff;z-index:110;font-size:12px;box-shadow:0 4px 20px #18372e30;margin:0}
.voice-live-status:empty{display:none}
#network-status:not([hidden]){position:fixed;top:0;left:0;right:0;z-index:120;padding:12px 18px;background:#8a4f06;color:#fff;font-weight:600;text-align:center;font-size:12px}
.capture-options{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 10px}
.capture-options input[hidden]{display:none}
#screen-advice-form{display:grid;gap:16px}
.screen-intro{font-size:13px;color:#3c5d47;line-height:1.9;margin:0}
#screen-image-preview{padding:12px;border:1px solid #b6c9bd;background:#f3f7f4;border-radius:8px}
#screen-image-preview[hidden]{display:none}
.screen-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.screen-preview-heading strong{font-size:12px}
#screen-preview-canvas{display:block;max-width:100%;max-height:320px;width:auto;height:auto;margin:auto;border:1px solid #9cb3a4;touch-action:none;cursor:crosshair;background:#fff}
.screen-context-toggle,.screen-send-consent{display:flex;align-items:flex-start;gap:9px;line-height:1.9;font-size:12px;color:#3c5945}
.screen-context-toggle input,.screen-send-consent input{margin-top:6px;flex-shrink:0;accent-color:var(--teal);width:17px;height:17px}
.screen-send-consent{border:1px solid #c3b1d7;background:#f4eefb;border-radius:8px;padding:13px;color:#62417e}
.screen-send-consent small{display:block;font-size:11px;line-height:1.9;margin-top:5px}
#screen-advice-result:not(:empty){padding:17px;border:1px solid #c1afd8;border-radius:8px;background:#faf7fe;font-size:12px;line-height:1.9}
#screen-advice-result h3{font-size:14px;color:#5e3b79}
.screen-ai-answer{white-space:pre-wrap;overflow-wrap:anywhere;color:#4d375b}
#screen-advice-result small{color:#695576}
@media(max-width:850px){
 .field-layout{grid-template-columns:1fr}
 .field-shortcuts{gap:10px}
 .field-shortcuts>a,.field-shortcuts>button{padding:16px}
}
@media(max-width:600px){
 body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 .mobile-bottom-nav{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;min-height:66px;padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));z-index:70;background:#fffffffa;border-top:1px solid #b1c8ba;box-shadow:0 -3px 15px #18372e0c;backdrop-filter:blur(12px)}
 .mobile-bottom-nav>a,.mobile-bottom-nav>button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border-radius:8px;padding:7px 2px;min-height:52px;color:#4b6554;font-size:10px;font-weight:600}
 .mobile-bottom-nav svg{width:21px;height:21px}
 .mobile-bottom-nav .active{color:#005f4d;background:#daeee2;font-weight:750}
 .mobile-bottom-nav a:focus-visible,.mobile-bottom-nav button:focus-visible{outline-offset:-3px}
 .soft-keyboard-open .mobile-bottom-nav,.soft-keyboard-open .agent-launcher{display:none}
 .soft-keyboard-open .voice-live-status{bottom:12px}
 .agent-launcher{bottom:calc(85px + env(safe-area-inset-bottom,0px));right:14px}
 .agent-panel{right:8px;width:calc(100vw - 16px);max-width:none;bottom:calc(80px + env(safe-area-inset-bottom,0px));height:min(680px,calc(100dvh - 96px - env(safe-area-inset-bottom,0px)));max-height:calc(100dvh - 96px - env(safe-area-inset-bottom,0px))}
 .agent-panel>header{padding:12px;gap:8px}
 .agent-panel .agent-messages{padding:12px;min-height:48px}
 .agent-panel>#agent-form{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}
 #agent-form textarea{min-height:112px;font-size:16px}
 #agent-form .agent-ai-toggle{font-size:11px;line-height:1.6;align-items:flex-start}
 #agent-form .agent-ai-toggle input{width:16px;height:16px;flex-shrink:0;margin-top:1px}
 #agent-form>.agent-input-layout{padding:10px}
 #agent-form .voice-input-tools small{display:none}
 #agent-form>small{font-size:10px}
 .soft-keyboard-open .agent-panel{bottom:calc(var(--agent-keyboard-offset,0px) + 8px);height:calc(var(--agent-viewport-height,100dvh) - 16px);max-height:calc(var(--agent-viewport-height,100dvh) - 16px)}
 .voice-live-status{bottom:calc(84px + env(safe-area-inset-bottom,0px));width:calc(100vw - 32px);text-align:center}
 .topbar{padding-top:env(safe-area-inset-top,0px);height:calc(62px + env(safe-area-inset-top,0px))}
 .topbar .breadcrumb{flex:1;min-width:0;max-width:none;gap:6px;overflow:hidden}
 .topbar .breadcrumb>.lucide,.topbar .breadcrumb>.breadcrumb-slash{display:none}
 .topbar #breadcrumb-title{min-width:0;flex:1}
 .topbar-actions{flex-shrink:0}
 .app-footer{padding-bottom:22px}
 .btn,.icon-button{min-height:44px}
 .icon-button{min-width:36px}
 .heading-actions{flex-wrap:wrap;justify-content:flex-end}
 .screen-advice-shortcut{display:none}
 .page-heading .heading-actions .btn{font-size:10px;min-height:42px}
 .field-safety{font-size:11px;line-height:1.8;padding:11px 12px}
 .field-shortcuts{gap:8px}
 .field-shortcuts>a,.field-shortcuts>button{padding:14px 10px;gap:8px;min-height:132px}
 .field-shortcuts strong{font-size:12px;line-height:1.8}
 .field-shortcuts small{font-size:10px;line-height:1.7}
 .field-compose,.field-assist{padding:18px}
 .field-compose h2,.field-assist h2{font-size:16px}
 .field-compose .form-field input,.field-compose .form-field select,.field-compose .form-field textarea{font-size:16px;min-height:48px}
 .field-compose>header>.badge{font-size:10px}
 .voice-input-button{font-size:12px;min-height:44px;padding-left:15px;padding-right:15px}
 .field-contact-grid{grid-template-columns:1fr}
 .field-contact-grid article{padding:13px 12px}
 .field-contact-grid article .btn{min-width:44px;padding:8px}
 .capture-options{gap:9px;margin-top:6px}
 .capture-options .btn{white-space:normal;flex:1;min-height:48px;font-size:12px}
 .modal-backdrop{padding:10px 10px calc(82px + env(safe-area-inset-bottom,0px));align-items:flex-end}
 .modal{max-height:calc(100dvh - 106px - env(safe-area-inset-bottom,0px));width:100%;border-radius:13px}
 .modal-content{padding:18px}
 .modal-header,.modal-footer{padding:13px 16px}
 .modal-footer{gap:8px;flex-wrap:wrap}
 .modal-footer>.btn{flex:1;white-space:normal;font-size:12px}
 .modal-content input,.modal-content textarea,.modal-content select{font-size:16px}
 .screen-intro{font-size:12px}
 #screen-preview-canvas{max-height:260px}
 .screen-preview-heading{flex-wrap:wrap}
 .screen-context-toggle,.screen-send-consent{font-size:12px}
 .screen-send-consent input,.screen-context-toggle input{width:20px;height:20px}
 .screen-send-consent small{font-size:11px}
 .form-field small{font-size:11px}
 .search-field input,.small-select{font-size:16px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
