/* Morning Fill-Up Show — v1 styles. Mobile-first, navy + gold. */

:root {
  --navy: #0b1b33;
  --navy-2: #0e2240;
  --card: #13294d;
  --card-2: #1a3463;
  --gold: #d4a017;
  --gold-2: #f2c230;
  --text: #f4f6fb;
  --muted: #9fb0cc;
  --line: rgba(212, 160, 23, 0.25);
  --radius: 16px;
  --tabbar-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(120% 60% at 50% -10%, #16305c 0%, var(--navy) 55%) fixed, var(--navy);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}

/* ---------- Header / wordmark ---------- */
.app-header {
  padding: 22px 16px 6px;
  text-align: center;
}
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wordmark-top {
  font-size: 11px; letter-spacing: 6px; color: var(--muted); font-weight: 600;
}
.wordmark-main {
  font-size: 34px; font-weight: 800; letter-spacing: 1px; line-height: 1.05;
}
.wordmark-main .gold, .gold { color: var(--gold-2); }
.wordmark-host { font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- Screens ---------- */
.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--navy-2) 100%);
  border: 1px solid rgba(212, 160, 23, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.card h2 { margin: 6px 0 8px; font-size: 21px; }
.eyebrow {
  margin: 0; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold-2); font-weight: 700;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }

.live-card { border-color: var(--gold); }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #a4161a; color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: 1.5px; padding: 6px 12px; border-radius: 999px; margin-bottom: 10px;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.ritual-card .quote { font-size: 17px; line-height: 1.55; font-style: italic; margin: 4px 0; }
.chip-card .big-line { font-size: 19px; font-weight: 700; line-height: 1.45; margin: 8px 0 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; border-radius: 12px;
  padding: 13px 20px; font-size: 16px; font-weight: 700; cursor: pointer;
  text-decoration: none; text-align: center;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1206; }
.btn-gold:active { transform: scale(0.98); }
.btn-big { display: block; width: 100%; font-size: 17px; }
.btn-outline {
  background: transparent; color: var(--gold-2);
  border: 1.5px solid var(--gold);
}

/* ---------- Check-in form ---------- */
.field-label { display: block; font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--text); }

.slider { width: 100%; appearance: none; -webkit-appearance: none; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 66%), #2a3f66 var(--fill, 66%)); outline: none; }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-2); border: 3px solid #0b1b33; box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold-2); border: 3px solid #0b1b33; cursor: pointer;
}

.streak-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.streak-num { font-size: 34px; font-weight: 800; margin: 0; }
.pill {
  font-size: 12px; font-weight: 700; color: #0b1b33; background: var(--gold-2);
  padding: 6px 12px; border-radius: 999px;
}
.hidden { display: none !important; }

.seg { display: flex; background: #0a1729; border-radius: 12px; padding: 4px; gap: 4px; }
.seg-btn {
  flex: 1; border: none; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 700; padding: 11px 6px; border-radius: 9px; cursor: pointer;
}
.seg-btn.on { background: var(--gold); color: #1a1206; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 1.5px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chips button.on { background: var(--gold); border-color: var(--gold); color: #1a1206; }

textarea, input[type="date"] {
  width: 100%; background: #0a1729; border: 1.5px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px; font-size: 15px; font-family: inherit;
}
textarea:focus, input[type="date"]:focus { outline: none; border-color: var(--gold); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.switch {
  flex: none; width: 54px; height: 31px; border-radius: 999px; border: none; cursor: pointer;
  background: #2a3f66; position: relative; transition: background .2s; padding: 0;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%;
  background: #fff; transition: left .2s;
}
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"] .knob { left: 26px; }

/* ---------- Episodes ---------- */
.episode {
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(180deg, var(--card) 0%, var(--navy-2) 100%);
  border: 1px solid rgba(212, 160, 23, 0.18); border-radius: var(--radius);
  padding: 12px; margin: 10px 14px; cursor: pointer;
}
.episode:active { transform: scale(0.99); }
.ep-thumb {
  flex: none; width: 76px; height: 76px; border-radius: 12px;
  background: linear-gradient(135deg, #1a3463, #0b1b33);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.ep-thumb svg { width: 30px; height: 30px; fill: var(--gold-2); }
.ep-title { margin: 0 0 3px; font-size: 15.5px; font-weight: 700; }
.ep-sub { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat {
  background: #0a1729; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center;
}
.stat-num { display: block; font-size: 30px; font-weight: 800; }
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: .5px; }

.week-dots { display: flex; gap: 8px; margin-top: 10px; }
.day-dot { flex: 1; text-align: center; }
.day-dot .dot {
  width: 100%; aspect-ratio: 1; max-width: 44px; margin: 0 auto; border-radius: 50%;
  background: #0a1729; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.day-dot.hit .dot { background: var(--gold); border-color: var(--gold); color: #1a1206; }
.day-dot.today .dot { border-color: var(--gold-2); border-style: dashed; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 18, 36, 0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; max-width: 520px; margin: 0 auto; z-index: 50;
}
.tabbar button {
  flex: 1; background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; font-family: inherit;
}
.tabbar button svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar button svg.stroke-icon { fill: none; stroke: currentColor; }
.tabbar button.active { color: var(--gold-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
  background: var(--gold-2); color: #1a1206; font-weight: 700; font-size: 14px;
  padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 99; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
