/* =============================================================
   HÁBITOS DA FAMÍLIA — Design system v2
   Vibrant, gamified, family-friendly
   ============================================================= */

:root {
  --bg: #FFFBF3;
  --bg-warm: #FFF1DC;
  --surface: #FFFFFF;
  --surface-2: #FFF8E7;

  --ink: #15193A;
  --ink-2: #4A5070;
  --ink-3: #8A8FA8;
  --ink-4: #C2C5D4;
  --line: #EEE5D0;
  --line-2: #DCD0B6;

  --coral: #FF5B3F;
  --coral-deep: #E03E1F;
  --coral-soft: #FFD9D0;

  --gold: #FFB627;
  --gold-deep: #E89A0D;
  --gold-soft: #FFEDC6;

  --fire-1: #FF8A2B;
  --fire-2: #FF3D00;

  --mint: #2DBE76;
  --mint-deep: #1B9659;
  --mint-soft: #CFF1DE;

  --sky: #3B7BFF;
  --sky-deep: #1F58DB;
  --sky-soft: #D6E4FF;

  --grape: #8B4FFF;
  --grape-soft: #E6D9FF;

  --habit-training: #FF5B3F;
  --habit-protein: #FFB627;
  --habit-move: #3B7BFF;
  --habit-sleep: #8B4FFF;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-ui: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 48px;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  --shadow-soft: 0 4px 16px rgba(21, 25, 58, 0.06);
  --shadow-med: 0 10px 30px rgba(21, 25, 58, 0.10);
  --shadow-pop: 0 12px 30px rgba(255, 91, 63, 0.35);

  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1024;
    --bg-warm: #1A1A35;
    --surface: #1F2040;
    --surface-2: #272848;
    --ink: #F4F2EA;
    --ink-2: #B5B8CC;
    --ink-3: #7A7E96;
    --ink-4: #4A4E66;
    --line: #2A2C50;
    --line-2: #383A5F;
    --coral-soft: #4A2418;
    --gold-soft: #4A380C;
    --mint-soft: #163A28;
    --sky-soft: #1A2E54;
    --grape-soft: #2C1D4D;
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-med: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

/* Explicit theme overrides (user choice beats system pref) */
[data-theme="dark"] {
  --bg: #0F1024; --bg-warm: #1A1A35; --surface: #1F2040; --surface-2: #272848;
  --ink: #F4F2EA; --ink-2: #B5B8CC; --ink-3: #7A7E96; --ink-4: #4A4E66;
  --line: #2A2C50; --line-2: #383A5F;
  --coral-soft: #4A2418; --gold-soft: #4A380C; --mint-soft: #163A28;
  --sky-soft: #1A2E54; --grape-soft: #2C1D4D;
  --shadow-soft: 0 4px 16px rgba(0,0,0,0.3); --shadow-med: 0 10px 30px rgba(0,0,0,0.4);
}
[data-theme="light"] {
  --bg: #FFFBF3; --bg-warm: #FFF1DC; --surface: #FFFFFF; --surface-2: #FFF8E7;
  --ink: #15193A; --ink-2: #4A5070; --ink-3: #8A8FA8; --ink-4: #C2C5D4;
  --line: #EEE5D0; --line-2: #DCD0B6;
  --coral-soft: #FFD9D0; --gold-soft: #FFEDC6; --mint-soft: #CFF1DE;
  --sky-soft: #D6E4FF; --grape-soft: #E6D9FF;
  --shadow-soft: 0 4px 16px rgba(21,25,58,0.06); --shadow-med: 0 10px 30px rgba(21,25,58,0.10);
}

/* =============================================================
   PALETTE SUB-VARIANTS — per design agent spec
   Use [data-palette="aurora|sereno|brasa"] combined with theme.
   Default palette is `aurora` (no attribute needed).
   ============================================================= */

/* AURORA (default) — same as current. Repeated for explicit selection. */
[data-palette="aurora"][data-theme="light"] {
  --bg: #FFFBF3; --bg-warm: #FFF1DC; --surface: #FFFFFF; --surface-2: #FFF8E7;
  --ink: #15193A; --ink-2: #4A5070; --ink-3: #8A8FA8; --ink-4: #C2C5D4;
  --line: #EEE5D0; --line-2: #DCD0B6;
  --coral: #FF5B3F; --coral-deep: #E03E1F; --coral-soft: #FFD9D0;
  --gold: #FFB627; --gold-deep: #E89A0D; --gold-soft: #FFEDC6;
  --fire-1: #FF8A2B; --fire-2: #FF3D00;
  --mint: #2DBE76; --mint-deep: #1B9659; --mint-soft: #CFF1DE;
  --sky: #3B7BFF; --sky-deep: #1F58DB; --sky-soft: #D6E4FF;
  --grape: #8B4FFF; --grape-soft: #E6D9FF;
}
[data-palette="aurora"][data-theme="dark"] {
  --bg: #0F1024; --bg-warm: #1A1A35; --surface: #1F2040; --surface-2: #272848;
  --ink: #F4F2EA; --ink-2: #B5B8CC; --ink-3: #7A7E96; --ink-4: #4A4E66;
  --line: #2A2C50; --line-2: #383A5F;
  --coral: #FF7A60; --coral-deep: #FF5B3F; --coral-soft: #4A2418;
  --gold: #FFC559; --gold-deep: #E89A0D; --gold-soft: #4A380C;
  --fire-1: #FFA15A; --fire-2: #FF6A2E;
  --mint: #4FD697; --mint-deep: #2DBE76; --mint-soft: #163A28;
  --sky: #6595FF; --sky-deep: #3B7BFF; --sky-soft: #1A2E54;
  --grape: #AC85FF; --grape-soft: #2C1D4D;
}

/* SERENO — verdes sálvia + areia + azul-acinzentado. Sono / longevidade. */
[data-palette="sereno"][data-theme="light"] {
  --bg: #F6F3EC; --bg-warm: #EDE8DC; --surface: #FBF9F3; --surface-2: #F0EBDC;
  --ink: #1C2A2A; --ink-2: #46584F; --ink-3: #8A9990; --ink-4: #BDC6BE;
  --line: #DCD9CB; --line-2: #C4C2B2;
  --coral: #C36D5C; --coral-deep: #9E4F3E; --coral-soft: #ECD7CE;
  --gold: #C9A04A; --gold-deep: #9E7A28; --gold-soft: #ECE0BE;
  --fire-1: #D08758; --fire-2: #B96A3A;
  --mint: #3F8C6D; --mint-deep: #29684F; --mint-soft: #D2E5D9;
  --sky: #4F7896; --sky-deep: #335A77; --sky-soft: #D5E1EA;
  --grape: #7F6FA8; --grape-soft: #DDD4EA;
}
[data-palette="sereno"][data-theme="dark"] {
  --bg: #131A1A; --bg-warm: #1B2424; --surface: #1F2A2A; --surface-2: #263434;
  --ink: #ECEFE7; --ink-2: #B3BDB3; --ink-3: #7A857F; --ink-4: #4E5953;
  --line: #2A3636; --line-2: #384545;
  --coral: #DA8A77; --coral-deep: #B86A57; --coral-soft: #3A2620;
  --gold: #E0B872; --gold-deep: #B89150; --gold-soft: #3A2E18;
  --fire-1: #D89668; --fire-2: #B97550;
  --mint: #6BB892; --mint-deep: #3F8C6D; --mint-soft: #1A2E26;
  --sky: #84A8C2; --sky-deep: #5A8098; --sky-soft: #1C2A34;
  --grape: #A89AD0; --grape-soft: #261F3A;
}

/* BRASA — vinho + âmbar queimado + musgo. Foco / treino intenso. */
[data-palette="brasa"][data-theme="light"] {
  --bg: #FBF4EA; --bg-warm: #F4E6CE; --surface: #FFFBF1; --surface-2: #F6E8C9;
  --ink: #1A0E10; --ink-2: #4B2A26; --ink-3: #876458; --ink-4: #BFA593;
  --line: #E6CFB0; --line-2: #C9AC85;
  --coral: #B6332A; --coral-deep: #871E18; --coral-soft: #F2CFCB;
  --gold: #D48A1A; --gold-deep: #A6680A; --gold-soft: #F2D996;
  --fire-1: #C66723; --fire-2: #9A2A12;
  --mint: #4C6E3A; --mint-deep: #345025; --mint-soft: #D7DFC5;
  --sky: #3F6B82; --sky-deep: #284E62; --sky-soft: #C7D6DE;
  --grape: #6C4A86; --grape-soft: #D7C8E2;
}
[data-palette="brasa"][data-theme="dark"] {
  --bg: #1A0E0C; --bg-warm: #271613; --surface: #2A1815; --surface-2: #361F1B;
  --ink: #F5E9DC; --ink-2: #C8B0A0; --ink-3: #8C7466; --ink-4: #5A4538;
  --line: #3A241F; --line-2: #4C302A;
  --coral: #E07060; --coral-deep: #B6332A; --coral-soft: #3E1A15;
  --gold: #E8AE52; --gold-deep: #B4811E; --gold-soft: #3E2A0E;
  --fire-1: #D88445; --fire-2: #B0512A;
  --mint: #7AAA62; --mint-deep: #4C6E3A; --mint-soft: #1D2818;
  --sky: #7AA0B5; --sky-deep: #4F7896; --sky-soft: #1C2830;
  --grape: #A790C4; --grape-soft: #2A1F36;
}

/* Palette picker in Eu → Aparência */
.palette-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 24px;
  margin-top: 8px;
}
.palette-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.palette-card.sel {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.palette-card .swatches {
  display: flex;
  gap: 3px;
  height: 22px;
}
.palette-card .swatches span {
  flex: 1;
  border-radius: 6px;
}
.palette-card .pname {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.palette-card.sel .pname { color: var(--coral-deep); }
.palette-card .pdesc {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.3;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overscroll-behavior: none;
}

body {
  padding-top: var(--safe-top);
  min-height: 100dvh;
}

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

input {
  font-family: inherit;
  color: inherit;
  font-size: inherit;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

::selection { background: var(--coral-soft); color: var(--coral-deep); }

/* =============================================================
   APP SHELL
   ============================================================= */

.app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(90px + var(--safe-bottom));
  min-height: 100dvh;
  position: relative;
}

.app-header {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.greeting-eyebrow {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.greeting-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 2px;
}

/* =============================================================
   AVATARS
   ============================================================= */

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}
.avatar.coral { background: linear-gradient(135deg, #FF7A5C, #FF3D1A); }
.avatar.gold  { background: linear-gradient(135deg, #FFC94A, #FF9B0F); }
.avatar.mint  { background: linear-gradient(135deg, #4FD494, #1FA463); }
.avatar.sky   { background: linear-gradient(135deg, #5C95FF, #1F58DB); }
.avatar.grape { background: linear-gradient(135deg, #A37AFF, #6A2FE0); }
.avatar.lg    { width: 64px; height: 64px; font-size: 26px; }
.avatar.xl    { width: 96px; height: 96px; font-size: 38px; }
.avatar.sm    { width: 36px; height: 36px; font-size: 14px; }

.avatar-ring {
  position: relative;
  display: inline-flex;
}
.avatar-ring .lvl-badge {
  position: absolute;
  bottom: -4px; right: -4px;
  background: var(--gold);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--bg);
}

/* =============================================================
   HERO RING (Apple Fitness style)
   ============================================================= */

.hero {
  margin: 0 24px;
  background: linear-gradient(135deg, #15193A 0%, #2A1F4A 100%);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  color: white;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% -10%, rgba(255, 91, 63, 0.4), transparent 60%),
    radial-gradient(circle at 0% 110%, rgba(139, 79, 255, 0.3), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ring-wrap {
  width: 140px;
  height: 140px;
  position: relative;
  flex-shrink: 0;
}
.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 14;
}
.ring-seg {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s var(--ease-out);
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-pts {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ring-pts .of {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  font-weight: 600;
}
.ring-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  margin-top: 4px;
}
.ring-label.perfect { color: var(--gold); }

.hero-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.hero-level {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lvl-pill {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0;
}
.hero-level-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-xp-bar {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.hero-xp-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #FF9B0F);
  border-radius: 999px;
  transition: width 0.8s var(--ease-out);
}
.hero-xp-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--fire-1), var(--fire-2));
  color: white;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(255, 61, 0, 0.45);
  margin-top: 4px;
  width: fit-content;
}
.streak-badge svg { width: 14px; height: 14px; }
.streak-badge .count { font-family: var(--font-mono); }

/* =============================================================
   TABS / SECTIONS
   ============================================================= */

.tab { display: none; }
.tab.active {
  display: block;
  animation: tabEnter 0.3s var(--ease-out);
}
@keyframes tabEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 24px 14px;
}
.section-h .title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-h .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 700;
}

/* =============================================================
   QUEST / TASKS
   ============================================================= */

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 28px 24px 12px;
}
.quest-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.quest-sub {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 2px;
}
.quest-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--bg-warm);
  padding: 6px 10px;
  border-radius: 999px;
}
.quest-count.complete {
  background: var(--mint-soft);
  color: var(--mint-deep);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px;
}
.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.task:active { transform: scale(0.98); }

.task-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-icon svg { width: 22px; height: 22px; }
.task--training .task-icon { background: var(--coral-soft); color: var(--habit-training); }
.task--protein .task-icon  { background: var(--gold-soft);  color: var(--habit-protein); }
.task--move .task-icon     { background: var(--sky-soft);   color: var(--habit-move); }
.task--sleep .task-icon    { background: var(--grape-soft); color: var(--habit-sleep); }

.task-body { flex: 1; min-width: 0; }
.task-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.task-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  font-weight: 500;
}
.task-points {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.task-points .coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: white;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
}
.task.done {
  background: linear-gradient(135deg, var(--mint-soft) 0%, #DAF3E5 100%);
}
@media (prefers-color-scheme: dark) {
  .task.done {
    background: linear-gradient(135deg, var(--mint-soft) 0%, #1F4A30 100%);
  }
}
.task.done .task-title {
  color: var(--mint-deep);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.task.done .task-points { color: var(--mint-deep); }
.task.done .task-check {
  background: var(--mint);
  border-color: var(--mint);
  box-shadow: 0 4px 10px rgba(45, 190, 118, 0.4);
}
.task.done .task-check::after {
  content: '';
  width: 12px; height: 6px;
  border-left: 2.5px solid white;
  border-bottom: 2.5px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* =============================================================
   BOTTOM NAV
   ============================================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px 8px calc(8px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -8px 24px rgba(21, 25, 58, 0.04);
  z-index: 50;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  flex: 1;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.active {
  color: var(--coral);
  background: var(--coral-soft);
}

/* =============================================================
   ONBOARDING
   ============================================================= */

.onb-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: none;
  overflow-y: auto;
}
.onb-screen.active { display: block; }

.onb {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 14px) 24px calc(var(--safe-bottom) + 24px);
}

.onb-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
  padding-top: 8px;
}
.onb-progress span {
  height: 4px;
  flex: 1;
  background: var(--line);
  border-radius: 4px;
  transition: background 0.3s;
}
.onb-progress span.done,
.onb-progress span.current { background: var(--coral); }

.onb-step {
  font-size: 11px;
  color: var(--coral);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.onb-question {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.onb-hint {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 28px;
  font-weight: 500;
}
.onb-body { flex: 1; }

.onb-input {
  width: 100%;
  padding: 22px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 22px;
  outline: none;
  color: var(--ink);
  transition: all 0.2s;
}
.onb-input::placeholder { color: var(--ink-4); font-weight: 500; }
.onb-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px var(--coral-soft);
}

.onb-input-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-radius: 22px;
  border: 2px solid var(--line);
  padding-right: 22px;
  transition: all 0.2s;
}
.onb-input-row .onb-input {
  border: none; background: transparent;
}
.onb-input-row .onb-input:focus { box-shadow: none; }
.onb-input-row:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px var(--coral-soft);
}
.onb-input-row .unit {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-3);
}

.onb-stepper {
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
}
.onb-stepper button {
  width: 54px; height: 54px;
  background: var(--bg-warm);
  border-radius: 18px;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all 0.15s;
}
.onb-stepper button:hover,
.onb-stepper button:active {
  background: var(--coral);
  color: white;
}
.onb-stepper-val { text-align: center; }
.onb-stepper-val .v {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.onb-stepper-val .u {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.onb-choice { display: flex; flex-direction: column; gap: 10px; }
.onb-choice button {
  text-align: left;
  padding: 18px 18px 18px 64px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  position: relative;
  transition: all 0.2s var(--ease);
}
.onb-choice button::before {
  content: '';
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--bg);
  transition: all 0.2s;
}
.onb-choice button .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0;
}
.onb-choice button.selected {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-deep);
  box-shadow: 0 8px 20px rgba(255, 91, 63, 0.18);
}
.onb-choice button.selected::before {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: inset 0 0 0 5px white;
}
.onb-choice button.selected .sub { color: var(--coral-deep); opacity: 0.75; }

.onb-choice.icon-cards button { padding-left: 78px; }
.onb-choice.icon-cards button::before { display: none; }
.onb-choice.icon-cards button .card-ic {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-warm);
  color: var(--ink-2);
  transition: all 0.2s;
}
.onb-choice.icon-cards button .card-ic svg { width: 22px; height: 22px; }
.onb-choice.icon-cards button.selected .card-ic {
  background: white;
  color: var(--coral);
}

.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-chips button {
  padding: 12px 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.onb-chips button svg { width: 16px; height: 16px; }
.onb-chips button.selected {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
  box-shadow: 0 6px 14px rgba(255, 91, 63, 0.3);
}

.onb-footer {
  margin-top: 24px;
  display: flex; gap: 12px;
  align-items: center;
}

/* =============================================================
   BUTTONS
   ============================================================= */

.btn-primary {
  flex: 1;
  padding: 20px;
  border-radius: 22px;
  background: var(--coral);
  color: white;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-pop);
  transition: all 0.2s var(--ease);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 12px rgba(255, 91, 63, 0.3);
}
.btn-primary:disabled {
  background: var(--ink-4);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  padding: 16px 20px;
  background: transparent;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 14px;
}

.btn-block {
  display: block;
  width: calc(100% - 48px);
  margin: 12px 24px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-warm);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  border: 1px solid var(--line);
}
.btn-block.danger {
  background: var(--coral-soft);
  color: var(--coral-deep);
  border-color: transparent;
}

/* =============================================================
   WELCOME (pre-onboarding)
   ============================================================= */

.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 91, 63, 0.35), transparent 50%),
    radial-gradient(circle at 0% 30%, rgba(255, 182, 39, 0.3), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(139, 79, 255, 0.2), transparent 50%),
    var(--bg);
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 28px);
}
.welcome-top { padding-top: 60px; }
.welcome-logo {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.welcome-logo .dot { color: var(--coral); }
.welcome-tag {
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--ink-2);
}
.welcome-mid {
  margin-top: 80px;
  flex: 1;
}
.welcome-mid h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.welcome-mid h2 .hl { color: var(--coral); }
.welcome-mid p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
  max-width: 320px;
}
.feature-row {
  display: flex; gap: 14px;
  margin-top: 36px;
}
.feature-pill {
  flex: 1;
  background: var(--surface);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.feature-pill .ic {
  width: 36px; height: 36px;
  border-radius: 12px;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
}
.feature-pill .ic svg { width: 18px; height: 18px; }
.feature-pill.coral .ic { background: var(--coral-soft); color: var(--coral); }
.feature-pill.gold .ic  { background: var(--gold-soft);  color: var(--gold-deep); }
.feature-pill.sky .ic   { background: var(--sky-soft);   color: var(--sky-deep); }
.feature-pill .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* =============================================================
   SUMMARY (post-onboarding level reveal)
   ============================================================= */

.summary {
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  background:
    radial-gradient(circle at 50% 10%, var(--coral-soft), transparent 50%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.confetti-pattern {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  pointer-events: none;
  opacity: 0.6;
}
.summary-hero {
  text-align: center;
  padding: 28px 0 8px;
  position: relative;
}
.summary-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 16px 0 4px;
  color: var(--ink);
}
.summary-sub {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  margin: 0 0 20px;
}
.level-reveal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #15193A, #2A1F4A);
  color: white;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(21, 25, 58, 0.25);
}
.level-reveal-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
}
.level-reveal-text {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}
.level-reveal-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin: 24px 0 10px;
}
.plan-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.plan-card-ic {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.plan-card-ic svg { width: 22px; height: 22px; }
.plan-card.training .plan-card-ic { background: var(--coral-soft); color: var(--coral); }
.plan-card.protein .plan-card-ic  { background: var(--gold-soft);  color: var(--gold-deep); }
.plan-card.move .plan-card-ic     { background: var(--sky-soft);   color: var(--sky-deep); }
.plan-card.sleep .plan-card-ic    { background: var(--grape-soft); color: var(--grape); }
.plan-card-body { flex: 1; min-width: 0; }
.plan-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.plan-card-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  font-weight: 500;
  line-height: 1.4;
}

