/* Sautly Faith demo — warm sunrise identity */
:root {
  --cream: #fff6ea;
  --sand: #fde9c2;
  --sand-deep: #f3d9a4;
  --clay: #b8441c;
  --clay-dark: #8f3214;
  --clay-soft: #fbe1d6;
  --gold: #f2b33d;
  --gold-soft: #fce6b8;
  --ink: #2b1d16;
  --muted: #6e5b4f;
  --line: #eadcc8;
  --indigo: #232454;
  --indigo-2: #2c2e5e;
  --indigo-soft: #c9c8e6;
  --green: #2e7d4f;
  --green-dark: #1f5c39;
  --green-soft: #e3f2e8;
  --white: #ffffff;
  --radius: 22px;
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #e9dcc8;
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
svg { display: block; }

/* ---------- stage + phone frame ---------- */
.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 32px 16px;
}
.side { max-width: 300px; }
.side h1 { font: 800 40px/1 var(--display); margin: 0 0 12px; color: var(--clay); }
.side p { font-size: 16px; line-height: 1.5; margin: 0 0 12px; }
.side ul { margin: 0; padding-left: 18px; line-height: 1.6; color: var(--muted); }
.side button {
  border: 0; border-radius: 14px; background: var(--white); padding: 4px 10px; margin: 2px 2px 0 0;
  font-weight: 800; font-size: 13px; color: var(--clay-dark);
}
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 44px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 0 10px #2b1d16, 0 30px 60px rgba(43, 29, 22, 0.35);
}
@media (max-width: 760px) {
  body { background: var(--cream); }
  .stage { padding: 0; display: block; }
  .side { display: none; }
  .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 22px;
  animation: enter 220ms ease-out;
}
.screen.still { animation: none; }
.screen.kids { background: var(--sand); }
.screen.night { background: var(--indigo); color: var(--white); }
.screen.with-nav { padding-bottom: 0; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spacer { flex: 1; min-height: 12px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.topbar .title { font: 800 23px/1.1 var(--display); text-align: center; flex: 1; }
.icon-btn {
  width: 48px; height: 48px; flex-shrink: 0;
  border: 0; border-radius: 50%;
  background: var(--white); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.icon-btn.gold { background: var(--gold-soft); }
.icon-btn.clay { background: var(--clay); color: var(--white); }
.icon-btn.big { width: 56px; height: 56px; }

h1.big { font: 800 32px/1.08 var(--display); margin: 10px 0 0; letter-spacing: -0.01em; }
h2.sec { font: 800 12px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.lead { font-size: 16px; line-height: 1.45; color: var(--muted); margin: 6px 0 0; }

.btn {
  min-height: 60px; padding: 0 22px;
  border: 0; border-radius: 30px;
  background: var(--clay); color: var(--white);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 18px var(--body);
  text-decoration: none; width: 100%;
  box-shadow: 0 4px 0 var(--clay-dark);
  transition: transform 80ms;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--clay-dark); }
.btn.green { background: var(--green); box-shadow: 0 4px 0 var(--green-dark); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #b8841c; }
.btn.dark { background: var(--ink); box-shadow: 0 4px 0 #000; }
.btn.ghost { background: var(--white); color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset; }
.btn:disabled { background: var(--line); color: #8a776a; box-shadow: none; }
.btn.kid { font-family: var(--display); font-size: 21px; min-height: 66px; border-radius: 34px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.link-btn { border: 0; background: none; color: var(--clay-dark); font-weight: 800; font-size: 15px; min-height: 44px; }

.card { background: var(--white); border-radius: var(--radius); padding: 14px; border: 2px solid var(--line); }
.card.flat { border: 0; }
.card.gold { background: var(--gold-soft); border: 0; }
.card.indigo { background: var(--indigo); border: 0; color: var(--white); }
.eyebrow { font: 800 12px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--clay); }
.indigo .eyebrow { color: var(--gold); }

.say {
  display: flex; align-items: center; gap: 10px;
  min-height: 60px; padding: 6px 16px 6px 8px;
  border: 0; border-radius: 30px;
  background: var(--white); text-align: left; width: 100%;
  font: 800 18px/1.22 var(--display);
}
.say .spk { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.say.bad { background: var(--clay-soft); }
.say.good { background: var(--green-soft); color: var(--green-dark); }

/* ---------- welcome ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lang {
  min-height: 56px; padding: 0 14px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--white);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  font-weight: 800; font-size: 17px; text-align: left;
}
.lang[aria-checked="true"] { border-color: var(--clay); background: var(--gold-soft); }
.lang small { font-size: 12px; color: var(--muted); font-weight: 700; }
.lang:disabled { opacity: 0.6; }
.hero-sun { display: flex; justify-content: center; margin-top: 4px; }

/* ---------- family ---------- */
.steps { display: flex; gap: 6px; }
.steps span { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--clay); }
.person {
  display: flex; align-items: center; gap: 12px;
  min-height: 76px; padding: 10px 12px; width: 100%;
  border-radius: 18px; background: var(--white); border: 2px solid var(--line); text-align: left;
}
.person[aria-pressed="true"] { border-color: var(--clay); background: var(--gold-soft); }
.avatar {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 800 24px var(--display); color: var(--white);
}
.person b { display: block; font-size: 18px; }
.person span.sub { font-size: 13px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.add-box { margin-top: 12px; padding: 14px; border-radius: 18px; border: 2px dashed #d8c3a5; display: flex; flex-direction: column; gap: 10px; }
.field { height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--white); font-weight: 700; font-size: 17px; width: 100%; }
.age-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.age {
  min-height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.age small { font-size: 11px; color: var(--muted); }
.age[aria-checked="true"] { border-color: var(--clay); background: var(--gold-soft); }

/* ---------- adult home ---------- */
.hello { display: flex; align-items: center; gap: 10px; }
.hello .who { flex: 1; min-width: 0; }
.hello .who b { display: block; font: 800 21px/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello .who span { font-size: 13px; color: var(--muted); }
.streak { height: 40px; padding: 0 12px; border-radius: 20px; background: var(--gold-soft); display: flex; align-items: center; gap: 6px; font-weight: 800; }
.church-card { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-top: 14px; }
.ring-card { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.ring { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.ring b { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 800 22px/1 var(--display); }
.ring b small { font: 800 11px var(--body); color: var(--muted); }
.mini-btn { align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 0; background: var(--clay); color: var(--white); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tile {
  min-height: 104px; padding: 12px; border-radius: 18px; border: 2px solid var(--line); background: var(--white);
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  font-weight: 800; font-size: 14px; line-height: 1.2; color: var(--ink); text-decoration: none; position: relative;
}
.kids-banner { display: flex; align-items: center; gap: 12px; margin-top: 10px; border: 0; width: 100%; text-align: left; background: var(--indigo); color: var(--white); border-radius: var(--radius); padding: 12px 14px; }
.kids-banner b { display: block; font: 800 19px/1.1 var(--display); }
.kids-banner span { font-size: 13px; color: var(--indigo-soft); }
.nav {
  position: sticky; bottom: 0; margin: 12px -16px 0;
  height: 70px; background: var(--white); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.nav button[aria-current="page"] { color: var(--clay); font-weight: 800; }

/* ---------- kids home ---------- */
.today {
  position: relative; display: block; width: 100%; height: 200px; padding: 0;
  border: 0; border-radius: 28px; overflow: hidden; margin-top: 12px;
  box-shadow: 0 6px 0 var(--clay); text-align: left;
}
.today svg { width: 100%; height: 100%; }
.today .tag { position: absolute; left: 12px; top: 12px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--white); display: flex; align-items: center; font: 800 12px var(--body); }
.today .play { position: absolute; left: 12px; bottom: 12px; min-height: 50px; padding: 4px 16px 4px 6px; border-radius: 25px; background: var(--white); display: flex; align-items: center; gap: 10px; font: 800 19px/1.1 var(--display); max-width: calc(100% - 24px); }
.today .play i { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--clay); color: var(--white); display: flex; align-items: center; justify-content: center; }
.world-bar { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 10px 12px; border: 0; border-radius: var(--radius); background: var(--indigo); color: var(--white); text-align: left; }
.world-bar b { display: block; font: 800 18px/1 var(--display); margin-bottom: 6px; }
.world-bar .count { font-weight: 800; color: var(--gold); }
.segs { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; }
.segs span { height: 6px; border-radius: 3px; background: #3f4280; }
.segs span.done { background: var(--gold); }
.segs span.next { background: #ff9a7a; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.game-tile {
  min-height: 96px; border: 0; border-radius: 22px; background: var(--white); box-shadow: 0 4px 0 var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: 800 15px/1.1 var(--display); color: var(--ink); text-align: center; padding: 6px;
}

/* ---------- world ---------- */
.timeline { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; margin-top: 8px; }
.timeline span { height: 10px; border-radius: 5px; background: var(--white); }
.timeline span.done { background: var(--gold); }
.timeline span.next { background: var(--clay); }
.tl-labels { display: flex; justify-content: space-between; font: 800 12px var(--body); color: var(--muted); margin-top: 4px; }
.era { margin-top: 16px; border-radius: 26px; padding: 12px; position: relative; }
.era h3 { margin: 0 0 2px; font: 800 20px/1.1 var(--display); }
.era p { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.era-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.piece {
  aspect-ratio: 1; border-radius: 18px; border: 3px solid transparent; background: rgba(255, 255, 255, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 4px; position: relative;
}
.piece svg { width: 100%; height: 100%; }
.piece.done { background: var(--white); }
.piece.locked svg { opacity: 0.22; filter: grayscale(1); }
.piece.next { border: 3px dashed var(--clay); animation: pulse 1.6s ease-in-out infinite; }
.piece.next svg { opacity: 0.5; filter: grayscale(1); }
.piece[aria-pressed="true"] { border: 3px solid var(--clay); }
.piece .n { position: absolute; top: 2px; left: 6px; font: 800 11px var(--body); color: var(--muted); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 68, 28, 0.25); } 50% { box-shadow: 0 0 0 8px rgba(184, 68, 28, 0); } }
.sheet {
  position: sticky; bottom: 0; margin: 14px -16px -22px; padding: 14px 16px 22px;
  background: var(--white); border-radius: 26px 26px 0 0; box-shadow: 0 -6px 20px rgba(43, 29, 22, 0.12);
}
.sheet .name { font: 800 22px/1.1 var(--display); }
.sheet .ref { font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- story ---------- */
.illus { margin-top: 10px; border-radius: 28px; overflow: hidden; height: 240px; background: var(--gold-soft); position: relative; }
.illus svg { width: 100%; height: 100%; }
.illus .refchip { position: absolute; left: 10px; bottom: 10px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--white); display: flex; align-items: center; font: 800 13px var(--body); }
.story-lines { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.story-lines p { margin: 0; padding: 6px 10px; border-radius: 12px; font-size: 18px; line-height: 1.45; font-weight: 700; transition: background 200ms; }
.story-lines p.on { background: var(--gold-soft); }
.player { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px; border-radius: 22px; background: var(--white); }
.player .pbtn { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--clay); color: var(--white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.player .meta { flex: 1; }
.player .bar { height: 8px; border-radius: 4px; background: var(--gold-soft); overflow: hidden; }
.player .bar i { display: block; height: 100%; background: var(--gold); width: 0; transition: width 300ms; }
.player small { display: block; margin-top: 6px; font-weight: 700; font-size: 12px; color: var(--muted); }

/* ---------- games: shared ---------- */
.scene { position: relative; margin-top: 12px; border-radius: 28px; overflow: hidden; background: #bfe0f2; }
.scene > svg { width: 100%; height: auto; }
.hit { position: absolute; border: 0; background: transparent; border-radius: 22px; padding: 0; }
.hit.found { box-shadow: 0 0 0 4px #7fd39c; }
.hit.miss { box-shadow: 0 0 0 4px #ff9a7a; animation: wiggle 300ms; }
.counter { pointer-events: none; position: absolute; right: 12px; top: 12px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--white); display: flex; align-items: center; font: 800 14px var(--body); }
@keyframes wiggle { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.wiggle { animation: wiggle 300ms; }
.pop { animation: pop 320ms ease-out; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.hint { margin-top: 12px; text-align: center; font: 800 14px var(--body); color: var(--muted); }
.stars-row { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }

/* tray (build / order) */
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.tray.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.part {
  min-height: 92px; border-radius: 22px; border: 3px solid var(--white); background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
  font: 800 14px/1.15 var(--body); text-align: center;
}
.part svg { width: 58px; height: 46px; }
.part.used { opacity: 0.35; }
.part.wrong { border-color: var(--clay); background: var(--clay-soft); }
.slots { display: grid; gap: 6px; margin-top: 12px; }
.slot {
  min-height: 112px; border-radius: 18px; border: 3px dashed #d8c3a5; background: rgba(255, 255, 255, 0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px;
}
.slot .num { font: 800 22px/1 var(--display); color: var(--clay); }
.slot.filled { border-style: solid; border-color: var(--white); background: var(--white); }
.slot.bad { border-color: var(--clay); }
.slot.ok { border-color: var(--green); }
.slot svg { width: 64px; height: 50px; }
.slot span.t { font-size: 11px; font-weight: 800; line-height: 1.1; text-align: center; }
.order-card { min-height: 150px; }
.order-card svg { width: 110px; height: 80px; }

/* count */
.count-big { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.count-big b { font: 800 56px/1 var(--display); color: var(--clay); min-width: 70px; text-align: center; }
.count-big span { font: 800 22px var(--display); color: var(--muted); }
.count-grid { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 26px; }
.cnt {
  aspect-ratio: 1; border: 3px solid transparent; border-radius: 20px; background: rgba(255, 255, 255, 0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; position: relative;
}
.cnt svg { width: 70%; height: 70%; }
.cnt.on { border-color: var(--green); background: var(--white); }
.cnt .n { position: absolute; top: 4px; right: 8px; font: 800 15px var(--display); color: var(--green-dark); }

/* choose */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.choice {
  min-height: 136px; border-radius: 24px; border: 4px solid var(--white); background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px;
  font: 800 15px/1.1 var(--display); box-shadow: 0 5px 0 var(--gold);
}
.choice svg { width: 72px; height: 72px; }
.choice.right { border-color: var(--green); background: var(--green-soft); }
.choice.wrong { border-color: var(--clay); background: var(--clay-soft); }
.q-big { margin-top: 14px; font: 800 26px/1.2 var(--display); text-align: center; }

/* memory */
.mem { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.mcard {
  aspect-ratio: 3 / 4.2; border-radius: 18px; border: 3px solid var(--clay); background: var(--clay);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px;
  box-shadow: 0 5px 0 var(--clay-dark); font: 800 13px/1.1 var(--display); color: var(--ink);
}
.mcard svg { width: 70%; height: auto; }
.mcard.up { background: var(--white); border-color: var(--gold); box-shadow: 0 5px 0 var(--line); }
.mcard.matched { background: var(--white); border-color: var(--green); box-shadow: 0 5px 0 var(--line); }

/* act */
.act-dots { display: grid; gap: 6px; margin-top: 12px; }
.act-dots span { height: 34px; border-radius: 17px; background: var(--white); display: flex; align-items: center; justify-content: center; font: 800 15px var(--display); color: #b5a493; }
.act-dots span.on { background: var(--gold); color: var(--ink); }

/* done */
.done-stars { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-top: 16px; }
.done-stars svg:nth-child(2) { width: 64px; height: 64px; }
.done-card {
  margin: 16px auto 0; width: 230px; border-radius: 24px; background: var(--indigo); color: var(--white);
  padding: 12px; transform: rotate(-2deg); box-shadow: 0 10px 0 var(--gold);
}
.done-card .art { height: 150px; border-radius: 14px; background: var(--gold-soft); display: flex; align-items: center; justify-content: center; }
.done-card .art svg { width: 110px; height: 110px; }
.done-card b { display: block; font: 800 21px/1.1 var(--display); margin-top: 8px; }
.done-card small { color: var(--indigo-soft); font-size: 13px; }

/* parents */
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.skill { padding: 10px 12px; border-radius: 16px; background: var(--white); border: 2px solid var(--line); }
.skill small { display: block; font: 800 11px var(--body); letter-spacing: 0.08em; color: var(--muted); }
.skill b { display: block; font-size: 14px; margin: 4px 0 6px; }
.meter { height: 6px; border-radius: 3px; background: #f3e6d2; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); }
.seg-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg-row button { min-height: 46px; border-radius: 14px; border: 2px solid var(--line); background: var(--white); font-weight: 800; }
.seg-row button[aria-checked="true"] { border-color: var(--clay); background: var(--gold-soft); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 16px;
  font-weight: 800; max-width: 320px; text-align: center; z-index: 10;
}

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