:root {
  --bg: #1a1a2e;
  --bg-card: #24243e;
  --accent: #4f46e5;
  --accent-light: #818cf8;
  --text: #f1f1f7;
  --muted: #9a9ab0;
  --border: #34345a;
  --danger: #f87171;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: env(safe-area-inset-top, 20px) 16px 40px;
  min-height: 100vh;
}

.hidden { display: none !important; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 20px;
}

h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 4px; }
h3.section-heading { font-size: 1rem; color: var(--muted); margin: 28px 0 10px; font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.centered { text-align: center; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.card.centered {
  margin-top: 15vh;
}

.list { display: flex; flex-direction: column; gap: 10px; }

.list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  width: 100%;
  font: inherit;
}

.list-item:active { background: var(--border); }

a.list-item, a.list-item:visited {
  text-decoration: none;
  color: var(--text);
}

.list-item .item-main { flex: 1; min-width: 0; }
.list-item .item-title,
.list-item .item-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .item-title { font-weight: 600; }
.list-item .item-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.list-item .chevron { color: var(--muted); flex-shrink: 0; }

button, .link-btn {
  font: inherit;
  cursor: pointer;
}

button[type="submit"], .primary-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  width: 100%;
  margin-top: 12px;
}

button[type="submit"]:active { background: var(--accent-light); }

.back-btn, .link-btn, #signout-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  padding: 6px 0;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

audio { width: 100%; margin-top: 12px; }

.summary-text {
  line-height: 1.5;
  margin-top: 14px;
  white-space: pre-wrap;
}

.error {
  color: var(--danger);
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

.no-audio-badge {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  flex-shrink: 0;
}
