:root {
  --bg: #f5f1ea;
  --paper: #fffdfa;
  --ink: #25231f;
  --muted: #746d64;
  --line: #e6ded4;
  --orange: #dc7040;
  --orange-soft: #fcede3;
  --sage: #7d9275;
  --sage-soft: #eaf0e6;
  --shadow: 0 20px 48px rgba(64, 48, 35, 0.09);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 6%, #f9dccb 0, transparent 23rem), var(--bg);
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app {
  width: min(1100px, 100%);
  margin: auto;
  padding: 28px 24px 66px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand,
.organizer-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  letter-spacing: -0.04em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
}
.brand-mark img {
  display: block;
  width: 31px;
  height: 31px;
}
.organizer-link {
  color: var(--muted);
  font-size: 13px;
}
.organizer-link:hover {
  color: var(--orange);
}
.hero {
  min-height: 448px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 36px;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.hero h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(34px, 3.5vw, 46px);
  line-height: 0.97;
  letter-spacing: -0.075em;
  white-space: nowrap;
}
.hero-care-line {
  white-space: nowrap;
}
.intro {
  max-width: 380px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
@media (min-width: 480px) {
  .intro {
    max-width: none;
    white-space: nowrap;
  }
}
.pet-facts {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
}
.pet-facts b {
  font-size: 17px;
  color: var(--ink);
}
.pet-facts i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b6aba0;
}
.dog-stage {
  isolation: isolate;
  position: relative;
  align-self: end;
  height: 420px;
  border-radius: 38% 38% 27% 27%/34% 34% 19% 19%;
  overflow: hidden;
  background: linear-gradient(145deg, #f9d5c1, #f5ae88 66%, #e9926b);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    var(--shadow);
}
.dog-stage img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.75;
}
.orb-one {
  top: 39px;
  right: 52px;
  width: 42px;
  height: 42px;
  background: #fff2e8;
}
.orb-two {
  top: 104px;
  left: 42px;
  width: 20px;
  height: 20px;
  background: #e38564;
}
.stage-note {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 21px;
  color: rgba(95, 55, 37, 0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.care-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 14px;
}
.status-card {
  min-height: 184px;
  padding: 21px;
  border: 1px solid rgba(230, 222, 212, 0.9);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.8);
  box-shadow: 0 7px 25px rgba(71, 57, 40, 0.035);
}
.status-card.primary {
  border: 0;
  background: var(--ink);
  color: #fff;
}
.card-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.primary .card-kicker {
  color: #d8d0c7;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0b08e;
  box-shadow: 0 0 0 4px rgba(240, 176, 142, 0.16);
}
.next-title {
  margin: 14px 0 5px;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.next-meta {
  margin: 0;
  color: #d8d0c7;
  font-size: 13px;
  line-height: 1.6;
}
.next-tag {
  display: inline-flex;
  margin-top: 15px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.1);
  color: #f1c2aa;
  font-size: 11px;
  font-weight: 700;
}
.status-loading {
  margin-top: 17px;
  color: #d8d0c7;
  font-size: 14px;
}
.metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 25px;
}
.metric span {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.08em;
}
.metric small {
  color: var(--muted);
  font-size: 12px;
}
.metric-card p,
.action-card p {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.action-card a {
  display: inline-flex;
  gap: 7px;
  margin-top: 15px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 64px 0 17px;
}
.section-head h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.055em;
}
.text-button {
  border: 0;
  background: none;
  padding: 9px 0;
  color: var(--orange);
  font: 700 14px inherit;
  cursor: pointer;
}
.text-button:hover {
  text-decoration: underline;
}
.timeline-wrap {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.empty-state {
  padding: 54px 25px;
  text-align: center;
}
.empty-state h3 {
  margin: 12px 0 6px;
  font-size: 19px;
  letter-spacing: -0.04em;
}
.empty-state p {
  max-width: 360px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  margin: auto;
  border-radius: 15px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 20px;
}
.primary-button {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  background: var(--orange);
  color: #fff;
  font: 700 14px inherit;
  cursor: pointer;
  box-shadow: 0 7px 14px rgba(220, 112, 64, 0.18);
}
.primary-button:hover {
  background: #c95e30;
}
.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 23px;
  list-style: none;
}
.timeline-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child {
  border-bottom: 0;
}
.vaccine-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 18px;
}
.vaccine-title {
  font-size: 15px;
  font-weight: 700;
}
.vaccine-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.vaccine-next {
  text-align: right;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}
.vaccine-next span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.privacy-note {
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.vaccine-dialog {
  width: min(550px, calc(100% - 24px));
  border: 0;
  border-radius: 25px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(32, 25, 19, 0.28);
}
.vaccine-dialog::backdrop {
  background: rgba(37, 31, 25, 0.46);
  backdrop-filter: blur(3px);
}
.vaccine-dialog form {
  display: grid;
  gap: 15px;
  padding: 25px;
}

.vaccine-dialog [hidden] {
  display: none !important;
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 3px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.05em;
}
.close {
  border: 0;
  background: none;
  color: var(--muted);
  font: 30px/1 sans-serif;
  cursor: pointer;
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ddd4ca;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font: 15px inherit;
}
textarea {
  min-height: 82px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.sync-option {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
  background: #f6f1eb;
  color: var(--ink);
  cursor: pointer;
}
.sync-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--orange);
}
.sync-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.form-status {
  min-height: 0;
  margin: 0;
  color: #a74c32;
  font-size: 12px;
  line-height: 1.5;
}
.form-status:not(:empty) {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff1ec;
}
.submit {
  width: 100%;
}
.submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
@media (max-width: 720px) {
  .app {
    padding: 20px 15px 48px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 44px 3px 6px;
    margin-bottom: 22px;
  }
  .hero h1 {
    font-size: clamp(26px, 7.5vw, 30px);
  }
  .dog-stage {
    height: 354px;
    max-width: 460px;
    width: 100%;
    justify-self: center;
  }
  .care-grid {
    grid-template-columns: 1fr;
  }
  .status-card {
    min-height: 151px;
  }
  .section-head {
    margin-top: 48px;
  }
  .timeline-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .vaccine-next {
    grid-column: 2;
    text-align: left;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .organizer-link {
    font-size: 12px;
  }
}

.record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.record-actions .text-button {
  padding: 2px 0;
  font-size: 11px;
}

.danger-button {
  color: #9a3423;
}

@media (max-width: 720px) {
  .record-actions {
    justify-content: flex-start;
  }
}
