/* The Dear Maria look: white paper, a faint dot grid, Playfair titles, Inter grey labels, ink buttons. */
:root {
  --paper: #ffffff;
  --ink: #111111;
  --quiet: #6e6e73;
  --faint: #aeaeb2;
  --hair: #e5e5ea;
  --line: #d1d1d6;
  --blush: #e889a0;
  --green: #34c759;
  --well: #f6f6f7;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.09) 1px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: Inter, -apple-system, system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#cam { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: 0; top: 0; }

main {
  height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 30px max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.top { width: 100%; display: flex; justify-content: flex-end; min-height: 44px; }
.grow { flex: 1; }
h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.3px;
  margin: 0;
}
.sub { font-size: 16px; color: var(--quiet); margin: 8px 0 0; line-height: 1.45; min-height: 23px; }
.note { font-size: 13px; color: var(--faint); margin: 14px 0 0; line-height: 1.45; }
.icon { width: 64px; height: 64px; margin-bottom: 26px; }

:where(button, a.button) {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.ink {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ink:active { transform: scale(0.98); }
.quiet { color: var(--quiet); font-size: 16px; font-weight: 400; min-height: 44px; padding: 0 8px; }
.ink + .quiet, .ink + .ink { margin-top: 10px; }

/* The oval: mesh and ticks are drawn on one canvas a little bigger than the oval. */
.window { position: relative; width: 294px; height: 354px; margin-top: 8px; }
.window .oval {
  position: absolute; left: 32px; top: 32px; width: 230px; height: 290px; border-radius: 50%;
  background: var(--well);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.08) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.window canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.window .check {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: var(--blush); display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.3s;
}
.window .check.on { opacity: 1; transform: scale(1); }
.window .wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 14px; }

/* Faces list */
.rows { width: 100%; text-align: left; margin-top: 24px; border-top: 1px solid var(--hair); }
.row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.row b { font-weight: 400; font-size: 17px; display: block; }
.row span { font-size: 13px; color: var(--quiet); }
.row .actions { display: flex; gap: 8px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 36px; font-size: 15px; font-weight: 400; }
.pill.red { color: #c0392b; }

.fade { animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
