/* WalkBook / Kindred Creature Care. Always light: white pages, green buttons with white text.
   Pine and lake colors from Lakeville's trails. Bricolage Grotesque for headings, Atkinson Hyperlegible for reading. */
:root {
  --pine: #1f4d3a;
  --pine-2: #2a6650;
  --lake: #2d6e8e;
  --mist: #ffffff;
  --paper: #ffffff;
  --ink: #17241d;
  --muted: #4b5b52;
  --line: #dbe3da;
  --leaf: #e4efe6;
  --marigold: #e8a33d;
  --marigold-soft: #fbf0dc;
  --clay: #b4413c;
  --clay-soft: #f8e6e4;
  --head: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r: 12px;
  --tabs-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font: 17px/1.55 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--lake); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin-top: 1.8em; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }

/* ---------- frame */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pine);
  font: 800 1.08rem var(--head); letter-spacing: -.01em; margin-right: auto; }
.top-nav { display: none; gap: 4px; align-items: center; }
.top-nav a { color: var(--ink); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 700; font-size: .95rem; white-space: nowrap; }
@media (max-width: 420px) { .is-guest .brand span { font-size: .95rem; } .is-guest .top-nav a { padding: 7px 8px; } .is-guest .top-inner { gap: 8px; } }
.top-nav a:hover { background: var(--leaf); }
.top-nav a.btn { color: #fff; }
.top-account { color: var(--pine); display: flex; padding: 6px; border-radius: 50%; }
.is-guest .top-nav { display: flex; }
.count { background: var(--marigold); color: #1b1405; border-radius: 999px; padding: 0 7px; font-size: .78rem; margin-left: 2px; }
.testbar { background: var(--marigold-soft); color: var(--ink); text-align: center; font-size: .85rem; padding: 5px 12px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px calc(var(--tabs-h) + 40px); }
.wrap.wide { max-width: 1080px; }
.is-guest .wrap { padding-bottom: 48px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; }
.tabs a.on { color: var(--pine); }
.tabs a.on .ic { stroke-width: 2.4; }
.tabs .dot { position: absolute; top: 7px; left: calc(50% + 6px); background: var(--marigold); color: #1b1405;
  font-size: .68rem; border-radius: 999px; padding: 0 5px; min-width: 18px; text-align: center; }
@media (min-width: 900px) {
  .top-nav { display: flex; }
  .top-account { display: none; }
  .tabs { display: none; }
  .wrap { padding-bottom: 60px; }
}

/* ---------- basics */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--pine); color: #fff; font: 700 1rem var(--body); text-decoration: none; padding: 12px 18px;
  border-radius: 10px; min-height: 46px; }
.btn:hover { background: var(--pine-2); }
.btn.small { min-height: 36px; padding: 7px 13px; font-size: .92rem; }
.btn.quiet { background: transparent; color: var(--pine); border: 1.5px solid var(--line); }
.btn.quiet:hover { background: var(--leaf); }
.btn.danger { background: transparent; color: var(--clay); border: 1.5px solid var(--clay-soft); }
.btn.big { width: 100%; min-height: 58px; font-size: 1.12rem; }
.btn.go { background: var(--lake); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--lake); font: inherit; text-decoration: underline; cursor: pointer; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--leaf); border-left: 4px solid var(--pine); }
.flash.error { background: var(--clay-soft); border-left-color: var(--clay); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.note { background: var(--marigold-soft); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.empty { color: var(--muted); padding: 16px 0; }

.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--leaf); color: var(--pine); }
.badge.wait { background: var(--marigold-soft); color: #7a4d06; }
.badge.warn { background: var(--clay-soft); color: var(--clay); }
.badge.live { background: var(--marigold); color: #1b1405; }
.badge.done { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge.off { background: transparent; color: var(--muted); text-decoration: line-through; }

/* list rows: one visit / one item per line, separated by hairlines rather than boxed */
.list { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 10px 0; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; text-decoration: none; color: var(--ink);
  border-top: 1px solid var(--line); }
.row-item:first-child { border-top: 0; }
a.row-item:hover { background: var(--leaf); }
.row-item .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-item .what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .muted { font-size: .9rem; }
.when { width: 74px; flex: none; display: flex; flex-direction: column; line-height: 1.2; }
.w-day { font-size: .82rem; color: var(--muted); }
.w-time { font: 700 1rem var(--head); }

.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- forms */
label.f { display: block; margin: 14px 0 6px; font-weight: 700; }
.hint { font-size: .88rem; color: var(--muted); margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time],
input[type=number], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 11px 12px; min-height: 46px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lake); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lake) 25%, transparent); }
.grid2 { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--pine); flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; font-weight: 700; }
.chip input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--marigold); }

fieldset.tri { border: 0; padding: 0; margin: 0; display: flex; align-items: center; gap: 6px; }
fieldset.tri legend { float: left; width: 120px; font-weight: 700; padding: 0; }
.tri label { position: relative; }
.tri input { position: absolute; opacity: 0; }
.tri span { display: inline-block; min-width: 64px; text-align: center; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; font-weight: 700; background: var(--paper); }
.tri input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.tri input[value="0"]:checked + span { background: var(--muted); border-color: var(--muted); }
.tri input:focus-visible + span { outline: 3px solid var(--marigold); }
.checklist { display: grid; gap: 10px; margin: 8px 0 4px; }

