* { 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;
  /* "Needs people" is its own color, so a shelter's brand color never has to
     double as a warning. */
  --open: #e07a5f;
  --open-soft: #fdf0ec;
  --radius: 14px;
}

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

header {
  background: var(--card);
  border-top: 4px solid var(--accent);
  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 h1 .logo { height: 44px; width: auto; vertical-align: middle; margin-right: 10px; border-radius: 6px; }
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; flex-wrap: wrap; }
.pin-box input.who { width: 200px; letter-spacing: normal; text-align: left; }
.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(--open-soft); color: var(--open); }
.tag.me { outline: 1.5px solid var(--green); }
.tag.out { background: #f3efec; color: var(--ink-soft); text-decoration: line-through; }

.my-shifts {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: 15px;
}
.my-shifts .who-sub { display: block; margin-top: 3px; }
.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; }

/* --- "Who's this?" identification --------------------------------------- */
.section-head {
  font-size: 16px; font-weight: 500; color: var(--ink-soft);
  margin: 26px 0 12px; text-align: center;
}
.who-hero, .who-results, .who-detail {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-align: center; max-width: 560px; margin: 0 auto;
}
.who-art { font-size: 54px; line-height: 1; margin-bottom: 10px; }
.who-lead { font-size: 19px; margin-bottom: 8px; }
.who-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.who-btn { display: inline-block; margin: 18px 0 4px; font-size: 16px; padding: 12px 26px; }
.who-note { margin-top: 14px; color: #b45050; font-size: 14px; }
.who-warn {
  background: #fdf6e7; border-left: 3px solid #d9a441; text-align: left;
  padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px;
}
.who-shot {
  max-height: 190px; border-radius: 10px; margin-bottom: 14px; object-fit: cover;
}
.who-cards { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.who-card {
  display: grid; grid-template-columns: 46px 1fr auto; grid-template-rows: auto auto;
  gap: 2px 12px; align-items: center; text-align: left; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font: inherit; color: inherit;
}
.who-card.top { border-color: var(--accent); background: var(--accent-soft); }
.who-card:hover { border-color: var(--accent); }
.who-thumb {
  grid-row: span 2; width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.who-thumb img { width: 100%; height: 100%; object-fit: cover; }
.who-thumb.big { width: 74px; height: 74px; font-size: 38px; grid-row: auto; }
.who-name { font-size: 17px; }
.who-score { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.who-bar {
  grid-column: 2 / 4; display: block; height: 5px; border-radius: 3px;
  background: var(--line); overflow: hidden;
}
.who-bar span { display: block; height: 100%; background: var(--accent); }
.who-bar.wide { max-width: 320px; margin: 0 auto 8px; height: 7px; }
.who-progress { text-align: center; margin-top: 18px; }

/* Live scan */
.who-scan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; max-width: 560px; margin: 0 auto; text-align: center;
}
.who-stage { position: relative; border-radius: 12px; overflow: hidden; background: #1c1815; }
.who-stage video { width: 100%; max-height: 62vh; display: block; object-fit: cover; }
.who-reticle {
  position: absolute; inset: 0; margin: auto; width: min(62%, 62vh); aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, .85); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28); pointer-events: none;
}
.who-live {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff;
  display: flex; align-items: baseline; gap: 10px; justify-content: center;
}
.who-live-name { font-size: 26px; }
.who-live-name.dim { font-size: 17px; opacity: .8; }
.who-live-score { font-size: 15px; opacity: .85; }
.who-live.sure .who-live-name { color: #b9e6a4; }
.who-live.unsure .who-live-name { color: #ffd9a0; }
.who-runners { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; min-height: 24px; }
.who-scan-actions { display: flex; gap: 8px; justify-content: center; margin: 10px 0 6px; }

.who-detail { text-align: left; }
.who-detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.who-detail-head h2 { font-size: 26px; font-weight: 500; margin-bottom: 4px; }
.who-notes {
  background: var(--bg); border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 14px 16px; font-size: 16px; line-height: 1.55; margin-bottom: 18px;
  white-space: pre-wrap;
}

/* 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; }

/* --- Month view (read-only) --------------------------------------------- */
body.month-mode main { max-width: 1500px; }

.mbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mtitle { font-size: 22px; font-weight: 500; min-width: 210px; text-align: center; }

.mgrid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
  min-width: 900px; /* below this the cells stop being readable — scroll instead */
}
.mhead {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); text-align: center; padding-bottom: 2px;
}
.mday {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; min-height: 118px; display: flex; flex-direction: column; gap: 4px;
}
.mday.blank { background: none; border: none; }
.mday.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mday-num { font-size: 15px; color: var(--ink-soft); line-height: 1; margin-bottom: 2px; }
.mday.today .mday-num { color: var(--accent); }

.mshift {
  border-left: 3px solid var(--line); padding: 2px 0 2px 6px;
  font-size: 11.5px; line-height: 1.35;
}
.mshift.full { border-left-color: var(--green); }
.mshift.part { border-left-color: #d9a441; }
.mshift.empty { border-left-color: var(--open); }
.mshift.adopt { border-left-color: transparent; opacity: .6; font-style: italic; }
.mshift.off { border-left-color: #b45050; opacity: .55; }
.mcode {
  display: inline-block; min-width: 26px; font-size: 10px; letter-spacing: .05em;
  color: var(--ink-soft); text-transform: uppercase;
}
.mnames { color: var(--ink); }
.mopen { color: var(--open); margin-left: 4px; white-space: nowrap; }

/* Print: one landscape page, plain. A posted calendar wants names and nothing
   else — no colour coding, no pills, no rounded cards. Sizes are in points so
   the whole month fits the sheet rather than spilling onto a second page. */
/* Shown only on paper: the month and shelter name above the grid. */
.print-title { display: none; }

@media print {
  header, nav, .site-foot, .mbar, .no-print, .viz-tip, .toast, .my-shifts, .who-hero, .who-scan,
  .who-results, .who-detail, .section-head, .cats-grid { display: none !important; }

  body { background: #fff; color: #000; }
  main, body.month-mode main { max-width: none; padding: 0; margin: 0; }

  .print-title { display: block; text-align: center; font-size: 13pt; font-weight: 500; margin: 0 0 3mm; }

  .mgrid { min-width: 0; gap: 0; break-inside: avoid; }
  .mhead {
    font-size: 6.5pt; letter-spacing: .04em; color: #000;
    padding: 0 0 0.8mm; border-bottom: 0.6pt solid #000;
  }
  .mday {
    border: 0.4pt solid #b0b0b0; border-radius: 0; padding: 0.8mm 1mm;
    min-height: 0; break-inside: avoid; background: none; box-shadow: none;
  }
  .mday.blank { border-color: #e8e8e8; }
  .mday.today { border-color: #000; border-width: 1pt; box-shadow: none; }
  .mday-num { font-size: 7.5pt; color: #000; margin-bottom: 0.4mm; }

  .mshift {
    font-size: 6.2pt; line-height: 1.25; border-left: none;
    padding: 0 0 0.5mm; break-inside: avoid;
  }
  .mcode { min-width: 5.5mm; font-size: 5.2pt; color: #555; }
  .mnames { color: #000; }
  .mopen { color: #666; margin-left: 3pt; }
  .mshift.adopt { color: #777; }
  .mshift.off .mnames { color: #777; }

  /* Six-week months: smaller type so the sheet still holds the whole month. */
  .mgrid.rows-6 .mshift { font-size: 5.3pt; line-height: 1.15; padding-bottom: 0.3mm; }
  .mgrid.rows-6 .mday-num { font-size: 6.5pt; margin-bottom: 0.2mm; }

  @page { size: landscape; margin: 8mm; }
}

.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; }
}

/* The product's own mark sits quietly under each shelter's branding. The logo
   file has a white ground, so multiply lets the page color show through it. */
.site-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 36px; padding: 18px 16px 26px; font-size: 12px; color: var(--ink-soft);
}
.site-foot img { height: 34px; width: auto; mix-blend-mode: multiply; }
.site-foot .from { margin-left: 10px; }
.site-foot img.g1 { height: 30px; }

/* --- Roster details ------------------------------------------------------ */
.cat-filter { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cat-filter input, .cat-filter select {
  padding: 9px 12px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.cat-filter input { width: 220px; }
.cat-card .room { font-size: 15px; color: var(--accent); margin-top: 3px; }
.cat-card .meta.traits { font-style: italic; }
.cat-card .care {
  font-size: 13px; margin-top: 6px; padding: 6px 8px; background: var(--bg);
  border-left: 3px solid var(--accent); border-radius: 6px; white-space: pre-wrap;
}
.who-room { font-size: 22px; color: var(--accent); margin-bottom: 8px; }
.who-traits { font-size: 14px; color: var(--ink-soft); font-style: italic; margin-bottom: 12px; }

/* --- One animal, and reporting an issue ---------------------------------- */
.cat-card { cursor: pointer; }
.cat-card:hover { border-color: var(--accent); }
.cat-modal .cat-big { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.ci-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ci-item:last-child { border-bottom: none; }
.ci-text { font-size: 14px; margin-top: 4px; white-space: pre-wrap; }
.ci-form { display: flex; flex-direction: column; gap: 10px; }
.ci-form select, .ci-form textarea {
  font: inherit; font-size: 15px; padding: 9px 12px; width: 100%;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.ci-check { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* --- Signed out: the public page ----------------------------------------- */
.land { max-width: 920px; margin: 0 auto; }
.land-hero { text-align: center; padding: 14px 10px 26px; }
.land-logo { height: 160px; width: auto; margin-bottom: 8px; mix-blend-mode: multiply; }
.land-hero h2 { font-size: 30px; font-weight: 500; margin-bottom: 10px; }
.land-text { font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.land-hero .land-text { max-width: 640px; margin: 0 auto; color: var(--ink-soft); }
.land-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.land-side { display: flex; flex-direction: column; gap: 18px; }
.land-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.land-card h3 { font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.land-note { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.land-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.land-links a {
  font-size: 14px; padding: 9px 18px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink); background: var(--card);
}
.land-links a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pin-box.land-signin { flex-direction: column; align-items: stretch; }
.pin-box.land-signin input, .pin-box.land-signin input.who { width: 100%; text-align: left; }
@media (max-width: 760px) { .land-cols { grid-template-columns: 1fr; } }

/* --- Profile: a picture big enough to actually see the animal ------------- */
.modal.cat-modal { max-width: 720px; }
.cat-modal .cat-big {
  display: block; width: 100%; max-height: 62vh; object-fit: contain;
  background: var(--bg); border-radius: 10px; margin-bottom: 8px; cursor: zoom-in;
}
.cat-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.pin-box input::placeholder { letter-spacing: normal; }
