:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-2: #f4fbf4;
  --ink: #2b2520;
  --muted: #5f554d;
  --line: #dfd0bd;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-warm: #fffaf2;
  --accent: #3f806b;
  --accent-dark: #245f4e;
  --mint: #ddf5e7;
  --peach: #ffd8c6;
  --butter: #fff0ad;
  --sky: #e2f0ff;
  --danger: #7d2d18;
  --shadow: 0 14px 28px rgba(96, 78, 50, 0.11);
  --radius: 24px;
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  max-width: 100%;
  background: var(--bg);
}

body {
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 216, 198, 0.7), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(221, 245, 231, 0.9), transparent 34%),
    linear-gradient(145deg, var(--bg) 0%, #fff0df 48%, var(--bg-2) 100%);
  color: var(--ink);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 11px 15px;
  background: linear-gradient(145deg, #328a6f, #56b78f);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(50, 138, 111, 0.22);
  cursor: pointer;
}

button.secondary,
.quiet-button {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fff9f1, #ffedd9);
  color: var(--accent-dark);
  box-shadow: none;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(63, 128, 107, 0.28);
  outline-offset: 2px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: #40352d;
  line-height: 1.18;
}

.app-shell {
  min-height: 100vh;
  min-width: 0;
}

.access-layout,
.center-layout,
.dashboard {
  width: min(1120px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
}

.access-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
  padding: 42px 0;
}

.brand-panel {
  max-width: 560px;
}

.brand-panel h1 {
  margin: 14px 0 12px;
  font-size: clamp(40px, 7vw, 72px);
  letter-spacing: -0.045em;
}

.brand-panel > p {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
}

.baby-mark,
.status-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--peach), var(--butter));
  color: var(--accent-dark);
  font-size: 38px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 800;
}

.trust-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.trust-list li::before {
  content: "✓";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--accent-dark);
}

