@font-face {
  font-family: "Voffi Sans";
  src: url("/assets/manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --paper-deep: #eee9df;
  --surface: #fffdf9;
  --surface-blue: #eef9fa;
  --surface-mint: #eef5e5;
  --ink: #263440;
  --ink-strong: #14212a;
  --muted: #626d69;
  --line: rgba(38, 52, 64, 0.14);
  --line-strong: rgba(38, 52, 64, 0.25);
  --aqua: #75dfe5;
  --aqua-deep: #147f8f;
  --mint: #bedc72;
  --coral: #e76f51;
  --sun: #f2d95d;
  --success: #237a51;
  --danger: #b33b3b;
  --warning: #9b6717;
  --shadow-sm: 0 10px 24px rgba(29, 43, 52, 0.08);
  --shadow-md: 0 26px 72px rgba(29, 43, 52, 0.13);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 34px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 36px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Voffi Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

a {
  color: var(--ink-strong);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--aqua-deep);
}

:focus-visible {
  outline: 3px solid var(--aqua-deep);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

svg,
img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--ink-strong);
  color: white;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  color: white;
  transform: translateY(0);
}

.page-atmosphere {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.45;
  animation: drift 14s var(--ease) infinite alternate;
}

.orb-aqua {
  width: 310px;
  height: 310px;
  top: 18%;
  right: -180px;
  background: color-mix(in srgb, var(--aqua) 50%, transparent);
}

.orb-mint {
  width: 240px;
  height: 240px;
  top: 58%;
  left: -150px;
  background: color-mix(in srgb, var(--mint) 44%, transparent);
  animation-delay: -5s;
}

.path-line {
  position: absolute;
  width: 430px;
  height: 190px;
  right: -105px;
  bottom: 4%;
  border: 2px dashed rgba(38, 52, 64, 0.1);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 87% 10%, rgba(117, 223, 229, 0.38), transparent 31%),
    linear-gradient(148deg, var(--paper) 8%, #eff8f6 56%, var(--paper-deep) 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -124px;
  left: -92px;
  border: 48px solid rgba(190, 220, 114, 0.25);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  width: min(calc(100% - 40px), 1080px);
  margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + 18px) 0 36px;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand-icon {
  width: 31px;
  height: 31px;
}

.brand-wordmark {
  width: 72px;
  height: auto;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.secure-label svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero-copy-block {
  max-width: 710px;
  padding: clamp(50px, 8vw, 90px) 0 clamp(44px, 7vw, 72px);
  animation: enter-up 700ms var(--ease) both;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--aqua-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-dark {
  color: var(--muted);
}

#screen-title {
  max-width: 650px;
  font-size: clamp(2.55rem, 8vw, 4.6rem);
}

#screen-title::after {
  content: "";
  display: block;
  width: min(280px, 58%);
  height: 12px;
  margin-top: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10C76 2 176 15 297 5' fill='none' stroke='%2375dfe5' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-1deg);
}

.hero-copy {
  max-width: 650px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  line-height: 1.65;
}

.permission-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  animation: enter-up 760ms 100ms var(--ease) both;
}

.permission-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  padding: 22px 22px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.permission-item + .permission-item {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.permission-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-strong);
  font-size: 0.9rem;
}

.permission-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 780px);
  margin: 0 auto;
  padding: 42px 0 calc(env(safe-area-inset-bottom) + 72px);
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.hidden {
  display: none !important;
}

.card {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.claim-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 46px;
  box-shadow: var(--shadow-md);
  animation: enter-up 700ms 140ms var(--ease) both;
}

.claim-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 170px;
  height: 170px;
  top: -92px;
  right: -72px;
  border: 25px solid rgba(117, 223, 229, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.claim-card > * {
  position: relative;
  z-index: 1;
}

.claim-heading-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.claim-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: var(--surface-blue);
  color: var(--ink);
}

.claim-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.claim-card h2,
.section-heading h2,
.modal-header h2 {
  font-size: clamp(1.65rem, 5vw, 2.25rem);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}

.banner.info {
  border-color: rgba(20, 127, 143, 0.22);
  background: var(--surface-blue);
  color: #0b5f6b;
}

.banner.error {
  border-color: rgba(179, 59, 59, 0.22);
  background: #fff0ec;
  color: #8e2828;
}

