:root {
  --bg: #eef2f7;
  --ink: #142033;
  --muted: #6b778c;
  --line: #cfd7e3;
  --chip: #ffffff;
  --accent: #2f55e4;
  --accent-ink: #ffffff;
  --done: #dde3ec;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
[hidden] { display: none !important; }

/* Screen 1 */
#pick {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -0.01em; }
.lede { color: var(--muted); font-size: 17px; line-height: 1.5; margin: 0; }
.lede + .lede { margin-top: 10px; }

.bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 20px;
}
.chip {
  font: inherit;
  font-size: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.done { background: var(--done); border-color: transparent; color: var(--muted); cursor: default; }
.chip.done::after { content: " ✓"; }
.chip.done:hover { border-color: transparent; }

.add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.add input {
  font: inherit;
  font-size: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink);
  width: 220px;
  outline: none;
}
.add input:focus { border-color: var(--accent); border-style: solid; background: var(--chip); }
.hint { color: var(--muted); font-size: 14px; }

.actions { display: flex; align-items: center; gap: 20px; margin-top: 36px; flex-wrap: wrap; }
#send {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
#send:disabled { background: var(--done); color: var(--muted); cursor: default; }
.quiet { color: var(--accent); text-decoration: none; font-size: 16px; }
.quiet:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Screen 2 */
#cloud { position: fixed; inset: 0; overflow: hidden; }
.stage { position: absolute; inset: 0; }
.overlay {
  position: absolute;
  left: 24px;
  top: 20px;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  padding: 12px 16px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
.overlay .lede { font-size: 14px; margin-bottom: 6px; }
.overlay .quiet { font-size: 14px; }

.word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  will-change: transform;
  transition: font-size .6s ease, color .3s, opacity .3s;
}
.word sup { font-size: 0.38em; font-weight: 500; color: var(--muted); margin-left: 0.15em; letter-spacing: 0; }
.word.none { opacity: .38; font-weight: 500; }
.word.mine { color: var(--accent); }