.access-card,
.card {
  border: 1px solid rgba(223, 208, 189, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.access-card {
  padding: clamp(24px, 4vw, 38px);
}

.access-card h2 {
  margin: 7px 0 8px;
  font-size: 28px;
}

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

.compact {
  margin: 12px 0 0;
  font-size: 13px;
}

.provider-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.provider-form {
  display: grid;
  gap: 6px;
}

.provider-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.credential-form {
  gap: 12px;
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-toggle,
.text-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff9f1;
  color: var(--accent-dark);
  box-shadow: none;
}

.text-button {
  min-height: 36px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credential-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.remember-email {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  cursor: pointer;
}

.remember-email input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.other-login-methods {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.other-login-methods summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.other-login-methods .provider-form {
  margin-top: 12px;
}

.field-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
}

.provider-button {
  width: 100%;
}

.status-message,
.runtime-banner {
  border: 1px solid #8fc9b2;
  border-radius: 999px;
  background: #e8f7ee;
  color: var(--accent-dark);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

.login-notice {
  margin: 20px 0 0;
  border-radius: 16px;
}

.center-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.unavailable-card {
  max-width: 600px;
  text-align: center;
}

.unavailable-card .status-icon {
  margin: 20px auto;
}

.unavailable-card h1 {
  font-size: clamp(30px, 6vw, 46px);
}

.dashboard {
  padding: 26px 0 118px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.topbar > *,
.dashboard-grid > *,
.card-heading > *,
.metric-grid > *,
.action-grid > * {
  min-width: 0;
}

.topbar h1 {
  margin: 5px 0 0;
  font-size: clamp(25px, 4vw, 36px);
}

.runtime-banner {
  width: fit-content;
  margin: 0 0 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
}

.card {
  padding: 20px;
}

.card h2 {
  margin: 6px 0;
}

.baby-card {
  grid-row: span 2;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(221, 245, 231, 0.85));
}

.baby-avatar {
  width: clamp(220px, 28vw, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 16px 0;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff3dc, #ffd2c0 54%, #ffe8cf);
  box-shadow: 0 13px 24px rgba(96, 78, 50, 0.16);
}

.baby-face {
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1.06;
  border-radius: 48% 48% 45% 45%;
  background: #fffaf2;
  color: #8b5843;
  font-size: clamp(38px, 7vw, 62px);
  letter-spacing: 0.08em;
}

.encouragement {
  margin-bottom: 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.feeding-card {
  background: linear-gradient(145deg, #fff, var(--sky));
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bottle-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff8dc, var(--mint));
  color: var(--accent-dark);
  font-size: 28px;
}

.metric-grid,
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-grid > div {
  border: 1px solid rgba(168, 222, 197, 0.75);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, var(--mint));
  padding: 12px;
}

.metric-grid span,
.last-record span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-grid strong {
  display: block;
  color: var(--accent-dark);
  font-size: clamp(21px, 4vw, 30px);
}

.last-record {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
}

.vaccine-card {
  background: linear-gradient(145deg, #fff8dc, #fffaf1);
}

.vaccine-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.action-card {
  grid-column: 1 / -1;
}

.zero-baby-dashboard {
  display: grid;
  align-content: start;
  min-height: 100vh;
}

.zero-baby-card,
.account-card {
  width: min(100%, 620px);
  margin: 42px auto 0;
}

.zero-baby-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(29px, 5vw, 42px);
}

.onboarding-actions {
  margin-top: 22px;
}

.account-card {
  display: grid;
  gap: 12px;
}

.account-card h2,
.account-card p {
  margin-bottom: 0;
}

.sign-out-button {
  justify-self: start;
  margin-top: 8px;
}

.feeding-log-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(226, 240, 255, 0.74));
}

.baby-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.baby-switcher button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: #fff9f1;
  color: var(--accent-dark);
  box-shadow: none;
}

.baby-switcher button.active {
  border-color: transparent;
  background: linear-gradient(145deg, var(--mint), var(--butter));
}

.feeding-record-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feeding-record-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  border: 1px solid rgba(168, 222, 197, 0.72);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.feeding-record-list strong {
  color: var(--accent-dark);
}

.feeding-record-list span,
.feeding-record-list small {
  color: var(--muted);
  font-size: 13px;
}

.feeding-record-list .record-id {
  grid-column: 1 / -1;
  opacity: 0.62;
}

.feeding-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.feeding-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 5;
  width: auto;
  max-width: 720px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 249, 241, 0.96);
  padding: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.nav-item {
  min-height: 56px;
  min-width: 0;
  display: grid;
  gap: 1px;
  place-items: center;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  padding: 5px;
  box-shadow: none;
  font-size: 12px;
}

.nav-item span {
  font-size: 20px;
}

.nav-item.active {
  background: linear-gradient(145deg, var(--mint), var(--butter));
  color: var(--accent-dark);
}

@media (max-width: 780px) {
  .access-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0;
  }

  .brand-panel h1 {
    font-size: 44px;
  }

  .trust-list {
    margin-top: 20px;
  }

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

  .baby-card {
    grid-row: auto;
  }

  .action-card {
    grid-column: auto;
  }

  .feeding-form {
    grid-template-columns: 1fr 1fr;
  }

  .feeding-form label:first-child {
    grid-column: 1 / -1;
  }
}

.vaccination-record-card {
  display: grid;
  gap: 16px;
}

