/* Small wins feel like wins (owner, November 16, 2026). See wins.js. */
.step-target{position:relative;isolation:isolate}
.win-fx{position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:-1}
.win-clip{position:absolute;inset:0;border-radius:inherit;overflow:hidden}
.win-halo{position:absolute;inset:-1px;border-radius:inherit;box-shadow:0 0 34px 2px #d9c08a55,inset 0 0 0 1px #e0c99299;opacity:0;will-change:opacity}
.win-b1 .win-halo{animation:winH1 1.3s ease}
.win-b2 .win-halo{animation:winH2 2.4s ease}
.win-b3 .win-halo{animation:winH3 3.6s ease}
@keyframes winH1{30%{opacity:.9}100%{opacity:0}}
@keyframes winH2{30%{opacity:1}100%{opacity:0}}
@keyframes winH3{35%{opacity:1}100%{opacity:0}}
.step-target.win-b1{animation:winBr1 1.1s cubic-bezier(.3,.7,.3,1)}
.step-target.win-b2{animation:winBr2 1.4s cubic-bezier(.3,.7,.3,1)}
.step-target.win-b3{animation:winBr3 1.8s cubic-bezier(.3,.7,.3,1)}
@keyframes winBr1{35%{transform:scale(1.016)}}
@keyframes winBr2{35%{transform:scale(1.022)}}
@keyframes winBr3{30%{transform:scale(1.03)}}
.win-sweep{position:absolute;top:0;left:0;width:55%;height:2px;background:linear-gradient(90deg,transparent,#fff3cf,transparent);opacity:0;filter:drop-shadow(0 0 4px #e9d49a);transform:translateX(-100%);will-change:transform,opacity}
.step-target.win-sweeping .win-sweep{animation:winSweep 1.1s cubic-bezier(.4,.1,.3,1)}
@keyframes winSweep{0%{opacity:0;transform:translateX(-100%)}10%{opacity:1}90%{opacity:1}100%{opacity:0;transform:translateX(210%)}}
.win-edge{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}
.win-edge rect{fill:none}
.win-edge .line{stroke:#e0c992;stroke-width:1.3;stroke-dasharray:100 100;stroke-dashoffset:100}
.win-edge .head{visibility:hidden;stroke:#fff6dc;stroke-width:2.6;stroke-linecap:round;stroke-dasharray:4 96;stroke-dashoffset:4;opacity:0;filter:drop-shadow(0 0 5px #f0dca0)}
.win-trace .win-edge .line{animation:winTrace 1.5s cubic-bezier(.45,.05,.3,1) forwards,winFadeLine 1.4s ease 2.4s forwards}
.win-trace .win-edge .head{animation:winHead 1.5s cubic-bezier(.45,.05,.3,1) forwards}
.win-trace2 .win-edge .line{animation:winTrace 2.1s cubic-bezier(.45,.05,.3,1) forwards}
.win-trace2 .win-edge .head{animation:winHead 2.1s cubic-bezier(.45,.05,.3,1) forwards}
@keyframes winTrace{to{stroke-dashoffset:0}}
@keyframes winFadeLine{from{stroke-dashoffset:0;opacity:1}to{stroke-dashoffset:0;opacity:0}}
@keyframes winHead{0%{opacity:1;stroke-dashoffset:4;visibility:visible}92%{opacity:1}100%{opacity:0;stroke-dashoffset:-96;visibility:hidden}}
.win-bloom{position:absolute;width:260px;height:260px;margin:-130px 0 0 -130px;border-radius:50%;background:radial-gradient(circle,#e9d49a55 0%,#c9ad7222 35%,transparent 68%);opacity:0;transform:scale(.2);will-change:transform,opacity}
.win-bloom-on .win-bloom{animation:winBloom 2.2s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes winBloom{40%{opacity:1}100%{opacity:0;transform:scale(1.3)}}
.win-warm{position:absolute;inset:0;background:radial-gradient(130% 85% at 50% 118%,#d9c08a4d,transparent 66%);opacity:0;will-change:opacity}
.win-warm-on .win-warm{animation:winWarm 3s ease forwards}
@keyframes winWarm{45%{opacity:1}100%{opacity:0}}
.win-motes i{position:absolute;width:3px;height:3px;border-radius:50%;background:#fff1c7;box-shadow:0 0 6px 1px #e9d49a;opacity:0;will-change:transform,opacity}
.win-motes.go i{animation:winMote var(--d) cubic-bezier(.2,.6,.4,1) var(--w) forwards}
@keyframes winMote{0%{opacity:0;transform:translate(0,0) scale(.6)}20%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) scale(1)}}
.win-rings{position:absolute;left:50%;top:50%;width:0;height:0;overflow:visible;pointer-events:none}
.win-rings circle{fill:none;stroke:#efdca6;stroke-width:1;vector-effect:non-scaling-stroke;opacity:0;transform-box:fill-box;transform-origin:center;will-change:transform,opacity}
.win-rings.small circle:first-child{animation:winRing 1s ease-out .15s}
.win-rings.big circle:first-child{animation:winRingBig 1.6s ease-out .2s}
.win-rings.big circle+circle{animation:winRingBig 1.7s ease-out .55s}
.win-goal .win-rings.star circle:first-child{animation:winRingStar 2.2s ease-out 2.05s}
.win-goal .win-rings.star circle+circle{animation:winRingStar 2.5s ease-out 2.45s}
@keyframes winRing{0%{opacity:.9;transform:scale(1)}100%{opacity:0;transform:scale(5)}}
@keyframes winRingBig{0%{opacity:.95;transform:scale(1)}100%{opacity:0;transform:scale(10)}}
@keyframes winRingStar{0%{opacity:.95;transform:scale(1)}100%{opacity:0;transform:scale(14)}}
/* the ✦ in the goal line: a glint for a step, lit for a milestone */
.goal-line .gl-mark{position:relative;display:inline-block}
.goal-line.win-glint .gl-mark{animation:winGlint 1s cubic-bezier(.3,1.4,.5,1)}
@keyframes winGlint{35%{transform:scale(1.7) rotate(30deg);color:#fff3cf;text-shadow:0 0 10px #e9d49a}}
.goal-line.win-lit .gl-mark{animation:winLit 1.6s cubic-bezier(.3,1.5,.5,1)}
@keyframes winLit{0%{transform:scale(.6) rotate(-60deg)}30%{transform:scale(2) rotate(10deg);color:#fff3cf;text-shadow:0 0 12px #e9d49a}100%{transform:none}}
.goal-line .gl-ms b{font-weight:500;color:#e0c992}
/* the habit's segment */
.habit-bar-row i.win-fill,.habit-bar-row i.win-half{position:relative;background:#c9ad7226!important;box-shadow:none!important}
.habit-bar-row i.win-fill:after,.habit-bar-row i.win-half:after{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,#b59a62,#ecd6a0);transform-origin:left;transform:scaleX(0);animation:winSeg .8s cubic-bezier(.3,.7,.3,1) .57s forwards}
.habit-bar-row i.win-half:after{animation-name:winSegHalf;animation-delay:.52s}
.habit-bar-row i.win-fill:before{content:'';position:absolute;inset:-6px -3px;border-radius:99px;background:radial-gradient(closest-side,#f3dfa6aa,transparent);opacity:0;animation:winSegGlow 1.4s ease 1s}
@keyframes winSeg{to{transform:scaleX(1)}}
@keyframes winSegHalf{to{transform:scaleX(.5)}}
@keyframes winSegGlow{35%{opacity:1}}
/* part done: the old name is struck through, then what's left takes its place */
.step-target h3.win-swap{display:grid}
.win-swap>.win-was,.win-swap>.win-now{grid-area:1/1}
.win-was{justify-self:start;position:relative;transition:opacity .45s}
.win-was:after{content:'';position:absolute;left:0;top:56%;height:1.2px;width:100%;background:#e0c992;transform:scaleX(0);transform-origin:left;transition:transform .6s cubic-bezier(.4,.1,.3,1)}
.win-was.struck:after{transform:none}
.win-was.gone{opacity:0}
.win-now{opacity:0;transform:translateY(6px);transition:opacity .5s,transform .5s}
.win-now.in{opacity:1;transform:none}
/* the points */
.win-pts{position:fixed;left:0;top:0;z-index:70;font-size:14px;font-weight:500;color:#ecd6a0;text-shadow:0 0 8px #c9ad7288;opacity:0;pointer-events:none;will-change:transform,opacity}
.win-pts.big{font-size:18px;font-family:"Bodoni Moda",Didot,"Bodoni 72",Georgia,serif}
.win-pts.go{animation:winFly var(--t,1.3s) cubic-bezier(.45,.05,.25,1) forwards}
@keyframes winFly{0%{opacity:0;transform:translate(var(--sx),calc(var(--sy) + 6px)) scale(.9)}15%{opacity:1;transform:translate(var(--sx),calc(var(--sy) - 8px))}30%{opacity:1;transform:translate(var(--sx),calc(var(--sy) - 12px))}92%{opacity:1}100%{opacity:0;transform:translate(var(--ex),var(--ey)) scale(.6)}}
.growth-badge.win-land{animation:winLand .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes winLand{40%{transform:scale(1.12)}}
.growth-badge.win-glow{box-shadow:0 0 0 0 #3d8a5900;animation:winLand .5s cubic-bezier(.3,1.6,.5,1),winGlow 1.9s ease}
.growth-badge.win-glow2{animation:winLand .5s cubic-bezier(.3,1.6,.5,1),winGlow2 2.8s ease}
@keyframes winGlow{30%{box-shadow:0 0 18px 6px #3d8a5966}}
@keyframes winGlow2{30%{box-shadow:0 0 26px 10px #3d8a5988}}
.win-badge-ring{position:fixed;width:0;height:0;z-index:69;pointer-events:none}
.win-badge-ring .win-rings{left:0;top:0}
.win-badge-ring circle{stroke:#e0c992;stroke-width:1.5}
.win-badge-ring circle:first-child{animation:winBadgeRing 2.2s ease-out}
.win-badge-ring circle+circle{animation:winBadgeRing 2.4s ease-out .3s}
@keyframes winBadgeRing{0%{opacity:0;transform:scale(.7)}25%{opacity:1}100%{opacity:0;transform:scale(2)}}
/* A goal achieved: the card keeps its gold (the moment draws it in once) */
#app .step-target.achieved{border-color:#dcc58f99;box-shadow:0 0 30px #d9c08a24,0 30px 70px #000c;text-align:center}
#app .step-target.achieved>.eyebrow{display:block;text-align:center}
#app .step-target.achieved h3{color:#efe2bd;text-align:center}
#app .step-target.achieved .goal-line{justify-content:center}
#app .step-target.achieved .step-actions{justify-content:center}
.ach-warm{position:absolute;inset:0;border-radius:inherit;z-index:-1;pointer-events:none;background:radial-gradient(130% 85% at 50% 118%,#d9c08a40,transparent 66%)}
.ach-star{position:relative;display:block;width:46px;height:46px;margin:0 auto 8px}
.ach-star svg{width:46px;height:46px;overflow:visible;display:block}
.ach-star path{fill:#e3cc94;stroke:#fff3cf;stroke-width:.9}
.ach-star .ray{stroke:#f3dfa6;stroke-width:1;stroke-linecap:round;opacity:0}
.ach-star:before{content:'';position:absolute;inset:-14px;border-radius:50%;background:radial-gradient(circle,#f3dfa655,transparent 65%)}
#app .step-target.achieved.win-goal{animation:winAchieve 2.6s ease .4s backwards}
#app .step-target.achieved.win-goal.win-b3{animation:winAchieve 2.6s ease .4s backwards,winBr3 1.8s cubic-bezier(.3,.7,.3,1)}
@keyframes winAchieve{from{border-color:#b59a6252;box-shadow:0 0 0 #d9c08a00,0 30px 70px #000c}}
.win-goal .ach-warm{animation:winWarmIn 2.6s ease .5s backwards}
@keyframes winWarmIn{from{opacity:0}50%{opacity:1.4}}
.win-goal .ach-star path{stroke-dasharray:100;animation:winStarDraw 1.2s ease .95s backwards,winStarFill .9s ease 2s backwards}
@keyframes winStarDraw{from{stroke-dashoffset:100;fill:#e3cc9400;stroke:#efdca6}to{stroke-dashoffset:0;fill:#e3cc9400;stroke:#efdca6}}
@keyframes winStarFill{from{fill:#e3cc9400;stroke:#efdca6}}
.win-goal .ach-star .ray{stroke-dasharray:10;animation:winRay 1.4s ease-out 2.05s}
@keyframes winRay{0%{opacity:1;stroke-dashoffset:10}50%{opacity:1;stroke-dashoffset:0}100%{opacity:0;stroke-dashoffset:-10}}
.win-goal .ach-star:before{animation:winStarGlow 2.2s ease 2s backwards}
@keyframes winStarGlow{0%{opacity:0}40%{opacity:1;transform:scale(1.25)}}
#app .win-goal h3{background:linear-gradient(100deg,#efe2bd 0%,#efe2bd 40%,#fff8e4 50%,#efe2bd 60%,#efe2bd 100%);background-size:250% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;color:transparent;animation:winShine 1.6s ease 2.3s forwards}
@keyframes winShine{to{background-position:0 0}}
@media(prefers-reduced-motion:reduce){.win-fx,.win-pts,.win-badge-ring{display:none}}
