/* Speel-app: één scherm per stap, groot en duimvriendelijk. */
.app {
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), var(--space-3)) var(--space-3) max(env(safe-area-inset-bottom), var(--space-4));
  display: flex;
  flex-direction: column;
}

.top {
  display: flex; align-items: center; gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.top .label { flex: 1; color: var(--ink); }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; background: none; color: var(--ink); cursor: pointer;
}

.screen {
  flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--space-5);
  padding-top: var(--space-5);
  animation: rise .8s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.actions { gap: var(--space-3); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.lead { font-size: 20px; line-height: 1.4; max-width: 34ch; }

/* Zoeker */
.viewfinder {
  aspect-ratio: 1;
  margin: var(--space-2);
  background: var(--surface-raised);
}
.viewfinder video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s var(--ease);
}
.viewfinder.live video { opacity: 1; }
.vf-idle {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  transition: opacity .4s var(--ease);
}
.viewfinder.live .vf-idle { opacity: 0; }
.vf-line {
  position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: var(--accent);
  opacity: 0;
}
.viewfinder.live .vf-line { opacity: .9; animation: sweep 2.4s var(--ease) infinite alternate; }
@keyframes sweep { from { top: 12%; } to { top: 88%; } }

.manual { display: flex; flex-direction: column; gap: var(--space-2); }
.manual-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); }

/* Afspelen */
.now {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-3);
  text-align: center;
}
.now .index { color: var(--ink-muted); }

.rings {
  position: relative;
  width: min(72vw, 300px); aspect-ratio: 1;
  margin: var(--space-4) 0;
}
.rings span {
  position: absolute; inset: 0; margin: auto;
  border: 1.5px solid var(--paper); border-radius: 50%;
  animation: pulse 2.4s var(--ease) infinite;
}
.rings span:nth-child(1) { width: 100%; height: 100%; }
.rings span:nth-child(2) { width: 76%; height: 76%; animation-delay: .2s; }
.rings span:nth-child(3) { width: 52%; height: 52%; animation-delay: .4s; }
.rings span:nth-child(4) { width: 14%; height: 14%; background: var(--accent); border-color: var(--accent); animation-delay: .6s; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .55; } }
.paused .rings span { animation-play-state: paused; opacity: .4; }
.paused .rec-dot { background: var(--ink-muted); }
.rec-dot { animation: blink 1.2s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.paused .rec-dot { animation: none; }

.answer { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); animation: rise .8s var(--ease) both; }
.answer .label { color: var(--ink); font-size: 14px; }
.year { font: 700 clamp(88px, 28vw, 120px)/.9 var(--font-tech); letter-spacing: -.02em; }
.ans-title { font: 500 24px/1.15 var(--font-display); max-width: 20ch; }
.has-answer .rings { width: min(30vw, 120px); margin: 0; }

.toast {
  position: fixed; left: var(--space-3); right: var(--space-3); bottom: max(env(safe-area-inset-bottom), var(--space-3));
  max-width: 528px; margin: 0 auto;
  padding: var(--space-3);
  background: var(--paper); color: var(--night);
  font-size: 15px; line-height: 1.4;
  animation: rise .5s var(--ease) both;
  z-index: 10;
}

/* Instellingen */
.sheet {
  width: min(560px, 100%); max-width: 100%;
  margin: auto auto 0; padding: var(--space-4) var(--space-3) max(env(safe-area-inset-bottom), var(--space-4));
  border: 0; border-top: 5px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
}
.sheet::backdrop { background: rgb(14 14 14 / .7); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.field { display: flex; flex-direction: column; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.field legend { margin-bottom: var(--space-2); }
.choice { display: flex; gap: var(--space-2); align-items: center; padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.choice input { width: 20px; min-height: 20px; accent-color: var(--flame); }
