/* Forma by Eloge — "Move. Fuel. Glow." Electric night by default, bright day mode. */
@font-face { font-family: 'Unbounded'; src: url(../fonts/unbounded.woff2) format('woff2'); font-weight: 500 800; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(../fonts/manrope.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url(../fonts/vazirmatn-ar.woff2) format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --volt: #C8FF3D; --violet: #8B5CFF; --pink: #FF4D8D; --aqua: #2EE6FF; --orange: #FF8A3D; --gold: #FFD23F;
  --bg: #07070B; --bg2: #0E0E16; --card: rgba(255,255,255,.045); --card2: rgba(255,255,255,.08); --line: rgba(255,255,255,.09);
  --ink: #F6F5FF; --mute: #9C9AB5; --on-volt: #0A0A0F;
  --r: 26px; --r-sm: 16px; --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --display: 'Unbounded', 'Vazirmatn', system-ui, sans-serif; --body: 'Manrope', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
[data-theme=light] {
  --volt: #7FC400; --violet: #6E3BFF; --pink: #F0306F; --aqua: #00A9D6; --orange: #FF6A13; --gold: #E0A800;
  --bg: #F5F3FF; --bg2: #FFFFFF; --card: rgba(255,255,255,.78); --card2: rgba(20,10,60,.05); --line: rgba(20,10,60,.09);
  --ink: #14112B; --mute: #6B6788; --on-volt: #0A0A0F; --shadow: 0 18px 50px -24px rgba(60,30,160,.35);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; min-height: 100dvh; background: transparent; color: var(--ink); font: 500 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
[dir=rtl] body { font-family: 'Vazirmatn', var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--aqua); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3, [dir=rtl] .big { font-family: 'Vazirmatn', var(--display); font-weight: 800; letter-spacing: 0; }
h1 { font-size: clamp(22px, 6vw, 30px); }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
small { font-size: .78em; }
.muted { color: var(--mute); }
.fine { color: var(--mute); font-size: 12px; padding: 4px 6px 0; }
.center { text-align: center; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
[dir=rtl] .eyebrow { letter-spacing: 0; }
.emo { font-size: 1.15em; line-height: 1; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 10px; }

/* ---------- aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .32; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: var(--violet); top: -35vmax; left: -20vmax; }
.aurora i:nth-child(2) { background: var(--pink); top: 10vmax; right: -40vmax; opacity: .18; animation-duration: 28s; }
.aurora i:nth-child(3) { background: var(--volt); bottom: -50vmax; left: 0; opacity: .12; animation-duration: 34s; }
[data-theme=light] .aurora i { opacity: .2; }
[data-theme=light] .aurora i:nth-child(3) { opacity: .14; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 70%); }
[data-theme=light] body::after { background-image: radial-gradient(rgba(40,20,120,.07) 1px, transparent 1px); }

/* ---------- layout ---------- */
.view { max-width: 560px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.view > * { min-width: 0; }
.enter .view { animation: rise .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); }
.glass { background: linear-gradient(150deg, rgba(139,92,255,.18), rgba(255,77,141,.06) 50%, rgba(46,230,255,.08)), var(--card); }
[data-theme=light] .glass { background: linear-gradient(150deg, rgba(110,59,255,.12), rgba(240,48,111,.05) 50%, rgba(0,169,214,.07)), var(--card); }
.row-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.row-h h2 { flex: 1; display: flex; align-items: center; gap: 8px; }
.row-h.pad { padding: 6px 4px 0; margin-bottom: 0; }

/* ---------- header ---------- */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 6px; }
.top-r { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; }
.chip.flame { color: var(--orange); }
.chip.on { background: var(--volt); color: var(--on-volt); border-color: transparent; }
.chip.push { background: color-mix(in srgb, var(--volt) 18%, transparent); color: var(--volt); }
.chip.steady { background: color-mix(in srgb, var(--aqua) 18%, transparent); color: var(--aqua); }
.chip.recover { background: color-mix(in srgb, var(--violet) 22%, transparent); color: var(--violet); }
.avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 200deg, var(--volt), var(--aqua), var(--violet), var(--pink), var(--volt)); padding: 2px; }
.avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--bg2); font: 700 16px var(--display); }
.avatar b { position: absolute; bottom: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--volt); color: var(--on-volt); font-size: 11px; display: grid; place-items: center; border: 2px solid var(--bg); }