.vaccination-record-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vaccination-record-list li {
  padding: 14px;
  border: 1px solid var(--line, #ddd4c7);
  border-radius: 14px;
  background: var(--surface-soft, #fffaf2);
}

.vaccination-record-list li > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.vaccination-record-list p,
.vaccination-record-list small {
  display: block;
  margin: 6px 0 0;
}

.vaccination-photo-note {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent, #287b70);
  font-size: 0.9rem;
}

.vaccination-private-photo {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(47, 73, 59, 0.12);
}

.vaccination-administered {
  border-color: color-mix(in srgb, var(--accent, #287b70) 38%, var(--line, #ddd4c7));
}

.vaccination-administered-detail {
  color: var(--accent, #287b70);
  font-weight: 700;
}

.vaccination-photo-replace-form {
  display: grid;
  align-content: start;
  gap: 7px;
  margin: 0;
}

.vaccination-photo-replace-form label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.vaccination-photo-replace-form input[type="file"] {
  width: 170px;
  max-width: 100%;
  font-size: 0.8rem;
}

.vaccination-attachment-controls {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vaccination-form {
  display: grid;
  gap: 12px;
}

.vaccination-form label {
  display: grid;
  gap: 6px;
}

.vaccination-form textarea {
  resize: vertical;
}

@media (max-width: 480px) {
  .access-layout,
  .center-layout,
  .dashboard {
    width: min(calc(100% - 20px), 1120px);
  }

  .brand-panel {
    padding: 8px;
  }

  .brand-panel h1 {
    font-size: 38px;
  }

  .access-card,
  .card {
    padding: 18px;
    border-radius: 21px;
  }

  .field-action {
    grid-template-columns: 1fr;
  }

  .password-input-wrap {
    grid-template-columns: 1fr;
  }

  .password-toggle {
    justify-self: start;
  }

  .topbar {
    align-items: flex-start;
  }

  .quiet-button {
    min-height: 42px;
    padding: 8px 12px;
  }

  .onboarding-actions {
    grid-template-columns: 1fr;
  }

  .baby-avatar {
    width: clamp(176px, 55vw, 230px);
  }

  .metric-grid,
  .action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .last-record {
    display: grid;
  }

  .feeding-form {
    grid-template-columns: 1fr;
  }

  .feeding-form label:first-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button {
    transition: transform 120ms ease, box-shadow 120ms ease;
  }

  button:not(:disabled):active {
    transform: translateY(1px);
  }
}

/* Shared care-surface presentation. */
textarea,
select {
  font: inherit;
}

textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.baby-illustration {
  padding: 8px;
}

.baby-illustration svg {
  width: 100%;
  height: 100%;
}

.care-dashboard {
  padding-bottom: calc(136px + env(safe-area-inset-bottom));
}

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

.care-topbar h1 {
  margin: 4px 0;
  font-size: clamp(28px, 4.2vw, 42px);
}

.care-topbar p,
.care-page-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.header-account-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.9);
  color: var(--accent-dark);
  box-shadow: none;
}

.header-account-button svg,
.care-icon-tile svg,
.care-empty-icon svg,
.growth-metric svg,
.nav-item svg {
  width: 22px;
  height: 22px;
}

.care-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 14px;
}

.care-baby-card {
  grid-row: span 2;
  min-height: 418px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(221, 245, 231, 0.85));
}

.care-baby-card.compact-baby-card {
  width: min(100%, 760px);
  min-height: 0;
  grid-row: auto;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.baby-avatar-trigger {
  position: relative;
  display: grid;
  width: min(360px, 78vw);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.baby-avatar-trigger:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 5px;
}

.care-baby-card .baby-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 8px;
  overflow: hidden;
}

.baby-avatar-camera {
  position: absolute;
  right: 7%;
  bottom: 7%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-dark);
  border: 3px solid #fffaf2;
}

.baby-avatar-camera svg {
  width: 19px;
  height: 19px;
}

.care-baby-card .baby-avatar svg {
  width: 84%;
  height: 84%;
}

.care-baby-card .baby-avatar img,
.baby-switcher-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.baby-summary-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}

.baby-summary-line h2,
.baby-summary-line p {
  margin: 0;
}

.baby-summary-line p {
  color: var(--muted);
}

.compact-baby-card .baby-summary-line {
  justify-content: flex-start;
}

.photo-edit-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.9);
  color: var(--accent-dark);
  box-shadow: none;
}

