/* Fifteen Minutes — calm, minimal, single-column. Mobile first. */

:root {
  --bg: #f4f1ea;
  --ink: #2b2722;
  --ink-soft: #6b645b;
  --line: #ded7ca;
  --accent: #b5654a;
  --accent-ink: #fdfbf7;
  --danger: #a23b32;
  --radius: 16px;
  --max: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  line-height: 1.5;
}

.app {
  width: 100%;
  max-width: var(--max);
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  animation: fade 0.5s ease both;
}

.hidden { display: none !important; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* typography */
h1 {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
h2 {
  font-size: 1.4rem;
  font-weight: 500;
}
.lede {
  color: var(--ink-soft);
  max-width: 34ch;
}
.fine {
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 34ch;
}

.mark {
  font-size: 2.6rem;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.mark.soft { color: var(--ink-soft); border-style: dashed; }

/* form */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
}
select,
input {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  appearance: none;
  width: 100%;
}
input::placeholder { color: #b6ad9f; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.fine.dim { opacity: 0.75; }
.fine a { color: inherit; }

/* buttons */
button {
  font: inherit;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-size: 1rem;
  transition: transform 0.08s ease, opacity 0.2s ease, background 0.2s ease;
  width: 100%;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: default; }

.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.danger {
  background: var(--danger);
  color: var(--accent-ink);
}
.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.ghost.small {
  border: none;
  font-size: 0.85rem;
  padding: 8px;
  width: auto;
}

/* waiting */
.pulse {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.9;
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.8); opacity: 0.35; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

/* call */
/* Ambient by default — the conversation, not the clock, is the point. */
.timer {
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: font-size 0.6s ease, color 0.6s ease, opacity 0.6s ease;
}
/* Last minute: step forward so the close never blindsides anyone. */
.timer.low {
  font-size: 2.6rem;
  font-family: inherit;
  color: var(--danger);
  opacity: 1;
  animation: ebb 2s ease-in-out infinite;
}
@keyframes ebb {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.prompt-label {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.prompt {
  font-size: 1.9rem;
  line-height: 1.35;
  max-width: 24ch;
  min-height: 2.2em;
}
.status {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}
.status.live::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4a8f5a;
  margin-right: 7px;
  vertical-align: middle;
}
.call-actions { width: 100%; margin-top: 8px; }

/* waiting */
.wait-time {
  font-family: system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--ink-soft);
  opacity: 0.8;
}

/* mic permission help */
.help {
  text-align: left;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  width: 100%;
}
.help strong { color: var(--danger); }
.help ol { margin: 8px 0 0 18px; }

/* post-call check-in */
.feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 4px 0;
  padding-bottom: 16px;
}
.chip-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}
.chip {
  width: auto;
  flex: 1;
  max-width: 120px;
  padding: 10px 0;
  font-size: 0.9rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}
.chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
#feedback-comment { font-size: 0.9rem; }

/* matched intro countdown */
.count {
  font-size: 4.2rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}

/* step/error feedback */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: min(92vw, 440px);
  background: var(--ink);
  color: var(--bg);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  z-index: 10;
}
.toast.error { background: var(--danger); color: #fff; }