.datenav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dn-label { padding: 7px 16px; border-radius: 999px; background: var(--card2); font-weight: 700; font-size: 13.5px; min-width: 130px; }
.ib { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--ink); background: transparent; transition: transform .15s, background .2s; }
.ib:hover { background: var(--card2); }
.ib:active { transform: scale(.9); }
.ib:disabled { opacity: .25; pointer-events: none; }
.ib.round { border-radius: 50%; background: var(--card2); }
.ib.add { background: var(--volt); color: var(--on-volt); }
.ib.sm { width: 30px; height: 30px; }
.ib.sm .ic { width: 16px; height: 16px; }

/* ---------- hero rings ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 20px 16px; }
.hero-rings { position: relative; }
.rings { width: 100%; height: auto; display: block; overflow: visible; }
.arc { transition: stroke-dashoffset 1.1s cubic-bezier(.2,.9,.2,1); }
.enter .arc, .sheet .arc { animation: draw 1.3s cubic-bezier(.2,.9,.2,1) both; }
@keyframes draw { from { stroke-dashoffset: var(--L); } }
.hero-mid, .fh-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.big { font: 800 40px/1 var(--display); letter-spacing: -.03em; }
.big small { font-size: .45em; color: var(--mute); }
.big.sm { font-size: 28px; }
.hero-mid span, .fh-mid span { font-size: 12px; color: var(--mute); font-weight: 700; margin-top: 4px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.legend li { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; cursor: pointer; }
.legend span { font-size: 12.5px; color: var(--mute); font-weight: 700; }
.legend b { grid-column: 2; font: 700 17px var(--display); }
.legend b small { color: var(--mute); font: 600 11px var(--body); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; box-shadow: 0 0 12px currentColor; }
.dot.orange { background: var(--orange); color: var(--orange); } .dot.aqua { background: var(--aqua); color: var(--aqua); }
.dot.volt { background: var(--volt); color: var(--volt); } .dot.violet { background: var(--violet); color: var(--violet); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q { display: grid; justify-items: center; gap: 7px; padding: 14px 4px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; transition: transform .15s; }
.q .ic { width: 42px; height: 42px; padding: 10px; border-radius: 14px; color: var(--on-volt); }
.q.aqua .ic { background: var(--aqua); box-shadow: 0 8px 24px -6px var(--aqua); } .q.orange .ic { background: var(--orange); box-shadow: 0 8px 24px -6px var(--orange); }
.q.volt .ic { background: var(--volt); box-shadow: 0 8px 24px -6px var(--volt); } .q.violet .ic { background: var(--violet); color: #fff; box-shadow: 0 8px 24px -6px var(--violet); }
.q:active, .hpill:active, .plate:active, .sess:active, .br:active, .act:active { transform: scale(.95); }

/* ---------- pulse ---------- */
.pulse-card { display: flex; align-items: center; gap: 16px; cursor: pointer; --pc: var(--mute); }
.pulse-card.push { --pc: var(--volt); } .pulse-card.steady { --pc: var(--aqua); } .pulse-card.recover { --pc: var(--violet); }
.pulse-card > div:nth-child(2) { flex: 1; } .pulse-card p { color: var(--mute); font-size: 13.5px; margin-top: 3px; }
.pulse-num { position: relative; width: 74px; height: 74px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 2px solid var(--pc); box-shadow: 0 0 30px -6px var(--pc), inset 0 0 20px -8px var(--pc); }
.pulse-num b { font: 800 26px/1 var(--display); color: var(--pc); }
.pulse-num small { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.pulse-num.empty { border-style: dashed; }
.pulse-dot { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--pc); animation: ping 2.2s ease-out infinite; }
@keyframes ping { to { transform: scale(1.35); opacity: 0; } }
.chev { color: var(--mute); }

.next { display: flex; align-items: center; gap: 14px; }
.next > div { flex: 1; }
.next .emo { font-size: 28px; }

