/* Phase 4B — shared responsive polish, no new theme tokens or animation instances. */
#fn4bHome{min-width:38px;min-height:38px;border-radius:11px;font-size:24px;line-height:1;touch-action:manipulation}
:where(.v6-headtools,.v6-rail,.v6-nav) button:focus-visible{outline:2px solid var(--fb-accent,var(--accent));outline-offset:2px}
:where(.modal,.record-modal,.fb74-native-panel,.fm-modal) :is(input,textarea,select){min-width:0;max-width:100%;box-sizing:border-box}
:where(.modal,.record-modal,.fb74-native-panel,.fm-modal) :is(button,summary){touch-action:manipulation}
:where(.modal,.record-modal,.fb74-native-panel,.fm-modal) :is(input,textarea,select,button):focus-visible{outline:2px solid var(--fb-accent,var(--accent));outline-offset:2px}
#noteForm :is(#body,#takeaways,#questions){resize:vertical;line-height:1.5}
#noteForm :is(#body,#richEditor){min-height:150px}
/* Only hide navigation while the note editor is open; regular screens retain navigation. */
@media(max-width:760px){
  body.fn4b-note-open .v6-nav,body.fn4b-note-open .v6-rail,
  body.fn4b-note-open .v6-footer{display:none!important}
  body.fn4b-note-open #modalbg{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)!important;align-items:stretch!important}
  body.fn4b-note-open #modalbg>.modal{width:100%!important;max-width:100%!important;max-height:100dvh!important;height:100%!important;overflow-y:auto!important;overscroll-behavior:contain;border-radius:0!important;padding:16px max(14px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important}
  body.fn4b-note-open #modalbg #noteForm{min-width:0}
  body.fn4b-note-open #noteForm :is(input,select,textarea,#richEditor){font-size:16px!important}
  body.fn4b-note-open #noteForm :is(#body,#richEditor){min-height:36dvh!important}
  body.fn4b-note-open #noteForm :is(#takeaways,#questions){min-height:105px}
  body.fn4b-focused-editor #noteForm :is(#body,#richEditor){min-height:52dvh!important}
  body.fn4b-note-open #modalbg .fields{min-width:0}
  body.fn4b-any-dialog :is(.fb74-native-layer,.fm-modal-backdrop){padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
}
@media(max-width:420px){#fn4bHome{min-width:36px;min-height:36px}.v6-headtools{gap:4px}}
@media(prefers-reduced-motion:reduce){body.fn4b-note-open :is(.modal,#richEditor){scroll-behavior:auto!important}}
