/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: #F4EFE6;
  color: #19150F;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}
button, input, select { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── Prototype banner ── */
#proto-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1B2A38;
  color: rgba(253,250,243,0.85);
  font-family: 'Source Serif 4', serif;
  font-size: 12px;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Push content below banner */
#root { padding-top: 37px; }

/* ── Design tokens ── */
:root {
  --bg:       #F4EFE6;
  --bgCard:   #FDFAF3;
  --bgDark:   #1B2A38;
  --ink:      #19150F;
  --inkMid:   #48403A;
  --inkLight: #8C7E74;
  --border:   rgba(25,21,15,.09);
  --borderMd: rgba(25,21,15,.17);
  --terra:    #C0500A;
  --sky:      #1A5C8C;
  --amber:    #D97706;
  --red:      #B91C1C;
  --green:    #2A6648;
  --sand:     #EAE0CB;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse   { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@keyframes scaleIn { from { opacity:0; transform:scale(.95); } to { opacity:1; transform:scale(1); } }
@keyframes wave    { 0%{transform:scaleY(.25)} 50%{transform:scaleY(1)} 100%{transform:scaleY(.25)} }
@keyframes spin    { to { transform: rotate(360deg); } }

.au { animation: fadeUp  .45s cubic-bezier(.22,1,.36,1) both; }
.af { animation: fadeIn  .3s ease both; }
.as { animation: scaleIn .3s cubic-bezier(.22,1,.36,1) both; }

/* Stagger helpers */
.d1 { animation-delay: .06s; }
.d2 { animation-delay: .12s; }
.d3 { animation-delay: .18s; }
.d4 { animation-delay: .24s; }
.d5 { animation-delay: .30s; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(25,21,15,.18); border-radius: 2px; }

/* ── Page container ── */
.page {
  min-height: calc(100vh - 37px);
  background: var(--bg);
}

/* ── Sticky header ── */
.header {
  position: sticky; top: 37px; z-index: 50;
  background: rgba(253,250,243,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
}

/* ── Card ── */
.card {
  background: var(--bgCard);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(253,250,243,.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  max-width: 520px; margin: 0 auto;
}
.bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 4px 20px;
}
.bottom-nav .nav-label { font-size: 10px; letter-spacing: .01em; }

/* ── Content area (above bottom nav) ── */
.content {
  padding: 18px 20px;
  padding-bottom: calc(80px + var(--safe-bottom));
  max-width: 520px; margin: 0 auto;
}

/* ── Disclaimer variants ── */
.disclaimer-full {
  background: #FFFBEB;
  border: 1px solid rgba(217,119,6,.22);
  border-left: 3px solid #D97706;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.disclaimer-compact {
  background: #FFFBEB;
  border: 1px solid rgba(217,119,6,.2);
  border-left: 3px solid #D97706;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 12px; color: #78350F; line-height: 1.55;
}
.disclaimer-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.disclaimer-title { font-size: 13px; font-weight: 600; color: #78350F; margin-bottom: 4px; }
.disclaimer-body  { font-size: 12px; color: #92400E; line-height: 1.65; }

/* ── Channel badge ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 500;
  padding: 3px 8px; border-radius: 10px;
  white-space: nowrap; letter-spacing: .02em;
}
.badge-soon     { background:#EFF6FF; color:#1A5C8C; border:1px solid rgba(26,92,140,.22); }
.badge-advanced { background:#F5F3FF; color:#6D28D9; border:1px solid rgba(109,40,217,.22); }
.badge-active   { background:#F0FDF4; color:#2A6648; border:1px solid rgba(42,102,72,.25); }
.badge-proto    { background:#FFFBEB; color:#D97706; border:1px solid rgba(217,119,6,.25); }

/* ── Section label ── */
.section-label {
  font-size: 11px; color: var(--inkLight);
  letter-spacing: .08em; margin-bottom: 9px;
  text-transform: uppercase;
}

/* ── Waveform ── */
.waveform { display: flex; align-items: center; gap: 2.5px; height: 28px; }
.waveform-bar { width: 3px; border-radius: 2px; transform-origin: center; }

/* ── Profile option card ── */
.profile-option {
  border-radius: var(--radius-md); overflow: hidden;
  transition: all .18s; cursor: pointer;
}
.profile-option-inner { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.profile-detail {
  padding: 11px 16px 14px;
  border-top: 1px solid rgba(192,80,10,.14);
  background: rgba(192,80,10,.04);
}

/* ── Category item ── */
.cat-item {
  padding: 14px 16px; border-radius: var(--radius-md);
  cursor: pointer; display: flex; align-items: center; gap: 14px;
  transition: all .18s;
}

/* ── Event card ── */
.event-card { overflow: hidden; }
.event-inner { display: flex; gap: 12px; align-items: flex-start; }
.event-icon  {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.event-detail {
  padding: 11px 18px 14px;
  border-top: 1px solid var(--border);
  background: var(--sand);
}

/* ── Next-action banner ── */
.next-action {
  background: #EFF6FF;
  border: 1px solid rgba(26,92,140,.22);
  border-left: 4px solid #1A5C8C;
  border-radius: var(--radius-md);
  padding: 13px 16px;
}

/* ── Utility ── */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }
.f-1   { flex: 1; }
.center { text-align: center; }
.w-full { width: 100%; }
.ovh    { overflow: hidden; }
