/* PackLeader (working name) — one stylesheet. Tokens first; every colour, size and radius comes from them, so the
   brand can be swapped in one place later. Light and dark follow the device. */

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-latin-ext.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/bricolage-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/bricolage-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f1f4ef;
  --surface: #ffffff;
  --surface-2: #f6f8f5;
  --ink: #16231c;
  --ink-2: #435349;
  --ink-3: #59685f;
  --line: #d9e1db;
  --line-2: #c3cec6;
  --accent: #1d6a4c;
  --accent-2: #155a3f;
  --accent-soft: #e0eee6;
  --accent-ink: #ffffff;
  --amber: #8a5a00;
  --amber-soft: #fbefd3;
  --red: #a8352a;
  --red-soft: #fae3df;
  --blue: #1d5b96;
  --blue-soft: #e1ebf6;
  --shadow: 0 1px 2px rgba(22, 35, 28, 0.06), 0 4px 14px rgba(22, 35, 28, 0.05);
  --shadow-up: 0 -8px 30px rgba(22, 35, 28, 0.14);
  --scrim: rgba(12, 20, 16, 0.42);

  --font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage', 'Figtree', system-ui, sans-serif;
  --fs-meta: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-body: 0.96875rem;
  --fs-lead: 1.0625rem;
  --fs-h3: 1.25rem;
  --fs-h2: 1.5625rem;
  --fs-h1: 1.875rem;

  --r-card: 14px;
  --r-field: 10px;
  --r-sheet: 22px;
  --gap: 16px;
  --pad: 16px;
  --tabbar: 64px;
  --side: 248px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0d1411;
    --surface: #141e19;
    --surface-2: #19251f;
    --ink: #e4ece7;
    --ink-2: #b0beb6;
    --ink-3: #93a39a;
    --line: #233129;
    --line-2: #314139;
    --accent: #48b584;
    --accent-2: #62c798;
    --accent-soft: #163225;
    --accent-ink: #04170e;
    --amber: #e9b452;
    --amber-soft: #352710;
    --red: #f19285;
    --red-soft: #3a1c18;
    --blue: #86b9ea;
    --blue-soft: #15273a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-up: 0 -8px 30px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0d1411;
  --surface: #141e19;
  --surface-2: #19251f;
  --ink: #e4ece7;
  --ink-2: #b0beb6;
  --ink-3: #93a39a;
  --line: #233129;
  --line-2: #314139;
  --accent: #48b584;
  --accent-2: #62c798;
  --accent-soft: #163225;
  --accent-ink: #04170e;
  --amber: #e9b452;
  --amber-soft: #352710;
  --red: #f19285;
  --red-soft: #3a1c18;
  --blue: #86b9ea;
  --blue-soft: #15273a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-up: 0 -8px 30px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 88%;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-lead);
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* ---------- shell ---------- */
.shell {
  min-height: 100dvh;
}
.main {
  padding: 0 var(--pad) calc(var(--tabbar) + 28px + env(safe-area-inset-bottom));
  max-width: 1120px;
  margin: 0 auto;
}
.top {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 0 14px;
}
.top-text {
  flex: 1;
  min-width: 0;
}
.top-kicker {
  color: var(--ink-3);
  font-size: var(--fs-small);
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top h1 {
  overflow-wrap: anywhere;
}
.top-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-small);
  padding: 4px 0;
  margin-bottom: 4px;
}
.back svg {
  width: 18px;
  height: 18px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar);
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
}
.tab svg {
  width: 23px;
  height: 23px;
}
.tab[aria-current='page'] {
  color: var(--accent);
}
.tab[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.tab .dot {
  position: absolute;
  top: 9px;
  left: calc(50% + 7px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 0.66rem;
  line-height: 17px;
  text-align: center;
}
.side {
  display: none;
}

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: var(--side) 1fr;
  }
  .tabbar {
    display: none;
  }
  .main {
    padding: 0 36px 56px;
    width: 100%;
  }
  .top {
    padding-top: 34px;
    padding-bottom: 20px;
  }
  .side {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 26px 14px 18px;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }
  .side-brand {
    padding: 0 10px 22px;
  }
  .side-brand b {
    display: block;
    font-family: var(--font-display);
    font-stretch: 86%;
    font-size: 1.3rem;
    line-height: 1.1;
  }
  .side-brand span {
    color: var(--ink-3);
    font-size: var(--fs-small);
  }
  .side a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    position: relative;
  }
  .side a svg {
    width: 20px;
    height: 20px;
  }
  .side a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .side a[aria-current='page'] {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .side .dot {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 0.72rem;
    line-height: 20px;
    text-align: center;
  }
  .side-foot {
    margin-top: auto;
    padding: 10px;
    color: var(--ink-3);
    font-size: var(--fs-meta);
  }
}