.access-paused-card {
  margin-bottom: 46px;
  border-color: rgba(20, 127, 143, 0.28);
  background:
    linear-gradient(135deg, rgba(219, 247, 247, 0.88), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.access-paused-heading {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.access-paused-heading h2 {
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.access-paused-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.16em;
  padding-right: 0.16em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #faf9f5;
  color: var(--ink-strong);
  font-weight: 500;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(20, 127, 143, 0.55);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--aqua-deep);
  background: white;
  box-shadow: 0 0 0 4px rgba(117, 223, 229, 0.18);
  outline: none;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input[type="checkbox"] {
  width: 44px;
  height: 44px;
  accent-color: var(--ink);
}

.code-field input {
  height: 60px;
  padding-inline: 18px;
  background: var(--paper);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.code-field input::placeholder {
  color: #89918e;
  opacity: 1;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 170ms var(--ease), box-shadow 170ms ease, background-color 170ms ease, border-color 170ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  background: var(--ink);
  color: white;
  font-weight: 750;
  box-shadow: 0 11px 24px rgba(38, 52, 64, 0.17);
}

.secondary-button {
  background: var(--surface-blue);
  border-color: rgba(20, 127, 143, 0.16);
  color: #0c6875;
  font-weight: 750;
}

.ghost-button {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  font-weight: 700;
}

.icon-button {
  width: 46px;
  padding: 0;
  background: var(--paper-deep);
  color: var(--ink);
  font-size: 1.5rem;
}

@media (hover: hover) {
  .primary-button:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .icon-button:hover,
  .access-row:hover {
    transform: translateY(-2px);
  }

  .primary-button:hover {
    background: var(--ink-strong);
    box-shadow: 0 15px 30px rgba(38, 52, 64, 0.22);
  }

  .secondary-button:hover {
    border-color: rgba(20, 127, 143, 0.32);
    background: #e1f6f7;
  }
}

.privacy-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.privacy-note strong {
  color: var(--ink-strong);
}

.privacy-note-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 10px;
}

.section-heading .eyebrow {
  margin: 0;
}

.authorized-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(35, 122, 81, 0.18);
  border-radius: var(--radius-sm);
  background: var(--surface-mint);
  color: #375349;
  font-size: 0.86rem;
  line-height: 1.5;
}

.authorized-notice strong {
  color: #25463a;
}

.authorized-notice svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #33684f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.access-row,
.task-row,
.activity-row,
.pet-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.access-row,
.task-row,
.activity-row {
  padding: 18px;
}

.access-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  color: inherit;
  text-align: left;
  transition: transform 170ms var(--ease), box-shadow 170ms ease, border-color 170ms ease;
}

.access-row:hover {
  box-shadow: var(--shadow-md);
}

.access-row.is-selected {
  border-color: rgba(22, 152, 181, 0.45);
}

.access-row .meta,
.summary-grid,
.pet-meta,
.activity-meta,
.task-meta {
  display: grid;
  gap: 10px;
}

.summary-card {
  background: linear-gradient(145deg, var(--surface) 40%, var(--surface-blue));
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(38, 52, 64, 0.08);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, white 72%, transparent);
}

.stat-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 760;
  line-height: 1.25;
}

.chips,
.action-grid,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  padding: 7px 11px;
  border: 1px solid rgba(38, 52, 64, 0.08);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.pet-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.pet-header {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 15px;
  align-items: center;
}

.pet-avatar {
  display: grid;
  width: 60px;
  height: 60px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-blue);
  font-size: 1.5rem;
}

.pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-name {
  color: var(--ink-strong);
  font-size: 1.18rem;
  font-weight: 760;
}

