:root {
  --bg: #121212;
  --surface: #1C1C1C;
  --line: #2A2A2A;
  --text: #F2F2F2;
  --muted: #8A8A8A;
  --accent: #3DDC84;
  --danger: #E5484D;
  --r-sm: 10px;
  --r-md: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-bottom));
}

.screen {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 16px;
}

.form { display: grid; gap: 20px; text-align: left; }

.field { display: grid; gap: 8px; }

.field-label {
  color: var(--muted);
  font-size: 14px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  transition: border-color 160ms var(--ease);
}
.input:focus-visible {
  outline: none;
  border-color: var(--muted);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}
.check input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.check-note {
  font-style: normal;
  color: #6E6E6E;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 15px 24px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 120ms var(--ease), opacity 120ms var(--ease), background-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; }

.btn-primary { background: var(--accent); color: #0C1F14; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost[aria-pressed="true"] { color: var(--muted); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }

.error {
  margin: 20px 0 0;
  color: var(--danger);
  font-size: 15px;
}

/* --- экран звонка --- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--muted);
  transition: background-color 200ms var(--ease);
}
.dot.live { background: var(--accent); }
.dot.waiting { animation: pulse 1.6s var(--ease) infinite; }

@keyframes pulse { 50% { opacity: 0.25; } }

.timer {
  margin: 16px 0 32px;
  font-size: 44px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.level {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}
.level-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 100ms linear;
}

.hint {
  margin: 16px 0 40px;
  min-height: 24px;
  color: var(--muted);
  font-size: 15px;
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
