:root{--bg:#f6f2e9;--ink:#242b25;--muted:#7b8279;--green:#365b45;--pale:#e7eddf;--line:#e8e4da;--white:#fffefa;--gold:#e9bd66}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:env(safe-area-inset-top) 18px calc(88px + env(safe-area-inset-bottom));max-width:620px;margin-inline:auto}
.top{display:flex;align-items:center;justify-content:space-between;padding:23px 2px 18px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.4px;color:var(--muted)}h1,h2{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:4px 0}h1{font-size:29px;letter-spacing:-1px}h1 span{font-size:23px}.icon-btn{border:0;background:#ebe8df;border-radius:50%;width:42px;height:42px;font-size:19px;color:var(--ink)}
.card{background:var(--white);border:1px solid var(--line);border-radius:22px}.hero{padding:21px;display:grid;grid-template-columns:1fr auto;position:relative;overflow:hidden}.big-number{font:800 52px system-ui,sans-serif;line-height:1.1;margin-top:7px}.muted{color:var(--muted);font-size:12px}.hero-emoji{font-size:54px;align-self:center;margin-right:8px}.last-line{grid-column:1/-1;border-top:1px solid var(--line);padding-top:13px;margin-top:14px;color:var(--muted);font-size:12px}
.primary{width:100%;border:0;border-radius:16px;background:var(--green);color:white;font:700 15px system-ui;padding:16px;margin:14px 0 24px;box-shadow:0 5px 12px #365b4520}.section-head{display:flex;align-items:center;justify-content:space-between;margin:4px 2px 11px}.section-head h2{font-size:17px}.chart-card{padding:16px 12px}.week-chart{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:112px}.day-col{height:100%;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:7px}.bar-wrap{height:75px;width:100%;display:flex;align-items:end;justify-content:center}.bar{width:19px;max-height:75px;min-height:4px;background:#d8e3d2;border-radius:8px 8px 4px 4px}.bar.today{background:var(--green)}.day-label{font-size:10px;color:var(--muted)}.day-count{font-size:10px;font-weight:700}
.history{display:flex;flex-direction:column;gap:9px}.entry{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:13px 14px;display:flex;align-items:center;gap:12px}.type-pill{background:var(--pale);color:var(--green);width:39px;height:39px;border-radius:12px;display:grid;place-items:center;font-weight:800;font-size:17px;flex:none}.entry-main{flex:1;min-width:0}.entry-title{font-weight:700;font-size:13px}.entry-sub{font-size:11px;color:var(--muted);margin-top:3px}.entry-note{font-size:11px;color:#666;margin-top:5px;overflow-wrap:anywhere}.delete-entry{border:0;background:none;color:#a2a69e;font-size:17px;padding:8px}.empty{padding:25px;text-align:center;color:var(--muted);font-size:13px;background:#ffffff80;border-radius:16px}
.privacy-note{display:flex;gap:12px;background:var(--pale);border-radius:16px;padding:14px;margin-top:20px;font-size:12px}.privacy-note p{margin:4px 0 0;color:#667365;line-height:1.45}.bottom-nav{position:fixed;bottom:0;left:0;right:0;max-width:620px;margin:auto;background:#fbfaf6ed;backdrop-filter:blur(16px);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:10px 10px calc(10px + env(safe-area-inset-bottom));z-index:3}.bottom-nav button{border:0;background:none;color:#8b9188;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:18px}.bottom-nav span{font-size:10px}.bottom-nav .nav-active{color:var(--green);font-weight:700}
.modal{position:fixed;inset:0;background:#18201980;z-index:5;display:flex;align-items:end;justify-content:center;padding:14px}.hidden{display:none!important}.sheet{background:var(--bg);border-radius:25px 25px 18px 18px;width:100%;max-width:590px;max-height:92dvh;overflow:auto;padding:21px 18px calc(22px + env(safe-area-inset-bottom))}.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.sheet h2{font-size:23px}.close{background:#eae6dc}form{display:flex;flex-direction:column;gap:15px}label,legend{font-size:12px;font-weight:700}input[type=datetime-local],select,textarea{display:block;width:100%;margin-top:7px;border:1px solid #ddd9ce;border-radius:12px;padding:12px;background:var(--white);font:14px system-ui;color:var(--ink)}fieldset{border:0;padding:0;margin:0}legend{margin-bottom:9px;width:100%}legend a{float:right;color:var(--green);font-weight:600}.types{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.types button{border:1px solid var(--line);background:var(--white);border-radius:12px;padding:10px;text-align:left;display:flex;align-items:center;gap:9px;color:var(--ink)}.types button b{display:grid;place-items:center;background:#eee9dd;width:27px;height:27px;border-radius:8px}.types button span{font-size:10px;color:var(--muted)}.types button.selected{border:2px solid var(--green);background:var(--pale)}.checks{display:flex;gap:13px;flex-wrap:wrap}.checks label{font-weight:500;display:flex;align-items:center;gap:5px}.checks input{accent-color:var(--green)}textarea{resize:vertical}.secondary,.danger{border:1px solid var(--line);border-radius:10px;background:white;padding:10px 12px;font-weight:700;color:var(--green)}.danger{color:#a34e42}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid var(--line);padding:14px 0}.setting-row p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.4}.small{font-size:11px;line-height:1.5;margin-top:17px}.toast{position:fixed;bottom:95px;left:50%;transform:translateX(-50%);background:#263b2d;color:white;padding:11px 16px;border-radius:12px;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:8;white-space:nowrap}.toast.show{opacity:1}
@media(min-width:600px){body{padding-top:25px}.modal{align-items:center}.sheet{border-radius:24px}}
