:root {
  --cream: #f4ebdf;
  --paper: #fbf6ef;
  --line: #e6d6c1;
  --ink: #3b2414;
  --muted: #8a6a4e;
  --ginger: #e2a35f;
  --rust: #a35e2a;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: grid;
  place-items: center;
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
}

main {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
}

header {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 900;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--rust);
}

dl { margin: 0; display: flex; gap: 22px; }
dl div { text-align: right; }
dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
dd {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -24px rgba(59, 36, 20, 0.45);
  overflow: hidden;
  touch-action: none;
}

canvas { display: block; width: 100%; height: 100%; }

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding: 24px;
  background: rgba(251, 246, 239, 0.86);
  backdrop-filter: blur(3px);
}
.overlay[hidden] { display: none; }

#portrait {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 62%;
  margin-bottom: 8px;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line);
}
#portrait:not([src]) { visibility: hidden; }

#headline {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.1;
}

.sub { margin: 0 0 12px; color: var(--muted); max-width: 30ch; }

button {
  font: inherit;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 11px 30px;
  cursor: pointer;
}
button:hover { background: var(--rust); }
button:focus-visible { outline: 3px solid var(--ginger); outline-offset: 3px; }

.hint { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
