:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #15181c;
  --muted: #6b7280;
  --border: #d9dde3;
  --green: #1f9d55;
  --red: #d64545;
  --gray: #5b6470;
  --focus: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --card: #15191e;
    --text: #eef1f4;
    --muted: #8b95a1;
    --border: #2a3038;
    --gray: #3a424c;
    --focus: #60a5fa;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

h1 { margin: 0; font-size: 1.5rem; }
.muted { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }

input, select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  min-height: 44px;
}

input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.row { display: flex; gap: 8px; }

button.icon {
  flex: 0 0 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.call {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.call-status { margin: 0; font-size: 1.2rem; font-weight: 600; text-align: center; }
.timer { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }

.buttons { display: flex; gap: 28px; margin-top: 16px; }

.round {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  transition: transform .1s ease;
}
.round:active { transform: scale(.94); }
.round:disabled { opacity: .5; cursor: default; }
.round svg { width: 34px; height: 34px; fill: currentColor; }
.round.green { background: var(--green); }
.round.red { background: var(--red); }
.round.gray { background: var(--gray); }
.round.gray[aria-pressed="true"] { background: #b7791f; }

[hidden] { display: none !important; }