.photo-edit-button svg {
  width: 18px;
  height: 18px;
}

.care-baby-copy h2 {
  margin: 4px 0;
  font-size: clamp(24px, 3.4vw, 34px);
}

.care-baby-copy h2 span {
  color: var(--muted);
  font-size: 0.62em;
}

.care-feeding-summary,
.care-vaccine-summary,
.care-next-step-card {
  min-width: 0;
}

.care-feeding-summary {
  background: linear-gradient(145deg, #fff, var(--sky));
}

.care-vaccine-summary {
  background: linear-gradient(145deg, #fff8dc, #fffaf1);
}

.care-next-step-card {
  grid-column: 1 / -1;
}

.care-icon-tile,
.care-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8dc, var(--mint));
  color: var(--accent-dark);
}

.care-icon-tile.large {
  width: 62px;
  height: 62px;
  border-radius: 21px;
}

.care-icon-tile.large svg {
  width: 30px;
  height: 30px;
}

.inline-action {
  min-height: 40px;
  margin-top: 14px;
  padding: 8px 12px;
}

.care-action-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.care-action-rail button {
  min-height: 42px;
  flex: 1 1 150px;
}

.care-page-intro {
  margin: 0 0 14px;
}

.care-page-intro h2 {
  margin: 4px 0 7px;
  font-size: clamp(25px, 3.6vw, 35px);
}

.detail-page-intro .text-button {
  margin-bottom: 12px;
}

.care-link-grid,
.care-reminder-grid,
.care-growth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.care-link-card {
  display: grid;
  align-content: start;
  gap: 9px;
}

.care-link-card h2,
.care-link-card p,
.care-reminder-card h2,
.care-reminder-card p,
.care-action-panel h2,
.care-action-panel p {
  margin: 0;
}

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

.photo-editor-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(38, 52, 47, 0.52);
}

.photo-editor-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 620px);
  padding: clamp(18px, 4vw, 28px);
  border-radius: 28px;
  color: var(--ink);
  background: #fffaf2;
  box-shadow: 0 26px 70px rgba(38, 52, 47, 0.28);
}

.photo-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.photo-editor-heading h2,
.photo-editor-help {
  margin: 0;
}

.photo-editor-heading > svg {
  width: 28px;
  height: 28px;
  color: var(--accent-dark);
}

.photo-editor-help {
  color: var(--muted);
}

.photo-editor-crop-frame {
  width: min(100%, 460px);
  justify-self: center;
  overflow: hidden;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 24px;
  background: #e4eee8;
  box-shadow: inset 0 0 0 1px rgba(38, 52, 47, 0.2), 0 10px 26px rgba(38, 52, 47, 0.14);
}

.photo-editor-crop-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.photo-editor-crop-frame canvas:active {
  cursor: grabbing;
}

.photo-editor-controls,
.photo-editor-actions,
.photo-editor-confirmation,
.photo-editor-zoom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.photo-editor-controls {
  justify-content: space-between;
}

.photo-editor-zoom {
  flex: 1 1 300px;
}

.photo-editor-zoom label {
  display: grid;
  flex: 1 1 150px;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}

.photo-editor-zoom input {
  width: 100%;
  accent-color: var(--accent-dark);
}

.photo-editor-confirmation {
  justify-content: flex-end;
  padding-top: 2px;
}

.baby-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.baby-switcher-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
}

.baby-switcher-avatar svg {
  width: 86%;
  height: 86%;
}


.care-link-card p,
.care-reminder-card p,
.care-action-panel p {
  color: var(--muted);
}

