* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #3d3630;
  --ink-soft: #8a7f73;
  --accent: #e07a5f;
  --accent-soft: #fdf0ec;
  --green: #6a994e;
  --green-soft: #eef5e9;
  --line: #eee5d8;
  --radius: 14px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
header h1 { font-size: 24px; font-weight: 500; }
header h1 .paw { margin-right: 8px; }
header .ver { font-size: 11px; color: var(--ink-soft); margin-left: 4px; }

nav { display: flex; gap: 4px; margin-left: auto; }
nav button {
  border: none; background: none; font: inherit; font-size: 15px;
  padding: 8px 14px; border-radius: 10px; cursor: pointer; color: var(--ink-soft);
}
nav button.on { background: var(--accent-soft); color: var(--accent); }

.whoami { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.whoami .name { color: var(--accent); font-size: 16px; }

main { max-width: 980px; margin: 0 auto; padding: 22px; }

.pin-box { display: flex; gap: 8px; align-items: center; }
.pin-box input {
  width: 92px; padding: 8px 10px; font-size: 16px; letter-spacing: 4px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
button.btn {
  font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.btn.quiet { border: none; background: none; color: var(--ink-soft); }
button.btn:disabled { opacity: .5; cursor: default; }

.day { margin-bottom: 26px; }
.day h2 { font-size: 18px; font-weight: 500; color: var(--ink-soft); margin-bottom: 10px; }
.day h2.today { color: var(--accent); }

.shift {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; cursor: pointer;
}
.shift:hover { border-color: var(--accent); }
.shift .time { font-size: 17px; min-width: 130px; }
.shift .label { font-size: 15px; color: var(--ink-soft); min-width: 110px; }
.shift .people { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
}
.tag.open { background: var(--accent-soft); color: var(--accent); }
.tag.me { outline: 1.5px solid var(--green); }
.shift .act button { min-width: 76px; }

.empty { color: var(--ink-soft); font-size: 15px; padding: 8px 2px; }

.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cat-card .ph {
  height: 150px; background: var(--accent-soft); display: flex; align-items: center;
  justify-content: center; font-size: 48px;
}
.cat-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .body { padding: 12px 14px; }
.cat-card .name { font-size: 18px; }
.cat-card .meta { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.status-pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.status-pill.medical, .status-pill.hold { background: #fdeaea; color: #b45050; }
.status-pill.adopted { background: #eee; color: #888; }
.status-pill.foster { background: #eaf0fd; color: #5069b4; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(60, 50, 40, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10;
}
.modal {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.modal .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }
.modal .section-title { font-size: 15px; color: var(--ink-soft); margin: 16px 0 8px; }

.task { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.task input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.task.done span.desc { color: var(--ink-soft); text-decoration: line-through; }
.task .by { font-size: 12px; color: var(--ink-soft); margin-left: auto; }

.modal .foot { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 14px; padding: 10px 20px;
  border-radius: 999px; z-index: 20; opacity: 0; transition: opacity .25s;
  pointer-events: none; max-width: 90vw;
}
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  .shift .time { min-width: 100%; }
  header h1 { font-size: 20px; }
}
