:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --primary: #2563eb;
  --primary-dark: #1e3a5f;
  --danger: #dc2626;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100dvh;
}

.app__header { text-align: center; margin-top: 12px; }
.app__header h1 { margin: 0; font-size: 1.8rem; }
.app__subtitle { margin: 6px 0 0; color: var(--muted); }

.recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.recorder__btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
  transition: transform 0.1s ease, background 0.2s ease;
}
.recorder__btn:active { transform: scale(0.97); }
.recorder__btn.is-recording { background: var(--danger); animation: pulse 1.4s infinite; }
.recorder__icon { font-size: 2.4rem; line-height: 1; }
.recorder__timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  color: var(--muted);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70% { box-shadow: 0 0 0 24px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.review {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review__player { width: 100%; }
.review__field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.review__field select,
.review__field input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--text);
  font-size: 1rem;
}
.review__actions { display: flex; gap: 12px; margin-top: 4px; }

.btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid #334155; }
.btn:disabled { opacity: 0.5; cursor: default; }

.status { text-align: center; min-height: 1.2em; color: var(--muted); }
.status--ok { color: #4ade80; }
.status--err { color: #f87171; }

/* Přihlašovací brána */
.gate {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  flex: 1;
  justify-content: center;
}
.gate__text { margin: 0; color: var(--muted); max-width: 28ch; }

/* Chip s přihlášeným uživatelem */
.userchip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}
.userchip__email { overflow-wrap: anywhere; }
.userchip__signout {
  background: transparent;
  border: 1px solid #334155;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