.pet-species {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.action-grid button,
.inline-actions button {
  min-height: 46px;
}

.action-grid button {
  flex: 1 1 calc(50% - 8px);
}

.task-row,
.activity-row {
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-left: 5px solid var(--aqua);
}

.activity-row {
  border-left-color: var(--mint);
}

.task-title,
.activity-title,
.access-title {
  color: var(--ink-strong);
  font-size: 1.06rem;
  font-weight: 760;
}

.meta-line {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.instructions-card {
  border-left: 5px solid var(--sun);
  box-shadow: none;
}

.dashboard-mode .hero {
  background:
    radial-gradient(circle at 87% 10%, rgba(117, 223, 229, 0.22), transparent 34%),
    linear-gradient(148deg, var(--paper) 8%, #eff8f6 72%, var(--paper-deep) 100%);
}

.dashboard-mode .hero-inner {
  padding-top: calc(env(safe-area-inset-top) + 10px);
  padding-bottom: 10px;
}

.dashboard-mode .hero-copy-block,
.dashboard-mode .permission-strip {
  display: none;
}

.dashboard-mode .page {
  width: min(calc(100% - 32px), 1160px);
  padding-top: 24px;
}

.dashboard-intro {
  display: grid;
  gap: var(--space-md);
}

.dashboard-intro .summary-card {
  min-width: 0;
}

.care-workspace {
  display: grid;
  gap: clamp(28px, 5vw, 54px);
  align-items: start;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: flex-end;
  justify-content: space-between;
}

.section-heading-row .section-heading {
  flex: 1 1 280px;
}

.task-progress {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(20, 127, 143, 0.18);
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--aqua-deep);
  font-size: 0.8rem;
  font-weight: 780;
}

.task-empty {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-color: rgba(35, 122, 81, 0.18);
  background: var(--surface-mint);
  box-shadow: none;
}

.task-empty h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.task-empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 1rem;
  font-weight: 800;
}

.task-row {
  gap: var(--space-md);
  padding: 18px;
  border-left: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(29, 43, 52, 0.07);
}

.task-row.is-completed {
  border-color: rgba(35, 122, 81, 0.15);
  background: color-mix(in srgb, var(--surface-mint) 56%, var(--surface));
  box-shadow: none;
}

.task-layout {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.task-kind-mark,
.activity-kind-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--surface-blue);
  color: var(--aqua-deep);
}

.task-row.is-completed .task-kind-mark {
  background: var(--success);
  color: white;
  font-weight: 800;
}

.care-icon {
  width: 22px;
  height: 22px;
}

.task-content {
  min-width: 0;
}

.task-heading-line,
.activity-heading-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.task-heading-line > div,
.activity-heading-line > div {
  min-width: 0;
}

.task-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.task-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(20, 127, 143, 0.17);
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--aqua-deep);
  font-size: 0.7rem;
  font-weight: 780;
}

.task-row.is-completed .task-status {
  border-color: rgba(35, 122, 81, 0.18);
  background: var(--surface-mint);
  color: var(--success);
}

.task-meta-chips,
.activity-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-meta-chips span,
.activity-details span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.task-instructions {
  padding: 11px 12px;
  border-left: 3px solid var(--sun);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--sun) 13%, var(--surface));
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.5;
}

.task-completed-time {
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 730;
}

.inline-actions {
  margin-left: 60px;
}

.compact-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  font-size: 0.84rem;
}

.button-icon {
  width: 18px;
  height: 18px;
}

.active-walk-notice,
.task-read-only {
  margin-left: 60px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.active-walk-notice {
  border: 1px solid rgba(20, 127, 143, 0.16);
  background: var(--surface-blue);
  color: var(--aqua-deep);
}

.quick-care-card {
  gap: 14px;
  padding: 17px;
  box-shadow: 0 8px 22px rgba(29, 43, 52, 0.07);
}

.quick-care-card .pet-header {
  grid-template-columns: 50px 1fr;
  gap: 12px;
}

.quick-care-card .pet-avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.quick-care-card .action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-care-card .action-grid button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  padding-inline: 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.active-walk-chip {
  border-color: rgba(20, 127, 143, 0.17);
  background: var(--surface-blue);
  color: var(--aqua-deep);
}

.instructions-card > p + p {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-sm);
}

.activity-row {
  gap: 11px;
  padding: 16px;
  border-left: 1px solid var(--line);
  box-shadow: none;
}

.activity-heading-line {
  justify-content: flex-start;
}

.activity-kind-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--surface-mint);
  color: var(--success);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.agenda-task-group {
  display: grid;
  gap: 10px;
}

.agenda-task-group + .agenda-task-group {
  margin-top: var(--space-md);
}

.agenda-task-group-title,
.activity-day-heading {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 790;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.agenda-task-list {
  display: grid;
  gap: 9px;
}

.agenda-task-group .task-row {
  position: relative;
}

.agenda-task-group .task-row:not(.is-completed)::before {
  content: "";
  position: absolute;
  inset-block: 19px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--aqua);
}

