:root {
  --bg: #F4F5FB;
  --card: #FFFFFF;
  --sand: #ECEDF7;
  --sage: #A9B4F7;
  --sage-dark: #6E74E8;
  --grad: linear-gradient(135deg, #7C9CF5 0%, #A27CF0 100%);
  --water: #5FA8E0;
  --water-dark: #3F86C0;
  --over: #F29A8B;
  --ink: #24233A;
  --muted: #6E6C8C;
  --radius: 26px;
  --shadow: 0 10px 30px rgba(90, 100, 180, 0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Assistant, system-ui, sans-serif; }
body { min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
main { max-width: 480px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 20px 24px; display: flex; flex-direction: column; gap: 22px; }
h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { font-size: 16px; background: var(--bg); border: none; border-radius: 14px; padding: 0 14px; min-height: 48px; width: 100%; }
textarea { padding: 12px 14px; min-height: 80px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.btn { min-height: 52px; border: none; border-radius: 999px; background: var(--grad); color: #fff; font-size: 17px; font-weight: 600; box-shadow: 0 10px 24px rgba(124, 120, 240, 0.28); padding: 0 22px; }
.btn.ghost { background: var(--card); color: var(--sage-dark); box-shadow: inset 0 0 0 1.5px var(--sage); }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 16px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--card); display: flex; align-items: center; justify-content: center; }
.icon-btn svg, .tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: none; background: var(--card); font-size: 14px; }
.chip.on { background: var(--grad); color: #fff; }
.bar { height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; flex-grow: 1; }
.bar > div { height: 100%; border-radius: 4px; background: var(--grad); }
.tabs { position: fixed; bottom: calc(14px + env(safe-area-inset-bottom)); inset-inline: 18px; max-width: 444px; margin: 0 auto; height: 64px; background: var(--card); border-radius: 32px; box-shadow: 0 10px 30px rgba(90, 100, 180, 0.14); display: flex; justify-content: space-between; align-items: center; padding: 0 12px; z-index: 5; }
.tabs a { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #A5A3BF; }
.tabs a.on { background: var(--grad); color: #fff; }
.coach { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px 14px; border: none; text-align: start; width: 100%; }
.coach .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--sage); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.habits { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.habit { border: none; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.habit.done span { color: var(--sage-dark); font-weight: 500; }
.rate { display: flex; justify-content: space-between; }
.rate button { width: 52px; height: 52px; border: none; background: none; display: flex; align-items: center; justify-content: center; }
.rate button svg { width: 34px; height: 34px; }
.rate button.on svg { fill: url(#g); }
.step { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 18px; padding: 12px 14px; }
.step.now { box-shadow: inset 0 0 0 2px var(--sage); }
.step .grow { flex-grow: 1; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { box-shadow: var(--shadow); background: var(--card); border-radius: 16px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
.item .grow { flex-grow: 1; display: flex; flex-direction: column; }
.add { width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--sand); color: var(--sage-dark); font-size: 20px; }
.sheet { position: fixed; inset: 0; background: rgba(47,59,51,.35); z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet > div { position: relative; background: var(--bg); width: 100%; max-width: 480px; border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 88vh; overflow-y: auto; }
.toast { position: fixed; top: calc(16px + env(safe-area-inset-top)); inset-inline: 0; margin: 0 auto; width: fit-content; max-width: 90%; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; opacity: 0; transform: translateY(-10px); transition: .25s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: none; }
.garden { background: var(--grad); border-radius: 30px; overflow: hidden; box-shadow: 0 14px 34px rgba(124, 120, 240, 0.32); }
.garden svg { width: 100%; height: auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@keyframes sway { 0%,100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes fly { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px,-10px); } }
.sway { animation: sway 5s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
.fly { animation: fly 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .sway, .fly { animation: none; } }
[hidden] { display: none !important; }
.icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pick { height: 44px; border-radius: 12px; border: none; background: var(--card); display: flex; align-items: center; justify-content: center; }
.pick.on { box-shadow: inset 0 0 0 2px var(--sage-dark); }
div.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.sheet input, .sheet select, .sheet textarea { background: var(--card); }
.habits.mini { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
/* Today */
.hero { position: relative; display: block; height: 236px; border-radius: 30px; overflow: hidden; color: #fff; text-decoration: none; background: var(--grad); box-shadow: 0 14px 34px rgba(124, 120, 240, 0.32); }
.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .count { position: absolute; top: 22px; inset-inline-start: 22px; display: flex; flex-direction: column; gap: 2px; }
.hero .count b { font-size: 15px; font-weight: 600; opacity: .9; }
.hero .count span { font-size: 44px; font-weight: 300; line-height: 1; }
.hero .segs { position: absolute; top: 96px; inset-inline-start: 22px; width: 110px; display: grid; gap: 4px; }
.hero .segs i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .32); }
.hero .segs i.on { background: #fff; }
.tasks { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 10px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
.tip { margin: 0; padding: 0 6px; border: none; background: none; font: inherit; font-size: 15px; line-height: 1.5; color: var(--muted); text-align: start; }

.tlabel { grid-column: 1 / -1; margin: 0 8px 2px; font-size: 15px; font-weight: 600; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { align-items: center; gap: 10px; position: relative; padding: 18px 12px; }
.stat .ic { position: absolute; top: 18px; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.stat .ic svg { width: 28px; height: 28px; }
.ptiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ptile { border: none; font: inherit; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ptile .pic { width: 48px; height: 48px; border-radius: 24px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; }
.ptile.full .pic { background: var(--grad); }
.dots { display: flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--sand); }
.dots i.on { background: var(--grad); }

.undo { position: fixed; bottom: calc(92px + env(safe-area-inset-bottom)); inset-inline: 0; margin: 0 auto; width: fit-content; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 6px 6px 6px 16px; border-radius: 999px; font-size: 16px; z-index: 20; box-shadow: var(--shadow); }
.undo button { border: none; background: rgba(255,255,255,.16); width: 38px; height: 38px; border-radius: 19px; display: flex; align-items: center; justify-content: center; }

.back { color: var(--muted); }
.ptsb { background: var(--card); color: var(--sage-dark); font-weight: 600; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.thero { background: var(--grad); border-radius: 30px; box-shadow: 0 14px 34px rgba(124,120,240,.32); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; }
.thero .muted { color: rgba(255,255,255,.8); }
.tring { position: relative; width: 170px; height: 170px; }
.tring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 26px; }
.tring b { font-size: 40px; font-weight: 300; }
.tring span { font-size: 15px; opacity: .85; }
.tplay { width: 64px; height: 64px; border-radius: 32px; border: none; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(60,50,160,.25); }
.tplay svg { width: 28px; height: 28px; }
.tbig { width: 96px; height: 96px; border-radius: 48px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; }
.tbig svg { width: 44px; height: 44px; }
.thero .segs { width: 100%; display: grid; gap: 5px; }
.thero .segs i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.32); }
.thero .segs i.on { background: #fff; }
.num { width: 32px; height: 32px; border-radius: 16px; background: #F1F2FB; color: var(--sage-dark); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.num.on { background: var(--grad); }
.num svg { width: 18px; height: 18px; }
.demo { width: 36px; height: 36px; border-radius: 18px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demo svg { width: 18px; height: 18px; }

.fhero { background: var(--grad); border-radius: 30px; box-shadow: 0 14px 34px rgba(124,120,240,.32); padding: 20px; display: flex; align-items: center; gap: 18px; color: #fff; }
.kring { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.kring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kring b { font-size: 32px; font-weight: 300; line-height: 1; }
.kring span { font-size: 14px; opacity: .8; }
.macros { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.mrow { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; font-size: 14px; }
.mrow .wbar { grid-column: 1 / -1; grid-row: 2; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; }
.mrow .wbar div { height: 100%; background: #fff; border-radius: 3px; }
.mrow span[dir] { opacity: .85; }
.eaten { gap: 10px; }
.x { border: none; background: #F1F2FB; width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.x svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); padding: 6px 16px 6px 6px; }
.search .sic { display: flex; }
.search input { border: none; background: none; box-shadow: none; padding: 8px 0; flex-grow: 1; min-width: 0; }
[data-edit] svg { stroke: #B9B7D0 !important; }
.kring span { border-top: 1px solid rgba(255,255,255,.4); margin-top: 4px; padding-top: 2px; }

.whero { background: var(--grad); border-radius: 30px; box-shadow: 0 14px 34px rgba(124,120,240,.32); padding: 22px; display: flex; flex-direction: column; gap: 14px; color: #fff; }
.whero b { font-size: 44px; font-weight: 300; line-height: 1; }
.wgoal { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.2); padding: 6px 12px; border-radius: 999px; }
.wgoal svg { width: 16px; height: 16px; }
.wbtn { align-self: center; border: none; background: #fff; color: var(--sage-dark); font: inherit; font-weight: 600; height: 44px; padding: 0 20px; border-radius: 22px; display: flex; align-items: center; gap: 6px; }
.wbtn svg { width: 18px; height: 18px; }
.gstat { align-items: center; gap: 6px; }
.gstat b { font-size: 30px; font-weight: 300; }
.gic { width: 48px; height: 48px; border-radius: 24px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; }
.mring { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; }
.goalrow { min-height: 40px; }
.hic { width: 32px; height: 32px; border-radius: 16px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; }
.hic svg { width: 18px; height: 18px; }

.hrow { border: none; font: inherit; color: inherit; text-align: start; width: 100%; }
.hic.big { width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0; }
.hic.big svg { width: 22px; height: 22px; }
.hic.full { background: var(--grad); }
.chev { width: 20px; height: 20px; fill: none; stroke: #C9C7DD; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.addt { border: none; font: inherit; color: inherit; text-align: start; gap: 8px; }

.habit .badge { position: absolute; top: -2px; inset-inline-start: -2px; width: 22px; height: 22px; border-radius: 11px; background: #3FC79A; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(63,199,154,.4); }
.habit .badge svg { width: 13px; height: 13px; stroke-width: 2.4; }
.habit.pop .face { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.habit.pop .badge { animation: badge .5s .15s both cubic-bezier(.3,1.6,.5,1); }
.habit .burst { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; animation: burst .7s ease-out forwards;
  background: radial-gradient(circle, #FFD27A 0 3px, transparent 4px) 50% 0 / 8px 8px no-repeat, radial-gradient(circle, #A27CF0 0 3px, transparent 4px) 100% 50% / 8px 8px no-repeat, radial-gradient(circle, #3FC79A 0 3px, transparent 4px) 50% 100% / 8px 8px no-repeat, radial-gradient(circle, #7C9CF5 0 3px, transparent 4px) 0 50% / 8px 8px no-repeat, radial-gradient(circle, #FFB8CC 0 3px, transparent 4px) 15% 15% / 8px 8px no-repeat, radial-gradient(circle, #FFD27A 0 3px, transparent 4px) 85% 85% / 8px 8px no-repeat; }
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes badge { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes burst { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .habit.pop .face, .habit.pop .badge, .habit .burst { animation: none; } .habit .burst { display: none; } }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 32px; text-align: center; font-size: 24px; font-weight: 400; }
.stepper .btn { margin: 0; }

.src { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.src label { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); cursor: pointer; }
.src .ic { width: 48px; height: 48px; border-radius: 24px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; }
.sheet .src label { box-shadow: none; height: 80px; }
.aiwait { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--sage-dark); font-weight: 600; }
.aiwait svg { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ings { display: flex; flex-wrap: wrap; gap: 8px; }
.ing { display: flex; align-items: center; gap: 6px; background: #F1F2FB; border-radius: 999px; padding: 6px 6px 6px 14px; font-size: 15px; }
.ing.plain { padding: 6px 14px; }
.ing button { border: none; width: 22px; height: 22px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.ing button svg { width: 12px; height: 12px; }
.fold summary { font-weight: 600; cursor: pointer; list-style-position: inside; }
.left { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 15px; }
.left b { color: var(--ink); font-weight: 600; }
.rc { background: var(--card); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.rc .top { background: var(--grad); color: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rc .top h2 { font-size: 19px; }
.meta { display: flex; gap: 14px; font-size: 14px; flex-wrap: wrap; }
.meta span { display: flex; align-items: center; gap: 4px; }
.meta svg { width: 16px; height: 16px; }
.rc .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.rc ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.mini { border: none; font: inherit; color: inherit; text-align: start; width: 100%; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.mini .d { width: 44px; height: 44px; border-radius: 22px; background: #F1F2FB; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini .g { flex-grow: 1; display: flex; flex-direction: column; }
.btn[disabled] { opacity: .7; }

.sheet-x { position: sticky; top: 0; align-self: flex-end; margin: -10px -6px -40px 0; width: 36px; height: 36px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.08); display: grid; place-items: center; z-index: 2; flex: none; padding: 0; color: var(--ink, #2f3b33); }

/* Celebrations: surprise box, perfect day, treat lottery */
.prize { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 0 4px; }
.prize .btn { align-self: stretch; }
.pbox { width: 112px; height: 112px; border-radius: 32px; background: var(--grad); border: none; display: grid; place-items: center; box-shadow: 0 14px 30px rgba(124,127,239,.35); animation: wiggle 1.4s ease-in-out infinite; }
.pbox svg { width: 52px; height: 52px; }
.pwin { font-size: 64px; font-weight: 300; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes wiggle { 0%,60%,100% { transform: rotate(0); } 70% { transform: rotate(-7deg); } 80% { transform: rotate(6deg); } 90% { transform: rotate(-3deg); } }
.tcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; perspective: 800px; }
.tcard { position: relative; aspect-ratio: 3/4; border: none; padding: 0; background: none; transform-style: preserve-3d; transition: transform .6s; }
.tcard > span { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; display: grid; place-items: center; padding: 8px; font-size: 15px; font-weight: 600; }
.tcard .back { background: var(--grad); box-shadow: 0 8px 20px rgba(124,127,239,.3); }
.tcard .back svg { width: 34px; height: 34px; }
.tcard .face { background: var(--card); transform: rotateY(180deg); box-shadow: 0 6px 16px rgba(90,100,180,.12); }
.tcard.up { transform: rotateY(180deg); }
.tcard.up:not(.win) .face { color: var(--muted); background: #ECEDF7; }
.tcard.win .face { outline: 2px solid #A27CF0; }
.streak { display: inline-flex; align-items: center; gap: 4px; background: var(--grad); color: #fff; border-radius: 20px; padding: 4px 10px 4px 12px; margin-inline-start: auto; margin-inline-end: 10px; }
.streak svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .pbox, .pwin { animation: none; } .tcard { transition: none; } }
.sheet-x:focus:not(:focus-visible) { outline: none; }

/* Daily summary */
.jrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.jdots { flex: 1; display: flex; justify-content: space-between; }
.jdots button { width: 40px; height: 40px; border-radius: 50%; border: none; background: #ECEDF7; padding: 0; transition: transform .15s; }
.jdots button.on { background: var(--grad); }
.jdots button:active { transform: scale(.9); }
.jtags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jtags .chip svg { width: 16px; height: 16px; }
textarea { padding: 12px 14px; resize: none; }

/* Daily progress meter */
.dayprog { gap: 10px; }
.dayprog b { font-size: 28px; font-weight: 300; }
.pbar { height: 12px; border-radius: 6px; background: #ECEDF7; overflow: hidden; }
.pbar > div { height: 100%; border-radius: 6px; background: var(--grad); transition: width .5s ease; }
.habit { touch-action: manipulation; }
/* Points waiting for the end of the day (limits, nutrition) */
.habit .stake { position: absolute; top: -4px; inset-inline-start: -6px; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; border: 1.5px solid #D9DAEE; color: #8B8CF2; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.habit .stake.lost { color: #C9C7DD; text-decoration: line-through; border-color: #ECEDF7; }
.tasks.later { opacity: .55; }
.tip .by { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
/* Inspiration line: a quiet quote under the day's cards */
.tip { display: block; width: 100%; text-align: center; font-size: 17px; font-weight: 500; line-height: 1.55; color: var(--ink); padding: 8px 12px 4px; }

/* Living garden: drifting clouds, breathing sun, butterflies after a tap */
.cloud { animation: drift linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(var(--d)); } }
.halo { animation: breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .18; } 50% { transform: scale(1.18); opacity: .28; } }
.bfly { position: fixed; z-index: 30; pointer-events: none; animation: bfly 3.4s ease-in-out forwards; filter: drop-shadow(0 4px 6px rgba(90,100,180,.25)); }
.bfly .w { transform-box: fill-box; animation: flap .22s ease-in-out infinite alternate; }
.bfly .l { transform-origin: right center; }
.bfly .r { transform-origin: left center; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.25); } }
@keyframes bfly {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  35% { transform: translate(calc(var(--dx) * .4), -90px) rotate(-12deg); }
  65% { transform: translate(calc(var(--dx) * -.2), -190px) rotate(10deg); }
  100% { transform: translate(var(--dx), -340px) rotate(-8deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .cloud, .halo { animation: none; } }
