:root{--bg: #f5f3ee;--surface: #ece7dd;--card: #fffdf9;--ink: #16352b;--muted: #67736b;--accent: #f2c531;--accent-strong: #dfae16;--accent-ink: #16352b;--ok: #1e6b4c;--ok-soft: #e1efe7;--warn: #94640f;--warn-soft: #f7eed2;--danger: #bf3a2c;--danger-soft: #fbe8e3;--grid: #e5dfd1;--field: #f1ede4;--radius: 18px;--radius-s: 12px;--font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;--ease-out: cubic-bezier(.22, 1, .36, 1);--t-press: .14s;--t-hover: .18s;--t-ui: .24s}[hidden]{display:none!important}*{box-sizing:border-box}html,body{max-width:100%}html{-webkit-text-size-adjust:100%}body{margin:0;font-family:var(--font);background:var(--bg);color:var(--ink);line-height:1.55;font-size:16px}::selection{background:var(--accent);color:var(--accent-ink)}#app{max-width:760px;margin:0 auto;padding:20px 20px 56px}#app>*{min-width:0}h1,h2,h3{line-height:1.25;color:var(--ink)}button{font-family:inherit;color:inherit}button:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-s)}.ic{width:18px;height:18px;display:inline-block;vertical-align:-.22em;flex-shrink:0}.page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:4px 0}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{width:40px;height:40px;border-radius:14px;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center}.brand-mark .ic{width:24px;height:24px}.brand-name{font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--ink);white-space:nowrap}.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.back-btn{background:none;border:none;color:var(--ink);font-size:14px;font-weight:600;padding:8px 14px 8px 10px;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background-color var(--t-hover) ease,transform var(--t-press) var(--ease-out)}.back-btn .ic{width:16px;height:16px}.back-btn:hover{background:var(--surface)}.back-btn:active{transform:scale(.96)}.hero{padding:18px 2px 6px;margin-bottom:22px}.page-title{font-size:clamp(1.65rem,1.35rem + 1.2vw,2.1rem);font-weight:700;letter-spacing:-.02em;line-height:1.12;margin:0}.page-sub{font-size:14px;color:var(--muted);margin:8px 0 0;max-width:52ch}.card{background:var(--card);border-radius:var(--radius);padding:20px;margin-bottom:14px}.card-title{font-size:18px;font-weight:700;letter-spacing:-.01em;margin:0 0 14px}.button-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}button.primary,button.danger,button.ghost{border:none;border-radius:999px;padding:9px 18px;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:background-color var(--t-hover) ease,transform var(--t-press) var(--ease-out)}button.primary:active,button.danger:active,button.ghost:active{transform:scale(.97)}button.primary{background:var(--accent);color:var(--accent-ink)}button.primary:hover{background:var(--accent-strong)}button.danger{background:var(--danger-soft);color:var(--danger)}button.danger:hover{background:#f6d5cd}button.ghost{background:var(--surface);color:var(--ink)}button.ghost:hover{background:#e2dccf}button.link-btn{background:none;border:none;color:var(--muted);font-size:13px;font-weight:500;padding:5px 10px;border-radius:999px;cursor:pointer;transition:background-color var(--t-hover) ease,color var(--t-hover) ease}button.link-btn:hover{background:var(--surface);color:var(--ink)}button.link-btn.del{color:var(--danger)}button.link-btn.del:hover{background:var(--danger-soft);color:var(--danger)}button:disabled{opacity:.5;cursor:not-allowed}button.icon-btn{padding:8px 14px}button.icon-btn .ic{width:16px;height:16px}.pet-list-host{display:flex;flex-direction:column;gap:12px;margin-bottom:4px}.pet-card{display:flex;align-items:center;gap:14px;cursor:pointer;background:var(--card);border-radius:var(--radius);padding:18px;transition:transform var(--t-hover) var(--ease-out),box-shadow var(--t-hover) ease,background-color var(--t-hover) ease}.pet-card:hover{transform:translateY(-2px);background:#f6f1e6}.pet-card:active{transform:translateY(0)}.avatar{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.avatar .ic{width:27px;height:27px}.pet-main{flex:1;min-width:0}.pet-name{font-size:17px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pet-sub{font-size:13px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pet-alert{font-size:12px;color:var(--warn);font-weight:600;margin-top:5px;display:inline-flex;align-items:center;gap:6px}.pet-alert:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}.pet-right{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex-shrink:0}.pet-weight{font-size:15px;font-weight:700;color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums}.spark-wrap{line-height:0}.sparkline{opacity:.9}.add-pet-btn{width:100%;padding:13px;font-size:15px;margin-top:6px}.overview-card{padding:22px 20px 18px}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.stat{text-align:left;padding:2px 4px}.stat-value{font-size:28px;font-weight:700;letter-spacing:-.02em;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.1}.stat-label{font-size:12px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:2px solid var(--surface)}.overview-note{font-size:12px;color:var(--muted);margin-left:auto}.badge{display:inline-block;font-size:12px;font-weight:600;border-radius:999px;padding:3px 10px;white-space:nowrap}.badge-ok{background:var(--ok-soft);color:var(--ok)}.badge-soon{background:var(--warn-soft);color:var(--warn)}.badge-overdue{background:var(--danger-soft);color:var(--danger)}.reminder-card{padding:8px 20px}.reminder-list{list-style:none;padding:0;margin:0}.reminder-row{display:flex;align-items:center;gap:12px;padding:12px 6px;cursor:pointer;border-radius:14px;transition:background-color var(--t-hover) ease}.reminder-row:hover{background:var(--bg)}.reminder-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.reminder-avatar .ic{width:21px;height:21px}.reminder-main{display:flex;flex-direction:column;flex:1;min-width:0}.reminder-title{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reminder-meta{font-size:12px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reminder-days{font-size:13px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.list-controls{display:flex;gap:10px;margin-bottom:14px}.list-controls .search-input{flex:1;min-width:0}.list-controls select{flex-shrink:0;max-width:40%;width:auto}.filter-bar{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}.chip{background:var(--card);border:none;border-radius:999px;padding:6px 14px;font-size:13px;font-weight:500;cursor:pointer;color:var(--muted);transition:background-color var(--t-hover) ease,color var(--t-hover) ease}.chip:hover{background:var(--surface);color:var(--ink)}.chip-active{background:var(--accent);color:var(--accent-ink);font-weight:600}.chip-active:hover{background:var(--accent-strong);color:var(--accent-ink)}.form-row{margin-bottom:14px}.form-row label{display:block;font-size:13px;font-weight:600;color:var(--ink);margin-bottom:6px}.form-row input,.form-row select,.form-row textarea{width:100%;max-width:100%;padding:10px 12px;border:1px solid transparent;border-radius:var(--radius-s);font-size:14px;font-family:inherit;background:var(--field);color:var(--ink);transition:background-color var(--t-hover) ease,border-color var(--t-hover) ease}.form-row input:hover,.form-row select:hover,.form-row textarea:hover{background:#ebe6da}.form-row input:focus,.form-row select:focus,.form-row textarea:focus{outline:2px solid var(--accent);outline-offset:1px;background:var(--card)}.form-row textarea{resize:vertical;min-height:64px}.field-hint{font-size:12px;color:var(--muted);margin-top:5px}.form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:4px}.form-actions .danger{margin-right:auto}.error{color:var(--danger);font-size:13px;margin-bottom:10px;white-space:pre-wrap;background:var(--danger-soft);border-radius:var(--radius-s);padding:10px 12px;line-height:1.5}.error-title{color:var(--danger);margin:0 0 6px;font-size:17px}.detail-head{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}.detail-head .avatar{width:60px;height:60px}.detail-head .avatar .ic{width:32px;height:32px}.detail-info{flex:1;min-width:0}.detail-info .pet-name{font-size:21px}.meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;margin-top:10px}.meta-item{display:flex;gap:8px;font-size:13px;min-width:0}.meta-label{color:var(--muted);flex-shrink:0}.meta-value{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.notes{margin-top:12px;font-size:14px;background:var(--surface);border-radius:var(--radius-s);padding:12px 14px;white-space:pre-wrap;word-break:break-word}.detail-actions{width:100%;text-align:right}.section-title{font-size:15px;font-weight:700;margin:26px 0 10px;display:flex;align-items:center;gap:8px;letter-spacing:.01em}.section-title:before{content:"";width:8px;height:8px;border-radius:3px;background:var(--accent);flex-shrink:0}.record-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.record-form .form-row{margin-bottom:0;flex:1;min-width:150px}.record-form>button{margin-bottom:2px}.record-form .error.full{width:100%}.record-list{list-style:none;padding:4px 20px;margin:14px 0 0;background:var(--card);border-radius:var(--radius)}.record-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 2px;font-size:14px;min-width:0}.record-list .date{color:var(--muted);flex-shrink:0;font-variant-numeric:tabular-nums}.row-actions{display:flex;align-items:center;gap:2px;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.weight-stats{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.6}svg+.weight-stats{margin-top:10px}.weight-chart{display:block;width:100%;height:auto}.weight-chart line{stroke:var(--grid)}.weight-chart text{fill:var(--muted);font-family:var(--font)}.weight-chart polyline{stroke:var(--ok)}.weight-chart circle{fill:var(--accent);stroke:var(--card);stroke-width:1.5}.health-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.health-title{font-weight:600;word-break:break-word}.health-meta{color:var(--muted);font-size:13px}.log-info{display:flex;align-items:baseline;gap:8px;min-width:0;flex:1}.log-info .date{flex-shrink:0}.chip-static{flex-shrink:0;font-size:12px;font-weight:500;background:var(--surface);border-radius:999px;padding:3px 10px;color:var(--ink)}.log-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--ink)}.empty-state{text-align:center;padding:34px 16px;display:flex;flex-direction:column;align-items:center;gap:6px}.empty-icon{width:60px;height:60px;border-radius:50%;background:var(--surface);color:var(--muted);display:flex;align-items:center;justify-content:center;margin-bottom:8px}.empty-icon .ic{width:30px;height:30px}.empty-title{font-size:16px;color:var(--ink);font-weight:700}.empty-desc{font-size:13px;color:var(--muted);max-width:40ch;line-height:1.6;margin:0}.empty-state .primary{margin-top:12px}.hint{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.6}.footer{margin-top:30px;text-align:center;font-size:12px;color:var(--muted);display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.footer-note{color:var(--muted)}.danger-zone{background:#fbf1ee}.danger-zone .card-title{color:var(--danger)}.toast-host{position:fixed;top:14px;left:50%;transform:translate(-50%);z-index:1200;display:flex;flex-direction:column;gap:8px;align-items:center;width:min(92vw,420px);pointer-events:none}.toast{pointer-events:auto;width:100%;background:var(--ink);color:#f7f5ef;border-radius:14px;padding:11px 16px;font-size:14px;box-shadow:0 12px 32px #141e1938;cursor:pointer;animation:toast-in .22s var(--ease-out);word-break:break-word}.toast-success{background:var(--ok)}.toast-error{background:var(--danger)}.toast-out{opacity:0;transform:translateY(-6px);transition:opacity .22s ease,transform .22s ease;pointer-events:none}@keyframes toast-in{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.modal-overlay{position:fixed;inset:0;background:#16231e80;display:flex;align-items:center;justify-content:center;padding:16px;z-index:1000;animation:overlay-in .2s ease}.modal{background:var(--card);border-radius:var(--radius);width:100%;max-width:460px;max-height:88vh;display:flex;flex-direction:column;box-shadow:0 20px 60px #141e1947;animation:modal-in .26s var(--ease-out)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 20px 6px}.modal-title{font-size:17px;font-weight:700;margin:0}.modal-close{background:none;border:none;font-size:15px;color:var(--muted);cursor:pointer;padding:6px 8px;border-radius:999px;transition:background-color var(--t-hover) ease,color var(--t-hover) ease}.modal-close:hover{background:var(--surface);color:var(--ink)}.modal-body{padding:4px 20px;overflow-y:auto}.dialog-text{margin:0 0 6px;font-size:14px;line-height:1.7;word-break:break-word}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px 20px;flex-wrap:wrap}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}@keyframes modal-in{0%{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:no-preference){.page-header,.hero,.card,.pet-list-host .pet-card{animation:rise-in .5s var(--ease-out) both}.pet-list-host .pet-card:nth-child(2){animation-delay:50ms}.pet-list-host .pet-card:nth-child(3){animation-delay:.1s}.pet-list-host .pet-card:nth-child(4){animation-delay:.15s}.pet-list-host .pet-card:nth-child(n+5){animation-delay:.2s}.record-list li{animation:rise-in .4s var(--ease-out) both}.record-list li:nth-child(2){animation-delay:40ms}.record-list li:nth-child(3){animation-delay:80ms}.record-list li:nth-child(n+4){animation-delay:.12s}.weight-chart polyline,.sparkline polyline{stroke-dasharray:1000;stroke-dashoffset:1000;animation:draw-line 1.1s var(--ease-out) forwards}.empty-state{animation:rise-in .45s var(--ease-out) both}}@keyframes rise-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes draw-line{to{stroke-dashoffset:0}}@media(max-width:560px){#app{padding:14px 14px 40px}.page-header{margin-bottom:8px}.brand-mark{width:36px;height:36px}.hero{padding:12px 2px 4px;margin-bottom:16px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 8px}.meta-grid{grid-template-columns:minmax(0,1fr)}.record-form{flex-direction:column;align-items:stretch}.record-form .form-row{min-width:0}.record-form>button{width:100%;margin-top:4px}.record-list li{flex-direction:column;align-items:flex-start;gap:8px}.row-actions{width:100%;justify-content:flex-start}.log-text{white-space:normal;word-break:break-word}.reminder-row{flex-wrap:wrap}.reminder-days{margin-left:50px}.overview-note{margin-left:0;width:100%}.list-controls{flex-direction:column}.list-controls select{max-width:none;width:100%}.detail-head{flex-direction:column}.detail-actions{text-align:left}.modal{max-height:92vh}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-delay:0ms!important;transition-duration:.01ms!important}}
