:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --white: #fff;
  --ink: #222d26;
  --green: #31594a;
  --pine: #20392f;
  --sage: #e8ebe2;
  --line: #d4ded5;
  --muted: #516359;
  --red: #85322d;
  font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.25rem, 9vw, 3.65rem); font-weight: 720; letter-spacing: -.07em; line-height: 1.01; }
h2 { font-size: 1.5rem; letter-spacing: -.035em; line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.3; }
a { color: var(--green); overflow-wrap: anywhere; }
button, input { font: inherit; }
button, a, input { outline-offset: 4px; }
button, .quick-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .58rem .92rem;
  background: var(--white);
  color: var(--pine);
  font-weight: 650;
  text-decoration: none;
}
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:hover, .quick-nav a:hover { background: var(--sage); }
button.primary, button[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.shell { width: min(100%, 880px); margin-inline: auto; padding: 1.2rem clamp(1rem, 5vw, 3rem) 3rem; }
.access {
  width: min(100%, 27rem);
  margin: clamp(2rem, 12vh, 8rem) auto 0;
  padding: clamp(1.3rem, 6vw, 2.4rem);
  border: 1px solid var(--line);
  border-top: .36rem solid var(--green);
  border-radius: 18px;
  background: var(--white);
}
.access h1 { font-size: clamp(1.75rem, 7vw, 2.75rem); margin-bottom: .65rem; }
.access form, .access form ~ button, .access > button { margin-top: 1rem; }
.access form { display: grid; gap: .55rem; }
.access form label { font-weight: 650; }
.access input {
  width: 100%;
  min-height: 48px;
  padding: .4rem .7rem;
  border: 1px solid #789187;
  border-radius: 8px;
  font-size: 1.16rem;
  letter-spacing: .16em;
}
.feedback { margin-top: 1rem; color: var(--pine); }
.guide-heading {
  display: grid;
  gap: .45rem;
  border-bottom: 1px solid var(--line);
  padding: clamp(1.45rem, 6vw, 3.65rem) .15rem 1.2rem;
}
.stay-label, .sheet-label { color: var(--muted); font-weight: 640; }
.quick-nav, .sheet-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin: .95rem 0 1.1rem; }
.quick-nav a:hover { text-decoration: underline; text-underline-offset: .15rem; }
.panel {
  scroll-margin-top: 1rem;
  min-width: 0;
  margin: 1rem 0;
  padding: clamp(1.05rem, 4vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.stay-note { background: var(--sage); border-left: .3rem solid var(--green); }
.stay-note .details { margin-top: .5rem; }
.views { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 1.15rem; }
.routines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .85rem; margin-top: .8rem; }
.time-slot, .pet-card { min-width: 0; padding: .95rem; background: #f5f7f1; border: 1px solid var(--line); border-radius: 10px; }
.time-slot > h3, .pet-card > h3 { color: var(--pine); font-size: 1.12rem; }
.instructions, .attachments { list-style: none; padding: 0; margin: .6rem 0 0; }
.instruction + .instruction { border-top: 1px solid var(--line); }
.instruction { padding: .62rem 0; }
.instruction:last-child { padding-bottom: 0; }
.details { white-space: pre-wrap; margin-top: .2rem; }
.pet-label, .muted { color: var(--muted); font-size: .875rem; }
.pet-label { font-weight: 650; }
.muted { margin-top: .4rem; }
.emergency { border-top: .3rem solid var(--red); }
address { font-style: normal; font-weight: 650; margin-top: .45rem; overflow-wrap: anywhere; }
.call, .attachments a { display: inline-flex; align-items: center; min-height: 44px; gap: .36rem; text-underline-offset: .15rem; }
.call span { font-weight: 700; }
.compact h4 { font-size: 1.05rem; }
.sheet-controls { justify-content: space-between; }
.fridge-sheet { margin: 0 auto; padding: 1rem; background: #fff; border: 1px solid var(--line); }
.fridge-sheet .guide-heading { padding: .6rem 0 1rem; }
.fridge-sheet .panel { padding: .8rem; }
.fridge-sheet .routines { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
@media (max-width: 360px) {
  .quick-nav { gap: .35rem; }
  .quick-nav a, .quick-nav button { padding-inline: .65rem; }
}
@media print {
  @page { size: auto; margin: 13mm; }
  :root { font-size: 10pt; background: white; color: black; }
  body, .shell, .fridge-sheet { width: auto; max-width: none; margin: 0; border: 0; padding: 0; background: white; color: black; }
  .quick-nav, .views, .sheet-controls, .attachments, button, .access { display: none !important; }
  .guide-heading, .fridge-sheet .guide-heading { padding: 0 0 .55rem; }
  h1 { font-size: 25pt; }
  h2 { font-size: 14pt; }
  h3, h4 { font-size: 10pt; }
  h1, h2, h3, h4 { break-after: avoid; }
  .panel, .fridge-sheet .panel { margin: .55rem 0; border: 0; border-top: 1px solid #555; border-radius: 0; padding: .4rem 0; background: white; }
  .emergency { break-inside: avoid; }
  .emergency .instructions { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .emergency .instruction { border-top: 0; }
  .routines, .fridge-sheet .routines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .time-slot, .pet-card { padding: .35rem; border: 1px solid #aaa; border-radius: 0; background: white; break-inside: avoid; }
  .instruction { padding: .28rem 0; break-inside: avoid; }
  .call { min-height: 0; color: black; text-decoration: none; }
  a { color: black; }
}