.warning-box {
  background: var(--gold-soft);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 12px;
}
.warning-box .w-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.warning-box .w-title svg { width: 14px; height: 14px; }
.warning-box ul { margin: 0; padding: 0; list-style: none; }
.warning-box li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  padding: 4px 0;
  font-weight: 500;
}

/* =============================================================
   FAMILY — podium + leaderboard
   ============================================================= */

.podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
  margin: 12px 24px 28px;
  padding: 24px 16px 0;
  background: linear-gradient(180deg, transparent, var(--coral-soft));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  position: relative;
}
.podium-pos {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.podium-crown {
  position: absolute;
  top: -22px;
  color: var(--gold-deep);
}
.podium-crown svg { width: 26px; height: 26px; }
.podium-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
}
.podium-pts {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.podium-block {
  width: 100%;
  margin-top: 8px;
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  border-top: 4px solid;
  box-shadow: 0 -4px 12px rgba(21, 25, 58, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-3);
  font-size: 24px;
}
.podium-pos.first .podium-block  { height: 90px; border-color: var(--gold); }
.podium-pos.second .podium-block { height: 64px; border-color: var(--ink-4); }
.podium-pos.third .podium-block  { height: 48px; border-color: #B97A50; }

.family-list { padding: 0 24px; display: flex; flex-direction: column; gap: 10px; }
.family-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 14px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
}
.family-row-body { flex: 1; min-width: 0; }
.family-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.family-row-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.family-row-pts {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 700;
}
.family-row-status {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
  font-weight: 500;
}
.family-row-bar {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.family-row-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  border-radius: 999px;
}

.invite-box {
  margin: 16px 24px 0;
  background: linear-gradient(135deg, #15193A, #2A1F4A);
  color: white;
  padding: 20px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: 14px;
}
.invite-box .ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.invite-box-body { flex: 1; min-width: 0; }
.invite-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
}
.invite-code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.invite-share {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 8px 12px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.family-empty {
  margin: 24px;
  padding: 32px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-2);
}
.family-empty h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.family-empty p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}

