/* Day view, emergency card, sheet and photo thumbnails (day view builder). Uses tokens from base.css. */
.dayhead h1 { margin-top: 14px; }
.row .d { margin-bottom: 8px; }
.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); margin-left: auto;
}
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn:hover { border-color: var(--line-strong); color: var(--ink); }

/* quick taps */
.taps { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 8px; }
.tapcap { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.taprow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.taplab { font-size: 14px; font-weight: 700; min-width: 76px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button {
  min-height: 44px; padding: 8px 12px; border: 0; background: transparent; font-size: 14px; font-weight: 500;
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--teal-wash); color: var(--teal-text); font-weight: 700; box-shadow: inset 0 0 0 2px var(--teal); }

/* thumbnails */
.thumbs, .pstrip { display: flex; gap: 6px; margin-top: 10px; }
.thumbs { flex-wrap: wrap; }
.pstrip { overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); position: relative; }
.pstrip .thumb { width: 96px; height: 96px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.broken::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font: 600 14px var(--mono); }

/* pending sync, subtle */
.row.pend h3::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--amber); vertical-align: middle; }

/* supplies */
.supnotice {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--amber); background: var(--amber-wash); color: var(--amber-text);
}
.supnotice p { margin: 2px 0 0; font-size: 14px; }
.supnotice .btn.ghost { color: var(--ink); background: var(--surface); }
.lowrow { margin-top: 28px; }
.lowbtn { width: 100%; }
.dayhead + .days { margin-top: 18px; }

dialog.sheet {
  border: 0; padding: 0; background: var(--paper); color: var(--ink); width: min(560px, 100vw);
  max-width: 100vw; margin: auto auto 0; border-radius: 18px 18px 0 0; max-height: 92dvh;
}
dialog.sheet::backdrop { background: rgba(10, 10, 9, .55); }
.sheet-in { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-in h2 { margin: 0 0 6px; }
.supgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.supbtn { min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 15px; }
.supbtn[aria-pressed="true"] { background: var(--amber-wash); border-color: var(--amber); color: var(--amber-text); box-shadow: inset 0 0 0 1px var(--amber); }
.pushbox p { margin: 0 0 8px; }

/* emergency */
.ec-offline { padding: 10px 12px; border-radius: 10px; background: var(--amber-wash); border: 1px solid var(--amber); color: var(--amber-text); font-size: 14px; }
.ec-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ec-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.ec-call {
  display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 72px; text-decoration: none; color: inherit;
}
a.ec-call:active { background: var(--teal-wash); }
.ec-call svg { width: 30px; height: 30px; flex: none; color: var(--scarlet); }
.ec-text { display: grid; gap: 1px; min-width: 0; }
.ec-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; }
.ec-name { font-size: 19px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.ec-phone { font-size: 17px; color: var(--teal-text); }
.ec-addr { display: block; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; min-height: 44px; }
.ec-notes { margin: 0; padding: 0 16px 12px; font-size: 14px; }
.ec-pet { margin-top: 18px; }
.ec-pethead { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ec-pethead h3 { margin: 0; font-size: 22px; font-weight: 800; }
.ec-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.ec-fact { overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 380px) { .facts li { grid-template-columns: 88px 1fr; } }
.btn svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.addbtn { display: inline-flex; align-items: center; gap: 6px; }
.addbtn svg { margin: 0; }