.completed-task-group {
  margin-top: var(--space-lg);
  border: 1px solid rgba(35, 122, 81, 0.18);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-mint) 34%, var(--surface));
  overflow: clip;
}

.completed-task-group > summary {
  min-height: 52px;
  padding: 14px 17px;
  color: var(--success);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 780;
  list-style-position: inside;
}

.completed-task-group > summary:hover {
  background: color-mix(in srgb, var(--surface-mint) 55%, transparent);
}

.completed-task-list {
  padding: 0 12px 12px;
}

.completed-task-list .task-row {
  border-radius: var(--radius-sm);
}

.task-photo-request {
  border: 1px solid rgba(155, 103, 23, 0.18);
  background: color-mix(in srgb, var(--sun) 18%, var(--surface)) !important;
  color: var(--warning) !important;
}

.activity-private-label {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 12px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(35, 122, 81, 0.18);
  border-radius: 999px;
  background: var(--surface-mint);
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 780;
}

.activity-status:empty {
  display: none;
}

.activity-empty {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  box-shadow: none;
}

.activity-empty h3 {
  margin-bottom: 4px;
  font-size: 1.03rem;
}

.activity-empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-blue);
  color: var(--aqua-deep);
  font-weight: 800;
}

.activity-history,
.activity-day-group,
.activity-day-list {
  display: grid;
}

.activity-history {
  gap: var(--space-lg);
}

.activity-day-group {
  gap: 10px;
}

.activity-day-list {
  position: relative;
  gap: 10px;
}

.activity-day-list::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 24px;
  bottom: 24px;
  left: 35px;
  border-left: 1px dashed var(--line-strong);
}

.activity-history-row {
  position: relative;
  z-index: 1;
  gap: 12px;
  padding: 16px 16px 15px;
  box-shadow: 0 8px 22px rgba(29, 43, 52, 0.05);
}

.activity-history-heading {
  min-width: 0;
}

.activity-note {
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.activity-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.activity-photo-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.activity-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.activity-photo-button {
  min-width: 0;
}

.activity-photo-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.activity-history-footer {
  display: flex;
  justify-content: center;
}

.activity-history-footer .ghost-button {
  min-width: min(100%, 220px);
}

.photo-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.photo-field legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.photo-picker {
  display: grid;
  gap: 10px;
}

.photo-choose-button {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink-strong);
  font-weight: 750;
}

.photo-choose-button:hover {
  border-color: var(--aqua-deep);
  background: var(--surface-blue);
}

.photo-selection-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.photo-selection-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface);
}

.photo-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-selection-actions > * {
  flex: 1 1 180px;
}

.photo-field-status {
  min-height: 1.2em;
  font-size: 0.76rem;
}

.photo-field-status.is-ready {
  color: var(--success);
  font-weight: 700;
}

.photo-field-status.is-error {
  color: var(--danger);
  font-weight: 700;
}

.manual-entry-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(20, 127, 143, 0.18);
  border-radius: var(--radius-sm);
  background: var(--surface-blue);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.5;
}

.manual-entry-notice-icon {
  width: 22px;
  height: 22px;
  color: var(--aqua-deep);
}

.field-optional,
.field-helper {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.field-group legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.field-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.toggle-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.toggle-field input {
  grid-column: 2;
  grid-row: 1;
}

.action-toast {
  position: fixed;
  z-index: 90;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  display: flex;
  width: min(410px, calc(100vw - 36px));
  min-height: 58px;
  padding: 13px 16px;
  gap: 11px;
  align-items: center;
  border: 1px solid rgba(35, 122, 81, 0.22);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 200ms ease, transform 200ms var(--ease);
}

.action-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.action-toast-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-weight: 800;
}

@media (min-width: 900px) {
  .dashboard-intro {
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
    align-items: stretch;
  }

  .dashboard-intro .authorized-notice {
    align-content: start;
  }

  .care-workspace {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  }
}

.caregiver-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(calc(100% - 40px), 1080px);
  margin-inline: auto;
  padding: 30px 0 calc(env(safe-area-inset-bottom) + 30px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.footer-brand span {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 20px;
}

.footer-links a,
.footer-session-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 700;
}

.footer-session-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.footer-session-button:hover {
  color: var(--aqua-deep);
}

