:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#152243;background:#f4f7fc;--blue:#2650d7;--muted:#61708a;--line:#dce3f0;--surface:#fff;font-synthesis:none;color-scheme:light}*{box-sizing:border-box}body{margin:0;font-size:16px;line-height:1.5;padding-bottom:env(safe-area-inset-bottom)}button,input{font:inherit}button{cursor:pointer;min-height:46px;border:0;font-weight:650;border-radius:12px;background:transparent;color:inherit}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #8da6ff;outline-offset:3px}a{color:inherit}button,input,label{-webkit-tap-highlight-color:transparent}.topbar{max-width:1040px;padding:25px 32px;margin:auto;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;font-size:26px;font-weight:800;letter-spacing:-1px;text-decoration:none}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--blue);color:white;font-size:23px;letter-spacing:0}.brand-sub{font-size:11px;letter-spacing:2px;margin-left:12px;font-weight:600;color:var(--muted)}.help-button{border:1px solid var(--line);border-radius:50%;width:42px;min-height:42px;color:var(--muted)}main{max-width:960px;padding:40px 28px 50px;margin:auto}.page-title{display:flex;justify-content:space-between;align-items:center;gap:28px;margin-bottom:36px}.date-label{font-size:14px;color:var(--muted);margin:0 0 7px}h1{font-size:clamp(27px,4vw,36px);font-weight:650;line-height:1.2;letter-spacing:-1.2px;margin:0}h2{font-size:19px;letter-spacing:-.4px;margin:0}h3{font-size:18px;line-height:1.3;margin:0}.primary{background:var(--blue);color:white;padding:13px 22px;box-shadow:0 4px 10px #2650d71a}.primary:hover{background:#1b3fac}.add-main{white-space:nowrap;display:flex;align-items:center;gap:6px;min-height:52px}.add-main span{font-size:24px;line-height:1}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.section-heading>span{font-size:13px;color:var(--muted)}.recent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.recent-card{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:23px;position:relative;min-height:166px}.medicine-name{display:flex;gap:9px;align-items:center}.medicine-name h3{overflow-wrap:anywhere;font-weight:650}.medicine-dot{width:8px;height:8px;background:#90a2c7;border-radius:50%;flex-shrink:0}.has-entry .medicine-dot{background:var(--blue)}.last-time{font-size:32px;letter-spacing:-1px;margin:16px 0 0;font-variant-numeric:tabular-nums;line-height:1.2}.last-time>span{display:inline-block;font-size:13px;color:var(--muted);letter-spacing:0;margin-left:10px}.last-amount{font-size:14px;color:var(--muted);margin:8px 0 0;overflow-wrap:anywhere}.elapsed{display:inline-block;margin-top:14px;font-size:12px;color:#3653a5;background:#eef3ff;padding:3px 8px;border-radius:6px}.no-record{font-size:26px;color:#7886a0;margin:17px 0 0;letter-spacing:-.6px}.recent-section{margin-bottom:36px}.history-section{background:white;border:1px solid var(--line);border-radius:20px;padding:24px}.history-section>.section-heading{margin-bottom:22px}.day-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;border-bottom:1px solid var(--line);padding-bottom:20px}.day-button{display:flex;flex-direction:column;align-items:center;gap:5px;border:1px solid transparent;padding:9px 4px;border-radius:12px;min-width:0;color:var(--muted)}.day-button:hover{background:#f3f6fd}.day-button span{font-size:12px;font-weight:500}.day-button strong{font-size:18px;font-weight:650}.day-button.selected{color:var(--blue);background:#ecf1ff;border-color:#ccdaff}.empty-state{text-align:center;padding:42px 18px 34px}.empty-mark{display:inline-grid;place-items:center;background:#f0f4fc;color:#6a83b4;border:1px dashed #bac9e5;width:48px;height:48px;border-radius:15px;font-size:25px;margin-bottom:16px}.empty-state h3{font-weight:600;letter-spacing:-.3px}.empty-state p{color:var(--muted);font-size:14px;margin:9px auto 20px;max-width:300px}.secondary{background:#edf2ff;color:var(--blue);padding:10px 18px}.secondary:hover{background:#e0e8ff}.entry-list{list-style:none;padding:10px 0 0;margin:0}.entry-list li{display:flex;align-items:center;gap:18px;padding:22px 0;border-bottom:1px solid #eaf0f8}.entry-list li:last-child{border-bottom:0}.entry-time{display:flex;align-items:center;gap:18px;flex-shrink:0;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}.entry-time time{min-width:70px}.timeline-dot{width:8px;height:8px;border-radius:50%;background:#a4b6e4}.entry-details{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;overflow-wrap:anywhere}.entry-details strong{font-weight:650;font-size:17px}.entry-details span{font-size:14px;color:var(--muted)}.edit-button{font-size:14px;color:var(--blue);padding:6px 10px;flex-shrink:0}.edit-button:hover{background:#edf2ff}footer{display:flex;align-items:flex-start;justify-content:center;gap:9px;color:var(--muted);margin:25px 0 0}footer p{margin:0;font-size:12px;line-height:1.6}footer p span{color:#7b879e}.privacy-mark{font-size:21px;line-height:1.1}dialog{background:white;color:#152243;border:1px solid var(--line);padding:28px;border-radius:22px;width:calc(100% - 32px);max-width:520px;max-height:90dvh;overflow:auto;box-shadow:0 20px 100px #12244433}dialog::backdrop{background:#182b4d66;backdrop-filter:blur(3px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.dialog-header h2{font-size:28px;letter-spacing:-.8px}.eyebrow{color:var(--muted);font-size:11px;letter-spacing:1.8px;margin:0 0 4px;font-weight:650}.close-button{background:#f2f5fb;width:42px;min-height:42px;border-radius:50%;font-size:24px;font-weight:400;flex-shrink:0}.field,legend{font-size:14px;font-weight:650}.field{display:block;margin:23px 0}.optional{font-weight:400;color:var(--muted);margin-left:5px}.field>input{margin-top:9px}input:not([type=radio]){display:block;width:100%;min-width:0;border:1px solid #cdd7e8;border-radius:10px;background:#fff;color:#152243;padding:12px;font-size:16px;min-height:48px}input::placeholder{color:#8995a9;font-size:15px}input:focus{border-color:var(--blue)}fieldset{margin:0;padding:0;border:0;min-width:0}legend{margin:0 0 12px;padding:0}.medicine-options{display:flex;flex-wrap:wrap;gap:9px;max-height:190px;overflow:auto;padding:3px}.medicine-choice{cursor:pointer;position:relative}.medicine-choice input{position:absolute;opacity:0;width:1px;height:1px}.medicine-choice span{display:block;padding:10px 14px;border:1px solid var(--line);border-radius:10px;min-height:44px;font-size:15px;overflow-wrap:anywhere}.medicine-choice input:checked+span{color:var(--blue);border-color:var(--blue);background:#edf2ff}.medicine-choice input:focus-visible+span{outline:3px solid #8da6ff;outline-offset:2px}.new-choice span{border-style:dashed;color:var(--muted)}.previous-entry{font-size:13px;padding:11px 12px;border-radius:9px;color:#3d567f;background:#f2f5fb;margin:18px 0 0}.time-field{margin-top:25px}.time-options{display:flex;gap:22px;flex-wrap:wrap}.time-options label{display:flex;align-items:center;gap:7px;font-size:14px;min-height:36px}.time-options input{width:18px;height:18px;accent-color:var(--blue);margin:0}.specific-time{display:block;margin-top:13px}input[type=datetime-local]{max-width:100%}.field-hint{display:block;color:var(--muted);font-size:12px;margin-top:8px}.dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:28px}.submit-entry{flex:1;display:flex;align-items:center;justify-content:center;gap:10px}.submit-entry span{font-size:19px;opacity:.7}.delete-entry{font-size:14px;font-weight:500;color:#a92c40;padding:7px}.form-footnote{font-size:12px;text-align:center;color:var(--muted);margin:13px 0 0}.form-error,.storage-error{color:#9b223b;background:#fff0f2;border:1px solid #f1ccd4;border-radius:10px;padding:12px;font-size:14px}.help-dialog p{color:var(--muted);font-size:15px;line-height:1.6}.help-dialog strong{color:#152243}.help-dialog .primary{width:100%;margin-top:8px}.offline-status{color:var(--blue)!important}#toast{position:fixed;z-index:100;bottom:calc(25px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:90vw;white-space:nowrap;background:#152243;color:white;padding:12px 20px;border-radius:12px;font-size:14px;box-shadow:0 5px 20px #15224322;display:none}#toast.visible{display:block}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:600px){.topbar{padding:20px}.brand-sub{display:none}main{padding:27px 18px 36px}.page-title{flex-direction:column;align-items:stretch;gap:22px;margin-bottom:29px}h1{font-size:29px;letter-spacing:-1px}.add-main{justify-content:center;font-size:17px;min-height:54px}.recent-card{padding:17px;min-height:164px}.recent-grid{gap:11px}.medicine-name{gap:7px}.medicine-name h3{font-size:16px}.last-time{font-size:27px;margin-top:16px}.last-time>span{display:block;margin:5px 0 0;font-size:12px}.last-amount{font-size:12px}.no-record{font-size:23px}.section-heading{gap:8px}.section-heading>span{font-size:12px}.history-section{padding:19px 14px}.history-section>.section-heading{padding:0 4px}.day-picker{gap:3px;padding-bottom:15px}.day-button{padding:8px 2px}.day-button span{font-size:11px}.day-button strong{font-size:17px}.entry-list li{gap:10px;padding:20px 2px}.entry-time{gap:8px;font-size:12px}.entry-time time{min-width:59px}.entry-details strong{font-size:16px}.entry-details span{font-size:13px}.edit-button{padding:6px}.empty-state{padding:30px 5px 23px}.recent-section{margin-bottom:28px}dialog.entry-dialog{margin:auto 0 0;max-width:none;width:100%;max-height:94dvh;border-radius:24px 24px 0 0;padding:24px 22px calc(24px + env(safe-area-inset-bottom))}.dialog-header{margin-bottom:24px}.time-options{gap:17px}}@media(max-width:350px){.recent-grid{grid-template-columns:1fr}.last-time>span{display:inline-block;margin-left:8px}.recent-card{min-height:0}.time-options{gap:8px}.medicine-choice span{padding:9px 11px}.entry-time .timeline-dot{display:none}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.delete-confirm{margin-top:18px;padding:14px;border:1px solid #f1ccd4;border-radius:12px;background:#fff5f6}.delete-confirm p{margin:0 0 8px;font-size:14px}.delete-confirm>div{display:flex;justify-content:space-between;gap:12px}.delete-confirm button{padding:8px 12px}
