:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --dim: #8e8e93;
  --panel: #1c1c1e;
  --green: #30d158;
  --red: #ff453a;
  --blue: #0a84ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.selection {
  background: var(--panel);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
}

.selection-text {
  margin: 0;
  font-size: clamp(40px, 13vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.call { text-align: center; }
.status { margin: 0; color: var(--dim); font-size: 20px; }
.digits { margin: 8px 0 0; font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.place { margin: 4px 0 0; color: var(--dim); font-size: 20px; min-height: 1.2em; }

.controls {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

button {
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  padding: 18px;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  color: var(--fg);
}
button:disabled { opacity: 0.35; }
button.primary { background: var(--blue); }
button.answer { background: var(--green); }
button.end { background: var(--red); }

.note { margin: 0; color: var(--dim); font-size: 15px; text-align: center; min-height: 1.2em; }

/* Ringing: the answer button pulses so it is found at a glance. */
body.ringing button.answer { animation: pulse 0.9s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.03); filter: brightness(1.25); } }
