/* The in-app camera (tmcam.js) and the in-app viewer (tmview.js): the
   overlays, their controls, the photo or clip in hand. One sheet for
   every surface (Oct 16); the page chips (.cam-open, .ib-photo) stay
   with their own sheets. */
.tmcam-veil { position: fixed; inset: 0; z-index: 400; background: #0d1518;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tmcam-video { max-width: 100%; max-height: 74vh; border-radius: 10px; }
.tmcam-msg { color: #f4f2ec; font-size: 0.84rem; padding: 10px 22px; text-align: center; }
.tmcam-bar { position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px;
  padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
/* the shutter keeps its circle however many controls share the bar (a
   real iPhone squeezed it to an ellipse, Oct 16) */
.tmcam-shot { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; border: 4px solid #f4f2ec;
  background: rgba(244, 242, 236, 0.25); cursor: pointer; padding: 0; }
.tmcam-quiet, .tmcam-use { border: 1px solid rgba(244, 242, 236, 0.55); background: none;
  color: #f4f2ec; border-radius: 9px; padding: 10px 18px; min-height: 40px;
  font-family: inherit; font-size: 0.86rem; cursor: pointer; }
.tmcam-use { background: #f4f2ec; color: #16262f; font-weight: 500; }
/* a short video, where the surface allows one (a moment, a note to the
   family): Record beside the shutter, Stop while it runs */
.tmcam-rec { border-color: rgba(240, 150, 130, 0.7); color: #f6c9be; flex-basis: 100%; max-width: 260px; order: 9; }
.tmcam-stop { background: #c4453c; border-color: #f4f2ec; }
/* the photo in hand, small, where a form wants it seen; pressing it
   opens the review: retake, delete, close (Leo, Oct 4) */
.tmcam-thumb { width: 64px; height: 64px; flex-shrink: 0; border: 1px solid rgba(22,38,47,0.14); border-radius: 12px; padding: 0; overflow: hidden; background: #fff; cursor: pointer; display: inline-flex; }
.tmcam-thumb img, .tmcam-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tmcam-del { border-color: rgba(240, 150, 130, 0.7) !important; color: #f6c9be !important; }
/* the viewer: a picture or clip large, inside the app, with Save where
   the page allows it and Close; the back gesture closes it too */
.tmview-veil { position: fixed; inset: 0; z-index: 500; background: #0d1518; display: flex; flex-direction: column; }
.tmview-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px 18px; color: #f4f2ec; font-size: 0.84rem; }
.tmview-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.tmview-x { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(244,242,236,0.45);
  background: none; color: #f4f2ec; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tmview-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.tmview-stage img, .tmview-stage video { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.tmview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom)); }
.tmview-bar a.tmcam-use, .tmview-bar button.tmcam-use { text-decoration: none; display: inline-flex; align-items: center; }
[data-tmview] { cursor: zoom-in; }