/* ---------- habits ---------- */
.habit-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hpill { --c: var(--volt); display: inline-flex; align-items: center; gap: 8px; padding: 9px 10px 9px 13px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; transition: all .25s; max-width: 100%; }
[dir=rtl] .hpill { padding: 9px 13px 9px 10px; }
.hpill .hn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpill i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--c); flex: none; }
.hpill i .ic { width: 13px; height: 13px; opacity: 0; stroke-width: 3.5; }
.hpill.done { background: var(--c); color: var(--on-volt); border-color: transparent; box-shadow: 0 8px 26px -10px var(--c); }
.hpill.done i { background: var(--on-volt); border-color: var(--on-volt); }
.hpill.done i .ic { opacity: 1; color: var(--c); }
.volt { --c: var(--volt); } .violet { --c: var(--violet); } .pink { --c: var(--pink); } .aqua { --c: var(--aqua); } .orange { --c: var(--orange); }
.hpill.violet.done, .hpill.pink.done { color: #fff; }

.habits { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.habit { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; transition: background .2s; }
.habit.done { background: color-mix(in srgb, var(--c) 10%, transparent); }
.habit.off { opacity: .5; }
.h-tick { position: relative; width: 46px; height: 46px; flex: none; }
.h-tick .ring { position: absolute; inset: 0; }
.h-tick .emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; }
.habit.done .h-tick .ring circle:first-child { fill: color-mix(in srgb, var(--c) 25%, transparent); }
.h-body { flex: 1; min-width: 0; cursor: pointer; }
.h-body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week { display: flex; gap: 4px; margin-top: 6px; }
.week i { width: 18px; height: 6px; border-radius: 3px; background: var(--card2); }
.week i.y { background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.week i.now { outline: 1px solid var(--mute); outline-offset: 1px; }
.streak { display: inline-flex; align-items: center; gap: 3px; font: 700 14px var(--display); color: var(--mute); }
.streak .ic { width: 16px; height: 16px; }
.streak.hot { color: var(--orange); }
.empty { text-align: center; padding: 6px 0; color: var(--mute); display: grid; gap: 12px; justify-items: center; }
.empty-cta { width: 100%; padding: 14px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--mute); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ideas.big { margin: 16px 0; }
.pill { padding: 9px 14px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; transition: all .2s; }
.pill.on { background: var(--volt); color: var(--on-volt); border-color: transparent; box-shadow: 0 8px 24px -10px var(--volt); }
.pill.ghost { background: transparent; }

/* ---------- water ---------- */
.water-card { display: flex; align-items: center; gap: 18px; }
.wc-txt { flex: 1; }
.wc-txt h2 { font-size: 28px; margin: 2px 0; } .wc-txt h2 small { font-size: 14px; color: var(--mute); }
.btns { display: flex; gap: 8px; margin-top: 12px; }
.btns.wrap { flex-wrap: wrap; }
.glass-w { position: relative; width: 82px; height: 118px; flex: none; border-radius: 10px 10px 24px 24px; border: 2.5px solid color-mix(in srgb, var(--aqua) 60%, transparent); overflow: hidden; background: color-mix(in srgb, var(--aqua) 6%, transparent); }
.glass-w .water { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill); background: linear-gradient(to top, var(--violet), var(--aqua)); transition: height 1s cubic-bezier(.2,.9,.2,1); }
.glass-w .water svg { position: absolute; top: -9px; left: 0; width: 200%; height: 10px; fill: var(--aqua); animation: wave 3s linear infinite; }
@keyframes wave { to { transform: translateX(-50%); } }
.glass-w span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 16px var(--display); text-shadow: 0 1px 8px rgba(0,0,0,.5); color: #fff; }

/* ---------- fuel ---------- */
.fuel-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.fh-ring, .mh-ring { position: relative; }
.fh-side { display: grid; gap: 10px; }
.fh-side small { display: block; color: var(--mute); font-weight: 700; font-size: 12px; }
.fh-side b { font: 700 20px var(--display); }
.macros { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mac-h { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--mute); margin-bottom: 6px; flex-wrap: wrap; }
.mac-h b { color: var(--ink); font-size: 13px; } .mac-h b small { color: var(--mute); }
.bar { height: 8px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.bar.big { height: 12px; }
.bar i { display: block; height: 100%; border-radius: inherit; transition: width 1s cubic-bezier(.2,.9,.2,1); }
.bar i.pink { background: var(--pink); } .bar i.orange { background: var(--orange); } .bar i.aqua { background: var(--aqua); }
.bar i.grad { background: linear-gradient(90deg, var(--volt), var(--aqua), var(--violet)); }
.meal .row-h { margin-bottom: 0; }
.items { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.items li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line); }
.items li > div { flex: 1; min-width: 0; }
.items b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items small { color: var(--mute); }
.items span { font: 700 14px var(--display); }
.plates { display: flex; gap: 12px; overflow-x: auto; padding: 10px 4px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding-inline: 16px; }
.plates::-webkit-scrollbar { display: none; }
.plate { flex: 0 0 200px; scroll-snap-align: start; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); text-align: start; transition: transform .15s; }
.plate img { width: 100%; height: 130px; object-fit: cover; display: block; }
.plate div { padding: 10px 12px 12px; }
.plate b { display: block; font-size: 14px; } .plate small { color: var(--mute); }