.modal-root {
  position: fixed;
  z-index: 50;
  inset: 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 42, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-sheet {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: min(88vh, 780px);
  overflow: auto;
  padding: 12px 18px calc(env(safe-area-inset-bottom) + 22px);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 54px rgba(20, 33, 42, 0.2);
  animation: sheet-up 320ms var(--ease) both;
  overscroll-behavior: contain;
}

.modal-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--line-strong);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.form-actions > * {
  flex: 1 1 0;
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0); }
  to { transform: translate3d(-18px, 22px, 0) rotate(5deg); }
}

@media (min-width: 720px) {
  .page {
    padding-top: 54px;
  }

  .action-grid button {
    flex-basis: calc(33.333% - 8px);
  }

  .modal-sheet {
    inset-inline: 50%;
    bottom: 24px;
    width: min(680px, calc(100vw - 32px));
    border-bottom: 1px solid var(--line);
    border-radius: 28px;
    transform: translateX(-50%);
    animation: sheet-up-desktop 320ms var(--ease) both;
  }
}

@keyframes sheet-up-desktop {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 719px) {
  .hero-inner {
    width: min(calc(100% - 32px), 1080px);
    padding-bottom: 28px;
  }

  .permission-strip {
    grid-template-columns: 1fr;
  }

  .permission-item,
  .permission-item + .permission-item {
    padding: 14px 0;
    border-left: 0;
  }

  .permission-item + .permission-item {
    border-top: 1px solid var(--line);
  }

  .permission-item:first-child {
    padding-top: 18px;
  }

  .permission-item:last-child {
    padding-bottom: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .dashboard-mode .hero-inner {
    padding-bottom: 10px;
  }

  .task-heading-line {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .secure-label {
    font-size: 0.7rem;
  }

  .brand-wordmark {
    width: 66px;
  }

  .hero-copy-block {
    padding-top: 42px;
  }

  .page {
    width: min(calc(100% - 24px), 780px);
    padding-top: 26px;
  }

  .card,
  .access-row,
  .task-row,
  .activity-row,
  .pet-card {
    border-radius: 20px;
  }

  .claim-heading-row {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .action-grid button {
    flex-basis: 100%;
  }

  .quick-care-card .action-grid,
  .field-group-grid {
    grid-template-columns: 1fr;
  }

  .inline-actions,
  .active-walk-notice,
  .task-read-only {
    margin-left: 0;
  }

  .inline-actions > button {
    width: 100%;
  }

  .activity-private-label {
    width: 100%;
    justify-content: center;
  }

  .activity-photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-row-actions .activity-photo-button,
  .photo-selection-actions > * {
    width: 100%;
    flex-basis: 100%;
  }

  .task-layout {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
  }

  .task-kind-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .secure-label {
    background: var(--surface);
  }

  .modal-backdrop {
    background: #24313a;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .stat {
    background: white;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #12191d;
    --paper-deep: #0d1418;
    --surface: #1a2328;
    --surface-blue: #17343a;
    --surface-mint: #253528;
    --ink: #d4dde0;
    --ink-strong: #f2f6f7;
    --muted: #aab6b3;
    --line: rgba(226, 238, 241, 0.14);
    --line-strong: rgba(226, 238, 241, 0.26);
    --aqua-deep: #7ee4ea;
    --success: #79d8a8;
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 26px 72px rgba(0, 0, 0, 0.34);
  }

  .hero,
  .dashboard-mode .hero {
    background:
      radial-gradient(circle at 87% 10%, rgba(117, 223, 229, 0.14), transparent 34%),
      linear-gradient(148deg, var(--paper) 8%, #15282b 72%, var(--paper-deep) 100%);
  }

  .field input,
  .field select,
  .field textarea {
    background: var(--paper);
    color: var(--ink-strong);
  }

  .field input:focus,
  .field select:focus,
  .field textarea:focus,
  .stat {
    background: var(--surface);
  }

  .banner.info,
  .secondary-button,
  .manual-entry-notice,
  .active-walk-notice {
    color: var(--aqua-deep);
  }

  .authorized-notice,
  .authorized-notice strong {
    color: var(--ink);
  }

  .banner.error {
    background: #3a2020;
    color: #ffb4ad;
  }
}

@media (forced-colors: active) {
  .permission-mark,
  .privacy-note-icon,
  .claim-icon {
    border: 1px solid CanvasText;
  }

  .task-row,
  .activity-row,
  .instructions-card {
    border-left-color: CanvasText;
  }
}
