:root {
  --bg: #fbf6ef;
  --card: #ffffff;
  --ink: #23201c;
  --muted: #6f675d;
  --red: #7a1f2b;
  --red-ink: #ffffff;
  --green: #1f5c3a;
  --line: #e8dfd2;
  --shadow: 0 2px 10px rgba(60, 30, 10, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 19px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 6px; text-align: center; }
.lead { text-align: center; color: var(--muted); margin: 0 0 22px; }
.loading { text-align: center; color: var(--muted); margin-top: 40vh; }

.names { display: grid; gap: 12px; }

.name {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 64px; padding: 14px 18px;
  font: inherit; font-size: 21px; font-weight: 600; text-align: left; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.name:active { transform: scale(.98); }
.name .tag { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.name .tag.mine { background: #e5f2ea; color: var(--green); }
.name .tag.done { background: #f1ece5; color: var(--muted); }
.name.is-done { color: var(--muted); }

.card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
  padding: 28px 20px; text-align: center; margin-top: 8vh;
}
.card p { margin: 0 0 14px; }
.big { font-size: 26px; font-weight: 700; line-height: 1.25; }
.target {
  font-size: 40px; font-weight: 800; line-height: 1.15; color: var(--red);
  margin: 10px 0 18px; word-break: break-word;
}
.hint { color: var(--muted); font-size: 17px; }
.info { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin: 0 0 16px; font-size: 17px; text-align: left; }
.info div + div { margin-top: 4px; }

.btn {
  display: block; width: 100%; min-height: 60px; margin-top: 12px; padding: 14px 18px;
  font: inherit; font-size: 20px; font-weight: 700;
  border: 0; border-radius: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); color: var(--red-ink); }
.btn.secondary { background: #efe8de; color: var(--ink); }

.spinner {
  width: 54px; height: 54px; margin: 6px auto 18px; border-radius: 50%;
  border: 6px solid var(--line); border-top-color: var(--red);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .name:active, .btn:active { transform: none; }
}