/* =============================================================
   ACHIEVEMENTS
   ============================================================= */

.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 24px;
}
.badge {
  aspect-ratio: 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.badge svg { width: 28px; height: 28px; }
.badge .b-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.1;
  padding: 0 4px;
}
.badge.locked { filter: grayscale(1) opacity(0.45); }
.badge.unlocked.fire  { background: linear-gradient(135deg, var(--fire-1), var(--fire-2)); color: white; }
.badge.unlocked.gold  { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink); }
.badge.unlocked.mint  { background: linear-gradient(135deg, #5BDB9C, var(--mint-deep)); color: white; }
.badge.unlocked.sky   { background: linear-gradient(135deg, #5C95FF, var(--sky-deep)); color: white; }
.badge.unlocked.grape { background: linear-gradient(135deg, #A37AFF, #6A2FE0); color: white; }
.badge.unlocked.fire .b-label,
.badge.unlocked.mint .b-label,
.badge.unlocked.sky .b-label,
.badge.unlocked.grape .b-label { color: rgba(255,255,255,0.85); }

/* =============================================================
   STATS (formerly Cintura) — measurement + chart
   ============================================================= */

.input-row-big {
  margin: 0 24px;
  display: flex;
  gap: 10px;
  background: var(--surface);
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-md);
  align-items: center;
  border: 2px solid var(--line);
  transition: all 0.2s;
}
.input-row-big:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px var(--coral-soft);
}
.input-row-big input {
  flex: 1;
  border: none; outline: none; background: transparent;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.input-row-big input::placeholder { color: var(--ink-4); }
.input-row-big .add-btn {
  width: 48px; height: 48px;
  background: var(--coral);
  color: white;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(255, 91, 63, 0.35);
}
.input-row-big .add-btn svg { width: 22px; height: 22px; }

.metric-hero {
  margin: 14px 24px 0;
  background: linear-gradient(135deg, var(--mint-soft), #E6F9EC);
  padding: 24px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (prefers-color-scheme: dark) {
  .metric-hero {
    background: linear-gradient(135deg, var(--mint-soft), #1F4A30);
  }
}
.metric-hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mint-deep);
  opacity: 0.7;
  margin-bottom: 4px;
}
.metric-hero-val {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  color: var(--mint-deep);
  letter-spacing: -0.04em;
  line-height: 1;
}
.metric-hero-val .u { font-size: 18px; font-weight: 600; color: var(--mint); }
.metric-hero-meta { text-align: right; }
.metric-hero-meta .change {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--mint-deep);
  letter-spacing: -0.02em;
}
.metric-hero-meta .change.up { color: var(--coral-deep); }
.metric-hero-meta .since {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  margin-top: 2px;
}

.chart-card {
  margin: 14px 24px 0;
  background: var(--surface);
  padding: 18px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
}
.chart-card svg { width: 100%; height: auto; display: block; }

.history-card {
  margin: 14px 24px 0;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 4px 18px;
  box-shadow: var(--shadow-soft);
}
.history-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.history-row:last-child { border-bottom: none; }
.history-date { color: var(--ink-3); font-weight: 500; }
.history-val { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }

.empty-state {
  margin: 14px 24px;
  padding: 32px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
}

/* =============================================================
   PROFILE / CONTA
   ============================================================= */

.profile-hero {
  margin: 0 24px;
  background: linear-gradient(135deg, #15193A, #2A1F4A);
  border-radius: var(--r-lg);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 91, 63, 0.4), transparent 60%);
}
.profile-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-hero-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.profile-hero-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  margin-top: 4px;
}
.profile-hero-stats {
  display: flex; gap: 24px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
.profile-stat-v {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.profile-stat-l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
  font-weight: 700;
}

.detail-card {
  margin: 16px 24px 0;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 4px 18px;
  box-shadow: var(--shadow-soft);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--ink-3); font-weight: 500; }
.detail-val { color: var(--ink); font-weight: 700; }

/* =============================================================
   AUTH SCREEN
   ============================================================= */

.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.auth-screen.active { display: flex; }
.auth-content {
  max-width: 360px;
  width: 100%;
}
.auth-content .welcome-logo {
  font-size: 54px;
  text-align: center;
}
.auth-content .welcome-tag {
  text-align: center;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  margin-top: 32px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.auth-copy {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 18px;
}
.auth-card .onb-input { margin-bottom: 12px; font-size: 18px; padding: 16px 18px; }
.auth-status {
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.5;
}
.auth-status.error   { color: var(--coral-deep); }
.auth-status.pending { color: var(--ink-3); }
.auth-status.success {
  color: var(--mint-deep);
  background: var(--mint-soft);
  padding: 12px;
  border-radius: 12px;
}
.auth-footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.5;
}

/* =============================================================
   CELEBRATION (confetti on level up)
   ============================================================= */

.confetti-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 999;
}

/* =============================================================
   UTILITIES
   ============================================================= */

.hidden { display: none !important; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 24px 0 12px;
}

/* =============================================================
   FREEZE BADGE + STREAK ROW
   ============================================================= */

.hero-badges-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.streak-badge .suf { margin-left: 3px; font-weight: 600; opacity: 0.85; }
.freeze-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #5C95FF, #1F58DB);
  color: white;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(59, 123, 255, 0.4);
}
.freeze-badge svg { width: 14px; height: 14px; }
.freeze-badge .count { font-family: var(--font-mono); }

/* =============================================================
   MYSTERY BOX BANNER
   ============================================================= */

.mystery-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 24px 0;
  padding: 16px;
  background: linear-gradient(135deg, #FFD86E, #FF9B0F);
  color: var(--ink);
  border-radius: var(--r-md);
  width: calc(100% - 48px);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 155, 15, 0.35);
  transition: transform 0.2s var(--ease);
}
.mystery-banner:active { transform: scale(0.98); }
.mb-ic { font-size: 32px; line-height: 1; display: inline-flex; }
.mb-body { flex: 1; display: flex; flex-direction: column; }
.mb-title { display: block; font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.mb-sub { display: block; font-size: 12px; opacity: 0.85; font-weight: 600; margin-top: 2px; }
.mb-cta {
  display: inline-block;
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

/* =============================================================
   MINI CARDS (hydration / carb)
   ============================================================= */

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 24px 0;
}
.mini-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-top { display: flex; align-items: center; gap: 8px; }
.mini-ic {
  width: 28px; height: 28px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.mini-ic svg { width: 16px; height: 16px; }
.mini-water .mini-ic { background: var(--sky-soft); color: var(--sky-deep); }
.mini-carb .mini-ic  { background: var(--gold-soft); color: var(--gold-deep); }
.mini-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mini-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.mini-val .u { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-left: 2px; }
.mini-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}
.mini-status.good { background: var(--mint-soft); color: var(--mint-deep); }
.mini-status.late { background: var(--coral-soft); color: var(--coral-deep); }
.mini-status.pending { background: var(--bg-warm); color: var(--ink-3); }
.mini-action {
  background: var(--bg-warm);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  margin-top: 4px;
  cursor: pointer;
}
.mini-action:active { transform: scale(0.98); }

/* =============================================================
   INSIGHT CARD
   ============================================================= */

.insight-card {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--gold-soft);
  border-radius: var(--r-md);
  align-items: flex-start;
}
.insight-ic {
  width: 28px; height: 28px;
  border-radius: 10px;
  background: var(--gold);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.insight-ic svg { width: 16px; height: 16px; }
.insight-text { font-size: 13px; line-height: 1.5; color: var(--ink); font-weight: 500; }

/* =============================================================
   ONBOARDING: days-of-week selector
   ============================================================= */

.days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.day-pill {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s;
  cursor: pointer;
}
.day-pill .day-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1;
}
.day-pill .day-n {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 700;
}
.day-pill.on {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 6px 14px rgba(255, 91, 63, 0.3);
}
.day-pill.on .day-l,
.day-pill.on .day-n { color: white; }