/* ---------- landing */
.hero { display: grid; gap: 28px; align-items: center; padding: 14px 0 10px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.15fr 1fr; padding-top: 34px; } }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.7rem); line-height: 1.02; letter-spacing: -.035em; color: var(--pine); }
.hero .lede { font-size: 1.15rem; max-width: 34em; }
.price-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); }
.price-table th, .price-table td { padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.price-table thead th { border-top: 0; font-size: .85rem; color: var(--muted); }
.price-table td.n { white-space: nowrap; font-weight: 700; }
.price-row { display: grid; gap: 6px 20px; padding: 14px 16px; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-row p { margin: 2px 0 0; }
.pr-nums { display: flex; flex-direction: column; gap: 1px; }
.pr-nums b { font: 700 1.1rem var(--head); color: var(--pine); }
@media (min-width: 640px) { .price-row { grid-template-columns: 1fr 230px; } }
.steps { padding-left: 1.2em; }
.steps li { margin: 0 0 .6em; }

/* ---------- the walk trail: arrival, photos, departure */
.trail { position: relative; margin: 8px 0 4px; padding-left: 30px; }
.trail::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; border-left: 3px dotted var(--lake); }
.stop { position: relative; padding: 2px 0 18px; }
.stop::before { content: ""; position: absolute; left: -26px; top: 5px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--lake); }
.stop.end::before { background: var(--lake); }
.stop.live::before { background: var(--marigold); border-color: var(--marigold); animation: pulse 1.8s ease-out infinite; }
.stop .t { font: 700 1.1rem var(--head); }
.stop .l { color: var(--muted); font-size: .9rem; margin-left: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--marigold) 70%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .stop.live::before { animation: none; } }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pill { background: var(--leaf); color: var(--pine); border-radius: 999px; padding: 4px 11px; font-weight: 700; font-size: .9rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 10px 0; }
.gallery a, .gallery .ph { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--leaf); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .ph button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.gallery .ph.up { display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.report-note { white-space: pre-line; font-size: 1.05rem; }

.live-banner { display: flex; align-items: center; gap: 12px; background: var(--marigold-soft); border-radius: 14px; padding: 14px 16px;
  margin: 12px 0; text-decoration: none; color: var(--ink); border: 1.5px solid var(--marigold); }
.live-banner .pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--marigold); flex: none; animation: pulse 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .live-banner .pulse { animation: none; } }

/* ---------- visit screen (her phone) */
.visit-head { display: flex; gap: 14px; align-items: center; }
.pet-ava { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--leaf); flex: none;
  display: grid; place-items: center; font: 800 1.3rem var(--head); color: var(--pine); }
.uploader { display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px dashed var(--line); border-radius: 14px;
  padding: 18px; cursor: pointer; font-weight: 700; color: var(--pine); background: var(--paper); }
.uploader:hover { border-color: var(--lake); }
.uploader input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sticky-act { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 8px); z-index: 10; }
@media (min-width: 900px) { .sticky-act { bottom: 12px; } }
.care { border-left: 3px solid var(--marigold); padding-left: 12px; margin: 10px 0; }

/* ---------- booking */
.daypick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.daypick button { flex: none; scroll-snap-align: start; width: 66px; padding: 8px 0; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer; font: 700 .85rem var(--body); line-height: 1.25; }
.daypick button b { display: block; font: 800 1.3rem var(--head); }
.daypick button.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.times button { padding: 10px 0; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font: 700 .95rem var(--body); cursor: pointer; }
.times button.on { background: var(--lake); border-color: var(--lake); color: #fff; }
.picked { margin: 8px 0; }
.picked li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.picked ul { list-style: none; padding: 0; margin: 0; }
.week-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.week-row:first-of-type { border-top: 0; }
.week-row .check { margin: 0; }
.total { display: flex; justify-content: space-between; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; }

/* ---------- messages */
.thread { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 120px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
  align-self: flex-start; white-space: pre-line; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--pine); color: #fff; border-color: var(--pine); }
.msg .meta { display: block; font-size: .75rem; opacity: .75; margin-top: 3px; }
.msg.system { align-self: center; background: none; border: 0; color: var(--muted); font-size: .86rem; text-align: center; max-width: 92%; padding: 2px 8px; }
.msg.system a { color: inherit; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); background: var(--paper);
  border-top: 1px solid var(--line); padding: 10px 12px; z-index: 25; }
.composer form { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 160px; height: 46px; }
@media (min-width: 900px) { .composer { bottom: 0; } }

/* ---------- admin */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font: 800 1.5rem var(--head); color: var(--pine); }
.stat span { font-size: .85rem; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .95rem; }
table.t th, table.t td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.t thead th { border-top: 0; color: var(--muted); font-size: .85rem; }
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 6px; }
.day-head h3 { margin: 0; }
.status-line { display: flex; gap: 10px; align-items: center; }
.on-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pine); display: inline-block; }
.off-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
details.more { margin: 14px 0; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--lake); }
.split { display: grid; gap: 14px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.copy { display: flex; gap: 8px; }
.copy input { font-size: .85rem; }
