:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #25231f;
  background: #f8f6f1;
  font-synthesis: none;
  --ink: #25231f;
  --muted: #6c665e;
  --surface: #fffdfa;
  --line: #e7e0d5;
  --accent: #d4f688;
  --green: #293818;
  --lavender: #eee5f7;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(29px, 6vw, 42px); font-weight: 780; letter-spacing: -.045em; }
h2 { font-size: 17px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; min-height: 44px; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #65509a; outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.icon { display: inline-grid; place-items: center; flex-shrink: 0; }
.icon svg { display: block; width: 21px; height: 21px; }
.icon:has(ellipse) svg { fill: currentColor; stroke: none; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { display: flex; align-items: center; gap: 10px; width: min(100% - 32px, 760px); margin: auto; min-height: 65px; }
.brand { display: grid; place-items: center; width: 44px; border-radius: 15px; border: 0; background: var(--accent); }
.brand-title { font-weight: 750; letter-spacing: -.015em; }
.header-actions { display: flex; gap: 3px; margin-left: auto; }
.icon-button { display: grid; place-items: center; width: 44px; border: 0; border-radius: 14px; background: transparent; }
.icon-button:hover, .back:hover { background: #efeae0; }
.shell { width: min(100% - 32px, 690px); margin: auto; padding: 28px 0 max(36px, env(safe-area-inset-bottom)); }
.dog-home { display: grid; gap: 16px; }
.home-title { display: grid; gap: 5px; padding: 5px 0 1px; }
.day-label, .muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score { min-width: 0; display: grid; gap: 5px; padding: 14px 17px; border-radius: 18px; background: #efeadf; }
.score:nth-child(2) { background: var(--lavender); }
.score span { color: #4e493e; font-size: 13px; font-weight: 650; }
.score strong { font-size: 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quick-panel { display: grid; gap: 3px; border: 1px solid #dce8c6; border-radius: 22px; padding: 9px; background: #edf2e4; }
.quick-button { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; border: 1px solid #c1d9a1; border-radius: 15px; background: var(--accent); color: var(--green); min-height: 73px; font-size: 24px; font-weight: 800; }
.quick-button:hover, .primary:hover { background: #c6ec73; }
.quick-button .icon svg { width: 25px; height: 25px; }
.quick-caption { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 8px; min-height: 42px; color: #4d5b3c; font-size: 13px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0 5px; font-weight: 700; text-decoration: underline; }
.text-button .icon svg { width: 15px; height: 15px; }
.rows { display: grid; gap: 8px; }
.row { width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; min-height: 58px; padding: 8px 12px; }
.row:hover { border-color: #b8ad9b; }
.row-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #f0ebdf; color: #514737; }
.row .row-icon svg { width: 18px; height: 18px; }
.row-label { display: grid; gap: 3px; flex: 1; font-weight: 650; }
.row-label small { font-weight: 450; color: var(--muted); font-size: 12px; }
.row > .icon { color: var(--muted); }
.row > .icon svg { width: 16px; height: 16px; }
.section-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.section-title h1 { flex: 1; }
.back { display: inline-flex; gap: 2px; align-items: center; border: 0; background: transparent; border-radius: 11px; color: var(--muted); font-size: 14px; padding: 0 7px 0 2px; }
.back svg { width: 16px; height: 16px; }
.panel, .login-card { border: 1px solid var(--line); border-radius: 21px; padding: 18px; background: var(--surface); }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(100%, 410px); padding: clamp(20px, 7vw, 36px); }
.login-card .form-stack { margin-top: 25px; }
.login-mark { display: grid; place-items: center; width: 57px; height: 57px; margin-bottom: 14px; border-radius: 18px; background: var(--accent); }
.login-mark svg { width: 31px; height: 31px; }
.form-stack { display: grid; gap: 16px; }
.form-stack label, .field-label { display: block; font-weight: 650; font-size: 14px; }
.form-stack label small, .field-label small { color: var(--muted); font-weight: 450; }
input:not([type=file]), textarea, select { display: block; width: 100%; max-width: 100%; min-height: 45px; border: 1px solid #d9d0c3; border-radius: 10px; background: #fffefa; color: var(--ink); padding: 10px 11px; font-size: 16px; }
.form-stack label input:not([type=file]), .form-stack label textarea, .form-stack label select, .media-field { margin-top: 7px; }
textarea { resize: vertical; line-height: 1.5; }
.file-box { position: relative; display: flex !important; align-items: center; justify-content: center; gap: 7px; min-height: 53px; color: #514b41; border: 1px dashed #a59a8a; border-radius: 10px; cursor: pointer; text-align: center; padding: 5px 10px; }
.file-box:focus-within { outline: 3px solid #65509a; outline-offset: 2px; }
.file-input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.file-names { color: var(--muted); overflow-wrap: anywhere; font-size: 13px; margin-top: 7px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 6px; }
.form-error { color: #9d302d; background: #fff0ed; border-radius: 8px; padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; padding: 9px 17px; border: 1px solid #c3dba2; border-radius: 11px; background: var(--accent); color: var(--green); font-weight: 730; }
.secondary { border-color: #d9d0c3; background: var(--surface); color: var(--ink); }
.secondary:hover { background: #f4eee3; }
.danger { color: #9d302d; }
.wide { width: 100%; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
.quick-photo { width: min(100%, 380px); padding: 4px 8px 8px; gap: 8px; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 33px 16px; text-align: center; margin-top: 4px; }
.empty > .icon { border-radius: 15px; padding: 11px; background: var(--lavender); }
.loading { color: var(--muted); text-align: center; padding: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs { display: flex; flex: 1; border: 1px solid var(--line); padding: 3px; background: #efeae1; border-radius: 12px; white-space: nowrap; }
.tabs button { flex: 1; min-height: 44px; border: 0; background: transparent; border-radius: 8px; padding: 6px 9px; font-weight: 650; font-size: 13px; }
.tabs button[aria-pressed=true] { background: var(--surface); }
.filters select { width: auto; flex: 1; }
.entry-list { display: grid; gap: 10px; margin-bottom: 12px; }
.entry { min-width: 0; display: grid; gap: 12px; }
.entry-header { display: flex; align-items: flex-start; gap: 8px; }
.entry-title { flex: 1; min-width: 0; }
.entry-title time { font-size: 12px; color: var(--muted); }
.status { flex-shrink: 0; font-size: 12px; border-radius: 30px; padding: 4px 7px; background: #eee7da; }
.status.approved { background: #e7f1d8; }
.status.rejected { background: #f7e1dd; }
.entry-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 15px; }
.attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.attachments a, .attachments video { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 9px; background: #272727; }
.attachments img { width: 100%; height: 100%; object-fit: contain; }
.entry details, .feedback { border-top: 1px solid var(--line); padding-top: 8px; }
.entry summary { cursor: pointer; min-height: 44px; line-height: 44px; font-weight: 670; color: #475432; }
.review-form { gap: 8px; }
.review-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.feedback { display: grid; gap: 6px; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.violation { color: #9d302d; }
#notice { position: fixed; z-index: 2; bottom: max(15px, env(safe-area-inset-bottom)); left: 0; right: 0; display: grid; justify-content: center; pointer-events: none; padding: 0 15px; }
.toast { border-radius: 20px; background: #2c2b23; color: #fffefa; padding: 11px 16px; text-align: center; font-size: 14px; }
@media (min-width: 650px) {
  .shell { padding-top: 38px; }
  .dog-home { gap: 20px; }
  .score { padding: 17px 21px; }
  .quick-button { min-height: 94px; }
  .row { min-height: 62px; }
  .panel { padding: 21px; }
  .filters select { flex: 0 1 160px; }
}