.care-reminder-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.care-reminder-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.care-reminder-card:nth-child(2) {
  background: linear-gradient(145deg, #fff, var(--mint));
}

.care-action-panel,
.vaccine-feature-card,
.baby-onboarding-form-card {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.vaccine-feature-card {
  justify-items: start;
  background: linear-gradient(145deg, #fff, var(--mint));
}

.vaccine-feature-card h2,
.vaccine-feature-card p {
  margin: 0;
}

.vaccine-feature-card p {
  color: var(--muted);
}

.vaccine-schedule-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.vaccine-schedule-card .muted,
.vaccine-source-note {
  margin: 0;
  color: var(--muted);
}

.vaccine-source-note {
  font-size: 13px;
}

.vaccine-schedule-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vaccine-schedule-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(37, 97, 78, 0.12);
}

.vaccine-schedule-list h3,
.vaccine-schedule-list p {
  margin: 0;
}

.vaccine-schedule-copy {
  min-width: 0;
}

@media (max-width: 640px) {
  .vaccine-schedule-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .vaccination-attachment-controls {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.vaccine-schedule-list h3 {
  font-size: 15px;
}

.vaccine-schedule-list p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.vaccine-schedule-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--mint);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vaccine-schedule-status.status-review {
  color: #805a21;
  background: #fff0c7;
}

.care-empty-state {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(100%, 680px);
  margin: 14px auto 0;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 240, 173, 0.38));
}

.care-empty-state h2,
.care-empty-state p {
  margin: 0;
}

.care-empty-state p {
  max-width: 470px;
  color: var(--muted);
}

.care-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 21px;
}

.care-empty-icon svg {
  width: 31px;
  height: 31px;
}

.zero-baby-welcome .care-empty-icon {
  width: 132px;
  height: 124px;
  padding: 12px;
  border-radius: 36px;
  background: linear-gradient(145deg, #fff3dc, #ffd2c0 54%, #ffe8cf);
}

.zero-baby-welcome .care-empty-icon svg {
  width: 100%;
  height: 100%;
}

.care-growth-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.growth-metric {
  display: grid;
  gap: 7px;
  justify-items: start;
  background: linear-gradient(145deg, #fff, #f7fbff);
}

.growth-metric span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--sky);
  color: var(--accent-dark);
}

.growth-metric p {
  margin: 0;
  color: var(--muted);
}

.care-account-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.care-account-link h2,
.care-account-link p {
  margin: 4px 0 0;
}

.care-account-link p {
  color: var(--muted);
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0;
}

.account-summary div {
  padding: 11px;
  border-radius: 15px;
  background: #fff8ee;
}

.account-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-summary dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.care-form {
  display: grid;
  gap: 13px;
}

.care-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.care-form .form-help {
  margin: 0;
}

.bottom-nav .nav-item span {
  display: grid;
  place-items: center;
  font-size: inherit;
}

.bottom-nav .nav-item.active svg {
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 780px) {
  .care-home-grid,
  .care-link-grid,
  .care-reminder-grid,
  .care-growth-grid {
    grid-template-columns: 1fr;
  }

  .care-baby-card,
  .care-next-step-card {
    grid-row: auto;
    grid-column: auto;
  }

  .care-baby-card.compact-baby-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

}

@media (max-width: 480px) {
  .care-topbar {
    gap: 10px;
  }

  .care-topbar h1 {
    font-size: 28px;
  }

  .header-account-button span {
    display: none;
  }

  .header-account-button {
    min-width: 44px;
    justify-content: center;
    padding: 8px;
  }

  .care-baby-card {
    min-height: 0;
    padding: 18px;
  }

  .baby-avatar-trigger {
    width: min(250px, 68vw);
  }

  .baby-summary-line {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .photo-editor-backdrop {
    padding: 0;
  }

  .photo-editor-panel {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    align-content: center;
  }

  .photo-editor-controls,
  .photo-editor-confirmation {
    justify-content: stretch;
  }

  .photo-editor-actions,
  .photo-editor-confirmation {
    width: 100%;
  }

  .photo-editor-actions button,
  .photo-editor-confirmation button {
    flex: 1 1 130px;
  }

  .care-account-link {
    display: grid;
  }

  .care-account-link button {
    width: 100%;
  }

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