@charset "UTF-8";
:root{--bg:#f5f4f0;--surface:#fff;--ink:#263d34;--muted:#7b847c;--line:#e7e9e2;--green:#42685b;--green-light:#edf3ec;--day-bg:#eef4fb;--day-ink:#52759a;--night-bg:#f1eef9;--night-ink:#81709e;--off-bg:#eaf3e9;--off-ink:#648061;--danger:#a84e46;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.6}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #7ba18d;outline-offset:3px}[hidden]{display:none!important}h1,h2,h3,h4,p{margin:0}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.site-shell{max-width:1240px;padding:0 48px;margin:auto}.site-header{height:109px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;font-size:18px;font-weight:650;letter-spacing:1px}.brand-mark{width:44px;height:44px;display:grid;place-items:center;color:#fff;background:var(--green);border-radius:14px}.brand-subtitle{display:block;font-size:9px;font-weight:500;letter-spacing:2.1px;color:var(--muted);margin-top:2px}.header-date{color:var(--muted);font-size:12px}.page-intro{padding:45px 0 30px}.eyebrow{color:var(--green);font-size:11px;letter-spacing:2px}.page-intro h1{font-size:38px;font-weight:600;letter-spacing:1px;line-height:1.45;margin:9px 0 8px}.page-intro p,.section-heading p{color:var(--muted);font-size:13px}.tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:29px}.tab{background:none;border:0;border-bottom:3px solid transparent;padding:13px 23px 15px;display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:550;margin-bottom:-1px}.tab svg{width:18px;height:18px}.tab.active{color:var(--green);border-bottom-color:var(--green)}.tab:hover{background:#edf0e9}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:22px}.section-heading h2{font-size:18px;font-weight:600;margin-bottom:5px}.subtle-badge{font-size:11px;border:1px solid #dfe4d9;border-radius:20px;padding:5px 12px;color:#7d8876;white-space:nowrap}.schedule-layout,.stool-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;align-items:start}.card{background:var(--surface);border:1px solid var(--line);border-radius:17px;box-shadow:0 4px 16px #263d3403}.setup-card,.record-form-card{padding:25px}.card-heading{display:flex;align-items:center;gap:9px;margin-bottom:23px}.card h3{font-size:16px;font-weight:600}.number-tag{font-size:11px;width:26px;height:26px;background:var(--green-light);color:var(--green);display:grid;place-items:center;border-radius:8px}form>label,.filter-form label,.label-row label{display:block;font-size:12px;font-weight:550;margin-bottom:8px}input[type=date],select,textarea{width:100%;background:#fafbf8;border:1px solid #e0e5dc;border-radius:8px;color:var(--ink);padding:11px 12px;min-height:44px;min-width:0;appearance:none;color-scheme:light}input[type=date]{font-variant-numeric:tabular-nums}input[type=date]::-webkit-calendar-picker-indicator{opacity:.5}select{appearance:auto}#schedule-form>label:not(:first-child){margin-top:20px}textarea{resize:vertical;max-height:300px;min-height:100px;line-height:1.7}textarea::placeholder{color:#a0a59c;font-size:12px}.field-hint{font-size:11px;color:var(--muted);line-height:1.8}.setup-card .field-hint{margin-top:10px}.button{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-height:43px;border:1px solid transparent;border-radius:8px;font-size:12px;font-weight:550;padding:10px 16px;transition:background .15s}.primary{background:var(--green);color:#fff}.primary:hover:not(:disabled){background:#34594c}.secondary{border-color:#e0e5dc;background:#fafbf8;color:var(--green)}.secondary:hover:not(:disabled){background:#edf2e9}.danger{background:var(--danger);color:#fff}.setup-card .primary{width:100%;margin-top:22px;justify-content:space-between}.form-message{font-size:12px;line-height:1.7;color:var(--green);white-space:pre-line}.form-message:not(:empty){margin-top:12px}.form-message.error{color:var(--danger)}.cycle-guide{margin-top:24px;padding-top:22px;border-top:1px dashed var(--line)}.small-label{font-size:10px;letter-spacing:1.1px;color:var(--muted)}.cycle-chips{display:flex;gap:7px;margin:11px 0 9px}.cycle-chips span{width:30px;height:31px;display:grid;place-items:center;border-radius:7px;font-size:12px}.day{background:var(--day-bg);color:var(--day-ink)}.night{background:var(--night-bg);color:var(--night-ink)}.off{background:var(--off-bg);color:var(--off-ink)}.cycle-guide p{font-size:10px;color:var(--muted)}.calendar-card{padding:25px 28px 0}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.calendar-toolbar h3{font-size:22px;letter-spacing:.4px;margin-top:4px}.calendar-nav{display:flex;gap:8px}.icon-button{border:1px solid var(--line);background:#fff;color:var(--green);width:33px;height:33px;border-radius:8px;font-size:24px;line-height:1;display:grid;place-items:center}.icon-button:hover:not(:disabled){background:var(--green-light)}.legend{display:flex;align-items:center;gap:18px;font-size:11px;color:var(--muted);margin-bottom:18px}.legend>span{display:flex;align-items:center;gap:6px}.legend i{width:9px;height:9px;border-radius:3px;display:inline-block}.today-legend{margin-left:auto;font-size:10px}.weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;border-top:1px solid var(--line);padding:14px 0 10px;color:var(--muted);font-size:11px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;padding-bottom:20px}.calendar-day{min-height:72px;border-radius:9px;background:#fafbf8;padding:9px 10px;display:flex;align-items:center;flex-direction:column;gap:7px}.calendar-day.blank{background:none}.calendar-day.uncovered{opacity:.4}.date-number{font-size:12px;width:23px;height:23px;display:grid;place-items:center;font-variant-numeric:tabular-nums}.calendar-day.today .date-number{background:var(--green);color:#fff;border-radius:50%}.shift-label{font-size:16px;font-weight:400;line-height:1.5;padding:1px 8px;border-radius:4px;white-space:nowrap}.calendar-footer{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;color:var(--muted);font-size:10px}.text-button{border:0;padding:4px 0;background:none;font-size:11px;color:var(--green);white-space:nowrap;text-decoration:none}.text-button:hover{text-decoration:underline}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.summary-card{border:1px solid var(--line);border-radius:12px;padding:15px 18px;background:#f9faf6;display:flex;align-items:center;justify-content:space-between}.summary-card p{font-size:11px;color:var(--muted)}.summary-card strong{font-size:25px;font-weight:500;line-height:1.3}.summary-card small{font-size:10px;color:var(--muted);margin-left:5px}.summary-card .dot{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px}.summary-card.day-summary .dot{background:var(--day-ink)}.summary-card.night-summary .dot{background:var(--night-ink)}.summary-card.off-summary .dot{background:var(--off-ink)}.empty-state{display:flex;min-height:325px;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px 16px}.empty-symbol{color:#91a895;background:#f0f4ed;border-radius:50%;width:64px;height:64px;font-size:32px;line-height:64px;margin-bottom:15px}.empty-state h4{font-size:14px;font-weight:550;margin-bottom:8px}.empty-state p{font-size:12px;color:var(--muted);max-width:260px}.empty-state .button{margin-top:18px}.site-footer{margin-top:42px;border-top:1px solid var(--line);padding:23px 0 29px;display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#899185}.record-form-card #record-date{margin-bottom:22px}.consistency-fieldset{border:0;margin:0 0 22px;padding:0;min-width:0}.consistency-fieldset legend{font-size:12px;font-weight:550;margin-bottom:10px}.consistency-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.consistency-option{position:relative;cursor:pointer}.consistency-option input{position:absolute;left:8px;top:8px;opacity:0;width:1px;height:1px}.consistency-option span{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;gap:4px;border:1px solid var(--line);border-radius:8px;background:#fafbf8;min-height:65px;color:#777e72}.consistency-option input:checked+span{background:var(--green-light);border-color:var(--green);color:var(--green)}.consistency-option input:focus-visible+span{outline:3px solid #7ba18d;outline-offset:2px}.stool-dots{font-size:21px;line-height:1.2;color:#9a896f;font-weight:500}.dots-hard{font-size:11px;line-height:25px;letter-spacing:-1px}.label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.label-row label{margin:0}.optional{font-size:10px;color:var(--muted);font-weight:400;margin-left:5px}.record-form-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:19px}.record-form-actions .primary{flex:1;justify-content:space-between}.history-card{padding:25px 28px}.history-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.history-heading h3{font-size:20px;margin-top:3px;display:flex;align-items:center;gap:8px}.count-badge{font-size:10px;color:var(--green);border-radius:20px;background:var(--green-light);padding:1px 8px}.filter-form{display:flex;gap:10px;align-items:end;padding-bottom:20px;border-bottom:1px solid var(--line)}.filter-form>div{flex:1;min-width:0}.filter-form input{font-size:12px;padding:9px;min-height:40px}.filter-form label{font-size:10px}.filter-divider{align-self:center;padding-top:22px;color:#b9bdb4;font-size:10px}.filter-form .button{min-height:40px;padding:8px 12px}.filter-form .text-button{padding-bottom:11px}.record-item{padding:19px 0;border-bottom:1px solid var(--line)}.record-item:last-child{border-bottom:0;padding-bottom:0}.record-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.record-date{font-size:16px;font-weight:550}.record-weekday{font-size:12px;font-weight:400;color:var(--muted);margin-left:8px}.consistency-badge{font-size:14px;padding:3px 10px;border-radius:5px;background:#f3eee6;color:#907857;white-space:nowrap}.consistency-badge.normal{background:var(--green-light);color:var(--green)}.record-note{font-size:12px;color:#727d73;margin:10px 0 12px;white-space:pre-wrap;overflow-wrap:anywhere}.record-note.no-note{color:#a2a79b;font-size:11px}.record-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px}.record-meta{font-size:10px;color:#a0a79b}.record-actions{display:flex;gap:16px}.record-actions .delete-button{color:#a0766b}.history-card .empty-state{min-height:300px}dialog{border:1px solid var(--line);border-radius:18px;padding:0;max-width:420px;width:calc(100% - 32px);color:var(--ink);background:white;box-shadow:0 20px 80px #263d3430}dialog::backdrop{background:#233f3455;backdrop-filter:blur(3px)}.dialog-content{padding:28px}.dialog-content h3{font-size:20px;margin:9px 0 15px}.dialog-content>p{margin-top:10px;font-size:13px}.dialog-content>.field-hint{font-size:11px}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}
@media(min-width:1300px){.site-shell{padding:0 32px}.schedule-layout,.stool-layout{grid-template-columns:316px minmax(0,1fr)}}
@media(max-width:1000px){.site-shell{padding:0 28px}.schedule-layout,.stool-layout{grid-template-columns:270px minmax(0,1fr);gap:18px}.setup-card,.record-form-card{padding:21px}.calendar-card{padding:21px 19px 0}.history-card{padding:21px 19px}.calendar-grid{gap:4px}.calendar-day{padding:7px 3px;min-height:68px}.legend{gap:12px}.today-legend{display:none}.filter-form{flex-wrap:wrap}.filter-form>div{flex-basis:35%}.filter-form .filter-divider{padding-top:25px}.site-footer{flex-wrap:wrap}}
@media(max-width:740px){.site-shell{padding:0 20px}.site-header{height:85px}.header-date{font-size:10px;max-width:115px;text-align:right}.brand{font-size:16px;gap:9px}.brand-mark{width:38px;height:38px;border-radius:12px}.brand-subtitle{font-size:8px;letter-spacing:1.5px}.page-intro{padding:31px 0 24px}.page-intro h1{font-size:31px}.page-intro p{font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.4px}.tabs{margin-bottom:24px;gap:0}.tab{padding:12px 14px;font-size:13px;gap:6px}.section-heading h2{font-size:16px}.section-heading p{font-size:11px}.section-heading{margin-bottom:18px}.subtle-badge{display:none}.schedule-layout,.stool-layout{grid-template-columns:minmax(0,1fr);gap:18px}.setup-card,.record-form-card{padding:22px}.card-heading{margin-bottom:18px}.cycle-guide{margin-top:18px;padding-top:17px}.cycle-chips{margin:9px 0}.calendar-card{padding:22px 15px 0}.calendar-toolbar h3{font-size:20px}.calendar-grid{gap:5px}.calendar-day{min-height:66px;padding:7px 2px}.shift-label{padding:1px 6px;font-size:16px}.calendar-footer{font-size:9px;align-items:start}.summary-grid{gap:8px;margin-top:12px}.summary-card{padding:12px 10px}.summary-card strong{font-size:22px}.summary-card p{font-size:10px}.summary-card small{font-size:9px;margin-left:2px}.site-footer{margin-top:32px;padding:20px 0;gap:7px;font-size:9px}.consistency-options{grid-template-columns:repeat(5,minmax(0,1fr))}.consistency-option span{font-size:9px;min-height:64px}.history-card{padding:22px 18px}.filter-form{gap:8px}.filter-form label{font-size:11px}.filter-form input{font-size:11px}.record-date{font-size:16px}.record-meta{font-size:9px}.record-actions{gap:12px}.empty-state{min-height:280px}}
@media(max-width:1000px){.legend .today-legend{display:none}}
@media(max-width:380px){.summary-card{display:block}.summary-card p{white-space:nowrap;margin-bottom:4px}.summary-card .dot{margin-right:4px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.time-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.time-options .consistency-option span{min-height:42px;font-size:13px}

.site-header{gap:24px}.brand,.header-date{flex-shrink:0}.header-intro{font-size:14px;font-weight:400;color:var(--green);text-align:center;line-height:1.8}main{padding-top:20px}
@media(max-width:740px){.site-header{height:auto;min-height:85px;flex-wrap:wrap;gap:14px 12px;padding:20px 0 16px}.header-intro{order:3;flex-basis:100%;font-size:12px;text-align:left}.header-date{margin-left:auto}main{padding-top:12px}}

.schedule-layout,.stool-layout{grid-template-columns:minmax(0,1fr)}
.form-dialog{max-width:480px;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.form-dialog .setup-card,.form-dialog .record-form-card{position:relative;padding:28px}
.form-dialog .card-heading{padding-right:30px}
.dialog-close{position:absolute;right:18px;top:18px;width:32px;height:32px;border:0;border-radius:50%;background:var(--green-light);color:var(--green);font-size:24px;line-height:1}
.section-heading>.button{flex-shrink:0}
@media(max-width:740px){.section-heading{align-items:flex-start;gap:10px}.section-heading>.button{padding:8px 12px;font-size:11px}.form-dialog .setup-card,.form-dialog .record-form-card{padding:24px 20px}.form-dialog .consistency-options{grid-template-columns:repeat(3,minmax(0,1fr))}}

.calendar-toolbar,.history-heading{gap:16px;flex-wrap:wrap}.calendar-nav,.history-actions{display:flex;align-items:center;gap:12px;margin-left:auto}.calendar-nav .button,.history-actions .button{min-height:36px;padding:7px 14px;white-space:nowrap}
@media(max-width:740px){.calendar-toolbar,.history-heading{gap:12px}.calendar-nav,.history-actions{gap:8px}.calendar-nav .button,.history-actions .button{font-size:11px;padding:7px 10px}.calendar-nav .icon-button{width:30px;height:30px}}

.history-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:20px;padding-bottom:20px;margin-bottom:0;border-bottom:1px solid var(--line)}
.history-heading>.filter-form{justify-self:end;flex-wrap:nowrap;gap:10px;padding:0;border:0}
.history-heading .filter-form>div{flex:0 1 142px;width:142px}
.history-heading .filter-divider{padding-top:22px}
.history-heading .history-actions{padding-bottom:2px}
@media(max-width:900px){.history-heading{grid-template-columns:1fr auto;gap:16px}.history-heading>.filter-form{grid-column:1 / -1;grid-row:2;justify-self:stretch}.history-heading .history-actions{grid-column:2;grid-row:1}.history-heading .filter-form>div{flex:1;width:auto}}
@media(max-width:420px){.history-heading>.filter-form{flex-wrap:wrap;gap:8px}.history-heading .filter-form>div{flex-basis:calc(50% - 18px)}.history-heading .filter-form .filter-divider{padding-top:22px}.history-heading .filter-form .text-button{padding-bottom:11px}}

.record-note .consistency-badge{display:inline-block;margin-right:8px;vertical-align:baseline}

.mobile-filter-toggle{display:none}
@media(max-width:740px){.mobile-filter-toggle{display:inline-block}.history-heading>.filter-form{display:none}.history-heading>.filter-form.filters-open{display:flex}.history-heading{gap:16px 10px}}

.pwa-status{margin-top:16px;padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--green-light);font-size:12px;display:flex;flex-wrap:wrap;gap:8px 20px}.pwa-status .text-button{margin-left:10px}.footer-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.site-footer{flex-wrap:wrap}#install-help{flex-basis:100%;font-size:12px;line-height:1.8}
@media(display-mode:standalone){.site-shell{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}}

/* Keep mobile form text at 16px to avoid iOS focus zoom. */
@media(max-width:740px){input[type=date],select,textarea,.filter-form input{font-size:16px}textarea::placeholder{font-size:inherit}}
