:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f5f7fa;--card:#fff;--control-bg:#fff;--text:#172033;--muted:#687386;--label:#4b5563;--line:#dfe4ea;--surface-alt:#f8fafc;--surface-active:#e9edf2;--accent:#334155;--accent2:#475569;--accent-text:#334155;--good:#15803d;--notice-bg:#f0fdf4;--notice-line:#bbf7d0;--notice-text:#166534;--star-empty:#cbd2db;--chart-bar:#64748b;--radius:18px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#0f172a;--card:#1e293b;--control-bg:#0f172a;--text:#e2e8f0;--muted:#94a3b8;--label:#cbd5e1;--line:#334155;--surface-alt:#273449;--surface-active:#334155;--accent-text:#cbd5e1;--notice-bg:#052e16;--notice-line:#166534;--notice-text:#bbf7d0;--star-empty:#64748b;--chart-bar:#94a3b8}}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}h2{margin:0 0 15px;font-size:20px}h3{margin:0 0 10px;font-size:16px}.today-heading{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.today-heading h2{margin-bottom:15px}.today-sheep-actions{flex:none;gap:8px;display:flex}.sheep-button{border:1px solid var(--line);background:var(--surface-alt);width:44px;height:44px;color:var(--accent-text);cursor:pointer;border-radius:10px;flex:none;place-items:center;margin-top:-5px;padding:5px;transition:background-color .16s,transform .16s;display:grid}.sheep-button svg{width:27px;height:22px}.sheep-button:hover{background:var(--surface-active);transform:translateY(-1px)}.sheep-button:focus-visible,.sheep-dialog button:focus-visible{outline-offset:3px;outline:3px solid #93c5fd}.morning-dialog{width:min(600px,100% - 24px)}.morning-scene{isolation:isolate;background:linear-gradient(#fdf4d7 0%,#e9f1f5 72%,#d7e4e9 100%);border:1px solid #d9dfeb;border-radius:16px;height:clamp(190px,34vw,250px);margin:20px 0 15px;position:relative;overflow:hidden}.morning-illustration{width:100%;height:100%}.morning-sun{fill:#f2bd68}.morning-sun-rays{fill:none;stroke:#e7ad55;stroke-linecap:round;stroke-width:3px}.morning-floor,.morning-bed-head{fill:none;stroke:#8998a6;stroke-linecap:round;stroke-width:5px}.morning-bed{fill:#b98b73}.morning-mattress{fill:#fffaf1}.morning-wool{fill:#fff;stroke:#dce2e8;stroke-width:1px}.morning-face,.morning-ear{fill:#efd5c5}.morning-ear{stroke:#fff;stroke-width:3px}.morning-eyes-closed path,.morning-mouth,.morning-happy-mouth,.morning-stretch,.morning-legs{fill:none;stroke:#374151;stroke-linecap:round;stroke-width:3px}.morning-eyes-open ellipse{fill:#374151}.morning-eyes-open,.morning-yawn,.morning-happy-mouth,.morning-stretch{opacity:0}.morning-yawn{fill:#9d5a5a;stroke:#374151;stroke-width:2px}.morning-blanket{fill:#8297b4}.morning-blanket-edge{fill:none;stroke:#667e9f;stroke-width:3px}.morning-snore{fill:#687b95;opacity:0;transform-box:fill-box;transform-origin:50%;font:700 17px system-ui,sans-serif}.morning-scene--sleeping .morning-snore{opacity:.8;animation:2.2s ease-in-out infinite morning-snore}.morning-scene:not(.morning-scene--sleeping) .morning-snore{opacity:0}.morning-sheep{transform-box:fill-box;transform-origin:50%;transition:transform .8s}.morning-scene--waking .morning-eyes-closed,.morning-scene--sitting .morning-eyes-closed,.morning-scene--flopping .morning-eyes-closed,.morning-scene--negotiating .morning-eyes-closed,.morning-scene--standing .morning-eyes-closed,.morning-scene--ready .morning-eyes-closed{opacity:0}.morning-scene--waking .morning-eyes-open,.morning-scene--sitting .morning-eyes-open,.morning-scene--flopping .morning-eyes-open,.morning-scene--negotiating .morning-eyes-open,.morning-scene--standing .morning-eyes-open,.morning-scene--ready .morning-eyes-open,.morning-scene--waking .morning-yawn{opacity:1}.morning-scene--waking .morning-mouth,.morning-scene--ready .morning-mouth{opacity:0}.morning-scene--ready .morning-happy-mouth{opacity:1}.morning-scene--sitting .morning-sheep{transform:translateY(-20px)rotate(-8deg)}.morning-scene--flopping .morning-sheep{animation:.7s ease-in both morning-flop}.morning-scene--negotiating .morning-sheep,.morning-scene--sleeping .morning-sheep{transform:none}.morning-scene--standing .morning-sheep,.morning-scene--ready .morning-sheep{transform:translate(47px,-35px)}.morning-scene--standing .morning-stretch,.morning-scene--ready .morning-stretch{opacity:0;animation:none}.morning-scene--ready .morning-sheep{animation:1.4s ease-in-out infinite alternate morning-celebrate}.morning-message,.morning-finale{color:#e7edf9;margin:0;font-weight:650}.morning-finale{color:#f6e9bb;margin-top:5px}.morning-actions{flex-wrap:wrap;gap:8px;margin-top:13px;display:flex}.morning-restart,.morning-done{color:#f1f5f9!important;background:#1b2a49!important;border-color:#526486!important}.morning-restart:hover,.morning-done:hover{background:#293b5e!important}@keyframes morning-snore{0%,to{opacity:.45;transform:translateY(4px)scale(.9)}50%{opacity:.9;transform:translateY(-4px)scale(1.05)}}@keyframes morning-flop{45%{transform:translateY(-22px)rotate(-7deg)}to{transform:none}}@keyframes morning-celebrate{to{transform:translate(47px,-40px)rotate(2deg)}}header{background:var(--accent);color:#fff;z-index:5;padding:22px 18px 20px;position:sticky;top:0}.header-inner{max-width:900px;margin:auto}.title{font-size:25px;font-weight:750}.subtitle{opacity:.8;margin-top:3px;font-size:14px}nav{gap:8px;max-width:900px;margin:0 auto;padding:12px 18px 0;display:flex}nav button{min-height:44px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:12px;flex:1;padding:11px 8px;font-size:14px}nav button.active{background:var(--surface-active);color:var(--text);font-weight:700}main{max-width:900px;margin:0 auto;padding:16px 18px 50px}.view{display:none}.view.active{display:block}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);margin-bottom:15px;padding:20px;box-shadow:0 2px 8px #0f172a09}.grid{grid-template-columns:repeat(2,1fr);gap:14px;display:grid}.row{grid-template-columns:1fr 1fr;gap:14px;display:grid}.field{flex-direction:column;gap:7px;display:flex}.medication-field{grid-column:2}.quality-field{grid-column:1}[hidden]{display:none!important}.full{grid-column:1/-1}label{color:var(--label);font-size:13px;font-weight:650}input,select,textarea{width:100%;font:inherit;border:1px solid var(--line);background:var(--control-bg);color:var(--text);border-radius:11px;padding:12px;font-size:max(16px,1em)}input[type=file]{padding:8px}dialog{overscroll-behavior:contain;border-radius:var(--radius);background:0 0;border:0;width:min(560px,100% - 24px);max-height:calc(100dvh - 24px);padding:0;overflow-y:auto}dialog::backdrop{background:#0f172a8c}.welcome-dialog{border:1px solid var(--line);background:var(--card);width:min(640px,100% - 24px);color:var(--text);box-shadow:0 24px 80px #0206174d}.welcome-card{box-shadow:none;border:0;margin:0}.welcome-header{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.welcome-header h2{margin-bottom:5px}.welcome-header p{margin:0}.welcome-close{border:1px solid var(--line);background:var(--surface-alt);width:44px;height:44px;color:var(--text);font:inherit;cursor:pointer;border-radius:10px;flex:0 0 44px;place-items:center;font-size:25px;line-height:1;display:grid}.welcome-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0;padding:0;list-style:none;display:grid}.welcome-list li{border:1px solid var(--line);background:var(--surface-alt);border-radius:12px;gap:4px;padding:12px;font-size:13px;line-height:1.45;display:grid}.welcome-list strong{color:var(--accent-text);font-size:14px}.welcome-list span{color:var(--muted)}.welcome-choice{cursor:pointer;align-items:center;gap:9px;margin:0 0 12px;display:flex}.welcome-choice input{width:20px;height:20px;accent-color:var(--accent);flex:0 0 20px;margin:0}.welcome-start{width:100%}.sheep-dialog{color:#edf3ff;background:#111d38;border:1px solid #33466a;border-radius:20px;width:min(720px,100% - 24px);max-height:calc(100% - 24px);padding:0;box-shadow:0 24px 80px #02061773}.sheep-dialog::backdrop{background:#040917c2}.sheep-dialog__content{padding:22px}.sheep-dialog__header{justify-content:space-between;align-items:flex-start;gap:18px;display:flex}.sheep-dialog__header h2{color:#f8fafc;margin:0 0 5px}.sheep-dialog__header p{color:#b8c5dc;margin:0;font-size:14px}.sheep-close{color:#f8fafc;width:44px;height:44px;font:inherit;cursor:pointer;background:#1b2a49;border:1px solid #425477;border-radius:10px;flex:none;place-items:center;font-size:25px;line-height:1;display:grid}.sheep-close:hover{background:#293b5e}.sheep-scene{isolation:isolate;background:linear-gradient(#101b38 0%,#1c3155 74%,#263c5b 100%);border:1px solid #354b73;border-radius:16px;height:clamp(190px,34vw,260px);margin:20px 0 15px;position:relative;overflow:hidden}.sheep-stars{fill:#e8efff;opacity:.78;width:100%;height:100%;position:absolute;inset:0}.sheep-moon{background:#f6e9bb;border-radius:50%;width:36px;height:36px;position:absolute;top:20px;right:11%;box-shadow:0 0 28px #f6e9bb33}.sheep-hill{border-radius:50% 50% 0 0/30% 30% 0 0;height:135px;position:absolute;bottom:-70px;left:-10%;right:-10%}.sheep-hill--back{background:#213653;bottom:-88px}.sheep-hill--front{background:#192d49;bottom:-104px}.sheep-fence{z-index:2;filter:drop-shadow(0 2px 2px #050c1b40);border-top:5px solid #d5c7a6;border-bottom:5px solid #d5c7a6;justify-content:space-between;width:134px;height:61px;padding:0 8px;display:flex;position:absolute;bottom:37px;left:50%;transform:translate(-50%)}.sheep-fence span{background:#c8b895;border-radius:3px;width:5px;height:61px;margin-top:-5px}.sheep-track{z-index:3;position:absolute;inset:0;container-type:inline-size}.count-sheep{opacity:0;width:60px;height:auto;position:absolute;bottom:32px;left:0}.count-sheep-art{width:100%;height:auto;display:block}.count-sheep.is-jumping{opacity:1;will-change:transform, opacity;animation:4s linear infinite sheep-traverse,4s linear infinite sheep-visibility}@keyframes sheep-traverse{0%{transform:translate(0)}to{transform:translate(calc(100cqw - 60px))}}.count-sheep.is-jumping .count-sheep-art{will-change:transform;animation:4s ease-in-out infinite sheep-hop}@keyframes sheep-visibility{0%{opacity:0}5%{opacity:1}95%{opacity:1}99.9%{opacity:0}to{opacity:0}}@keyframes sheep-hop{0%,90%{transform:translateY(0)rotate(0)}36%{transform:translateY(-76px)rotate(-4deg)}58%{transform:translateY(-76px)rotate(4deg)}}.sheep-dialog__footer{grid-template-columns:1fr auto;align-items:center;gap:5px 12px;display:grid}.sheep-counter,.sheep-finale{margin:0;font-weight:700}.sheep-counter{color:#e7edf9;font-variant-numeric:tabular-nums}.sheep-finale{color:#f6e9bb;grid-column:1}.sheep-restart{grid-area:1/2/span 2;color:#f1f5f9!important;background:#1b2a49!important;border-color:#526486!important}.sheep-restart:hover{background:#293b5e!important}.import-raw{margin:18px 0}.import-error{color:#b91c1c;margin:0}.import-actions{justify-content:flex-end;gap:8px;margin-top:18px;display:flex}.import-actions .primary{width:auto;min-width:90px}.small{color:var(--muted);font-size:13px}.calc{color:var(--accent-text);padding-top:7px;font-size:22px;font-weight:750}button.primary{background:var(--accent);color:#fff;width:100%;font:inherit;cursor:pointer;border:0;border-radius:12px;min-height:44px;padding:13px;font-weight:700}button.secondary{border:1px solid var(--line);background:var(--card);color:var(--text);font:inherit;cursor:pointer;border-radius:10px;min-height:44px;padding:10px 13px}.stars{flex-wrap:wrap;gap:0;display:flex}.star{color:var(--star-empty);cursor:pointer;background:0 0;border:0;flex:0 0 44px;width:44px;min-height:44px;padding:0;font-size:31px}.star.on{color:#f59e0b}.notice{background:var(--notice-bg);border:1px solid var(--notice-line);color:var(--notice-text);border-radius:12px;margin-bottom:14px;padding:12px 14px}.stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}.stats-charts{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;display:grid}.stat-chart{min-width:0;margin:0}.stats-card-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px;display:flex}.stats-card-header h2{margin:0}.stat-chart h3{min-height:2.6em}.chart-empty{min-height:1.5em;margin:0}.stat{background:var(--surface-alt);border:1px solid var(--line);border-radius:14px;padding:14px}.stat b{margin-top:4px;font-size:21px;display:block}.entry{border-top:1px solid var(--line);padding:15px 0}.entry:first-child{border-top:0;padding-top:0}.entry-head{justify-content:space-between;gap:10px;display:flex}.badge{color:var(--muted);font-size:12px}.bar-wrap{border-bottom:1px solid var(--line);align-items:end;gap:2px;height:155px;padding:10px 2px 0;display:flex}.bar{background:var(--chart-bar);border-radius:7px 7px 0 0;flex:1;min-height:3px;position:relative}.bar span{color:var(--muted);white-space:nowrap;font-size:8px;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.bar-missing{background:0 0}.bar-labels{gap:2px;padding:7px 2px;display:flex}.bar-labels div{text-align:center;color:var(--muted);flex:1;font-size:9px}.empty{text-align:center;color:var(--muted);padding:25px 5px}.danger{color:#b91c1c}@media (width<=650px){.grid,.row{grid-template-columns:1fr}.medication-field{grid-column:auto}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-charts{grid-template-columns:1fr}main{padding-left:12px;padding-right:12px}.card{padding:16px}nav{padding-left:8px;padding-right:8px}.sheep-dialog__content,.welcome-card{padding:17px}.welcome-list{grid-template-columns:1fr;gap:7px;margin:12px 0}.morning-scene{height:205px;margin-top:16px}.morning-actions{flex-direction:column;align-items:flex-start}.sheep-scene{height:205px;margin-top:16px}.sheep-dialog__footer{grid-template-columns:1fr;gap:8px}.sheep-finale,.sheep-restart{grid-area:auto/1}.sheep-restart{justify-self:start}}@media (width<=380px){nav{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.title{font-size:22px}}@media (prefers-reduced-motion:reduce){.sheep-button{transition:none}.morning-sheep,.morning-scene--sleeping .morning-snore,.morning-scene--flopping .morning-sheep,.morning-scene--ready .morning-sheep{transition:none;animation:none}.morning-scene--sleeping .morning-snore{opacity:.6;transform:none}.count-sheep{left:calc(var(--sheep-index) * 9%);opacity:0;animation:none;transform:translate(0,0)}.count-sheep.is-jumping{animation:none}.count-sheep.is-jumping .count-sheep-art{animation:none;transform:none}.count-sheep.is-counted{opacity:1}}
