/* ============================================================
   Movva · design system
   Warm, premium, energetic. One accent, disciplined 60/30/10.
   Tokens are tuned from the generated design direction.
   ============================================================ */

:root {
  /* palette — generated design direction (coral terracotta on warm paper) */
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --surface-alt: #F3ECE2;
  --ink: #2A2723;
  --muted: #7A7268;
  --primary: #E5623D;
  --primary-strong: #C64A28;
  --accent: #F0A24B;
  --success: #4E8D64;
  --border: #E7DED2;

  --ring: rgba(229, 98, 61, 0.16);
  --shadow-sm: 0 1px 2px rgba(42,39,35,.05), 0 1px 1px rgba(42,39,35,.04);
  --shadow-md: 0 10px 30px -12px rgba(42,39,35,.20), 0 2px 8px -3px rgba(42,39,35,.10);
  --shadow-lg: 0 30px 60px -22px rgba(42,39,35,.28), 0 8px 20px -10px rgba(42,39,35,.13);
  --shadow-primary: 0 16px 34px -12px rgba(198,74,40,.52);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-full: 999px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

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

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #211d17 0%, transparent 55%),
    radial-gradient(1000px 700px at 110% 10%, #2a231a 0%, transparent 50%),
    #14110d;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }
::selection { background: var(--primary); color: #fff; }

/* ---------- phone frame ---------- */
.phone {
  position: relative;
  width: min(430px, 100vw);
  height: min(932px, 100dvh);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
@media (min-width: 480px) {
  .phone {
    height: min(900px, 96dvh);
    border-radius: 46px;
    border: 1px solid rgba(255,255,255,.06);
    outline: 10px solid #0b0908;
    outline-offset: -1px;
  }
}
.app { position: absolute; inset: 0; overflow: hidden; }

/* screen wrapper: scroll area + optional bottom nav padding */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 20px) 20px 132px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.scroll.no-nav { padding-bottom: calc(var(--safe-bottom) + 28px); }

/* ---------- transitions between screens ---------- */
.screen.enter { animation: screenIn .46s var(--ease-out) both; }
.screen.enter-back { animation: screenInBack .42s var(--ease-out) both; }
.screen.leave { animation: screenOut .30s var(--ease-in-out) both; position: absolute; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes screenInBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes screenOut { to { opacity: 0; transform: translateY(-8px) scale(.99); } }

/* stagger helper */
.stagger > * { opacity: 0; animation: rise .6s var(--ease-out) forwards; }
.stagger > *:nth-child(1){ animation-delay: .04s }
.stagger > *:nth-child(2){ animation-delay: .10s }
.stagger > *:nth-child(3){ animation-delay: .16s }
.stagger > *:nth-child(4){ animation-delay: .22s }
.stagger > *:nth-child(5){ animation-delay: .28s }
.stagger > *:nth-child(6){ animation-delay: .34s }
.stagger > *:nth-child(7){ animation-delay: .40s }
.stagger > *:nth-child(8){ animation-delay: .46s }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- typography ---------- */
.h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.04; letter-spacing: -.02em; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: -.015em; }
.h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.body { font-size: 15px; line-height: 1.5; color: var(--muted); font-weight: 450; }
.tiny { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.num { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 56px; padding: 0 26px; border-radius: var(--r-full);
  font-weight: 650; font-size: 16px; letter-spacing: -.01em;
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform .16s var(--ease-spring), box-shadow .2s ease, background .2s ease;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.955); }
.btn--primary { background: var(--primary); box-shadow: var(--shadow-primary); }
.btn--primary:active { background: var(--primary-strong); }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.btn--block { display: flex; width: 100%; }
.btn--lg { height: 60px; font-size: 17px; }
.btn svg { width: 20px; height: 20px; }

.iconbtn {
  width: 44px; height: 44px; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--surface);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform .16s var(--ease-spring), background .2s;
}
.iconbtn:active { transform: scale(.9); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------- cards / surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r-full);
  background: var(--surface-alt); color: var(--ink);
  font-size: 12.5px; font-weight: 600;
}
.chip svg { width: 14px; height: 14px; }
.chip--primary { background: var(--ring); color: var(--primary-strong); }
.chip--ghost { background: transparent; border: 1px solid var(--border); }

.divider { height: 1px; background: var(--border); border: 0; margin: 4px 0; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.topbar .who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: var(--r-full); flex: none;
  background: linear-gradient(140deg, var(--primary), var(--primary-strong));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow-primary);
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.ob { position: absolute; inset: 0; display: flex; flex-direction: column; color: #F4F0E9;
  background:
    radial-gradient(120% 80% at 20% 0%, #2a2118 0%, transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(229,98,61,.34) 0%, transparent 55%),
    #14110d;
}
.ob__art { flex: 1; position: relative; overflow: hidden; }
.ob__panel { padding: 28px 26px calc(30px + var(--safe-bottom)); }
.ob__dots { display: flex; gap: 7px; margin-bottom: 20px; }
.ob__dot { height: 5px; width: 22px; border-radius: 9px; background: rgba(255,255,255,.22); transition: background .4s, width .4s var(--ease-out); }
.ob__dot.on { background: var(--primary); width: 32px; }
.ob__title { font-family: var(--font-display); font-weight: 800; font-size: 33px; line-height: 1.05; letter-spacing: -.025em; margin-bottom: 12px; }
.ob__body { font-size: 15.5px; line-height: 1.55; color: rgba(244,240,233,.72); margin-bottom: 26px; max-width: 32ch; }
.ob__row { display: flex; align-items: center; gap: 14px; }
.ob__skip { color: rgba(244,240,233,.6); font-weight: 600; font-size: 14px; padding: 10px; }

/* floating blobs / orbs in onboarding art */
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; }
.floaty { animation: floaty 7s var(--ease-in-out) infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-22px) } }
.spin { animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* big wordmark mark */
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; }
.mark__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--ring); }

