:root{--paper:#f7f2ec;--white:#fffdf9;--ink:#392832;--muted:#82767b;--line:#e6dcd6;--wine:#793e59;--wine-dark:#603044;--rose:#e5cbd1;--rose-pale:#f0e3e4;--sage:#dce4d8;--gold:#c39c76;--serif:"Onest",Arial,sans-serif;--sans:"Onest",Arial,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#ece4dc;color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}.app-shell{position:relative;max-width:480px;min-height:100vh;margin:0 auto;padding:0 25px calc(108px + env(safe-area-inset-bottom));overflow:hidden;background-color:var(--paper);background-image:radial-gradient(#9d83751a .65px,transparent .65px);background-size:8px 8px;box-shadow:0 16px 60px #48353413}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font-family:var(--serif);font-size:31px;font-weight:700;letter-spacing:-1.8px}.brand-flower{width:25px;height:25px;display:inline-grid;place-items:center;color:var(--wine)}.brand-flower svg{width:25px;fill:currentColor}.brand-period{color:var(--wine)}.profile-button{width:37px;height:37px;display:grid;place-items:center;border:1px solid #d5c1bd;border-radius:50%;background:#efe5e0;color:var(--wine);font:600 14px var(--sans);cursor:pointer}.profile-button span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e3d1d0}.greeting{padding:21px 0 20px}.date-line,.eyebrow{font-size:9px;letter-spacing:1.35px;font-weight:700;color:var(--muted)}.date-line{display:flex;align-items:center;gap:8px}.date-rule{width:18px;height:1px;background:var(--wine)}h1,h2,p{margin-top:0}h1{font-family:var(--serif);font-size:52px;line-height:.86;letter-spacing:-1.7px;font-weight:600;margin:20px 0 14px}h1 em{font-weight:500;color:var(--wine);font-style:italic}.intro{font-size:13px;color:#766a6f;margin:0 0 3px}.ritual-card{position:relative;min-height:196px;margin:0 -1px 0;padding:18px 20px 16px;border-radius:5px 5px 20px 5px;background:var(--wine-dark);color:#f8eee5;overflow:hidden;box-shadow:0 7px 0 #eadbd1}.ritual-top{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between}.ritual-card .eyebrow{color:#ead7d7}.ritual-number{font:italic 13px var(--serif);color:#d7b6bd}.ritual-main{position:relative;z-index:1;display:flex;align-items:center;gap:13px;margin-top:16px}.ritual-total{display:flex;align-items:baseline;font-family:var(--serif);line-height:1}.ritual-total strong{font-size:72px;font-weight:500;letter-spacing:-3px}.total-divider{font-size:37px;color:#bc929f;margin:0 5px}.total-small{font-size:39px;color:#d7b6bd}.ritual-text{display:flex;align-items:center;gap:9px;color:#f1e2de;font-size:12px;line-height:1.35}.ritual-sparkle{font-size:19px;color:#deb98f}.progress-track{position:relative;z-index:1;height:4px;width:79%;margin-top:9px;background:#8b6574;border-radius:9px;overflow:hidden}.progress-track span{display:block;width:50%;height:100%;background:#e5c4c1;border-radius:9px;transition:width .35s}.ritual-caption{position:absolute;z-index:1;left:21px;bottom:15px;font-size:8px;letter-spacing:1.25px;color:#d7b6bd}.ritual-ornament{position:absolute;right:-7px;bottom:-22px;width:153px;height:153px;fill:none;stroke:#c596a0;stroke-width:.8;opacity:.48}.habits-section{padding-top:34px}.section-heading,.week-top{display:flex;align-items:center;justify-content:space-between}.section-heading h2,.week-top h2,.habit-dialog h2{font-family:var(--serif);font-size:30px;line-height:1.05;font-weight:600;letter-spacing:-.5px;margin:3px 0 0}.add-button{width:41px;height:41px;border:1px solid #c9a9b0;border-radius:50%;background:transparent;color:var(--wine);cursor:pointer;transition:background .18s,transform .18s}.add-button span{display:block;font:300 28px/1 var(--sans);margin-top:-2px}.add-button:hover{background:var(--rose-pale)}.add-button:active{transform:scale(.93)}.habit-list{margin-top:13px;border-top:1px solid var(--line)}.habit-row{position:relative;display:flex;align-items:center;gap:13px;min-height:76px;padding:9px 3px;border-bottom:1px solid var(--line);transition:background .2s}.habit-emoji{width:35px;height:35px;display:grid;place-items:center;flex:none;color:var(--wine)}.habit-emoji svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}.habit-meta{flex:1;min-width:0}.habit-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;letter-spacing:-.15px}.habit-sub{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10px;margin-top:4px}.flame{color:#ad785f;font-size:12px}.check-button{width:30px;height:30px;border:1px solid #cdbdc0;border-radius:50%;background:transparent;color:var(--white);display:grid;place-items:center;font:500 15px var(--sans);cursor:pointer;flex:none;transition:all .2s}.done .check-button{border-color:var(--wine);background:var(--wine);transform:scale(1.03)}.habit-row.done .habit-name{text-decoration:line-through;text-decoration-color:#cbb4b8;color:#786d71}.habit-row.done .habit-emoji{color:#a38286}.reassurance{margin:13px 0 0;color:#83777a;font-size:10px;line-height:1.6}.reassurance-mark{color:var(--wine);margin-right:3px}.week-card{margin-top:31px;padding:18px 15px 15px;border:1px solid #e4d9d3;border-radius:4px 18px 4px 18px;background:#fbf7f1}.week-top h2{font-size:27px;margin-top:4px}.text-button{border:0;background:transparent;color:var(--wine);font:600 10px var(--sans);padding:8px 0;cursor:pointer}.text-button span{font-size:14px;margin-left:3px}.week-days{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin-top:16px}.day-cell{display:flex;align-items:center;flex-direction:column;gap:5px;font-size:9px;color:#897e82}.day-bloom{position:relative;width:30px;height:30px;display:grid;place-items:center;border:1px solid #dfd3cd;border-radius:50%;color:#a29395;font-size:10px}.day-cell.has-progress .day-bloom{border-color:#c7a1a9;background:#f0e2e3;color:var(--wine)}.day-cell.today .day-bloom{border-color:var(--wine);background:var(--wine);color:white;box-shadow:inset 0 0 0 3px #fbf7f1}.day-cell.today{color:var(--wine);font-weight:700}.closing-note{font:italic 20px var(--serif);color:#8e777d;text-align:center;margin:25px 0 0}.closing-note span{color:#bd8e91;font-size:23px}.bottom-nav{position:fixed;z-index:3;bottom:0;left:50%;transform:translateX(-50%);width:min(480px,100%);display:flex;align-items:center;justify-content:space-around;padding:8px 8px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #e3d9d3;background:#f9f5f0f2;backdrop-filter:blur(14px)}.nav-item{min-width:62px;min-height:49px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0;border:0;background:transparent;color:#96888c;font:500 9px var(--sans);cursor:pointer}.nav-icon{font-size:21px;line-height:1.15}.nav-item.active{color:var(--wine)}.nav-item.active .nav-icon{transform:translateY(-1px)}.habit-dialog{width:min(calc(100% - 32px),420px);padding:0;border:1px solid var(--line);border-radius:5px 5px 22px 5px;background:var(--paper);color:var(--ink);box-shadow:0 24px 70px #3023232b}.habit-dialog::backdrop{background:#30232370;backdrop-filter:blur(3px)}.habit-dialog form{position:relative;padding:31px 25px 25px;display:flex;flex-direction:column;gap:10px}.habit-dialog h2{margin:4px 25px 7px 0;font-size:32px}.dialog-close{position:absolute;right:18px;top:15px;border:0;background:none;color:var(--muted);font-size:28px;cursor:pointer}.habit-dialog label{font-size:11px;font-weight:700;margin-top:5px}.habit-dialog input,.habit-dialog select{width:100%;height:47px;padding:0 13px;border:1px solid #dfd3cc;border-radius:5px 12px 5px 5px;background:var(--white);color:var(--ink);font:13px var(--sans);outline:none}.habit-dialog input:focus,.habit-dialog select:focus{border-color:var(--wine);box-shadow:0 0 0 3px #793e5918}.submit-button{height:48px;display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:5px 5px 14px 5px;background:var(--wine);color:white;font:600 12px var(--sans);margin-top:10px;cursor:pointer}.submit-button span{font-size:16px}.toast{position:fixed;z-index:5;left:50%;bottom:calc(85px + env(safe-area-inset-bottom));transform:translate(-50%,12px);padding:10px 16px;border-radius:30px;background:#392832;color:#fff;font-size:11px;opacity:0;pointer-events:none;transition:all .22s;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}:focus-visible{outline:3px solid #c692a1;outline-offset:3px}
@media(min-width:700px){body{padding:24px 0}.app-shell{min-height:calc(100vh - 48px);border-radius:21px}.bottom-nav{bottom:24px;border-radius:0 0 21px 21px}.topbar{height:76px}}
@media(max-width:360px){.app-shell{padding-left:19px;padding-right:19px}h1{font-size:46px}.ritual-card{padding-left:17px}.ritual-ornament{right:-35px;opacity:.35}.habit-name{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Updated type and flexible habit rows */
.brand{font-family:var(--sans);font-weight:700;letter-spacing:-1.4px}.brand-flower svg{fill:currentColor}h1{font-family:var(--sans);font-size:44px;line-height:1.03;letter-spacing:-2.2px;font-weight:600}h1 em{font-weight:500;letter-spacing:-2px}.section-heading h2,.week-top h2,.nutrition-heading h2,.app-dialog h2{font-family:var(--sans);font-size:23px;line-height:1.2;font-weight:600;letter-spacing:-.8px}.intro{font-size:13px}.habit-list{border-top:1px solid var(--line)}.habit-row{min-height:78px;align-items:center;gap:10px;padding:11px 0}.habit-icon{width:34px;min-width:34px;display:grid;place-items:center;align-self:center;color:var(--wine)}.habit-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}.habit-meta{flex:1;min-width:0;align-self:center;padding:3px 0}.habit-name{display:block;overflow:visible;text-overflow:unset;white-space:normal;overflow-wrap:anywhere;line-height:1.4;font-size:13px;font-weight:600}.habit-sub{min-height:14px;line-height:1.35}.habit-row.done .habit-name{text-decoration:none;color:var(--ink)}.habit-row.done .habit-sub{color:var(--wine)}.habit-more{position:relative;flex:none}.habit-more summary{list-style:none;width:30px;height:36px;display:grid;place-items:center;color:#9a858a;font-size:18px;font-weight:700;cursor:pointer;border-radius:10px}.habit-more summary::-webkit-details-marker{display:none}.habit-more[open] summary,.habit-more summary:hover{background:var(--rose-pale);color:var(--wine)}.habit-menu{position:absolute;z-index:4;right:0;top:34px;width:126px;padding:5px;border:1px solid var(--line);border-radius:12px;background:var(--white);box-shadow:0 9px 24px #3928321a}.habit-menu button{width:100%;min-height:38px;padding:7px 9px;border:0;border-radius:8px;background:transparent;text-align:left;color:var(--ink);font:500 12px var(--sans);cursor:pointer}.habit-menu button:hover{background:var(--rose-pale)}.habit-menu .remove-action{color:#98465f}.check-button{width:34px;height:34px;margin-left:1px}

/* Nutrition summary */
.nutrition-section{margin-top:32px}.nutrition-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.nutrition-heading h2{font-size:25px;margin:3px 0 0}.nutrition-actions{display:flex;align-items:center;gap:8px}.quiet-button{min-height:38px;padding:0 12px;border:1px solid #d8c8c4;border-radius:20px;background:transparent;color:var(--wine);font:600 11px var(--sans);cursor:pointer}.quiet-button:hover{background:var(--rose-pale)}.small-add{width:38px;height:38px}.nutrition-card{padding:17px;border:1px solid #e4d9d3;border-radius:5px 18px 5px 18px;background:#fbf7f1}.calories-line{display:flex;align-items:flex-end;justify-content:space-between}.macro-label{color:var(--muted);font-size:9px;font-weight:700;letter-spacing:1px}.calorie-total{display:flex;align-items:baseline;gap:6px;margin-top:3px}.calorie-total strong{font-size:31px;line-height:1.05;font-weight:600;letter-spacing:-1.3px;font-variant-numeric:tabular-nums}.calorie-total span{font-size:11px;color:var(--muted)}.goal-caption{color:var(--muted);font-size:10px}.calorie-track,.macro-track{height:5px;border-radius:8px;background:#e9dfd9;overflow:hidden}.calorie-track{margin-top:12px}.calorie-track span,.macro-track span{display:block;width:0;height:100%;border-radius:inherit;background:var(--wine);transition:width .25s}.macro-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:18px}.macro-item>div:first-child{display:flex;flex-direction:column;gap:5px}.macro-item>div:first-child>span{font-size:10px;color:#796c70}.macro-item strong{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.macro-item strong small{font-size:10px;color:var(--muted);font-weight:400}.macro-track{height:4px;margin-top:8px}.macro-item:nth-child(2) .macro-track span{background:#a2777e}.macro-item:nth-child(3) .macro-track span{background:#9a886e}.macro-goal{display:block;margin-top:5px;color:#978b8e;font-size:9px;white-space:nowrap}.meal-list{margin-top:13px}.meal-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--line);font-size:10px;color:#7b6f73}.meal-row .meal-name{flex:1;min-width:0;overflow-wrap:anywhere;color:var(--ink);font-weight:500}.meal-row button{width:28px;height:28px;border:0;border-radius:50%;background:transparent;color:#9a858a;font-size:18px;cursor:pointer}.meal-row button:hover{background:var(--rose-pale);color:var(--wine)}.meal-empty{margin:12px 0 0;color:#908388;font-size:10px;line-height:1.5}.meal-empty[hidden]{display:none}

/* Profile and entry dialogs */
.app-dialog{width:min(calc(100% - 30px),420px);max-height:min(90vh,760px);overflow-y:auto;padding:0;border:1px solid var(--line);border-radius:6px 6px 22px 6px;background:var(--paper);color:var(--ink);box-shadow:0 24px 70px #3023232b}.app-dialog::backdrop{background:#30232370;backdrop-filter:blur(3px)}.app-dialog form{position:relative;display:flex;flex-direction:column;gap:9px;padding:30px 24px 23px}.app-dialog h2{margin:3px 26px 1px 0;font-size:25px}.dialog-intro{margin:0 16px 4px 0;color:#766a6f;font-size:12px;line-height:1.55}.app-dialog label{margin-top:4px;font-size:11px;font-weight:600}.app-dialog input,.app-dialog select{width:100%;min-height:46px;padding:10px 12px;border:1px solid #dfd3cc;border-radius:6px 12px 6px 6px;background:var(--white);color:var(--ink);font:13px var(--sans);outline:none}.app-dialog input:focus,.app-dialog select:focus{border-color:var(--wine);box-shadow:0 0 0 3px #793e5918}.app-dialog input::placeholder{color:#9d9294}.dialog-close{position:absolute;right:15px;top:12px;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--muted);font:300 25px var(--sans);cursor:pointer}.dialog-close:hover{background:var(--rose-pale)}.local-note{margin:0;color:#8b7f82;font-size:10px}.submit-button{min-height:47px;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:8px;border:0;border-radius:6px 6px 14px 6px;background:var(--wine);color:#fff;font:600 12px var(--sans);cursor:pointer}.submit-button:hover{background:var(--wine-dark)}.submit-button span{font-size:16px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}.field-grid input{min-width:0}.toast{z-index:8;display:flex;align-items:center;gap:12px;max-width:calc(100% - 30px);white-space:normal}.toast button{border:0;background:transparent;color:#f2cbd3;font:600 11px var(--sans);white-space:nowrap;cursor:pointer}.toast button[hidden]{display:none}
@media(max-width:360px){.habit-row{gap:7px}.habit-icon{width:29px;min-width:29px}.habit-name{font-size:12px}.check-button{width:31px;height:31px}.macro-grid{gap:7px}.macro-goal{font-size:8px}}

/* Real date calendar and year-end report */
.calendar-section{margin-top:35px;scroll-margin-top:18px}.calendar-heading{margin-bottom:14px}.calendar-heading h2{margin-top:4px}.year-chip{padding:5px 10px;border:1px solid #e0d3cc;border-radius:20px;color:var(--wine);font-size:10px;font-weight:600}.calendar-months{display:grid;gap:12px}.month-card{padding:15px 14px 13px;border:1px solid #e4d9d3;border-radius:5px 17px 5px 17px;background:#fbf7f1}.month-card h3{margin:0 0 12px;color:var(--ink);font:600 16px var(--sans);text-transform:capitalize}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));justify-items:center;gap:4px 2px}.weekday{height:25px;display:grid;place-items:center;color:#9b8d91;font-size:9px;font-weight:600}.month-blank{width:34px;height:34px}.calendar-date{position:relative;width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;border-radius:50%;background:transparent;color:var(--ink);font:500 11px var(--sans);cursor:pointer}.calendar-date:hover{background:#f0e2e3}.calendar-date.current-day{border-color:#bd8a99;color:var(--wine);font-weight:700}.calendar-date.selected{background:var(--wine);color:#fff}.calendar-date.marked:not(.selected){background:#ecdcdf;color:var(--wine)}.calendar-date i{position:absolute;bottom:2px;width:4px;height:4px;border-radius:50%;background:var(--wine)}.calendar-date.selected i{background:#fff}.calendar-date.future-day{color:#a69a9d}.calendar-day-summary{min-height:36px;margin:10px 2px 0;padding:9px 11px;border-left:2px solid #bf929e;color:#7e7074;font-size:10px;line-height:1.5}.report-section{margin-top:22px;scroll-margin-top:18px}.report-card{position:relative;overflow:hidden;padding:19px 18px 17px;border-radius:5px 20px 5px 20px;background:var(--wine-dark);color:#f8eee5}.report-head{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between}.report-head .eyebrow{color:#d7b6bd}.report-head h2{margin:5px 0 0;color:#fff7f1;font-size:22px;font-weight:600;letter-spacing:-.6px}.report-flower{position:absolute;right:4px;top:-22px;color:#c596a0;font-size:82px;opacity:.35}.report-countdown{position:relative;z-index:1;display:flex;align-items:baseline;gap:9px;margin-top:17px}.report-countdown strong{font-size:49px;line-height:1;font-weight:600;letter-spacing:-2px;font-variant-numeric:tabular-nums}.report-countdown span{color:#e6ced0;font-size:12px}.report-period{position:relative;z-index:1;margin:5px 0 15px;color:#d7b6bd;font-size:10px}.report-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:12px 0;border-top:1px solid #805468;border-bottom:1px solid #805468}.report-stats>div{display:flex;flex-direction:column;gap:2px}.report-stats>div+div{padding-left:12px;border-left:1px solid #805468}.report-stats strong{font-size:18px;font-weight:600;font-variant-numeric:tabular-nums}.report-stats span{color:#d7b6bd;font-size:9px}.report-habits{display:grid;gap:10px;margin-top:15px}.report-habit{display:grid;grid-template-columns:minmax(0,1fr) 88px 22px;align-items:center;gap:8px}.report-habit-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f6e9e5;font-size:10px}.report-habit-track{height:4px;border-radius:8px;background:#805468;overflow:hidden}.report-habit-track i{display:block;height:100%;border-radius:inherit;background:#e2bfc3}.report-habit strong{text-align:right;color:#f6e9e5;font-size:10px;font-variant-numeric:tabular-nums}.report-export{width:100%;min-height:41px;display:flex;align-items:center;justify-content:center;gap:9px;margin-top:18px;border:1px solid #b98c99;border-radius:6px 6px 13px 6px;background:transparent;color:#fff3ef;font:600 11px var(--sans);cursor:pointer}.report-export:hover{background:#714253}.report-export span{font-size:15px}
@media(min-width:400px){.month-grid{gap:5px 4px}.month-card{padding-left:19px;padding-right:19px}.calendar-date,.month-blank{width:37px;height:37px}}
