/* Monitor-only styles. Normal presentation, editor and phone form stay untouched. */
html.monitor-page {
  --monitor-corner: 96px;
  overscroll-behavior: none;
}
.monitor-page body { overscroll-behavior: none; }
.monitor-page .skip-link { display: none; }
.monitor-page .brand { cursor: default; }
.monitor-page #inviteLink { cursor: default; }
.monitor-page #inviteLink:hover { transform: none; }
.monitor-page img { -webkit-user-drag: none; }

/* These rules are active from the server-rendered HTML, not just after startup. */
.monitor-page:not([data-touch-state="unlocked"]),
.monitor-page:not([data-touch-state="unlocked"]) body {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.monitor-page:not([data-touch-state="unlocked"]) #app {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.monitor-page:not([data-touch-state="unlocked"]) #app * { cursor: none !important; }
.monitor-page .playback-bar { opacity: 1 !important; }
.monitor-page .mode-switch,
.monitor-page .transport,
.monitor-page #openReading { transition: opacity .2s ease; }
.monitor-page:not([data-touch-state="unlocked"]) .mode-switch,
.monitor-page:not([data-touch-state="unlocked"]) .transport,
.monitor-page:not([data-touch-state="unlocked"]) #openReading {
  opacity: 0 !important;
  visibility: hidden;
}
.monitor-page[data-touch-state="unlocked"] .mode-switch,
.monitor-page[data-touch-state="unlocked"] .transport,
.monitor-page[data-touch-state="unlocked"] #openReading {
  opacity: 1 !important;
  visibility: visible;
}
.monitor-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483638;
  background: transparent;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: none;
}
.monitor-page[data-touch-state="unlocked"] .monitor-shield { pointer-events: none; }
.monitor-unlock-zone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(var(--monitor-corner) + env(safe-area-inset-right, 0px));
  height: calc(var(--monitor-corner) + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border: 0;
  pointer-events: none;
}
.monitor-hold-feedback {
  position: fixed;
  z-index: 2147483639;
  right: calc((var(--monitor-corner) - 52px)/2 + env(safe-area-inset-right, 0px));
  bottom: calc((var(--monitor-corner) - 52px)/2 + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f7faf3e8;
  color: #073c54;
  box-shadow: 0 2px 18px #073c541a;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.monitor-hold-feedback[hidden], .monitor-status[hidden] { display: none !important; }
.monitor-hold-feedback svg { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.monitor-hold-track { stroke: #073c5417; stroke-width: 2; }
.monitor-hold-arc { stroke: #00958f; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.monitor-hold-feedback span { font: 700 15px "Manrope", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.monitor-status {
  position: fixed;
  z-index: 2147483640;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 28px);
  padding: 10px 12px 13px 14px;
  border: 1px solid #8fd9c443;
  border-radius: 16px;
  background: #073c54;
  color: #fff;
  box-shadow: 0 8px 34px #03283730;
  overflow: hidden;
  font-family: "Manrope", system-ui, sans-serif;
  animation: monitorStatusIn .2s ease-out;
}
.monitor-status-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #ffffff0f; color: #9ee0d2; }
.monitor-status-icon svg { width: 21px; height: 21px; }
.monitor-status-copy { display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.monitor-status-copy strong { font-size: 12px; font-weight: 700; }
.monitor-status-copy > span { font-size: 10px; color: #cee5e6; white-space: nowrap; }
.monitor-status-copy b { display: inline-block; min-width: 1.4em; text-align: right; font-variant-numeric: tabular-nums; }
.monitor-status button {
  appearance: none;
  border: 1px solid #ffffff35;
  background: #ffffff12;
  color: white;
  font: 600 11px "Manrope", system-ui, sans-serif;
  border-radius: 10px;
  min-height: 42px;
  padding: 0 12px;
  margin-left: 6px;
  cursor: pointer;
  touch-action: manipulation;
}
.monitor-status button:hover { background: #ffffff25; }
.monitor-status button:focus-visible { outline: 2px solid #9ee0d2; outline-offset: 2px; }
.monitor-time-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff17; }
.monitor-time-track > span { display: block; height: 100%; background: #78ceba; transform-origin: left; }
@keyframes monitorStatusIn { from { opacity: 0; margin-top: -6px; } to { opacity: 1; margin-top: 0; } }
@media (max-width: 480px) {
  .monitor-status { gap: 8px; padding-left: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); }
  .monitor-status-icon { display: none; }
  .monitor-status button { margin-left: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .monitor-status { animation: none; }
  .monitor-page .mode-switch, .monitor-page .transport, .monitor-page #openReading { transition: none; }
}