/* ---------- layout helpers ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.cols {
  display: grid;
  gap: 20px;
}
@media (min-width: 960px) {
  .cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .cols-wide {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 2px 10px;
}
.section-title h2 {
  font-size: var(--fs-h3);
}
.section-title .count {
  color: var(--ink-3);
  font-weight: 600;
  font-size: var(--fs-small);
}
.muted {
  color: var(--ink-2);
}
.faint {
  color: var(--ink-3);
}
.small {
  font-size: var(--fs-small);
}
.meta {
  font-size: var(--fs-meta);
  color: var(--ink-3);
}
.num {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 16px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.card-head h3 {
  font-size: var(--fs-lead);
}
.list {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 60px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--line);
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.list > .row:first-child {
  border-top: 0;
}
.row:hover {
  background: var(--surface-2);
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.row-sub {
  color: var(--ink-2);
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}
.row-end {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.row-end svg {
  width: 18px;
  height: 18px;
}
.kv {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr;
  gap: 8px 14px;
  margin: 0;
}
.kv dt {
  color: var(--ink-3);
  font-size: var(--fs-small);
  font-weight: 600;
  padding-top: 1px;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: var(--fs-small);
}
.banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--blue);
}
.banner.warn {
  background: var(--amber-soft);
}
.banner.warn svg {
  color: var(--amber);
}
.banner.alert {
  background: var(--red-soft);
}
.banner.alert svg {
  color: var(--red);
}
.empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-2);
}
.empty p + .btn {
  margin-top: 14px;
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s var(--ease),
    transform 0.1s var(--ease);
}
.btn:hover {
  background: var(--surface-2);
}
.btn:active {
  transform: scale(0.98);
}
.btn svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-2);
}
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}
.btn-quiet:hover {
  background: var(--accent-soft);
}
.btn-danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 40%, var(--line-2));
}
.btn-danger:hover {
  background: var(--red-soft);
}
.btn-danger.btn-solid {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: var(--fs-small);
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.55;
  pointer-events: none;
}
.btn[aria-busy='true']::after {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.icon-btn.plain {
  border-color: transparent;
  background: transparent;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span:first-child {
  font-weight: 650;
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.hint {
  color: var(--ink-3);
  font-size: var(--fs-meta);
}
.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  border-radius: var(--r-field);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
}
.textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.input[aria-invalid='true'] {
  border-color: var(--red);
}
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.code-input {
  font-size: 1.9rem;
  letter-spacing: 0.32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.form-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .span2 {
    grid-column: span 2;
  }
}
.form-err {
  color: var(--red);
  font-size: var(--fs-small);
  font-weight: 600;
}

/* segmented choice and multi-choice chips */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.seg label > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.seg input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.seg input:focus-visible + span {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}
.seg input:disabled + span {
  opacity: 0.45;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  cursor: pointer;
}
.switch input {
  appearance: none;
  flex-shrink: 0;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: var(--line-2);
  position: relative;
  cursor: pointer;
  transition: background 0.18s var(--ease);
  margin: 0;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s var(--ease);
}
.switch input:checked {
  background: var(--accent);
}
.switch input:checked::after {
  transform: translateX(18px);
}
.switch-text b {
  display: block;
  font-weight: 650;
}
.switch-text span {
  color: var(--ink-3);
  font-size: var(--fs-meta);
}

