:root{
  --paper:#F1E8D3; --card:#FBF6EA; --ink:#2B2A22; --sub:#6B6553; --line:#D9CCAE;
  --forest:#2F5D3A; --forest-2:#3F7A4C; --rust:#C4602A; --sky:#5A8DA8;
  --l1:#CFE3B8; --l2:#9CC77F; --l3:#5E9E57; --l4:#2F5D3A;
  --f:"Hiragino Maru Gothic ProN","Zen Maru Gothic","Hiragino Sans","Noto Sans JP",system-ui,sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--paper)}
body{min-height:100vh;margin:0;background:var(--paper);color:var(--ink);font-family:var(--f);font-size:16px;line-height:1.75;
  background-image:radial-gradient(rgba(120,95,50,.07) 1px,transparent 1.5px);background-size:14px 14px}
button,input,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--rust);outline-offset:2px;border-radius:10px}
a{color:var(--forest)}
.app{max-width:580px;margin:0 auto;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));display:grid;gap:18px}
.head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.head h1{margin:0;display:flex;align-items:center;gap:8px;font-size:24px;color:var(--forest);letter-spacing:.06em}
.head svg{width:30px;height:30px;fill:var(--forest-2)}
.head .vein{stroke:var(--paper);stroke-width:1.6;fill:none}
.streak{margin:0;background:var(--rust);color:#fff;font-weight:700;font-size:14px;border-radius:999px;padding:4px 14px;white-space:nowrap}
.streak:empty{display:none}
.theme{position:relative;background:var(--forest);color:#F6F0DE;border-radius:20px;padding:18px 18px 14px;overflow:hidden}
.theme::after{content:"";position:absolute;right:-30px;top:-30px;width:120px;height:120px;border-radius:50%;border:14px solid rgba(246,240,222,.08)}
.theme-lbl{margin:0;font-size:13px;letter-spacing:.12em;opacity:.85}
.theme-txt{margin:4px 0 10px;font-size:22px;font-weight:700;line-height:1.5}
.theme .ghost{color:#F6F0DE;border-color:rgba(246,240,222,.45)}
.walk{background:var(--card);border:2px dashed var(--line);border-radius:24px;padding:22px 18px;text-align:center;display:grid;gap:10px;justify-items:center}
.walk.on{border-style:solid;border-color:var(--rust)}
.clock{margin:0;font-size:60px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;color:var(--forest)}
.walk.on .clock{color:var(--rust)}
.clock-sub{margin:0;color:var(--sub);font-size:14px}
.primary{border:0;border-radius:999px;background:var(--rust);color:#fff;font-weight:700;font-size:19px;min-height:60px;padding:0 32px;cursor:pointer;box-shadow:0 4px 0 #8E3F16;width:100%;max-width:340px}
.primary:active{transform:translateY(3px);box-shadow:0 1px 0 #8E3F16}
.primary.home{background:var(--forest);box-shadow:0 4px 0 #1B3822}
.primary.small{font-size:17px;min-height:52px;width:auto}
.ghost{border:2px solid var(--line);background:transparent;border-radius:999px;min-height:44px;padding:0 18px;font-weight:700;cursor:pointer;font-size:14px}
.textbtn{border:0;background:none;color:var(--forest);text-decoration:underline;text-underline-offset:4px;cursor:pointer;min-height:40px;font-size:14px}
.sheet{background:var(--card);border-radius:24px;padding:18px;display:grid;gap:14px;box-shadow:0 6px 0 var(--line)}
.sheet h2{margin:0;color:var(--forest);font-size:20px}
.sheet label{display:grid;gap:4px;font-size:13px;color:var(--sub);font-weight:700}
.sheet input[type=date],.sheet input[type=number],.sheet textarea{width:100%;min-width:0;border:2px solid var(--line);border-radius:12px;background:#fff;padding:10px 12px;min-height:46px;font-weight:400;color:var(--ink);font-size:16px}
.sheet textarea{resize:vertical}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
fieldset{border:0;margin:0;padding:0;min-width:0}
legend{font-size:13px;color:var(--sub);font-weight:700;padding:0;margin-bottom:6px}
.tags,.moods{display:flex;flex-wrap:wrap;gap:6px}
.tag{border:2px solid var(--line);background:#fff;border-radius:999px;padding:0 12px;min-height:40px;cursor:pointer;font-size:14px}
.tag[aria-pressed=true]{background:var(--forest);border-color:var(--forest);color:#fff}
.mood{border:2px solid var(--line);background:#fff;border-radius:14px;min-height:56px;padding:4px 10px;cursor:pointer;font-size:13px;display:grid;justify-items:center;line-height:1.3;min-width:62px}
.mood b{font-size:22px;font-weight:400}
.mood[aria-checked=true]{border-color:var(--rust);background:#FBE5D6}
.check{display:flex!important;grid-template-columns:none;align-items:flex-start;gap:8px;color:var(--ink)!important;font-weight:400!important;font-size:15px!important}
.check input{width:20px;height:20px;accent-color:var(--forest);margin-top:4px;flex:0 0 auto}
.err{margin:0;color:#B23B1E;font-size:14px}
.err:empty{display:none}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.card{background:var(--card);border-radius:24px;padding:18px;border:1px solid var(--line)}
.card h2{margin:0;font-size:18px;color:var(--forest)}
.calhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.calhead h2{flex:1;text-align:center}
.nav{width:44px;height:44px;border-radius:50%;border:2px solid var(--line);background:#fff;font-size:22px;line-height:1;cursor:pointer}
.nav:disabled{opacity:.35;cursor:default}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.cal .wd{text-align:center;font-size:11px;color:var(--sub)}
.cal .wd.su{color:var(--rust)}
.cal .c{aspect-ratio:1;border-radius:10px;background:#EFE7D3;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--sub);position:relative}
.cal .c.l1{background:var(--l1);color:var(--ink)}.cal .c.l2{background:var(--l2);color:var(--ink)}.cal .c.l3{background:var(--l3);color:#fff}.cal .c.l4{background:var(--l4);color:#fff}
.cal .c.today{box-shadow:inset 0 0 0 2px var(--rust)}
.cal .c.out{visibility:hidden}
.cal .c.th::after{content:"";position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:50%;background:var(--rust)}
.legend{display:flex;align-items:center;gap:4px;justify-content:flex-end;font-size:11px;color:var(--sub);margin:8px 0 0}
.legend i{width:14px;height:14px;border-radius:4px;display:inline-block}
.legend .l1{background:var(--l1)}.legend .l2{background:var(--l2)}.legend .l3{background:var(--l3)}.legend .l4{background:var(--l4)}
.totals{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0 0}
.totals div{background:#fff;border-radius:14px;padding:8px 10px;text-align:center;border:1px solid var(--line)}
.totals dt{font-size:11px;color:var(--sub)}
.totals dd{margin:0;font-size:17px;white-space:nowrap;font-weight:700;color:var(--forest);font-variant-numeric:tabular-nums}
.totals dd small{font-size:12px;color:var(--sub);font-weight:400}
.favs{margin:10px 0 0;font-size:14px;color:var(--sub)}
.favs:empty{display:none}
.journal{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:10px}
.journal li{background:#fff;border-radius:16px;padding:12px 14px;border-left:6px solid var(--l3)}
.journal .top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.journal .d{font-weight:700}
.journal .m{color:var(--rust);font-weight:700;white-space:nowrap}
.journal .tg{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.journal .tg span{font-size:12px;background:#EEF4E6;color:var(--forest);border-radius:999px;padding:1px 8px}
.journal .tg span.mo{background:#FBE5D6;color:#8E3F16}
.journal .tg span.tt{background:var(--forest);color:#fff}
.journal .n{margin:6px 0 0;font-size:15px;overflow-wrap:anywhere;white-space:pre-wrap}
.journal .del{background:none;border:0;color:var(--sub);text-decoration:underline;font-size:12px;cursor:pointer;min-height:36px;padding:0}
.empty{color:var(--sub);font-size:14px;margin:10px 0 0}
.foot{font-size:12px;color:var(--sub);text-align:center}
.foot p{margin:0}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
