/* ════════════════════════════════════════════════════════════════════════
   PHASE 155 — Tablet writer: keep controls usable when the soft keyboard is up
   On tablets (761–1024px, touch) the app had NO keyboard awareness at all —
   phase36's detection and phase137's editor-fit are both gated to phone only.
   So on an iPad, opening the keyboard in the writer drew the OSK straight over
   the bottom-fixed controls (the SCENE HEADING/element format bar #mode-indicator,
   the script-notes button #sn-toolbar-btn, the stats pill #editor-stats, the
   revision pill #cbs-rev-pill) and over the lower half of the left tag sidebar —
   the user could not tag, add notes, or reach any of them.

   phase155-tablet-writer-keyboard.js detects the keyboard via visualViewport on
   tablet and sets [data-tablet-keyboard] + --cbs-tablet-kb (the keyboard height)
   on <html>. These rules lift the fixed controls above the keyboard; the JS
   sizes the scrollable left sidebar so every tag button + the notes panel stays
   reachable above the keyboard.
   ════════════════════════════════════════════════════════════════════════ */

html[data-tablet-keyboard="true"] #mode-indicator,
html[data-tablet-keyboard="true"] #editor-stats,
html[data-tablet-keyboard="true"] #sn-toolbar-btn,
html[data-tablet-keyboard="true"] #cbs-rev-pill {
  transform: translateY(calc(-1 * var(--cbs-tablet-kb, 0px))) !important;
  transition: transform .18s ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  html[data-tablet-keyboard="true"] #mode-indicator,
  html[data-tablet-keyboard="true"] #editor-stats,
  html[data-tablet-keyboard="true"] #sn-toolbar-btn,
  html[data-tablet-keyboard="true"] #cbs-rev-pill { transition: none; }
}
