.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: url("/icons/icon-green-gold-192.png") center/cover;
  box-shadow: var(--z-elevation-raised);
}

.contact { display: grid; gap: 4px; min-width: 0; flex: 1 1 9rem; }
/* The title is an <h1 class="z-brand-title">, not a <strong> -- this rule
   never matched anything, so the heading had no width limit and wrapped
   across three lines the moment the topbar's icon buttons left it a narrow
   column. */
.contact .z-brand-title { overflow: hidden; font-size: var(--z-font-lg); text-overflow: ellipsis; white-space: nowrap; }
.contact span { color: var(--z-muted); font-size: var(--z-font-sm); }
.contact i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--z-success);
}

/* Five icon buttons do not fit beside the title at 320 px: they move onto a
   second row rather than slide under it (WCAG-22.md Z09). */
.app-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.notification-button.subscribed { color: var(--z-success); border-color: var(--z-success); }

.compact-status {
  min-height: 17px;
  margin: 6px 4px 0;
  color: var(--z-success);
  font-size: var(--z-font-xs);
  text-align: right;
}
.compact-status.result-bad { color: var(--z-danger); }

@media (max-width: 620px) {
  .brand-icon { width: 44px; height: 44px; border-radius: 14px; }
}

.login-error { width: 100%; }

/* Chat is read at arm's length, more than most of what ZemoUI's shared
   --z-font-md/xs sizing was tuned for -- bumped here rather than in the
   shared framework, since that would also resize every dashboard table and
   info-app that has no complaint about its own text. */
.z-chat-bubble { font-size: 1rem; }
.z-chat-bubble-time { font-size: var(--z-font-sm); }

/* On a touch screen, holding a message opens the app's menu (app.js,
   bindLongPress) -- not iOS's own text selection and callout on top of it.
   Copying is in that menu. A picture keeps the phone's callout, which is
   where "Add to Photos" lives. */
@media (pointer: coarse) {
  .z-chat-bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .z-chat-photo { -webkit-touch-callout: default; }
}

/* The shell follows the part of the screen the keyboard leaves free
   (app.js, fitToVisibleArea). Without it iOS slid the whole app up under
   the keyboard when typing started. Fixed to the visible area's own top, so
   however iOS scrolls the page underneath, the header and the composer stay
   where the eye is. Before the script runs it is the full screen, as before. */
.z-app-shell {
  position: fixed;
  top: var(--app-top, 0);
  left: 0;
  right: 0;
  height: var(--app-height, 100dvh);
}

/* iOS zooms the page in on a field whose text is under 16px when it is
   tapped, and leaves it zoomed after the keyboard closes. ZemoUI's text is
   14px, and the composer inherited it: typing a message enlarged the whole
   app and it stayed that way. 16px on touch screens, for the composer and
   the login form alike; zoom itself stays allowed (rules on accessibility). */
@media (pointer: coarse) {
  input, textarea, select { font-size: max(16px, 1em); }
}

/* The picture viewer on a phone: the × was a small grey mark on black, and
   the buttons at the bottom sat on the home bar, where iOS takes the touch
   for its own gesture. A white, full-size ×, and the footer above the home
   bar. Tapping the picture closes it too (app.js, bindPhotoViewerClose). */
#photo-viewer .z-dialog-header [data-z-close-dialog] {
  min-width: 44px;
  min-height: 44px;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
}
#photo-viewer .z-dialog-footer {
  padding-bottom: max(var(--z-space-3), env(safe-area-inset-bottom));
}
#photo-viewer .z-media-stage { cursor: zoom-out; }