/* ============================================================
   LEVEL SELECT
   ============================================================ */
.level {
  position: relative; overflow: hidden;
  padding: 22px; border-radius: var(--r-xl); color: #fff;
  min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.level:active { transform: scale(.975); }
.level__glow { position: absolute; inset: 0; opacity: .95; }
.level__idx { position: absolute; top: 16px; right: 20px; font-family: var(--font-display); font-weight: 800; font-size: 54px; opacity: .22; line-height: 1; }
.level__name { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.level__desc { position: relative; font-size: 13.5px; color: rgba(255,255,255,.82); margin-top: 4px; max-width: 26ch; }
.level__meta { position: relative; display: flex; gap: 8px; margin-top: 14px; }
.level__meta .chip { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); }

/* ============================================================
   HOME
   ============================================================ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--r-xl); padding: 22px;
  background: linear-gradient(150deg, #211a13 0%, #171310 100%);
  box-shadow: var(--shadow-lg);
}
.hero__spark { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(229,98,61,.62), transparent 62%); filter: blur(6px); }
.hero__tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .02em; }
.hero__title { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin: 12px 0 6px; line-height: 1.08; }
.hero__sub { position: relative; font-size: 14px; color: rgba(255,255,255,.66); margin-bottom: 20px; }
.hero__foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hero__stats { display: flex; gap: 18px; }
.hero__stat b { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.hero__stat span { display: block; font-size: 11px; color: rgba(255,255,255,.55); font-weight: 600; }
.hero__go { width: 54px; height: 54px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; box-shadow: var(--shadow-primary); transition: transform .18s var(--ease-spring); }
.hero__go:active { transform: scale(.9); }
.hero__go svg { width: 24px; height: 24px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-head a { font-size: 13px; font-weight: 650; color: var(--primary-strong); }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.day-pill {
  aspect-ratio: 1 / 1.32; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: transform .2s var(--ease-spring);
}
.day-pill:active { transform: scale(.92); }
.day-pill small { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-pill b { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.day-pill.done { background: var(--ink); color: #fff; border-color: var(--ink); }
.day-pill.done small { color: rgba(255,255,255,.6); }
.day-pill.today { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.day-pill .tick { width: 16px; height: 16px; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 16px; border-radius: var(--r-md); }
.stat .k { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.stat .k svg { width: 16px; height: 16px; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin-top: 8px; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 3px; }

/* workout list item */
.wlist { display: flex; flex-direction: column; gap: 12px; }
.witem { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-spring); }
.witem:active { transform: scale(.985); }
.witem__thumb { width: 60px; height: 60px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.witem__thumb span { font-family: var(--font-display); font-weight: 800; font-size: 22px; position: relative; z-index: 1; }
.witem__body { flex: 1; min-width: 0; }
.witem__body h4 { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.witem__meta { display: flex; gap: 12px; margin-top: 4px; }
.witem__meta span { font-size: 12px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.witem__meta svg { width: 13px; height: 13px; opacity: .7; }
.witem__go { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-alt); display: grid; place-items: center; flex: none; }
.witem__go svg { width: 17px; height: 17px; }
.witem.is-done .witem__go { background: var(--success); color: #fff; }

/* meal teaser */
.teaser { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px; color: #fff;
  background: linear-gradient(145deg, #1f5a3f, #123a29); box-shadow: var(--shadow-md); }
.teaser h3 { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.teaser p { font-size: 13.5px; color: rgba(255,255,255,.75); margin: 6px 0 16px; max-width: 30ch; }
.teaser__ico { position: absolute; right: -10px; bottom: -14px; font-size: 96px; opacity: .18; }

/* ============================================================
   WORKOUT DETAIL
   ============================================================ */
.detail-hero { position: relative; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); padding: calc(var(--safe-top) + 18px) 22px 26px; color: #fff; }
.detail-hero__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.detail-hero__nav .iconbtn { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; backdrop-filter: blur(6px); }
.detail-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; line-height: 1.08; }
.detail-hero .meta-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.detail-hero .meta-row .chip { background: rgba(255,255,255,.18); color: #fff; }

.block-title { display: flex; align-items: center; gap: 9px; margin: 4px 0 4px; }
.block-title .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.block-title h3 { font-family: var(--font-display); font-weight: 700; font-size: 15px; }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.mini .n { width: 22px; height: 22px; border-radius: 7px; background: var(--surface-alt); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); flex: none; }
.mini p { font-size: 14px; font-weight: 500; }

.ex { padding: 15px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ex__top { display: flex; align-items: flex-start; gap: 13px; }
.ex__n { width: 40px; height: 40px; border-radius: 13px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; flex: none; }
.ex__name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.ex__muscle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ex__sets { display: flex; gap: 8px; margin-top: 13px; }
.ex__set { flex: 1; text-align: center; padding: 9px 4px; border-radius: 12px; background: var(--surface-alt); }
.ex__set b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.ex__set small { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ex__cue { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ex__cue svg { width: 15px; height: 15px; flex: none; color: var(--primary); margin-top: 1px; }

.sticky-cta { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 20px calc(18px + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 62%, transparent); }

/* ============================================================
   ACTIVE WORKOUT PLAYER
   ============================================================ */
.player { position: absolute; inset: 0; background: #14110d; color: #F4F0E9; display: flex; flex-direction: column; overflow: hidden; }
.player__bar { height: 4px; background: rgba(255,255,255,.12); }
.player__bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .5s var(--ease-out); }
.player__top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 16px) 22px 6px; }
.player__count { font-size: 13px; font-weight: 600; color: rgba(244,240,233,.6); }
.player__body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 26px; }
.player__phase { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); margin-bottom: 18px; }
.player__name { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -.02em; line-height: 1.06; margin-bottom: 10px; }
.player__muscle { font-size: 14px; color: rgba(244,240,233,.6); margin-bottom: 30px; }
.ring { position: relative; width: 240px; height: 240px; margin: 6px auto 28px; }
.ring svg { transform: rotate(-90deg); }
.ring__c { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 12; }
.ring__p { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.ring__mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring__mid .big { font-family: var(--font-display); font-weight: 800; font-size: 60px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring__mid .lab { font-size: 13px; color: rgba(244,240,233,.55); font-weight: 600; }
.player__reps { font-family: var(--font-display); font-weight: 800; font-size: 66px; letter-spacing: -.03em; margin: 4px 0 30px; }
.player__ctrls { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 26px calc(30px + var(--safe-bottom)); }
.pbtn { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: transform .16s var(--ease-spring); }
.pbtn:active { transform: scale(.9); }
.pbtn svg { width: 24px; height: 24px; }
.pbtn--main { width: 88px; height: 88px; background: var(--primary); box-shadow: var(--shadow-primary); }
.pbtn--main svg { width: 34px; height: 34px; }
.player__next { font-size: 13px; color: rgba(244,240,233,.5); margin-top: 4px; }
.player__next b { color: rgba(244,240,233,.85); font-weight: 650; }

/* completion */
.done-screen { position: absolute; inset: 0; background: #14110d; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 30px calc(40px + var(--safe-bottom)); overflow: hidden; }
.done-badge { width: 130px; height: 130px; border-radius: 50%; background: linear-gradient(140deg, var(--primary), var(--primary-strong)); display: grid; place-items: center; box-shadow: var(--shadow-primary); margin-bottom: 30px; animation: pop .7s var(--ease-spring) both; }
.done-badge svg { width: 62px; height: 62px; }
@keyframes pop { 0% { transform: scale(0) rotate(-30deg); opacity: 0 } 60% { transform: scale(1.12) } 100% { transform: scale(1); opacity: 1 } }
.done-screen h1 { font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -.02em; margin-bottom: 10px; }
.done-screen p { color: rgba(255,255,255,.65); font-size: 15px; max-width: 30ch; margin-bottom: 26px; }
.done-stats { display: flex; gap: 12px; margin-bottom: 32px; }
.done-stat { background: rgba(255,255,255,.06); border-radius: var(--r-md); padding: 14px 20px; }
.done-stat b { font-family: var(--font-display); font-weight: 800; font-size: 24px; display: block; }
.done-stat span { font-size: 11.5px; color: rgba(255,255,255,.55); font-weight: 600; }

/* ============================================================
   NUTRITION
   ============================================================ */
.meal-card { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.meal-card__head { display: flex; align-items: center; gap: 12px; padding: 15px 16px 12px; }
.meal-card__ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; flex: none; background: var(--surface-alt); }
.meal-card__t { flex: 1; }
.meal-card__t h4 { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; }
.meal-card__t span { font-size: 12px; color: var(--muted); font-weight: 500; }
.meal-card__body { padding: 0 16px 15px; }
.meal-opt { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.45; }
.meal-opt svg { width: 16px; height: 16px; color: var(--success); flex: none; margin-top: 2px; }
.meal-tip { margin-top: 10px; display: flex; gap: 8px; padding: 11px 12px; border-radius: 12px; background: rgba(47,163,107,.10); font-size: 12.5px; color: #1c6e48; line-height: 1.45; }
.meal-tip svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list .chip { background: var(--surface); border: 1px solid var(--border); }

.principle { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.principle .no { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--primary); flex: none; width: 26px; }
.principle p { font-size: 13.5px; line-height: 1.5; }

/* ============================================================
   PROGRESS
   ============================================================ */
.xp-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 24px 22px; color: #fff; background: linear-gradient(150deg, #211a13, #171310); box-shadow: var(--shadow-lg); }
.xp-hero__lvl { font-size: 12.5px; font-weight: 700; color: var(--primary); letter-spacing: .04em; }
.xp-hero__val { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -.02em; margin: 6px 0 4px; }
.xp-hero__val small { font-size: 16px; color: rgba(255,255,255,.5); font-weight: 600; }
.xp-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); margin-top: 16px; overflow: hidden; }
.xp-track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--primary-strong)); transition: width 1s var(--ease-out); }
.xp-hero__hint { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 10px; }

.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ach { padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-align: center; transition: transform .2s var(--ease-spring); }
.ach:active { transform: scale(.97); }
.ach.locked { opacity: .48; filter: grayscale(.4); }
.ach__ico { font-size: 34px; margin-bottom: 8px; display: block; }
.ach h4 { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.ach p { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.ach__flag { display: inline-block; margin-top: 8px; font-size: 10px; font-weight: 700; color: var(--success); text-transform: uppercase; letter-spacing: .06em; }

.streak-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak-cal i { aspect-ratio: 1; border-radius: 7px; background: var(--surface-alt); }
.streak-cal i.on { background: var(--primary); }
.streak-cal i.half { background: var(--ring); }

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: calc(14px + var(--safe-bottom));
  height: 66px; border-radius: var(--r-full);
  background: rgba(23,20,16,.86); backdrop-filter: blur(18px) saturate(1.4);
  display: flex; align-items: center; justify-content: space-around; padding: 0 8px;
  box-shadow: var(--shadow-lg); z-index: 20;
}
.tab { position: relative; flex: 1; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(244,240,233,.5); transition: color .25s; }
.tab svg { width: 22px; height: 22px; transition: transform .3s var(--ease-spring); }
.tab span { font-size: 10px; font-weight: 650; }
.tab.on { color: #fff; }
.tab.on svg { transform: translateY(-1px) scale(1.08); }
.tab.on::before { content: ""; position: absolute; top: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); opacity: .16; }
.tab__pip { position: absolute; bottom: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); opacity: 0; transform: scale(0); transition: .3s var(--ease-spring); }
.tab.on .tab__pip { opacity: 1; transform: scale(1); }

/* ---------- confetti / fx layer ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti { position: absolute; width: 9px; height: 14px; border-radius: 2px; will-change: transform, opacity; }

/* count up helper number */
.countup { display: inline-block; }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-full);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 60;
  opacity: 0; transition: transform .4s var(--ease-spring), opacity .3s; display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