.days-summary {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 14px 16px;
  background: var(--bg-warm);
  border-radius: 14px;
  text-align: center;
}
.days-summary .sub {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
}

/* =============================================================
   ONBOARDING: goal cards (with emoji)
   ============================================================= */

.onb-goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.goal-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}
.goal-card .goal-emoji {
  font-size: 28px;
  line-height: 1;
  filter: saturate(0.9);
}
.goal-card .goal-text { display: flex; flex-direction: column; gap: 2px; }
.goal-card .goal-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.goal-card .goal-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  line-height: 1.35;
}
.goal-card.selected {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 8px 20px rgba(255, 91, 63, 0.18);
}
.goal-card.selected .goal-title { color: var(--coral-deep); }
.goal-card.selected .goal-sub { color: var(--coral-deep); opacity: 0.75; }

/* =============================================================
   HOUR SLIDER (carb cutoff)
   ============================================================= */

.hour-slider { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hour-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
}
.hour-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--coral);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 91, 63, 0.4);
  border: 3px solid white;
}
.hour-slider input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--coral);
  cursor: pointer;
  border: 3px solid white;
}
.hour-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* =============================================================
   ONBOARDING SUMMARY: macros pills
   ============================================================= */

.macro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 8px;
  margin-bottom: 8px;
}
.macro-grid .macro-pill:first-child { grid-column: 1 / -1; }
.macro-pill {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.macro-pill .mp-v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.macro-pill .mp-v small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.macro-pill .mp-l {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.macro-pill.protein { background: var(--gold-soft); }
.macro-pill.carb    { background: var(--sky-soft); }
.macro-pill.fat     { background: var(--grape-soft); }

/* =============================================================
   PLANO: segmented control
   ============================================================= */

.seg-control {
  display: flex;
  gap: 4px;
  margin: 0 24px 16px;
  background: var(--bg-warm);
  padding: 4px;
  border-radius: 14px;
}
.seg-btn {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* =============================================================
   PLANO: big cards
   ============================================================= */

.big-card {
  margin: 0 24px 10px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.big-card .bc-eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.big-card .bc-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.big-card .bc-title-lg {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.big-card .bc-title-xl {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.big-card .u { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.big-card .bc-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.5;
}
.big-card .bc-cta-row { margin-top: 16px; }
.big-card .bc-note {
  margin-top: 14px;
  padding: 12px;
  background: var(--bg-warm);
  border-radius: 12px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.today-training {
  background: linear-gradient(135deg, var(--coral-soft) 0%, #FFF5F1 100%);
}
.today-training.rest {
  background: linear-gradient(135deg, var(--grape-soft) 0%, #F5F0FF 100%);
}
@media (prefers-color-scheme: dark) {
  .today-training { background: linear-gradient(135deg, #4A2418 0%, #2A1B1C 100%); }
  .today-training.rest { background: linear-gradient(135deg, #2C1D4D 0%, #1E1832 100%); }
}

/* =============================================================
   PLANO: macros bar
   ============================================================= */

.macro-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 10px;
  background: var(--line);
}
.macro-bar-seg.p { background: var(--gold); }
.macro-bar-seg.c { background: var(--sky); }
.macro-bar-seg.f { background: var(--grape); }
.macro-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}
.macro-legend i {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.macro-legend .dot.p { background: var(--gold); }
.macro-legend .dot.c { background: var(--sky); }
.macro-legend .dot.f { background: var(--grape); }

/* =============================================================
   PLANO: per-meal examples
   ============================================================= */

.examples-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ex-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-warm);
  border-radius: 14px;
}
.ex-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.ex-body { flex: 1; min-width: 0; }
.ex-items {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.ex-total {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  margin-top: 2px;
}

/* =============================================================
   PLANO: week visualization
   ============================================================= */

.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 24px;
}
.day-cell-week {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}
.day-cell-week .dcw-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-3);
}
.day-cell-week .dcw-n {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 700;
}
.day-cell-week .dcw-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  margin-top: 2px;
}
.day-cell-week.active {
  background: var(--coral-soft);
  border-color: var(--coral-soft);
}
.day-cell-week.active .dcw-l { color: var(--coral-deep); }
.day-cell-week.active .dcw-n { color: var(--coral-deep); }
.day-cell-week.active .dcw-dot { background: var(--coral); }
.day-cell-week.today {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}

.week-plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
}
.wp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
.wp-day {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral);
  background: var(--coral-soft);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}
.wp-body { flex: 1; min-width: 0; }
.wp-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.wp-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* =============================================================
   IDENTITY CARD
   ============================================================= */

.identity-card {
  background: linear-gradient(135deg, #15193A, #2A1F4A);
  color: white;
  padding: 16px 18px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
}
.identity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 182, 39, 0.25), transparent 60%);
  pointer-events: none;
}

/* =============================================================
   THEME PICKER
   ============================================================= */

.theme-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 0 24px;
}
.theme-row button {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-row button svg { width: 20px; height: 20px; }
.theme-row button.sel {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral-deep);
}

/* =============================================================
   MODAL
   ============================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 36, 0.6);
  backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* =============================================================
   WARNING BOX: citation tag
   ============================================================= */

.warning-box .cite {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold-deep);
  opacity: 0.7;
  display: block;
  margin-top: 2px;
}

/* =============================================================
   PERIODIC AWARDS (Brasas / Fogo / Rios / Montanhas)
   ============================================================= */

/* L1: small info "?" button next to section header */
.brasas-help {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-warm);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.brasas-help:hover, .brasas-help:focus {
  background: var(--surface);
  color: var(--ink);
}


.periods-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 24px;
}
/* M2: at very narrow widths, shrink tier text so longer names like
   "Cordilheira" / "Pico da Neblina" stay on one line. */
