:root {
  --cbs-release-safe-bottom: env(safe-area-inset-bottom, 0px);
}

:where(#writer-app, #stripboard-app, #callsheet-app, #locations-app, #schedule-app, #storyboard-app, #corkboard-app, #wardrobe-app, #documentary-app, #project-hub, #pcc-app, #contacts-app, #props-app, #artdept-app, #auditions-app, #spatial-app, #adtreatment-app) {
  scroll-padding-bottom: calc(var(--cbs-scroll-clearance, 96px) + 24px);
}

#writer-app {
  scroll-padding-bottom: calc(var(--cbs-writer-scroll-clearance, 132px) + 24px);
}

html[data-ui-phone="True"],
body[data-ui-phone="True"] {
  -webkit-text-size-adjust: 100%;
}

html[data-ui-tier="phone"] :where(button, [type="button"], [role="button"], .btn, .icon-btn) {
  min-height: max(40px, var(--cbs-tap-target, 44px));
}

html[data-ui-tier="phone"] :where(.toolbar, [class*="toolbar"], [class*="actions"], [class*="action-row"]) {
  row-gap: 8px;
  column-gap: 8px;
}

html[data-ui-tier="phone"] :where(.chip, [class*="chip"], .tag, [class*="tag"], .pill, [class*="pill"], .badge, [class*="badge"]) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

html[data-ui-tier="phone"] :where(.empty, .empty-state, [class*="empty"]) {
  padding-bottom: calc(16px + var(--cbs-bottom-nav-height, 0px));
}

html[data-ui-tier="phone"] :where(#bottom-nav, #mobile-format-bar, #tag-float-bar, #mode-indicator, #sn-toolbar-btn) {
  -webkit-tap-highlight-color: transparent;
}


.view-container {
  min-height: 0;
}

.view-container > :where(#writer-app, #stripboard-app, #callsheet-app, #locations-app, #schedule-app, #storyboard-app, #corkboard-app, #wardrobe-app, #documentary-app, #project-hub, #pcc-app, #contacts-app, #props-app, #artdept-app, #auditions-app, #spatial-app, #adtreatment-app) {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#writer-app,
#writer-app .editor-column,
#writer-app .sidebar,
#writer-app .scene-list,
#writer-app .breakdown-tools,
#writer-app .editor-frame,
#pages-container {
  min-height: 0;
}
