/* ==========================================================================
   VoiceHub — design tokens and base layout.
   Palette and spacing read off the mockups in Moc/. Mobile-first: designed at
   375px, the shell caps at 430px so it stays phone-shaped on desktop.
   ========================================================================== */

:root {
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shell-max: 430px;


  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Ambient glow behind the shell, echoing the mockups' lit backdrop. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% 0%, rgb(9 40 91 / 20%), transparent 70%),
    radial-gradient(40% 30% at 90% 20%, rgb(0 55 120 / 10%), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- app shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell-max);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
}


.page {
  padding: 20px 18px max(8px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: page-in 0.22s ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  width: min(92vw, 420px);
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  border-color: rgba(244, 63, 94, 0.5);
  color: #ffe4e9;
}

/* ------------------------------------------------------------------ states */
.empty-state {
  padding: 28px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-hover) 50%, var(--surface) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton--row {
  height: 92px;
}

.skeleton--tile {
  aspect-ratio: 16 / 9;
  box-sizing: content-box;
  padding-bottom: 56px;
}

@keyframes shimmer {
  to {
    background-position: -240% 0;
  }
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent-soft);
  letter-spacing: 0.06em;
}