@media (max-width: 360px) {
  .periods-row {
    gap: 6px;
    padding: 0 16px;
  }
  .period-tier {
    font-size: 13px !important;
  }
  .period-meta {
    font-size: 9px !important;
  }
}
.period-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
  align-items: center;
  gap: 6px;
}
.period-ic {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  border-radius: 50%;
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.period-ic svg { width: 20px; height: 20px; }
.period-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.period-tier {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.period-bar {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.period-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  border-radius: 999px;
  transition: width 0.6s var(--ease-out);
}
.period-meta {
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* =============================================================
   METRICS — Meu Progresso
   ============================================================= */

.progress-hero {
  margin: 0 24px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}
.progress-hero-date {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.progress-hero-insight {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.progress-hero-insight.good { color: var(--mint-deep); }
.progress-hero-insight.caution { color: var(--coral-deep); }
.progress-hero-insight .cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  opacity: 0.8;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 24px 0;
}
.metric-card-progress {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.mcp-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.mcp-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  margin-top: 2px;
}
.mcp-unit { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.mcp-delta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--ink-3);
  white-space: nowrap;
}
.mcp-delta.down { background: var(--mint-soft); color: var(--mint-deep); }
.mcp-delta.up   { background: var(--coral-soft); color: var(--coral-deep); }
.mcp-spark { width: 100%; height: 40px; }
.mcp-range {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
}
.mcp-range.ok { color: var(--mint-deep); }
.mcp-range.note { color: var(--coral-deep); }

.measure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.measure-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mf-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mf-unit { color: var(--ink-4); font-weight: 600; }

/* =============================================================
   FAMÍLIA — moments / arcs / support / connect
   ============================================================= */

.family-header { padding: 8px 24px 4px; }
.family-greet-eyebrow {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.family-greet-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2px;
}

.support-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 24px 0;
  padding: 14px;
  background: linear-gradient(135deg, var(--coral-soft), var(--gold-soft));
  border: none;
  border-radius: var(--r-md);
  width: calc(100% - 48px);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.support-cta:active { transform: scale(0.98); }
.support-cta .sc-ic {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: white;
  border-radius: 50%;
  color: var(--coral);
  flex-shrink: 0;
}
.support-cta .sc-ic svg { width: 22px; height: 22px; }
.support-cta .sc-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.support-cta .sc-sub {
  display: block;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 1px;
  font-weight: 500;
}

.ritual-card {
  margin: 14px 24px 0;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.ritual-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.ritual-bar span {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
.ritual-bar span.on {
  background: linear-gradient(90deg, var(--mint), var(--coral));
}
.ritual-copy {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.moments-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
}
.moment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}
.moment-body { flex: 1; min-width: 0; }
.moment-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.35;
}
.moment-text b { font-weight: 700; }
.moment-meta {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 2px;
}

.family-arcs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px;
}
.family-arc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}
.arc-body { flex: 1; min-width: 0; }
.arc-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.arc-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.arc-spark { width: 100%; height: 28px; margin-top: 4px; }

.connect-note {
  margin: 8px 24px 24px;
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-warm);
}
.connect-note p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.connect-note .connect-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* =============================================================
   ADVANCED OPTIONS
   ============================================================= */

