:root {
  --paper: #f3f2ee;
  --card: #ffffff;
  --ink: #15161a;
  --muted: #80828a;
  --soft: #c9cad0;
  --line: rgba(21, 22, 26, 0.08);
  --accent: #2f6df6;
  --wrong: #e2564f;
  --pad: clamp(118px, min(58vw, 39vh), 270px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 16px;
  overflow: hidden;
}

.card {
  position: relative;
  width: min(384px, 88vw);
  padding: clamp(12px, 3.2vh, 26px) clamp(16px, 5vw, 28px) clamp(12px, 3vh, 24px);
  background: var(--card);
  border-radius: 26px;
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(21, 22, 26, 0.05),
    0 8px 18px -8px rgba(21, 22, 26, 0.12),
    0 30px 60px -24px rgba(21, 22, 26, 0.18);
  overflow: clip;
}
/* the thread of light on the top edge */
.card::before {
  content: "";
  position: absolute; left: 18%; right: 18%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  box-shadow: 0 0 6px rgba(47, 109, 246, 0.18);
}

.card__top { display: grid; place-items: center; }
.lock {
  width: clamp(22px, 4.4vh, 30px); height: clamp(22px, 4.4vh, 30px);
  fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  overflow: visible;
}
.lock__body { fill: var(--ink); stroke: none; }
.lock__hole { stroke: #fff; }

.views { display: grid; }
.view { grid-area: 1 / 1; display: grid; justify-items: center; align-content: center; min-width: 0; }
.view--hello { opacity: 0; visibility: hidden; }

.title {
  margin: clamp(6px, 1.6vh, 12px) 0 0;
  font-size: clamp(17px, min(5.2vw, 3.6vh), 22px);
  font-weight: 640; font-variation-settings: "wdth" 104;
  letter-spacing: -0.015em;
  text-align: center;
}
.hint {
  margin: 4px 0 0;
  height: 1.4em;
  font-size: clamp(11px, min(3.4vw, 2.2vh), 13.5px);
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
}
.hint__msg { display: inline-block; }
.hint__msg.is-wrong { color: var(--wrong); }

.pad {
  width: var(--pad); height: var(--pad);
  margin: clamp(6px, 2vh, 16px) 0 clamp(4px, 1.4vh, 12px);
  touch-action: none;
  cursor: crosshair;
}
.grid { width: 100%; height: 100%; display: block; overflow: visible; }
.trail {
  fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round;
  stroke-width: 7; opacity: 0.9;
}
.dot__ring { fill: none; stroke: var(--soft); stroke-width: 1.5; }
.dot__core { fill: var(--ink); }
.dot__shadow { fill: rgba(21, 22, 26, 0.32); filter: blur(7px); opacity: 0; }

.tries {
  margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: clamp(11px, min(3.2vw, 2vh), 12.5px);
  color: var(--muted);
}
.tries__slot {
  display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden;
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink);
}
.tries__col { display: flex; flex-direction: column; }

.avatar {
  width: clamp(52px, 11vh, 72px); height: clamp(52px, 11vh, 72px);
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #3a78ff, var(--accent));
  box-shadow: 0 10px 22px -10px rgba(47, 109, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
}
.avatar__text {
  font-size: clamp(17px, 3.6vh, 23px); font-weight: 600; font-variation-settings: "wdth" 104;
  letter-spacing: 0.02em; line-height: 1;
}
.hello {
  margin: clamp(10px, 2.4vh, 18px) 0 0;
  font-size: clamp(17px, min(5.2vw, 3.6vh), 22px);
  font-weight: 640; letter-spacing: -0.015em; text-align: center;
}
.meta { margin: 6px 0 0; font-size: clamp(11px, min(3.4vw, 2.2vh), 13.5px); color: var(--muted); text-align: center; }

.pointer {
  position: absolute; left: 0; top: 0;
  width: 20px; height: 20px;
  fill: var(--ink); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round;
  opacity: 0; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  z-index: 5;
}