/* ---------- routine timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 67px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.tl { display: grid; grid-template-columns: 48px 40px 1fr auto; align-items: center; gap: 0 10px; padding: 7px 0; position: relative; }
.tl time { font: 700 12.5px var(--display); color: var(--mute); text-align: end; }
.tl .node { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); border: 2px solid var(--c); z-index: 1; font-size: 17px; box-shadow: 0 0 16px -4px var(--c); }
.tl-b { cursor: pointer; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, transparent); border-inline-start: 3px solid var(--c); min-width: 0; }
.tl-b b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-b small { color: var(--mute); }
.tl.done .tl-b { opacity: .55; } .tl.done .tl-b b { text-decoration: line-through; text-decoration-color: var(--c); text-decoration-thickness: 2px; }
.tl.done .node { background: var(--c); }
.tl .ib[aria-pressed=true] { background: var(--c); color: var(--on-volt); }
.now-line { position: relative; height: 22px; margin: 2px 0; }
.now-line::before { content: ''; position: absolute; inset-inline: 58px 0; top: 50%; height: 2px; background: linear-gradient(90deg, var(--pink), transparent); }
[dir=rtl] .now-line::before { background: linear-gradient(-90deg, var(--pink), transparent); }
.now-line span { position: absolute; inset-inline-start: 0; top: 1px; font-size: 11px; font-weight: 800; color: var(--pink); background: var(--bg2); padding: 2px 8px; border-radius: 8px; z-index: 1; }

.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; }
.heat i, .heat-key i { aspect-ratio: 1; border-radius: 4px; background: var(--card2); }
.heat i.l1 { background: color-mix(in srgb, var(--violet) 35%, transparent); }
.heat i.l2 { background: color-mix(in srgb, var(--violet) 75%, transparent); }
.heat i.l3 { background: var(--aqua); box-shadow: 0 0 8px -2px var(--aqua); }
.heat i.l4 { background: var(--volt); box-shadow: 0 0 10px -1px var(--volt); }
.heat-key { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--mute); }
.heat-key i { width: 11px; }
.heat-key i.l1 { background: color-mix(in srgb, var(--violet) 35%, transparent); } .heat-key i.l2 { background: color-mix(in srgb, var(--violet) 75%, transparent); }
.heat-key i.l3 { background: var(--aqua); } .heat-key i.l4 { background: var(--volt); }

/* ---------- move ---------- */
.move-hero { display: flex; align-items: center; gap: 18px; }
.move-hero h2 { margin: 3px 0 4px; }
.stat-line { margin-top: 8px; font-size: 13.5px; color: var(--mute); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stat-line b { color: var(--ink); font-family: var(--display); }
.stat-line .ic { color: var(--orange); width: 17px; }
.sessions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sess { position: relative; overflow: hidden; border-radius: 24px; padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 186px;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 55%, transparent), transparent 60%), var(--card); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); transition: transform .15s; }
.sess.rec { box-shadow: 0 0 0 2px var(--c), 0 18px 40px -16px var(--c); }
.sess.rec::after { content: '✦'; position: absolute; top: 12px; inset-inline-end: 14px; color: var(--c); font-size: 18px; }
.sess h3 { font-size: 17px; }
.sess-top p { color: var(--mute); font-size: 12.5px; font-weight: 700; }
.sess-moves { font-size: 12px; color: var(--mute); flex: 1; }
.durs { display: flex; gap: 6px; }
.dur { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 8px 0; border-radius: 12px; background: var(--c, var(--volt)); color: var(--on-volt); font: 700 13px var(--display); }
.dur .ic { width: 12px; height: 12px; fill: currentColor; }
.violet .dur, .pink .dur { color: #fff; }
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.act { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px; background: var(--card2); font-size: 12.5px; font-weight: 700; transition: transform .15s; text-align: center; }
.act .emo { font-size: 24px; }
.lib { list-style: none; padding: 0; margin: 0; }
.lib li { border-top: 1px solid var(--line); }
.lib li > button { width: 100%; display: grid; grid-template-columns: 1fr auto; text-align: start; padding: 11px 2px; gap: 0 10px; }
.lib small { color: var(--mute); grid-column: 1; }
.lvl { grid-row: 1 / 3; grid-column: 2; align-self: center; letter-spacing: 2px; font-size: 10px; }
.lvl.l1 { color: var(--volt); } .lvl.l2 { color: var(--orange); } .lvl.l3 { color: var(--pink); }
.ex-d { padding: 0 2px 14px; display: grid; gap: 6px; font-size: 13.5px; }

/* ---------- mind ---------- */
.checkin-card { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.checkin-card > div:nth-child(2) { flex: 1; }
.ci-face { font-size: 46px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 24px; background: var(--card2); flex: none; }
.breaths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.br { position: relative; overflow: hidden; display: grid; justify-items: start; gap: 2px; text-align: start; padding: 16px; border-radius: 24px; min-height: 150px; align-content: end; background: var(--card); border: 1px solid var(--line); transition: transform .15s; }
.br b { font: 700 15px var(--display); } .br small { color: var(--mute); font-weight: 700; } .br em { font-style: normal; font-size: 11px; color: var(--c); font-weight: 800; }
.orb-mini { position: absolute; top: -26px; inset-inline-end: -26px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8, var(--c) 40%, transparent 70%); opacity: .75; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.25); opacity: 1; } }
.grat { display: grid; gap: 10px; }
.grat label { display: flex; align-items: center; gap: 10px; }
.grat label span { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: #fff; font: 700 13px var(--display); }
.trail { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 110px; }
.tr-col { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; text-align: center; }
.tr-col i { align-self: end; height: var(--h); border-radius: 6px; background: var(--card2); transition: height .8s; }
.tr-col i.m1 { background: var(--violet); } .tr-col i.m2 { background: color-mix(in srgb, var(--violet) 50%, var(--aqua)); } .tr-col i.m3 { background: var(--aqua); }
.tr-col i.m4 { background: color-mix(in srgb, var(--aqua) 40%, var(--volt)); } .tr-col i.m5 { background: var(--volt); box-shadow: 0 0 10px -2px var(--volt); }
.tr-col small { color: var(--mute); font-size: 10px; }

/* ---------- me ---------- */
.me-hero { display: flex; align-items: center; gap: 18px; }
.lvl-badge { width: 92px; height: 92px; flex: none; border-radius: 30px; display: grid; place-content: center; text-align: center; transform: rotate(-6deg);
  background: conic-gradient(from 180deg, var(--volt), var(--aqua), var(--violet), var(--pink), var(--orange), var(--volt)); color: var(--on-volt); box-shadow: 0 16px 40px -14px var(--violet); }
.lvl-badge b { font: 800 34px/1 var(--display); } .lvl-badge span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.xp { flex: 1; } .xp .row-h { margin-bottom: 8px; font-weight: 700; font-size: 13px; justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { padding: 12px; border-radius: 16px; background: var(--card2); }
.stats small { display: block; color: var(--mute); font-weight: 700; font-size: 11.5px; }
.stats b { font: 700 19px var(--display); } .stats b small { display: inline; font: 600 11px var(--body); }
.chart { width: 100%; height: auto; }
.chart .ax { font-size: 10px; fill: var(--mute); }
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goals label > span { display: block; font-size: 12px; color: var(--mute); font-weight: 700; margin-bottom: 4px; }
.goals .btn { grid-column: 1 / -1; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set > span { font-weight: 700; }
.inline { display: flex; gap: 6px; } .inline input { width: 140px; }
.about p { margin-top: 8px; }
.logo-f { font: 800 1em var(--display); background: linear-gradient(90deg, var(--volt), var(--aqua), var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot { text-align: center; color: var(--mute); font-size: 12px; padding: 10px 0 0; }
.foot a { color: var(--ink); font-weight: 700; text-decoration: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 16px; background: var(--volt); color: var(--on-volt); font-weight: 800; font-size: 14.5px; transition: transform .15s, box-shadow .2s; box-shadow: 0 10px 30px -12px var(--volt); cursor: pointer; }
.btn:active { transform: scale(.96); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 12px; }
.btn.big { padding: 16px 24px; font-size: 16px; border-radius: 20px; }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--card2); color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--pink); color: #fff; box-shadow: 0 10px 30px -14px var(--pink); }
.btn.danger.ghost { background: transparent; color: var(--pink); }
.btn.violet { background: var(--violet); color: #fff; box-shadow: 0 10px 30px -12px var(--violet); } .btn.pink { background: var(--pink); color: #fff; }
.btn.aqua { background: var(--aqua); box-shadow: 0 10px 30px -12px var(--aqua); } .btn.orange { background: var(--orange); box-shadow: 0 10px 30px -12px var(--orange); }
.link { color: var(--aqua); font-weight: 700; font-size: 13.5px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card2); outline: none; transition: border-color .2s; font-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); }
select option { background: var(--bg2); }
.lbl { display: grid; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--mute); }
.lbl > input, .lbl > select, .lbl > textarea, .lbl .in { color: var(--ink); }
.in { position: relative; }
.in em { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--mute); font-size: 13px; pointer-events: none; }
.in input { padding-inline-end: 48px !important; }
.stack { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--volt); }
input[type=range] { width: 100%; accent-color: var(--violet); }
output { color: var(--ink); font: 700 15px var(--display); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--card2); gap: 2px; flex-wrap: wrap; }
.seg button, .seg label span { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--mute); cursor: pointer; }
.seg button .ic { width: 15px; height: 15px; }
.seg button.on, .seg input:checked + span { background: var(--bg2); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg.center { display: flex; width: max-content; margin: 0 auto 18px; }
.meals-seg { display: flex; margin-bottom: 12px; }
.meals-seg button { flex: 1; justify-content: center; padding: 8px 4px; font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip.tag { cursor: pointer; } .chip.tag input { display: none; } .chip.tag:has(input:checked) { background: var(--violet); color: #fff; border-color: transparent; }
.emojis, .swatches, .days { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis input, .swatches input, .days input, .scale input { position: absolute; opacity: 0; pointer-events: none; }
.emojis span { width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px; border-radius: 12px; background: var(--card2); border: 2px solid transparent; cursor: pointer; }
.emojis input:checked + span { border-color: var(--volt); background: color-mix(in srgb, var(--volt) 15%, transparent); }
.sw { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid transparent; }
.swatches input:checked + .sw { border-color: var(--ink); box-shadow: 0 0 16px -2px var(--c); }
.days span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--card2); font-weight: 800; cursor: pointer; color: var(--ink); }
.days input:checked + span { background: var(--volt); color: var(--on-volt); }
.emojis input:focus-visible + span, .swatches input:focus-visible + .sw, .days input:focus-visible + span, .scale input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--volt); outline-offset: 2px; }
.scale { border: 0; padding: 0; margin: 0; display: flex; justify-content: space-between; gap: 6px; }
.scale legend { font-size: 12.5px; font-weight: 700; color: var(--mute); margin-bottom: 6px; padding: 0; }
.scale label { flex: 1; }
.scale span { display: grid; place-items: center; height: 52px; font-size: 26px; border-radius: 16px; background: var(--card2); cursor: pointer; transition: all .2s; filter: grayscale(.7); opacity: .7; }
.scale input:checked + span { background: color-mix(in srgb, var(--violet) 30%, transparent); filter: none; opacity: 1; transform: scale(1.06); box-shadow: inset 0 0 0 2px var(--violet); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 520px); display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 7px; border-radius: 28px; background: color-mix(in srgb, var(--bg2) 78%, transparent); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--line); box-shadow: 0 18px 50px -10px rgba(0,0,0,.55); }
.tab { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px; color: var(--mute); font-size: 11px; font-weight: 800; transition: color .2s, background .25s; }
.tab .ic { width: 22px; height: 22px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tab.on { color: var(--on-volt); background: var(--volt); box-shadow: 0 8px 22px -8px var(--volt); }
.tab.on .ic { transform: translateY(-1px) scale(1.1); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(4,3,12,.6); backdrop-filter: blur(4px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 31; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg2); border-radius: 30px 30px 0 0; padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; animation: up .35s cubic-bezier(.2,.9,.2,1); outline: none; }
@keyframes up { from { transform: translate(-50%, 100%); } }
.sheet-stay .sheet, .sheet-stay .scrim, .ob-stay .ob-step { animation: none; }
.sheet > h2 { font-size: 20px; margin: 8px 44px 14px 0; display: flex; align-items: center; gap: 8px; }
[dir=rtl] .sheet > h2 { margin: 8px 0 14px 44px; }
.sheet .eyebrow { margin-top: 10px; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.close { position: absolute; top: 14px; inset-inline-end: 14px; background: var(--card2); border-radius: 50%; z-index: 2; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 16px; background: var(--card2); border: 1.5px solid var(--line); }
.search input { border: 0 !important; background: transparent !important; padding-inline: 0 !important; }
.search .ic { color: var(--mute); }
.foods { list-style: none; padding: 0; margin: 0 0 12px; }
.foods li button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0 10px; text-align: start; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.foods li button small { color: var(--mute); grid-column: 1; }
.foods li button > span { grid-column: 2; grid-row: 1 / 3; align-self: center; font: 700 14px var(--display); text-align: end; }
.foods li button > span small { display: block; font: 600 10px var(--body); }
.foods li.muted { padding: 16px 4px; }
.star .ic { width: 22px; height: 22px; } .star.on { color: var(--gold); } .star.on .ic { fill: var(--gold); }
.portion-big { display: flex; align-items: baseline; gap: 8px; } .portion-big b { font: 800 54px/1 var(--display); background: linear-gradient(90deg, var(--orange), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pm { display: flex; gap: 16px; color: var(--mute); font-weight: 700; margin: 8px 0 16px; } .pm b { color: var(--ink); }
.est { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.est > div { padding: 12px; border-radius: 16px; background: var(--card2); } .est small { display: block; color: var(--mute); font-weight: 700; font-size: 11.5px; } .est b { font: 700 19px var(--display); }
.est .hl { background: var(--volt); color: var(--on-volt); } .est .hl small { color: inherit; opacity: .7; }
.span3 { grid-column: 1 / -1; }

/* full-screen players */
.scrim.full { background: var(--bg); backdrop-filter: none; }
.sheet.full { top: 0; bottom: 0; max-height: none; height: 100dvh; border-radius: 0; border: 0; display: grid; place-items: center; animation: fade .3s; padding-top: max(20px, env(safe-area-inset-top));
  background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--violet) 30%, transparent), transparent), var(--bg); }
.player-in { width: 100%; max-width: 440px; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 8px; }
.ptitle { font-size: 26px; } .ptitle.xl { font-size: clamp(26px, 8vw, 36px); }
.count { font: 800 clamp(96px, 30vw, 150px)/1 var(--display); letter-spacing: -.05em; background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--c, var(--volt)) 80%, var(--ink))); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 40px color-mix(in srgb, var(--c, var(--volt)) 50%, transparent)); }
.rest .count { --c: var(--aqua); }
.unit { margin-top: -10px; color: var(--mute); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.cue { font-size: 16px; max-width: 340px; }
.player-in .btns { width: 100%; margin-top: 18px; } .player-in .btns .btn { flex: 1; }
.wbar { width: 100%; height: 6px; border-radius: 3px; background: var(--card2); overflow: hidden; margin-bottom: 18px; } .wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--volt), var(--aqua), var(--violet)); transition: width .4s; }
.durs.big { width: 100%; margin-top: 12px; } .durs.big .dur { padding: 16px 0; font-size: 16px; border-radius: 18px; }
.orb { --c: var(--aqua); width: min(62vw, 270px); aspect-ratio: 1; display: grid; place-items: center; margin: 26px 0; }
.orb span { width: 100%; height: 100%; border-radius: 50%; transform: scale(.55); transition: transform 4s cubic-bezier(.45,.05,.55,.95); transition-duration: inherit;
  background: radial-gradient(circle at 35% 30%, #ffffffcc, var(--c) 38%, color-mix(in srgb, var(--c) 40%, var(--violet)) 70%); box-shadow: 0 0 80px -10px var(--c), 0 0 160px -30px var(--violet); }
.orb[data-p=in] span { transform: scale(1); }
.orb[data-p=out] span { transform: scale(.55); }
.orb.idle span { animation: breathe 6s ease-in-out infinite; transform: scale(.75); }
.phase { font-size: 30px; } .timer { font: 700 18px var(--display); color: var(--mute); margin-bottom: 10px; }

/* ---------- onboarding ---------- */
.onboard { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 20px 40px; display: grid; align-content: center; gap: 20px; position: relative; }
.onboard .dots { position: absolute; top: max(28px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.onboard .dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .3s; }
.onboard .dots i.on { width: 26px; background: var(--volt); }
.onboard .back { position: absolute; top: max(18px, env(safe-area-inset-top)); inset-inline-start: 14px; }
.ob-step { display: grid; gap: 14px; animation: rise .45s cubic-bezier(.2,.8,.2,1); }
.ob-hero { text-align: center; display: grid; gap: 10px; margin-bottom: 18px; }
.logo-big { position: relative; font: 800 clamp(56px, 18vw, 84px)/1 var(--display); letter-spacing: -.05em; background: linear-gradient(100deg, var(--volt) 10%, var(--aqua) 40%, var(--violet) 70%, var(--pink)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; direction: ltr; }
.logo-big i { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 24px var(--volt); top: 6px; margin-left: 4px; animation: breathe 2.5s ease-in-out infinite; }
@keyframes shine { to { background-position: 200% 0; } }
.tag { font: 700 18px var(--display); }
[dir=rtl] .tag { font-family: 'Vazirmatn'; }
.ob-h { font-size: 24px; }
.aims { display: grid; gap: 10px; }
.aim { padding: 18px; border-radius: 20px; text-align: start; font: 700 16px var(--display); background: var(--card); border: 1px solid var(--line); transition: all .2s; position: relative; overflow: hidden; }
[dir=rtl] .aim { font-family: 'Vazirmatn'; }
.aim::before { content: ''; position: absolute; inset-inline-end: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--c); opacity: .35; filter: blur(10px); }
.aim.c0 { --c: var(--volt); } .aim.c1 { --c: var(--pink); } .aim.c2 { --c: var(--orange); } .aim.c3 { --c: var(--violet); } .aim.c4 { --c: var(--aqua); }
.aim.on, .aim:hover { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }

/* ---------- toast & confetti ---------- */
.toast { position: fixed; z-index: 50; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translate(-50%, -140%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 18px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; box-shadow: 0 14px 40px -10px rgba(0,0,0,.5); transition: transform .4s cubic-bezier(.3,1.4,.5,1); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.gold { background: linear-gradient(90deg, var(--volt), var(--aqua)); color: var(--on-volt); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* ---------- responsive / motion ---------- */
@media (max-width: 380px) {
  .hero { grid-template-columns: 1fr; } .hero-rings { width: 74%; margin: 0 auto; } .legend { grid-template-columns: 1fr 1fr; }
  .fuel-hero { grid-template-columns: 1fr; justify-items: center; } .fh-side { grid-template-columns: repeat(3, 1fr); width: 100%; text-align: center; }
  .macros { width: 100%; } .stats { grid-template-columns: 1fr 1fr; } .tab span { font-size: 10px; }
}
@media (min-width: 900px) { .view { max-width: 620px; } }
[data-motion=off] *, [data-motion=off] *::before, [data-motion=off] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
[dir=rtl] .legend b, [dir=rtl] .stats b, [dir=rtl] .mac-h b, [dir=rtl] .items span { direction: ltr; unicode-bidi: isolate; }
[dir=rtl] .legend b { text-align: right; }
.dur { font-size: 12px; gap: 2px; }
.version { text-align: center; color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 0 0; direction: ltr; }