.advanced-options summary { list-style: none; }
.advanced-options summary::-webkit-details-marker { display: none; }
.adv-summary {
  cursor: pointer;
  padding: 12px 16px;
  background: var(--bg-warm);
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink-2);
  font-size: 14px;
}
.adv-summary::after {
  content: ' +';
  float: right;
  color: var(--ink-3);
  font-weight: 600;
}
.advanced-options[open] > .adv-summary::after { content: ' −'; }

.adv-section {
  margin-top: 8px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.adv-subsummary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  display: block;
}
.adv-subsummary::after {
  content: '＋';
  float: right;
  color: var(--ink-3);
  font-size: 14px;
}
.adv-section[open] > .adv-subsummary::after { content: '−'; }
.adv-section[open] > .adv-subsummary { border-bottom: 1px solid var(--line); }

.adv-row {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adv-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adv-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.adv-input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  font-family: var(--font-ui);
}
.adv-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}
.adv-help {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
}
.adv-current {
  background: var(--coral-soft);
  color: var(--coral-deep);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.btn-block-soft {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-ui);
  width: 100%;
  transition: all 0.15s;
}
.btn-block-soft:hover, .btn-block-soft:active {
  background: var(--bg-warm);
  border-color: var(--line-2);
}

.bp-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bp-form .adv-input { flex: 1; text-align: center; }
.bp-sep { color: var(--ink-3); font-weight: 700; }
.bp-log {
  background: var(--bg-warm);
  border-radius: 10px;
  padding: 8px 12px;
}
.bp-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.bp-val { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
.bp-date { color: var(--ink-3); font-weight: 500; }

/* Training schedule modal */
.schedule-day {
  background: var(--bg-warm);
  border-radius: 12px;
  padding: 12px;
}
.sched-day-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}
.sched-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-row select {
  width: 100%;
  min-height: 48px;
  padding: 13px 12px;
  font-size: 15px;
}
