:root {
  --page: #FAF7F2;
  --ink: #2D1E2F;
  --muted: #6B5A6D;
  --button: #2D1E2F;
  --button-ink: #FAF7F2;
  --line: rgba(45, 30, 47, 0.3);
  --disabled: #ECE6EE;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141216;
    --ink: #F1EBF5;
    --muted: #B9ADBD;
    --button: #E9DFF0;
    --button-ink: #2D1E2F;
    --line: rgba(241, 235, 245, 0.34);
    --disabled: #2B2630;
  }
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  /* Compose draws everything; the page itself never scrolls, zooms on double tap or highlights taps */
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* The ribbon on ivory while the app loads (and the place for a clear message if it can't) */
#veya-loading {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  box-sizing: border-box;
  background: var(--page);
  text-align: center;
  transition: opacity 320ms cubic-bezier(0.2, 0, 0, 1);
}
#veya-loading.done { opacity: 0; pointer-events: none; }
#veya-loading .mark { width: 72px; height: 72px; animation: breathe 2.4s ease-in-out infinite; }
#veya-loading .mark.dark { display: none; }
@media (prefers-color-scheme: dark) {
  #veya-loading .mark.light { display: none; }
  #veya-loading .mark.dark { display: block; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.06); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #veya-loading .mark { animation: none; }
}
#veya-loading.failed .mark { animation: none; }

/* the wordmark in the slot Android 12+'s splash uses (200 x 80, 60 px from the bottom), "formerly Veya" under it */
#veya-brand { position: absolute; left: 0; right: 0; bottom: 60px; height: 80px; color: var(--ink); }
#veya-brand .wordmark { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); display: block; }
#veya-brand p { position: absolute; left: 0; right: 0; top: 58px; margin: 0; font-size: 13px; line-height: 20px; color: var(--muted); }

#veya-message { max-width: 420px; }
#veya-message h1 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; }
#veya-message p { font-size: 16px; line-height: 1.5; margin: 0; color: var(--muted); }
#veya-reload {
  margin-top: 20px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--button);
  color: var(--button-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* The move from app.myveya.co (move.js): the old address's offer to move this browser's data, and the new one's
   /handoff page. The page itself can scroll here, for small screens and large text. */
#ruva-move {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  overflow-y: auto;
  background: var(--page);
  color: var(--ink);
  touch-action: auto;
}
#ruva-move .box {
  margin: auto;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 40px 16px calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}
#ruva-move .brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 32px; }
#ruva-move .mark { width: 56px; height: 56px; }
#ruva-move .mark.dark { display: none; }
@media (prefers-color-scheme: dark) {
  #ruva-move .mark.light { display: none; }
  #ruva-move .mark.dark { display: block; }
}
#ruva-move.busy .mark { animation: breathe 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  #ruva-move.busy .mark { animation: none; }
}
#ruva-move .wordmark { display: block; color: var(--ink); }
#ruva-move h1 { font-size: 22px; line-height: 1.35; font-weight: 600; margin: 0 0 10px; outline: none; }
#ruva-move .body { font-size: 16px; line-height: 1.5; margin: 0; color: var(--muted); }
#ruva-move .addr { color: var(--ink); font-weight: 600; white-space: nowrap; }
#ruva-move .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
#ruva-move .actions:empty, #ruva-move .links:empty { display: none; }
#ruva-move button { font: inherit; cursor: pointer; }
#ruva-move .primary, #ruva-move .second {
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
#ruva-move .primary { border: 0; background: var(--button); color: var(--button-ink); }
#ruva-move .primary .addr { color: inherit; }
#ruva-move .second { border: 1px solid var(--line); background: transparent; color: var(--ink); }
#ruva-move .primary:disabled { background: var(--disabled); color: var(--muted); cursor: default; }
#ruva-move .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 14px; }
#ruva-move .quiet {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#ruva-move button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#ruva-move .status { min-height: 21px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.noscript { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--page); padding: 24px; }
.noscript p { margin: 4px 0; font-size: 15px; }

/* the Compose canvas fills the window */
canvas { display: block; outline: none; }

/* Compose hosts its canvas in a shadow root on a div in the body; keyboard focus is drawn by the app itself */
body div:focus, body div:focus-visible { outline: none; }
