/* 0.68.8 runtime regression hardening: mobile safe-area, capture modal, role-hidden controls */
[hidden]{display:none!important}

body.has-pwa-quick-dock .saas-content{padding-bottom:calc(132px + env(safe-area-inset-bottom,0px))!important}
body.has-pwa-quick-dock .saas-footer{margin-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}
body.book-capture-open{overflow:hidden!important}
body.book-capture-open .pwa-quick-dock{display:none!important}

.book-capture-dialog.book-capture-v2{
  width:min(640px,calc(100vw - 24px));
  max-width:640px;
  height:auto;
  max-height:calc(100dvh - 24px);
  margin:auto;
  padding:0!important;
  border:0!important;
  border-radius:20px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 24px 72px rgba(15,23,42,.32)!important;
}
.book-capture-dialog.book-capture-v2::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(4px)}
.book-capture-form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);min-height:0}
.book-capture-header{display:flex;gap:16px;align-items:flex-start;padding:24px 24px 12px;background:#fff;flex:0 0 auto}
.book-capture-header>div{min-width:0;flex:1}
.book-capture-header h2{margin:0 0 8px;font:800 27px/1.15 Inter,system-ui,sans-serif;color:#111827}
.book-capture-header p{margin:0;font:450 15px/1.55 Inter,system-ui,sans-serif;color:#667085}
.book-capture-x{flex:0 0 44px;width:44px;height:44px;border:1px solid #e4e7ec;border-radius:12px;background:#fff;color:#344054;font-size:26px;line-height:1;cursor:pointer}
.book-capture-scroll{overflow:auto;overscroll-behavior:contain;padding:8px 24px 20px;min-height:0;flex:1 1 auto}
.book-capture-field{display:grid;gap:8px;margin:14px 0;font:700 14px/1.3 Inter,system-ui,sans-serif;color:#1d2939}
.book-capture-field input,.book-capture-field textarea{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:12px;background:#fff;color:#101828;font:450 16px/1.5 Inter,system-ui,sans-serif;padding:13px 14px;outline:none}
.book-capture-field input{min-height:50px}
.book-capture-field textarea{min-height:150px;resize:vertical}
.book-capture-field input:focus,.book-capture-field textarea:focus{border-color:#6941c6;box-shadow:0 0 0 3px rgba(105,65,198,.14)}
.book-audio-controls{display:grid;gap:10px;margin-top:14px;padding:14px;border:1px solid #e4e7ec;border-radius:14px;background:#f9fafb}
.book-audio-controls button,.book-native-audio{min-height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:11px;background:#fff;color:#1d2939;font:700 14px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
.book-audio-controls button.recording{border-color:#d92d20;color:#b42318;background:#fef3f2}
.book-native-audio{position:relative;overflow:hidden}
.book-native-audio input{position:absolute;inset:0;opacity:0;cursor:pointer}
.book-or{text-align:center;color:#98a2b3;font:600 12px/1 Inter,system-ui,sans-serif}
.book-audio-controls audio{width:100%;margin-top:4px}
.book-capture-status{min-height:22px;margin:14px 0 0;color:#475467;font:500 13px/1.45 Inter,system-ui,sans-serif}
.book-capture-status.is-error{color:#b42318}
.book-capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #eaecf0;background:#fff;flex:0 0 auto;box-shadow:0 -8px 24px rgba(15,23,42,.06)}
.book-capture-actions button{min-height:50px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;color:#1d2939;font:750 15px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
.book-capture-actions button.primary{border-color:#6941c6;background:#6941c6;color:#fff}
.book-capture-actions button:disabled{opacity:.55;cursor:wait}

@media(max-width:899px){
  .pwa-quick-dock{bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important}
  .saas-sidebar.is-open{z-index:10020!important}
  .mobile-overlay.is-visible{z-index:10010!important;pointer-events:auto!important}
  .book-capture-dialog.book-capture-v2{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:18px!important}
  .book-capture-form{max-height:calc(100dvh - 16px)}
  .book-capture-header{padding:20px 18px 10px}
  .book-capture-header h2{font-size:24px}
  .book-capture-scroll{padding:6px 18px 16px}
  .book-capture-actions{padding-left:18px;padding-right:18px}
}
@media(max-width:430px){
  body.has-pwa-quick-dock .saas-content{padding-bottom:calc(142px + env(safe-area-inset-bottom,0px))!important}
  .book-capture-actions{grid-template-columns:1fr}
  .book-capture-actions button.primary{order:-1}
  .book-capture-field textarea{min-height:130px}
}