/* ---------- dogs ---------- */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.avatar.lg {
  width: 96px;
  height: 96px;
  font-size: 2.2rem;
}
.avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}
.pack {
  display: flex;
  flex-shrink: 0;
}
.pack .avatar {
  border: 2.5px solid var(--surface);
  margin-left: -10px;
}
.pack .avatar:first-child {
  margin-left: 0;
}
.pack .more {
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  font-weight: 700;
}
.dog-name {
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 700;
}
.dogtile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.dogtile:hover {
  border-color: var(--line-2);
}
.dog-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--ink-2);
}
.fact.warn {
  background: var(--amber-soft);
  border-color: transparent;
  color: var(--amber);
}
.fact.alert {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
}
.fact.ok {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* ---------- status ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: var(--fs-meta);
  font-weight: 700;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status.requested {
  background: var(--amber-soft);
  color: var(--amber);
}
.status.confirmed {
  background: var(--accent-soft);
  color: var(--accent);
}
.status.in_progress {
  background: var(--blue-soft);
  color: var(--blue);
}
.status.cancelled,
.status.declined {
  color: var(--ink-3);
  text-decoration: line-through;
}
.status.no_show {
  background: var(--red-soft);
  color: var(--red);
}

/* ---------- needs-you list ---------- */
.needs {
  display: grid;
  gap: 10px;
}
@media (min-width: 700px) {
  .needs {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
.need {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.need-n {
  font-family: var(--font-display);
  font-stretch: 80%;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  min-width: 34px;
  color: var(--amber);
}
.need.alert .need-n {
  color: var(--red);
}
.need.calm .need-n {
  color: var(--accent);
}
.need b {
  display: block;
}
.need span {
  color: var(--ink-2);
  font-size: var(--fs-small);
}

/* ---------- the day board ---------- */
.daynav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.daynav .when {
  flex: 1;
  min-width: 0;
}
.daynav .when b {
  font-family: var(--font-display);
  font-stretch: 86%;
  font-size: 1.35rem;
  display: block;
  line-height: 1.1;
}
.daynav .when span {
  color: var(--ink-3);
  font-size: var(--fs-small);
}
.daystrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 8px;
  margin: 0 -2px 6px;
  scroll-snap-type: x proximity;
}
.daystrip::-webkit-scrollbar {
  display: none;
}
.day {
  flex: 0 0 58px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 0 7px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: inherit;
}
.day small {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-3);
}
.day b {
  font-family: var(--font-display);
  font-stretch: 85%;
  font-size: 1.3rem;
  line-height: 1.1;
}
.day i {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-3);
  min-height: 1em;
}
.day[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.day[aria-pressed='true'] small,
.day[aria-pressed='true'] i {
  color: color-mix(in srgb, var(--surface) 75%, transparent);
}
.day.today b {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.day:disabled {
  opacity: 0.4;
  cursor: default;
}
.day .full {
  color: var(--red);
}

.lane {
  border-left: 4px solid var(--lane, var(--line-2));
}
.lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px 4px;
}
.lane-head b {
  font-size: var(--fs-lead);
}
.lane-head span {
  color: var(--ink-3);
  font-size: var(--fs-small);
}
.walk {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.walk:hover {
  background: var(--surface-2);
}
.walk-time {
  min-width: 54px;
  font-variant-numeric: tabular-nums;
}
.walk-time b {
  display: block;
  font-family: var(--font-display);
  font-stretch: 85%;
  font-size: 1.15rem;
  line-height: 1.1;
}
.walk-time span {
  font-size: var(--fs-meta);
  color: var(--ink-3);
}
.walk-body {
  flex: 1;
  min-width: 0;
}
.walk-body .row-sub {
  margin-top: 1px;
}
.load {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.load i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
.load i.on {
  background: var(--accent);
}
.load.over i.on {
  background: var(--red);
}

.slots {
  display: grid;
  gap: 10px;
}
@media (min-width: 560px) {
  .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.slot input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.slot b {
  font-size: var(--fs-lead);
}
.slot .num {
  color: var(--ink-2);
  font-size: var(--fs-small);
}
.slot em {
  font-style: normal;
  font-weight: 700;
  font-size: var(--fs-meta);
  color: var(--accent);
}
.slot.few em {
  color: var(--amber);
}
.slot.full,
.slot.closed {
  opacity: 0.55;
  cursor: not-allowed;
}
.slot.full em,
.slot.closed em {
  color: var(--ink-3);
}
.slot:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.slot:has(input:focus-visible) {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

.meter {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.meter.over > i {
  background: var(--red);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat b {
  font-family: var(--font-display);
  font-stretch: 82%;
  font-size: 1.6rem;
  line-height: 1;
}

/* ---------- sheet (bottom sheet on phones, dialog on wide screens) ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--scrim);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s var(--ease);
}
.sheet {
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-up);
  animation: rise 0.26s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  flex: 1;
  font-size: var(--fs-h3);
}
.sheet-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
}
.sheet-foot .btn {
  flex: 1;
}
@media (min-width: 700px) {
  .scrim {
    align-items: center;
    padding: 24px;
  }
  .sheet {
    max-width: 560px;
    border-radius: var(--r-sheet);
    max-height: 86dvh;
    padding-bottom: 0;
  }
  .sheet.wide {
    max-width: 760px;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0.4;
  }
}

.toast-host {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
@media (min-width: 960px) {
  .toast-host {
    top: auto;
    bottom: 24px;
  }
}
.toast {
  pointer-events: auto;
  max-width: 480px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  font-size: var(--fs-small);
  box-shadow: var(--shadow-up);
  animation: rise 0.22s var(--ease);
}
.toast.alert {
  background: var(--red);
  color: #fff;
}

/* ---------- sign-in ---------- */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}
.gate-card {
  width: 100%;
  max-width: 420px;
}
.gate-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  color: var(--accent);
}
.gate h1 {
  font-size: 2.1rem;
  margin-bottom: 8px;
}
.gate .lede {
  color: var(--ink-2);
  font-size: var(--fs-lead);
  margin-bottom: 26px;
}
.gate-foot {
  margin-top: 28px;
  color: var(--ink-3);
  font-size: var(--fs-meta);
}

/* ---------- walker's day ---------- */
.stop {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.stop-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.stop-addr {
  color: var(--ink-2);
  font-size: var(--fs-small);
}
.stop-dogs {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.brief {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.brief .facts {
  margin-top: 6px;
}

.week-day {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.week-day:first-child {
  border-top: 0;
}
.week-day h4 {
  font-size: var(--fs-body);
  margin-bottom: 6px;
}

.hours-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.hours-row label {
  flex-wrap: nowrap;
}
.hours-row .input {
  padding: 10px 8px;
}
.hours-row b {
  font-size: var(--fs-small);
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.doc-row:first-child {
  border-top: 0;
}

.loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.loading::after {
  content: '';
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line-2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body.locked {
  overflow: hidden;
}
.row-open {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
div.row {
  cursor: default;
}
div.row:hover {
  background: none;
}
.seg.swatches label > span {
  width: 40px;
  padding: 0;
  border-radius: 50%;
}
.seg.swatches input:checked + span {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5px var(--ink);
}
.avatar.alert-dot {
  background: var(--red-soft);
  color: var(--red);
}
.avatar svg {
  width: 55%;
  height: 55%;
}
.places {
  display: grid;
  gap: 18px 24px;
}
@media (min-width: 640px) {
  .places {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
.avatar.todo {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1.5px solid var(--line-2);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
}
.row > svg {
  flex-shrink: 0;
  color: var(--ink-3);
  width: 18px;
  height: 18px;
}

/* buttons in a column keep their own width unless asked to fill it */
.stack > .btn:not(.btn-block),
.stack-sm > .btn:not(.btn-block),
.stack-lg > .btn:not(.btn-block) {
  align-self: flex-start;
}
.board {
  display: grid;
  gap: 28px;
}
@media (min-width: 1100px) {
  .board {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
  }
}
.board-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.walk-alert {
  color: var(--red);
  display: inline-flex;
}
.walk-alert svg {
  width: 18px;
  height: 18px;
}
.slots.compact {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.slots.compact .slot {
  padding: 12px;
}
.slots.compact .slot b {
  font-size: var(--fs-body);
}
@media (min-width: 700px) {
  .slots.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
